aboutsummaryrefslogtreecommitdiff
path: root/src/libflate
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 /src/libflate
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 'src/libflate')
-rw-r--r--src/libflate/adler.c6
-rw-r--r--src/libflate/crc.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/libflate/adler.c b/src/libflate/adler.c
index 22fb8f6d..538e70f7 100644
--- a/src/libflate/adler.c
+++ b/src/libflate/adler.c
@@ -8,10 +8,10 @@ enum
ADLERBASE = 65521 /* largest prime smaller than 65536 */
};
-ulong
-adler32(ulong adler, void *vbuf, int n)
+uint32
+adler32(uint32 adler, void *vbuf, int n)
{
- ulong s1, s2;
+ uint32 s1, s2;
uchar *buf, *ebuf;
int m;
diff --git a/src/libflate/crc.c b/src/libflate/crc.c
index 4da78f6c..8085c23e 100644
--- a/src/libflate/crc.c
+++ b/src/libflate/crc.c
@@ -2,11 +2,11 @@
#include <libc.h>
#include <flate.h>
-ulong*
-mkcrctab(ulong poly)
+uint32*
+mkcrctab(uint32 poly)
{
- ulong *crctab;
- ulong crc;
+ uint32 *crctab;
+ uint32 crc;
int i, j;
crctab = malloc(256 * sizeof(ulong));
@@ -26,8 +26,8 @@ mkcrctab(ulong poly)
return crctab;
}
-ulong
-blockcrc(ulong *crctab, ulong crc, void *vbuf, int n)
+uint32
+blockcrc(uint32 *crctab, uint32 crc, void *vbuf, int n)
{
uchar *buf, *ebuf;