From: Paul Eggert Date: Mon, 8 Sep 2003 22:52:05 +0000 (+0000) Subject: Assume C89; don't check for stdlib.h, string.h, genenv, malloc. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b04cd621280110172af09716045c4a91046aed3d;p=pspp Assume C89; don't check for stdlib.h, string.h, genenv, malloc. --- diff --git a/lib/addext.c b/lib/addext.c index 7753c608aa..fff64f7c7b 100644 --- a/lib/addext.c +++ b/lib/addext.c @@ -37,11 +37,7 @@ #endif #include -#if HAVE_STRING_H -# include -#else -# include -#endif +#include #if HAVE_UNISTD_H # include diff --git a/lib/backupfile.c b/lib/backupfile.c index 34bde3cab5..7ea76b49e7 100644 --- a/lib/backupfile.c +++ b/lib/backupfile.c @@ -27,11 +27,7 @@ #include #include -#if HAVE_STRING_H -# include -#else -# include -#endif +#include #if HAVE_DIRENT_H # include @@ -57,23 +53,7 @@ # define CLOSEDIR(d) closedir (d) #endif -#if HAVE_STDLIB_H -# include -#endif - -#ifndef HAVE_DECL_GETENV -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_GETENV -char *getenv (); -#endif - -#ifndef HAVE_DECL_MALLOC -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_MALLOC -char *malloc (); -#endif +#include #if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H # define HAVE_DIR 1 diff --git a/m4/backupfile.m4 b/m4/backupfile.m4 index 1326bb2ab4..f3c2aa5d5d 100644 --- a/m4/backupfile.m4 +++ b/m4/backupfile.m4 @@ -1,4 +1,4 @@ -# backupfile.m4 serial 2 +# backupfile.m4 serial 3 dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -11,13 +11,11 @@ AC_DEFUN([gl_BACKUPFILE], dnl Prerequisites of lib/backupfile.c. AC_REQUIRE([AC_HEADER_DIRENT]) AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID]) - AC_CHECK_HEADERS_ONCE(stdlib.h string.h) - AC_CHECK_DECLS_ONCE(getenv malloc) jm_CHECK_TYPE_STRUCT_DIRENT_D_INO dnl Prerequisites of lib/addext.c. AC_REQUIRE([jm_AC_DOS]) - AC_SYS_LONG_FILE_NAMES - AC_CHECK_HEADERS_ONCE(string.h unistd.h) + AC_REQUIRE([AC_SYS_LONG_FILE_NAMES]) + AC_CHECK_HEADERS_ONCE(unistd.h) AC_CHECK_FUNCS(pathconf) ])