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

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

Thread Previous | Thread Next
Mark Overmeer
January 28, 2012 15:34
Re: [perl #109262] Increase the fallback value of MAXPATHLEN
Message ID:
* Dominic Hargreaves ( [120128 23:09]:
> On Sat, Jan 28, 2012 at 02:42:17PM -0800, Mark Overmeer via RT wrote:
> > * Dominic Hargreaves ( [120128 14:22]:
> No, on GNU/Hurd 'POSIX::pathconf( "/etc", &POSIX::_PC_PATH_MAX )'
> returns undef.
> <>

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;


drs Mark A.C.J. Overmeer                                MARKOV Solutions                         

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About