From: José Fonseca Date: Wed, 7 Sep 2011 17:42:07 +0000 (+0100) Subject: Define INLINE macro in terms of inline. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cf808c86e7e88b173a5ca0ec6fef562ecae16b3;p=mesa.git Define INLINE macro in terms of inline. --- 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 diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h index 05de9ff7cd0..6ac36447638 100644 --- a/src/gallium/include/pipe/p_compiler.h +++ b/src/gallium/include/pipe/p_compiler.h @@ -91,27 +91,30 @@ typedef unsigned char boolean; #endif /* Function inlining */ -#ifndef INLINE +#ifndef inline # ifdef __cplusplus -# define INLINE inline + /* C++ supports inline keyword */ # elif defined(__GNUC__) -# define INLINE __inline__ +# 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 -# 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 /* Forced function inlining */ #ifndef ALWAYS_INLINE diff --git a/src/mapi/mapi/u_compiler.h b/src/mapi/mapi/u_compiler.h index f1752d16f27..2b019ed15b0 100644 --- a/src/mapi/mapi/u_compiler.h +++ b/src/mapi/mapi/u_compiler.h @@ -2,27 +2,30 @@ #define _U_COMPILER_H_ /* Function inlining */ -#ifndef INLINE +#ifndef inline # ifdef __cplusplus -# define INLINE inline + /* C++ supports inline keyword */ # elif defined(__GNUC__) -# define INLINE __inline__ +# 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 -# 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 /* Function visibility */ #ifndef PUBLIC diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 8ed1c6fa61f..89d6cda913c 100644 --- a/src/mesa/main/compiler.h +++ b/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 /**