From 6c9bd474aa08312ef2e2e9655a80e18db24a1680 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sun, 29 Apr 2012 16:18:12 -0700 Subject: Fix type mismatch between get_crc_table() and crc_table. crc_table is made using a four-byte integer (when that can be determined). However get_crc_table() returned a pointer to an unsigned long, which could be eight bytes. This fixes that by creating a new z_crc_t type for the crc_table. This type is also used for the BYFOUR crc calculations that depend on a four-byte type. The four-byte type can now be determined by ./configure, which also solves a problem where ./configure --solo would never use BYFOUR. No the Z_U4 #define indicates that four- byte integer was found either by ./configure or by zconf.h. --- crc32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crc32.h') diff --git a/crc32.h b/crc32.h index c3e7171..9e0c778 100644 --- a/crc32.h +++ b/crc32.h @@ -2,7 +2,7 @@ * Generated automatically by crc32.c */ -local const crc_table_t FAR crc_table[TBLS][256] = +local const z_crc_t FAR crc_table[TBLS][256] = { { 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, -- cgit v1.2.3-55-g6feb