提交 89d89646 编写于 作者: B Behdad Esfahbod

Fix intrin.h b0rkage with older MSVC

Reported by Jonathan Kew.
上级 af913c57
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册