You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-util/dzip/files/dzip-amd64.diff

31 lines
567 B

--- a/crc32.c
+++ b/crc32.c
@@ -1,10 +1,12 @@
+#include <stdint.h>
+
unsigned long crcval;
unsigned long crctable[256];
-unsigned long crc_reflect(unsigned long x, int bits)
-{
- int i;
- unsigned long v = 0, b = 1 << (bits - 1);
+unsigned long crc_reflect(uint32_t x, int bits)
+{
+ uint32_t i;
+ uint32_t v = 0, b = 1 << (bits - 1);
for (i = 0; i < bits; i++)
{
@@ -16,8 +18,8 @@
void crc_init(void)
{
- unsigned long crcpol = 0x04c11db7;
- unsigned long i, j, k;
+ uint32_t crcpol = 0x04c11db7;
+ uint32_t i, j, k;
for (i = 0; i < 256; i++)
{