summaryrefslogtreecommitdiff
path: root/def.h
diff options
context:
space:
mode:
Diffstat (limited to 'def.h')
-rw-r--r--def.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/def.h b/def.h
index 676b395..34bc767 100644
--- a/def.h
+++ b/def.h
@@ -38,6 +38,11 @@ in this Software without prior written authorization from The Open Group.
#include <fcntl.h>
#include <sys/stat.h>
+#ifndef HAVE_REALLOCARRAY
+#define reallocarray(ptr, num, size) realloc(ptr, (num) * (size))
+#endif
+#define mallocarray(num, size) reallocarray(NULL, num, size)
+
#define MAXDEFINES 512
#define MAXFILES 2048
#define MAXINCFILES 128 /* "-include" files */