mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-06 07:19:02 +08:00
239bf76101
* [vlpp] does not support osx arm * fix ARM, rather than just marking !supports * add license * ughhhh lack of malloc Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
35 lines
988 B
Diff
35 lines
988 B
Diff
--- 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
|
|
***********************************************************************/
|