Merge commit '8b0fb1c152fe191768953aa8c77b89034a377f83' into vulkan
[mesa.git] / src / util / macros.h
index 5c5c92ec610ebac9dcce2d7e5e9164306e67f313..0c8958feae9b1b83a10d446e4c5e92b1d0429683 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef UTIL_MACROS_H
 #define UTIL_MACROS_H
 
+#include <assert.h>
+
 /* Compute the size of an array */
 #ifndef ARRAY_SIZE
 #  define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
@@ -145,9 +147,9 @@ do {                       \
  * return value.  As a result, calls to it can be dead code eliminated.
  */
 #ifdef HAVE_FUNC_ATTRIBUTE_PURE
-#define PURE __attribute__((__pure__))
+#define ATTRIBUTE_PURE __attribute__((__pure__))
 #else
-#define PURE
+#define ATTRIBUTE_PURE
 #endif
 
 #ifdef __cplusplus
@@ -184,7 +186,7 @@ do {                       \
  * inline a static function that we later use in an alias. - ajax
  */
 #ifndef PUBLIC
-#  if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+#  if defined(__GNUC__)
 #    define PUBLIC __attribute__((visibility("default")))
 #    define USED __attribute__((used))
 #  elif defined(_MSC_VER)