From ad11107206ff4954366d77f334431b637ee256fa Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 23 Mar 2009 20:17:57 -0700 Subject: Add #ifdefs needed to compile Gallium on Solaris with gcc or Sun cc Signed-off-by: Alan Coopersmith --- src/gallium/include/pipe/p_compiler.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/gallium/include/pipe/p_compiler.h') diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h index bc2a0a7ef3..e6a67f8c2f 100644 --- a/src/gallium/include/pipe/p_compiler.h +++ b/src/gallium/include/pipe/p_compiler.h @@ -124,11 +124,30 @@ typedef unsigned char boolean; # define INLINE inline # elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) # define INLINE __inline +# elif defined(__SUNPRO_C) && defined(__C99FEATURES__) +# define INLINE inline +# elif (__STDC_VERSION__ >= 199901L) /* C99 */ +# define INLINE inline # else # define INLINE # endif #endif +/* The __FUNCTION__ gcc variable is generally only used for debugging. + * If we're not using gcc, define __FUNCTION__ as a cpp symbol here. + */ +#ifndef __FUNCTION__ +# if (!defined(__GNUC__) || (__GNUC__ < 2)) +# if (__STDC_VERSION__ >= 199901L) /* C99 */ || \ + (defined(__SUNPRO_C) && defined(__C99FEATURES__)) +# define __FUNCTION__ __func__ +# else +# define __FUNCTION__ "" +# endif +# endif +#endif + + /* This should match linux gcc cdecl semantics everywhere, so that we * just codegen one calling convention on all platforms. -- cgit v1.2.3