develooper Front page | perl.perl5.porters | Postings from January 2012

Re: [perl #109262] Increase the fallback value of MAXPATHLEN

Thread Previous | Thread Next
From:
Mark Overmeer
Date:
January 29, 2012 09:01
Subject:
Re: [perl #109262] Increase the fallback value of MAXPATHLEN
Message ID:
20120129170051.GA19986@moon.overmeer.net
* Dominic Hargreaves (dom@earth.li) [120129 15:20]:
> > * Dominic Hargreaves (dom@earth.li) [120128 23:09]:
> > <http://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html>

> On Sat, Jan 28, 2012 at 03:34:49PM -0800, Mark Overmeer via RT wrote:
> > You like to enlarge the default for MAXPATHLEN to an other artificial
> > value, where also a known PATH_MAX is probably too small.  So, why not
> > remove the attempt to get a realistic value from the OS here?
> >    #define ALWAYS_LARGE_ENOUGH  32768
> >    Char *bufnext, *bufend, patbuf[ALWAYS_LARGE_ENOUGH];
> >    bufend = bufnext + ALWAYS_LARGE_ENOUGH - 1;
> 
> As I understand it, you're suggesting picking a different arbitrary value
> as a maximum, and using it even when the underlying system wouldn't 
> support paths that long. I'm not convinced that this is an improvement
> on my suggestion. Have I missed something?

The document you pointed us to, and documents referred to in that doc,
suggest that PATH_MAX/MAXPATHLEN are constants much shorter than
the actual maximum size of the path. So, why should the buffer used
in bsd_glob.c be smaller than may be needed?  In lack of any useful
constant with a realistic value, we can just pick something huge (in
this context)
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark@Overmeer.net                          solutions@overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About