bug-sh-utils
[Top][All Lists]
Advanced

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

Re: PATH_MAX


From: Neal H Walfield
Subject: Re: PATH_MAX
Date: Fri, 17 Aug 2001 01:30:52 +0200
User-agent: Mutt/1.3.18i

> > This bug report was verified against v 2.0.11-11 as found in the Debian
> > unstable archive and the version marked as 2.0 on ftp.gnu.org.  I did
> > not see a cvs module on subversions.
> >
> > Shell utils makes use of the macro PATH_MAX.  On the Hurd, this is
> > undefined.  Happily, shell utils handles this situation by using
> > pathconf, however, it does so incorrectly: pathconf returns -1 on the
> > Hurd.  By definition, this means that there is no system imposed limit
> > but shell utils chooses to use 1024 in this case.  This is clearly
> > a hack and is wrong.  Dynamic allocation checking for ENAMETOOLONG,
> > etc., should instead be performed.
> 
> Thanks for the report.
> I've begun fixing that.
> Here's the first installment (untested):
> 
>       * src/pathchk.c (PATH_MAX_FOR): Use pathconf via wrapper.
>       (NAME_MAX_FOR): Likewise.
>       Guard the above pathconf-using definitions with `#if HAVE_PATHCONF'
>       rather than with `#ifdef _POSIX_VERSION'.
>       (pathconf_wrapper): New function.
>       (validate_path): Declare length variables to be `long', not `int'.
>       Adjust corresponding printf-style specs to use %ld.
> 
> Would you please give it a try?

I have compiled this and everything seems to work.  Sorry about the
delay.  I got caught up debugging other things.

Attachment: pgpyPo3stFs2I.pgp
Description: PGP signature


reply via email to

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