CI updates; cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2024-03-16 17:46:40 +01:00
parent cfc5f42ef2
commit 54d16a458a
15 changed files with 227 additions and 177 deletions
+13
View File
@@ -768,6 +768,19 @@ int fn_strcmp(const char *n1, const char *n2) {
// misc
**************************************************************************/
bool is_envvar_true(const char *envvar, const char *alternate_name) noexcept {
// UPX convention: any environment variable that is set and is not strictly equal to "0" is true
const char *e = getenv(envvar);
if (e != nullptr && e[0])
return strcmp(e, "0") != 0;
if (alternate_name != nullptr) {
e = getenv(alternate_name);
if (e != nullptr && e[0])
return strcmp(e, "0") != 0;
}
return false;
}
bool set_method_name(char *buf, size_t size, int method, int level) {
bool r = true;
const char *alg;