Daniel P. Berrange 4d9310f427 oslib-win32: only provide localtime_r/gmtime_r if missing
The oslib-win32 file currently provides a localtime_r and
gmtime_r replacement unconditionally. Some versions of
Mingw-w64 would provide crude macros for localtime_r/gmtime_r
which QEMU takes care to disable. Latest versions of Mingw-w64
now provide actual functions for localtime_r/gmtime_r, but
with a twist that you have to include unistd.h or pthread.h
before including time.h.  By luck some files in QEMU have
such an include order, resulting in compile errors:

  CC    util/osdep.o
In file included from include/qemu-common.h:48:0,
                 from util/osdep.c:48:
include/sysemu/os-win32.h:77:12: error: redundant redeclaration of 'gmtime_r' [-Werror=redundant-decls]
 struct tm *gmtime_r(const time_t *timep, struct tm *result);
            ^
In file included from include/qemu-common.h:35:0,
                 from util/osdep.c:48:
/usr/i686-w64-mingw32/sys-root/mingw/include/time.h:272:107: note: previous definition of 'gmtime_r' was here
In file included from include/qemu-common.h:48:0,
                 from util/osdep.c:48:
include/sysemu/os-win32.h:79:12: error: redundant redeclaration of 'localtime_r' [-Werror=redundant-decls]
 struct tm *localtime_r(const time_t *timep, struct tm *result);
            ^
In file included from include/qemu-common.h:35:0,
                 from util/osdep.c:48:
/usr/i686-w64-mingw32/sys-root/mingw/include/time.h:269:107: note: previous definition of 'localtime_r' was here

This change adds a configure test to see if localtime_r
exits, and only enables the QEMU impl if missing. We also
re-arrange qemu-common.h try attempt to guarantee that all
source files get unistd.h before time.h and thus see the
localtime_r/gmtime_r defs.

[sw: Use "official" spellings for Mingw-w64, MinGW in comments.]
[sw: Terminate sentences with a dot in comments.]

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-09-24 21:13:49 +02:00
2015-07-08 13:11:01 +02:00
2015-09-14 18:51:09 +01:00
2015-09-14 16:13:16 +01:00
2015-09-11 10:45:43 +03:00
2015-09-24 17:04:31 +01:00
2015-09-11 10:45:43 +03:00
2015-09-11 10:21:38 +03:00
2015-09-21 09:56:49 +02:00
2015-09-11 10:45:43 +03:00
2015-09-21 09:56:49 +02:00
2015-09-14 16:13:16 +01:00
2015-09-19 11:53:15 +02:00
2015-07-27 22:44:47 +03:00
2015-08-14 23:40:32 +02:00
2015-04-30 16:05:48 +03:00
2015-09-14 16:13:16 +01:00
2015-09-22 11:32:37 +02:00
2015-09-04 13:26:26 +02:00
2015-09-04 13:26:26 +02:00
2015-09-07 18:14:03 +02:00
2015-09-07 18:14:03 +02:00
2015-09-01 13:16:26 -05:00
2015-09-14 16:51:36 +02:00
2015-07-24 13:57:45 +02:00
2015-05-11 08:59:07 -04:00
2015-05-22 15:58:22 -04:00
2015-09-16 17:33:33 +02:00
2015-09-23 13:04:49 -06:00
2015-08-19 16:29:53 +01:00
2015-08-11 23:15:55 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Readme 528 MiB
Languages
C 82.5%
C++ 7%
Python 3.3%
Dylan 2.8%
Shell 1.5%
Other 2.6%