From: Brendan Hansen Date: Thu, 4 Jan 2024 16:22:44 +0000 (-0600) Subject: fixed: `GetCurrentDirectory` linking X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=9970eacf211467e3323578be69017f8ed4010a1a;p=onyx.git fixed: `GetCurrentDirectory` linking --- diff --git a/runtime/src/ort_directories.h b/runtime/src/ort_directories.h index 7974715b..2d9d7a6c 100644 --- a/runtime/src/ort_directories.h +++ b/runtime/src/ort_directories.h @@ -181,7 +181,7 @@ ONYX_DEF(__dir_cwd, (WASM_I32, WASM_I32), (WASM_I32)) { #endif #if defined(_BH_WINDOWS) - int length = GetCurrentDirectory(params->data[1].of.i32, ONYX_PTR(params->data[0].of.i32)); + int length = GetCurrentDirectoryA(params->data[1].of.i32, ONYX_PTR(params->data[0].of.i32)); if (length == 0 || length > params->data[1].of.i32) { results->data[0] = WASM_I32_VAL(-1); return NULL; @@ -200,7 +200,7 @@ ONYX_DEF(__dir_chdir, (WASM_I32), (WASM_I32)) { #endif #if defined(_BH_WINDOWS) - int result = SetCurrentDirectory(ONYX_PTR(params->data[0].of.i32)); + int result = SetCurrentDirectoryA(ONYX_PTR(params->data[0].of.i32)); results->data[0] = WASM_I32_VAL(result ? 1 : 0); return NULL; #endif diff --git a/shared/include/small_windows.h b/shared/include/small_windows.h index edf5a5e8..2d9c0eeb 100644 --- a/shared/include/small_windows.h +++ b/shared/include/small_windows.h @@ -467,8 +467,8 @@ GB_DLL_IMPORT int BCryptCloseAlgorithmProvider( GB_DLL_IMPORT void WINAPI WakeByAddressSingle(void * Address); GB_DLL_IMPORT BOOL WINAPI WaitOnAddress(volatile void * Address, void * compareAddress, size_t addressSize, DWORD milliseconds); -GB_DLL_IMPORT DWORD GetCurrentDirectory(DWORD nBufferLength, char *lpBuffer); -GB_DLL_IMPORT BOOL SetCurrentDirectory(char *lpPathName); +GB_DLL_IMPORT DWORD GetCurrentDirectoryA(DWORD nBufferLength, char *lpBuffer); +GB_DLL_IMPORT BOOL SetCurrentDirectoryA(char *lpPathName); GB_DLL_IMPORT DWORD GetFileAttributesA(char *lpPathName); GB_DLL_IMPORT BOOL SetFileAttributesA(char *lpPathName, DWORD attrs); \ No newline at end of file