From ab66bea0c326c2e18866ad37134dc91bf99c514a Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Fri, 18 Apr 1997 06:34:23 +0000 Subject: imported from mkid-3.0.1 --- alloc.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'alloc.h') diff --git a/alloc.h b/alloc.h index 70122ce..c430091 100644 --- a/alloc.h +++ b/alloc.h @@ -19,10 +19,16 @@ #ifndef _alloc_h_ #define _alloc_h_ +#if HAVE_STDLIB_H +#include +#else /* not HAVE_STDLIB_H */ +#if HAVE_MALLOC_H #include +#endif /* HAVE_MALLOC_H */ +#endif /* not HAVE_STDLIB_H */ -#define CALLOC(type, n) ((type *)calloc(sizeof(type), (n))) -#define MALLOC(type, n) ((type *)malloc(sizeof(type) * (n))) -#define REALLOC(old, type, n) ((type *)realloc((old), sizeof(type) * (n))) +#define CALLOC(type, n) ((type *) calloc (sizeof (type), (n))) +#define MALLOC(type, n) ((type *) malloc (sizeof (type) * (n))) +#define REALLOC(old, type, n) ((type *) realloc ((old), sizeof (type) * (n))) #endif /* not _alloc_h_ */ -- cgit v1.2.3