mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-08 03:39:25 -04:00
deflate_decompress: remove len_t typedef
Solaris already defines 'len_t' in <sys/types.h>, which causes a build error. This typedef isn't important, so just remove it and use u8 directly. Fixes https://github.com/ebiggers/libdeflate/issues/159
This commit is contained in:
parent
3f21ec9d61
commit
dc64ccfb25
@ -98,11 +98,6 @@
|
|||||||
#define LITLEN_ENOUGH 1334 /* enough 288 10 15 */
|
#define LITLEN_ENOUGH 1334 /* enough 288 10 15 */
|
||||||
#define OFFSET_ENOUGH 402 /* enough 32 8 15 */
|
#define OFFSET_ENOUGH 402 /* enough 32 8 15 */
|
||||||
|
|
||||||
/*
|
|
||||||
* Type for codeword lengths.
|
|
||||||
*/
|
|
||||||
typedef u8 len_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The main DEFLATE decompressor structure. Since this implementation only
|
* The main DEFLATE decompressor structure. Since this implementation only
|
||||||
* supports full buffer decompression, this structure does not store the entire
|
* supports full buffer decompression, this structure does not store the entire
|
||||||
@ -121,12 +116,12 @@ struct libdeflate_decompressor {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
union {
|
union {
|
||||||
len_t precode_lens[DEFLATE_NUM_PRECODE_SYMS];
|
u8 precode_lens[DEFLATE_NUM_PRECODE_SYMS];
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
len_t lens[DEFLATE_NUM_LITLEN_SYMS +
|
u8 lens[DEFLATE_NUM_LITLEN_SYMS +
|
||||||
DEFLATE_NUM_OFFSET_SYMS +
|
DEFLATE_NUM_OFFSET_SYMS +
|
||||||
DEFLATE_MAX_LENS_OVERRUN];
|
DEFLATE_MAX_LENS_OVERRUN];
|
||||||
|
|
||||||
u32 precode_decode_table[PRECODE_ENOUGH];
|
u32 precode_decode_table[PRECODE_ENOUGH];
|
||||||
} l;
|
} l;
|
||||||
@ -556,7 +551,7 @@ static const u32 offset_decode_results[DEFLATE_NUM_OFFSET_SYMS] = {
|
|||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
build_decode_table(u32 decode_table[],
|
build_decode_table(u32 decode_table[],
|
||||||
const len_t lens[],
|
const u8 lens[],
|
||||||
const unsigned num_syms,
|
const unsigned num_syms,
|
||||||
const u32 decode_results[],
|
const u32 decode_results[],
|
||||||
const unsigned table_bits,
|
const unsigned table_bits,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user