mkdir: Make it work on mingw64.
authorBruno Haible <bruno@clisp.org>
Sat, 10 Apr 2010 22:25:21 +0000 (00:25 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 10 Apr 2010 22:25:21 +0000 (00:25 +0200)
ChangeLog
lib/sys_stat.in.h

index dd0264b..16bf6fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-04-10  Bruno Haible  <bruno@clisp.org>
 
+       mkdir: Make it work on mingw64.
+       * lib/sys_stat.in.h: Include <direct.h> together with <io.h>.
+       Reported by Roman Donchenko (Роман Донченко) <dxdragon@yandex.ru>.
+
+2010-04-10  Bruno Haible  <bruno@clisp.org>
+
        Don't override improved macro from newer autoconf.
        * m4/gnulib-common.m4 (AC_C_RESTRICT): Don't define for
        autoconf >= 2.62.
index 82792e4..3496a19 100644 (file)
@@ -56,7 +56,8 @@
 /* Before doing "#define mkdir rpl_mkdir" below, we need to include all
    headers that may declare mkdir().  */
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-# include <io.h>
+# include <io.h>     /* mingw32, mingw64 */
+# include <direct.h> /* mingw64 */
 #endif
 
 #ifndef S_IFMT
@@ -455,7 +456,8 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
 #else
 /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
    Additionally, it declares _mkdir (and depending on compile flags, an
-   alias mkdir), only in the nonstandard <io.h>, which is included above.  */
+   alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
+   which are included above.  */
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
 static inline int