summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-09-15 18:32:54 +0200
committerBruno Haible <bruno@clisp.org>2019-09-15 18:32:54 +0200
commit7ed78c9f539e6981b7ba48ef2962d4364cbd37fc (patch)
tree126712fdeb289f65c03df18ac629b517f0e179dc
parent01c0052307a4c87926b664d288fa5ba801eaa8ff (diff)
downloadgnulib-7ed78c9f539e6981b7ba48ef2962d4364cbd37fc.tar.gz
gnulib-7ed78c9f539e6981b7ba48ef2962d4364cbd37fc.tar.bz2
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.
-rw-r--r--ChangeLog6
-rw-r--r--lib/fcntl.in.h18
2 files changed, 18 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c7ca6b238..84d9508c1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
12019-09-15 Bruno Haible <bruno@clisp.org> 12019-09-15 Bruno Haible <bruno@clisp.org>
2 2
3 fcntl-h: Fix compilation error of creat.c on MSVC.
4 * lib/fcntl.in.h: Include <io.h> also when __need_system_fcntl_h is
5 defined.
6
72019-09-15 Bruno Haible <bruno@clisp.org>
8
3 creat: Add tests. 9 creat: Add tests.
4 * tests/test-creat.c: New file, based on tests/test-open.h. 10 * tests/test-creat.c: New file, based on tests/test-open.h.
5 * modules/creat-tests: New file. 11 * modules/creat-tests: New file.
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index 557e6c14b2..abe7993e21 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -39,6 +39,12 @@
39#endif 39#endif
40#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ 40#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
41 41
42/* Native Windows platforms declare open(), creat() in <io.h>. */
43#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
44 && (defined _WIN32 && ! defined __CYGWIN__)
45# include <io.h>
46#endif
47
42#else 48#else
43/* Normal invocation convention. */ 49/* Normal invocation convention. */
44 50
@@ -59,6 +65,12 @@
59/* The include_next requires a split double-inclusion guard. */ 65/* The include_next requires a split double-inclusion guard. */
60#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ 66#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
61 67
68/* Native Windows platforms declare open(), creat() in <io.h>. */
69#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
70 && (defined _WIN32 && ! defined __CYGWIN__)
71# include <io.h>
72#endif
73
62#ifndef _@GUARD_PREFIX@_FCNTL_H 74#ifndef _@GUARD_PREFIX@_FCNTL_H
63#define _@GUARD_PREFIX@_FCNTL_H 75#define _@GUARD_PREFIX@_FCNTL_H
64 76
@@ -66,12 +78,6 @@
66# include <unistd.h> 78# include <unistd.h>
67#endif 79#endif
68 80
69/* Native Windows platforms declare open(), creat() in <io.h>. */
70#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
71 && (defined _WIN32 && ! defined __CYGWIN__)
72# include <io.h>
73#endif
74
75 81
76/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ 82/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
77 83

Return to:

Send suggestions and report system problems to the System administrator.