From 51a223def4382fdd0c9531ba77bd10724eae9f5f Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Tue, 28 Jul 2015 22:44:31 -0700 Subject: [PATCH] Avoid use of DEBUG macro -- change to ZLIB_DEBUG. --- Makefile.in | 2 +- deflate.c | 6 +++--- deflate.h | 4 ++-- examples/gzlog.c | 2 +- msdos/Makefile.dj2 | 2 +- msdos/Makefile.emx | 2 +- old/Makefile.emx | 2 +- old/os2/Makefile.os2 | 2 +- treebuild.xml | 2 +- trees.c | 32 ++++++++++++++++---------------- win32/Makefile.gcc | 2 +- zlib.h | 2 +- zutil.c | 4 ++-- zutil.h | 2 +- 14 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Makefile.in b/Makefile.in index 67592f34..f608c6c1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -20,7 +20,7 @@ CC=cc CFLAGS=-O #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-g -DDEBUG +#CFLAGS=-g -DZLIB_DEBUG #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ # -Wstrict-prototypes -Wmissing-prototypes diff --git a/deflate.c b/deflate.c index aeabbaee..7a9e05e5 100644 --- a/deflate.c +++ b/deflate.c @@ -92,7 +92,7 @@ local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); local uInt longest_match OF((deflate_state *s, IPos cur_match)); #endif -#ifdef DEBUG +#ifdef ZLIB_DEBUG local void check_match OF((deflate_state *s, IPos start, IPos match, int length)); #endif @@ -1349,7 +1349,7 @@ local uInt longest_match(s, cur_match) #endif /* FASTEST */ -#ifdef DEBUG +#ifdef ZLIB_DEBUG /* =========================================================================== * Check that the match at match_start is indeed a match. */ @@ -1375,7 +1375,7 @@ local void check_match(s, start, match, length) } #else # define check_match(s, start, match, length) -#endif /* DEBUG */ +#endif /* ZLIB_DEBUG */ /* =========================================================================== * Fill the window when the lookahead becomes insufficient. diff --git a/deflate.h b/deflate.h index ce0299ed..84407901 100644 --- a/deflate.h +++ b/deflate.h @@ -249,7 +249,7 @@ typedef struct internal_state { uInt matches; /* number of string matches in current block */ uInt insert; /* bytes at end of window left to insert */ -#ifdef DEBUG +#ifdef ZLIB_DEBUG ulg compressed_len; /* total bit length of compressed file mod 2^32 */ ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ #endif @@ -309,7 +309,7 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, * used. */ -#ifndef DEBUG +#ifndef ZLIB_DEBUG /* Inline versions of _tr_tally for speed: */ #if defined(GEN_TREES_H) || !defined(STDC) diff --git a/examples/gzlog.c b/examples/gzlog.c index 922f878d..f33a862a 100644 --- a/examples/gzlog.c +++ b/examples/gzlog.c @@ -243,7 +243,7 @@ typedef unsigned int uint; typedef unsigned long ulong; /* Macro for debugging to deterministically force recovery operations */ -#ifdef DEBUG +#ifdef GZLOG_DEBUG #include /* longjmp */ jmp_buf gzlog_jump; /* where to go back to */ int gzlog_bail = 0; /* which point to bail at (1..8) */ diff --git a/msdos/Makefile.dj2 b/msdos/Makefile.dj2 index 29b03954..59d2037d 100644 --- a/msdos/Makefile.dj2 +++ b/msdos/Makefile.dj2 @@ -29,7 +29,7 @@ CC=gcc #CFLAGS=-MMD -O #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-MMD -g -DDEBUG +#CFLAGS=-MMD -g -DZLIB_DEBUG CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ -Wstrict-prototypes -Wmissing-prototypes diff --git a/msdos/Makefile.emx b/msdos/Makefile.emx index 9c1b57a5..e30f67be 100644 --- a/msdos/Makefile.emx +++ b/msdos/Makefile.emx @@ -11,7 +11,7 @@ CC=gcc #CFLAGS=-MMD -O #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-MMD -g -DDEBUG +#CFLAGS=-MMD -g -DZLIB_DEBUG CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ -Wstrict-prototypes -Wmissing-prototypes diff --git a/old/Makefile.emx b/old/Makefile.emx index 4d6ab0ef..612b0379 100644 --- a/old/Makefile.emx +++ b/old/Makefile.emx @@ -11,7 +11,7 @@ CC=gcc -Zwin32 #CFLAGS=-MMD -O #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-MMD -g -DDEBUG +#CFLAGS=-MMD -g -DZLIB_DEBUG CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ -Wstrict-prototypes -Wmissing-prototypes diff --git a/old/os2/Makefile.os2 b/old/os2/Makefile.os2 index a105aaa5..bb426c0d 100644 --- a/old/os2/Makefile.os2 +++ b/old/os2/Makefile.os2 @@ -14,7 +14,7 @@ CC=gcc -Zomf -s CFLAGS=-O6 -Wall #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-g -DDEBUG +#CFLAGS=-g -DZLIB_DEBUG #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ # -Wstrict-prototypes -Wmissing-prototypes diff --git a/treebuild.xml b/treebuild.xml index 7a8ea27f..d3732d8e 100644 --- a/treebuild.xml +++ b/treebuild.xml @@ -101,7 +101,7 @@