[Kde-windows] KDE/kdelibs/win
Ralf Habacker
ralf.habacker at freenet.de
Tue Oct 18 17:59:49 CEST 2005
Am Dienstag, 18. Oktober 2005 17:38 schrieb Jarosław Staniek:
> Ralf Habacker said the following, On 2005-10-18 17:13:
> >>>in include/msvc/stdlib.h
> >>>
> >>>Regards
> >>>Ralf
> >>>
> >>>
> >>>
> >>>int kde_init_getenv()
> >>>{
> >>> if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
> >>> // stuff from bootstrap.cpp
> >>> }
> >>> return 1;
> >>>}
> >>>
> >>>
> >>>KDEWIN32_EXPORT char * kde_getenv(const char *name)
> >>>{
> >>> char dummy[1];
> >>> int len;
> >>> char *p;
> >>>//<---
>
> //perhaps let's add mutex lock here
>
> static int init = 0;
> if (!init)
> init = kde_init_getenv();
>
> //perhaps let's add mutex unlock here
>
> >>^^^^^^^^^^^^^
> >>This would be good because improved startup speed, but needs to be fixed
> >>because is not thread safe....
> >
> > What would be the result ? Do you have a better implementation ?
>
> see above solution ^^^
>
> Of course you can just leave the comments for now.
> Win32 mutex will be added later (hmm, QMutex cannot be used as this has to
> be C code, right?)
yes, unfortunally I haven't time for this yet. Are you able to check this in
by yourself ?
Regards
Ralf
More information about the Kde-windows
mailing list