Update gnulib to current upstream master
[deliverable/binutils-gdb.git] / gdb / gnulib / import / fcntl.c
index fd17e962f8bb9671c5e18ac60696d3583ec0edba..be6583565b42dd10c10ed130254b09f207ef2f9b 100644 (file)
@@ -1,6 +1,6 @@
 /* Provide file descriptor control.
 
-   Copyright (C) 2009-2016 Free Software Foundation, Inc.
+   Copyright (C) 2009-2018 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
@@ -13,7 +13,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, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>.  */
 
 #endif
 #undef fcntl
 
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
 /* Get declarations of the native Windows API functions.  */
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 
 /* Get _get_osfhandle.  */
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+#  include "msvc-nothrow.h"
+# else
+#  include <io.h>
+# endif
 
 /* Upper bound on getdtablesize().  See lib/getdtablesize.c.  */
 # define OPEN_MAX_MAX 0x10000
@@ -372,7 +376,7 @@ rpl_fcntl (int fd, int action, /* arg */...)
 #if !HAVE_FCNTL
     case F_GETFD:
       {
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
         HANDLE handle = (HANDLE) _get_osfhandle (fd);
         DWORD flags;
         if (handle == INVALID_HANDLE_VALUE
This page took 0.025109 seconds and 4 git commands to generate.