On MSVC, tempname.c gets a compilation error because it uses O_ACCMODE. This macro is defined in <fcntl.h> - but only if the module 'fcntl-h' is in use.
2011-09-13 Bruno Haible <br...@clisp.org> tempname: Support for MSVC. * doc/posix-headers/fcntl.texi: Document the problem with O_ACCMODE on MSVC. * modules/tempname (Depends-on): Add fcntl-h. --- doc/posix-headers/fcntl.texi.orig Wed Sep 14 02:50:52 2011 +++ doc/posix-headers/fcntl.texi Wed Sep 14 02:28:51 2011 @@ -27,6 +27,10 @@ Gnulib defines these macros to @samp{O_RDONLY}, which is typically 0. @item +@samp{O_ACCMODE} is not defined on some platforms: +MSVC 9. + +@item The @samp{O_ACCMODE} mask mistakenly omits @samp{O_SEARCH} and @samp{O_EXEC} on some platforms: Cygwin. --- modules/tempname.orig Wed Sep 14 02:50:52 2011 +++ modules/tempname Wed Sep 14 02:29:35 2011 @@ -8,6 +8,7 @@ Depends-on: extensions +fcntl-h gettimeofday lstat stdint -- In memoriam Ketevan of Mukhrani <http://en.wikipedia.org/wiki/Ketevan_of_Mukhrani>