patch for kurlcompletion.cpp

Stefan Teleman steleman at
Sun Oct 24 16:11:11 BST 2004

Oh. Didn't think of that. :-(

The question is: where to put the obvious (#ifndef MAXPATHLEN etc etc) 
fix. First thought would be config.h (because that's where most of 
the missing things live), but then MAXPATHLEN is defined in 
sys/param.h, and there's a strong chance config.h will be #include'd 
before sys/param.h. Then you get warnings about attempting to 
redefine without #undef.

AFAIK MAXPATHLEN is only required by SVID, and i see that it's not 
#ifndef guarded. (Can't copy and paste because of the ominous 
Copyright warnings at the top. :-)

Or maybe #ifdef guard it for Hurd in config.h ? That would seem the 
least intrusive to me.



On Sunday 24 October 2004 11:01, Richard Smith wrote:
> On Sunday 24 October 2004 01:17, Stefan Teleman wrote:
> > A patch for kurlcompletion.cpp.
> >
> > On Solaris, readdir_r(3C) does not allocate a buffer for char
> > d_name[1] in struct dirent. The caller is responsible for
> > allocating space for struct dirent.d_name, enough to hold
> What if MAXPATHLEN is not defined? It's allowed to not be, and
> won't be on Hurd. I know this is quite pedantic since (AFAIK) KDE
> doesn't support Hurd anyway, but for portability's sake it seems
> best to not rely on MAXPATHLEN begin defined.

Stefan Teleman          'Nobody Expects the Spanish Inquisition'
steleman at                          -Monty Python

More information about the kde-core-devel mailing list