Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Commit

Permalink
mdbx: import intrin-includes from t1ha.
Browse files Browse the repository at this point in the history
  • Loading branch information
erthink committed Mar 22, 2018
1 parent 09ab6dd commit 6758348
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions src/osal.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,26 +158,15 @@ typedef pthread_mutex_t mdbx_fastmutex_t;
/*----------------------------------------------------------------------------*/
/* Compiler's includes for builtins/intrinsics */

#ifdef _MSC_VER

#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

#if defined(_MSC_VER) || defined(__INTEL_COMPILER)
#include <intrin.h>

#elif __GNUC_PREREQ(4, 4) || defined(__clang__)
#if defined(__i386__) || defined(__x86_64__)
#include <cpuid.h>
#if defined(__ia32__) || defined(__e2k__)
#include <x86intrin.h>
#endif
#elif defined(__INTEL_COMPILER)
#include <intrin.h>
#endif /* __ia32__ */
#if defined(__ia32__)
#include <cpuid.h>
#endif /* __ia32__ */
#elif defined(__SUNPRO_C) || defined(__sun) || defined(sun)
#include <mbarrier.h>
#elif (defined(_HPUX_SOURCE) || defined(__hpux) || defined(__HP_aCC)) && \
Expand All @@ -196,8 +185,10 @@ typedef pthread_mutex_t mdbx_fastmutex_t;
#pragma gcc_extensions
#elif defined(__SNC__)
/* Sony PS3 - troubles ? */
#elif defined(__hppa__) || defined(__hppa)
#include <machine/inline.h>
#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 */

/*----------------------------------------------------------------------------*/
Expand Down

0 comments on commit 6758348

Please sign in to comment.