diff options
author | Russ Cox <rsc@swtch.com> | 2010-02-07 16:51:28 -0800 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2010-02-07 16:51:28 -0800 |
commit | 9a054520852368c0a0d179bedfce60776587a645 (patch) | |
tree | 7e81f14ee45eb81ebbfbbd49e119d7f6ee7086c3 /include | |
parent | 28afa898ee3281afde739c9a09e59264680756ae (diff) | |
download | plan9port-9a054520852368c0a0d179bedfce60776587a645.tar.gz plan9port-9a054520852368c0a0d179bedfce60776587a645.tar.bz2 plan9port-9a054520852368c0a0d179bedfce60776587a645.zip |
make flate crc32 work when ulong is 64 bits
R=, rsc
CC=
http://codereview.appspot.com/203061
Diffstat (limited to 'include')
-rw-r--r-- | include/flate.h | 6 | ||||
-rw-r--r-- | include/u.h | 7 |
2 files changed, 10 insertions, 3 deletions
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 |