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(JNIEnv *env, const char *name);
392
393 void* getProcessHandle();
394
395 void buildJniFunctionName(const char *sym, const char *cname,
396 char *jniEntryName);
397
398 JNIEXPORT size_t JNICALL
399 getLastErrorString(char *buf, size_t len);
400
401 JNIEXPORT int JNICALL
402 getErrorString(int err, char *buf, size_t len);
403
404 #ifdef STATIC_BUILD
405 /* Macros for handling declaration of static/dynamic
406 * JNI library Load/Unload functions
407 *
408 * Use DEF_JNI_On{Un}Load when you want a static and non-static entry points.
409 * Use DEF_STATIC_JNI_On{Un}Load when you only want a static one.
410 *
411 * LIBRARY_NAME must be set to the name of the library
|
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 JNIEXPORT void InitializeEncoding(JNIEnv *env, const char *name);
392
393 void* getProcessHandle();
394
395 void buildJniFunctionName(const char *sym, const char *cname,
396 char *jniEntryName);
397
398 JNIEXPORT size_t JNICALL
399 getLastErrorString(char *buf, size_t len);
400
401 JNIEXPORT int JNICALL
402 getErrorString(int err, char *buf, size_t len);
403
404 #ifdef STATIC_BUILD
405 /* Macros for handling declaration of static/dynamic
406 * JNI library Load/Unload functions
407 *
408 * Use DEF_JNI_On{Un}Load when you want a static and non-static entry points.
409 * Use DEF_STATIC_JNI_On{Un}Load when you only want a static one.
410 *
411 * LIBRARY_NAME must be set to the name of the library
|