# HG changeset patch # User coleenp # Date 1367977607 25200 # Node ID 28ae1d38d2965da85030f58d3bee4d106dac2d4f # Parent 7243490a684726330004cacb1e76dbd269327411# Parent a1cc1d1e7ce58c35498d03fce5f818524d8a1f75 Merge diff -r a1cc1d1e7ce5 -r 28ae1d38d296 src/cpu/sparc/vm/jni_sparc.h --- a/src/cpu/sparc/vm/jni_sparc.h Tue May 07 16:17:43 2013 -0700 +++ b/src/cpu/sparc/vm/jni_sparc.h Tue May 07 18:46:47 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 a1cc1d1e7ce5 -r 28ae1d38d296 src/cpu/x86/vm/jni_x86.h --- a/src/cpu/x86/vm/jni_x86.h Tue May 07 16:17:43 2013 -0700 +++ b/src/cpu/x86/vm/jni_x86.h Tue May 07 18:46:47 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 a1cc1d1e7ce5 -r 28ae1d38d296 src/cpu/zero/vm/jni_zero.h --- a/src/cpu/zero/vm/jni_zero.h Tue May 07 16:17:43 2013 -0700 +++ b/src/cpu/zero/vm/jni_zero.h Tue May 07 18:46:47 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