diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-08-29 13:09:25 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-08-29 13:09:25 +0000 |
commit | a4b74ef335873379d374d372bcce7c4228095bd5 (patch) | |
tree | 7948e9ea9d8f3fc9d2d767fd2490c8a1855d1129 /src/util/common_allocation.c | |
parent | 19a28dc192c59da09b2668c33fbbcce421f5a05d (diff) | |
download | gnunet-a4b74ef335873379d374d372bcce7c4228095bd5.tar.gz gnunet-a4b74ef335873379d374d372bcce7c4228095bd5.zip |
only use control pipe with helpers IF the helper actually supports it
Diffstat (limited to 'src/util/common_allocation.c')
-rw-r--r-- | src/util/common_allocation.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index a385450b9..90af6e091 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -23,9 +23,11 @@ | |||
23 | * @brief wrapper around malloc/free | 23 | * @brief wrapper around malloc/free |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | |||
27 | #include "platform.h" | 26 | #include "platform.h" |
28 | #include "gnunet_common.h" | 27 | #include "gnunet_common.h" |
28 | #if HAVE_MALLOC_H | ||
29 | #include <malloc.h> | ||
30 | #endif | ||
29 | 31 | ||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__) |
31 | 33 | ||
@@ -192,11 +194,7 @@ GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename, int linenumber) | |||
192 | #if WINDOWS | 194 | #if WINDOWS |
193 | #define MSIZE(p) _msize (p) | 195 | #define MSIZE(p) _msize (p) |
194 | #endif | 196 | #endif |
195 | #if LINUX | 197 | #if HAVE_MALLOC_USABLE_SIZE |
196 | /* FIXME: manpage claims that this function is a GNU extension, | ||
197 | * but googling shows that it is available on many platforms via | ||
198 | * inclusion of various headers. For now let's make it Linux-only. | ||
199 | */ | ||
200 | #define MSIZE(p) malloc_usable_size (p) | 198 | #define MSIZE(p) malloc_usable_size (p) |
201 | #endif | 199 | #endif |
202 | 200 | ||