getcwd-lgpl: fix m4 to match relaxed test for BSD
Commit
c6dc8f1 changed test-getcwd-lgpl to allow BSD behavior
where getcwd(NULL,1) allocates the proper size, in addition to
the glibc behavior of allocating exactly one byte then failing
with ERANGE. But the m4 test was still rejecting the former
behavior.
However, merely fixing the test to avoid probing the behavior
would be a regression of commit
8585ce2, since it was the only
reason why rpl_getcwd was being compiled on mingw. Hence, we
have to add a signature check in its place to keep mingw happy.
* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Relax probe.
(gl_FUNC_GETCWD_SIGNATURE): New macro.
(gl_FUNC_GETCWD_LGPL, gl_FUNC_GETCWD): Use it.
* doc/posix-functions/getcwd.texi (getcwd): Tweak mentions of
signature problem.
Signed-off-by: Eric Blake <eblake@redhat.com>