From 1aff81c823587bd3dd2384401d3aaf4ec40259dc Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Wed, 19 Feb 2014 18:04:47 -0600 Subject: [PATCH] For GLEW Bug #227 - Use GLAPIENTRY for GLDEBUGPROC* and leave GLAPIENTRY for application code to use. --- auto/bin/filter_gl_ext.sh | 6 +++--- auto/src/glew_head.h | 33 ++++++++++++++++++--------------- auto/src/glew_tail.h | 2 -- doc/build.html | 1 + 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/auto/bin/filter_gl_ext.sh b/auto/bin/filter_gl_ext.sh index 210f1ca..b45dde0 100755 --- a/auto/bin/filter_gl_ext.sh +++ b/auto/bin/filter_gl_ext.sh @@ -313,19 +313,19 @@ EOT # add typedef to GL_AMD_debug_output # parse_spec.pl can't parse typedefs from New Types section, but ought to cat >> $1/GL_AMD_debug_output <> $1/GL_ARB_debug_output <> $1/GL_KHR_debug < */ -#ifndef APIENTRY +/* and */ +#ifdef APIENTRY +# ifndef GLAPIENTRY +# define GLAPIENTRY APIENTRY +# endif +# ifndef GLEWAPIENTRY +# define GLEWAPIENTRY APIENTRY +# endif +#else #define GLEW_APIENTRY_DEFINED -# if defined(__MINGW32__) || defined(__CYGWIN__) -# define APIENTRY __stdcall -# elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) +# if defined(__MINGW32__) || defined(__CYGWIN__) || (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) # define APIENTRY __stdcall +# ifndef GLAPIENTRY +# define GLAPIENTRY __stdcall +# endif +# ifndef GLEWAPIENTRY +# define GLEWAPIENTRY __stdcall +# endif # else # define APIENTRY # endif @@ -101,14 +112,6 @@ typedef _W64 int ptrdiff_t; # endif #endif -#ifndef GLAPIENTRY -#define GLAPIENTRY APIENTRY -#endif - -#ifndef GLEWAPIENTRY -#define GLEWAPIENTRY APIENTRY -#endif - /* * GLEW_STATIC is defined for static library. * GLEW_BUILD is defined for building the DLL library. @@ -170,6 +173,8 @@ typedef _W64 int ptrdiff_t; #define GLAPI extern #endif +#endif /* _WIN32 */ + #ifndef GLAPIENTRY #define GLAPIENTRY #endif @@ -178,8 +183,6 @@ typedef _W64 int ptrdiff_t; #define GLEWAPIENTRY #endif -#endif /* _WIN32 */ - #ifdef __cplusplus extern "C" { #endif diff --git a/auto/src/glew_tail.h b/auto/src/glew_tail.h index 54023e3..bd9be0a 100644 --- a/auto/src/glew_tail.h +++ b/auto/src/glew_tail.h @@ -54,8 +54,6 @@ GLEWAPI const GLubyte * GLEWAPIENTRY glewGetString (GLenum name); #ifdef GLEW_APIENTRY_DEFINED #undef GLEW_APIENTRY_DEFINED #undef APIENTRY -#undef GLAPIENTRY -#define GLAPIENTRY #endif #ifdef GLEW_CALLBACK_DEFINED diff --git a/doc/build.html b/doc/build.html index de4689e..738a97e 100644 --- a/doc/build.html +++ b/doc/build.html @@ -144,6 +144,7 @@ width="88" height="32" border="0" alt="Support This Project"> --> Ubuntu:
sudo apt-get install libXmu-dev libXi-dev libgl-dev dos2unix
+Fedora:
sudo yum install libXmu-devel libXi-devel libGL-devel dos2unix