From 124a808909be8e3a00e43e32bede9b6cead3de4e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 12 Sep 2003 19:38:19 +0000 Subject: [PATCH] Remove K&R cruft. --- m4/check-decl.m4 | 18 ++++-------------- m4/closeout.m4 | 6 +++--- m4/gettimeofday.m4 | 11 +++-------- m4/lstat.m4 | 5 ++--- m4/readdir.m4 | 7 ++----- m4/readutmp.m4 | 5 ++--- m4/strtoumax.m4 | 4 +--- 7 files changed, 17 insertions(+), 39 deletions(-) diff --git a/m4/check-decl.m4 b/m4/check-decl.m4 index b374705a0..4a0fda061 100644 --- a/m4/check-decl.m4 +++ b/m4/check-decl.m4 @@ -1,4 +1,4 @@ -#serial 18 +#serial 19 dnl This is just a wrapper function to encapsulate this kludge. dnl Putting it in a separate file like this helps share it between @@ -9,19 +9,9 @@ AC_DEFUN([jm_CHECK_DECLS], AC_REQUIRE([AC_HEADER_TIME]) headers=' #include -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include -# endif -# include -#else -# if HAVE_STRINGS_H -# include -# endif -#endif -#if HAVE_STDLIB_H -# include -#endif +#include +#include + #if HAVE_UNISTD_H # include #endif diff --git a/m4/closeout.m4 b/m4/closeout.m4 index a06fd6da2..817982798 100644 --- a/m4/closeout.m4 +++ b/m4/closeout.m4 @@ -1,5 +1,5 @@ -# closeout.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# closeout.m4 serial 2 +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 dnl Public License, this file may be distributed as part of a program @@ -9,5 +9,5 @@ dnl the same distribution terms as the rest of that program. AC_DEFUN([gl_CLOSEOUT], [ dnl Prerequisites of lib/closeout.c. - AC_CHECK_HEADERS_ONCE(stdlib.h) + : ]) diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index e7a5a6db6..3875972d2 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,4 +1,4 @@ -#serial 4 +#serial 5 dnl From Jim Meyering. dnl @@ -12,14 +12,11 @@ dnl the wrapper functions that work around the problem. AC_DEFUN([AC_FUNC_GETTIMEOFDAY_CLOBBER], [ AC_REQUIRE([AC_HEADER_TIME]) - AC_CHECK_HEADERS_ONCE(stdlib.h string.h) AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], jm_cv_func_gettimeofday_clobber, [AC_TRY_RUN([ #include -#if HAVE_STRING_H -# include -#endif +#include #if TIME_WITH_SYS_TIME # include @@ -32,9 +29,7 @@ AC_DEFUN([AC_FUNC_GETTIMEOFDAY_CLOBBER], # endif #endif -#if HAVE_STDLIB_H -# include -#endif +#include int main () diff --git a/m4/lstat.m4 b/m4/lstat.m4 index ea0c89494..f85bd042d 100644 --- a/m4/lstat.m4 +++ b/m4/lstat.m4 @@ -1,4 +1,4 @@ -#serial 9 +#serial 10 dnl From Jim Meyering. dnl Determine whether lstat has the bug that it succeeds when given the @@ -22,6 +22,5 @@ AC_DEFUN([jm_FUNC_LSTAT], AC_DEFUN([gl_PREREQ_LSTAT], [ AC_REQUIRE([AC_HEADER_STAT]) - AC_CHECK_HEADERS_ONCE(stdlib.h) - AC_CHECK_DECLS_ONCE(free) + : ]) diff --git a/m4/readdir.m4 b/m4/readdir.m4 index 8a29e58bc..db645ecc5 100644 --- a/m4/readdir.m4 +++ b/m4/readdir.m4 @@ -1,4 +1,4 @@ -#serial 6 +#serial 7 dnl SunOS's readdir is broken in such a way that rm.c has to add extra code dnl to test whether a NULL return value really means there are no more files @@ -18,7 +18,6 @@ dnl Written by Jim Meyering. AC_DEFUN([GL_FUNC_READDIR], [dnl AC_REQUIRE([AC_HEADER_DIRENT]) -AC_CHECK_HEADERS_ONCE(string.h) AC_CACHE_CHECK([for working readdir], gl_cv_func_working_readdir, [dnl # Arrange for deletion of the temporary directory this test creates, in @@ -28,9 +27,7 @@ AC_CACHE_CHECK([for working readdir], gl_cv_func_working_readdir, AC_TRY_RUN( [# include # include -# if HAVE_STRING_H -# include -# endif +# include # ifdef HAVE_DIRENT_H # include diff --git a/m4/readutmp.m4 b/m4/readutmp.m4 index d6732d577..3037eff98 100644 --- a/m4/readutmp.m4 +++ b/m4/readutmp.m4 @@ -1,4 +1,4 @@ -# readutmp.m4 serial 2 +# readutmp.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 @@ -58,6 +58,5 @@ $ac_includes_default # Prerequisites of lib/readutmp.c. AC_DEFUN([gl_PREREQ_READUTMP], [ - AC_REQUIRE([AC_HEADER_STDC]) - AC_CHECK_HEADERS_ONCE(string.h) + : ]) diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4 index 5a2d569a7..00106585b 100644 --- a/m4/strtoumax.m4 +++ b/m4/strtoumax.m4 @@ -1,4 +1,4 @@ -# strtoumax.m4 serial 2 +# strtoumax.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 @@ -32,8 +32,6 @@ AC_DEFUN([gl_FUNC_STRTOUMAX], # Prerequisites of lib/strtoumax.c. AC_DEFUN([gl_PREREQ_STRTOUMAX], [ jm_AC_TYPE_UINTMAX_T - AC_CHECK_HEADERS_ONCE(stdlib.h) - AC_CHECK_DECLS_ONCE(strtoul) AC_CHECK_DECLS(strtoull) AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) ]) -- 2.11.0