From a6a24beb47a6253f141c8fb9c9d67d6e5aa30683 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 8 Mar 2006 00:28:51 +0000 Subject: * 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 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 , 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. --- ChangeLog | 15 +++++++++++++++ configure.ac | 5 ++--- lib/system.h | 9 ++------- m4/system.m4 | 5 +---- 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 + + * 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 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 , 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 * 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 ]) AC_CHECK_DECLS([getpwuid],,, [#include ]) -AC_CHECK_DECLS([time],,, [#include ]) # 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 before any preprocessor test of _POSIX_VERSION. */ -#if HAVE_UNISTD_H -# include -#endif +#include #ifndef SEEK_SET # define SEEK_SET 0 @@ -445,12 +443,9 @@ uintmax_t strtoumax (); #endif #include -#if defined(HAVE_SYS_TIME_H) && defined(TIME_WITH_SYS_TIME) +#ifdef TIME_WITH_SYS_TIME # include #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 #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 -- cgit v1.2.1