diff options
author | Paul Berry <stereotype441@gmail.com> | 2011-07-07 13:03:45 -0700 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2011-07-22 09:45:11 -0700 |
commit | 12c22cab77f35a887d9f6790e0de4a8fa4b3b575 (patch) | |
tree | 2780c335c8828d5a70693e81e4a6915c59fe6b38 | |
parent | a87afba50529c6ae6762a3da68d4f31bc431e064 (diff) | |
download | external_mesa3d-12c22cab77f35a887d9f6790e0de4a8fa4b3b575.zip external_mesa3d-12c22cab77f35a887d9f6790e0de4a8fa4b3b575.tar.gz external_mesa3d-12c22cab77f35a887d9f6790e0de4a8fa4b3b575.tar.bz2 |
mesa: Add an ifndef guard around the definition of the INLINE macro
Several Mesa headers redundantly define the INLINE macro. Adding this
guard prevents the compiler from complaining about macro redefinition.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad@chad-versace.us>
-rw-r--r-- | src/mesa/main/compiler.h | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 743841b..d736fdf 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -139,26 +139,28 @@ extern "C" { /** * Function inlining */ -#if defined(__GNUC__) -# define INLINE __inline__ -#elif defined(__MSC__) -# define INLINE __inline -#elif defined(_MSC_VER) -# define INLINE __inline -#elif defined(__ICL) -# define INLINE __inline -#elif defined(__INTEL_COMPILER) -# define INLINE inline -#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) -# define INLINE __inline -#elif defined(__SUNPRO_C) && defined(__C99FEATURES__) -# define INLINE inline -# define __inline inline -# define __inline__ inline -#elif (__STDC_VERSION__ >= 199901L) /* C99 */ -# define INLINE inline -#else -# define INLINE +#ifndef INLINE +# if defined(__GNUC__) +# define INLINE __inline__ +# elif defined(__MSC__) +# define INLINE __inline +# elif defined(_MSC_VER) +# define INLINE __inline +# elif defined(__ICL) +# define INLINE __inline +# elif defined(__INTEL_COMPILER) +# define INLINE inline +# elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) +# define INLINE __inline +# elif defined(__SUNPRO_C) && defined(__C99FEATURES__) +# define INLINE inline +# define __inline inline +# define __inline__ inline +# elif (__STDC_VERSION__ >= 199901L) /* C99 */ +# define INLINE inline +# else +# define INLINE +# endif #endif |