]> Savannah Git Hosting - gnulib.git/commitdiff
getcwd: Tweak for MSVC 9.
authorBruno Haible <bruno@clisp.org>
Fri, 23 Sep 2011 10:05:16 +0000 (12:05 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 23 Sep 2011 10:05:16 +0000 (12:05 +0200)
* lib/unistd.in.h: Update comments.
* doc/posix-functions/getcwd.texi: Mention problem on MSVC 9.

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

index 9c713cd8e0edbf53c499aec262cf8b7fcc31540d..82334ddb1cd2f95d8ba2f1336d33e705489c8e84 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-23  Bruno Haible  <bruno@clisp.org>
+
+       getcwd: Tweak for MSVC 9.
+       * lib/unistd.in.h: Update comments.
+       * doc/posix-functions/getcwd.texi: Mention problem on MSVC 9.
+
 2011-09-22  Bruno Haible  <bruno@clisp.org>
 
        strerror_r-posix: Avoid a link error on MSVC.
index a7e0b2ed01f423fccd9eb36250b25cb63e05d103..8648322a77a6087c459c45c701ce882c6f32c507 100644 (file)
@@ -10,6 +10,10 @@ Portability problems fixed by either Gnulib module @code{getcwd} or
 @code{getcwd-lgpl}:
 @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
 On glibc platforms, @code{getcwd (NULL, n)} allocates memory for the result.
 On some other platforms, this call is not allowed.
 @item
index e3fb8c6b96ddd1691e78bf7ed8c713840f6b9664..18e850fb4081b417c006f4990452392399ca1fff 100644 (file)
 # include <stdlib.h>
 #endif
 
-/* mingw declares getcwd in <io.h>, not in <unistd.h>.  */
+/* Native Windows platforms declare getcwd in
+   <io.h> and/or <direct.h>, not in <unistd.h>.  */
 #if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
      && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
 # include <io.h>     /* mingw32, mingw64 */
-# include <direct.h> /* mingw64 */
+# include <direct.h> /* mingw64, MSVC 9 */
 #endif
 
 /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.