Hi,
I'm in the process of making my man-db package use Gnulib. Upon
importing the xgetcwd module and using it, I found that calling xgetcwd
caused infinite recursion:
#34894 0x0805cc1e in getcwd (buf=0x0, size=0) at getcwd.c:157
#34895 0x0805cc1e in getcwd (buf=0x0, size=0) at getcwd.c:157
#34896 0x0805ca0b in xgetcwd () at xgetcwd.c:37
#34897 0x08050a6a in main (argc=2, argv=0xbfe7bc04) at man.c:726
configure defines HAVE_PARTLY_WORKING_GETCWD on my system, namely Debian
unstable with glibc 2.6.1. I note that lib/getcwd.c says (much reduced
for brevity):
#if !_LIBC
# define __getcwd getcwd
#endif
char *
__getcwd (char *buf, size_t size)
{
#if HAVE_PARTLY_WORKING_GETCWD
# undef getcwd
dir = getcwd (buf, size);
#endif
Isn't this bound to break with HAVE_PARTLY_WORKING_GETCWD && !LIBC? The
function definition preprocesses to char *getcwd.
I'm working with the gnulib package in Debian unstable (last commit
dated 2007-09-18), but inspection of a current git checkout suggests
that it has the same problem.
Thanks,
--
Colin Watson [EMAIL PROTECTED]