Provide missing function prototypes in CRC-32 code. [fredgan]

This commit is contained in:
Mark Adler 2022-10-06 17:16:23 -07:00
parent a9e14e8541
commit 888b3da8de
2 changed files with 13 additions and 3 deletions

15
crc32.c
View File

@ -98,13 +98,22 @@
# endif # endif
#endif #endif
/* If available, use the ARM processor CRC32 instruction. */
#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8
# define ARMCRC32
#endif
/* Local functions. */ /* Local functions. */
local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); 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)); local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
/* If available, use the ARM processor CRC32 instruction. */ #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8 local z_word_t byte_swap OF((z_word_t word));
# define ARMCRC32 #endif
#if defined(W) && !defined(ARMCRC32)
local z_crc_t crc_word OF((z_word_t data));
local z_word_t crc_word_big OF((z_word_t data));
#endif #endif
#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))

View File

@ -193,6 +193,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
#endif #endif
/* common defaults */ /* common defaults */