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:
pedemont%us.ibm.com
2006-05-17 21:42:41 +00:00
parent 52fff307bc
commit dfb298fa6d
2 changed files with 9 additions and 9 deletions

View File

@@ -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)
{