From 48864bde48a8c37dee0d3ee1d20d30ad9b57a913 Mon Sep 17 00:00:00 2001 From: A Hedge Witch Date: Mon, 15 Nov 2021 13:36:26 -0500 Subject: [PATCH] fix Windows build: fix #149 and fix #163 --- buildscript/winsetup.bat | 6 +++--- src/packages/async.fdoc | 2 +- src/packages/rtl-pthread-impl.fdoc | 3 ++- src/re2/re2/util/util.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/buildscript/winsetup.bat b/buildscript/winsetup.bat index 9d7105dbd..7596f1e23 100755 --- a/buildscript/winsetup.bat +++ b/buildscript/winsetup.bat @@ -1,7 +1,7 @@ -call buildscript\pushp c:\ocaml\bin -call buildscript\pushp c:\ocaml +call buildscript\pushp c:\ocamlms64\bin +call buildscript\pushp c:\ocamlms64 call buildscript\pushp build\release\host\lib\rtl call buildscript\pushp build\release\host\bin -set ocamllib=c:\ocaml\lib +set ocamllib=c:\ocamlms64\lib\ocaml set FLX_MIN_MEM=1005 set PWD=%cd% diff --git a/src/packages/async.fdoc b/src/packages/async.fdoc index e083a0a9c..8484d7442 100644 --- a/src/packages/async.fdoc +++ b/src/packages/async.fdoc @@ -124,7 +124,7 @@ static ::flx::gc::generic::offset_data_t const async_sched_offset_data = { 1, as // *************************************************** thread_kind_t async_sched::get_thread_kind() const { - thread_data->thread_kind; + return thread_data->thread_kind; } // *************************************************** diff --git a/src/packages/rtl-pthread-impl.fdoc b/src/packages/rtl-pthread-impl.fdoc index b2d5cdd8c..b2d5f97ce 100644 --- a/src/packages/rtl-pthread-impl.fdoc +++ b/src/packages/rtl-pthread-impl.fdoc @@ -397,6 +397,7 @@ DWORD WINAPI flx_pthread_start_wrapper(LPVOID e) { void *stack_base = get_stack_pointer(); tstart_t *ehd = (tstart_t*)e; + thread_kind_t k = ehd->thread_kind; thread_control_base_t *tc = ehd -> tc; if(tc == 0) { @@ -536,7 +537,7 @@ flx_thread_t::init(void (*fn)(void*), void *lParam, thread_control_base_t *tc) DWORD thread_id = 0; thr= (HANDLE)CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)nonflx_pthread_start_wrapper, - new tstart_t(fn,lParam, tc,NULL,NULL,NULL), 0, + new tstart_t(fn,lParam, tc,NULL,NULL,NULL,joinable), 0, &thread_id ); diff --git a/src/re2/re2/util/util.h b/src/re2/re2/util/util.h index 34a0ce534..9957d8913 100644 --- a/src/re2/re2/util/util.h +++ b/src/re2/re2/util/util.h @@ -50,7 +50,7 @@ using std::tr1::unordered_set; #else #include -#if defined(WIN32) || defined(OS_ANDROID) +#if defined(OS_ANDROID) using std::tr1::unordered_set; #else using std::unordered_set;