summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils.h b/utils.h
index 68ec887..36f9e2a 100644
--- a/utils.h
+++ b/utils.h
@@ -76,9 +76,10 @@ typedef int Comparison;
/***====================================================================***/
-extern Opaque uRealloc(Opaque /* old */ ,
- unsigned /* newSize */
- );
+#ifndef HAVE_REALLOCARRAY
+#define reallocarray(p, n, s) realloc(p, (n) * (s))
+#endif
+
extern Opaque uRecalloc(Opaque /* old */ ,
unsigned /* nOld */ ,
unsigned /* nNew */ ,
@@ -87,7 +88,6 @@ extern Opaque uRecalloc(Opaque /* old */ ,
extern void uFree(Opaque /* ptr */
);
-#define uTypedRealloc(pO,n,t) ((t *)uRealloc((Opaque)pO,((unsigned)n)*sizeof(t)))
#define uTypedRecalloc(pO,o,n,t) ((t *)uRecalloc((Opaque)pO,((unsigned)o),((unsigned)n),sizeof(t)))
/***====================================================================***/