diff options
author | Chia-I Wu <[email protected]> | 2010-08-23 16:13:12 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-08-23 18:28:14 +0800 |
commit | e607b67ebc0d15f6709fc8f9c79afeeda8ac1031 (patch) | |
tree | bcf25bdb43346c4760eb4b29938ad64c45195bb6 /src/mapi/glapi/glapi.h | |
parent | 0c878280506767c38887b71b45af2cb64a0f4abd (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.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/mapi/glapi/glapi.h b/src/mapi/glapi/glapi.h index 1f18bf00fd9..a0bb0781063 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. */ |