From: Matt Turner Date: Fri, 21 Nov 2014 23:50:58 +0000 (-0800) Subject: util: Remove u_atomic.h's Gallium dependence. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=504062be2ad15ca6a85e3d00b16cff196a4a4eef;p=mesa.git util: Remove u_atomic.h's Gallium dependence. Reviewed-by: Jose Fonseca --- 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"