Bug 337196 - Make sure to export public JNI methods when using GCC's hidden visibility feature

This commit is contained in:
pedemont%us.ibm.com 2006-05-17 21:42:41 +00:00
Родитель e58e3e05ba
Коммит 2e3ed0d23e
2 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

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