2 * Define malloc and friends.
16 * Deal with platform differences declaring alloca()
17 * This comes nearly verbatim from:
19 * http://www.gnu.org/software/autoconf/manual/autoconf.html#Particular-Functions
21 * The only modifications were to remove C++ support and guard against
26 #elif defined __GNUC__
28 # define alloca __builtin_alloca
32 # define alloca __alloca
34 #elif defined _MSC_VER
37 # define alloca _alloca
41 void * alloca(size_t);
45 # define EREALLOC_CALLSITE /* preserve __FILE__ and __LINE__ */
47 # define EREALLOC_IMPL(ptr, newsz, filenm, loc) \
53 # define zero_mem(p, s) bzero(p, s)
57 # define zero_mem(p, s) memset(p, 0, s)
59 #define ZERO(var) zero_mem(&(var), sizeof(var))
61 #endif /* NTP_MALLOC_H */