diff options
author | marha <marha@users.sourceforge.net> | 2011-12-15 23:22:23 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2011-12-15 23:22:23 +0100 |
commit | 84b2a38812705928a9ce3de36fac422def8bc67e (patch) | |
tree | 97329d703b07be826105b1fd11b65184d272ab0c /xorg-server/glx/glapi_gentable.c | |
parent | 9800c8726697243c532072c77c635aac37dbcb13 (diff) | |
download | vcxsrv-84b2a38812705928a9ce3de36fac422def8bc67e.tar.gz vcxsrv-84b2a38812705928a9ce3de36fac422def8bc67e.tar.bz2 vcxsrv-84b2a38812705928a9ce3de36fac422def8bc67e.zip |
Synchronised files
Diffstat (limited to 'xorg-server/glx/glapi_gentable.c')
-rw-r--r-- | xorg-server/glx/glapi_gentable.c | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/xorg-server/glx/glapi_gentable.c b/xorg-server/glx/glapi_gentable.c index aec35dd5e..5c0480170 100644 --- a/xorg-server/glx/glapi_gentable.c +++ b/xorg-server/glx/glapi_gentable.c @@ -27,11 +27,20 @@ * SOFTWARE. */ +/* 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 @@ -44,15 +53,22 @@ #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) { @@ -61,11 +77,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 |