X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=ChangeLog;h=dc32b4df4d1e00bf923dc2ff36ad465f55b37709;hb=09b282be6f6062fe3221cc5b4c9da278982def88;hp=7dee308a12e08d13a56f33ac78e5ed9ed314dbd6;hpb=66f908f4f1d28881f035ee35c429cc7a4430be74;p=gnulib.git diff --git a/ChangeLog b/ChangeLog index 7dee308a1..dc32b4df4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,681 @@ +2009-09-13 Jim Meyering + + posixtm: don't reject a time that specify "60" as the number of seconds + * lib/posixtm.c (posixtime): The code to reject invalid dates + would also reject a time specified with the .60 suffix. + But POSIX allows that, in order to accommodate leap seconds. + So don't reject it. + (main): Adjust tests accordingly. + * modules/posixtm (Depends-on): Add stpcpy. + +2009-09-11 Jim Meyering + + announce-gen: include [$release_type] in emitted Subject: + * build-aux/announce-gen (get_tool_versions): Include [$release_type], + e.g., [stable] in the emitted Subject: line. + +2009-09-10 Ralf Wildenhues + + Remove obsolete macros from several modules. + * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Replace + obsolete Autoconf macros with their modern counterparts. + * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Likewise. + * m4/gc-camellia.m4 (gl_GC_CAMELLIA): Likewise. + * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise. + * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise. + * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Likewise. + * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. + * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise. + * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise. + * m4/poll.m4 (gl_FUNC_POLL): Likewise. + * m4/readline.m4 (gl_FUNC_READLINE): Likewise. + * m4/round.m4 (gl_FUNC_ROUND): Likewise. + * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise. + * m4/select.m4 (gl_FUNC_SELECT): Likewise. + * m4/sockets.m4 (gl_SOCKETS): Likewise. + * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Likewise. + * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Likewise. + * m4/sysexits.m4 (gl_SYSEXITS): Likewise. + * m4/time_r.m4 (gl_TIME_R): Likewise. + * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise. + * m4/vararrays.m4 (AC_C_VARARRAYS): Likewise. + * m4/wctype.m4 (gl_WCTYPE_H): Likewise. + + Fix copyright header in build-aux scripts. + * build-aux/git-version-gen: Fix copyright header to match GPLv3 + recommendation. + * build-aux/ncftpput-ftp: Likewise. + * build-aux/update-copyright: Likewise. + +2009-09-09 Eric Blake + + test-link: allow Linux choice of errno + * tests/test-link.c (main): Relax test for alternate error. + + strndup: fix improper m4 caching + * m4/strndup.m4 (gl_FUNC_STRNDUP): Rework to avoid side effects + inside AC_CACHE_CHECK. Use REPLACE_STRNDUP, not HAVE_STRNDUP. + (gl_PREREQ_STRNDUP): Delete. + * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Update default. + * modules/string (Makefile.am): Substitute it. + * lib/string.in.h (strndup): Modernize prototype. + + getcwd: port to mingw + * m4/getcwd.m4 (gl_FUNC_GETCWD): Mingw directories are very + different from the POSIX assumptions made throughout the getcwd + module; fortunately, the mingw getcwd does not need replacement. + (gl_FUNC_GETCWD_NULL): Skip test on mingw. + * modules/getcwd-tests: New test. + * tests/test-getcwd.c: Likewise. + + link: fix platform bugs + * m4/link.m4 (gl_FUNC_LINK): Detect Solaris and Cygwin bugs. + * lib/link.c (link): Work around them. Fix related mingw bug. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_LINK. + * modules/unistd (Makefile.am): Substitute it. + * lib/unistd.in.h (link): Declare replacement. + * doc/posix-functions/link.texi (link): Document this. + * modules/link (Depends-on): Add strdup-posix, sys_stat. + + test-link: consolidate into single C program, test more cases + * tests/test-link.sh: Delete. + * tests/test-link.c: Test more error conditions. Exposes bugs on + at least Cygwin and Solaris. + * modules/link-tests (Files): Remove unused file. + (Depends-on): Add errno, sys_stat. + (Makefile.am): Simplify. + +2009-09-08 Bruno Haible + + Work around towlower, towupper bug on mingw. + * lib/wctype.in.h (towlower, towupper) [__MINGW32__]: New replacements. + * m4/wctype.m4 (gl_WCTYPE_H): Replace also on mingw. + * doc/posix-functions/towlower.texi: Mention the mingw bug. + * doc/posix-functions/towupper.texi: Likewise. + Reported by Eric Blake. + +2009-09-08 Jim Meyering + + build: don't try to run autoheader if we don't use it + * build-aux/bootstrap: Define AUTOHEADER=true when AC_CONFIG_HEADERS + is not used in configure.ac. + +2009-09-08 Eric Blake + + euidaccess: fix compilation error + * lib/euidaccess.c (includes): Add , for AT_EACCESS. + + rawmemchr: relax license + * modules/rawmemchr (License): Derived from glibc, so LGPLv2+ is + okay. + Reported by Jim Meyering. + + mkfifoat: new module + * modules/mkfifoat: New file. + * lib/mkfifoat.c: Likewise. + * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Likewise. + * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses. + * modules/sys_stat (Makefile.am): Use them. + * lib/sys_stat.in.h (mkfifoat, mknodat): Declare them. + * MODULES.html.sh (File system functions): Mention module. + * doc/posix-functions/mkfifoat.texi (mkfifoat): Likewise. + * doc/posix-functions/mknodat.texi (mknodat): Likewise. + * modules/mkfifoat-tests: New test. + * tests/test-mkfifoat.c: Likewise. + + strchrnul: relax license + * modules/strchrnul (License): Derived from glibc, so LGPLv2+ is + okay. + Reported by Jim Meyering. + +2009-09-08 Eric Blake + + fstatat: fix compilation on Solaris + * lib/fstatat.c (includes): Add fcntl.h. + Reported by Pádraig Brady. + +2009-09-07 Eric Blake + + rename: modernize replacement + * modules/rename (Depends-on): Add stdio. + (configure.ac): Declare witness. + * m4/rename.m4 (gl_FUNC_RENAME): Ensure dependency order, and let + stdio take care of replacement. + * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults. + * modules/stdio (Makefile.am): Substitute them. + * lib/stdio.in.h (rename): Declare replacement. + * lib/rename.c (includes): Allow cross-compilation to non-windows + machines. + * doc/posix-functions/rename.texi (rename): Improve + documentation. + + stdio: sort witness names + * modules/stdio (Makefile.am): Sort replacements. + * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise. + * lib/stdio.in.h: Likewise. + + getcwd: minor cleanups + * lib/getcwd.c (AT_FDCWD): Delete; rely on instead. + (is_ENAMETOOLONG): Delete; ENAMETOOLONG is portable. + + openat: provide more convenience names + * modules/faccessat (configure.ac): Add C witness. + * lib/unistd.in.h (readlinkat): Fix typo. + * lib/openat.h (statat, lstatat, accessat, euidaccessat): New + convenience wrappers. + * top/maint.mk (sc_prohibit_openat_without_use): Allow these + wrappers in syntax checks. + +2009-09-06 Eric Blake + + doc: fix comments in recent patches + * lib/faccessat.c: Mention correct function. + * lib/fchmodat.c: Likewise. + * lib/fchownat.c: Likewise. + * lib/symlinkat.c: Likewise. + * doc/posix-headers/fcntl.texi (fcntl.h): Cygwin 1.7 has AT_* + constants. + + faccessat, symlinkat: continue cleanup of previous patch + * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Ensure dependency order. + * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise. + * modules/unistd (Makefile.am): Substitute GNULIB_READLINKAT. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Offer GNULIB_READLINKAT. + * modules/symlinkat (configure.ac): Set GNULIB_READLINKAT. + * lib/unistd.in.h (readlinkat): Declare if GNULIB_READLINKAT is + set. + +2009-09-06 Bruno Haible + + * lib/sys_stat.in.h (fchmodat): Declare if GNULIB_FCHMODAT is set. + (fstatat): Declare if GNULIB_FSTATAT is set. + (mkdirat): Declare if GNULIB_MKDIRAT is set. + * lib/unistd.in.h (fchownat): Declare if GNULIB_FCHOWNAT is set. + (unlinkat): Declare if GNULIB_UNLINKAT is set. + * modules/fcntl-h (Files): Remove m4/openat.m4. + * modules/sys_stat (Files): Remove m4/openat.m4. + (Makefile.am): Substitute GNULIB_FCHMODAT, GNULIB_FSTATAT, + GNULIB_MKDIRAT instead of GNULIB_OPENAT. + * modules/unistd (Files): Remove m4/openat.m4. + (Makefile.am): Substitute GNULIB_FCHOWNAT, GNULIB_UNLINKAT instead of + GNULIB_OPENAT. + * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_OPENAT, + HAVE_OPENAT here. Don't require gl_OPENAT_DEFAULTS. + * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize + GNULIB_FCHMODAT, GNULIB_FSTATAT, GNULIB_MKDIRAT, HAVE_FCHMODAT, + HAVE_FSTATAT, HAVE_MKDIRAT, REPLACE_FSTATAT here. Don't require + gl_OPENAT_DEFAULTS. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_FCHOWNAT, + GNULIB_UNLINKAT, HAVE_FCHOWNAT, HAVE_UNLINKAT, REPLACE_FCHOWNAT here. + Don't require gl_OPENAT_DEFAULTS. + * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_FCNTL_H_DEFAULTS, + gl_SYS_STAT_H_DEFAULTS, gl_UNISTD_H_DEFAULTS. Set GNULIB_FCHMODAT, + GNULIB_FSTATAT, GNULIB_MKDIRAT, GNULIB_FCHOWNAT, GNULIB_UNLINKAT. + (gl_OPENAT_DEFAULTS): Remove macro. + +2009-09-06 Bruno Haible + + * modules/openat (configure.ac): Remove unneeded witness. + +2009-09-06 Bruno Haible + + Set errno to ENOSYS when a function is entirely unsupported. + * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Set errno to ENOSYS instead of + EOPNOTSUPP. + * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise. + * modules/chown (Depends-on): Remove errno. + +2009-09-06 Bruno Haible + + * doc/posix-headers/fcntl.texi (AT_*): Mention affected platforms. + +2009-09-06 Bruno Haible + + * lib/sys_stat.in.h: Fix preprocessor command indentation. + +2009-09-06 Ben Pfaff + Bruno Haible + + Work around a glibc bug in strtok_r. + * lib/string.in.h (strtok_r): Replace if REPLACE_STRTOK_R is set. + Undefine if UNDEFINE_STRTOK_R is set. + * lib/strtok_r.c (strtok_r, __strtok_r) [!_LIBC]: Don't undefine. + * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize + REPLACE_STRTOK_R and UNDEFINE_STRTOK_R. + * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Check against the glibc bug. + * modules/string (Makefile.am): Substitute REPLACE_STRTOK_R, + UNDEFINE_STRTOK_R. + * doc/posix-functions/strtok_r.texi: Mention the glibc 2.7 bug. + +2009-09-06 Sergey Poznyakoff + + exclude: minor fix + * lib/exclude.c: Include wctype.h + +2009-09-06 Akim Demaille + + bootstrap: improve error message + * build-aux/bootstrap (find_tool): Upon failure, report the list + of candidates. + Honor the initial value of the envvar. + +2009-09-05 Eric Blake + + symlinkat: new module + * modules/symlinkat: New file. + * lib/symlinkat.c: Likewise. + * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses. + * modules/unistd (Makefile.am): Use them. + * lib/unistd.in.h (symlinkat, readlinkat): Declare them. + (faccessat) [GNULIB_POSIXCHECK]: Fix typo. + * lib/at-func.c (FUNC_RESULT): New macro, defaulting to int. + * MODULES.html.sh (File system functions): Mention module. + * doc/posix-functions/symlinkat.texi (symlinkat): Likewise. + * doc/posix-functions/readlinkat.texi (readlinkat): Likewise. + * modules/symlinkat-tests: New test. + * tests/test-symlinkat.c: Likewise. + + test-openat-safer: add more checks + * tests/test-openat-safer.c (main): Check more code paths. + +2009-09-05 Jim Meyering + + syntax-check: detect unnecessary inclusion of openat.h + * top/maint.mk (sc_prohibit_openat_without_use): New rule. + +2009-09-05 Bruno Haible + + Support towlower, towupper. + * doc/posix-functions/towlower.texi: Mention module wctype. + * doc/posix-functions/towupper.texi: Likewise. + * lib/wctype.in.h (towlower, towupper): New functions. + * tests/test-wctype.c: Include stdio.h, stdlib.h. + (ASSERT): New macro. + (e): New variable. + (main): Test also towlower, towupper. Test WEOF argument. + Reported by Alan Hourihane . + +2009-09-05 Bruno Haible + + Fix conversion behaviour when the input is invalid. + * lib/striconveh.c (mem_cd_iconveh_internal): Fix storing of question + mark occurring in first pass of indirect conversion. + * tests/test-striconveh.c (main): Test conversion of invalid ASCII + input. + Found by clang's static analyzer. + +2009-09-05 Bruno Haible + + * tests/test-striconveh.c (main): Test indirect conversion on platforms + where direct conversion is possible. + +2009-09-04 Eric Blake + + openat: fail with ENOENT on empty name + * lib/openat-proc.c (openat_proc_name): Special-case the empty + buffer. + + link-follow: fix logic bug in prior patch + * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Fix bug that + reversed sense of yes and no in prior patch. Avoid confusing + compilation failure with desired semantics. + + link-follow: accomodate mingw and cross-compilation + * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Rename... + (gl_FUNC_LINK_FOLLOWS_SYMLINK): ...to this. Change + cross-compilation results to -1, to make linkat easier to + implement when cross-compiling. Trivially support mingw. + * modules/link-follow (configure.ac): Call new name. + * NEWS: Mention this. + +2009-09-03 Eric Blake + + faccessat: compile replacement + * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Build replacement when + needed. + + fts: fix compilation error + * lib/fts.c (includes): Re-add "openat.h", for + openat_needs_fchdir. + + faccessat: new module + * modules/faccessat: New file. + * lib/faccessat.c: Likewise. + * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness. + * modules/unistd (Makefile.am): Use it. + * lib/unistd.in.h (faccessat): Declare it. + (F_OK, X_OK, W_OK, R_OK): Provide definitions. + * lib/fcntl.in.h (AT_SYMLINK_FOLLOW, AT_EACCESS): Likewise. + * MODULES.html.sh (File system functions): Mention it. + * doc/posix-functions/faccessat.texi (faccessat): Likewise. + * doc/posix-headers/fcntl.texi (fcntl.h): Likewise. + + euidaccess: prefer POSIX over non-standard implementation + * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Check for faccessat. + * lib/euidaccess.c (euidaccess): Use it if available. + + openat: make template easier to use + * lib/at-func.c (CALL_FUNC): Allow AT_FUNC_USE_F1_COND and + AT_FUNC_F2 to be undefined. + (VALIDATE_FLAG): New macro; use it to reject bad flags. + (AT_FUNC_USE_F1_COND): Change sense to just flag bit. + * lib/fchmodat.c (AT_FUNC_USE_F1_COND): Adjust. + * lib/fchownat.c (AT_FUNC_USE_F1_COND): Likewise. + * lib/openat.c (AT_FUNC_USE_F1_COND) [fstatat, unlinkat]: + Likewise. + * lib/mkdirat.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND): Delete. + * lib/selinux-at.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND) + [getfileconat, lgetfileconat, setfileconat, lsetfileconat]: + Likewise. + + openat: declare in POSIX headers + * NEWS: Mention this. + * modules/openat (configure.ac): Declare witnesses. + (Depends-on): Add fcntl-h, sys_stat, unistd. + (Include): Mention correct headers. + * modules/fcntl-h (Depends-on): Add link-warning. + (Files): Add openat.m4. + (Makefile.am): Substitute witnesses. + * modules/sys_stat (Files, Makefile.am): Likewise. + * modules/unistd (Files, Makefile.am): Likewise. + * m4/openat.m4 (gl_FUNC_OPENAT, gl_FUNC_FCHOWNAT): Set witnesses. + (gl_OPENAT_DEFAULTS): New macro. + * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Use it. + * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise. + * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise. + (SYS_STAT_H): Remove unused variable. + * doc/posix-headers/fcntl.texi (fcntl.h): Update content. + * lib/fcntl--.h (includes): Remove unneeded header. + * lib/openat-safer.c (includes): Likewise. + * lib/openat.h (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR) + (openat, fstatat, unlinkat, mkdirat, fchmodat, fchownat): Move to + appropriate headers. + (__OPENAT_PREFIX): Delete. + * lib/fcntl.in.h (openat): Provide declaration. + (AT_FDCWD): Fix Solaris bug. + (AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR): Provide macros. + * lib/sys_stat.in.h (fstatat, mkdirat): Provide declaration. + * lib/fchmodat.c (includes): Adjust to find declaration. + * lib/fchownat.c (includes): Likewise. + * lib/mkdirat.c (includes): Likewise. + * lib/fstatat.c (includes): Likewise. Ensure original fstatat is + still visible. + +2009-09-02 Eric Blake + + errno: use consistently + * lib/c-stack.c (ENOTSUP): guarantees a definition. + * lib/canonicalize-lgpl.c (ENAMETOOLONG): Likewise. + * lib/canonicalize.c (ELOOP): Likewise. + * lib/inet_ntop.c (EAFNOSUPPORT): Likewise. + * lib/inet_pton.c (EAFNOSUPPORT): Likewise. + * lib/lchown.c (EOPNOTSUPP): Likewise. + * lib/openat-priv.h (ENOSYS, EOPNOTSUPP): Likewise. + * lib/savewd.c (ESTALE): Likewise. + * lib/settime.c (ENOSYS): Likewise. + * lib/utimens.c (ENOSYS): Likewise. + * lib/xgethostname.c (ENAMETOOLONG): Likewise. + * lib/chdir-safer.c (ELOOP): Likewise. + (chdir_no_follow): Use HAVE_READLINK, not ELOOP, as witness. + * modules/c-stack (Depends-on): Add errno. + * modules/canonicalize (Depends-on): Likewise. + * modules/chdir-safer (Depends-on): Likewise. + * modules/fdopendir (Depends-on): Likewise. + * modules/inet_ntop (Depends-on): Likewise. + * modules/inet_pton (Depends-on): Likewise. + * modules/lchown (Depends-on): Likewise. + * modules/openat (Depends-on): Likewise. + * modules/savewd (Depends-on): Likewise. + * modules/settime (Depends-on): Likewise. + * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Check for readlink. + + fts: avoid leaking fds + * modules/fts (Depends-on): Add cloexec. + * lib/fts.c (opendirat, diropen, fts_build): Set close-on-exec + flag. + + fts: make directory fds more robust + * lib/fts.c (O_DIRECTORY): Let take care of this. + (opendirat): Specify O_DIRECTORY, and add fallbacks for safety. + + backupfile, chdir-long, fts, savedir: make safer + * lib/backupfile.c (includes): Use "dirent--.h", since + numbered_backup can write to stderr during readdir. + * lib/savedir.c (includes): Likewise. + * lib/chdir-long.c (includes): Use "fcntl--.h", since openat + emulation can write to stderr on failure. + * lib/fts.c (includes) [!_LIBC]: Likewise for opendir and openat. + * lib/getcwd.c: Document why opendir_safer is unused. + * lib/glob.c: Likewise. + * lib/scandir.c: Likewise. + * lib/openat-proc.c: Likewise, for open_safer. + * modules/backupfile (Depends-on): Add dirent-safer. + * modules/savedir (Depends-on): Likewise. + * modules/fts (Depends-on): Add dirent-safer and openat-safer. + * modules/chdir-long (Depends-on): Add openat-safer. + + openat-safer: new module + * modules/openat-safer: New file. + * lib/openat-safer.c: Likewise. + * m4/fcntl-safer.m4 (gl_OPENAT_SAFER): New macro. + * lib/fcntl-safer.h (openat_safer): Declare. + * lib/fcntl--.h (openat): Override. + * MODULES.html.sh (File descriptor based I/O): Mention it. + * lib/openat.h: Add double-inclusion guards. + * lib/openat.c (includes): Only include "fcntl-safer.h", not + "fcntl--.h", so we can implement openat. + * modules/openat-safer-tests: New test. + * tests/test-openat-safer.c: New file. + + dirent-safer: new module + * modules/dirent-safer: New file. + * lib/dirent--.h: Likewise. + * lib/dirent-safer.h: Likewise. + * lib/opendir-safer.c: Likewise. + * m4/dirent-safer.m4: Likewise. + * MODULES.html.sh (Enhancements for POSIX:2008): Mention it. + * modules/dirent-safer-tests: New test. + * tests/test-dirent-safer.c: New file. + * lib/fdopendir.c (includes): Ensure fdopendir is also safe. + + fdopendir: optimize on mingw + * lib/unistd.in.h (_gl_directory_name): New prototype. + * lib/fchdir.c (_gl_directory_name): Implement it. + (fchdir): Use it to simplify implementation. + * lib/fdopendir.c (fdopendir) [REPLACE_FCHDIR]: Use metadata from + fchdir, when available, to avoid calling [f]chdir(). + + fdopendir: split into its own module + * lib/openat.c (fdopendir): Move... + * lib/fdopendir.c: ...into new file. + * modules/fdopendir: New module. + * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): New file. + * modules/openat (Depends-on): Add fdopendir. + * m4/openat.m4 (gl_FUNC_OPENAT): No longer need to check for + fdopendir here. + * modules/savedir (Depends-on): Only need fdopendir, not full + openat. + * lib/savedir.c (include): Use , not "openat.h". + * lib/openat.h (fdopendir): Drop prototype. + * lib/dirent.in.h (fdopendir): Provide prototype. + * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add replacements. + * modules/dirent (Makefile.am): Substitute them. + * MODULES.html.sh (File system functions): Mention it. + * doc/posix-functions/fdopendir.texi (fdopendir): Likewise. + * modules/fdopendir-tests: New file. + * tests/test-fdopendir.c: Likewise. + + fchdir: use more consistent macro convention + * lib/fcntl.in.h (_gl_register_fd): Move declaration to unistd. + * lib/sys_stat.in.h (rpl_fstat): Declare via make-time + REPLACE_FCHDIR, rather than relying on config.h macros. + * lib/unistd.in.h (fchdir): Move all fchdir internal declarations + inside a single make-time REPLACE_FCHDIR block, rather than using + the config.h FCHDIR_REPLACEMENT. + * m4/fchdir.m4 (gl_FUNC_FCHDIR): REPLACE_FCHDIR was already + AC_SUBST'd, also AC_DEFINE it. Don't define FCHDIR_REPLACEMENT. + Manage fstat replacement. + * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Pick up + REPLACE_FCHDIR. + * modules/sys_stat (Files): Add m4/unistd_h.m4. + (Makefile.am): Substitute REPLACE_FCHDIR. + * lib/close.c (rpl_close): Use REPLACE_FCHDIR, not + FCHDIR_REPLACEMENT. + * lib/dup-safer.c (dup_safer): Likewise. + * lib/dup2.c (rpl_dup2): Likewise. + * lib/dup3.c (rpl_dup3): Likewise. + * lib/open.c (rpl_open): Likewise. + + fchdir: simplify error handling, and support dup3 + * modules/fchdir (Depends-on): Use strdup-posix, not strdup. Add + stdbool, malloc-posix, realloc-posix. + * lib/fchdir.c (struct dir_info_t): Delete saved_errno. + (ensure_dirs_slot): Return false on allocation failure. + (rpl_dup2): Delete. + (_gl_register_dup): New function. + (_gl_unregister_fd, rpl_opendir, rpl_dup): Update callers. + (_gl_register_fd): Close fd on allocation failure. + * lib/fcntl.in.h (_gl_register_fd): Update signature. + * lib/unistd.in.h (_gl_register_dup) [FCHDIR_REPLACEMENT]: New + prototype. + (rpl_dup2_fchdir): Delete prototype. + * lib/open.c (open): Update caller. + * lib/dup2.c (dup2): Track fchdir metadata. + * lib/dup3.c (dup3): Likewise. + * m4/dup2.m4 (gl_REPLACE_DUP2): New macro. + * m4/fchdir.m4 (gl_FUNC_FCHDIR): Use it. + +2009-09-02 Ralf Wildenhues + + * gnulib-tool (func_create_testdir, func_create_megatestdir): Use + AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER. Use AC_CONFIG_FILES and + don't pass arguments to AC_OUTPUT. + +2009-09-02 Bruno Haible + + * modules/mkdtemp (License): Relicense under LGPLv2+. + Reported by Paolo Bonzini. + +2009-09-02 Ralf Wildenhues + + Replace uses of obsolete autoconf macros in Jim's modules. + The Autoconf macros AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and + AC_TRY_RUN have been obsolete since Autoconf 2.55, and each use + can evoke a warning from autoconf when run with -Wobsolete + enabled. They were declared obsolete for good reasons (see + the `AC_FOO_IFELSE vs AC_TRY_FOO' node in the Autoconf manual, + recently renamed to `AC_ACT_IFELSE vs AC_TRY_ACT'), and we + should not continue using the deprecated macros. + * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Replace + obsolete Autoconf macros with modern counterparts. + * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise. + * m4/dos.m4 (gl_AC_DOS): Likewise. + * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise. + * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise. + * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise. + * m4/jm-winsz1.m4 (gl_WINSIZE_IN_PTEM): Likewise. + * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Likewise. + * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise. + * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Likewise. + * m4/mode_t.m4 (gl_PROMOTED_TYPE_MODE_T): Likewise. + * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): + Likewise. + * m4/rename.m4 (gl_FUNC_RENAME): Likewise. + * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. + * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Likewise. + * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Likewise. + * m4/stat-time.m4 (gl_STAT_TIME): Likewise. + * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise. + +2009-09-01 Eric Blake + + fchdir: fix off-by-one bug in previous patch + * lib/fchdir.c (rpl_fstat): Use correct bounds. + (_gl_unregister_fd): Delete useless if. + +2009-09-01 Daniel P. Berrange + + maint.mk: sort the list of syntax-check rules + * top/maint.mk (syntax-check-rules): Sort syntax-check rules, so it's + easier to get a sense of progress when the rules are run sequentially + and take a long time. + +2009-09-01 Simon Josefsson + + * modules/arpa_inet: Use $(MKDIR_P) instead of @MKDIR_P@. + * modules/netinet_in: Likewise. + * modules/sys_file: Likewise. + * modules/sys_ioctl: Likewise. + * modules/sys_select: Likewise. + * modules/sys_socket: Likewise. + * modules/sys_stat: Likewise. + * modules/sys_time: Likewise. + * modules/sys_times: Likewise. + * modules/sys_utsname: Likewise. + * modules/sys_wait: Likewise. + +2009-09-01 Jim Meyering + + fts: help ensure that return values are not ignored + * lib/fts_.h (__GNUC_PREREQ): Define. + (__attribute_warn_unused_result__): Define. + (fts_children, fts_close, fts_open, fts_read): Declare with + __attribute_warn_unused_result__. + + fts: fts_close now fails also when closing a dir file descriptor fails + * lib/fts.c (fts_close): Detect close failure, not just fchdir failure, + and propagate to caller, along with errno. + + announce-gen: correct formatting in --help output + * build-aux/announce-gen (usage): Move the one-line description in + --help output "up", to where it belongs, just after Usage:. + +2009-08-31 Eric Blake + + fchdir: port to mingw + * m4/fchdir.m4 (gl_FUNC_FCHDIR): Check for mingw bug. + * lib/open.c (open) [FCHDIR_REPLACEMENT]: If directories can't be + opened, then use a substitute. + * lib/sys_stat.in.h (fstat) [REPLACE_OPEN_DIRECTORY]: Declare + replacement. + * lib/fchdir.c (fstat) [REPLACE_OPEN_DIRECTORY]: Implement it. + (_gl_register_fd): No need to check stat if open already filters + all directories. + (fchdir): Fix error condition to match POSIX. + * modules/fchdir (Depends-on): Add sys_stat. + * doc/posix-functions/open.texi (open): Document the limitation. + * modules/fchdir-tests: New file. + * tests/test-fchdir.c: Likewise. + + canonicalize: allow cross-testing from cygwin to mingw + * modules/canonicalize-tests (configure.ac): Define HAVE_SYMLINK. + (Makefile.am): Pass it through TESTS_ENVIRONMENT. + * modules/canonicalize-lgpl-tests (configure.ac, Makefile.am): + Likewise. + * tests/test-canonicalize.sh: Also skip test if 'ln -s' works, but + target does not support symlinks. + * tests/test-canonicalize-lgpl.sh: Likewise. + + chown: avoid compilation warning on mingw + * m4/chown.m4 (gl_FUNC_CHOWN): Recognize missing chown. + * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Always return failure on + mingw. + * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise. + * modules/chown (Depends-on): Add errno. + +2009-08-31 Stefano Lattarini (tiny change) + + * gnulib-tool: Fix test whether $CONFIG_SHELL has a working 'echo' + command. + +2009-08-31 Jim Meyering + + canonicalize: remove useless initialization + * lib/canonicalize.c (canonicalize_filename_mode): Remove useless + initialization of local, "end". + 2009-08-30 Bruno Haible Fix an unnecessary error on Solaris 10 on NFSv3 file systems.