Mesa (gallium-0.2): gallium: Don't redefine INLINE.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Dec 30 19:25:13 UTC 2008


Module: Mesa
Branch: gallium-0.2
Commit: b3b7c757a9873007ee033693b06647b378301075
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b3b7c757a9873007ee033693b06647b378301075

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Dec 30 17:14:48 2008 +0000

gallium: Don't redefine INLINE.

INLINE is commonly used in third-party headers.

---

 src/gallium/include/pipe/p_compiler.h |   30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 7bcebd3..02a075d 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -112,20 +112,22 @@ typedef unsigned char boolean;
 
 
 /* Function inlining */
-#ifdef __cplusplus
-#  define INLINE inline
-#elif defined(__GNUC__)
-#  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
-#else
-#  define INLINE
+#ifndef INLINE
+#  ifdef __cplusplus
+#    define INLINE inline
+#  elif defined(__GNUC__)
+#    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
+#  else
+#    define INLINE
+#  endif
 #endif
 
 




More information about the mesa-commit mailing list