# HG changeset patch # User Bruno Haible # Date 1316772520 -7200 # Node ID b26e6ff6bd06ae84faa1858b055cb629080faf32 # Parent fed0e9994e2988b4a90a080aaa9f2a355a9da668 rmdir: Support for mingw, MSVC 9. * lib/unistd.in.h: Include and also for rmdir. * doc/posix-functions/getcwd.texi: Mention problem on native Windows. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-09-23 Bruno Haible + rmdir: Support for mingw, MSVC 9. + * lib/unistd.in.h: Include and also for rmdir. + * doc/posix-functions/getcwd.texi: Mention problem on native Windows. + getcwd: Tweak for MSVC 9. * lib/unistd.in.h: Update comments. * doc/posix-functions/getcwd.texi: Mention problem on MSVC 9. diff --git a/doc/posix-functions/rmdir.texi b/doc/posix-functions/rmdir.texi --- a/doc/posix-functions/rmdir.texi +++ b/doc/posix-functions/rmdir.texi @@ -9,6 +9,10 @@ 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 This function mistakenly removes a directory with @code{rmdir("dir/./")} on some platforms: Cygwin 1.5.x. diff --git a/lib/unistd.in.h b/lib/unistd.in.h --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -83,9 +83,9 @@ # include #endif -/* Native Windows platforms declare getcwd in +/* Native Windows platforms declare getcwd, rmdir in and/or , not in . */ -#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ +#if ((@GNULIB_GETCWD@ || @GNULIB_RMDIR@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # include /* mingw32, mingw64 */ # include /* mingw64, MSVC 9 */