summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rename.c18
-rw-r--r--lib/rpmatch.c4
-rw-r--r--lib/same.c17
-rw-r--r--m4/rename.m48
-rw-r--r--m4/rpmatch.m48
-rw-r--r--m4/same.m47
6 files changed, 12 insertions, 50 deletions
diff --git a/lib/rename.c b/lib/rename.c
index 4a4c165b2c..6ff0705323 100644
--- 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. */
diff --git a/lib/rpmatch.c b/lib/rpmatch.c
index 7759d0ca7e..7ed4ded902 100644
--- 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>
diff --git a/lib/same.c b/lib/same.c
index d41cccc461..7dad198671 100644
--- 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)
diff --git a/m4/rename.m4 b/m4/rename.m4
index a2e0d74fd6..43e90854b7 100644
--- 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 @@ 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], [:])
diff --git a/m4/rpmatch.m4 b/m4/rpmatch.m4
index 4cce297c37..dd787ee167 100644
--- 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 @@ 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], [:])
diff --git a/m4/same.m4 b/m4/same.m4
index d15027b801..23600b5d43 100644
--- 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 @@ 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)
])