From d084982240bafba0169c4a6cacf02d45d6cfd8c1 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 8 Feb 2005 05:46:53 +0000 Subject: Bug #2477: Make GLU/GLw/glut build properly even with -fvisibility=hidden. --- include/GL/gl.h | 3 +++ include/GL/glut.h | 2 +- src/glw/GLwDrawA.h | 4 ++-- src/glw/GLwDrawAP.h | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/GL/gl.h b/include/GL/gl.h index f910c3221a..1426df481c 100644 --- a/include/GL/gl.h +++ b/include/GL/gl.h @@ -62,6 +62,9 @@ #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ # define GLAPI extern # define GLAPIENTRY __stdcall +#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +# define GLAPI __attribute__((visibility("default"))) +# define GLAPIENTRY #endif /* WIN32 && !CYGWIN */ #if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) diff --git a/include/GL/glut.h b/include/GL/glut.h index c1b78aa4e5..2e5be8a77c 100644 --- a/include/GL/glut.h +++ b/include/GL/glut.h @@ -193,7 +193,7 @@ WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *); #else /* _WIN32 not defined */ /* Define GLUTAPIENTRY and GLUTCALLBACK to nothing if we aren't on Win32. */ -# define GLUTAPIENTRY +# define GLUTAPIENTRY GLAPI # define GLUTAPIENTRYV # define GLUT_APIENTRY_DEFINED # define GLUTCALLBACK diff --git a/src/glw/GLwDrawA.h b/src/glw/GLwDrawA.h index a62852c260..4a381ac38c 100644 --- a/src/glw/GLwDrawA.h +++ b/src/glw/GLwDrawA.h @@ -182,9 +182,9 @@ extern void GLwDrawingAreaSwapBuffers(Widget w); #ifdef __GLX_MOTIF #ifdef _NO_PROTO -extern Widget GLwCreateMDrawingArea(); +GLAPI extern Widget GLwCreateMDrawingArea(); #else -extern Widget GLwCreateMDrawingArea(Widget parent,char *name,ArgList arglist,Cardinal argcount); +GLAPI extern Widget GLwCreateMDrawingArea(Widget parent,char *name,ArgList arglist,Cardinal argcount); #endif #endif diff --git a/src/glw/GLwDrawAP.h b/src/glw/GLwDrawAP.h index f121701954..031531b7e6 100644 --- a/src/glw/GLwDrawAP.h +++ b/src/glw/GLwDrawAP.h @@ -59,7 +59,7 @@ typedef struct _GLwMDrawingAreaClassRec { } GLwMDrawingAreaClassRec; -extern GLwMDrawingAreaClassRec glwMDrawingAreaClassRec; +GLAPI extern GLwMDrawingAreaClassRec glwMDrawingAreaClassRec; /* XT */ -- cgit v1.2.3