From 07fb52f87fecb1e12eece031a9dec184cacdde12 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 23 Sep 2011 12:08:40 +0200 Subject: [PATCH] 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. --- ChangeLog | 4 ++++ doc/posix-functions/rmdir.texi | 4 ++++ lib/unistd.in.h | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82334ddb1..0afd8339c 100644 --- 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 index f2031130a..4676d18b5 100644 --- a/doc/posix-functions/rmdir.texi +++ b/doc/posix-functions/rmdir.texi @@ -9,6 +9,10 @@ Gnulib module: rmdir 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 index 18e850fb4..6b7b377ea 100644 --- 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 */ -- 2.11.0