Make the module 'calloc-gnu' work again on AIX and OSF/1.
[gnulib.git] / lib / calloc.c
index d28e158..22451e4 100644 (file)
 #include <config.h>
 /* Only the AC_FUNC_CALLOC macro defines 'calloc' already in config.h.  */
 #ifdef calloc
-# define NEED_CALLOC_GNU
+# define NEED_CALLOC_GNU 1
 # undef calloc
+/* Whereas the gnulib module 'calloc-gnu' defines HAVE_CALLOC_GNU.  */
+#elif GNULIB_CALLOC_GNU && !HAVE_CALLOC_GNU
+# define NEED_CALLOC_GNU 1
 #endif
 
 /* Specification.  */
@@ -40,7 +43,7 @@ rpl_calloc (size_t n, size_t s)
 {
   void *result;
 
-#ifdef NEED_CALLOC_GNU
+#if NEED_CALLOC_GNU
   if (n == 0 || s == 0)
     {
       n = 1;