From 9a054520852368c0a0d179bedfce60776587a645 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 7 Feb 2010 16:51:28 -0800 Subject: make flate crc32 work when ulong is 64 bits R=, rsc CC= http://codereview.appspot.com/203061 --- include/flate.h | 6 +++--- include/u.h | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/flate.h b/include/flate.h index e908ec25..e4855597 100644 --- a/include/flate.h +++ b/include/flate.h @@ -42,10 +42,10 @@ int deflatezlibblock(uchar *dst, int dsize, uchar *src, int ssize, int level, in char *flateerr(int err); -ulong *mkcrctab(ulong); -ulong blockcrc(ulong *tab, ulong crc, void *buf, int n); +uint32 *mkcrctab(uint32); +uint32 blockcrc(uint32 *tab, uint32 crc, void *buf, int n); -ulong adler32(ulong adler, void *buf, int n); +uint32 adler32(uint32 adler, void *buf, int n); #if defined(__cplusplus) } #endif diff --git a/include/u.h b/include/u.h index e4279179..0e56f98b 100644 --- a/include/u.h +++ b/include/u.h @@ -157,6 +157,13 @@ typedef intptr_t intptr; typedef uint32_t u32int; typedef int32_t s32int; +typedef u32int uint32; +typedef s32int int32; +typedef u16int uint16; +typedef s16int int16; +typedef u64int uint64; +typedef s64int int64; + #undef _NEEDUCHAR #undef _NEEDUSHORT #undef _NEEDUINT -- cgit v1.2.3