]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Enable LIT_MEM by default expect when WITH_REDUCED_MEM is ON.
authorNathan Moinvaziri <nathan@nathanm.com>
Tue, 30 Jan 2024 17:15:06 +0000 (09:15 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 7 Feb 2024 18:15:56 +0000 (19:15 +0100)
CMakeLists.txt
configure
deflate.h

index 4b0f5fcd4d236bfa618c14e44b71d460d8228b5c..0d4659f4cf75187a6bcb6a82e8baae0e04d9a2d8 100644 (file)
@@ -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()
 
index 93090bab4f98a695052c1f10e967f5c2f75afa6d..04b5f580486a2a7c885e0bbfb46f46ba4d998459 100755 (executable)
--- 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
index 392cf117bcfb8debb184f9e7e5ed007b5207ce94..f49ea06b542586b2b23959545370a99b208ffd05 100644 (file)
--- 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.