mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Mock out \*nix stuff for cached.cpp
This commit is contained in:
+7
-1
@@ -115,7 +115,8 @@ gb_internal bool check_if_exists_directory_otherwise_create(String const &str) {
|
|||||||
#else
|
#else
|
||||||
char const *str_c = alloc_cstring(permanent_allocator(), str);
|
char const *str_c = alloc_cstring(permanent_allocator(), str);
|
||||||
if (!gb_file_exists(str_c)) {
|
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;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
@@ -245,6 +246,11 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
|
|||||||
}
|
}
|
||||||
array_add(&envs, str);
|
array_add(&envs, str);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
char **curr_env = environ;
|
||||||
|
while (curr_env && *curr_env) {
|
||||||
|
array_add(&envs, make_string_c(*curr_env++));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
array_sort(envs, string_cmp);
|
array_sort(envs, string_cmp);
|
||||||
|
|||||||
Reference in New Issue
Block a user