patch for kurlcompletion.cpp

Stephan Kulow coolo at kde.org
Sun Oct 24 09:37:44 BST 2004


Am Sonntag 24 Oktober 2004 02:17 schrieb Stefan Teleman:
> Hi.
>
> 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 MAXPATHLEN+1.
>
> This patch fixes this problem, which caused kurlcompletion to crash
> when trying to choose a file -- and which i avoided for 3.3.0 by
> setting KURLCOMPLETION_LOCAL_KIO. With this patch, setting this env
> var is no longer necessary.
And why do you use bzero if you want to achieve portable code?

And what's the deal with this code?
-               d->dirListThread->wait( 200 );
+               d->dirListThread->wait(); // 200ms wait does not work on 
Solaris

Why not fix that problem on Solaris instead of making everyone suffer?
I don't want to see that in CVS - if you're blocking on wait anyway, there is 
little point in using threads. And it seems unrelated to the other things 
anyway.

Greetings, Stephan




More information about the kde-core-devel mailing list