make flate crc32 work when ulong is 64 bits

R=, rsc
CC=
http://codereview.appspot.com/203061
This commit is contained in:
Russ Cox 2010-02-07 16:51:28 -08:00
parent 28afa898ee
commit 9a05452085
7 changed files with 25 additions and 19 deletions

View file

@ -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

View file

@ -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