X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fdup3.c;h=7525142d7feda21880b270ec39fe0b5e081ce5d4;hb=620ece7758e453efebf7f52a1ab9fc1c49a5020c;hp=d44aa92b01ab9585cc1742bd50ea40c480034c07;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/lib/dup3.c b/lib/dup3.c index d44aa92b0..7525142d7 100644 --- a/lib/dup3.c +++ b/lib/dup3.c @@ -1,5 +1,5 @@ /* Copy a file descriptor, applying specific flags. - Copyright (C) 2009-2010 Free Software Foundation, Inc. + Copyright (C) 2009-2011 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 @@ -26,27 +26,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 +42,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;