Fix conflict with SVID2/XPG mallopt options #53
This commit is contained in:
1 parent
9b8b93288a
commit
6beb142bbe
1 file changed
+20
-7
@@ -103,8 +103,21 @@
|
||||
#define M_ATTR_EXTENSION
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Do not create the following symbols that are defined in GLIBC malloc.h
|
||||
* M_MXFAST
|
||||
* M_NLBLKS
|
||||
* M_GRAIN
|
||||
* M_KEEP
|
||||
* M_TRIM_THRESHOLD
|
||||
* M_TOP_PAD
|
||||
* M_MMAP_THRESHOLD
|
||||
* M_MMAP_MAX
|
||||
* M_CHECK_ACTION
|
||||
* M_PERTURB
|
||||
* M_ARENA_TEST
|
||||
* M_ARENA_MAX
|
||||
*/
|
||||
|
||||
/***************************************************************/
|
||||
/****************** Preprocessing Times Macro ******************/
|
||||
@@ -607,7 +620,7 @@
|
||||
for i in $(seq 0 52) ; do printf "#define M_SKIPI_%d(" $i ; for j in $(seq 1 $i) ; do printf "_%d, " $j ; done ; printf "...) __VA_ARGS__\n"; done
|
||||
*/
|
||||
#define M_SKIPI(f, ...) f(__VA_ARGS__)
|
||||
#define M_SKIP(n, ...) M_SKIPI(M_C(M_SKIPI_, n), __VA_ARGS__)
|
||||
#define M_SKIP_ARGS(n, ...) M_SKIPI(M_C(M_SKIPI_, n), __VA_ARGS__)
|
||||
|
||||
#define M_SKIPI_0(...) __VA_ARGS__
|
||||
#define M_SKIPI_1(_1, ...) __VA_ARGS__
|
||||
@@ -669,7 +682,7 @@
|
||||
Generated by:
|
||||
for i in $(seq 0 52) ; do printf "#define M_KEEPI_%d(" $i ; for j in $(seq 1 $i) ; do printf "_%d, " $j ; done ; printf "...) " ; for j in $(seq 1 $(($i - 1))) ; do printf "_%d, " $j; done ; if test "$i" -ne 0 ; then printf "_$i" ; fi ; printf "\n" ; done */
|
||||
#define M_KEEPI(f, ...) f(__VA_ARGS__)
|
||||
#define M_KEEP(n, ...) M_KEEPI(M_C(M_KEEPI_, n), __VA_ARGS__)
|
||||
#define M_KEEP_ARGS(n, ...) M_KEEPI(M_C(M_KEEPI_, n), __VA_ARGS__)
|
||||
|
||||
#define M_KEEPI_0(...)
|
||||
#define M_KEEPI_1(_1, ...) _1
|
||||
@@ -726,7 +739,7 @@
|
||||
#define M_KEEPI_52(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, ...) _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52
|
||||
|
||||
/* Keep the medium characters of a sequence */
|
||||
#define M_MID(first, len, ...) M_MIDI(M_KEEP,len, M_SKIP(first, __VA_ARGS__))
|
||||
#define M_MID_ARGS(first, len, ...) M_MIDI(M_KEEP_ARGS,len, M_SKIP_ARGS(first, __VA_ARGS__))
|
||||
#define M_MIDI(f, ...) f(__VA_ARGS__)
|
||||
|
||||
|
||||
@@ -1229,7 +1242,7 @@
|
||||
M_MAP(f, M_SEQ(init, end)) ==> f(init) f(init+1) .... f(end)
|
||||
M_MAP2(f, d, M_SEQ(init, end))
|
||||
*/
|
||||
#define M_SEQ(init, end) M_MID(init, M_INC(M_SUB(end, init)), 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52)
|
||||
#define M_SEQ(init, end) M_MID_ARGS(init, M_INC(M_SUB(end, init)), 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52)
|
||||
|
||||
/* Return the input (delay evaluation) */
|
||||
#define M_ID(...) __VA_ARGS__
|
||||
@@ -1290,7 +1303,7 @@
|
||||
*/
|
||||
#define M_DEFAULT_ARGS2(expected, value, ...) \
|
||||
__VA_ARGS__ M_IF(M_NOTEQUAL(M_NARGS(__VA_ARGS__), expected))(M_DEFERRED_COMMA, ) \
|
||||
M_ID M_INVERT(M_KEEP(M_SUB(expected, M_NARGS(__VA_ARGS__)), M_ID M_INVERT value))
|
||||
M_ID M_INVERT(M_KEEP_ARGS(M_SUB(expected, M_NARGS(__VA_ARGS__)), M_ID M_INVERT value))
|
||||
#define M_DEFAULT_ARGS_EVAL(...) __VA_ARGS__
|
||||
#define M_DEFAULT_ARGS( ...) M_DEFAULT_ARGS_EVAL(M_DEFAULT_ARGS2(__VA_ARGS__))
|
||||
|
||||
|
||||
Reference in new issue
Block a user