From c31e51d43f77f247cc3e200e3255f745398eee10 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 23 Sep 2011 12:46:14 +0200 Subject: [PATCH] mkdir: Tweak for MSVC 9. * lib/sys_stat.in.h: Update comments. * doc/posix-functions/mkdir.texi: Mention problem on MSVC 9. --- ChangeLog | 4 ++++ doc/posix-functions/mkdir.texi | 4 ++++ lib/sys_stat.in.h | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3234bb5ed..5ff27746e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-09-23 Bruno Haible + 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. diff --git a/doc/posix-functions/mkdir.texi b/doc/posix-functions/mkdir.texi index f96125798..6fdc35a07 100644 --- a/doc/posix-functions/mkdir.texi +++ b/doc/posix-functions/mkdir.texi @@ -9,6 +9,10 @@ Gnulib module: mkdir Portability problems fixed by Gnulib: @itemize @item +This function is declared in different header files (namely, @code{} or +@code{}) 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 diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index bc39a1727..cc59c75ea 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -55,10 +55,11 @@ /* 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 and/or , not in . */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include /* mingw32, mingw64 */ -# include /* mingw64 */ +# include /* mingw64, MSVC 9 */ #endif #ifndef S_IFIFO -- 2.11.0