Paul Eggert <[EMAIL PROTECTED]> wrote: > coreutils "make check" failed on Solaris 10 with Sun C 5.8 due to "df > ." failing. I tracked it down to a getcwd issue exposed by recent > changes to getcwd.c, and installed this patch to gnulib. > > After installing this patch (and the other fixes I sent in just now), > "make check" succeeded on this platform. > > 2007-02-21 Paul Eggert <[EMAIL PROTECTED]> > > * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works > like glibc; on Solaris 10, it fails with errno == EINVAL. > POSIX says the behavior is unspecified if the first argument is NULL, > so play it safe and never pass NULL to the system getcwd.
Hi Paul, The above change moved (and added to) the "#if HAVE_PARTLY_WORKING_GETCWD" block down past the code to handle "getcwd (NULL, 0)". When I build on Solaris 10, with gcc on either nfs or tmpfs file systems, the configure-time test does not define HAVE_PARTLY_WORKING_GETCWD. So, obviously, our config.h files are different; otherwise, your moving #if-0'd code wouldn't have had any effect. Why does your config.h define HAVE_PARTLY_WORKING_GETCWD when using Sun C 5.8?