From 1cf808c86e7e88b173a5ca0ec6fef562ecae16b3 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 7 Sep 2011 18:42:07 +0100 Subject: Define INLINE macro in terms of inline. --- src/egl/main/eglcompiler.h | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'src/egl/main/eglcompiler.h') diff --git a/src/egl/main/eglcompiler.h b/src/egl/main/eglcompiler.h index 1bc8cc89fa4..d63bd90cb10 100644 --- a/src/egl/main/eglcompiler.h +++ b/src/egl/main/eglcompiler.h @@ -65,26 +65,29 @@ /** * 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 */ +#ifndef inline +# ifdef __cplusplus + /* C++ supports inline keyword */ +# elif defined(__GNUC__) +# define inline __inline__ +# elif defined(_MSC_VER) +# define inline __inline +# elif defined(__ICL) +# define inline __inline +# elif defined(__INTEL_COMPILER) + /* Intel compiler supports inline keyword */ +# elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) +# define inline __inline +# elif defined(__SUNPRO_C) && defined(__C99FEATURES__) + /* C99 supports inline keyword */ +# elif (__STDC_VERSION__ >= 199901L) + /* C99 supports inline keyword */ +# else +# define inline +# endif +#endif +#ifndef INLINE # define INLINE inline -#else -# define INLINE #endif -- cgit v1.2.3