From 5de3b07e2b54fcf3be089e0cf064265abcb13e63 Mon Sep 17 00:00:00 2001 From: Zachary Pierson Date: Mon, 2 Jul 2018 02:50:08 -0500 Subject: [PATCH] Made `os_osx.odin` use the new-style `runtime.args__` and added `read_directory` for macOS --- core/os/os_osx.odin | 5 +++-- src/common.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/os/os_osx.odin b/core/os/os_osx.odin index befd97257..411107706 100644 --- a/core/os/os_osx.odin +++ b/core/os/os_osx.odin @@ -3,6 +3,7 @@ package os foreign import dl "system:dl" foreign import libc "system:c" +import "core:runtime" import "core:strings" OS :: "osx"; @@ -287,8 +288,8 @@ dlerror :: proc() -> string { _alloc_command_line_arguments :: proc() -> []string { - args := make([]string, len(__args__)); - for arg, i in __args__ { + args := make([]string, len(runtime.args__)); + for arg, i in runtime.args__ { args[i] = string(arg); } return args; diff --git a/src/common.cpp b/src/common.cpp index ec6ec7798..adeebc410 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -822,7 +822,7 @@ ReadDirectoryError read_directory(String path, Array *fi) { return ReadDirectory_None; } -#elif defined(GB_SYSTEM_LINUX) +#elif defined(GB_SYSTEM_LINUX) || defined(GB_SYSTEM_OSX) #include