Mercurial > hg > octave-nkf > gnulib-hg
diff lib/fcntl.in.h @ 16284:ab517781f037
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.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 15 Jan 2012 17:35:55 +0100 (2012-01-15) |
parents | 18a38c9615f0 |
children | 6a9ea5d7b466 |
line wrap: on
line diff
--- 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. */