diff options
author | David Vanderson <david.vanderson@gmail.com> | 2022-12-14 09:58:44 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2022-12-14 10:44:03 +0100 |
commit | ace97a02a4461bbdae29da4019c105eead95e277 (patch) | |
tree | 2bad29b70634ce6e69c07e420026b2af1982510c /src/gzip/crc32.c | |
parent | bc3aa767a7c4399b057c922192fc46948bf8fcf4 (diff) | |
download | freetype2-ace97a02a4461bbdae29da4019c105eead95e277.tar.gz |
[gzip] Make static compilation not leak global symbols.
* src/gzip/ftgzip.c (HAVE_HIDDEN): Do not define; it is no longer needed
because everything is static.
(HAVE_MEMCPY): Define.
(zcalloc, zcfree): Remove no longer needed definitions (because `Z_SOLO` is
active).
* src/gzip/patches/freetype-zlib.diff: Regenerated.
Fixes #1146.
Co-authored-by: Werner Lemberg <wl@gnu.org>
Diffstat (limited to 'src/gzip/crc32.c')
-rw-r--r-- | src/gzip/crc32.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gzip/crc32.c b/src/gzip/crc32.c index 3a52aa89d..6cd1b09d5 100644 --- a/src/gzip/crc32.c +++ b/src/gzip/crc32.c @@ -103,9 +103,11 @@ # define ARMCRC32 #endif +#ifndef Z_FREETYPE /* Local functions. */ local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); +#endif /* Z_FREETYPE */ #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) local z_word_t byte_swap OF((z_word_t word)); @@ -544,6 +546,8 @@ local void braid(ltl, big, n, w) * generation above. */ +#ifndef Z_FREETYPE + /* Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, reflected. For speed, this requires that a not be zero. @@ -600,6 +604,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table() return (const z_crc_t FAR *)crc_table; } +#endif /* Z_FREETYPE */ + /* ========================================================================= * Use ARM machine instructions if available. This will compute the CRC about * ten times faster than the braided calculation. This code does not check for @@ -1077,6 +1083,8 @@ unsigned long ZEXPORT crc32( return crc32_z(crc, buf, len); } +#ifndef Z_FREETYPE + /* ========================================================================= */ uLong ZEXPORT crc32_combine64( uLong crc1, @@ -1123,3 +1131,5 @@ uLong ZEXPORT crc32_combine_op( { return multmodp(op, crc1) ^ (crc2 & 0xffffffff); } + +#endif /* Z_FREETYPE */ |