From 3fb8ea23bb18727c6f8231659ed287d04d462caf Mon Sep 17 00:00:00 2001 From: Jonas Echterhoff Date: Thu, 14 Jun 2018 20:56:18 +0200 Subject: [PATCH] Fix the BDWGC build on XboxOne (fix of commit d16debf) Issue #173 (bdwgc). This fixes durango_get_mem() definition. * os_dep.c [MSWIN_XBOX1] (durango_get_mem): Define even if MMAP_SUPPORTED is not defined. --- os_dep.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/os_dep.c b/os_dep.c index a4b5e86..8f3db5b 100644 --- a/os_dep.c +++ b/os_dep.c @@ -2138,15 +2138,7 @@ void GC_register_data_segments(void) # define OPT_MAP_ANON 0 #endif -# ifdef MSWIN_XBOX1 - void *durango_get_mem(size_t bytes, size_t page_size) - { - if (0 == bytes) return NULL; - return VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_TOP_DOWN, - PAGE_READWRITE); - } - -# else +# ifndef MSWIN_XBOX1 # if defined(SYMBIAN) && !defined(USE_MMAP_ANON) EXTERN_C_BEGIN extern char *GC_get_private_path_and_zero_file(void); @@ -2303,6 +2295,15 @@ void * os2_alloc(size_t bytes) # endif /* OS2 */ +# ifdef MSWIN_XBOX1 + void *durango_get_mem(size_t bytes, size_t page_size) + { + if (0 == bytes) return NULL; + return VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_TOP_DOWN, + PAGE_READWRITE); + } +# endif + #ifdef MSWINCE ptr_t GC_wince_get_mem(size_t bytes) { -- 2.7.4