diff options
Diffstat (limited to 'src/mesa/main/glheader.h')
-rw-r--r-- | src/mesa/main/glheader.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index 8a9cf4b82b1..d6db40353f6 100644 --- a/src/mesa/main/glheader.h +++ b/src/mesa/main/glheader.h @@ -1,4 +1,4 @@ -/* $Id: glheader.h,v 1.27 2002/06/13 04:28:29 brianp Exp $ */ +/* $Id: glheader.h,v 1.28 2002/06/15 02:38:15 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -66,16 +66,13 @@ #endif #endif #include <float.h> +#include <stdarg.h> #ifdef HAVE_CONFIG_H #include "conf.h" #endif -#ifdef DEBUG -#include <stdarg.h> /* for _mesa_debug() only */ -#endif - #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) # define __WIN32__ @@ -259,6 +256,17 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC #endif +/* + * Provide a reasonable replacement for __FUNCTION__ when using + * non-GNU C compilers. + */ +#if !defined(__GNUC__) +#define STRINGIZE(x) #x +#define STRINGIZE_EVAL(x) STRINGIZE(x) +#define __FUNCTION__ STRINGIZE_EVAL(__FILE__) ", line " STRINGIZE_EVAL(__LINE__) +#endif + + /* Some compilers don't like some of Mesa's const usage */ #ifdef NO_CONST # define CONST |