From bf2d9ae6348d7885f74f51ae5b6ad29eb7a42460 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Thu, 28 Mar 2019 23:34:24 -0400 Subject: [PATCH] Mess with includes for os.c --- src/core/os.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/core/os.c b/src/core/os.c index 87289b5e..0e23f334 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -30,20 +30,23 @@ #ifndef JANET_REDUCED_OS #include +#include +#include +#include +#include +#include #ifdef JANET_WINDOWS -#include +#include #include +#include +#include #else -#include #include #include #include -#include #include #include -#include -#include #endif /* For macos */ @@ -52,7 +55,7 @@ #include #endif -#endif +#endif /* JANET_REDCUED_OS */ /* Core OS functions */ @@ -354,7 +357,11 @@ static Janet os_mkdir(int32_t argc, Janet *argv) { static Janet os_cd(int32_t argc, Janet *argv) { janet_fixarity(argc, 1); const char *path = janet_getcstring(argv, 0); +#ifdef JANET_WINDOWS + int res = _chdir(path); +#else int res = chdir(path); +#endif return janet_wrap_boolean(res != -1); }