+2009-09-09 Eric Blake <ebb9@byu.net>
+
+ 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 <bruno@clisp.org>
+
+ Work around towlower, towupper bug on mingw.
+ * lib/wctype.in.h (towlower, towupper) [__MINGW32__]: New replacements.
+ * m4/wctype.m4 (gl_WCTYPE_H): Replace <wctype.h> 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 <meyering@redhat.com>
+
+ 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 <ebb9@byu.net>
+
+ euidaccess: fix compilation error
+ * lib/euidaccess.c (includes): Add <fcntl.h>, 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 <ebb9@byu.net>
+
+ fstatat: fix compilation on Solaris
+ * lib/fstatat.c (includes): Add fcntl.h.
+ Reported by Pádraig Brady.
+
+2009-09-07 Eric Blake <ebb9@byu.net>
+
+ 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 <fcntl.h> 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 <ebb9@byu.net>
+
+ 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 <bruno@clisp.org>
+
+ * 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 <bruno@clisp.org>
+
+ * modules/openat (configure.ac): Remove unneeded witness.
+
+2009-09-06 Bruno Haible <bruno@clisp.org>
+
+ 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 <bruno@clisp.org>
+
+ * doc/posix-headers/fcntl.texi (AT_*): Mention affected platforms.
+
+2009-09-06 Bruno Haible <bruno@clisp.org>
+
+ * lib/sys_stat.in.h: Fix preprocessor command indentation.
+
+2009-09-06 Ben Pfaff <blp@gnu.org>
+ Bruno Haible <bruno@clisp.org>
+
+ 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 <gray@gnu.org.ua>
+
+ exclude: minor fix
+ * lib/exclude.c: Include wctype.h
+
+2009-09-06 Akim Demaille <demaille@gostai.com>
+
+ 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 <ebb9@byu.net>
+
+ 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 <meyering@redhat.com>
+
+ syntax-check: detect unnecessary inclusion of openat.h
+ * top/maint.mk (sc_prohibit_openat_without_use): New rule.
+
+2009-09-05 Bruno Haible <bruno@clisp.org>
+
+ 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 <alanh@fairlite.co.uk>.
+
+2009-09-05 Bruno Haible <bruno@clisp.org>
+
+ 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 <bruno@clisp.org>
+
+ * tests/test-striconveh.c (main): Test indirect conversion on platforms
+ where direct conversion is possible.
+
+2009-09-04 Eric Blake <ebb9@byu.net>
+
+ 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 <ebb9@byu.net>
+
+ 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 <ebb9@byu.net>
+
+ errno: use consistently
+ * lib/c-stack.c (ENOTSUP): <errno.h> 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 <fcntl.h> 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 <dirent.h>, 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 <Ralf.Wildenhues@gmx.de>
+
+ * 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 <bruno@clisp.org>
+
+ * modules/mkdtemp (License): Relicense under LGPLv2+.
+ Reported by Paolo Bonzini.
+
+2009-09-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ 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 <ebb9@byu.net>
+
+ 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 <berrange@redhat.com>
+
+ 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 <simon@josefsson.org>
+
+ * 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 <meyering@redhat.com>
+
+ 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 <ebb9@byu.net>
+
+ 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 <stefano.lattarini@gmail.com> (tiny change)
+
+ * gnulib-tool: Fix test whether $CONFIG_SHELL has a working 'echo'
+ command.
+
+2009-08-31 Jim Meyering <meyering@redhat.com>
+
+ canonicalize: remove useless initialization
+ * lib/canonicalize.c (canonicalize_filename_mode): Remove useless
+ initialization of local, "end".
+
+2009-08-30 Bruno Haible <bruno@clisp.org>
+
+ Fix an unnecessary error on Solaris 10 on NFSv3 file systems.
+ * lib/set-mode-acl.c (qset_acl) [Solaris 10 new]: Treat EOPNOTSUPP like
+ ENOSYS.
+
+2009-08-30 Bruno Haible <bruno@clisp.org>
+
+ * tests/test-pipe-filter-ii1.sh: Prefer /usr/xpg6/bin/tr over
+ /usr/xpg4/bin/tr when it exists.
+ * tests/test-pipe-filter-gi1.sh: Likewise.
+
+2009-08-30 Bruno Haible <bruno@clisp.org>
+
+ Work around deficient /usr/bin/id program on Solaris.
+ * tests/test-file-has-acl.sh (ID): New variable.
+ * tests/test-set-mode-acl.sh (ID): Likewise.
+ * tests/test-copy-acl.sh (ID): Likewise.
+ * tests/test-copy-file.sh (ID): Likewise.
+
+2009-08-30 Bruno Haible <bruno@clisp.org>
+
+ New module 'xstriconveh'.
+ * lib/xstriconveh.h: New file.
+ * lib/xstriconveh.c: New file.
+ * modules/xstriconveh: New file.
+
+2009-08-30 Bruno Haible <bruno@clisp.org>
+
+ Make it easier to use mem_cd_iconveh.
+ * lib/striconveh.h (iconveh_t): New type.
+ (iconveh_open, iconveh_close): New declarations.
+ (mem_cd_iconveh, str_cd_iconveh): Replace the three iconv_t arguments
+ with a single 'const iconveh_t *' argument.
+ * lib/striconveh.c (iconveh_open, iconveh_close): New functions.
+ (mem_cd_iconveh, str_cd_iconveh): Replace the three iconv_t arguments
+ with a single 'const iconveh_t *' argument.
+ (mem_iconveh, str_iconveh): Use iconveh_open, iconveh_close.
+ * tests/test-striconveh.c (main): Update.
+ * NEWS: Mention the change.
+
+2009-08-30 Bruno Haible <bruno@clisp.org>
+
+ * doc/posix-functions/iconv_open.texi: Mention indirect conversion
+ problem.
+
+2009-08-30 Bruno Haible <bruno@clisp.org>
+
+ Work around iconv_open problem on Solaris.
+ * lib/iconv_open-solaris.gperf: New file.
+ * lib/iconv_open.c (ICONV_FLAVOR_SOLARIS): New macro.
+ * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Also handle Solaris.
+ * modules/iconv_open (Files): Add lib/iconv_open-solaris.gperf.
+ (Makefile.am): Add rule for iconv_open-solaris.h. Augment
+ BUILT_SOURCES, MOSTLYCLEANFILES, MAINTAINERCLEANFILES, EXTRA_DIST.
+ * doc/posix-functions/iconv_open.texi: Mention the Solaris problem.
+
+2009-08-29 Jim Meyering <meyering@redhat.com>
+
+ maint.mk: remove more coreutils-specific targets; XZ_OPT=-9ev
+ * top/maint.mk (cvs-check): Remove target; it was just an alias
+ to the better-named vc-diff-check.
+ (maintainer-distcheck): Remove rule. It was used only from
+ the (alpha/beta/major) target, and all of its commands but one
+ were coreutils-specific.
+ (vc-dist): Remove rule.
+ (alpha beta major): Run "$(MAKE) distcheck" explicitly.
+ Run vc-diff-check, not vc-dist.
+ Run $(MAKE) dist with XZ_OPT=-9ev. Note spelling, with "-".
+
+2009-08-27 Bruno Haible <bruno@clisp.org>
+
+ * tests/test-bitrotate.c (main): Remove test that uses a shift count
+ of 0.
+
+2009-08-27 Bruno Haible <bruno@clisp.org>
+
+ * tests/test-func.c (main): Don't verify sizeof __func__ on SunPRO C
+ compilers.
+ * doc/func.texi: Document the SunPRO C bug.
+
+2009-08-27 Bruno Haible <bruno@clisp.org>
+
+ Fix link error on Solaris.
+ * tests/test-parse-duration.c (xstrdup): Remove function.
+
+2009-08-26 Pádraig Brady <P@draigbrady.com>
+
+ ignore-value: handle pointer types, too
+ * lib/ignore-value.h (__attribute__): Remove definition.
+ (ignore_value): Remove use of "__attribute__ ((unused))" in favor
+ of a more concise and more-often effective "(void) i" statement.
+ (ignore_ptr): New function to suppress warnings from functions that
+ return pointers, and to make it explicit that one function doesn't
+ handle all cases.
+
+2009-08-25 Bruno Haible <bruno@clisp.org>
+
+ dup2: work around a Linux bug.
+ * m4/dup2.m4 (gl_FUNC_DUP2): Test for the Linux bug.
+ * lib/dup2.c (rpl_dup2): Correct the return value if it is -EBADF.
+ * doc/posix-functions/dup2.texi: Mention the Linux bug.
+ Reported by Simon Josefsson.
+
+2009-08-25 Jim Meyering <meyering@redhat.com>
+
+ libguestfs uses gnulib
+ * users.txt: Add libguestfs.
+
+2009-08-24 Eric Blake <ebb9@byu.net>
+
+ dup2, pipe2: fix some recent test failures on cygwin 1.5.x
+ * lib/pipe2.c (includes): Add binary-io.h.
+ * lib/dup2.c (rpl_dup2): Correct buggy errno value.
+
+2009-08-24 Bruno Haible <bruno@clisp.org>
+
+ Tolerate declared but missing accept4 syscall.
+ * lib/accept4.c (accept4): Invoke original accept4 function first, if
+ available.
+ * lib/sys_socket.in.h (accept4): If the function is already present,
+ override it.
+ * m4/accept4.m4 (gl_FUNC_ACCEPT4): Remove AC_LIBOBJ invocation.
+ * modules/accept4 (Makefile.am): Compile accept4.c always.
+ Reported by Paolo Bonzini and Eric Blake.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ New module 'accept4'.
+ * lib/sys_socket.in.h (accept4): New declaration.
+ * lib/accept4.c: New file.
+ * m4/accept4.m4: New file.
+ * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Initialize
+ GNULIB_ACCEPT4, HAVE_ACCEPT4.
+ * modules/sys_socket (Makefile.am): Substitute GNULIB_ACCEPT4,
+ HAVE_ACCEPT4.
+ * modules/accept4: New file.
+ * doc/glibc-functions/accept4.texi: Mention the new module.
+
+2009-08-24 Jim Meyering <meyering@redhat.com>
+
+ progname: also set global program_invocation_name, when possible
+ Before this change, a libtool-enabled program that calls glibc's
+ error function would report the program name as
+ "/abs/dir/.libs/lt-program_name" rather than the desired program_name.
+ * modules/progname (configure.ac): Check for a declaration of
+ program_invocation_name.
+ * lib/progname.c: Include <errno.h>.
+ (set_program_name) [HAVE_DECL_PROGRAM_INVOCATION_NAME]:
+ Set program_invocation_name.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ * lib/dup3.c: Include <string.h>.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ * lib/dup3.c (dup3): Test only once whether the system actually exists.
+ * lib/pipe2.c (pipe2): Likewise.
+ Suggested by Eric Blake.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ Tolerate declared but missing dup3 syscall.
+ * lib/dup3.c (dup3): Invoke original dup3 function first, if available.
+ * lib/unistd.in.h (dup3): If the function is already present,
+ override it.
+ * m4/dup3.m4 (gl_FUNC_DUP3): Remove AC_LIBOBJ invocation.
+ * modules/dup3 (Makefile.am): Compile dup3.c always.
+ Reported by Paolo Bonzini.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ Tolerate declared but missing pipe2 syscall.
+ * lib/pipe2.c (pipe2): Invoke original pipe2 function first, if
+ available.
+ * lib/unistd.in.h (pipe2): If the function is already present,
+ override it.
+ * m4/pipe2.m4 (gl_FUNC_PIPE2): Remove AC_LIBOBJ invocation.
+ * modules/pipe2 (Makefile.am): Compile pipe2.c always.
+ Reported by Paolo Bonzini.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ * lib/pipe2.c (pipe2): Move #ifs inside function.
+
+2009-08-22 Joel E. Denny <jdenny@clemson.edu>
+
+ quotearg: document limitations of quote_these_too
+ * lib/quotearg.c (quotearg_buffer_restyled): Add comments where
+ those limitations are created.
+ * lib/quotearg.h (set_char_quoting): Document that digits and
+ letters that are special after backslash are not permitted.
+ (quotearg_char): Cross-reference set_char_quoting documentation.
+
+2009-08-23 Joel E. Denny <jdenny@clemson.edu>
+
+ quotearg: implement custom_quoting_style
+ * lib/quotearg.c: (struct quoting_options): Add left_quote and
+ right_quote fields.
+ (set_custom_quoting): New public function.
+ (quotearg_buffer_restyled): Add left_quote and right_quote
+ arguments, handle them very much like locale quoting, and update
+ all uses.
+ (quotearg_n_custom): New public function.
+ (quotearg_n_custom_mem): New public function.
+ (quotearg_custom): New public function.
+ (quotearg_custom_mem): New public function.
+ * lib/quotearg.h: Prototype and document new public functions.
+ (enum quoting_style): For escape_quoting_style and
+ clocale_quoting_style, comment that QA_SPLIT_TRIGRAPHS is
+ ignored even though they're otherwise like c_quoting_style.
+ Add custom_quoting_style member and document with comparison to
+ clocale_quoting_style.
+ * tests/test-quotearg.c (custom_quotes): New array.
+ (custom_results): New array.
+ (main): Extend to test custom quoting.
+
+2009-08-22 Joel E. Denny <jdenny@clemson.edu>
+
+ quotearg: fix right quote escaping when it's in quote_these_too
+ * lib/quotearg.c (quotearg_buffer_restyled): Upon seeing a right
+ quote, be sure to prepend only one backslash.
+ * tests/test-quotearg.c (use_quote_double_quotes): New function.
+ (main): Test it.
+
+2009-08-22 Joel E. Denny <jdenny@clemson.edu>
+
+ quotearg-tests: test escaping of embedded locale quotes
+ * tests/test-quotearg.c (struct result_strings): Add member for
+ new input.
+ (LQ_ENC, RQ_ENC, RQ_ESC): New macros.
+ (inputs): Add new input.
+ (results_g): Add expected results.
+ (flag_results): Likewise.
+ (locale_results): Likewise.
+ (compare_strings): Check those.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ Tests for module 'dup3'.
+ * modules/dup3-tests: New file.
+ * tests/test-dup3.c: New file.
+
+ New module 'dup3'.
+ * lib/unistd.in.h (dup3): New declaration.
+ * lib/dup3.c: New file.
+ * m4/dup3.m4: New file.
+ * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_DUP3 and
+ HAVE_DUP3.
+ * modules/unistd (Makefile.am): Substitute GNULIB_DUP3 and HAVE_DUP3.
+ * modules/dup3: New file.
+ * doc/glibc-functions/dup3.texi: Mention the new module.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ Tweak the dup2 test.
+ * tests/test-dup2.c (main): Create the test file empty. Verify that an
+ out-of-range fd yields EBADF. Verify that after writing to /dev/null,
+ the test file is still empty. Fix argument order of lseek.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ Avoid test link errors when the modules getopt-gnu, gettext are used.
+ * modules/getopt-posix-tests (Makefile.am): Define test_getopt_LDADD.
+ Reported by Tom G. Christensen <tgc@jupiterrise.com>.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ Fix getdtablesize() on mingw.
+ * lib/getdtablesize.c (getdtablesize): Implement differently.
+ * lib/unistd.in.h (getdtablesize): Improve comment.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ New module 'mkostemp'.
+ Based on Ulrich Drepper's 2007-08-10 change in glibc.
+ * lib/stdlib.in.h (mksotemp): New declaration.
+ * lib/mkostemp.c: New file, from glibc with modifications.
+ * lib/tempname.h (GT_FILE): Remove outdated comment.
+ (gen_tempname): Add flags argument.
+ * lib/tempname.c (__GT_BIGFILE): Remove macro.
+ (__GT_FILE): Map to 1.
+ (small_open, large_open): Remove macros.
+ (__gen_tempname): Add flags argument. Remove code for __GT_BIGFILE.
+ * lib/mkstemp.c (mkstemp): Update.
+ * lib/mkdtemp.c (mkdtemp): Likewise.
+ * m4/mkostemp.m4: New file.
+ * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_MKOSTEMP,
+ HAVE_MKOSTEMP.
+ * modules/stdlib (Makefile.am): Substitute GNULIB_MKOSTEMP,
+ HAVE_MKOSTEMP.
+ * modules/mkostemp: New file, based on modules/mkstemp.
+ * doc/glibc-functions/mkostemp.texi: Mention the new module.
+ * NEWS: Mention the change.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ * lib/pipe2.c (pipe2): Support O_TEXT, O_BINARY on all platforms.
+ Reported by Eric Blake.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ * lib/pipe2.c (pipe2): Fix test of fcntl's return value.
+ Reported by Eric Blake.
+
+2009-08-23 Bruno Haible <bruno@clisp.org>
+
+ * modules/fchdir (Depends-on): Use fcntl-h instead of fcntl.
+ * modules/pipe2 (Depends-on): Likewise.
+
+2009-08-23 Eric Blake <ebb9@byu.net>
+
+ fcntl-h: add O_TTY_INIT support
+ * lib/fcntl.in.h (O_TTY_INIT): Support another POSIX macro.
+ * tests/test-fcntl-h.c (o): Test it.
+ * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
+
+ fcntl-h: rename from fcntl, in preparation for fcntl(2)
+ * modules/fcntl: Move <fcntl.h> header replacement...
+ * modules/fcntl-h: ...to new name, so as not to collide with
+ like-named function.
+ * tests/test-fcntl.c: Rename...
+ * tests/test-fcntl-h.c: ...to this. Test FD_CLOEXEC.
+ * modules/fcntl-tests: Rename...
+ * modules/fcntl-h-tests: ...to this. Update test file name.
+ * modules/chdir-long (Depends-on): Update clients.
+ * modules/chdir-safer (Depends-on): Likewise.
+ * modules/fcntl-safer (Depends-on): Likewise.
+ * modules/fts (Depends-on): Likewise.
+ * modules/mkancesdirs (Depends-on): Likewise.
+ * modules/mkdir-p (Depends-on): Likewise.
+ * modules/open (Depends-on): Likewise.
+ * modules/savewd (Depends-on): Likewise.
+ * MODULES.html.sh (systems lacking POSIX:2008): Update name.
+ * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
+
+2009-08-22 Bruno Haible <bruno@clisp.org>
+
+ * modules/binary-io (License): Relicense under LGPL.
+ * modules/pipe2 (License): Likewise.
+
+2009-08-22 Bruno Haible <bruno@clisp.org>
+
+ * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Fix test of fcntl's
+ return value.
+ * lib/pipe-filter-gi.c (filter_init): Likewise.
+ Reported by Eric Blake.
+
+2009-08-22 Bruno Haible <bruno@clisp.org>
+
+ * lib/pipe.c (create_pipe): Use pipe2 instead of _pipe.
+ * modules/pipe (Depends-on): Add pipe2.
+
+2009-08-22 Bruno Haible <bruno@clisp.org>
+
+ Tests for module 'pipe2'.
+ * modules/pipe2-tests: New file.
+ * tests/test-pipe2.c: New file.
+
+ New module 'pipe2'.
+ * lib/unistd.in.h (pipe2): New declaration.
+ * lib/pipe2.c: New file.
+ * m4/pipe2.m4: New file.
+ * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_PIPE2 and
+ HAVE_PIPE2.
+ * modules/unistd (Makefile.am): Substitute GNULIB_PIPE2 and HAVE_PIPE2.
+ * modules/pipe2: New file.
+ * doc/glibc-functions/pipe2.texi: Mention the new module.
+
+2009-08-22 Bruno Haible <bruno@clisp.org>
+
+ Reference some new glibc functions.
+ * doc/glibc-functions/accept4.texi: New file.
+ * doc/glibc-functions/dup3.texi: New file.
+ * doc/glibc-functions/mkostemp.texi: New file.
+ * doc/glibc-functions/pipe2.texi: New file.
+ * doc/gnulib.texi (Glibc stdlib.h): Refer to mkostemp.
+ (Glibc sys/socket.h): Refer to accept4.
+ (Glibc unistd.h): Refer to dup3, pipe2.
+ Reported by Eric Blake.
+
+2009-08-22 Jim Meyering <meyering@redhat.com>
+ Bruno Haible <bruno@clisp.org>
+
+ annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
+ This makes it so packages using automake-1.11's silent-rules option
+ can print e.g., a single "GEN configmake.h" line, rather than
+ the 30+ statements that perform the job. If you want to see the
+ actual commands, you can still run "make V=1".
+ * modules/alloca-opt: Add $(AM_V_GEN) and $(AM_V_at) prefixes
+ so that make output is abbreviated when those variables are defined
+ appropriately.
+ * modules/argz: Likewise.
+ * modules/arpa_inet: Likewise.
+ * modules/byteswap: Likewise.
+ * modules/configmake: Likewise.
+ * modules/dirent: Likewise.
+ * modules/errno: Likewise.
+ * modules/fcntl: Likewise.
+ * modules/float: Likewise.
+ * modules/fnmatch: Likewise.
+ * modules/getopt-posix: Likewise.
+ * modules/glob: Likewise.
+ * modules/iconv_open: Likewise.
+ * modules/inttypes: Likewise.
+ * modules/localcharset: Likewise.
+ * modules/locale: Likewise.
+ * modules/math: Likewise.
+ * modules/netdb: Likewise.
+ * modules/netinet_in: Likewise.
+ * modules/poll: Likewise.
+ * modules/posix_spawnp-tests: Likewise.
+ * modules/sched: Likewise.
+ * modules/search: Likewise.
+ * modules/selinux-h: Likewise.
+ * modules/signal: Likewise.
+ * modules/spawn: Likewise.
+ * modules/stdarg: Likewise.
+ * modules/stdbool: Likewise.
+ * modules/stddef: Likewise.
+ * modules/stdint: Likewise.
+ * modules/stdio: Likewise.
+ * modules/stdlib: Likewise.
+ * modules/string: Likewise.
+ * modules/strings: 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.
+ * modules/sysexits: Likewise.
+ * modules/time: Likewise.
+ * modules/unistd: Likewise.
+ * modules/wchar: Likewise.
+ * modules/wctype: Likewise.
+
+2009-08-22 Jim Meyering <meyering@redhat.com>
+
+ announce-gen: detect write failure
+ * build-aux/announce-gen: Add Coda at end.
+ Remove equivalent-but-more-verbose block at top.
+
+2009-08-19 Akim Demaille <demaille@gostai.com>
+
+ bootstrap: --help to stdout.
+ * bootstrap (usage): Don't send --help to stderr.
+ Use a here doc instead of a long string.
+
+2009-08-21 Eric Blake <ebb9@byu.net>
+
+ test-popen-safer: split from test-popen
+ * tests/test-popen.c (main): Move...
+ * tests/test-popen.h: ...into new file.
+ * tests/test-popen-safer2.c: New file.
+ * modules/popen-tests (Files): Add test-popen.h.
+ * modules/popen-safer-tests (Files): Add test-popen-safer2.c.
+ Suggested by Bruno Haible.
+
+ test-fcntl-safer: split from test-open
+ * tests/test-open.c (main): Move...
+ * tests/test-open.h: ...into new file.
+ * tests/test-fcntl-safer.c: New file.
+ * modules/open-tests (Files): Add test-open.h.
+ * modules/fcntl-safer-tests: New file.
+ Suggested by Bruno Haible.
+
+ test-fopen-safer: split from test-fopen
+ * tests/test-fopen.c (main): Move...
+ * tests/test-fopen.h: ...into new file.
+ * tests/test-fopen-safer.c: New file.
+ * modules/fopen-tests (Files): Add test-fopen.h.
+ * modules/fopen-safer-tests: New file.
+ Suggested by Bruno Haible.
+
+2009-08-21 Paolo Bonzini <bonzini@gnu.org>
+
+ popen-safer: test O_CLOEXEC at run-time.
+ * lib/popen-safer.c: Test O_CLOEXEC at run-time.
+
+2009-08-21 Paolo Bonzini <bonzini@gnu.org>
+
+ fcntl: move more flags to the header
+ * lib/cloexec.c: Do not define FD_CLOEXEC here.
+ * lib/popen-safer.c: Do not alias O_NOINHERIT to O_CLOEXEC here.
+ * lib/fcntl.in.h: Do both things here.
+
+2009-08-21 Jim Meyering <meyering@redhat.com>
+
+ consistently remove $@-t before redirecting to it
+ * modules/argz: Remove $@-t and $@ before redirecting to the former.
+ * modules/alloca-opt: Likewise.
+ * modules/byteswap: Likewise.
+ * modules/fnmatch: Likewise.
+ * modules/getopt-posix: Likewise.
+ * modules/glob: Likewise.
+ * modules/poll: Likewise.
+ * modules/posix_spawnp-tests: Likewise.
+ * modules/sys_socket: Likewise.
+ * modules/sysexits: Likewise.
+
+2009-08-21 Eric Blake <ebb9@byu.net>
+
+ popen: simplify access to original popen
+ * lib/popen.c (rpl_popen): No need to worry about popen being a
+ macro.
+ Reported by Bruno Haible.
+
+2009-08-20 Eric Blake <ebb9@byu.net>
+
+ build: avoid some compiler warnings
+ * lib/selinux-at.h: Use dir_fd, not dirfd, to avoid shadowing.
+ * lib/exclude.c (fnmatch_pattern_has_wildcards): Use correct
+ type.
+ (new_exclude_segment, excluded_file_pattern_p)
+ (excluded_file_name_p): Reduce scope.
+ * lib/vasnprintf.c (decimal_point_char): Avoid warning on
+ old-style declaration.
+
+2009-08-20 Simon Josefsson <simon@josefsson.org>
+
+ * tests/test-exclude1.sh: Handle Windows EOL.
+ * tests/test-exclude2.sh: Likewise.
+ * tests/test-exclude3.sh: Likewise.
+ * tests/test-exclude4.sh: Likewise.
+ * tests/test-exclude5.sh: Likewise.
+ * tests/test-exclude6.sh: Likewise.
+ * tests/test-exclude7.sh: Likewise.
+
+2009-08-19 Akim Demaille <demaille@gostai.com>
+
+ bootstrap: find sha1sum when named gsha1sum.
+ * bootstrap (find_tool): New.
+ ($SHA1SUM): New.
+ Use it.
+
+2009-08-20 Jim Meyering <meyering@redhat.com>
+
+ maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
+ * top/maint.mk (_header_without_use): Use "\\\\", not "\\" in the sed
+ expression that converts "." in a file name to "\." in the resulting
+ regexp. Start with a dummy statement, so that prior shell variable
+ definitions are expanded portably. Reported by Simon Josefsson.
+
+2009-08-20 Paolo Bonzini <bonzini@gnu.org>
+
+ Fix polling for writeability of a screen buffer.
+ * lib/poll.c: Distinguish input and screen buffers for the
+ Win32 implementation.
+ * lib/select.c: Likewise.
+
+2009-08-19 Eric Blake <ebb9@byu.net>
+
+ popen-safer: prevent popen from clobbering std descriptors
+ * modules/popen-safer: New file.
+ * lib/popen-safer.c: Likewise.
+ * m4/stdio-safer.m4 (gl_POPEN_SAFER): New macro.
+ * lib/stdio--.h (popen): Provide override.
+ * lib/stdio-safer.h (popen_safer): Provide declaration.
+ * tests/test-popen.c (includes): Partially test this.
+ * modules/popen-safer-tests: New file, for more tests.
+ * tests/test-popen-safer.c: Likewise.
+ * MODULES.html.sh (file stream based Input/Output): Mention it.
+
+ tests: test some of the *-safer modules
+ * modules/fopen-safer (Depends-on): Add fopen.
+ * modules/fcntl-safer (Depends-on): Add fcntl.
+ * modules/stdlib-safer (Depends-on): Add stdlib.
+ (configure.ac): Set indicator.
+ * modules/unistd-safer (configure.ac): Likewise.
+ * modules/tmpfile-safer (configure.ac): Likewise.
+ (Depends-on): Add tmpfile.
+ * lib/stdio--.h (fopen, tmpfile): Don't override unless module is
+ active.
+ * tests/test-fopen.c (includes): Test safer versions when they are
+ in use.
+ * tests/test-open.c (includes): Likewise.
+
+ popen: fix cygwin 1.5 bug when stdin closed
+ * doc/posix-functions/popen.texi (popen): Document cygwin bugs.
+ * modules/popen: New file.
+ * modules/popen-tests: Likewise.
+ * tests/test-popen.c: Likewise.
+ * m4/popen.m4: Likewise.
+ * lib/popen.c: Likewise.
+ * lib/stdio.in.h (popen): New declaration.
+ * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add popen.
+ * modules/stdio (Makefile.am): Likewise.
+ * MODULES.html.sh (systems lacking POSIX:2008): Mention it.
+
+2009-08-17 Joel E. Denny <jdenny@clemson.edu>
+
+ maint.mk: give full control over update-copyright exclusions
+ * top/maint.mk (VC_LIST_EXCEPT): Instead of ChangeLog, use
+ ${VC_LIST_EXCEPT_DEFAULT-ChangeLog} as the default exclusion.
+ (update-copyright): Don't force inclusion of top-level
+ ChangeLog. Don't force exclusion of all COPYING files, but make
+ them the default exclusion instead.
+
+2009-08-16 Bruno Haible <bruno@clisp.org>
+
+ Fix test failures on Solaris 10.
+ * tests/uniconv/test-u8-conv-from-enc.c (main): Disable autodetect_jp
+ tests when Solaris iconv() is used.
+ * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
+ * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
+ * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
+ * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
+ * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
+
+2009-08-16 Bruno Haible <bruno@clisp.org>
+
+ Fix test failures on Solaris 10.
+ * tests/test-pipe-filter-ii1.sh: Determine the filename of a working
+ 'tr' program and pass it as first argument.
+ * tests/test-pipe-filter-gi1.sh: Likewise.
+ * tests/test-pipe-filter-ii1.c (main): Except the filename of a 'tr'
+ program as first argument.
+ * tests/test-pipe-filter-gi1.c (main): Likewise.
+
+2009-08-16 Eric Blake <ebb9@byu.net>
+
+ fpurge: fix previous commits
+ * modules/fpurge (Makefile.am): Make replacement conditional,
+ partially reverting 2007-04-29 change; missed in previous
+ attempt.
+ * m4/fpurge.m4 (gl_FUNC_FPURGE): Also compile fpurge.c when fpurge
+ is missing.
+
+2009-08-16 Bruno Haible <bruno@clisp.org>
+
+ Clarify fpurge's effect on the file position.
+ * lib/stdio.in.h (fpurge): Specify the file position after fpurge.
+ * tests/test-fpurge.c (main): Make a second pass for checking the file
+ position.
+
+2009-08-16 Bruno Haible <bruno@clisp.org>
+
+ * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't compile fpurge.c if only the
+ declaration of fpurge is missing.
+ * tests/test-fpurge.c (main): Check that the file has not more contents
+ than expected. Close the file before removing it.
+
+2009-08-15 Eric Blake <ebb9@byu.net>
+
+ fpurge: don't wrap working cygwin implementation
+ * lib/fpurge.c (fpurge): Fix comment typo.
+ * m4/fpurge.m4 (gl_FUNC_FPURGE): Detect BSD bug, allowing cygwin
+ 1.7 to avoid replacement.
+ * tests/test-fpurge.c (main): Enhance test.
+
+2009-08-15 Eric Blake <ebb9@byu.net>
+ and Jim Meyering <meyering@redhat.com>
+
+ test-update-copyright: skip if perl is insufficient
+ * tests/test-update-copyright.sh: Failure to run maintainer tool
+ should not cause testsuite failure on cygwin 1.5.
+
+2009-08-14 Eric Blake <ebb9@byu.net>
+
+ doc: mention more functions added in cygwin 1.7.0
+ * doc/posix-headers/limits.texi (limits.h): Update for recent
+ cygwin additions.
+ * doc/posix-headers/wordexp.texi (wordexp.h): Likewise.
+ * doc/posix-functions/wordexp.texi (wordexp): Likewise.
+ * doc/posix-functions/wordfree.texi (wordfree): Likewise.
+ * doc/posix-functions/setlocale.texi (setlocale): Likewise.
+ * doc/posix-functions/nl_langinfo.texi (nl_langinfo): Likewise.
+
+2009-08-14 Eric Blake <ebb9@byu.net>
+
+ maint.mk: simplify update-copyright rule
+ * top/maint.mk (update-copyright-local): Delete, and document how
+ to do it in cfg.mk instead.
+ (update-copyright-exclude-regexp): Delete, and document how to do
+ it in .x-update-copyright instead.
+ (update-copyright): Simplify, thanks to VC_LIST_EXCEPT. Don't
+ exclude ChangeLog.
+
+2009-08-14 Bruno Haible <bruno@clisp.org>
+
+ * m4/wchar.m4 (gl_WCHAR_H): Undo invalid optimization in last commit.
+
+2009-08-14 Joel E. Denny <jdenny@clemson.edu>
+
+ maint.mk: support update-copyright-env
+ * top/maint.mk (update-copyright-env): Define place-holder.
+ (update-copyright): Expand $(update-copyright-env) before
+ invoking update-copyright.
+
+2009-08-14 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright: implement forced reformatting
+ * build-aux/update-copyright: Implement and document
+ UPDATE_COPYRIGHT_FORCE.
+ * tests/test-update-copyright.sh: Test it.
+
+2009-08-14 Eric Blake <ebb9@byu.net>
+ and Bruno Haible <bruno@clisp.org>
+
+ stddef: fix NetBSD 5.0 NULL bug, rather than working around it
+ * tests/test-locale.c: Revert previous patch related to NULL.
+ * tests/test-stdio.c: Likewise.
+ * tests/test-stdlib.c: Likewise.
+ * tests/test-string.c: Likewise.
+ * tests/test-unistd.c: Likewise.
+ * modules/time-tests (Depends-on): Add verify.
+ * modules/wchar-tests (Depends-on): Likewise.
+ * tests/test-time.c: Test for NULL compliance.
+ * tests/test-wchar.c: Likewise.
+ * modules/locale (Depends-on): Add stddef.
+ * modules/stdio (Depends-on): Likewise.
+ * modules/stdlib (Depends-on): Likewise.
+ * modules/string (Depends-on): Likewise.
+ * modules/time (Depends-on): Likewise.
+ * modules/unistd (Depends-on): Likewise.
+ * modules/wchar (Depends-on): Likewise.
+ * lib/locale.in.h (includes): Use <stddef.h> to fix NULL.
+ * lib/stdlib.in.h (includes): Likewise.
+ * lib/string.in.h (includes): Likewise.
+ * lib/time.in.h (includes): Likewise.
+ * lib/unistd.in.h (includes): Likewise.
+ * m4/locale_h.m4 (gl_LOCALE_H): Replace locale.h if stddef.h was
+ replaced.
+ * m4/wchar.m4 (gl_WCHAR_H): Likewise.
+ * m4/stddef_h.m4: New file.
+ * modules/stddef: Likewise.
+ * lib/stddef.in.h: Likewise.
+ * modules/stddef-tests: Likewise.
+ * tests/test-stddef.c: Likewise.
+ * MODULES.html.sh (Basic types <stddef.h>): Mention new module.
+ * doc/posix-headers/stddef.texi (stddef.h): Document the bug.
+ * doc/posix-headers/locale.texi (locale.h): Likewise.
+ * doc/posix-headers/stdio.texi (stdio.h): Likewise.
+ * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
+ * doc/posix-headers/string.texi (string.h): Likewise.
+ * doc/posix-headers/time.texi (time.h): Likewise.
+ * doc/posix-headers/unistd.texi (unistd.h): Likewise.
+ * doc/posix-headers/wchar.texi (wchar.h): Likewise.
+
+2009-08-14 Eric Blake <ebb9@byu.net>
+
+ doc: improve git diff of texinfo files
+ * .gitattributes: Add rule for *.texi files, with hint on how to
+ use it.
+ Copied from m4, and based on a report by Bruno Haible.
+
+2009-08-14 Bruno Haible <bruno@clisp.org>
+
+ Disable multithread support by default on Cygwin 1.5.x for real.
+ * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Fix last commit.
+
+2009-08-14 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright: much ado about intervals
+ * build-aux/update-copyright: Implement and document
+ UPDATE_COPYRIGHT_USE_INTERVALS to control expansion and collapse
+ of copyright year intervals.
+ Also, document UPDATE_COPYRIGHT_YEAR.
+ * tests/test-update-copyright.sh: Test it.
+
+ update-copyright: convert 2-digit to 4-digit years
+ * build-aux/update-copyright: Implement and document.
+ * tests/test-update-copyright.sh: Update.
+
+2009-08-14 Jim Meyering <meyering@redhat.com>
+
+ test-exclude: avoid coreutils "make check" failure
+ * tests/test-exclude.c (ARGMATCH_DIE_DECL) [ARGMATCH_DIE_DECL]: Define,
+ just as in test-argmatch.c.
+
+2009-08-13 Eric Blake <ebb9@byu.net>
+
+ test-dup2: fix bad assumption
+ * tests/test-dup2.c (main): Tolerate leaked fds from environment.
+ Reported by Peter Breitenlohner <peb@mppmu.mpg.de>.
+
+ test-version-etc: fix CRLF portability issue
+ * tests/test-version-etc.sh: Use tr, not sed, as not all sed
+ recognize \r.
+ * tests/test-argp-version-etc-1.sh: Likewise.
+
+ getopt: update client modules
+ * modules/argp (Depends-on): Use getopt-gnu.
+ * modules/git-merge-changelog (Depends-on): Likewise.
+ * modules/long-options (Depends-on): Likewise.
+ * modules/xstrtol (Depends-on): Likewise.
+
+2009-08-13 Simon Josefsson <simon@josefsson.org>
+
+ * tests/test-version-etc.sh: Don't fail on different
+ project/version. Don't fail on CRLF differences. Rewrite to use
+ multiple -e instead of multiple sed forks, suggested by Eric Blake
+ <ebb9@byu.net>.
+ * tests/test-argp-version-etc-1.sh: Likewise.
+
+2009-08-13 Simon Josefsson <simon@josefsson.org>
+
+ * tests/test-version-etc.sh: Don't fail on different
+ project/version.
+
+2009-08-12 Bruno Haible <bruno@clisp.org>
+
+ Tests for modules 'getopt-posix', 'getopt-gnu'.
+ * modules/getopt-posix-tests: New file.
+ * tests/test-getopt.c: New file.
+ * tests/test-getopt.h: New file.
+ * tests/test-getopt_long.h: New file.
+
+ New modules 'getopt-posix', 'getopt-gnu'.
+ * modules/getopt-gnu: New file, renamed from modules/getopt.
+ * modules/getopt-posix: New file.
+ * modules/getopt: Turn into an obsolete alias for getopt-gnu.
+ * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_FUNC_GETOPT_GNU): New macros.
+ (gl_GETOPT): Remove macro.
+ (gl_GETOPT_CHECK_HEADERS): Do some checks only for gl_FUNC_GETOPT_GNU.
+ Disable the test against BSD systems that declare optreset. Test
+ against mingw bug. Test against lack of support of optional arguments
+ on many platforms.
+ * doc/glibc-headers/getopt.texi: Update module name and list of
+ relevant platforms.
+ * doc/posix-functions/getopt.texi: Mention modules 'getopt-posix' and
+ 'getopt-gnu' and more portability problems.
+ * NEWS: Mention the changes.
+
+2009-08-12 Bruno Haible <bruno@clisp.org>
+
+ Ensure that optarg etc. get declared by <unistd.h>.
+ * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require
+ AC_USE_SYSTEM_EXTENSIONS.
+ * modules/getopt (Depends-on): Add 'extensions'.
+
+2009-08-12 Bruno Haible <bruno@clisp.org>
+
+ Avoid test link errors.
+ * modules/pipe-filter-ii-tests (Makefile.am): Define
+ test_pipe_filter_ii1_LDADD and test_pipe_filter_ii2_main_LDADD.
+ * modules/pipe-filter-gi-tests (Makefile.am): Define
+ test_pipe_filter_gi1_LDADD and test_pipe_filter_gi2_main_LDADD.
+ Reported by Tom G. Christensen <tgc@jupiterrise.com>.
+
+2009-08-12 Bruno Haible <bruno@clisp.org>
+
+ * m4/getopt.m4 (gl_REPLACE_GETOPT): New macro, was called
+ gl_GETOPT_SUBSTITUTE before.
+ (gl_GETOPT): Use it.
+ * m4/argp.m4 (gl_ARGP): Update.
+ Reported by Sergey Poznyakoff.
+
+ * m4/getopt.m4: Reorder macros.
+ (gl_GETOPT): Inline gl_GETOPT_SUBSTITUTE.
+ (gl_GETOPT_SUBSTITUTE): Remove macro.
+
+2009-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ Minor improvement in gitlog-to-changelog
+
+ * build-aux/gitlog-to-changelog: New option `--format' makes
+ output format string configurable.
+
+2009-08-12 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ Optimize exclude: use hash tables for non-wildcard patterns.
+
+ * lib/exclude.c: Include hash.h and mbuiter.h
+ (struct exclude_pattern, exclude_segment): New data types.
+ (struct exclude): Rewrite.
+ (fnmatch_pattern_has_wildcards): New function.
+ (new_exclude_segment, free_exclude_segment): New functions.
+ (excluded_file_pattern_p, excluded_file_name_p): New functions.
+ (excluded_file_name, add_exclude): Rewrite using new struct exclude.
+ * lib/exclude.h (is_fnmatch_pattern): New prototype.
+ * modules/exclude: Depend on hash and mbuiter.
+
+ * modules/exclude-tests: New file.
+ * tests/test-exclude.c: New file.
+ * tests/test-exclude1.sh: New file.
+ * tests/test-exclude2.sh: New file.
+ * tests/test-exclude3.sh: New file.
+ * tests/test-exclude4.sh: New file.
+ * tests/test-exclude5.sh: New file.
+ * tests/test-exclude6.sh: New file.
+ * tests/test-exclude7.sh: New file.
+
+2009-08-12 Bruno Haible <bruno@clisp.org>
+
+ Ensure that getopt() gets declared by <unistd.h>.
+ * lib/unistd.in.h: Conditionally include getopt.h.
+ * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Require gl_UNISTD_H_DEFAULTS.
+ Set GNULIB_UNISTD_H_GETOPT.
+ * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
+ GNULIB_UNISTD_H_GETOPT.
+ * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_GETOPT.
+
+2009-08-12 Bruno Haible <bruno@clisp.org>
+
+ Clarify logic.
+ * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS, gl_GETOPT_IFELSE): Use
+ gl_replace_getopt instead of GETOPT_H.
+
+2009-08-12 Bruno Haible <bruno@clisp.org>
+
+ * m4/getopt.m4: Add comments.
+
+2009-08-12 Bruno Haible <bruno@clisp.org>
+
+ Disable multithread support by default on Cygwin 1.5.x.
+ * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): On Cygwin 1.5.x and older,
+ set gl_use_threads=no if not specified otherwise.
+
+2009-08-11 Bruno Haible <bruno@clisp.org>
+
+ Avoid compilation error on NetBSD 5.0.
+ * tests/test-locale.c: Write sizeof (NULL) instead of sizeof NULL.
+ * tests/test-stdio.c: Likewise.
+ * tests/test-stdlib.c: Likewise.
+ * tests/test-string.c: Likewise.
+ * tests/test-unistd.c: Likewise.
+ Reported by Greg Troxel <gdt@ir.bbn.com>
+ at <https://savannah.gnu.org/support/?106973>.
+
+2009-08-11 Bruno Haible <bruno@clisp.org>
+
+ * modules/dup2-tests (Depends-on): Remove close.
+
+ Undo 2009-07-19 commit.
+ * modules/acl-tests (Depends-on): Remove close.
+ * modules/binary-io-tests (Depends-on): Likewise.
+ * modules/closein-tests (Depends-on): Likewise.
+ * modules/flock-tests (Depends-on): Likewise.
+ * modules/fsync-tests (Depends-on): Likewise.
+ * modules/lseek-tests (Depends-on): Likewise.
+ * modules/pipe-tests (Depends-on): Likewise.
+ * modules/posix_spawn-tests (Depends-on): Likewise.
+ * modules/posix_spawnp-tests (Depends-on): Likewise.
+ * modules/stat-time-tests (Depends-on): Likewise.
+ * modules/yesno-tests (Depends-on): Likewise.
+
+2009-08-10 Bruno Haible <bruno@clisp.org>
+
+ * lib/vasnprintf.c (DCHAR_SET): Undefine at the end.
+
+2009-08-10 Bruno Haible <bruno@clisp.org>
+
+ Fix a gcc warning.
+ * lib/write.c (rpl_write): Cast result of _get_osfhandle.
+
+2009-08-10 Bruno Haible <bruno@clisp.org>
+
+ Don't optimize AC_LIBOBJs, as they may appear in different contexts.
+ * m4/close.m4 (gl_REPLACE_CLOSE): Execute AC_LIBOBJ unconditionally,
+ not only the first time.
+ * m4/fclose.m4 (gl_REPLACE_FCLOSE): Likewise.
+ * m4/open.m4 (gl_REPLACE_OPEN): Likewise.
+ * m4/strstr.m4 (gl_FUNC_STRSTR): Execute AC_LIBOBJ when REPLACE_STRSTR
+ is 1, not only the the first time.
+
+2009-08-10 Bruno Haible <bruno@clisp.org>
+
+ Make it possible to use module 'gethostname' without module 'close'.
+ * lib/unistd.in.h (close): Evoke a link error only if
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
+ * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
+ * modules/unistd (Makefile.am): Substitute
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
+ * lib/sys_ioctl.in.h (ioctl): Evoke a link error only if
+ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
+ * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Initialize
+ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
+ * modules/sys_ioctl (Makefile.am): Substitute
+ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
+ * modules/socket (configure.ac): On native Windows, set
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS and
+ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
+ Reported by Sam Steingold <sds@gnu.org>.
+
+2009-08-10 Bruno Haible <bruno@clisp.org>
+
+ * m4/close.m4 (gl_FUNC_CLOSE): Add comment.
+ * modules/ioctl (configure.ac): Likewise.
+
+2009-08-10 Bruno Haible <bruno@clisp.org>
+
+ Avoid collision between gnulib wrapper and libintl wrapper.
+ * lib/stdio-write.c (printf): Don't define if a printf wrapper is
+ already defined in intl/printf.c.
+ (vprintf): Test REPLACE_VPRINTF_POSIX, not REPLACE_VFPRINTF_POSIX.
+ (vfprintf): Test REPLACE_VFPRINTF_POSIX, not REPLACE_VPRINTF_POSIX.
+
+2009-08-09 Bruno Haible <bruno@clisp.org>
+
+ Make <sys/select.h> really self-contained, also on Solaris 10.
+ * lib/sys_select.in.h: Include <string.h>.
+ * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Test also against
+ Solaris 10 problem.
+ * tests/test-sys_select.c (main): Add check that FD_ZERO can be used.
+ * doc/posix-headers/sys_select.texi: Mention the Solaris 10 problem.
+ Reported by Jim Meyering.
+
+2009-08-09 Bruno Haible <bruno@clisp.org>
+
+ Avoid warnings from 'aclocal' that are due to a use of macro name
+ AM_XGETTEXT_OPTION that is not defined in automake.
+ * modules/argp (configure.ac): Hide use of AM_XGETTEXT_OPTION from
+ automake.
+ * modules/error (configure.ac): Likewise.
+ * modules/propername (configure.ac): Likewise.
+ * modules/vasprintf (configure.ac): Likewise.
+ * modules/verror (configure.ac): Likewise.
+ * modules/xprintf (configure.ac): Likewise.
+ * modules/xvasprintf (configure.ac): Likewise.
+
+2009-08-08 Bruno Haible <bruno@clisp.org>
+
+ Avoid compilation error in C++ mode.
+ * lib/gettimeofday.c (rpl_gettimeofday): Cast timezone argument.
+ Reported by Sam Steingold <sds@gnu.org>.
+
+2009-08-08 Bruno Haible <bruno@clisp.org>
+
+ * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Define HOST_NAME_MAX also
+ for the various Unix platforms.
+ * doc/posix-headers/limits.texi: Update platforms list regarding
+ HOST_NAME_MAX.
+ Reported by Tom G. Christensen <tgc@jupiterrise.com>.
+
+2009-08-07 Jim Meyering <meyering@redhat.com>
+
+ selinux-at: fix typo in a comment
+ * lib/selinux-at.h: s/getfileconat/getfilecon/ in a comment.
+ Spotted by Paolo Bonzini.
+
+ selinux-at: remove redundant m4 code, add documentation
+ * modules/selinux-at (configure.ac): Remove redundant code.
+ LIB_SELINUX is already set via the dependent module, selinux-h.
+ (Include): Add quotes around selinux-at.h.
+ * lib/selinux-at.h: Add documentation.
+ Reported by Bruno Haible in
+ http://marc.info/?l=gnulib-bug&m=124958988300749
+
+2009-08-07 Bruno Haible <bruno@clisp.org>
+
+ Avoid link error on MacOS X 10.3 and 10.4.
+ * lib/argp-ba.c (argp_program_bug_address): Explicitly zero-initialize
+ on non-ELF systems.
+ * lib/argp-pv.c (argp_program_version): Likewise.
+ Reported by Simon Josefsson.
+
+2009-08-07 Simon Josefsson <simon@josefsson.org>
+
+ * tests/test-version-etc.sh: Use $EXEEXT.
+
+2009-08-06 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright: update documentation to point to maint.mk
+ * build-aux/update-copyright: Here.
+
+2009-08-06 Jim Meyering <meyering@redhat.com>
+
+ maint.mk: support update-copyright-local
+ * top/maint.mk (update-copyright-local): Define place-holder.
+ (update-copyright): Depend on $(update-copyright-local).
+
+2009-08-06 Jim Meyering <meyering@redhat.com>
+
+ selinux-at: new module
+ Initially written for coreutils, this module will soon be
+ used by findutils, too.
+ * MODULES.html.sh [Misc]: Add selinux-at.
+ * lib/selinux-at.h: New file, from coreutils.
+ * lib/selinux-at.c: Likewise.
+ * modules/selinux-at: Likewise.
+ (License): Change from LGPL to GPL, since it depends
+ on the GPL'd openat module.
+
+ doc: update README
+ * README: Remove references to cogito.
+ Remove cvs-repo-updating instructions from 2007.
+ Don't imply that CVS is better if you have limited disk space.
+
+2009-08-05 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright: support C-style comments
+ * build-aux/update-copyright: Implement and document.
+ * tests/test-update-copyright.sh: Test.
+
+2009-08-05 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright: support omitted "(C)"
+ * build-aux/update-copyright: Implement and document. Also,
+ allow variable whitespace before "(C)".
+ * tests/test-update-copyright.sh: Test.
+
+2009-08-05 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright: don't trip on non-FSF copyright statements
+ * build-aux/update-copyright: Fix so that the first correctly
+ formatted FSF copyright statement is recognized no matter what
+ appears before it. Update documentation.
+ * tests/test-update-copyright.sh: Test that.
+
+2009-08-05 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright: clean up code a little
+ * build-aux/update-copyright: Append "_re" to the name of any
+ variable holding a regular expression.
+ Replace "old" and "new" with "stmt" in variable names.
+ Do not accept 2-digit UPDATE_COPYRIGHT_YEAR, which was not
+ handled correctly.
+ Format code more consistently.
+
+2009-08-05 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright-tests: improve portability
+ * tests/test-update-copyright.sh: Use cmp if diff cannot handle
+ -u or /dev/null. Suggested by Jim Meyering and Eric Blake.
+
+2009-08-03 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright: support @copyright{} and ©
+ * build-aux/update-copyright: Implement and document.
+ * tests/test-update-copyright.sh: Test.
+
2009-08-04 Jim Meyering <meyering@redhat.com>
+ update-copyright-tests: correctly test EOL=\r\n handling
+ * tests/test-update-copyright.sh: Put \r at the end of some lines
+ for the dos-eol tests. Based on a patch by Joel E. Denny.
+
+ maint.mk: make update-copyright exclusion list more configurable
+ * top/maint.mk (update-copyright): Default to excluding COPYING,
+ but allow an override, in case someone does want to update that file.
+
+ maint.mk: don't update copyright date in COPYING
+ * top/maint.mk (update-copyright): Exclude COPYING.
+
+ maint.mk: add a copyright-updating rule
+ * top/maint.mk (update-copyright): New rule.
+ Derived from coreutils/Makefile.am.
+
update-copyright: rename some variables
* build-aux/update-copyright: Rename a few variables for clarity.
Tweak syntax. List Joel E. Denny as coauthor.
different project/version.
2009-08-02 Paolo Bonzini <bonzini@gnu.org>
- Bruno Haible <bruno@clisp.org>
+ Bruno Haible <bruno@clisp.org>
Tests for module 'pipe-filter-gi'.
* modules/pipe-filter-gi-tests: New file.
* modules/pipe-filter-gi: New file.
2009-08-02 Bruno Haible <bruno@clisp.org>
- Paolo Bonzini <bonzini@gnu.org>
+ Paolo Bonzini <bonzini@gnu.org>
Tests for module 'pipe-filter-ii'.
* modules/pipe-filter-ii-tests: New file.
* lib/gethostname.c: Include limits.h.
2009-08-02 Simon Josefsson <simon@josefsson.org>
- Bruno Haible <bruno@clisp.org>
+ Bruno Haible <bruno@clisp.org>
Ensure HOST_NAME_MAX as part of the gethostname module.
* m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows platforms,