[Kde-windows] KDE/kdelibs/win

Jarosław Staniek js at iidea.pl
Tue Oct 18 17:38:39 CEST 2005


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?)

-- 
regards / pozdrawiam,
  Jaroslaw Staniek / OpenOffice Polska
  Kexi Developer:
      http://www.kexi-project.org | http://koffice.org/kexi
  KDE3, KDE4 libraries for developing MS Windows applications:
      http://wiki.kde.org/tiki-index.php?page=KDElibs+for+win32



More information about the Kde-windows mailing list