This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: localtime_r


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]