Re: bash-shipped getcwd() replacement does not work on interix.

2007-12-22 Thread Michael Haubenwallner
On Sat, 2007-12-22 at 10:13 -0500, Chet Ramey wrote: > Michael Haubenwallner wrote: > >> It is because readdir() returns 0 (zero) for (struct dirent).(d_ino), > >> while stat() returns useful values for (struct stat).(st_ino), so their > >> equal-comparison never succeeds. > > > > Attached patch

Re: bash-shipped getcwd() replacement does not work on interix.

2007-12-22 Thread Chet Ramey
Michael Haubenwallner wrote: >> It is because readdir() returns 0 (zero) for (struct dirent).(d_ino), >> while stat() returns useful values for (struct stat).(st_ino), so their >> equal-comparison never succeeds. > > Attached patch should fix this issue, not relying on readdir() returning > valid

Re: bash-shipped getcwd() replacement does not work on interix.

2007-12-21 Thread Michael Haubenwallner
On Fri, 2007-12-21 at 13:51 +0100, Michael Haubenwallner wrote: > On Thu, 2007-12-20 at 08:08 -0500, Chet Ramey wrote: > > Michael Haubenwallner wrote: > > > Machine: i586 > > > OS: interix5.2 > > > Compiler: gcc > > > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' > > > -DCONF_OSTYP

Re: bash-shipped getcwd() replacement does not work on interix.

2007-12-21 Thread Michael Haubenwallner
On Thu, 2007-12-20 at 08:08 -0500, Chet Ramey wrote: > Michael Haubenwallner wrote: > > Machine: i586 > > OS: interix5.2 > > Compiler: gcc > > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' > > -DCONF_OSTYPE='interix5.2' -DCONF_MACHTYPE='i586-pc-interix5.2' > > -DCONF_VENDOR='pc' > >

Re: bash-shipped getcwd() replacement does not work on interix.

2007-12-20 Thread Michael Haubenwallner
On Thu, 2007-12-20 at 12:30 +0100, Andreas Schwab wrote: > Michael Haubenwallner <[EMAIL PROTECTED]> writes: > > > diff -ru builtins/common.c builtins/common.c > > --- builtins/common.c Wed Dec 19 10:30:07 2007 > > +++ builtins/common.c Wed Dec 19 10:34:58 2007 > > @@ -479,11 +479,8 @@

Re: bash-shipped getcwd() replacement does not work on interix.

2007-12-20 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Andreas Schwab on 12/20/2007 4:30 AM: >> + char *t = xmalloc(PATH_MAX); >> + the_current_working_directory = getcwd (t, PATH_MAX); > > The length of the cwd may be bigger than PATH_MAX. On most systems, yes. Interix, however,

Re: bash-shipped getcwd() replacement does not work on interix.

2007-12-20 Thread Chet Ramey
Michael Haubenwallner wrote: > Machine: i586 > OS: interix5.2 > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' > -DCONF_OSTYPE='interix5.2' -DCONF_MACHTYPE='i586-pc-interix5.2' > -DCONF_VENDOR='pc' > -DLOCALEDIR='/tools/snapshot/prefix-launcher-1pre.20071219/i586-pc-i

Re: bash-shipped getcwd() replacement does not work on interix.

2007-12-20 Thread Andreas Schwab
Michael Haubenwallner <[EMAIL PROTECTED]> writes: > diff -ru builtins/common.c builtins/common.c > --- builtins/common.c Wed Dec 19 10:30:07 2007 > +++ builtins/common.c Wed Dec 19 10:34:58 2007 > @@ -479,11 +479,8 @@ > >if (the_current_working_directory == 0) > { > -#if defined (GETCWD

bash-shipped getcwd() replacement does not work on interix.

2007-12-20 Thread Michael Haubenwallner
Machine: i586 OS: interix5.2 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='interix5.2' -DCONF_MACHTYPE='i586-pc-interix5.2' -DCONF_VENDOR='pc' -DLOCALEDIR='/tools/snapshot/prefix-launcher-1pre.20071219/i586-pc-interix5.2/share/locale' -DPACKAGE='bash'