changeset 37372:46942d9e7537

(__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.
author Eli Zaretskii <eliz@gnu.org>
date Wed, 18 Apr 2001 10:25:48 +0000
parents 855c7db27c94
children 455a5d1fee3a
files src/gmalloc.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gmalloc.c	Tue Apr 17 20:31:29 2001 +0000
+++ b/src/gmalloc.c	Wed Apr 18 10:25:48 2001 +0000
@@ -84,7 +84,15 @@
 #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 @@
 
 #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)