diff options
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. */ |