Mesa (master): mapi: use util/macros.h instead of locally defined macros
Brian Paul
brianp at kemper.freedesktop.org
Wed Mar 4 16:23:56 UTC 2015
Module: Mesa
Branch: master
Commit: 4ab713423ffbdb885910f0c0efcabb594e55d227
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ab713423ffbdb885910f0c0efcabb594e55d227
Author: Brian Paul <brianp at vmware.com>
Date: Tue Mar 3 09:11:35 2015 -0700
mapi: use util/macros.h instead of locally defined macros
The next step is to get rid of u_compiler.h completely.
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
---
src/mapi/glapi/SConscript | 1 +
src/mapi/u_compiler.h | 22 +---------------------
2 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript
index 84a5068..8ded46f 100644
--- a/src/mapi/glapi/SConscript
+++ b/src/mapi/glapi/SConscript
@@ -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
diff --git a/src/mapi/u_compiler.h b/src/mapi/u_compiler.h
index 8ed0f71..cd80f68 100644
--- a/src/mapi/u_compiler.h
+++ b/src/mapi/u_compiler.h
@@ -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_ */
More information about the mesa-commit
mailing list