Remove the logic that determines at compile time whether or not HAVE_ALIAS
authorIan Romanick <idr@us.ibm.com>
Thu, 11 Aug 2005 20:29:45 +0000 (20:29 +0000)
committerIan Romanick <idr@us.ibm.com>
Thu, 11 Aug 2005 20:29:45 +0000 (20:29 +0000)
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
configs/linux-dri
configs/linux-indirect
src/glx/x11/indirect_size.c
src/mesa/glapi/glX_proto_size.py
src/mesa/glapi/gl_XML.py

index 031fabb761c8b153e6f4ef06dd1cc1a43ca102f7..b68d3cb15ca11e20fc1ca2c207940557077dc85e 100644 (file)
@@ -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
index 7ff5d23475087d97b18e3d51987ae875844b6719..3235fcf4c578e66bc2a3f4ec518f9dd53fd77edd 100644 (file)
@@ -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 
index 21022282d7c13bb458a8b40461b9c35ce1101e3c..a5c69955b3ac0f4ce1f2dbf959eadeb2b4cfb27f 100644 (file)
@@ -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 
index a37b2f806f7df4904980031573476e303078d7ba..b8886e48591e76700d873202b105759287715119 100644 (file)
 #include <GL/gl.h>
 #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
index b097fed0ebbebed905662b9d115ee1e591b9145b..d4c8b553e41a8f0335214efa045b898c9e6e682c 100644 (file)
@@ -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 ) \\'
index 651bd7369b34581f777fb062fb44523be06252c6..3b87b724ab6ce20aaa3855188baa4b680c960617 100644 (file)
@@ -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 )