From: Jonas Echterhoff Date: Tue, 31 Jul 2018 14:07:26 +0000 (+0300) Subject: Fix more compilation issues for XboxOne X-Git-Tag: v8.0.0~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8ed78567ec73dfa7f81c0d3bcacd8dd106565b0;p=gc Fix more compilation issues for XboxOne (part of commit c6e7e36 from Unity-Technologies/bdwgc) Issue #173 (bdwgc). * include/private/gc_priv.h [!CPPCHECK && !PCR && MSWIN_XBOX1 && !DebugBreak] (DebugBreak): Define to __debugbreak. * misc.c [MSWIN32] (GC_win32_MessageBoxA): Do not define if MSWIN_XBOX1. * misc.c [!PCR && !SMALL_CONFIG && MSWIN32] (GC_default_on_abort): Do not call GC_win32_MessageBoxA() if MSWINRT_FLAVOR or MSWIN_XBOX1. --- diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 04471f57..e7fc8718 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -555,7 +555,9 @@ EXTERN_C_BEGIN # elif defined(PCR) # define ABORT(s) PCR_Base_Panic(s) # else -# if defined(MSWINCE) && !defined(DebugBreak) \ +# if defined(MSWIN_XBOX1) && !defined(DebugBreak) +# define DebugBreak() __debugbreak() +# elif defined(MSWINCE) && !defined(DebugBreak) \ && (!defined(UNDER_CE) || (defined(__MINGW32CE__) && !defined(ARM32))) /* This simplifies linking for WinCE (and, probably, doesn't */ /* hurt debugging much); use -DDebugBreak=DebugBreak to override */ diff --git a/misc.c b/misc.c index 6bfa4a14..c64fe2c1 100644 --- a/misc.c +++ b/misc.c @@ -812,9 +812,10 @@ GC_API int GC_CALL GC_is_init_called(void) } #endif -#if defined(MSWIN32) && !defined(MSWINRT_FLAVOR) && (!defined(SMALL_CONFIG) \ - || (!defined(_WIN64) && defined(GC_WIN32_THREADS) \ - && defined(CHECK_NOT_WOW64))) +#if defined(MSWIN32) && !defined(MSWINRT_FLAVOR) && !defined(MSWIN_XBOX1) \ + && (!defined(SMALL_CONFIG) \ + || (!defined(_WIN64) && defined(GC_WIN32_THREADS) \ + && defined(CHECK_NOT_WOW64))) STATIC void GC_win32_MessageBoxA(const char *msg, const char *caption, unsigned flags) { @@ -1895,7 +1896,7 @@ GC_API GC_warn_proc GC_CALL GC_get_warn_proc(void) # endif if (msg != NULL) { -# if defined(MSWIN32) +# if defined(MSWIN32) && !defined(MSWINRT_FLAVOR) && !defined(MSWIN_XBOX1) GC_win32_MessageBoxA(msg, "Fatal error in GC", MB_ICONERROR | MB_OK); /* Also duplicate msg to GC log file. */ # endif