# HG changeset patch # User Paul Eggert # Date 1063176206 0 # Node ID 092d9a2797a7305bcbc31186455673ee174184a0 # Parent 8135c02e42f81f7072ef3ee95d3ca0c0a72bc016 Remove K&R cruft. diff --git a/lib/rename.c b/lib/rename.c --- a/lib/rename.c +++ b/lib/rename.c @@ -25,26 +25,12 @@ #undef rename #include -#if HAVE_STDLIB_H -# include -#endif - -#if HAVE_STRING_H -# include -#else -# include -#endif +#include +#include #include "dirname.h" #include "xalloc.h" -#ifndef HAVE_DECL_FREE -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_FREE -void free (); -#endif - /* Rename the file SRC_PATH to DST_PATH, removing any trailing slashes from SRC_PATH. Needed for SunOS 4.1.1_U1. */ diff --git a/lib/rpmatch.c b/lib/rpmatch.c --- a/lib/rpmatch.c +++ b/lib/rpmatch.c @@ -21,9 +21,7 @@ #endif #include -#if STDC_HEADERS || _LIBC -# include -#endif +#include #if ENABLE_NLS # include diff --git a/lib/same.c b/lib/same.c --- a/lib/same.c +++ b/lib/same.c @@ -25,9 +25,7 @@ #ifdef HAVE_UNISTD_H # include #endif -#if HAVE_STDLIB_H -# include -#endif +#include #include #include #include @@ -36,24 +34,13 @@ extern int errno; #endif -#if HAVE_STRING_H -# include -#else -# include -#endif +#include #include "same.h" #include "dirname.h" #include "error.h" #include "xalloc.h" -#ifndef HAVE_DECL_FREE -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_FREE -void free (); -#endif - #define SAME_INODE(Stat_buf_1, Stat_buf_2) \ ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) diff --git a/m4/rename.m4 b/m4/rename.m4 --- a/m4/rename.m4 +++ b/m4/rename.m4 @@ -1,4 +1,4 @@ -#serial 5 +#serial 6 dnl From Volker Borchert. dnl Determine whether rename works for source paths with a trailing slash. @@ -43,8 +43,4 @@ ]) # Prerequisites of lib/rename.c. -AC_DEFUN([gl_PREREQ_RENAME], -[ - AC_CHECK_HEADERS_ONCE(stdlib.h string.h) - AC_CHECK_DECLS_ONCE(free) -]) +AC_DEFUN([gl_PREREQ_RENAME], [:]) diff --git a/m4/rpmatch.m4 b/m4/rpmatch.m4 --- a/m4/rpmatch.m4 +++ b/m4/rpmatch.m4 @@ -1,4 +1,4 @@ -# rpmatch.m4 serial 3 +# rpmatch.m4 serial 4 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 @@ -15,8 +15,4 @@ ]) # Prerequisites of lib/rpmatch.c. -AC_DEFUN([gl_PREREQ_RPMATCH], [ - AC_REQUIRE([AC_HEADER_STDC]) - : -]) - +AC_DEFUN([gl_PREREQ_RPMATCH], [:]) diff --git a/m4/same.m4 b/m4/same.m4 --- a/m4/same.m4 +++ b/m4/same.m4 @@ -1,5 +1,5 @@ -# same.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# same.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,6 +9,5 @@ AC_DEFUN([gl_SAME], [ dnl Prerequisites of lib/same.c. - AC_CHECK_HEADERS_ONCE(stdlib.h string.h unistd.h) - AC_CHECK_DECLS_ONCE(free) + AC_CHECK_HEADERS_ONCE(unistd.h) ])