1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-09-11 11:50:52 +03:00

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.

Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
Eric Blake
2009-07-21 09:00:57 -06:00
parent 7c385af22c
commit 80cb44fa0b
5 changed files with 57 additions and 16 deletions

View File

@@ -12,6 +12,10 @@ Portability problems fixed by Gnulib:
This function always returns 0 for success on some platforms:
mingw.
@item
This function can hang when duplicating an fd to itself on some platforms:
mingw.
@item
This function returns 0 for dup2 (1, 1) on some platforms:
Cygwin 1.5.x.