Make Unicorn buildable with MinGW (#1364)
* [WIN32] Allow to build also with MinGW * [WIN32] Fix build for MinGW
This commit is contained in:
@ -850,7 +850,7 @@ set(UNICORN_SRCS_COMMON
|
|||||||
uc.c
|
uc.c
|
||||||
)
|
)
|
||||||
|
|
||||||
if (MSVC)
|
if (WIN32)
|
||||||
set(UNICORN_SRCS
|
set(UNICORN_SRCS
|
||||||
${UNICORN_SRCS_COMMON}
|
${UNICORN_SRCS_COMMON}
|
||||||
qemu/util/oslib-win32.c
|
qemu/util/oslib-win32.c
|
||||||
@ -918,7 +918,7 @@ target_compile_options(unicorn PRIVATE
|
|||||||
${UNICORN_COMPILE_OPTIONS}
|
${UNICORN_COMPILE_OPTIONS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MSVC)
|
if(WIN32)
|
||||||
if (UNICORN_BUILD_SHARED)
|
if (UNICORN_BUILD_SHARED)
|
||||||
target_compile_options(unicorn PRIVATE
|
target_compile_options(unicorn PRIVATE
|
||||||
-DUNICORN_SHARED
|
-DUNICORN_SHARED
|
||||||
@ -939,7 +939,7 @@ else()
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(WIN32)
|
||||||
set(SAMPLES_LIB
|
set(SAMPLES_LIB
|
||||||
unicorn
|
unicorn
|
||||||
)
|
)
|
||||||
|
@ -44,7 +44,7 @@ static void error_print_loc(void)
|
|||||||
* Prepend the current location and append a newline.
|
* Prepend the current location and append a newline.
|
||||||
* It's wrong to call this in a QMP monitor. Use qerror_report() there.
|
* It's wrong to call this in a QMP monitor. Use qerror_report() there.
|
||||||
*/
|
*/
|
||||||
#ifdef _MSC_VER
|
#ifdef _WIN32
|
||||||
void error_vreport(const char *fmt, va_list ap)
|
void error_vreport(const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
error_print_loc();
|
error_print_loc();
|
||||||
|
Reference in New Issue
Block a user