aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2010-02-07 16:51:28 -0800
committerRuss Cox <rsc@swtch.com>2010-02-07 16:51:28 -0800
commit9a054520852368c0a0d179bedfce60776587a645 (patch)
tree7e81f14ee45eb81ebbfbbd49e119d7f6ee7086c3 /include
parent28afa898ee3281afde739c9a09e59264680756ae (diff)
downloadplan9port-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.h6
-rw-r--r--include/u.h7
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