diff options
author | Daan Leijen <daan@microsoft.com> | 2021-10-01 15:10:42 -0700 |
---|---|---|
committer | Daan Leijen <daan@microsoft.com> | 2021-10-01 15:10:42 -0700 |
commit | 9c5928060eff987939f4ac6b4ccf682c12901c50 (patch) | |
tree | 2833f4a0a9e0e0ac451aaca5034d2f7ebab99728 /include/mimalloc-internal.h | |
parent | 679aad065908ccf40fcf535705c6e2d4a1fbdb82 (diff) | |
parent | 32c5e4774febc4f50348bd08af5b80cfc8745857 (diff) |
Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r-- | include/mimalloc-internal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h index ecdcf86..73aa236 100644 --- a/include/mimalloc-internal.h +++ b/include/mimalloc-internal.h @@ -22,7 +22,7 @@ terms of the MIT license. A copy of the license can be found in the file #define mi_decl_noinline __declspec(noinline) #define mi_decl_thread __declspec(thread) #define mi_decl_cache_align __declspec(align(MI_CACHE_LINE)) -#elif (defined(__GNUC__) && (__GNUC__>=3)) // includes clang and icc +#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__clang__) // includes clang and icc #define mi_decl_noinline __attribute__((noinline)) #define mi_decl_thread __thread #define mi_decl_cache_align __attribute__((aligned(MI_CACHE_LINE))) @@ -240,7 +240,7 @@ static inline bool mi_malloc_satisfies_alignment(size_t alignment, size_t size) } // Overflow detecting multiply -#if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5 +#if __has_builtin(__builtin_umul_overflow) || (defined(__GNUC__) && (__GNUC__ >= 5)) #include <limits.h> // UINT_MAX, ULONG_MAX #if defined(_CLOCK_T) // for Illumos #undef _CLOCK_T @@ -907,7 +907,7 @@ static inline void _mi_memcpy(void* dst, const void* src, size_t n) { // This is used for example in `mi_realloc`. // ------------------------------------------------------------------------------- -#if (__GNUC__ >= 4) || defined(__clang__) +#if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) // On GCC/CLang we provide a hint that the pointers are word aligned. #include <string.h> static inline void _mi_memcpy_aligned(void* dst, const void* src, size_t n) { |