From: Jim Meyering <meyer...@redhat.com> * bootstrap.conf (gnulib_modules): Add fdopendir. * gzip.c (treat_dir): Don't depend on HAVE_FDOPENDIR. Gnulib now guarantees its availability. * configure.ac: Don't check for fdopendir here. --- Makefile.am | 2 +- bootstrap.conf | 3 ++- configure.ac | 2 +- gzip.c | 7 ------- lib/.gitignore | 37 +++++++++++++++++++++++++++++++++++++ m4/.gitignore | 21 +++++++++++++++++++++ 6 files changed, 62 insertions(+), 10 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 406e344..cfde8e0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ SUBDIRS = lib doc ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I$(top_srcdir)/lib -AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) +AM_CFLAGS = $(WARN_CFLAGS) # $(WERROR_CFLAGS) man_MANS = gunzip.1 gzexe.1 gzip.1 \ zcat.1 zcmp.1 zdiff.1 zforce.1 zgrep.1 zless.1 zmore.1 znew.1 diff --git a/bootstrap.conf b/bootstrap.conf index 913deab..f0afe13 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -29,14 +29,15 @@ fclose fcntl fcntl-safer fdl +fdopendir fprintf-posix getopt-gnu git-version-gen gitlog-to-changelog gnu-make gnu-web-doc-update -gnupload gnumakefile +gnupload lstat maintainer-makefile malloc diff --git a/configure.ac b/configure.ac index 7ae9863..d87c5f3 100644 --- a/configure.ac +++ b/configure.ac @@ -187,7 +187,7 @@ AC_ISC_POSIX AC_C_CONST AC_HEADER_STDC AC_CHECK_HEADERS_ONCE(fcntl.h limits.h memory.h time.h) -AC_CHECK_FUNCS_ONCE([chown fchmod fchown fdopendir lstat siginterrupt]) +AC_CHECK_FUNCS_ONCE([chown fchmod fchown lstat siginterrupt]) AC_HEADER_DIRENT AC_TYPE_SIGNAL AC_TYPE_SIZE_T diff --git a/gzip.c b/gzip.c index b0f792a..ec3c585 100644 --- a/gzip.c +++ b/gzip.c @@ -1717,18 +1717,11 @@ local void treat_dir (fd, dir) char nbuf[MAX_PATH_LEN]; int len; -#if HAVE_FDOPENDIR dirp = fdopendir (fd); -#else - close (fd); - dirp = opendir(dir); -#endif if (dirp == NULL) { progerror(dir); -#if HAVE_FDOPENDIR close (fd); -#endif return ; } /* diff --git a/lib/.gitignore b/lib/.gitignore index 5dc27b6..e7eba30 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -4,8 +4,13 @@ Makefile.in alloca.h alloca.in.h asnprintf.c +at-func.c +basename-lgpl.c calloc.c charset.alias +chdir-long.c +chdir-long.h +chown.c close-hook.c close-hook.h close-stream.c @@ -20,6 +25,11 @@ config.h config.hin configmake.h creat-safer.c +dirent.h +dirent.in.h +dirfd.c +dirname-lgpl.c +dirname.h dup-safer.c dup2.c errno.h @@ -28,6 +38,10 @@ error.c error.h exitfail.c exitfail.h +fchdir.c +fchmodat.c +fchown-stub.c +fchownat.c fclose.c fcntl--.h fcntl-safer.h @@ -35,6 +49,7 @@ fcntl.h fcntl.in.h fcntl_.h fd-safer.c +fdopendir.c fflush.c float+.h float.h @@ -54,7 +69,9 @@ frexpl.c fseeko.c fseterr.c fseterr.h +fstatat.c ftello.c +getcwd.c getopt.c getopt.h getopt.in.h @@ -73,6 +90,7 @@ isnanf-nolibm.h isnanf.c isnanl-nolibm.h isnanl.c +lchown.c libgzip.a localcharset.c localcharset.h @@ -85,8 +103,17 @@ mbrtowc.c mbsinit.c memchr.c memchr.valgrind +mempcpy.c +memrchr.c +mkdir.c +mkdirat.c open-safer.c open.c +openat-die.c +openat-priv.h +openat-proc.c +openat.c +openat.h perror.c pipe-safer.c printf-args.c @@ -105,6 +132,10 @@ ref-add.sed ref-add.sin ref-del.sed ref-del.sin +rmdir.c +same-inode.h +save-cwd.c +save-cwd.h signbitd.c signbitf.c signbitl.c @@ -127,10 +158,12 @@ stdio_.h stdlib.h stdlib.in.h stdlib_.h +strdup.c streq.h strerror.c string.h string.in.h +stripslash.c sys sys_stat.h sys_stat.in.h @@ -147,6 +180,8 @@ unistd-safer.h unistd.h unistd.in.h unistd_.h +unlink.c +unlinkat.c utimens.c utimens.h vasnprintf.c @@ -161,6 +196,8 @@ wctype.in.h wctype_.h xalloc-die.c xalloc.h +xgetcwd.c +xgetcwd.h xmalloc.c xsize.h yesno.c diff --git a/m4/.gitignore b/m4/.gitignore index 765c33e..701b2ad 100644 --- a/m4/.gitignore +++ b/m4/.gitignore @@ -2,13 +2,20 @@ absolute-header.m4 alloca.m4 calloc.m4 +chdir-long.m4 +chown.m4 clock_time.m4 close-stream.m4 close.m4 closein.m4 closeout.m4 codeset.m4 +d-ino.m4 +dirent_h.m4 +dirfd.m4 +dirname.m4 dos.m4 +double-slash-root.m4 dup2.m4 errno_h.m4 error.m4 @@ -17,9 +24,11 @@ exponentd.m4 exponentf.m4 exponentl.m4 extensions.m4 +fchdir.m4 fclose.m4 fcntl-safer.m4 fcntl_h.m4 +fdopendir.m4 fflush.m4 float_h.m4 fpending.m4 @@ -31,6 +40,9 @@ frexp.m4 frexpl.m4 fseeko.m4 ftello.m4 +getcwd-abort-bug.m4 +getcwd-path-max.m4 +getcwd.m4 getopt.m4 getpagesize.m4 gettime.m4 @@ -48,6 +60,7 @@ inttypes_h.m4 isnand.m4 isnanf.m4 isnanl.m4 +lchown.m4 ldexpl.m4 localcharset.m4 locale-fr.m4 @@ -63,6 +76,9 @@ mbrtowc.m4 mbsinit.m4 mbstate_t.m4 memchr.m4 +mempcpy.m4 +memrchr.m4 +mkdir.m4 mmap-anon.m4 mode_t.m4 multiarch.m4 @@ -76,6 +92,8 @@ printf-posix-rpl.m4 printf.m4 quotearg.m4 realloc.m4 +rmdir.m4 +save-cwd.m4 signbit.m4 size_max.m4 stat-time.m4 @@ -86,6 +104,7 @@ stdint.m4 stdint_h.m4 stdio_h.m4 stdlib_h.m4 +strdup.m4 strerror.m4 string_h.m4 sys_stat_h.m4 @@ -94,6 +113,7 @@ time_h.m4 timespec.m4 unistd-safer.m4 unistd_h.m4 +unlink.m4 utimbuf.m4 utimens.m4 utimes.m4 @@ -105,5 +125,6 @@ wchar_t.m4 wctype.m4 wint_t.m4 xalloc.m4 +xgetcwd.m4 xsize.m4 yesno.m4 -- 1.6.5.3.433.g11067