diff options
author | Brian Paul <[email protected]> | 2012-01-12 08:41:24 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-01-12 09:18:34 -0700 |
commit | eab036a6eaebd532f88c49bd26550c6225f96005 (patch) | |
tree | 65d15be2efd4fd2cbb31f3c35aae425d74a6d4df /src/mesa/main/imports.h | |
parent | 8cfaab59e0875bff92179aacfffd690c805906ef (diff) |
mesa/gallium: add FFS_DEFINED to protect ffs() from multiple definitions
We include both imports.h and u_math.h in the state tracker. This
leads to multiple, conflicting definitions of ffs() with MSVC.
Use FFS_DEFINED to skip the ffs() in u_math.h.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/main/imports.h')
-rw-r--r-- | src/mesa/main/imports.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index bcf125ada76..ce7b45d7733 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -566,6 +566,9 @@ _mesa_inv_sqrtf(float x); extern void _mesa_init_sqrt_table(void); + +#ifndef FFS_DEFINED +#define FFS_DEFINED 1 #ifdef __GNUC__ #if defined(__MINGW32__) || defined(__CYGWIN__) || defined(ANDROID) || defined(__APPLE__) @@ -579,6 +582,7 @@ extern int ffs(int i); extern int ffsll(long long int i); #endif /*__ GNUC__ */ +#endif /* FFS_DEFINED */ #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) /* gcc 3.4 or later */ |