diff options
Diffstat (limited to 'mesalib/src/mesa/main/compiler.h')
-rw-r--r-- | mesalib/src/mesa/main/compiler.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h index 8ed1c6fa6..89d6cda91 100644 --- a/mesalib/src/mesa/main/compiler.h +++ b/mesalib/src/mesa/main/compiler.h @@ -114,29 +114,30 @@ extern "C" { /** * Function inlining */ -#ifndef INLINE -# if defined(__GNUC__) -# define INLINE __inline__ -# elif defined(__MSC__) -# define INLINE __inline +#ifndef inline +# ifdef __cplusplus + /* C++ supports inline keyword */ +# elif defined(__GNUC__) +# define inline __inline__ # elif defined(_MSC_VER) -# define INLINE __inline +# define inline __inline # elif defined(__ICL) -# define INLINE __inline +# define inline __inline # elif defined(__INTEL_COMPILER) -# define INLINE inline + /* Intel compiler supports inline keyword */ # elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) -# define INLINE __inline +# 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 + /* C99 supports inline keyword */ +# elif (__STDC_VERSION__ >= 199901L) + /* C99 supports inline keyword */ # else -# define INLINE +# define inline # endif #endif +#ifndef INLINE +# define INLINE inline +#endif /** |