popen-safer: prevent popen from clobbering std descriptors
[gnulib.git] / ChangeLog
index 1cb1865..2161c2b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,305 @@
+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
 
 2009-08-12  Bruno Haible  <bruno@clisp.org>
 
-       * m4/getopt.m4: Reorder macros.
-       (gl_GETOPT): Inline gl_GETOPT_SUBSTITUTE.
-       (gl_GETOPT_SUBSTITUTE): Remove macro.
-
-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.
        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,