diff --git a/platform/native/lui_webapp/test/lui_webapp_test.ml b/platform/native/lui_webapp/test/lui_webapp_test.ml index ac0c7949..f0803fd3 100644 --- a/platform/native/lui_webapp/test/lui_webapp_test.ml +++ b/platform/native/lui_webapp/test/lui_webapp_test.ml @@ -376,13 +376,11 @@ let test_boot_fallback () = let cli_exe () = Filename.dirname Sys.executable_name / ".." / "main.exe" +(* Spawn the launcher directly: no [sh -c] indirection, whose quoting + and path translation of a native Windows path is shell-dependent + (a fresh Cygwin sh exits 127 on it). *) let run_cli args = - let cmd = - List.fold_left - (fun acc a -> acc ^ " " ^ Filename.quote a) - (Filename.quote (cli_exe ())) args - in - let r = P.Proc.run "sh" [ "-c"; cmd ] in + let r = P.Proc.run (cli_exe ()) args in (r.P.Proc.status, String.trim (r.P.Proc.stdout ^ r.P.Proc.stderr)) let test_cli_errors () = diff --git a/platform/native/lui_webview/lui_webview_stubs.m b/platform/native/lui_webview/lui_webview_stubs.m index 021c257d..677d6304 100644 --- a/platform/native/lui_webview/lui_webview_stubs.m +++ b/platform/native/lui_webview/lui_webview_stubs.m @@ -1025,6 +1025,12 @@ extern __declspec(dllimport) long LUI_STDCALL GetHGlobalFromStream( extern __declspec(dllimport) long LUI_STDCALL CreateStreamOnHGlobal( void *, int, void **); extern __declspec(dllimport) void LUI_STDCALL CoTaskMemFree(void *); +#else +/* came in via SDL_syswm.h, which defines + WIN32_LEAN_AND_MEAN: that skips the COM headers, so the real + CoTaskMemFree / CreateStreamOnHGlobal / GetHGlobalFromStream protos + must be pulled in explicitly. */ +#include #endif /* !WINAPI — no real Win32 headers in this TU */ typedef struct {