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 28, 2012 15:34
Subject:
Re: [perl #109262] Increase the fallback value of MAXPATHLEN
Message ID:
20120128233408.GC24071@moon.overmeer.net
* Dominic Hargreaves (dom@earth.li) [120128 23:09]:
> On Sat, Jan 28, 2012 at 02:42:17PM -0800, Mark Overmeer via RT wrote:
> > * Dominic Hargreaves (perlbug-followup@perl.org) [120128 14:22]:
> 
> No, on GNU/Hurd 'POSIX::pathconf( "/etc", &POSIX::_PC_PATH_MAX )'
> returns undef.
> 
> <http://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html>

Not only PATH_MAX, but also many other global constants do not really
make sense.  Especially the ancient ones.  Pathconf() would stand a better
chance, because the length is obviously file-system dependent.  If I
read the Hurd idea about it, I would say that it supports
     pathconf($fn, _PC_PATH_MAX)
returning "undef" as "unlimited".

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;

-- 
               MarkOv

------------------------------------------------------------------------
drs Mark A.C.J. Overmeer                                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