} lzma_check_state;
-/// lzma_crc32_table[0] is needed by LZ encoder so we need to keep
-/// the array two-dimensional.
-#ifdef HAVE_SMALL
-lzma_attr_visibility_hidden
-extern uint32_t lzma_crc32_table[1][256];
-
-extern void lzma_crc32_init(void);
-
-#else
-
-lzma_attr_visibility_hidden
-extern const uint32_t lzma_crc32_table[8][256];
-
-lzma_attr_visibility_hidden
-extern const uint64_t lzma_crc64_table[4][256];
-#endif
-
-
/// \brief Initialize *check depending on type
extern void lzma_check_init(lzma_check_state *check, lzma_check type);
///////////////////////////////////////////////////////////////////////////////
#include "check.h"
+#include "crc_common.h"
+// The table is used by the LZ encoder too, thus it's not static like
+// in crc64_small.c.
uint32_t lzma_crc32_table[1][256];
#endif
+/// lzma_crc32_table[0] is needed by LZ encoder so we need to keep
+/// the array two-dimensional.
+#ifdef HAVE_SMALL
+lzma_attr_visibility_hidden
+extern uint32_t lzma_crc32_table[1][256];
+
+extern void lzma_crc32_init(void);
+
+#else
+
+lzma_attr_visibility_hidden
+extern const uint32_t lzma_crc32_table[8][256];
+
+lzma_attr_visibility_hidden
+extern const uint64_t lzma_crc64_table[4][256];
+#endif
+
+
// Keep this in sync with changes to crc32_arm64.h
#if defined(_WIN32) || defined(HAVE_GETAUXVAL) \
|| defined(HAVE_ELF_AUX_INFO) \
#ifndef LZMA_LZ_ENCODER_HASH_H
#define LZMA_LZ_ENCODER_HASH_H
-// We need to know if CRC32_GENERIC is defined.
+// We need to know if CRC32_GENERIC is defined and we may need the declaration
+// of lzma_crc32_table[][].
#include "crc_common.h"
// If HAVE_SMALL is defined, then lzma_crc32_table[][] exists and
// then lzma_crc32_table[][] doesn't exist.
#if defined(HAVE_SMALL) \
|| (defined(CRC32_GENERIC) && !defined(WORDS_BIGENDIAN))
-# include "check.h"
# define hash_table lzma_crc32_table[0]
#else
// lz_encoder.c takes care of including the actual table.