mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 04:50:29 +00:00
Mock out \*nix stuff for cached.cpp
This commit is contained in:
@@ -115,7 +115,8 @@ gb_internal bool check_if_exists_directory_otherwise_create(String const &str) {
|
||||
#else
|
||||
char const *str_c = alloc_cstring(permanent_allocator(), str);
|
||||
if (!gb_file_exists(str_c)) {
|
||||
return false;
|
||||
int status = mkdir(str_c, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
return status == 0;
|
||||
}
|
||||
return false;
|
||||
#endif
|
||||
@@ -245,6 +246,11 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
|
||||
}
|
||||
array_add(&envs, str);
|
||||
}
|
||||
#else
|
||||
char **curr_env = environ;
|
||||
while (curr_env && *curr_env) {
|
||||
array_add(&envs, make_string_c(*curr_env++));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
array_sort(envs, string_cmp);
|
||||
|
||||
Reference in New Issue
Block a user