summaryrefslogtreecommitdiff
path: root/proto/x11proto/Xfuncproto.h.in
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-09-14 07:31:44 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-09-14 07:31:44 +0000
commit38aec5d1d98e4a02da3577ee89cd1e78d4f060ba (patch)
tree4c7eb396fb1d446488d9e1585ad4ef45d96d06b5 /proto/x11proto/Xfuncproto.h.in
parent6ef13882bff3dee07e4147778fa5e821ce2ba5a1 (diff)
x11proto 7.0.13. tested by naddy@ on a bulk ports build
Diffstat (limited to 'proto/x11proto/Xfuncproto.h.in')
-rw-r--r--proto/x11proto/Xfuncproto.h.in18
1 files changed, 16 insertions, 2 deletions
diff --git a/proto/x11proto/Xfuncproto.h.in b/proto/x11proto/Xfuncproto.h.in
index b08a1e850..2421ae4d2 100644
--- a/proto/x11proto/Xfuncproto.h.in
+++ b/proto/x11proto/Xfuncproto.h.in
@@ -85,7 +85,7 @@ 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")))
@@ -93,10 +93,24 @@ in this Software without prior written authorization from The Open Group.
# define _X_EXPORT __global
# define _X_HIDDEN __hidden
# define _X_INTERNAL __hidden
-#else /* not gcc >= 3.3 and not Sun Studio >= 8 */
+#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_LIKELY(x) (x)
+# define _X_UNLIKELY(x) (x)
+# define _X_INLINE
#endif
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)