[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rmdir on mingw, MSVC
From: |
Bruno Haible |
Subject: |
rmdir on mingw, MSVC |
Date: |
Fri, 23 Sep 2011 12:10:39 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
On mingw and MSVC, the rmdir() function is declared in <io.h> and/or <direct.h>,
not <unistd.h>.
2011-09-23 Bruno Haible <address@hidden>
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.
--- doc/posix-functions/rmdir.texi.orig Fri Sep 23 12:08:21 2011
+++ doc/posix-functions/rmdir.texi Fri Sep 23 12:03:01 2011
@@ -9,6 +9,10 @@
Portability problems fixed by Gnulib:
@itemize
@item
+This function is declared in different header files (namely, @code{<io.h>} or
address@hidden<direct.h>}) on some platforms:
+mingw, MSVC 9.
address@hidden
This function mistakenly removes a directory with
@code{rmdir("dir/./")} on some platforms:
Cygwin 1.5.x.
--- lib/unistd.in.h.orig Fri Sep 23 12:08:21 2011
+++ lib/unistd.in.h Fri Sep 23 12:06:41 2011
@@ -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 */
--
In memoriam Ghazala Khan <http://en.wikipedia.org/wiki/Ghazala_Khan>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- rmdir on mingw, MSVC,
Bruno Haible <=