]> Savannah Git Hosting - gnulib.git/commitdiff
rmdir: Support for mingw, MSVC 9.
authorBruno Haible <bruno@clisp.org>
Fri, 23 Sep 2011 10:08:40 +0000 (12:08 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 23 Sep 2011 10:08:40 +0000 (12:08 +0200)
* lib/unistd.in.h: Include <io.h> and <direct.h> also for rmdir.
* doc/posix-functions/getcwd.texi: Mention problem on native Windows.

ChangeLog
doc/posix-functions/rmdir.texi
lib/unistd.in.h

index 82334ddb1cd2f95d8ba2f1336d33e705489c8e84..0afd8339c463868de861561b25b9aa04c00940b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-09-23  Bruno Haible  <bruno@clisp.org>
 
+       rmdir: Support for mingw, MSVC 9.
+       * lib/unistd.in.h: Include <io.h> and <direct.h> 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.
index f2031130a23a3408d569654be0ea0bf3e19ae47c..4676d18b5bb8def3260603f2faa50d05399cb993 100644 (file)
@@ -9,6 +9,10 @@ Gnulib module: rmdir
 Portability problems fixed by Gnulib:
 @itemize
 @item
+This function is declared in different header files (namely, @code{<io.h>} or
+@code{<direct.h>}) on some platforms:
+mingw, MSVC 9.
+@item
 This function mistakenly removes a directory with
 @code{rmdir("dir/./")} on some platforms:
 Cygwin 1.5.x.
index 18e850fb4081b417c006f4990452392399ca1fff..6b7b377eaf00a7a00e8c25177b3c7536811879a4 100644 (file)
@@ -83,9 +83,9 @@
 # include <stdlib.h>
 #endif
 
-/* Native Windows platforms declare getcwd in
+/* Native Windows platforms declare getcwd, rmdir in
    <io.h> and/or <direct.h>, not in <unistd.h>.  */
-#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
+#if ((@GNULIB_GETCWD@ || @GNULIB_RMDIR@ || defined GNULIB_POSIXCHECK) \
      && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
 # include <io.h>     /* mingw32, mingw64 */
 # include <direct.h> /* mingw64, MSVC 9 */