mapi: use util/macros.h instead of locally defined macros
authorBrian Paul <brianp@vmware.com>
Tue, 3 Mar 2015 16:11:35 +0000 (09:11 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 4 Mar 2015 15:33:48 +0000 (08:33 -0700)
The next step is to get rid of u_compiler.h completely.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mapi/glapi/SConscript
src/mapi/u_compiler.h

index 84a50684b97cc636a4b8c93b403fe8fb9ee5079e..8ded46f32e039600bba7ef0eabd0e3c3798e9a51 100644 (file)
@@ -27,6 +27,7 @@ if env['platform'] == 'windows':
         env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
 
 env.Append(CPPPATH = [
+    '#/src',
     '#/src/mapi',
     '#/src/mesa',
     Dir('..'), # src/mapi build path
index 8ed0f712f5dafbdb1910102eb8f45b7db3b69c11..cd80f681141a34d5588a00011f0ca76ccc4f3db1 100644 (file)
@@ -2,26 +2,6 @@
 #define _U_COMPILER_H_
 
 #include "c99_compat.h" /* inline, __func__, etc. */
-
-/* Function visibility */
-#ifndef PUBLIC
-#  if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
-#    define PUBLIC __attribute__((visibility("default")))
-#  elif defined(_MSC_VER)
-#    define PUBLIC __declspec(dllexport)
-#  else
-#    define PUBLIC
-#  endif
-#endif
-
-#ifndef likely
-#  if defined(__GNUC__)
-#    define likely(x)   __builtin_expect(!!(x), 1)
-#    define unlikely(x) __builtin_expect(!!(x), 0)
-#  else
-#    define likely(x)   (x)
-#    define unlikely(x) (x)
-#  endif
-#endif
+#include "util/macros.h"
 
 #endif /* _U_COMPILER_H_ */