summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xfuncproto.h.in19
1 files changed, 12 insertions, 7 deletions
diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
index e8f02be..2421ae4 100644
--- a/Xfuncproto.h.in
+++ b/Xfuncproto.h.in
@@ -85,24 +85,29 @@ in this Software without prior written authorization from The Open Group.
# define _X_ATTRIBUTE_PRINTF(x,y)
#endif /* GNUC >= 4 */
-#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
+#if defined(__GNUC__) && (__GNUC__ >= 4)
# define _X_EXPORT __attribute__((visibility("default")))
# define _X_HIDDEN __attribute__((visibility("hidden")))
# define _X_INTERNAL __attribute__((visibility("internal")))
-# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
-# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
-# define _X_INLINE inline
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
# define _X_EXPORT __global
# define _X_HIDDEN __hidden
# define _X_INTERNAL __hidden
+#else /* not gcc >= 4 and not Sun Studio >= 8 */
+# define _X_EXPORT
+# define _X_HIDDEN
+# define _X_INTERNAL
+#endif /* GNUC >= 4 */
+
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
+# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
+# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
+# define _X_INLINE inline
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
# define _X_LIKELY(x) (x)
# define _X_UNLIKELY(x) (x)
# define _X_INLINE inline
#else /* not gcc >= 3.3 and not Sun Studio >= 8 */
-# define _X_EXPORT
-# define _X_HIDDEN
-# define _X_INTERNAL
# define _X_LIKELY(x) (x)
# define _X_UNLIKELY(x) (x)
# define _X_INLINE