mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Made os_osx.odin use the new-style runtime.args__ and added read_directory for macOS
This commit is contained in:
+3
-2
@@ -3,6 +3,7 @@ package os
|
|||||||
foreign import dl "system:dl"
|
foreign import dl "system:dl"
|
||||||
foreign import libc "system:c"
|
foreign import libc "system:c"
|
||||||
|
|
||||||
|
import "core:runtime"
|
||||||
import "core:strings"
|
import "core:strings"
|
||||||
|
|
||||||
OS :: "osx";
|
OS :: "osx";
|
||||||
@@ -287,8 +288,8 @@ dlerror :: proc() -> string {
|
|||||||
|
|
||||||
|
|
||||||
_alloc_command_line_arguments :: proc() -> []string {
|
_alloc_command_line_arguments :: proc() -> []string {
|
||||||
args := make([]string, len(__args__));
|
args := make([]string, len(runtime.args__));
|
||||||
for arg, i in __args__ {
|
for arg, i in runtime.args__ {
|
||||||
args[i] = string(arg);
|
args[i] = string(arg);
|
||||||
}
|
}
|
||||||
return args;
|
return args;
|
||||||
|
|||||||
+1
-1
@@ -822,7 +822,7 @@ ReadDirectoryError read_directory(String path, Array<FileInfo> *fi) {
|
|||||||
|
|
||||||
return ReadDirectory_None;
|
return ReadDirectory_None;
|
||||||
}
|
}
|
||||||
#elif defined(GB_SYSTEM_LINUX)
|
#elif defined(GB_SYSTEM_LINUX) || defined(GB_SYSTEM_OSX)
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user