diff options
author | Paul R. Eggert <eggert@cs.ucla.edu> | 2010-07-14 00:06:03 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-07-14 00:07:11 -0700 |
commit | b1ef417aa5830669125c4f4aafd0a163c8902125 (patch) | |
tree | e2d8b276bcc55c65c5585793955089023bfc3354 /m4/getcwd-path-max.m4 | |
parent | 7f2ece896984db0787f92ce2d95462d41eef442f (diff) | |
download | gnulib-b1ef417aa5830669125c4f4aafd0a163c8902125.tar.gz |
getcwd: on Solaris, work better if ancestors are inaccessible
* lib/getcwd.c (__getcwd): If getcwd returns EINVAL for zero
buffer and size, try again with a large buffer. This works better
on Solaris, since its getcwd succeeds even if the path to the root
is inaccessible, and this is helpful in common cases such as .zfs
hidden directories. Problem reported by J Chapman Flack in
http://lists.gnu.org/archive/html/bug-tar/2010-06/msg00000.html
Use system getcwd if it's declared, not merely if it's partly
working; use the partly-working test only to avoid needless effort
if the system getcwd fails.
* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Omit
comment that was already obsolete and is now even more obsolete.
* modules/getcwd (Depends-on): Depend on strdup, since __getcwd
now might call strdup.
Diffstat (limited to 'm4/getcwd-path-max.m4')
-rw-r--r-- | m4/getcwd-path-max.m4 | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4 index ecf6192842..04ff1419b6 100644 --- a/m4/getcwd-path-max.m4 +++ b/m4/getcwd-path-max.m4 @@ -183,8 +183,6 @@ main () no,*) AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1], [Define to 1 if getcwd works, except it sometimes fails when it shouldn't, - setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX - is not defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD - is defined.]);; + setting errno to ERANGE, ENAMETOOLONG, or ENOENT.]);; esac ]) |