summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-03-08 00:28:51 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-03-08 00:28:51 +0000
commita6a24beb47a6253f141c8fb9c9d67d6e5aa30683 (patch)
tree1385998fe788f2a11d8d7421c737edf84a225e96
parent1fd0bd449b1706b5c7eb549054d6fc089dcd766c (diff)
downloadpaxutils-a6a24beb47a6253f141c8fb9c9d67d6e5aa30683.tar.gz
* configure.ac (AC_CHECK_HEADERS): Don't check for sys/time.h,
since we no longer use HAVE_SYS_TIME_H. (AC_CHECK_DECLS): Don't check for 'time', since we assume C89 or better. * lib/system.h: Include <unistd.h> unconditionally, since we now assume the unistd module. (time): Remove decl; not needed, since we assume C89 or better. Don't bother checking for HAVE_SYS_TIME_H when deciding whether to include <sys/time.h>, since TIME_WITH_SYS_TIME implies sys/time.h exists. * m4/system.m4 (PU_SYSTEM): Don't check for unistd.h or sys/time.h, or for time or valloc.
-rw-r--r--ChangeLog15
-rw-r--r--configure.ac5
-rw-r--r--lib/system.h9
-rw-r--r--m4/system.m45
4 files changed, 20 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index c9f89f7..5da441a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2006-03-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * configure.ac (AC_CHECK_HEADERS): Don't check for sys/time.h,
+ since we no longer use HAVE_SYS_TIME_H.
+ (AC_CHECK_DECLS): Don't check for 'time', since we assume
+ C89 or better.
+ * lib/system.h: Include <unistd.h> unconditionally, since we now
+ assume the unistd module.
+ (time): Remove decl; not needed, since we assume C89 or better.
+ Don't bother checking for HAVE_SYS_TIME_H when deciding whether
+ to include <sys/time.h>, since TIME_WITH_SYS_TIME implies sys/time.h
+ exists.
+ * m4/system.m4 (PU_SYSTEM): Don't check for unistd.h or sys/time.h,
+ or for time or valloc.
+
2006-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
* m4/system.m4: Remove sys/buf.h from AC_CHECK_HEADERS_ONCE, check
diff --git a/configure.ac b/configure.ac
index be1c983..5f45ab6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
# This file is part of GNU paxutils
#
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
#
# GNU paxutils is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -35,7 +35,7 @@ AC_CHECK_HEADERS(fcntl.h linux/fd.h memory.h net/errno.h \
sgtty.h string.h \
sys/param.h sys/device.h sys/gentape.h \
sys/inet.h sys/io/trioctl.h \
- sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \
+ sys/mtio.h sys/tprintf.h sys/tape.h \
unistd.h locale.h)
AC_CHECK_HEADERS([sys/buf.h], [], [],
@@ -93,7 +93,6 @@ PU_SYSTEM
AC_CHECK_FUNCS(fsync lstat mkfifo readlink strerror symlink setlocale utimes)
AC_CHECK_DECLS([getgrgid],,, [#include <grp.h>])
AC_CHECK_DECLS([getpwuid],,, [#include <pwd.h>])
-AC_CHECK_DECLS([time],,, [#include <time.h>])
# Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
tar_save_LIBS=$LIBS
diff --git a/lib/system.h b/lib/system.h
index 9d31f60..016e1a0 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -260,9 +260,7 @@ extern int errno;
#define MODE_ALL (S_ISUID | S_ISGID | S_ISVTX | MODE_RWX)
/* Include <unistd.h> before any preprocessor test of _POSIX_VERSION. */
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#ifndef SEEK_SET
# define SEEK_SET 0
@@ -445,12 +443,9 @@ uintmax_t strtoumax ();
#endif
#include <time.h>
-#if defined(HAVE_SYS_TIME_H) && defined(TIME_WITH_SYS_TIME)
+#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
#endif
-#if ! HAVE_DECL_TIME
-time_t time ();
-#endif
/* Library modules. */
diff --git a/m4/system.m4 b/m4/system.m4
index b2bc146..443666f 100644
--- a/m4/system.m4
+++ b/m4/system.m4
@@ -8,7 +8,7 @@
AC_DEFUN([PU_SYSTEM],[
AC_HEADER_STDC
- AC_CHECK_HEADERS_ONCE([string.h memory.h fcntl.h unistd.h sys/wait.h \
+ AC_CHECK_HEADERS_ONCE([string.h memory.h fcntl.h sys/wait.h \
sys/gentape.h sys/tape.h sys/device.h sys/param.h sys/tprintf.h sys/mtio.h \
sgtty.h sys/io/trioctl.h inttypes.h locale.h])
@@ -17,11 +17,8 @@ AC_DEFUN([PU_SYSTEM],[
#include <sys/param.h>
#endif])
- AC_CHECK_HEADERS_ONCE([sys/time.h])
AC_HEADER_TIME
- AC_CHECK_DECLS_ONCE([time valloc])
-
AC_CHECK_MEMBERS([struct stat.st_blksize]) dnl instead of AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS
AC_STRUCT_ST_BLKSIZE