]> git.proxmox.com Git - qemu.git/commit
w32: Add implementation of gmtime_r, localtime_r
authorStefan Weil <sw@weilnetz.de>
Sat, 22 Sep 2012 20:26:19 +0000 (22:26 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 12 Oct 2012 02:44:20 +0000 (21:44 -0500)
commiteea54caab066abb4c82573d552a49747f896665d
tree9772dfeda3935a8916e63ad06646fd5e688e15c2
parent78fd27b3b6f0953a52b4a0f4d63265574d998582
w32: Add implementation of gmtime_r, localtime_r

Those functions are missing in MinGW.

Some versions of MinGW-w64 include defines for gmtime_r and localtime_r.
Older versions of these macros are buggy (they return a pointer to a
static variable), therefore we don't want them. Newer versions are
similar to the code used here, but without the memset.

The implementation which is used here is not strictly reentrant,
but sufficiently good for QEMU on w32 or w64.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
[blauwirbel@gmail.com: added comment about locking]
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
(cherry picked from commit d3e8f95753114a827f9cd8e819b1d5cc8333f76b)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
oslib-win32.c
qemu-os-win32.h