From 5920b722b7fb59c340b82ea279033c13a2a01508 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 25 Aug 2004 15:10:51 +0000 Subject: [PATCH] Fix mgl name mangling (patch 1014800) --- src/mesa/glapi/gl_x86_asm.py | 14 ++++++++++---- src/mesa/x86/glapi_x86.S | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/mesa/glapi/gl_x86_asm.py b/src/mesa/glapi/gl_x86_asm.py index 159925838cf..e79a5b8b70e 100644 --- a/src/mesa/glapi/gl_x86_asm.py +++ b/src/mesa/glapi/gl_x86_asm.py @@ -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))' diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S index 6727e708c11..0d4d19db16e 100644 --- a/src/mesa/x86/glapi_x86.S +++ b/src/mesa/x86/glapi_x86.S @@ -32,11 +32,17 @@ #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)) -- 2.30.2