Skip to content

Commit 888b3da

Browse files
author
Mark Adler
committed
Provide missing function prototypes in CRC-32 code. [fredgan]
1 parent a9e14e8 commit 888b3da

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

crc32.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,22 @@
9898
# endif
9999
#endif
100100

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+
101106
/* Local functions. */
102107
local z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
103108
local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
104109

105-
/* If available, use the ARM processor CRC32 instruction. */
106-
#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8
107-
# define ARMCRC32
110+
#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
111+
local z_word_t byte_swap OF((z_word_t word));
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));
108117
#endif
109118

110119
#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))

zutil.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
193193
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
194194
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
195195
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
196+
ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
196197
#endif
197198

198199
/* common defaults */

0 commit comments

Comments
 (0)