getcwd: work around mingw bug
authorEric Blake <eblake@redhat.com>
Wed, 25 May 2011 21:15:14 +0000 (15:15 -0600)
committerIan Beckwith <ianb@erislabs.net>
Thu, 9 Jun 2011 19:01:00 +0000 (20:01 +0100)
commit527d6c46b6ef777cb401e090eabd997b2d372c71
tree1313ff888e3b5726ec27631cc66219493af65eb6
parent56d7f11cc3831bcff4f918ef095c00e1fb4e224f
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>
(cherry picked from commit 1622b36b4ae889ea79ddc444e86fea31cd91755b)
ChangeLog
doc/posix-functions/getcwd.texi
lib/getcwd-lgpl.c