365 */
366 JNIEXPORT void * JNICALL
367 JNU_GetEnv(JavaVM *vm, jint version);
368
369 /*
370 * Warning free access to pointers stored in Java long fields.
371 */
372 #define JNU_GetLongFieldAsPtr(env,obj,id) \
373 (jlong_to_ptr((*(env))->GetLongField((env),(obj),(id))))
374 #define JNU_SetLongFieldFromPtr(env,obj,id,val) \
375 (*(env))->SetLongField((env),(obj),(id),ptr_to_jlong(val))
376
377 /*
378 * Internal use only.
379 */
380 enum {
381 NO_ENCODING_YET = 0, /* "sun.jnu.encoding" not yet set */
382 NO_FAST_ENCODING, /* Platform encoding is not fast */
383 FAST_8859_1, /* ISO-8859-1 */
384 FAST_CP1252, /* MS-DOS Cp1252 */
385 FAST_646_US /* US-ASCII : ISO646-US */
386 };
387
388 int getFastEncoding();
389
390 void initializeEncoding();
391
392 void* getProcessHandle();
393
394 void buildJniFunctionName(const char *sym, const char *cname,
395 char *jniEntryName);
396
397 extern size_t getLastErrorString(char *buf, size_t len);
398 extern int getErrorString(int err, char *buf, size_t len);
399
400 #ifdef STATIC_BUILD
401 /* Macros for handling declaration of static/dynamic
402 * JNI library Load/Unload functions
403 *
404 * Use DEF_JNI_On{Un}Load when you want a static and non-static entry points.
405 * Use DEF_STATIC_JNI_On{Un}Load when you only want a static one.
|
365 */
366 JNIEXPORT void * JNICALL
367 JNU_GetEnv(JavaVM *vm, jint version);
368
369 /*
370 * Warning free access to pointers stored in Java long fields.
371 */
372 #define JNU_GetLongFieldAsPtr(env,obj,id) \
373 (jlong_to_ptr((*(env))->GetLongField((env),(obj),(id))))
374 #define JNU_SetLongFieldFromPtr(env,obj,id,val) \
375 (*(env))->SetLongField((env),(obj),(id),ptr_to_jlong(val))
376
377 /*
378 * Internal use only.
379 */
380 enum {
381 NO_ENCODING_YET = 0, /* "sun.jnu.encoding" not yet set */
382 NO_FAST_ENCODING, /* Platform encoding is not fast */
383 FAST_8859_1, /* ISO-8859-1 */
384 FAST_CP1252, /* MS-DOS Cp1252 */
385 FAST_646_US, /* US-ASCII : ISO646-US */
386 FAST_UTF_8
387 };
388
389 int getFastEncoding();
390
391 void initializeEncoding();
392
393 void* getProcessHandle();
394
395 void buildJniFunctionName(const char *sym, const char *cname,
396 char *jniEntryName);
397
398 extern size_t getLastErrorString(char *buf, size_t len);
399 extern int getErrorString(int err, char *buf, size_t len);
400
401 #ifdef STATIC_BUILD
402 /* Macros for handling declaration of static/dynamic
403 * JNI library Load/Unload functions
404 *
405 * Use DEF_JNI_On{Un}Load when you want a static and non-static entry points.
406 * Use DEF_STATIC_JNI_On{Un}Load when you only want a static one.
|