From 2650eaa946dcc2ddac04a2284e4ca523140b22bb Mon Sep 17 00:00:00 2001 From: rjkiv <76180273+rjkiv@users.noreply.github.com> Date: Mon, 1 Sep 2025 15:10:11 -0700 Subject: [PATCH] no more unhandled funcs apparently --- dll/msvcrt.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dll/msvcrt.cpp b/dll/msvcrt.cpp index 2dbaaac..422cc7f 100644 --- a/dll/msvcrt.cpp +++ b/dll/msvcrt.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -469,6 +470,23 @@ namespace msvcrt { return count; } + + int* WIN_ENTRY _errno() { + return &errno; + } + + intptr_t WIN_ENTRY _wspawnvp(int mode, const uint16_t* cmdname, const uint16_t* const * argv){ + std::string str_cmd = wideStringToString(cmdname); + DEBUG_LOG("STUB: _wspawnvp %s\n", str_cmd.c_str()); + return -1; + } + + int WIN_ENTRY _wunlink(const uint16_t *filename){ + std::string str = wideStringToString(filename); + DEBUG_LOG("_wunlink %s\n", str.c_str()); + return unlink(str.c_str()); + } + } @@ -517,6 +535,9 @@ static void *resolveByName(const char *name) { if (strcmp(name, "fputws") == 0) return (void*)msvcrt::fputws; if (strcmp(name, "fclose") == 0) return (void*)msvcrt::fclose; if (strcmp(name, "_flushall") == 0) return (void*)msvcrt::_flushall; + if (strcmp(name, "_errno") == 0) return (void*)msvcrt::_errno; + if (strcmp(name, "_wspawnvp") == 0) return (void*)msvcrt::_wspawnvp; + if (strcmp(name, "_wunlink") == 0) return (void*)msvcrt::_wunlink; return nullptr; }