mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
environ is only for Linux
This commit is contained in:
+3
-1
@@ -246,11 +246,13 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
|
|||||||
}
|
}
|
||||||
array_add(&envs, str);
|
array_add(&envs, str);
|
||||||
}
|
}
|
||||||
#else
|
#elif defined(GB_SYSTEM_LINUX)
|
||||||
char **curr_env = environ;
|
char **curr_env = environ;
|
||||||
while (curr_env && *curr_env) {
|
while (curr_env && *curr_env) {
|
||||||
array_add(&envs, make_string_c(*curr_env++));
|
array_add(&envs, make_string_c(*curr_env++));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// TODO(bill): environment variables on all other platforms
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
array_sort(envs, string_cmp);
|
array_sort(envs, string_cmp);
|
||||||
|
|||||||
Reference in New Issue
Block a user