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

Re: New versions of openbsd_{basename,dirname}.c

On Tue, 2012-01-17 at 13:02:43 +0100, Svante Signell wrote:
> On Tue, 2012-01-17 at 12:48 +0100, Guillem Jover wrote:
> > On Tue, 2012-01-17 at 09:04:45 +0100, Svante Signell wrote:
> > > Dynamic allocation versions of openbsd_basename.c and openbsd_dirname.c
> > > are attached together with old functions together with some test strings
> > > in test_base+dirname.c. Comments are appreciated. Another part of the
> > > patch for libtar.
> > 
> > I don't think there's any need to patch the compat functions, as glibc
> > provides perfectly fine POSIX variants. The problem here seems to be
> > bogus configure tests. The attached patch should fix that.
> That is exactly the problem:
> The second test indicates that the argument string should _not_ be
> modified, as the POSIX versions does! The GNU version of basename does
> not, but it reports basename of /path/foo/ with an empty string, not foo
> (which is wrong, in my opinon)
> Me and Samuel looked into that and came to the conclusion that the
> compat versions are to be used.

Ah, certainly!


Reply to: