Remove K&R cruft.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Sep 2003 06:43:26 +0000 (06:43 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Sep 2003 06:43:26 +0000 (06:43 +0000)
lib/rename.c
lib/rpmatch.c
lib/same.c
m4/rename.m4
m4/rpmatch.m4
m4/same.m4

index 4a4c165b2c554a1bccb050f77a59c62442b8eb64..6ff0705323438851927090b6616fa91730012645 100644 (file)
 #undef rename
 
 #include <stdio.h>
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
 
 #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.  */
 
index 7759d0ca7e964844604c7396d1497c3fbc03e889..7ed4ded90296eb4baa32b295cad0c00456ff4e83 100644 (file)
@@ -21,9 +21,7 @@
 #endif
 
 #include <stddef.h>
-#if STDC_HEADERS || _LIBC
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 
 #if ENABLE_NLS
 # include <sys/types.h>
index d41cccc46138da457f92b690d127f882791ebf0d..7dad198671a3eeb2adac22024f74b7fb161d0850 100644 (file)
@@ -25,9 +25,7 @@
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
 extern int errno;
 #endif
 
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <string.h>
 
 #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)
index a2e0d74fd6f93dd3cef06f2b1613cd5f4e29462e..43e90854b77ad9fdc99cfb6792201b34f9bff92d 100644 (file)
@@ -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 @@ AC_DEFUN([vb_FUNC_RENAME],
 ])
 
 # 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], [:])
index 4cce297c37ac17b535e7f338e08f14e819ef284f..dd787ee16784ca461315bb4a57337b3069b1bf6b 100644 (file)
@@ -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 @@ AC_DEFUN([gl_FUNC_RPMATCH],
 ])
 
 # Prerequisites of lib/rpmatch.c.
-AC_DEFUN([gl_PREREQ_RPMATCH], [
-  AC_REQUIRE([AC_HEADER_STDC])
-  :
-])
-
+AC_DEFUN([gl_PREREQ_RPMATCH], [:])
index d15027b801684d5dc6b3ba3063817e068ffc9f51..23600b5d4323f20df08ab9b8852bcd4881b31da0 100644 (file)
@@ -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 @@ dnl the same distribution terms as the rest of that program.
 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)
 ])