fixed: `GetCurrentDirectory` linking
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 4 Jan 2024 16:22:44 +0000 (10:22 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 4 Jan 2024 16:22:44 +0000 (10:22 -0600)
runtime/src/ort_directories.h
shared/include/small_windows.h

index 7974715bf0c5b3ba3581145ed74de4113577b49b..2d9d7a6c9444e4280dd5ebf607501b73087f6720 100644 (file)
@@ -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
index edf5a5e87eed27116363b64d2242097b96ef4d92..2d9c0eeb244fc05da4ffb0e14bc24246cf5dd4ea 100644 (file)
@@ -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