1
0
mirror of https://github.com/upx/upx.git synced 2025-08-11 22:52:30 +08:00

src: mention UPX_CONFIG_DISABLE_GITREV build config

This commit is contained in:
Markus F.X.J. Oberhumer
2022-11-02 02:52:20 +01:00
parent 212bc04257
commit 668cefec2f
2 changed files with 5 additions and 3 deletions

View File

@ -38,6 +38,7 @@
static bool head_done = 0;
// also see UPX_CONFIG_DISABLE_GITREV in CMakeLists.txt
#if defined(UPX_VERSION_GITREV)
const char gitrev[] = UPX_VERSION_GITREV;
#else

View File

@ -1263,11 +1263,12 @@ int upx_main(int argc, char *argv[]) {
return exit_code;
if (gitrev[0]) {
bool warn = true;
// also see UPX_CONFIG_DISABLE_GITREV in CMakeLists.txt
bool warn_gitrev = true;
const char *ee = getenv("UPX_DEBUG_DISABLE_GITREV_WARNING");
if (ee && ee[0] && strcmp(ee, "1") == 0)
warn = false;
if (warn) {
warn_gitrev = false;
if (warn_gitrev) {
FILE *f = stdout;
int fg = con_fg(f, FG_RED);
con_fprintf(