提交 3624301b 编写于 作者: M martin

8008509: 6588413 changed JNIEXPORT visibility for GCC on HSX, jdk's jni_md.h needs similar change

Summary: Define JNIEXPORT to use "default" visibility where possible.
Reviewed-by: coleenp, ddehaven, dcubed, anthony
上级 d61a0a4b
...@@ -143,7 +143,7 @@ typedef struct _SurfaceType { ...@@ -143,7 +143,7 @@ typedef struct _SurfaceType {
* structure from the information present in a given Java Composite * structure from the information present in a given Java Composite
* object. * object.
*/ */
typedef JNIEXPORT void (JNICALL CompInfoFunc)(JNIEnv *env, typedef void (JNICALL CompInfoFunc)(JNIEnv *env,
CompositeInfo *pCompInfo, CompositeInfo *pCompInfo,
jobject Composite); jobject Composite);
......
...@@ -94,12 +94,12 @@ typedef struct { ...@@ -94,12 +94,12 @@ typedef struct {
JNIEXPORT void JNICALL nptInitialize JNIEXPORT void JNICALL nptInitialize
(NptEnv **pnpt, char *nptVersion, char *options); (NptEnv **pnpt, char *nptVersion, char *options);
typedef JNIEXPORT void (JNICALL *NptInitialize) typedef void (JNICALL *NptInitialize)
(NptEnv **pnpt, char *nptVersion, char *options); (NptEnv **pnpt, char *nptVersion, char *options);
JNIEXPORT void JNICALL nptTerminate JNIEXPORT void JNICALL nptTerminate
(NptEnv* npt, char *options); (NptEnv* npt, char *options);
typedef JNIEXPORT void (JNICALL *NptTerminate) typedef void (JNICALL *NptTerminate)
(NptEnv* npt, char *options); (NptEnv* npt, char *options);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -26,8 +26,17 @@ ...@@ -26,8 +26,17 @@
#ifndef _JAVASOFT_JNI_MD_H_ #ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_ #define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT #ifndef __has_attribute
#define JNIIMPORT #define __has_attribute(x) 0
#endif
#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#endif
#define JNICALL #define JNICALL
typedef int jint; typedef int jint;
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
static void *awtHandle = NULL; static void *awtHandle = NULL;
typedef JNIEXPORT jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved); typedef jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved);
/* Initialize the Java VM instance variable when the library is /* Initialize the Java VM instance variable when the library is
first loaded */ first loaded */
...@@ -206,7 +206,7 @@ Java_sun_awt_motif_XsessionWMcommand(JNIEnv *env, jobject this, ...@@ -206,7 +206,7 @@ Java_sun_awt_motif_XsessionWMcommand(JNIEnv *env, jobject this,
jobject frame, jstring jcommand) jobject frame, jstring jcommand)
{ {
/* type of the old backdoor function */ /* type of the old backdoor function */
typedef JNIEXPORT void JNICALL typedef void JNICALL
XsessionWMcommand_type(JNIEnv *env, jobject this, XsessionWMcommand_type(JNIEnv *env, jobject this,
jobject frame, jstring jcommand); jobject frame, jstring jcommand);
...@@ -234,7 +234,7 @@ Java_sun_awt_motif_XsessionWMcommand(JNIEnv *env, jobject this, ...@@ -234,7 +234,7 @@ Java_sun_awt_motif_XsessionWMcommand(JNIEnv *env, jobject this,
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
Java_sun_awt_motif_XsessionWMcommand_New(JNIEnv *env, jobjectArray jargv) Java_sun_awt_motif_XsessionWMcommand_New(JNIEnv *env, jobjectArray jargv)
{ {
typedef JNIEXPORT void JNICALL typedef void JNICALL
XsessionWMcommand_New_type(JNIEnv *env, jobjectArray jargv); XsessionWMcommand_New_type(JNIEnv *env, jobjectArray jargv);
static XsessionWMcommand_New_type *XsessionWMcommand = NULL; static XsessionWMcommand_New_type *XsessionWMcommand = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册