aboutsummaryrefslogtreecommitdiffstats
path: root/src/gmalloc.c
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2001-04-18 10:26:16 +0000
committerEli Zaretskii <[email protected]>2001-04-18 10:26:16 +0000
commiteec2d1ded9283af334077f9334ed939bb7268140 (patch)
tree4900355859ae0ceb9d08ea759c156d27688500ba /src/gmalloc.c
parent5d5845dc5eb9a2af98cc0f12a3deda3191793aa3 (diff)
(__malloc_size_t) [__GNUC__]: If STDC_HEADERS is not
defined, include stddef.h and use __SIZE_TYPE__ instead of size_t. (__memalign_hook): Make the two prototypes consistent.
Diffstat (limited to 'src/gmalloc.c')
-rw-r--r--src/gmalloc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 3508304da3..598d802bad 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -84,7 +84,15 @@ extern "C"
#define __malloc_size_t size_t
#define __malloc_ptrdiff_t ptrdiff_t
#else
+#ifdef __GNUC__
+#include <stddef.h>
+#ifdef __SIZE_TYPE__
+#define __malloc_size_t __SIZE_TYPE__
+#endif
+#endif
+#ifndef __malloc_size_t
#define __malloc_size_t unsigned int
+#endif
#define __malloc_ptrdiff_t int
#endif
@@ -1597,7 +1605,8 @@ Cambridge, MA 02139, USA. */
#else
-__ptr_t (*__memalign_hook) PP ((size_t __size, size_t __alignment));
+__ptr_t (*__memalign_hook) PP ((__malloc_size_t __size,
+ __malloc_size_t __alignment));
__ptr_t
memalign (alignment, size)