summaryrefslogtreecommitdiffstats
path: root/libgnu/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgnu/read.c')
-rw-r--r--libgnu/read.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/libgnu/read.c b/libgnu/read.c
index 08108f7f..17d9d745 100644
--- a/libgnu/read.c
+++ b/libgnu/read.c
@@ -1,5 +1,5 @@
/* POSIX compatible read() function.
- Copyright (C) 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
@@ -13,14 +13,14 @@
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/>. */
#include <config.h>
/* Specification. */
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <errno.h>
# include <io.h>
@@ -28,8 +28,14 @@
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
-# include "msvc-inval.h"
-# include "msvc-nothrow.h"
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+# endif
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include <io.h>
+# endif
# undef read