summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glxclient.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-18 13:26:30 -0600
committerBrian Paul <[email protected]>2008-09-18 13:26:30 -0600
commita25e1aa0aab6bd278eefa7c0748b491c9c6ae62c (patch)
treead5b7db25d4d24b64faed5107505ee0c0a79dae9 /src/glx/x11/glxclient.h
parent3537da87de2601fa53eeda3e8d7fa0bca6eb6716 (diff)
glx: remove #include "glheader.h" lines
Was only used to get the PUBLIC/USED macros. Also, replace "GL_FALSE" with "False" in a couple places.
Diffstat (limited to 'src/glx/x11/glxclient.h')
-rw-r--r--src/glx/x11/glxclient.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glx/x11/glxclient.h b/src/glx/x11/glxclient.h
index 412511247ef..b10c2ae17b4 100644
--- a/src/glx/x11/glxclient.h
+++ b/src/glx/x11/glxclient.h
@@ -68,6 +68,23 @@
#include "glxextensions.h"
+
+/* If we build the library with gcc's -fvisibility=hidden flag, we'll
+ * use the PUBLIC macro to mark functions that are to be exported.
+ *
+ * We also need to define a USED attribute, so the optimizer doesn't
+ * inline a static function that we later use in an alias. - ajax
+ */
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+# define PUBLIC __attribute__((visibility("default")))
+# define USED __attribute__((used))
+#else
+# define PUBLIC
+# define USED
+#endif
+
+
+
#define GLX_MAJOR_VERSION 1 /* current version numbers */
#define GLX_MINOR_VERSION 4