summaryrefslogtreecommitdiff
path: root/lib/fcntl.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-01-15 17:35:55 +0100
committerBruno Haible <bruno@clisp.org>2012-01-15 17:50:27 +0100
commita9097796ff31942ab21b990723569493615f0fa6 (patch)
tree71ecb4aa36eca19215761e70473038656cc8cfa0 /lib/fcntl.in.h
parentf8b71202829f27d6fdb306cdecf28608a726b0d6 (diff)
downloadgnulib-a9097796ff31942ab21b990723569493615f0fa6.tar.gz
Improve support for MSVC 9.
* lib/unistd.in.h: Include <io.h> when needed to avoid redefinition clashes on MSVC. * lib/fcntl.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/sys_stat.in.h: Likewise.
Diffstat (limited to 'lib/fcntl.in.h')
-rw-r--r--lib/fcntl.in.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index 84ae3eeaa1..344bbe4d3d 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -62,6 +62,12 @@
# include <unistd.h>
#endif
+/* Native Windows platforms declare open(), creat() in <io.h>. */
+#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */