From b8892a63b91cd706468826c1615238b5c6cbeebe Mon Sep 17 00:00:00 2001 From: nigels-com Date: Fri, 7 Jan 2011 10:43:42 -0600 Subject: [PATCH 1/3] SCI/Utah GLEW branch visibility attribute for GLEWAPI - gcc 4 and SunPro compiler --- auto/src/glew_head.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h index f6d39ff..5ed2193 100644 --- a/auto/src/glew_head.h +++ b/auto/src/glew_head.h @@ -94,9 +94,10 @@ typedef _W64 int ptrdiff_t; #endif /* - * GLEW_STATIC needs to be set when using the static version. - * GLEW_BUILD is set when building the DLL version. + * GLEW_STATIC is defined for static library. + * GLEW_BUILD is defined for building the DLL library. */ + #ifdef GLEW_STATIC # define GLEWAPI extern #else @@ -130,6 +131,23 @@ typedef _W64 int ptrdiff_t; #define GLEW_APIENTRY_DEFINED #define APIENTRY + +/* + * GLEW_STATIC is defined for static library. + */ + +#ifdef GLEW_STATIC +# define GLEWAPI extern +#else +# if defined(__GNUC__) && __GNUC__>=4 +# define GLEWAPI extern __attribute__ ((visibility("default"))) +# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# define GLEWAPI extern __global +# else +# define GLEWAPI extern +# endif +#endif + #define GLEWAPI extern /* */ From 7e22f71ef746d9788e355a536adac5ae4d16beaa Mon Sep 17 00:00:00 2001 From: nigels-com Date: Fri, 7 Jan 2011 10:49:20 -0600 Subject: [PATCH 2/3] gcc4/SunPro symbol visibility fixup --- auto/src/glew_head.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h index 5ed2193..9f2cf2f 100644 --- a/auto/src/glew_head.h +++ b/auto/src/glew_head.h @@ -148,8 +148,6 @@ typedef _W64 int ptrdiff_t; # endif #endif -#define GLEWAPI extern - /* */ #ifndef GLAPI #define GLAPI extern From a23e5e5d6da2074fd2c7d1764a44afe67eece28b Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Thu, 13 Jan 2011 12:58:39 -0600 Subject: [PATCH 3/3] ID: 3156560 - const arg to glSecondaryColorPointer - resolved --- auto/core/GL_EXT_secondary_color | 2 +- auto/core/GL_VERSION_1_4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/auto/core/GL_EXT_secondary_color b/auto/core/GL_EXT_secondary_color index 490dc64..e915455 100644 --- a/auto/core/GL_EXT_secondary_color +++ b/auto/core/GL_EXT_secondary_color @@ -24,4 +24,4 @@ GL_EXT_secondary_color void glSecondaryColor3uivEXT (const GLuint *v) void glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue) void glSecondaryColor3usvEXT (const GLushort *v) - void glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLvoid *pointer) + void glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) diff --git a/auto/core/GL_VERSION_1_4 b/auto/core/GL_VERSION_1_4 index a48fc23..fd61810 100644 --- a/auto/core/GL_VERSION_1_4 +++ b/auto/core/GL_VERSION_1_4 @@ -69,7 +69,7 @@ http://www.opengl.org/documentation/specs/version1.4/glspec14.pdf void glSecondaryColor3uiv (const GLuint *v) void glSecondaryColor3us (GLushort red, GLushort green, GLushort blue) void glSecondaryColor3usv (const GLushort *v) - void glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer) + void glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) void glWindowPos2d (GLdouble x, GLdouble y) void glWindowPos2f (GLfloat x, GLfloat y)