diff options
author | Greg McGary <greg@mcgary.org> | 1997-04-18 06:34:23 +0000 |
---|---|---|
committer | Greg McGary <greg@mcgary.org> | 1997-04-18 06:34:23 +0000 |
commit | ab66bea0c326c2e18866ad37134dc91bf99c514a (patch) | |
tree | 54cc06ba3cd8ca1b5e8f72284438c5a2172ec5b6 /alloc.h | |
parent | 809b665811bde40439d829d6193b278b26ae00ed (diff) | |
download | idutils-ab66bea0c326c2e18866ad37134dc91bf99c514a.tar.gz idutils-ab66bea0c326c2e18866ad37134dc91bf99c514a.tar.bz2 idutils-ab66bea0c326c2e18866ad37134dc91bf99c514a.zip |
imported from mkid-3.0.1r3_0_1
Diffstat (limited to 'alloc.h')
-rw-r--r-- | alloc.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -19,10 +19,16 @@ #ifndef _alloc_h_ #define _alloc_h_ +#if HAVE_STDLIB_H +#include <stdlib.h> +#else /* not HAVE_STDLIB_H */ +#if HAVE_MALLOC_H #include <malloc.h> +#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_ */ |