summaryrefslogtreecommitdiff
path: root/include/mimalloc.h
diff options
context:
space:
mode:
authorDaan <daanl@outlook.com>2021-10-27 18:09:16 -0700
committerDaan <daanl@outlook.com>2021-10-27 18:09:16 -0700
commitdb223e4adb1d68d00daf1878d768d8e966362a78 (patch)
tree56929db1640ceea2c8a72e98720063267ecd08a8 /include/mimalloc.h
parent7756e1b5fea6501a63e7a1b082e1532c3b1d7240 (diff)
parent5fd77aa1986305a30680f6b62a27b58940dfbfd0 (diff)
merge from dev
Diffstat (limited to 'include/mimalloc.h')
-rw-r--r--include/mimalloc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/mimalloc.h b/include/mimalloc.h
index f488131..ac4a63f 100644
--- a/include/mimalloc.h
+++ b/include/mimalloc.h
@@ -58,8 +58,12 @@ terms of the MIT license. A copy of the license can be found in the file
#define mi_attr_alloc_size2(s1,s2)
#define mi_attr_alloc_align(p)
#elif defined(__GNUC__) // includes clang and icc
+ #if defined(MI_SHARED_LIB) && defined(MI_SHARED_LIB_EXPORT)
+ #define mi_decl_export __attribute__((visibility("default")))
+ #else
+ #define mi_decl_export
+ #endif
#define mi_cdecl // leads to warnings... __attribute__((cdecl))
- #define mi_decl_export __attribute__((visibility("default")))
#define mi_decl_restrict
#define mi_attr_malloc __attribute__((malloc))
#if (defined(__clang_major__) && (__clang_major__ < 4)) || (__GNUC__ < 5)