dup2: fix more mingw problems
authorEric Blake <ebb9@byu.net>
Tue, 21 Jul 2009 15:00:57 +0000 (09:00 -0600)
committerEric Blake <ebb9@byu.net>
Tue, 21 Jul 2009 19:12:25 +0000 (13:12 -0600)
commit80cb44fa0b094ad965f7bd88ad7e46e83df418d5
tree85908ddf14964ae429baba6243f8e90949628217
parent7c385af22c99df5eceda1e82d7aa595e6d5cb796
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>
ChangeLog
doc/posix-functions/dup2.texi
lib/dup2.c
lib/fchdir.c
lib/unistd.in.h