Mercurial > hg > openjdk > jigsaw > jdk
changeset 7288:4ed143ddbb8a
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
author | martin |
---|---|
date | Mon, 15 Apr 2013 14:07:17 -0700 |
parents | 5c406a747192 |
children | baaa706d7677 |
files | src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h src/share/npt/npt.h src/solaris/javavm/export/jni_md.h src/solaris/native/sun/awt/awt_LoadLibrary.c |
diffstat | 4 files changed, 21 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h Sun Apr 14 19:17:30 2013 +0100 +++ b/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h Mon Apr 15 14:07:17 2013 -0700 @@ -143,9 +143,9 @@ * structure from the information present in a given Java Composite * object. */ -typedef JNIEXPORT void (JNICALL CompInfoFunc)(JNIEnv *env, - CompositeInfo *pCompInfo, - jobject Composite); +typedef void (JNICALL CompInfoFunc)(JNIEnv *env, + CompositeInfo *pCompInfo, + jobject Composite); /* * The additional information needed to implement a primitive that
--- a/src/share/npt/npt.h Sun Apr 14 19:17:30 2013 +0100 +++ b/src/share/npt/npt.h Mon Apr 15 14:07:17 2013 -0700 @@ -94,13 +94,13 @@ JNIEXPORT void JNICALL nptInitialize (NptEnv **pnpt, char *nptVersion, char *options); -typedef JNIEXPORT void (JNICALL *NptInitialize) - (NptEnv **pnpt, char *nptVersion, char *options); +typedef void (JNICALL *NptInitialize) + (NptEnv **pnpt, char *nptVersion, char *options); JNIEXPORT void JNICALL nptTerminate (NptEnv* npt, char *options); -typedef JNIEXPORT void (JNICALL *NptTerminate) - (NptEnv* npt, char *options); +typedef void (JNICALL *NptTerminate) + (NptEnv* npt, char *options); #ifdef __cplusplus } /* extern "C" */
--- a/src/solaris/javavm/export/jni_md.h Sun Apr 14 19:17:30 2013 +0100 +++ b/src/solaris/javavm/export/jni_md.h Mon Apr 15 14:07:17 2013 -0700 @@ -26,8 +26,17 @@ #ifndef _JAVASOFT_JNI_MD_H_ #define _JAVASOFT_JNI_MD_H_ -#define JNIEXPORT -#define JNIIMPORT +#ifndef __has_attribute + #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 typedef int jint;
--- a/src/solaris/native/sun/awt/awt_LoadLibrary.c Sun Apr 14 19:17:30 2013 +0100 +++ b/src/solaris/native/sun/awt/awt_LoadLibrary.c Mon Apr 15 14:07:17 2013 -0700 @@ -43,7 +43,7 @@ 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 first loaded */ @@ -206,7 +206,7 @@ jobject frame, jstring jcommand) { /* type of the old backdoor function */ - typedef JNIEXPORT void JNICALL + typedef void JNICALL XsessionWMcommand_type(JNIEnv *env, jobject this, jobject frame, jstring jcommand); @@ -234,7 +234,7 @@ JNIEXPORT void JNICALL Java_sun_awt_motif_XsessionWMcommand_New(JNIEnv *env, jobjectArray jargv) { - typedef JNIEXPORT void JNICALL + typedef void JNICALL XsessionWMcommand_New_type(JNIEnv *env, jobjectArray jargv); static XsessionWMcommand_New_type *XsessionWMcommand = NULL;