getcwd: support coreutils better
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 Feb 2013 08:04:35 +0000 (00:04 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 Feb 2013 08:05:15 +0000 (00:05 -0800)
commit167b0f9c9ca72a4f38ebcd8e3aa35f5f2f2484bf
treee34bd1cc54539e2815d8beb6879f5635ba00a856
parentfb57b94f067abbd5205b34c8a77e825c47eb9a3b
getcwd: support coreutils better

Like strtod, getcwd incorrectly referred to HAVE_RAW_DECL_GETCWD,
but this might not be correct in coreutils, which disables
the raw decl checks.  Problem reported by Nagendra in
<http://bugs.gnu.org/10305#192>.
* lib/getcwd.c (__getcwd): Do not depend on HAVE_RAW_DECL_GETCWD.
* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
Test the getcwd function, not any macro, since getcwd.c wants the
function.
* m4/getcwd.m4 (gl_FUNC_GETCWD):
Don't define HAVE_MINIMALLY_WORKING_GETCWD if the code doesn't
compile, as might happen if there's a macro but no function.
ChangeLog
lib/getcwd.c
m4/getcwd-path-max.m4
m4/getcwd.m4