* lib/dup2.c (ms_windows_dup2): Omit 'inline' as it's not clear
that it's a performance win.
(rpl_dup2): Change "if !((defined _WIN32 || defined __WIN32__) &&
! defined __CYGWIN__)" to "ifdef F_GETFL".
+2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ dup2: minor simplifications
+ * lib/dup2.c (ms_windows_dup2): Omit 'inline' as it's not clear
+ that it's a performance win.
+ (rpl_dup2): Change "if !((defined _WIN32 || defined __WIN32__) &&
+ ! defined __CYGWIN__)" to "ifdef F_GETFL".
+
2011-09-24 Jim Meyering <meyering@redhat.com>
test-futimens: avoid a warning from gcc -Wshadow
/* Get _get_osfhandle. */
# include "msvc-nothrow.h"
-static inline int
+static int
ms_windows_dup2 (int fd, int desired_fd)
{
int result;
{
int result;
-# if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# ifdef F_GETFL
/* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF.
On Cygwin 1.5.x, dup2 (1, 1) returns 0.
On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */