mesa: move LONGSTRING into generated enums.c
authorBrian Paul <brianp@vmware.com>
Wed, 11 Mar 2015 22:54:15 +0000 (16:54 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 12 Mar 2015 13:52:45 +0000 (07:52 -0600)
enums.c is the only place this directive is needed.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mapi/glapi/gen/gl_enums.py
src/mesa/main/compiler.h

index d61618f4da0afbf3bea1e8e22565e96526b356b9..f45782df85f168d83898af2cacd37bead386733f 100644 (file)
@@ -157,6 +157,12 @@ _mesa_lookup_prim_by_nr(GLuint nr)
 
         string_offsets = {}
         i = 0;
+        print '#if defined(__GNUC__)'
+        print '# define LONGSTRING __extension__'
+        print '#else'
+        print '# define LONGSTRING'
+        print '#endif'
+        print ''
         print 'LONGSTRING static const char enum_string_table[] = '
         for enum, name in enum_table:
             print '   "%s\\0"' % (name)
index b9f808efb3695155d315ea5b0736ed9da9a0e1da..5c6039132b4fd8e57ec6664bd6dc354cb5621d9f 100644 (file)
@@ -113,15 +113,6 @@ extern "C" {
 #define LE32_TO_CPU( x )       CPU_TO_LE32( x )
 
 
-/**
- * LONGSTRING macro
- * gcc -pedantic warns about long string literals, LONGSTRING silences that.
- */
-#if !defined(__GNUC__)
-# define LONGSTRING
-#else
-# define LONGSTRING __extension__
-#endif
 
 #define IEEE_ONE 0x3f800000