localtime_r

Will Bryant will.bryant@ecosm.com
Mon Feb 7 11:42:00 GMT 2005


Keresztfalvi Laszlo wrote:

>I've found that localtime_r() is a macro in pthread-win32 simply referencing
>the localtime() function. According to the MSDN localtime() works just like
>the UNIX version.. each call overwrites the static struct tm storage.
>
>Is this really thread safe?
>
>  
>
Yes; it uses a thread-specific buffer on win32.  So it's overwritten 
with every call in that thread.

-- 
Will Bryant
Systems Architect, eCOSM Limited
Mobile +64 21 655 443
http://www.ecosm.com/



More information about the Pthreads-win32 mailing list