diff --git a/src/help.cpp b/src/help.cpp index fa6188e0..466be72c 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -314,13 +314,13 @@ void show_help(int verbose) // "\nUPX comes with ABSOLUTELY NO WARRANTY; for details type 'upx -L'.\n" ""); -#if (DEBUG) || (TESTING) +#if DEBUG || TESTING fg = con_fg(f,FG_RED); con_fprintf(f,"\nWARNING: this version is compiled with" -#if (DEBUG) +#if DEBUG " -DDEBUG" #endif -#if (TESTING) +#if TESTING " -DTESTING" #endif "\n"); diff --git a/src/p_tos.cpp b/src/p_tos.cpp index 33ffd479..169f6ef5 100644 --- a/src/p_tos.cpp +++ b/src/p_tos.cpp @@ -405,10 +405,11 @@ void PackTos::pack(OutputFile *fo) { overlay = file_size - (FH_SIZE + i_text + i_data + i_sym); fi->readx(ibuf + t, overlay); -#if 0 || (TESTING) - printf("text: %d, data: %d, sym: %d, bss: %d, flags=0x%x\n", - i_text, i_data, i_sym, i_bss, (int)ih.fh_flag); - printf("xx1 reloc: %d, overlay: %d, fixup: %d\n", relocsize, overlay, overlay >= 4 ? (int)get_be32(ibuf+t) : -1); +#if TESTING + printf("text: %d, data: %d, sym: %d, bss: %d, flags=0x%x\n", i_text, i_data, i_sym, i_bss, + (int) ih.fh_flag); + printf("xx1 reloc: %d, overlay: %d, fixup: %d\n", relocsize, overlay, + overlay >= 4 ? (int) get_be32(ibuf + t) : -1); #endif // Check relocs (see load_and_reloc() in freemint/sys/memory.c). @@ -431,7 +432,7 @@ void PackTos::pack(OutputFile *fo) { symbols.need_reloc = true; } -#if 0 || (TESTING) +#if TESTING printf("xx2: %d relocs: %d, overlay: %d, t: %d\n", nrelocs, relocsize, overlay, t); #endif @@ -442,7 +443,7 @@ void PackTos::pack(OutputFile *fo) { ih.fh_sym = 0; // we stripped all symbols memcpy(ibuf + t, &ih, FH_SIZE); t += FH_SIZE; -#if 0 || (TESTING) +#if TESTING printf("xx3 reloc: %d, overlay: %d, t: %d\n", relocsize, overlay, t); #endif assert(t <= isize); @@ -633,11 +634,11 @@ void PackTos::pack(OutputFile *fo) { // add an empty relocation fixup to workaround a bug in some TOS versions oh.fh_reloc = 0; -#if 0 || (TESTING) - printf("old text: %6d, data: %6d, bss: %6d, reloc: %d, overlay: %d\n", - i_text, i_data, i_bss, relocsize, overlay); - printf("new text: %6d, data: %6d, bss: %6d, flag=0x%x\n", - o_text, o_data, o_bss, (int)oh.fh_flag); +#if TESTING + printf("old text: %6d, data: %6d, bss: %6d, reloc: %d, overlay: %d\n", i_text, i_data, i_bss, + relocsize, overlay); + printf("new text: %6d, data: %6d, bss: %6d, flag=0x%x\n", o_text, o_data, o_bss, + (int) oh.fh_flag); linker->dumpSymbols(); #endif diff --git a/src/pefile.cpp b/src/pefile.cpp index 1dfad1c1..84baf04d 100644 --- a/src/pefile.cpp +++ b/src/pefile.cpp @@ -1079,7 +1079,7 @@ unsigned PeFile::processImports0(ord_mask_t ord_mask) // pass 1 // This decreases compression ratio, so FIXME somehow. infoWarning("can't remove unneeded imports"); ilen += sizeof(import_desc) * dllnum; -#if defined(DEBUG) +#if TESTING if (opt->verbose > 3) names.dump(); #endif @@ -1194,7 +1194,7 @@ void PeFile::Export::convert(unsigned eoffs,unsigned esize) iv.flatten(); if (iv.ivnum == 1) iv.clear(); -#if defined(DEBUG) +#if TESTING else iv.dump(); #endif @@ -1853,7 +1853,7 @@ bool PeFile::Resource::clear() iv.flatten(); if (iv.ivnum == 1) iv.clear(); -#if defined(DEBUG) +#if TESTING if (opt->verbose > 3) iv.dump(); #endif