Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
authorJim Meyering <jim@meyering.net>
Sun, 27 Feb 2000 18:04:00 +0000 (18:04 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 27 Feb 2000 18:04:00 +0000 (18:04 +0000)
Declare malloc if needed.

lib/backupfile.c

index 559b4bd..100e0a5 100644 (file)
 # define CLOSEDIR(d) closedir (d)
 #endif
 
-#if STDC_HEADERS
+#if HAVE_STDLIB_H
 # include <stdlib.h>
-#else
-char *malloc ();
 #endif
 
 #ifndef HAVE_DECL_GETENV
@@ -71,6 +69,13 @@ char *malloc ();
 char *getenv ();
 #endif
 
+#ifndef HAVE_DECL_MALLOC
+"this configure-time declaration test was not run"
+#endif
+#if !HAVE_DECL_MALLOC
+char *malloc ();
+#endif
+
 char *base_name PARAMS ((char const *));
 
 #if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H