X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=doc%2Fposix-functions%2Fgetcwd.texi;h=5dfba599ab7c373111f98797373924a5354e733a;hb=f40e1532834adc754cac576a07d43b9556f89a97;hp=a49a8990dc3d986bde59829d175409601fc836e0;hpb=c6dc8f16f19ceba9556ca82b4adc77e410ac44c2;p=gnulib.git diff --git a/doc/posix-functions/getcwd.texi b/doc/posix-functions/getcwd.texi index a49a8990d..5dfba599a 100644 --- a/doc/posix-functions/getcwd.texi +++ b/doc/posix-functions/getcwd.texi @@ -10,12 +10,21 @@ 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 On some platforms, the prototype for @code{getcwd} uses @code{int} -instead of @code{size_t} for the size argument: -mingw. +instead of @code{size_t} for the size argument when using non-standard +headers, and the declaration is missing from @code{}: +mingw, MSVC 9. +@item +On some platforms, @code{getcwd (buf, 0)} fails with @code{ERANGE} +instead of the required @code{EINVAL}: +mingw, MSVC 9. @end itemize Portability problems fixed by Gnulib module @code{getcwd}: @@ -24,7 +33,8 @@ Portability problems fixed by Gnulib module @code{getcwd}: This function is missing on some older platforms. @item This function does not handle long file names (greater than @code{PATH_MAX}) -correctly on some platforms. +correctly on some platforms: +glibc on Linux 2.4.20, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.1, OpenBSD 4.9, AIX 7.1. @end itemize Portability problems not fixed by Gnulib: @@ -33,7 +43,7 @@ Portability problems not fixed by Gnulib: When using @code{getcwd(NULL, nonzero)}, some platforms, such as glibc or cygwin, allocate exactly @code{nonzero} bytes and fail with @code{ERANGE} if it was not big enough, while other platforms, such as -FreeBSD or mingw, ignore the size argument and allocate whatever size +FreeBSD, mingw, or MSVC 9, ignore the size argument and allocate whatever size is necessary. If this call succeeds, an application cannot portably access beyond the string length of the result. @end itemize