mirror of
https://https.git.savannah.gnu.org/git/findutils.git
synced 2026-01-27 01:44:23 +00:00
Remove unnecessary header checks and include guards.
* configure.ac (AC_CHECK_HEADERS): Remove checks for header files that gnulib either assumes are always present, or provides itself. These include errno.h fcntl.h inttypes.h limits.h locale.h stddef.h stdint.h stdlib.h string.h sys/types.h unistd.h. * lib/buildcmd.c: Remove include guard for limits.h. * find/fstype.c: Remove include guard for sys/types.h. * lib/savedirinfo.c: Likewise. * find/find.c: Remove include guard for locale.h. * find/ftsfind.c: Likewise.
This commit is contained in:
parent
f4171f93f1
commit
f3d4ac9bb4
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2011-06-02 James Youngman <jay@gnu.org>
|
||||
|
||||
Remove unnecessary header checks and include guards.
|
||||
* configure.ac (AC_CHECK_HEADERS): Remove checks for header files
|
||||
that gnulib either assumes are always present, or provides
|
||||
itself. These include errno.h fcntl.h inttypes.h limits.h
|
||||
locale.h stddef.h stdint.h stdlib.h string.h sys/types.h
|
||||
unistd.h.
|
||||
* lib/buildcmd.c: Remove include guard for limits.h.
|
||||
* find/fstype.c: Remove include guard for sys/types.h.
|
||||
* lib/savedirinfo.c: Likewise.
|
||||
* find/find.c: Remove include guard for locale.h.
|
||||
* find/ftsfind.c: Likewise.
|
||||
|
||||
2011-06-01 James Youngman <jay@gnu.org>
|
||||
|
||||
Better error handling for the result of set_fstype_devno.
|
||||
|
||||
@ -119,15 +119,13 @@ AC_SUBST([FINDLIBS])
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
dnl Assume unistd.h is present - coreutils does too.
|
||||
AC_CHECK_HEADERS(fcntl.h string.h limits.h errno.h stdlib.h stddef.h)
|
||||
AC_CHECK_HEADERS(unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h)
|
||||
AC_CHECK_HEADERS(sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h)
|
||||
dnl find.c needs sys/utsname.h because it calls uname(2).
|
||||
AC_CHECK_HEADERS(sys/utsname.h)
|
||||
dnl fdleak.c needs sys/resource.h because it calls getrlimit(2).
|
||||
AC_CHECK_HEADERS(sys/resource.h)
|
||||
AC_HEADER_MAJOR
|
||||
dnl TODO: it's possible gnulib eliminates the need for AC_HEADER_DIRENT.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STAT
|
||||
AC_HEADER_SYS_WAIT
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include "fcntl--.h"
|
||||
#include "xalloc.h"
|
||||
@ -53,10 +54,6 @@
|
||||
#include "progname.h"
|
||||
#include "save-cwd.h"
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
|
||||
@ -27,9 +27,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* The presence of unistd.h is assumed by gnulib these days, so we
|
||||
|
||||
@ -38,10 +38,10 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "progname.h"
|
||||
@ -56,10 +56,6 @@
|
||||
#include "fdleak.h"
|
||||
#include "unused-result.h"
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
|
||||
@ -23,6 +23,8 @@
|
||||
#include <wchar.h>
|
||||
#include <locale.h>
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
@ -43,10 +45,6 @@
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
/* The presence of unistd.h is assumed by gnulib these days, so we
|
||||
* might as well assume it too.
|
||||
*/
|
||||
|
||||
@ -22,16 +22,8 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* The presence of unistd.h is assumed by gnulib these days, so we
|
||||
* might as well assume it too.
|
||||
*/
|
||||
#include <unistd.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#if HAVE_DIRENT_H
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user