pthread_sigmask: Work around Cygwin bug.
[pspp] / doc / posix-functions / getcwd.texi
index 1f6dd187d239d63aca1b60617e983a9c7214f299..ffb5086ffbc8b929dad119cf8bf1d9a9bb9b080d 100644 (file)
@@ -11,12 +11,15 @@ Portability problems fixed by either Gnulib module @code{getcwd} or
 @itemize
 @item
 On glibc platforms, @code{getcwd (NULL, n)} allocates memory for the result.
-On some other platforms, this call is not allowed.  Conversely, mingw fails
-to honor non-zero @code{n}.
+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.
+@item
+On some platforms, @code{getcwd (buf, 0)} fails with @code{ERANGE}
+instead of the required @code{EINVAL}:
+mingw.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{getcwd}:
@@ -30,4 +33,11 @@ correctly on some platforms.
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+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
+is necessary.  If this call succeeds, an application cannot portably
+access beyond the string length of the result.
 @end itemize