From: Brendan Hansen Date: Sat, 2 Dec 2023 04:25:30 +0000 (-0600) Subject: fixed: windows compilation X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=446f46e933eeabb08e720ce955808230b8c94b41;p=onyx.git fixed: windows compilation --- diff --git a/runtime/src/ort_directories.h b/runtime/src/ort_directories.h index 36e6406a..d5d37e29 100644 --- a/runtime/src/ort_directories.h +++ b/runtime/src/ort_directories.h @@ -180,13 +180,17 @@ 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)); - if (length == 0 || length > params->data[1].of.i32) { - results->data[0] = WASM_I32_VAL(-1); - return NULL; - } - - results->data[0] = WASM_I32_VAL( length ); + // The GetCurrentDirectory symbol is causing a linker error. + // For a hotfix, I am leaving these unimplemented for now, + // but they should be fixed asap. + // + // int length = GetCurrentDirectory(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; + // } + + results->data[0] = WASM_I32_VAL(-1); return NULL; #endif } @@ -199,8 +203,12 @@ ONYX_DEF(__dir_chdir, (WASM_I32), (WASM_I32)) { #endif #if defined(_BH_WINDOWS) - int result = SetCurrentDirectory(ONYX_PTR(params->data[0].of.i32)); - results->data[0] = WASM_I32_VAL(result ? 1 : 0); + // The SetCurrentDirectory symbol is causing a linker error. + // For a hotfix, I am leaving these unimplemented for now, + // but they should be fixed asap. + // + // int result = SetCurrentDirectory(ONYX_PTR(params->data[0].of.i32)); + results->data[0] = WASM_I32_VAL(0); return NULL; #endif }