summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-04-27 20:40:21 -0600
committerEric Blake <eblake@redhat.com>2011-04-27 20:51:13 -0600
commit8585ce2ff5698c650ba5d5e3bb99763654ad62e8 (patch)
tree189d24f11106e82a4c4f8c7bc661ffcea23214ad /doc
parent2cd4d6d9023e923d6e5da19e8ced3e03290efa78 (diff)
downloadgnulib-8585ce2ff5698c650ba5d5e3bb99763654ad62e8.tar.gz
getcwd: fix mingw bugs
On mingw, getcwd(NULL,1) succeeds, even though glibc documents that with a non-zero size, the allocation will not exceed that many bytes. On mingw, getcwd has the wrong signature. However, we don't have to check for this if anything else triggers the replacement. Also, fix a type bug that crept into the original getcwd-lgpl commit. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Detect one mingw bug. * doc/posix-functions/getcwd.texi (getcwd): Document the problems. * lib/getcwd-lgpl.c (rpl_getcwd): Fix return type. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/posix-functions/getcwd.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/posix-functions/getcwd.texi b/doc/posix-functions/getcwd.texi
index a8dba967ec..1f6dd187d2 100644
--- a/doc/posix-functions/getcwd.texi
+++ b/doc/posix-functions/getcwd.texi
@@ -11,7 +11,12 @@ 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 other platforms, this call is not allowed.
+On some other platforms, this call is not allowed. Conversely, mingw fails
+to honor non-zero @code{n}.
+@item
+On some platforms, the prototype for @code{getcwd} uses @code{int}
+instead of @code{size_t} for the size argument:
+mingw.
@end itemize
Portability problems fixed by Gnulib module @code{getcwd}: