diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-08-06 16:30:15 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-08-06 16:30:15 +0200 |
commit | 92a5cd11f9b33f427c495dca22d9aac1cf7b1f3d (patch) | |
tree | b3bb68a392114cd82b5f174061b0d6ab77cfa1f2 /gl/unistd.in.h | |
parent | a532faf3bd6d95bf41ba75733a72b504090667af (diff) | |
download | gnutls-92a5cd11f9b33f427c495dca22d9aac1cf7b1f3d.tar.gz |
Update gnulib files.
Diffstat (limited to 'gl/unistd.in.h')
-rw-r--r-- | gl/unistd.in.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gl/unistd.in.h b/gl/unistd.in.h index fa8d84a3d9..09e90392df 100644 --- a/gl/unistd.in.h +++ b/gl/unistd.in.h @@ -150,10 +150,13 @@ extern int close (int); #if @GNULIB_DUP2@ -# if !@HAVE_DUP2@ +# if @REPLACE_DUP2@ +# define dup2 rpl_dup2 +# endif +# if !@HAVE_DUP2@ || @REPLACE_DUP2@ /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if NEWFD = OLDFD, otherwise close NEWFD first if it is open. - Return 0 if successful, otherwise -1 and errno set. + Return newfd if successful, otherwise -1 and errno set. See the POSIX:2001 specification <http://www.opengroup.org/susv3xsh/dup2.html>. */ extern int dup2 (int oldfd, int newfd); @@ -214,7 +217,11 @@ extern int fchdir (int /*fd*/); # define dup rpl_dup extern int dup (int); -# define dup2 rpl_dup2 + +# if @REPLACE_DUP2@ +# undef dup2 +# endif +# define dup2 rpl_dup2_fchdir extern int dup2 (int, int); # endif |