# HG changeset patch # User coleenp # Date 1367962211 25200 # Node ID 49fdddea161966d36ad1b078f32b526decd9dfe4 # Parent 6ba3841cb7f9e9b8a93751d1ce8f71bde73ad8a1# Parent 847072c96771080d761b71a1eb421c04b02b2f3f Merge diff -r 6ba3841cb7f9 -r 49fdddea1619 hotspot/src/cpu/sparc/vm/jni_sparc.h --- a/hotspot/src/cpu/sparc/vm/jni_sparc.h Tue May 07 21:36:59 2013 +0200 +++ b/hotspot/src/cpu/sparc/vm/jni_sparc.h Tue May 07 14:30:11 2013 -0700 @@ -23,7 +23,12 @@ * questions. */ -#if defined(__GNUC__) && (__GNUC__ >= 4) +// Note: please do not change these without also changing jni_md.h in the JDK +// repository +#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 diff -r 6ba3841cb7f9 -r 49fdddea1619 hotspot/src/cpu/x86/vm/jni_x86.h --- a/hotspot/src/cpu/x86/vm/jni_x86.h Tue May 07 21:36:59 2013 +0200 +++ b/hotspot/src/cpu/x86/vm/jni_x86.h Tue May 07 14:30:11 2013 -0700 @@ -28,7 +28,13 @@ #if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE) -#if defined(__GNUC__) && (__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2) + +// Note: please do not change these without also changing jni_md.h in the JDK +// repository +#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 diff -r 6ba3841cb7f9 -r 49fdddea1619 hotspot/src/cpu/zero/vm/jni_zero.h --- a/hotspot/src/cpu/zero/vm/jni_zero.h Tue May 07 21:36:59 2013 +0200 +++ b/hotspot/src/cpu/zero/vm/jni_zero.h Tue May 07 14:30:11 2013 -0700 @@ -25,7 +25,13 @@ */ -#if defined(__GNUC__) && (__GNUC__ >= 4) + +// Note: please do not change these without also changing jni_md.h in the JDK +// repository +#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