34 lines
988 B
Diff
Executable file
34 lines
988 B
Diff
Executable file
--- a/Import/Vlpp.h
|
|
+++ b/Import/Vlpp.h
|
|
@@ -50,13 +50,12 @@
|
|
#define abstract
|
|
#endif
|
|
-
|
|
+#include <stdlib.h>
|
|
#if defined VCZH_MSVC
|
|
#include <intrin.h>
|
|
#elif defined VCZH_GCC
|
|
-#include <x86intrin.h>
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include <wchar.h>
|
|
#define abstract
|
|
#define __thiscall
|
|
#define __forceinline inline
|
|
@@ -160,14 +159,14 @@
|
|
#define UI64TOA_S _ui64toa_s
|
|
#define UI64TOW_S _ui64tow_s
|
|
#if defined VCZH_MSVC
|
|
#define INCRC(x) (_InterlockedIncrement((volatile long*)(x)))
|
|
#define DECRC(x) (_InterlockedDecrement((volatile long*)(x)))
|
|
#elif defined VCZH_GCC
|
|
-#define INCRC(x) (__sync_add_and_fetch(x, 1))
|
|
-#define DECRC(x) (__sync_sub_and_fetch(x, 1))
|
|
+#define INCRC(x) (__atomic_add_fetch(x, 1, __ATOMIC_SEQ_CST))
|
|
+#define DECRC(x) (__atomic_sub_fetch(x, 1, __ATOMIC_SEQ_CST))
|
|
#endif
|
|
#endif
|
|
|
|
/***********************************************************************
|
|
Basic Types
|
|
***********************************************************************/
|