hotspot/src/cpu/sparc/vm/jni_sparc.h
changeset 17312 847072c96771
parent 8921 14bfe81f2a9d
child 22234 da823d78ad65
--- a/hotspot/src/cpu/sparc/vm/jni_sparc.h	Tue May 07 14:33:09 2013 +0200
+++ b/hotspot/src/cpu/sparc/vm/jni_sparc.h	Tue May 07 13:45:59 2013 -0400
@@ -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