comparison src/gmalloc.c @ 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 0f5de719ab07
children 8cb4d744ae0d
comparison
equal deleted inserted replaced
37371:855c7db27c94 37372:46942d9e7537
82 #ifdef STDC_HEADERS 82 #ifdef STDC_HEADERS
83 #include <stddef.h> 83 #include <stddef.h>
84 #define __malloc_size_t size_t 84 #define __malloc_size_t size_t
85 #define __malloc_ptrdiff_t ptrdiff_t 85 #define __malloc_ptrdiff_t ptrdiff_t
86 #else 86 #else
87 #ifdef __GNUC__
88 #include <stddef.h>
89 #ifdef __SIZE_TYPE__
90 #define __malloc_size_t __SIZE_TYPE__
91 #endif
92 #endif
93 #ifndef __malloc_size_t
87 #define __malloc_size_t unsigned int 94 #define __malloc_size_t unsigned int
95 #endif
88 #define __malloc_ptrdiff_t int 96 #define __malloc_ptrdiff_t int
89 #endif 97 #endif
90 98
91 #ifndef NULL 99 #ifndef NULL
92 #define NULL 0 100 #define NULL 0
1595 /* There is some problem with memalign in DJGPP v1 and we are supposed 1603 /* There is some problem with memalign in DJGPP v1 and we are supposed
1596 to omit it. Noone told me why, they just told me to do it. */ 1604 to omit it. Noone told me why, they just told me to do it. */
1597 1605
1598 #else 1606 #else
1599 1607
1600 __ptr_t (*__memalign_hook) PP ((size_t __size, size_t __alignment)); 1608 __ptr_t (*__memalign_hook) PP ((__malloc_size_t __size,
1609 __malloc_size_t __alignment));
1601 1610
1602 __ptr_t 1611 __ptr_t
1603 memalign (alignment, size) 1612 memalign (alignment, size)
1604 __malloc_size_t alignment; 1613 __malloc_size_t alignment;
1605 __malloc_size_t size; 1614 __malloc_size_t size;