]> granicus.if.org Git - gc/commitdiff
Fix more compilation issues for XboxOne
authorJonas Echterhoff <jonas@unity3d.com>
Tue, 31 Jul 2018 14:07:26 +0000 (17:07 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 31 Jul 2018 21:21:42 +0000 (00:21 +0300)
(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.

include/private/gc_priv.h
misc.c

index 04471f57193d1d7df72c73ffad9fddb46f9e2929..e7fc87182f75486ed181fb1ba34837941c6db8e3 100644 (file)
@@ -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 6bfa4a14433dd1257e76d8ae2fb93aa0ae03434f..c64fe2c1a508e406d1c5fc8ad7def554968b64d6 100644 (file)
--- 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