blob: 09b5fe41062d941ca78c661ec90a07ddf37e077e [file]
/**
* os.h
*
* This file contains the global macro declarations for the
* OS library.
*
*/
#ifndef INC_os_H
#define INC_os_H
#include "jni.h"
#define OS_NATIVE(func) Java_org_eclipse_epp_installer_internal_core_OS_##func
#ifdef __cplusplus
extern "C" {
#endif
extern int IS_JNI_1_2;
/* 64 bit support */
#ifndef OS_PTR_SIZE_64
#define GetOS_PTRField GetIntField
#define SetOS_PTRField SetIntField
#define NewOS_PTRArray NewIntArray
#define CallStaticOS_PTRMethodV CallStaticIntMethodV
#define CallOS_PTRMethodV CallIntMethodV
#define CallStaticOS_PTRMethod CallStaticIntMethod
#define CallOS_PTRMethod CallIntMethod
#define GetOS_PTRArrayElements GetIntArrayElements
#define ReleaseOS_PTRArrayElements ReleaseIntArrayElements
#define OS_PTRArray jintArray
#define OS_PTR jint
#define OS_PTR_SIGNATURE "I"
#else
#define GetOS_PTRField GetLongField
#define SetOS_PTRField SetLongField
#define NewOS_PTRArray NewLongArray
#define CallStaticOS_PTRMethodV CallStaticLongMethodV
#define CallOS_PTRMethodV CallLongMethodV
#define CallStaticOS_PTRMethod CallStaticLongMethod
#define CallOS_PTRMethod CallLongMethod
#define GetOS_PTRArrayElements GetLongArrayElements
#define ReleaseOS_PTRArrayElements ReleaseLongArrayElements
#define OS_PTRArray jlongArray
#define OS_PTR jlong
#define OS_PTR_SIGNATURE "J"
#endif
void throwOutOfMemory(JNIEnv *env);
#define CHECK_NULL_VOID(ptr) \
if ((ptr) == NULL) { \
throwOutOfMemory(env); \
return; \
}
#define CHECK_NULL(ptr) \
if ((ptr) == NULL) { \
throwOutOfMemory(env); \
return 0; \
}
#ifdef __cplusplus
}
#endif
#endif /* ifndef INC_os_H */