mdbx: import intrin-includes from t1ha.

This commit is contained in:
Leo Yuriev 2018-03-22 20:46:21 +03:00
parent 09ab6dd777
commit 6758348046

View File

@ -158,26 +158,15 @@ typedef pthread_mutex_t mdbx_fastmutex_t;
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* Compiler's includes for builtins/intrinsics */ /* Compiler's includes for builtins/intrinsics */
#ifdef _MSC_VER #if defined(_MSC_VER) || defined(__INTEL_COMPILER)
#if _MSC_FULL_VER < 190024215
#if _MSC_FULL_VER < 180040629 && defined(_M_IX86)
#error Please use Visual Studio 2015 (MSC 19.0) or newer for 32-bit target.
#else
#pragma message( \
"It is recommended to use Visual Studio 2015 (MSC 19.0) or newer.")
#endif
#endif
#include <intrin.h> #include <intrin.h>
#elif __GNUC_PREREQ(4, 4) || defined(__clang__) #elif __GNUC_PREREQ(4, 4) || defined(__clang__)
#if defined(__i386__) || defined(__x86_64__) #if defined(__ia32__) || defined(__e2k__)
#include <cpuid.h>
#include <x86intrin.h> #include <x86intrin.h>
#endif #endif /* __ia32__ */
#elif defined(__INTEL_COMPILER) #if defined(__ia32__)
#include <intrin.h> #include <cpuid.h>
#endif /* __ia32__ */
#elif defined(__SUNPRO_C) || defined(__sun) || defined(sun) #elif defined(__SUNPRO_C) || defined(__sun) || defined(sun)
#include <mbarrier.h> #include <mbarrier.h>
#elif (defined(_HPUX_SOURCE) || defined(__hpux) || defined(__HP_aCC)) && \ #elif (defined(_HPUX_SOURCE) || defined(__hpux) || defined(__HP_aCC)) && \
@ -196,8 +185,10 @@ typedef pthread_mutex_t mdbx_fastmutex_t;
#pragma gcc_extensions #pragma gcc_extensions
#elif defined(__SNC__) #elif defined(__SNC__)
/* Sony PS3 - troubles ? */ /* Sony PS3 - troubles ? */
#elif defined(__hppa__) || defined(__hppa)
#include <machine/inline.h>
#else #else
#error Unknown C compiler, please use GNU C 5.x or newer #error Unsupported C compiler, please use GNU C 4.4 or newer
#endif /* Compiler */ #endif /* Compiler */
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/