From c267ef7306fe9fc1399833e3556cd9798dec2eb0 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Mon, 5 Jan 2026 01:15:38 -0600 Subject: Use atomics to build inflate fixed tables once. This moves the once code from crc32.c to zutil.c, and uses it also for building the inflate fixed tables when BUILDFIXED is defined. The fixed tables are now housed in inftrees.c, shared by inflate.c and infback.c. The once() function is now external, and so is renamed to z_once() to avoid name collisions. If either BUILDFIXED or DYNAMIC_CRC_TABLE is defined, and atomics are not available, then a warning is issued noting that zlib is not thread-safe. --- zlib.map | 2 ++ 1 file changed, 2 insertions(+) (limited to 'zlib.map') diff --git a/zlib.map b/zlib.map index e267d82..aba65ab 100644 --- a/zlib.map +++ b/zlib.map @@ -11,9 +11,11 @@ ZLIB_1.2.0 { inflate_copyright; inflate_fast; inflate_table; + inflate_fixed; zcalloc; zcfree; z_errmsg; + z_once; gz_error; gz_intmax; _*; -- cgit v1.2.3-55-g6feb