X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fdup3.c;h=c14f33dfe2a546b0bc23453e085a544f7027befa;hb=35ae1e147a8fe5c9003320f4a76edf8fb4dbf096;hp=85412c785f800165099dafdde94ae11c0286c5ce;hpb=e4ee142063a2f63f483d32b4ab87387db9130804;p=gnulib.git
diff --git a/lib/dup3.c b/lib/dup3.c
index 85412c785..c14f33dfe 100644
--- a/lib/dup3.c
+++ b/lib/dup3.c
@@ -1,5 +1,5 @@
/* Copy a file descriptor, applying specific flags.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see . */
#include
@@ -26,27 +25,6 @@
#include "binary-io.h"
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
-
-# include
-
-/* Get declarations of the Win32 API functions. */
-# define WIN32_LEAN_AND_MEAN
-# include
-
-/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */
-# define OPEN_MAX_MAX 0x10000
-
-#else
-/* Unix API. */
-
-# ifndef O_CLOEXEC
-# define O_CLOEXEC 0
-# endif
-
-#endif
-
int
dup3 (int oldfd, int newfd, int flags)
{
@@ -63,10 +41,10 @@ dup3 (int oldfd, int newfd, int flags)
if (!(result < 0 && errno == ENOSYS))
{
have_dup3_really = 1;
-#if REPLACE_FCHDIR
+# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (oldfd, newfd);
-#endif
+# endif
return result;
}
have_dup3_really = -1;