STRINGIFY implemented (#402)
* STRINGIFY implemented * SIMDJSON_THREADS_ENABLED def/undef
This commit is contained in:
parent
60916318f7
commit
9c3828fefe
|
@ -1,10 +1,10 @@
|
|||
#ifndef SIMDJSON_PORTABILITY_H
|
||||
#define SIMDJSON_PORTABILITY_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#ifdef _MSC_VER
|
||||
#include <iso646.h>
|
||||
#endif
|
||||
|
@ -17,7 +17,10 @@
|
|||
#endif
|
||||
|
||||
// this is almost standard?
|
||||
#define STRINGIFY(a) #a
|
||||
#undef STRINGIFY_IMPLEMENTATION_
|
||||
#undef STRINGIFY
|
||||
#define STRINGIFY_IMPLEMENTATION_(a) #a
|
||||
#define STRINGIFY(a) STRINGIFY_IMPLEMENTATION_(a)
|
||||
|
||||
// we are going to use runtime dispatch
|
||||
#ifdef IS_X86_64
|
||||
|
@ -37,7 +40,7 @@
|
|||
#define UNTARGET_REGION _Pragma("GCC pop_options")
|
||||
#endif // clang then gcc
|
||||
|
||||
#endif // x86
|
||||
#endif // x86
|
||||
|
||||
// Default target region macros don't do anything.
|
||||
#ifndef TARGET_REGION
|
||||
|
@ -50,9 +53,11 @@
|
|||
#define TARGET_WESTMERE TARGET_REGION("sse4.2,pclmul")
|
||||
#define TARGET_ARM64
|
||||
|
||||
// Threading is disabled
|
||||
#undef SIMDJSON_THREADS_ENABLED
|
||||
// Is threading enabled?
|
||||
#if defined(BOOST_HAS_THREADS) || defined(_REENTRANT) || defined(_MT)
|
||||
#define SIMDJSON_THREADS_ENABLED 1
|
||||
#define SIMDJSON_THREADS_ENABLED
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
|
@ -67,7 +72,6 @@
|
|||
#include <intrin.h> // visual studio
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define simdjson_strcasecmp _stricmp
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue