From: Nathan Moinvaziri Date: Tue, 30 Jan 2024 17:15:06 +0000 (-0800) Subject: Enable LIT_MEM by default expect when WITH_REDUCED_MEM is ON. X-Git-Tag: 2.2.0~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ef6098a65edc1a8656a3f737a0434dff503c328;p=thirdparty%2Fzlib-ng.git Enable LIT_MEM by default expect when WITH_REDUCED_MEM is ON. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b0f5fcd..0d4659f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -537,7 +537,7 @@ endif() # Enable reduced memory configuration # if(WITH_REDUCED_MEM) - add_definitions(-DHASH_SIZE=32768u -DGZBUFSIZE=8192) + add_definitions(-DHASH_SIZE=32768u -DGZBUFSIZE=8192 -DNO_LIT_MEM) message(STATUS "Configured for reduced memory environment") endif() diff --git a/configure b/configure index 93090bab..04b5f580 100755 --- a/configure +++ b/configure @@ -858,7 +858,7 @@ fi # enable reduced memory configuration if test $reducedmem -eq 1; then echo "Configuring for reduced memory environment." | tee -a configure.log - CFLAGS="${CFLAGS} -DHASH_SIZE=32768u -DGZBUFSIZE=8192" + CFLAGS="${CFLAGS} -DHASH_SIZE=32768u -DGZBUFSIZE=8192 -DNO_LIT_MEM" fi # if code coverage testing was requested, use older gcc if defined, e.g. "gcc-4.2" on Mac OS X diff --git a/deflate.h b/deflate.h index 392cf117..f49ea06b 100644 --- a/deflate.h +++ b/deflate.h @@ -24,7 +24,9 @@ /* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at the cost of a larger memory footprint */ -/* #define LIT_MEM */ +#ifndef NO_LIT_MEM +# define LIT_MEM +#endif /* =========================================================================== * Internal compression state.