From bf6e7f055db3c9034d451d3c2c9de9a48369ba14 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 12 Aug 2017 09:33:14 +0000 Subject: [PATCH] Warn when compiling without calloc() --- miscutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miscutil.c b/miscutil.c index ad3fd65c..010745fb 100644 --- a/miscutil.c +++ b/miscutil.c @@ -1,4 +1,4 @@ -const char miscutil_rcs[] = "$Id: miscutil.c,v 1.84 2017/05/29 10:05:46 fabiankeil Exp $"; +const char miscutil_rcs[] = "$Id: miscutil.c,v 1.85 2017/06/08 13:11:08 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/miscutil.c,v $ @@ -87,6 +87,7 @@ void *zalloc(size_t size) #ifdef HAVE_CALLOC ret = calloc(1, size); #else +#warning calloc appears to be unavailable. Your platform will become unsupported in the future if ((ret = (void *)malloc(size)) != NULL) { memset(ret, 0, size); -- 2.39.2