mkdir: Tweak for MSVC 9.
authorBruno Haible <bruno@clisp.org>
Fri, 23 Sep 2011 10:46:14 +0000 (12:46 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 23 Sep 2011 10:46:14 +0000 (12:46 +0200)
* lib/sys_stat.in.h: Update comments.
* doc/posix-functions/mkdir.texi: Mention problem on MSVC 9.

ChangeLog
doc/posix-functions/mkdir.texi
lib/sys_stat.in.h

index 3234bb5..5ff2774 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-09-23  Bruno Haible  <bruno@clisp.org>
 
+       mkdir: Tweak for MSVC 9.
+       * lib/sys_stat.in.h: Update comments.
+       * doc/posix-functions/mkdir.texi: Mention problem on MSVC 9.
+
        Tests for module 'chdir'.
        * modules/chdir-tests: New file.
        * tests/test-chdir.c: New file.
index f961257..6fdc35a 100644 (file)
@@ -9,6 +9,10 @@ Gnulib module: mkdir
 Portability problems fixed by Gnulib:
 @itemize
 @item
+This function is declared in different header files (namely, @code{<io.h>} or
+@code{<direct.h>}) on some platforms:
+mingw, MSVC 9.
+@item
 When the argument ends in a slash, the function call fails on some platforms.
 @item
 This function mistakenly succeeds on @samp{mkdir("d/./",mode)} on
index bc39a17..cc59c75 100644 (file)
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
 /* Before doing "#define mkdir rpl_mkdir" below, we need to include all
-   headers that may declare mkdir().  */
+   headers that may declare mkdir().  Native Windows platforms declare mkdir
+   in <io.h> and/or <direct.h>, not in <unistd.h>.  */
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 # include <io.h>     /* mingw32, mingw64 */
-# include <direct.h> /* mingw64 */
+# include <direct.h> /* mingw64, MSVC 9 */
 #endif
 
 #ifndef S_IFIFO