kernel32: avoid thread-unsafe function gmtime()

Dan Kegel dank at kegel.com
Tue Jun 3 18:57:34 CDT 2008


Using gmtime() in a multithreaded program could
result in invalid results.  So use the safer alternative
gmtime_r() if it's available.

(There is another instance of gmtime() in that file,
but it's unused on platforms that have timegm().
I think that's present on both Linux and BSD, so
it doesn't seem work fixing.)

This is probably a post-1.0 change, but what the heck,
may as well post it now.

I stumbled onto this while looking for something else,
so this really is a solution looking for a problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmtime.patch
Type: text/x-patch
Size: 1383 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080603/0a1ca1ac/attachment.bin 


More information about the wine-patches mailing list