getcwd: Work around getcwd bug on AIX 5..7.
authorBruno Haible <bruno@clisp.org>
Sun, 20 Nov 2011 23:56:11 +0000 (00:56 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 20 Nov 2011 23:56:11 +0000 (00:56 +0100)
commit69dba6d784566248205fc990673c14d259c4907f
tree13a28c016f375c5a7178490ce6c19254e71e76c9
parent4b79a20516739258867f4cfc629d6f646f2b260e
getcwd: Work around getcwd bug on AIX 5..7.

* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Require
AC_CANONICAL_HOST. Assign exit code 31 to the bug seen on AIX 5.1..7.1.
Use a different value for gl_cv_func_getcwd_path_max. Move the
definition of HAVE_PARTLY_WORKING_GETCWD from here...
* m4/getcwd.m4 (gl_FUNC_GETCWD): ... to here. Invoke
gl_FUNC_GETCWD_PATH_MAX also when $gl_cv_func_getcwd_null is 'no'.
Define HAVE_MINIMALLY_WORKING_GETCWD.
* lib/getcwd.c (__getcwd): Don't use the system's getcwd on platforms
where it is not even minimally working, that is, on AIX.
* tests/test-getcwd.c (test_long_name): Distinguish the same cases as
m4/getcwd-path-max.m4.
(main): Update exit code computation.
* doc/posix-functions/getcwd.texi: Mention list of platforms where
getcwd does not handle long file names.
ChangeLog
doc/posix-functions/getcwd.texi
lib/getcwd.c
m4/getcwd-path-max.m4
m4/getcwd.m4
tests/test-getcwd.c