From: Bruno Haible Date: Fri, 23 Sep 2011 10:05:16 +0000 (+0200) Subject: getcwd: Tweak for MSVC 9. X-Git-Tag: v0.1~1782 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=18306a88dced251f99b0207f2d1108831c8203a5;p=gnulib.git getcwd: Tweak for MSVC 9. * lib/unistd.in.h: Update comments. * doc/posix-functions/getcwd.texi: Mention problem on MSVC 9. --- diff --git a/ChangeLog b/ChangeLog index 9c713cd8e..82334ddb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-09-23 Bruno Haible + + 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 strerror_r-posix: Avoid a link error on MSVC. diff --git a/doc/posix-functions/getcwd.texi b/doc/posix-functions/getcwd.texi index a7e0b2ed0..8648322a7 100644 --- a/doc/posix-functions/getcwd.texi +++ b/doc/posix-functions/getcwd.texi @@ -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{} or +@code{}) 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 diff --git a/lib/unistd.in.h b/lib/unistd.in.h index e3fb8c6b9..18e850fb4 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -83,11 +83,12 @@ # include #endif -/* mingw declares getcwd in , not in . */ +/* Native Windows platforms declare getcwd in + and/or , not in . */ #if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # include /* mingw32, mingw64 */ -# include /* mingw64 */ +# include /* mingw64, MSVC 9 */ #endif /* AIX and OSF/1 5.1 declare getdomainname in , not in .