summaryrefslogtreecommitdiff
path: root/src/mapi/glapi/glapi.h
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-08-23 16:13:12 +0800
committerChia-I Wu <olv@lunarg.com>2010-08-23 18:28:14 +0800
commite607b67ebc0d15f6709fc8f9c79afeeda8ac1031 (patch)
treebcf25bdb43346c4760eb4b29938ad64c45195bb6 /src/mapi/glapi/glapi.h
parent0c878280506767c38887b71b45af2cb64a0f4abd (diff)
glapi: Clean up header inclusions.
Do not rely on PUBLIC being defined in glapi.h. Do not include core mesa headers.
Diffstat (limited to 'src/mapi/glapi/glapi.h')
-rw-r--r--src/mapi/glapi/glapi.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/mapi/glapi/glapi.h b/src/mapi/glapi/glapi.h
index 1f18bf00fd..a0bb078106 100644
--- a/src/mapi/glapi/glapi.h
+++ b/src/mapi/glapi/glapi.h
@@ -45,7 +45,26 @@
#define _GLAPI_H
-#define _GLAPI_EXPORT PUBLIC
+/* opengl.dll does not export _glapi_* */
+#if defined(_WIN32)
+#define _GLAPI_NO_EXPORTS
+#endif
+
+#ifdef _GLAPI_NO_EXPORTS
+# define _GLAPI_EXPORT
+#else /* _GLAPI_NO_EXPORTS */
+# ifdef _WIN32
+# ifdef _GLAPI_DLL_EXPORTS
+# define _GLAPI_EXPORT __declspec(dllexport)
+# else
+# define _GLAPI_EXPORT __declspec(dllimport)
+# endif
+# elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# define _GLAPI_EXPORT __attribute__((visibility("default")))
+# else
+# define _GLAPI_EXPORT
+# endif
+#endif /* _GLAPI_NO_EXPORTS */
/* Is this needed? It is incomplete anyway. */