diff options
author | marha <marha@users.sourceforge.net> | 2011-12-14 14:08:20 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-12-14 14:08:20 +0100 |
commit | 7c06219c5953076ef3236b6a8959b99329c77ee9 (patch) | |
tree | c4b00bb9d592afcdffdb3e98c7c7320e29488adb /mesalib/src/mapi/glapi/gen/gl_gentable.py | |
parent | 2b5652fc7742c5ac57aca701214b046626a729e9 (diff) | |
parent | 53d28537755790ee4625dc16f560cad5aa93f56b (diff) | |
download | vcxsrv-7c06219c5953076ef3236b6a8959b99329c77ee9.tar.gz vcxsrv-7c06219c5953076ef3236b6a8959b99329c77ee9.tar.bz2 vcxsrv-7c06219c5953076ef3236b6a8959b99329c77ee9.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mapi/glapi/gen/EXT_gpu_shader4.xml
mesalib/src/mapi/glapi/gen/glX_proto_recv.py
mesalib/src/mapi/glapi/gen/glX_proto_size.py
mesalib/src/mapi/glapi/gen/gl_gentable.py
mesalib/src/mapi/glapi/gen/gl_table.py
Diffstat (limited to 'mesalib/src/mapi/glapi/gen/gl_gentable.py')
-rw-r--r-- | mesalib/src/mapi/glapi/gen/gl_gentable.py | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/mesalib/src/mapi/glapi/gen/gl_gentable.py b/mesalib/src/mapi/glapi/gen/gl_gentable.py index 28d9fb104..5657e3277 100644 --- a/mesalib/src/mapi/glapi/gen/gl_gentable.py +++ b/mesalib/src/mapi/glapi/gen/gl_gentable.py @@ -33,12 +33,20 @@ import license import gl_XML, glX_XML import sys, getopt -header = """ +header = """/* GLXEXT is the define used in the xserver when the GLX extension is being + * built. Hijack this to determine whether this file is being built for the + * server or the client. + */ #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#ifdef HAVE_BACKTRACE +#if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\ + || (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE)) +#define USE_BACKTRACE +#endif + +#ifdef USE_BACKTRACE #include <execinfo.h> #endif @@ -51,15 +59,22 @@ header = """ #include "glapi.h" #include "glapitable.h" +#ifdef GLXEXT #include "os.h" +#endif static void __glapi_gentable_NoOp(void) { -#if defined(DEBUG) && !defined(_WIN32_WCE) - if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) { - const char *fstr = "Unknown"; - -#ifdef HAVE_BACKTRACE + const char *fstr = "Unknown"; + + /* Silence potential GCC warning for some #ifdef paths. + */ + (void) fstr; +#if defined(USE_BACKTRACE) +#if !defined(GLXEXT) + if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) +#endif + { void *frames[2]; if(backtrace(frames, 2) == 2) { @@ -68,11 +83,15 @@ __glapi_gentable_NoOp(void) { if(info.dli_sname) fstr = info.dli_sname; } -#endif - LogMessage(X_ERROR, "GLX: Call to unimplemented API: %s\\n", fstr); +#if !defined(GLXEXT) + fprintf(stderr, "Call to unimplemented API: %s\\n", fstr); +#endif } #endif +#if defined(GLXEXT) + LogMessage(X_ERROR, "GLX: Call to unimplemented API: %s\\n", fstr); +#endif } static void |