diff options
author | Matt Turner <[email protected]> | 2014-11-21 15:50:58 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-12-01 11:28:45 -0800 |
commit | 504062be2ad15ca6a85e3d00b16cff196a4a4eef (patch) | |
tree | 17a273aa8174a486814775cb50a0545c87fcf47b /src | |
parent | 4abd20e2615bac14a49d3ea15b9519df2c35d802 (diff) |
util: Remove u_atomic.h's Gallium dependence.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/util/u_atomic.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/util/u_atomic.h b/src/util/u_atomic.h index 8653e73f461..51e799ec1aa 100644 --- a/src/util/u_atomic.h +++ b/src/util/u_atomic.h @@ -9,26 +9,23 @@ #ifndef U_ATOMIC_H #define U_ATOMIC_H -#include "pipe/p_compiler.h" -#include "pipe/p_defines.h" - /* Favor OS-provided implementations. * * Where no OS-provided implementation is available, fall back to * locally coded assembly, compiler intrinsic or ultimately a * mutex-based implementation. */ -#if defined(PIPE_OS_SOLARIS) +#if defined(__sun) #define PIPE_ATOMIC_OS_SOLARIS -#elif defined(PIPE_CC_MSVC) +#elif defined(_MSC_VER) #define PIPE_ATOMIC_MSVC_INTRINSIC -#elif (defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)) +#elif (defined(_MSC_VER) && (defined(__i386__) || defined(_M_IX86)) #define PIPE_ATOMIC_ASM_MSVC_X86 -#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401) +#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 401) #define PIPE_ATOMIC_GCC_INTRINSIC -#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)) +#elif (defined(__GNUC__) && defined(__i386__)) #define PIPE_ATOMIC_ASM_GCC_X86 -#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64)) +#elif (defined(__GNUC__) && defined(__x86_64__)) #define PIPE_ATOMIC_ASM_GCC_X86_64 #else #error "Unsupported platform" |