dup: Simplify autoconf test.
[gnulib.git] / ChangeLog
index a81731e..3aca033 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,111 @@
+2011-09-24  Bruno Haible  <bruno@clisp.org>
+
+       dup: Simplify autoconf test.
+       * m4/dup.m4 (gl_FUNC_DUP): Don't run a test program. Instead, just rely
+       on gl_MSVC_INVAL's result.
+
+2011-09-24  Bruno Haible  <bruno@clisp.org>
+
+       Tests for function fwrite().
+       * modules/fwrite-tests: New file.
+       * tests/test-fwrite.c: New file.
+       * modules/stdio-tests (Depends-on): Add fwrite-tests.
+
+       Tests for function fread().
+       * modules/fread-tests: New file.
+       * tests/test-fread.c: New file.
+       * modules/stdio-tests (Depends-on): Add fread-tests.
+
+       Activate fputc tests.
+       * modules/stdio-tests (Depends-on): Add fputc-tests.
+
+       Enhance fgetc, fputc tests.
+       * tests/test-fgetc.c (main): Also test the stream's error indicator.
+       * tests/test-fputc.c (main): Likewise.
+
+2011-09-24  Bruno Haible  <bruno@clisp.org>
+
+       write: Support for MSVC 9.
+       * lib/unistd.in.h (write): Replace also when GNULIB_UNISTD_H_NONBLOCKING
+       is not 1.
+       * lib/write.c (write_nothrow): New function.
+       (rpl_write): Define also when GNULIB_NONBLOCKING or GNULIB_SIGPIPE is
+       not 1. Use write_nothrow.
+       * m4/write.m4 (gl_FUNC_WRITE): Replace read if the platform has an
+       invalid parameter handler.
+       (gl_PREREQ_WRITE): New macro.
+       * modules/write (Depends-on): Add msvc-inval.
+       (configure.ac): Invoke gl_PREREQ_WRITE.
+       * doc/posix-functions/write.texi: Mention the problem on MSVC.
+
+2011-09-24  Bruno Haible  <bruno@clisp.org>
+
+       read: Fix last commit.
+       * lib/read.c (read_nothrow): Change return type to 'ssize_t'.
+
+2011-09-24  Bruno Haible  <bruno@clisp.org>
+
+       dup2: Fix last commit.
+       * lib/dup2.c: Restore comments. Treat Cygwin like Unix.
+       (rpl_dup2): Disable fcntl workaround on native Windows.
+
+       sigprocmask: Make code safer.
+       * lib/sigprocmask.c: Move '#include "msvc-inval.h"' before the code
+       section that changes macro definitions for this compilation unit.
+
+2011-09-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       dup2: clarify by coalescing Windows-specific material
+       * lib/dup2.c: Move '#include "msvc-inval.h"' and '#include
+       "msvc-nothrow.h"' to the Windows-specific section, so that the
+       Emacs source need not contain these include files.
+       (ms_windows_dup2): Rename from dup2_nothrow, and move all the
+       Windows-specific fixes into this function rather than just the
+       nothrow fix, as this shortens and clarifies the code.  Always
+       define as a function, as that's a bit cleaner than having it be
+       sometimes a function and sometimes a macro.
+       (rpl_dup2): Move the Windows-specific stuff out of here and into
+       ms_windows_dup2.  Don't protect the Haiku-related fix with
+       "#if !defined __linux__", as the same code also works around
+       a Linux kernel bug, and it doesn't add any system calls on any
+       platform.  Add comment about FreeBSD 6.1.
+
+       sigprocmask: move #include directive
+       * lib/sigprocmask.c: Move '#include "msvc-inval.h"' to the
+       Windows-specific section, so that the Emacs source need not
+       contain msvc-inval.h.
+
+2011-09-23  Bruno Haible  <bruno@clisp.org>
+
+       read: Support for MSVC 9.
+       * lib/unistd.in.h (read): Replace also when GNULIB_UNISTD_H_NONBLOCKING
+       is not 1.
+       * lib/read.c (read_nothrow): New function.
+       (rpl_read): Define also when GNULIB_NONBLOCKING is not 1. Use
+       read_nothrow.
+       * m4/read.m4 (gl_FUNC_READ): Replace read if the platform has an
+       invalid parameter handler.
+       (gl_PREREQ_READ): New macro.
+       * modules/read (Depends-on): Add msvc-inval.
+       (configure.ac): Invoke gl_PREREQ_READ.
+       * doc/posix-functions/read.texi: Mention the problem on MSVC.
+
+2011-09-23  Bruno Haible  <bruno@clisp.org>
+
+       close: Support for MSVC 9.
+       * lib/close.c: Include <errno.h>, msvc-inval.h.
+       (close_nothrow): New function.
+       (rpl_close): Use it.
+       * m4/close.m4 (gl_FUNC_CLOSE): Replace close if the platform has an
+       invalid parameter handler.
+       * modules/close (Depends-on): Add msvc-inval.
+       * modules/dup2-tests (Depends-on): Add close.
+       * modules/dup3-tests (Depends-on): Likewise.
+       * modules/fcntl-tests (Depends-on): Likewise.
+       * modules/spawn-pipe-tests (Depends-on): Likewise.
+       * modules/unistd-safer-tests (Depends-on): Likewise.
+       * doc/posix-functions/close.texi: Mention the problem on MSVC.
+
 2011-09-23  Bruno Haible  <bruno@clisp.org>
 
        New module 'dup'.