malloc.c revision 356345
1250Shannesw/* Just a replacement, if the original malloc is not 2250Shannesw GNU-compliant. See autoconf documentation. */ 3250Shannesw 4877Sattila#include "config.h" 5250Shannesw#undef malloc 6250Shannesw#include <sys/types.h> 7250Shannesw 8877Sattila#ifndef USE_WINSOCK 9250Shanneswvoid *malloc (); 10250Shannesw#else 11250Shannesw/* provide a prototype */ 12250Shanneswvoid *malloc (size_t n); 13250Shannesw#endif 14877Sattila 15250Shannesw/* Allocate an N-byte block of memory from the heap. 16250Shannesw If N is zero, allocate a 1-byte block. */ 17250Shannesw 18877Sattilavoid * 19250Shanneswrpl_malloc_unbound (size_t n) 20250Shannesw{ 21250Shannesw if (n == 0) 22250Shannesw n = 1; 23250Shannesw return malloc (n); 24250Shannesw} 25250Shannesw