bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recent checkins to lib/xgetcwd.c breaks Windows


From: Jim Meyering
Subject: Re: Recent checkins to lib/xgetcwd.c breaks Windows
Date: Sun, 06 Mar 2005 17:09:28 +0100

Jim Hyslop <jhyslop@ieee.org> wrote:
> The recent checkin to lib/xgetcwd.c changes the implementation of
> xgetwd() from:
...
> to:
>
> char *
> xgetcwd (void)
> {
>   char *cwd = getcwd (NULL, 0);
>   if (! cwd && errno == ENOMEM)
>     xalloc_die ();
>   return cwd;
> }
>
> While the new version is shorter, it doesn't work on Windows (Cygwin).
> It appears that Cygwin expects the parameter to getcwd() to be non-NULL.
> At least, 'getcwd()' always returns in the latest version of the file
> (trunk). Can we revert xgetcwd.c to its previous version? Why was it
> changed?

Hi Jim,

The new version relies on a configure-time check (m4/getcwd.m4) and
on the lib/getcwd.c replacement function, on systems that don't
work the way the above code requires.

Is there a problem with one of those?
It sounds like you should find this definition

#define __GETCWD_PREFIX rpl_

in config.h on a Cygwin system.
Similarly, building should compile lib/getcwd.c,
which should define rpl_getcwd.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]