X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=lib%2Flseek.c;h=9125b9805dfb46ff4d5e02eb82fedede6aed319d;hb=92249085071a973e2c0621b0415b93d2e48bb00d;hp=fa7440d1510b403e64a20ff73a8887ad6e9cc493;hpb=d738e90e8360e101b94fca8c79147f59565f62d8;p=debian%2Fgzip
diff --git a/lib/lseek.c b/lib/lseek.c
index fa7440d..9125b98 100644
--- a/lib/lseek.c
+++ b/lib/lseek.c
@@ -1,5 +1,5 @@
/* An lseek() function that detects pipes.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 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
@@ -12,19 +12,23 @@
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 . */
+ with this program; if not, see . */
#include
/* Specification. */
#include
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Windows platforms. */
/* Get GetFileType. */
# include
/* Get _get_osfhandle. */
-# include "msvc-nothrow.h"
+# if GNULIB_MSVC_NOTHROW
+# include "msvc-nothrow.h"
+# else
+# include
+# endif
#else
# include
#endif
@@ -35,7 +39,7 @@
off_t
rpl_lseek (int fd, off_t offset, int whence)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */
HANDLE h = (HANDLE) _get_osfhandle (fd);
if (h == INVALID_HANDLE_VALUE)