From f2876d1ee3b878a07b12ddcb464633a44f7c29e7 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 11 Aug 2005 20:29:45 +0000 Subject: [PATCH] Remove the logic that determines at compile time whether or not HAVE_ALIAS should be defined. It was flawed on some platforms (e.g., Darwin & mingw). Instead, rely on the build system to define it on the compiler command line. This also reverts ajax's hand-edit to indirect_size.c. I'll fix that on the X.org side of things later today. --- configs/freebsd-dri | 2 +- configs/linux-dri | 2 +- configs/linux-indirect | 5 +++-- src/glx/x11/indirect_size.c | 7 ------- src/mesa/glapi/glX_proto_size.py | 4 ---- src/mesa/glapi/gl_XML.py | 17 ----------------- 6 files changed, 5 insertions(+), 32 deletions(-) diff --git a/configs/freebsd-dri b/configs/freebsd-dri index 031fabb761c..b68d3cb15ca 100644 --- a/configs/freebsd-dri +++ b/configs/freebsd-dri @@ -14,7 +14,7 @@ OPT_FLAGS = -O EXPAT_INCLUDES = -I/usr/local/include X11_INCLUDES = -I/usr/X11R6/include DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ - -DGLX_DIRECT_RENDERING + -DGLX_DIRECT_RENDERING -DHAVE_ALIAS CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC \ -ffast-math $(X11_INCLUDES) CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC diff --git a/configs/linux-dri b/configs/linux-dri index 7ff5d234750..3235fcf4c57 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -23,7 +23,7 @@ ARCH_FLAGS ?= DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ -D_BSD_SOURCE -D_GNU_SOURCE \ -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ - -DGLX_DIRECT_RENDERING + -DGLX_DIRECT_RENDERING -DHAVE_ALIAS CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ $(ASM_FLAGS) -std=c99 -ffast-math diff --git a/configs/linux-indirect b/configs/linux-indirect index 21022282d7c..a5c69955b3a 100644 --- a/configs/linux-indirect +++ b/configs/linux-indirect @@ -1,5 +1,6 @@ # -*-makefile-*- -# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others +# Configuration for linux-indirect: Builds a libGL capable of indirect +# rendering, but *NOT* capable of direct rendering. include $(TOP)/configs/default @@ -22,7 +23,7 @@ ARCH_FLAGS ?= DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ -D_BSD_SOURCE -D_GNU_SOURCE \ - -DPTHREADS + -DPTHREADS -DHAVE_ALIAS CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ $(ASM_FLAGS) -std=c99 -ffast-math diff --git a/src/glx/x11/indirect_size.c b/src/glx/x11/indirect_size.c index a37b2f806f7..b8886e48591 100644 --- a/src/glx/x11/indirect_size.c +++ b/src/glx/x11/indirect_size.c @@ -29,10 +29,6 @@ #include #include "indirect_size.h" -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define HAVE_ALIAS -# endif - # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define PURE __attribute__((pure)) # else @@ -365,10 +361,7 @@ ALIAS( Map2f, Map2d ) ALIAS( ColorTableParameteriv, ColorTableParameterfv ) ALIAS( ConvolutionParameteriv, ConvolutionParameterfv ) ALIAS( PointParameterivNV, PointParameterfvEXT ) -ALIAS( PointParameterfvARB, PointParameterfvEXT ) -ALIAS( PointParameteriv, PointParameterfvEXT ) -# undef HAVE_ALIAS # undef PURE # undef FASTCALL # undef INTERNAL diff --git a/src/mesa/glapi/glX_proto_size.py b/src/mesa/glapi/glX_proto_size.py index b097fed0ebb..d4c8b553e41 100644 --- a/src/mesa/glapi/glX_proto_size.py +++ b/src/mesa/glapi/glX_proto_size.py @@ -312,8 +312,6 @@ class PrintGlxSizeStubs_c(PrintGlxSizeStubs_common): print '#include "indirect_size.h"' - print '' - self.printHaveAlias() print '' self.printPure() print '' @@ -437,8 +435,6 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): print '' print '#define __GLX_PAD(x) (((x) + 3) & ~3)' print '' - self.printHaveAlias() - print '' print '#ifdef HAVE_ALIAS' print '# define ALIAS2(from,to) \\' print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \\' diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py index 651bd7369b3..3b87b724ab6 100644 --- a/src/mesa/glapi/gl_XML.py +++ b/src/mesa/glapi/gl_XML.py @@ -242,23 +242,6 @@ class gl_print_base: return - def printHaveAlias(self): - """Conditionally define `HAVE_ALIAS'. - - Conditionally defines a preprocessor macro `HAVE_ALIAS'. The - existance of this macro can be used to determine whether or - not GCC's alias function attribute can be used. - - The name is also added to the file's undef_list. - """ - - self.undef_list.append("HAVE_ALIAS") - print """# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define HAVE_ALIAS -# endif""" - return - - def real_function_name(element): name = element.nsProp( "name", None ) alias = element.nsProp( "alias", None ) -- 2.30.2