Bug 337196 - Make sure to export public JNI methods when using GCC's hidden visibility feature
git-svn-id: svn://10.0.0.236/trunk@197889 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -40,19 +40,25 @@
|
||||
#include "nsDebug.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
#define JX_EXPORT JNIEXPORT
|
||||
#else
|
||||
#define JX_EXPORT JNIEXPORT NS_EXPORT
|
||||
#endif
|
||||
|
||||
|
||||
/***********************
|
||||
* JNI Load & Unload
|
||||
***********************/
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
extern "C" JX_EXPORT jint JNICALL
|
||||
JNI_OnLoad(JavaVM* vm, void* reserved)
|
||||
{
|
||||
// Let the JVM know that we are using JDK 1.2 JNI features.
|
||||
return JNI_VERSION_1_2;
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
extern "C" JX_EXPORT void JNICALL
|
||||
JNI_OnUnload(JavaVM* vm, void* reserved)
|
||||
{
|
||||
}
|
||||
@@ -261,7 +267,7 @@ RegisterNativeMethods(JNIEnv* env, void** aFunctions)
|
||||
|
||||
// Load the JavaXPCOM methods from the XUL shared library, and registers them
|
||||
// as Java native methods.
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
extern "C" JX_EXPORT void JNICALL
|
||||
JXM_NATIVE(registerJavaXPCOMMethodsNative) (JNIEnv *env, jclass that,
|
||||
jobject aXPCOMPath)
|
||||
{
|
||||
|
||||
@@ -57,12 +57,6 @@
|
||||
#define LOG(x) /* nothing */
|
||||
#endif
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_MAC)
|
||||
#define JX_EXPORT JNIEXPORT
|
||||
#else
|
||||
#define JX_EXPORT JNIEXPORT NS_EXPORT
|
||||
#endif
|
||||
|
||||
|
||||
/*********************
|
||||
* Java JNI globals
|
||||
|
||||
Reference in New Issue
Block a user