diff options
author | Jason Ekstrand <[email protected]> | 2014-07-23 14:58:52 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2014-08-04 11:07:10 -0700 |
commit | efa0aa8ffc63e8fdd23335e67ca76eb358cfd1ac (patch) | |
tree | 67408f6c4b64fbd145771e27dfa7fb06dd61d7db /src/mesa/main/macros.h | |
parent | 72e55bb6888ff4d6b69b10d9c58573e4c3d492ec (diff) |
util: Gather some common macros
This gathers macros that have been included across components into util so
that the include chain can be more vertical. In particular, this makes
util stand on its own without any dependence whatsoever on the rest of
mesa.
Signed-off-by: "Jason Ekstrand" <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r-- | src/mesa/main/macros.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index 5228c3a8f28..954df3cc8d8 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -818,7 +818,9 @@ DIFFERENT_SIGNS(GLfloat x, GLfloat y) #define ENUM_TO_BOOLEAN(E) ((E) ? GL_TRUE : GL_FALSE) /* Compute the size of an array */ -#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) +#ifndef ARRAY_SIZE +# define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) +#endif /* Stringify */ #define STRINGIFY(x) #x |