Move __has_builtin() fallback define to compiler.h
This commit is contained in:
@@ -196,6 +196,11 @@
|
|||||||
#define STATIC_BMI2 0
|
#define STATIC_BMI2 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* compat. with non-clang compilers */
|
||||||
|
#ifndef __has_builtin
|
||||||
|
# define __has_builtin(x) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* detects whether we are being compiled under msan */
|
/* detects whether we are being compiled under msan */
|
||||||
#if defined (__has_feature)
|
#if defined (__has_feature)
|
||||||
# if __has_feature(memory_sanitizer)
|
# if __has_feature(memory_sanitizer)
|
||||||
|
|||||||
@@ -39,10 +39,6 @@ extern "C" {
|
|||||||
# define MEM_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */
|
# define MEM_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __has_builtin
|
|
||||||
# define __has_builtin(x) 0 /* compat. with non-clang compilers */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* code only tested on 32 and 64 bits systems */
|
/* code only tested on 32 and 64 bits systems */
|
||||||
MEM_STATIC void MEM_check(void) { DEBUG_STATIC_ASSERT((sizeof(size_t)==4) || (sizeof(size_t)==8)); }
|
MEM_STATIC void MEM_check(void) { DEBUG_STATIC_ASSERT((sizeof(size_t)==4) || (sizeof(size_t)==8)); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user