dup2: work around mingw and cygwin 1.5 bug
authorEric Blake <ebb9@byu.net>
Tue, 21 Jul 2009 12:48:26 +0000 (06:48 -0600)
committerEric Blake <ebb9@byu.net>
Tue, 21 Jul 2009 13:08:06 +0000 (07:08 -0600)
commitddd625ddd088a87d5598256d09b2036c63063386
tree57eb630aa1bdf55c46b7b1008aa59619e49d67d4
parent77ef628397e3c8951051305e9601a7800c895b73
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.

Signed-off-by: Eric Blake <ebb9@byu.net>
12 files changed:
ChangeLog
doc/posix-functions/dup2.texi
lib/dup2.c
lib/fchdir.c
lib/unistd.in.h
m4/dup2.m4
m4/unistd_h.m4
modules/execute
modules/fseterr
modules/pipe
modules/posix_spawn-internal
modules/unistd