C++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope
[gnulib.git] / ChangeLog
index 3919830..cca4ce9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,219 @@
+2009-07-22  Peter Simons  <simons@cryp.to>
+
+       C++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope
+       * lib/md2.h [__cplusplus]: Wrap declarations in extern "C" scope.
+       * lib/md4.h: Likewise.
+       * lib/md5.h: Likewise.
+       * lib/sha1.h: Likewise.
+       * lib/sha256.h: Likewise.
+       * lib/sha512.h: Likewise.
+
+       tests-sha1: don't assign literal string to 'char *' variable
+       * tests/test-sha1.c (main): Declare locals with "const" to match
+       attributes of the right hand side.
+
+2009-07-21  Eric Blake  <ebb9@byu.net>
+
+       dup2: fix more mingw problems
+       * lib/dup2.c (rpl_dup2) [_WIN32]: Avoid hanging when duplicating
+       fd to itself.
+       * doc/posix-functions/dup2.texi (dup2): Document the bug.
+       * lib/unistd.in.h (dup2) [REPLACE_FCHDIR]: Avoid name collision.
+       * lib/fchdir.c (dup2): Manage preprocessor macros correctly.
+       (rpl_dup2_fchdir): Rename from rpl_dup2, and let dup2 module take
+       care of mingw bugs.
+
+2009-07-21  Jim Meyering  <meyering@redhat.com>
+
+       vc-list-files: avoid failure when /bin/sh is dash
+       * build-aux/vc-list-files: Avoid a shell portability problem with dash.
+       On some Debian based systems, /bin/sh is a symlink to dash, and running
+       this command would omit the "/" following each 'tests' prefix:
+         dash -x build-aux/vc-list-files -C . tests
+       That is because bash and dash work differently:
+         $ for i in bash dash; do $i -c 'a=odd; a=ok b=$a; echo '$i' $b'; done
+         bash ok
+         dash odd
+
+2009-07-21  Eric Blake  <ebb9@byu.net>
+
+       dup2-tests: test previous patch
+       * modules/dup2-tests: New file.
+       * tests/test-dup2.c: Likewise.
+       * tests/test-open.c (main): Avoid unspecified behavior.
+       * tests/test-pipe.c (child_main): Use dup2 semantics to simplify
+       test.
+
+       dup2: work around mingw and cygwin 1.5 bug
+       * m4/dup2.m4 (gl_FUNC_DUP2): Detect mingw bug.
+       * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
+       * modules/unistd (Makefile.am): Substitute it.
+       * lib/unistd.in.h (dup2): Declare the replacement.
+       * lib/dup2.c (dup2) [REPLACE_DUP2]: Implement it.
+       * doc/posix-functions/dup2.texi (dup2): Document the bugs.
+       * lib/fchdir.c (rpl_dup2): Don't collide with mingw replacement.
+       * modules/execute (Depends-on): Add dup2.
+       * modules/fseterr (Depends-on): Likewise.
+       * modules/pipe (Depends-on): Likewise.
+       * modules/posix_spawn-internal (Depends-on): Likewise.
+
+2009-07-21  Bruno Haible  <bruno@clisp.org>
+
+       * modules/.gitattributes: New file.
+
+2009-07-20  Bruno Haible  <bruno@clisp.org>
+
+       * tests/test-pipe.c (BACKUP_STDERR_FILENO): New macro.
+       (main): Use it.
+
+2009-07-20  Eric Blake  <ebb9@byu.net>
+
+       test-pipe: make a bit more robust.
+       * tests/test-pipe.c (myerr): Allow error messages regardless of
+       what we do to stderr.
+       (test_pipe): Rearrange to avoid deadlock.
+       (child_main): Try a larger read, to ensure we avoided deadlock.
+       * lib/pipe.c (create_pipe) [_WIN32]: Fix comment.
+       * lib/pipe.h (create_pipe_bidi): Document potential for deadlock
+       if misused.
+
+2009-07-19  Jim Meyering  <meyering@redhat.com>
+
+       fts: avoid false-positive cycle-detection
+       * lib/fts.c (fts_read): Reinitialize cycle-detection data structures
+       for each new command line argument.
+
+2009-07-19  Bruno Haible  <bruno@clisp.org>
+
+       Fix build error on mingw with the modules sys_select and unistd.
+       * modules/acl-tests (Depends-on): Add 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-07-19  Bruno Haible  <bruno@clisp.org>
+
+       Unify conditionals.
+       * lib/pipe.h: Detect native Win32 by looking at _WIN32 and __WIN32__
+       macros, not at the compiler macros.
+       * lib/pipe.c: Likewise.
+       * lib/execute.c: Likewise.
+       * lib/spawni.c: Likewise.
+
+2009-07-19  Bruno Haible  <bruno@clisp.org>
+
+       Fix handling of closed stdin/stdout/stderr on mingw.
+       * lib/w32spawn.h: Include unistd.h.
+       (dup_noinherit): Return -1 if the old handle is invalid. Allocate new
+       file descriptor with O_NOINHERIT flag.
+       (fd_safer_noinherit): New function, based on fd-safer.c.
+       (dup_safer_noinherit): New function, based on dup-safer.c.
+       (undup_safer_noinherit): New function.
+       * lib/execute.c (execute) [WIN32]: Use dup_safer_noinherit instead of
+       dup_noinherit. Use undup_safer_noinherit instead of dup2 and close.
+       * lib/pipe.c (create_pipe) [WIN32]: Likewise. Use fd_safer_noinherit
+       instead of fd_safer.
+       * tests/test-pipe.c: Include <windows.h>.
+       (child_main) [WIN32]: Test the handle of STDERR_FILENO, not its close() result.
+
+       * tests/test-pipe.c (child_main, parent_main): New functions, extracted
+       from main.
+       (test_pipe): Pass an extra argument for disambiguation.
+       (main): Invoke parent_main or child_main.
+
+       * tests/test-pipe.c (test_pipe): Pass slave_process = true argument
+       consistently.
+
+2009-07-18  Eric Blake  <ebb9@byu.net>
+
+       test-pipe: fix mingw build
+       * tests/test-pipe.c (main): Avoid fcntl on mingw.
+
+2009-07-18  Bruno Haible  <bruno@clisp.org>
+
+       * modules/pipe-tests (Makefile.am): Fix typo.
+
+2009-07-18  Eric Blake  <ebb9@byu.net>
+
+       error: fix mingw build
+       * lib/error.c (error, error_at_line): Avoid fcntl on mingw.
+       Reported by Bruno Haible.
+
+       error: avoid undefined use of stdout
+       * lib/error.c (error, error_at_line): Check that fd 1 is open
+       before flushing stdout.  Avoids a crash on cygwin when libsigsegv
+       is handling faults and the close_stdout module wants to report the
+       detection of closed stdout as an error.
+
+2009-07-17  Eric Blake  <ebb9@byu.net>
+
+       pipe: be robust in face of closed fds
+       * lib/pipe.c (create_pipe): Closed standard descriptors in parent
+       should cause child to misbehave.
+       * modules/pipe-tests: New module.
+       * tests/test-pipe.c: New file.
+       * tests/test-pipe.sh: New file.
+       Reported by Akim Demaille.
+
+2009-07-14  Bruno Haible  <bruno@clisp.org>
+
+       * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Guess it works on glibc systems.
+       Reported by anonymous kc.
+
+2009-07-07  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk: don't look for translatable strings in *.m4 or *.mk
+       * top/maint.mk (sc_po_check): Skip *.m4 and *.mk files,
+       when searching for translatable strings.
+
+2009-07-05  Jim Meyering  <meyering@redhat.com>
+
+       remove superfluous parentheses in STREQ definition
+       * tests/test-argv-iter.c (STREQ): Remove redundant parentheses.
+       * lib/getugroups.c (STREQ): Likewise.
+       * lib/fnmatch.c (STREQ): Likewise.
+       Spotted by Bruno Haible.
+
+2009-07-04  Jim Meyering  <meyering@redhat.com>
+
+       argv-iter: new module
+       * MODULES.html.sh: Add argv-iter.
+       * lib/argv-iter.c, lib/argv-iter.h: New files.
+       * modules/argv-iter: New file.
+       * modules/argv-iter-tests: New file.
+       * tests/test-argv-iter.c: Test it.
+
+2009-07-04  Bruno Haible  <bruno@clisp.org>
+
+       Fix assertion.
+       * lib/git-merge-changelog.c (compute_mapping): In the case where file1
+       contains more exact copies of a given entry than file2, leave the extra
+       copies unpaired rather than aborting.
+       Reported by Eric Blake.
+
+2009-07-02  Bruno Haible  <bruno@clisp.org>
+
+       Speedup git-merge-changelog for git cherry-pick.
+       * lib/git-merge-changelog.c (struct entries_mapping): New type.
+       (entries_mapping_get): New function, extracted from compute_mapping.
+       (entries_mapping_reverse_get): New function.
+       (compute_mapping): Add a 'full' argument. Return the result in a
+       'struct entries_mapping'.
+       (main): Update. Access the mappings through entries_mapping_get.
+       Reported by Eric Blake.
+
+2009-07-02  Bruno Haible  <bruno@clisp.org>
+
+       * lib/git-merge-changelog.c (compute_mapping): Fix determination of
+       best_i.
+
 2009-07-02  Bruno Haible  <bruno@clisp.org>
 
        Speed up approximate search for matching ChangeLog entries.