changeset 4674:092d9a2797a7

Remove K&R cruft.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 10 Sep 2003 06:43:26 +0000
parents 8135c02e42f8
children 7135d3d3d962
files lib/rename.c lib/rpmatch.c lib/same.c m4/rename.m4 m4/rpmatch.m4 m4/same.m4
diffstat 6 files changed, 12 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/lib/rename.c
+++ b/lib/rename.c
@@ -25,26 +25,12 @@
 #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.  */
 
--- a/lib/rpmatch.c
+++ b/lib/rpmatch.c
@@ -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>
--- a/lib/same.c
+++ b/lib/same.c
@@ -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>
@@ -36,24 +34,13 @@
 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)
--- 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], [:])
--- 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], [:])
--- 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)
 ])