summaryrefslogtreecommitdiff
path: root/crc32.c
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 /crc32.c
parenta9e14e85415eb326000f352bce3fcb04a125406d (diff)
downloadzlib-888b3da8deebe1b637259b62256512fea104d690.tar.gz
Provide missing function prototypes in CRC-32 code. [fredgan]
Diffstat (limited to 'crc32.c')
-rw-r--r--crc32.c15
1 files changed, 12 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 @@
# 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 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));
-/* If available, use the ARM processor CRC32 instruction. */
-#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8
-# define ARMCRC32
+#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
+ local z_word_t byte_swap OF((z_word_t word));
+#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
#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))