Fix mgl name mangling (patch 1014800)
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 25 Aug 2004 15:10:51 +0000 (15:10 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 25 Aug 2004 15:10:51 +0000 (15:10 +0000)
src/mesa/glapi/gl_x86_asm.py
src/mesa/x86/glapi_x86.S

index 159925838cf703700335fe5397f3bc596666ae25..e79a5b8b70e83f31f6f8d484a6704abc61e976e0 100644 (file)
@@ -62,11 +62,17 @@ class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
                print '#ifndef __WIN32__'
                print ''        
                print '#if defined(STDCALL_API)'
-               print '#define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))'
-               print '#elif defined(USE_MGL_NAMESPACE)'
-               print '#define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))'
+               print '# if defined(USE_MGL_NAMESPACE)'
+               print '#  define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n2))'
+               print '# else'
+               print '#  define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))'
+               print '# endif'
                print '#else'
-               print '#define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))'
+               print '# if defined(USE_MGL_NAMESPACE)'
+               print '#  define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))'
+               print '# else'
+               print '#  define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))'
+               print '# endif'
                print '#endif'
                print ''
                print '#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))'
index 6727e708c11465ebaca96e9f961e04f9d5ac9bb2..0d4d19db16e32b38848ac53a444b15866b61557b 100644 (file)
 #ifndef __WIN32__
 
 #if defined(STDCALL_API)
-#define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))
-#elif defined(USE_MGL_NAMESPACE)
-#define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))
+# if defined(USE_MGL_NAMESPACE)
+#  define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n2))
+# else
+#  define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))
+# endif
 #else
-#define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))
+# if defined(USE_MGL_NAMESPACE)
+#  define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))
+# else
+#  define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))
+# endif
 #endif
 
 #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))