diff options
| author | gingerBill <bill@gingerbill.org> | 2024-07-09 14:47:22 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-07-09 14:47:22 +0100 |
| commit | 666703f4301353a8bd435ae88fb698a350ac8e00 (patch) | |
| tree | 8fbfa729dde37bd573eab4d6eb55eb2764485730 /src/cached.cpp | |
| parent | 14dc3598b4ef4b32e4fd1bcbf3f6f3ce3e40a9cf (diff) | |
Mock out \*nix stuff for cached.cpp
Diffstat (limited to 'src/cached.cpp')
| -rw-r--r-- | src/cached.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cached.cpp b/src/cached.cpp index 0cf9dcf5f..553ac039f 100644 --- a/src/cached.cpp +++ b/src/cached.cpp @@ -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); |