/* Test that dup_safer leaves standard fds alone.
- 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
/* Get declarations of the Win32 API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
#endif
#if !O_BINARY
# define setmode(f,m) zero ()
static int zero (void) { return 0; }
#endif
-#ifndef O_CLOEXEC
-# define O_CLOEXEC 0
-#endif
/* This test intentionally closes stderr. So, we arrange to have fd 10
(outside the range of interesting fd's during the test) set up to