Fix intrin.h b0rkage with older MSVC

Reported by Jonathan Kew.
This commit is contained in:
Behdad Esfahbod 2011-10-17 11:50:54 -07:00
parent af913c5788
commit 89d89646e8
1 changed files with 5 additions and 1 deletions

View File

@ -63,7 +63,7 @@ typedef volatile int hb_atomic_int_t;
#define hb_atomic_int_set(AI, V) g_atomic_int_set (&(AI), V)
#elif defined(_MSC_VER)
#elif _MSC_VER >= 1600
#include <intrin.h>
@ -75,7 +75,11 @@ typedef long hb_atomic_int_t;
#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"
#endif
typedef volatile int hb_atomic_int_t;
#define hb_atomic_int_add(AI, V) ((AI) += (V), (AI) - (V))