changeset 32896:937978347202

mkdir: Make it work on mingw64.
author Bruno Haible <bruno@clisp.org>
date Sun, 11 Apr 2010 00:25:21 +0200
parents b12561110214
children 28c0b0cc9014
files ChangeLog lib/sys_stat.in.h
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Apr 10 22:40:52 2010 +0200
+++ b/ChangeLog	Sun Apr 11 00:25:21 2010 +0200
@@ -1,3 +1,9 @@
+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.
--- a/lib/sys_stat.in.h	Sat Apr 10 22:40:52 2010 +0200
+++ b/lib/sys_stat.in.h	Sun Apr 11 00:25:21 2010 +0200
@@ -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 @@
 #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