This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
Re: localtime_r
- From: Will Bryant <will dot bryant at ecosm dot com>
- To: pthreads-win32 at sources dot redhat dot com
- Date: Tue, 08 Feb 2005 00:42:42 +1300
- Subject: Re: localtime_r
- Organization: eCOSM Limited
- References: <20050204115434.GE3172@cross>
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/