mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 08:31:16 +00:00
build-sys: move windows defines in osdep.h header
This removes some clutter in compilation logging, and allows some easier tweaking per compilation unit/CFLAGS overriding. Note that we can't move those define in os-win32.h, since they must be set before the first system headers are included. Backports commit 007e722c349839f430f10639ba8c94fe43acfe50 from qemu
This commit is contained in:
parent
03beb4f15a
commit
9ff8b70682
3
qemu/configure
vendored
3
qemu/configure
vendored
|
@ -492,9 +492,6 @@ fi
|
||||||
if test "$mingw32" = "yes" ; then
|
if test "$mingw32" = "yes" ; then
|
||||||
EXESUF=".exe"
|
EXESUF=".exe"
|
||||||
DSOSUF=".dll"
|
DSOSUF=".dll"
|
||||||
QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
|
|
||||||
# enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
|
|
||||||
QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
|
|
||||||
LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
|
LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
|
||||||
write_c_skeleton;
|
write_c_skeleton;
|
||||||
if compile_prog "" "-liberty" ; then
|
if compile_prog "" "-liberty" ; then
|
||||||
|
|
|
@ -61,13 +61,29 @@ typedef __float128 _Float128;
|
||||||
#define __STDC_FORMAT_MACROS
|
#define __STDC_FORMAT_MACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
/* as defined in sdkddkver.h */
|
||||||
|
#ifndef WINVER
|
||||||
|
#define WINVER 0x0501 /* XP */
|
||||||
|
#endif
|
||||||
|
/* reduces the number of implicitly included headers */
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "unicorn/platform.h"
|
#include "unicorn/platform.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define __USE_MINGW_ANSI_STDIO 1
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
Loading…
Reference in a new issue