From a25e1aa0aab6bd278eefa7c0748b491c9c6ae62c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 18 Sep 2008 13:26:30 -0600 Subject: glx: remove #include "glheader.h" lines Was only used to get the PUBLIC/USED macros. Also, replace "GL_FALSE" with "False" in a couple places. --- src/glx/x11/Makefile | 1 - src/glx/x11/dri2.c | 3 +-- src/glx/x11/dri2_glx.c | 1 - src/glx/x11/dri_common.c | 2 +- src/glx/x11/dri_glx.c | 1 - src/glx/x11/drisw_glx.c | 1 - src/glx/x11/glx_pbuffer.c | 1 - src/glx/x11/glxclient.h | 17 +++++++++++++++++ src/glx/x11/glxcmds.c | 1 - src/glx/x11/glxcurrent.c | 1 - src/glx/x11/glxext.c | 2 +- src/glx/x11/glxextensions.c | 2 +- src/glx/x11/indirect_vertex_program.c | 1 - src/glx/x11/pixelstore.c | 1 - src/glx/x11/singlepix.c | 1 - 15 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile index 5d9c61c983..8d4a23ff17 100644 --- a/src/glx/x11/Makefile +++ b/src/glx/x11/Makefile @@ -50,7 +50,6 @@ OBJECTS = $(SOURCES:.c=.o) $(MESA_GLAPI_OBJECTS) INCLUDES = -I. \ -I$(TOP)/include \ -I$(TOP)/include/GL/internal \ - -I$(TOP)/src/mesa/main \ -I$(TOP)/src/mesa/glapi \ $(LIBDRM_CFLAGS) \ $(DRI2PROTO_CFLAGS) \ diff --git a/src/glx/x11/dri2.c b/src/glx/x11/dri2.c index dc60af90c1..5acf7ac531 100644 --- a/src/glx/x11/dri2.c +++ b/src/glx/x11/dri2.c @@ -36,7 +36,6 @@ #include #include #include -#include "glheader.h" #include "xf86drm.h" #include "dri2.h" @@ -289,7 +288,7 @@ void DRI2DestroyDrawable(Display *dpy, XID drawable) XextSimpleCheckExtension (dpy, info, dri2ExtensionName); - XSync(dpy, GL_FALSE); + XSync(dpy, False); LockDisplay(dpy); GetReq(DRI2DestroyDrawable, req); diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c index 3c366bfa1e..ed9054627f 100644 --- a/src/glx/x11/dri2_glx.c +++ b/src/glx/x11/dri2_glx.c @@ -35,7 +35,6 @@ #include #include #include -#include "glheader.h" #include "glxclient.h" #include "glcontextmodes.h" #include "xf86dri.h" diff --git a/src/glx/x11/dri_common.c b/src/glx/x11/dri_common.c index 8175f46c54..fbce6ac3e3 100644 --- a/src/glx/x11/dri_common.c +++ b/src/glx/x11/dri_common.c @@ -37,7 +37,7 @@ #include #include -#include "glheader.h" +#include #include "glxclient.h" #include "glcontextmodes.h" #include "dri_common.h" diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index 39bf6c430b..47203f5008 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -37,7 +37,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include "glheader.h" #include "glxclient.h" #include "glcontextmodes.h" #include "xf86dri.h" diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c index ad7b5ebd0c..7bb4794f30 100644 --- a/src/glx/x11/drisw_glx.c +++ b/src/glx/x11/drisw_glx.c @@ -24,7 +24,6 @@ #ifdef GLX_DIRECT_RENDERING #include -#include "glheader.h" #include "glxclient.h" #include "glcontextmodes.h" #include diff --git a/src/glx/x11/glx_pbuffer.c b/src/glx/x11/glx_pbuffer.c index 0f878f223f..fb2610a490 100644 --- a/src/glx/x11/glx_pbuffer.c +++ b/src/glx/x11/glx_pbuffer.c @@ -38,7 +38,6 @@ #include "glapi.h" #include "glxextensions.h" #include "glcontextmodes.h" -#include "glheader.h" /** diff --git a/src/glx/x11/glxclient.h b/src/glx/x11/glxclient.h index 412511247e..b10c2ae17b 100644 --- a/src/glx/x11/glxclient.h +++ b/src/glx/x11/glxclient.h @@ -68,6 +68,23 @@ #include "glxextensions.h" + +/* If we build the library with gcc's -fvisibility=hidden flag, we'll + * use the PUBLIC macro to mark functions that are to be exported. + * + * We also need to define a USED attribute, so the optimizer doesn't + * inline a static function that we later use in an alias. - ajax + */ +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +# define PUBLIC __attribute__((visibility("default"))) +# define USED __attribute__((used)) +#else +# define PUBLIC +# define USED +#endif + + + #define GLX_MAJOR_VERSION 1 /* current version numbers */ #define GLX_MINOR_VERSION 4 diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index 9197130dca..bb0e53cee3 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -43,7 +43,6 @@ #include "glapi.h" #include "glxextensions.h" #include "glcontextmodes.h" -#include "glheader.h" #ifdef GLX_DIRECT_RENDERING #include diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c index 0d0c419a84..61cd9b39ea 100644 --- a/src/glx/x11/glxcurrent.c +++ b/src/glx/x11/glxcurrent.c @@ -40,7 +40,6 @@ #include "glxclient.h" #include "glapi.h" -#include "glheader.h" #include "indirect_init.h" #ifdef GLX_DIRECT_RENDERING diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index 0d6d25ef3e..370a429f62 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -44,13 +44,13 @@ * \author Kevin E. Martin */ +#include #include "glxclient.h" #include #include #include "glapi.h" #include "glxextensions.h" #include "glcontextmodes.h" -#include "glheader.h" #ifdef USE_XCB #include diff --git a/src/glx/x11/glxextensions.c b/src/glx/x11/glxextensions.c index e843718472..f2b169a0e4 100644 --- a/src/glx/x11/glxextensions.c +++ b/src/glx/x11/glxextensions.c @@ -34,7 +34,7 @@ #include #include "glapi.h" #include "glxextensions.h" -#include "simple_list.h" + #define SET_BIT(m,b) (m[ (b) / 8 ] |= (1U << ((b) % 8))) #define CLR_BIT(m,b) (m[ (b) / 8 ] &= ~(1U << ((b) % 8))) diff --git a/src/glx/x11/indirect_vertex_program.c b/src/glx/x11/indirect_vertex_program.c index 4f1485a850..0a1091eaef 100644 --- a/src/glx/x11/indirect_vertex_program.c +++ b/src/glx/x11/indirect_vertex_program.c @@ -23,7 +23,6 @@ * SOFTWARE. */ -#include "glheader.h" #include #include #include "indirect.h" diff --git a/src/glx/x11/pixelstore.c b/src/glx/x11/pixelstore.c index 8431b29e90..3bf1b35ba3 100644 --- a/src/glx/x11/pixelstore.c +++ b/src/glx/x11/pixelstore.c @@ -34,7 +34,6 @@ ** */ -#include "glheader.h" #include "glxclient.h" #include "indirect.h" diff --git a/src/glx/x11/singlepix.c b/src/glx/x11/singlepix.c index 77bd4a65ed..d8ad2b1bf0 100644 --- a/src/glx/x11/singlepix.c +++ b/src/glx/x11/singlepix.c @@ -34,7 +34,6 @@ ** */ -#include "glheader.h" #include "packsingle.h" #include "indirect.h" #include "dispatch.h" -- cgit v1.2.3