summaryrefslogtreecommitdiff
path: root/games/o2em/wordsize.diff
blob: f62b1574f8f895e618210db2d5b2cc4760158af1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
diff -Naur o2em118src/src/crc32.c o2em118src.patched//src/crc32.c
--- o2em118src/src/crc32.c	2006-10-08 10:46:16.000000000 -0400
+++ o2em118src.patched//src/crc32.c	2011-01-13 17:40:03.000000000 -0500
@@ -20,7 +20,7 @@
 #include "crc32.h"
 
 
-static unsigned long crc32tab[256] = {
+static unsigned int crc32tab[256] = {
 	0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
 	0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
 	0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
@@ -88,8 +88,8 @@
 };
 
 
-unsigned long crc32_buf(const void *buf, long len){
-	unsigned long crc = ~0;
+unsigned int crc32_buf(const void *buf, int len){
+	unsigned int crc = ~0;
 	unsigned char *p = (unsigned char*)buf;
 
 	while (len--) crc = (crc >> 8) ^ crc32tab[(crc ^ (*p++)) & 0xff];
@@ -97,8 +97,8 @@
 }
 
 
-unsigned long crc32_file(const char *filename){
-	unsigned long crc = ~0;
+unsigned int crc32_file(const char *filename){
+	unsigned int crc = ~0;
 	FILE *f;
 	int c;
 	f = fopen(filename,"rb");
diff -Naur o2em118src/src/crc32.h o2em118src.patched//src/crc32.h
--- o2em118src/src/crc32.h	2004-12-28 01:53:00.000000000 -0500
+++ o2em118src.patched//src/crc32.h	2011-01-13 17:40:12.000000000 -0500
@@ -1,7 +1,7 @@
 #ifndef __CRC32_H
 #define __CRC32_H
 
-unsigned long crc32_buf(const void *buf, long len);
-unsigned long crc32_file(const char *filename);
+unsigned int crc32_buf(const void *buf, int len);
+unsigned int crc32_file(const char *filename);
 
 #endif