]> Savannah Git Hosting - gnulib.git/commitdiff
fcntl-h: Fix compilation error of creat.c on MSVC.
authorBruno Haible <bruno@clisp.org>
Sun, 15 Sep 2019 16:32:54 +0000 (18:32 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 15 Sep 2019 16:32:54 +0000 (18:32 +0200)
* lib/fcntl.in.h: Include <io.h> also when __need_system_fcntl_h is
defined.

ChangeLog
lib/fcntl.in.h

index 1c7ca6b238905d0dd9a6854e01d03285077de0e5..84d9508c1c0d90bc30baf0834980b5d7fab2a226 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-09-15  Bruno Haible  <bruno@clisp.org>
+
+       fcntl-h: Fix compilation error of creat.c on MSVC.
+       * lib/fcntl.in.h: Include <io.h> also when __need_system_fcntl_h is
+       defined.
+
 2019-09-15  Bruno Haible  <bruno@clisp.org>
 
        creat: Add tests.
index 557e6c14b2c8c1f5d1f7cfd2bda156f18372dc34..abe7993e21ce88935742ff2607e4ba800256f54f 100644 (file)
 #endif
 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
 
+/* Native Windows platforms declare open(), creat() in <io.h>.  */
+#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
+    && (defined _WIN32 && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
 #else
 /* Normal invocation convention.  */
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
 
+/* Native Windows platforms declare open(), creat() in <io.h>.  */
+#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
+    && (defined _WIN32 && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
 #ifndef _@GUARD_PREFIX@_FCNTL_H
 #define _@GUARD_PREFIX@_FCNTL_H
 
 # include <unistd.h>
 #endif
 
-/* Native Windows platforms declare open(), creat() in <io.h>.  */
-#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
-    && (defined _WIN32 && ! defined __CYGWIN__)
-# include <io.h>
-#endif
-
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */