Fix intrin.h b0rkage with older MSVC
Reported by Jonathan Kew.
This commit is contained in:
parent
af913c5788
commit
89d89646e8
|
@ -63,7 +63,7 @@ typedef volatile int hb_atomic_int_t;
|
||||||
#define hb_atomic_int_set(AI, V) g_atomic_int_set (&(AI), V)
|
#define hb_atomic_int_set(AI, V) g_atomic_int_set (&(AI), V)
|
||||||
|
|
||||||
|
|
||||||
#elif defined(_MSC_VER)
|
#elif _MSC_VER >= 1600
|
||||||
|
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|
||||||
|
@ -75,7 +75,11 @@ typedef long hb_atomic_int_t;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma message("Could not find any system to define atomic_int macros, library will NOT be thread-safe")
|
||||||
|
#else
|
||||||
#warning "Could not find any system to define atomic_int macros, library will NOT be thread-safe"
|
#warning "Could not find any system to define atomic_int macros, library will NOT be thread-safe"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile int hb_atomic_int_t;
|
typedef volatile int hb_atomic_int_t;
|
||||||
#define hb_atomic_int_add(AI, V) ((AI) += (V), (AI) - (V))
|
#define hb_atomic_int_add(AI, V) ((AI) += (V), (AI) - (V))
|
||||||
|
|
Loading…
Reference in New Issue