diff --git a/bindings/java/src/jni/javasigar.c b/bindings/java/src/jni/javasigar.c index 2c613574..0f66544c 100644 --- a/bindings/java/src/jni/javasigar.c +++ b/bindings/java/src/jni/javasigar.c @@ -14,23 +14,12 @@ #endif #include "javasigar_generated.h" +#include "javasigar.h" #if defined(__osf__) #define SIGAR_POINTER_LONG #endif -#define JENV (*env) - -#define SIGAR_PACKAGE "net/hyperic/sigar/" - -#define SIGAR_JNI(m) JNICALL Java_net_hyperic_sigar_##m - -#define SIGAR_FIND_CLASS(name) \ - JENV->FindClass(env, SIGAR_PACKAGE name) - -#define SIGAR_CLASS_SIG(name) \ - "L" SIGAR_PACKAGE name ";" - typedef struct { jclass classref; jfieldID *ids; diff --git a/bindings/java/src/jni/javasigar.h b/bindings/java/src/jni/javasigar.h new file mode 100644 index 00000000..69b36ab1 --- /dev/null +++ b/bindings/java/src/jni/javasigar.h @@ -0,0 +1,12 @@ +#define JENV (*env) + +#define SIGAR_PACKAGE "net/hyperic/sigar/" + +#define SIGAR_JNI(m) JNICALL Java_net_hyperic_sigar_##m + +#define SIGAR_FIND_CLASS(name) \ + JENV->FindClass(env, SIGAR_PACKAGE name) + +#define SIGAR_CLASS_SIG(name) \ + "L" SIGAR_PACKAGE name ";" +