getcwd: work around mingw bug
authorEric Blake <eblake@redhat.com>
Wed, 25 May 2011 21:15:14 +0000 (15:15 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 25 May 2011 21:19:16 +0000 (15:19 -0600)
commit1622b36b4ae889ea79ddc444e86fea31cd91755b
tree9a213cd569b9df0513fdb3943f5a46c9c0592f30
parent9d196fad055a448c5732a8e950cc044b353d2615
getcwd: work around mingw bug

mingw getcwd(buf, 0) fails with ERANGE, instead of the required
EINVAL.  Since we're already replacing getcwd on mingw, the
workaround is trivial.

* lib/getcwd-lgpl.c (rpl_getcwd): Guarantee correct error.
* doc/posix-functions/getcwd.texi (getcwd): Document it.
Reported by Matthias Bolte.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/posix-functions/getcwd.texi
lib/getcwd-lgpl.c