summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <fork@madler.net>2022-10-06 17:16:23 -0700
committerMark Adler <fork@madler.net>2022-10-06 20:43:18 -0700
commit888b3da8deebe1b637259b62256512fea104d690 (patch)
tree4324d7ca51df6b234aceff570e98f00d3c222f33
parenta9e14e85415eb326000f352bce3fcb04a125406d (diff)
downloadzlib-888b3da8deebe1b637259b62256512fea104d690.tar.gz
zlib-888b3da8deebe1b637259b62256512fea104d690.tar.bz2
zlib-888b3da8deebe1b637259b62256512fea104d690.zip
Provide missing function prototypes in CRC-32 code. [fredgan]
-rw-r--r--crc32.c15
-rw-r--r--zutil.h1
2 files changed, 13 insertions, 3 deletions
diff --git a/crc32.c b/crc32.c
index c71a689..f8357b0 100644
--- a/crc32.c
+++ b/crc32.c
@@ -98,13 +98,22 @@
98# endif 98# endif
99#endif 99#endif
100 100
101/* If available, use the ARM processor CRC32 instruction. */
102#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8
103# define ARMCRC32
104#endif
105
101/* Local functions. */ 106/* Local functions. */
102local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); 107local z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
103local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); 108local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
104 109
105/* If available, use the ARM processor CRC32 instruction. */ 110#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
106#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8 111 local z_word_t byte_swap OF((z_word_t word));
107# define ARMCRC32 112#endif
113
114#if defined(W) && !defined(ARMCRC32)
115 local z_crc_t crc_word OF((z_word_t data));
116 local z_word_t crc_word_big OF((z_word_t data));
108#endif 117#endif
109 118
110#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) 119#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
diff --git a/zutil.h b/zutil.h
index d9a20ae..0bc7f4e 100644
--- a/zutil.h
+++ b/zutil.h
@@ -193,6 +193,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
193 (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) 193 (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
194 ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); 194 ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
195 ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); 195 ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
196 ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
196#endif 197#endif
197 198
198 /* common defaults */ 199 /* common defaults */