diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2012-04-29 16:18:12 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2012-04-29 16:18:12 -0700 |
commit | 6c9bd474aa08312ef2e2e9655a80e18db24a1680 (patch) | |
tree | 2539e04a1037206dc3853fbdbb33194bb2690aaa /crc32.h | |
parent | 1be117908397b0ce065c07c60fa2b4ae778ff112 (diff) | |
download | zlib-6c9bd474aa08312ef2e2e9655a80e18db24a1680.tar.gz zlib-6c9bd474aa08312ef2e2e9655a80e18db24a1680.tar.bz2 zlib-6c9bd474aa08312ef2e2e9655a80e18db24a1680.zip |
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.
Diffstat (limited to 'crc32.h')
-rw-r--r-- | crc32.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2,7 +2,7 @@ | |||
2 | * Generated automatically by crc32.c | 2 | * Generated automatically by crc32.c |
3 | */ | 3 | */ |
4 | 4 | ||
5 | local const crc_table_t FAR crc_table[TBLS][256] = | 5 | local const z_crc_t FAR crc_table[TBLS][256] = |
6 | { | 6 | { |
7 | { | 7 | { |
8 | 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, | 8 | 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, |