2 ===================================================================
3 --- bsdsfv.orig/bsdsfv.c
5 @@ -59,10 +59,10 @@ typedef struct sfvtable {
13 -UpdateCRC(unsigned long CRC, const char *buffer, long count)
15 +UpdateCRC(uint32_t CRC, const char *buffer, int32_t count)
18 * Note: if you want to know how CRC32-checking works, I
19 @@ -70,7 +70,7 @@ UpdateCRC(unsigned long CRC, const char
20 * There is not much you can change in this function, so
21 * if you need a CRC32-check yourself, feel free to rip.
23 - unsigned long CRCTABLE[] = {
24 + uint32_t CRCTABLE[] = {
25 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
27 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e,
28 @@ -175,13 +175,13 @@ UpdateCRC(unsigned long CRC, const char
34 GetFileCRC(char *filename)
36 - unsigned long crc = 0xffffffff;
37 + uint32_t crc = 0xffffffff;
41 + int32_t totalread = 0;
45 * Note: different buffer sizes may result in noticable
46 @@ -306,7 +306,7 @@ main(int argc, char *argv[])
54 char cfname[FNAMELEN];
55 @@ -487,8 +487,8 @@ main(int argc, char *argv[])
56 printf("Adding file: %s ... ", cfname);
58 mycrc = GetFileCRC(cfname);
59 - printf("CRC = 0x%08lX\n", mycrc);
60 - sprintf(sfvline, "%s %08lX", cfname, mycrc);
61 + printf("CRC = 0x%08" PRIX32 "\n", mycrc);
62 + sprintf(sfvline, "%s %08" PRIX32, cfname, mycrc);
64 // uncomment next 2 lines to
65 // convert filename to upper case, for whatever reason
66 @@ -516,7 +516,7 @@ main(int argc, char *argv[])
67 printf("Testing %s ... ", cfname);
69 mycrc = GetFileCRC(cfname);
70 - printf("local = 0x%08lX, listed = ", mycrc);
71 + printf("local = 0x%08" PRIX32 ", listed = ", mycrc);
74 sfvfile = fopen(sfvname, "rt");
75 @@ -675,7 +675,7 @@ main(int argc, char *argv[])
77 mycrc = GetFileCRC(dp->d_name);
79 - printf("local = 0x%08lX ... ", mycrc);
80 + printf("local = 0x%08" PRIX32 " ... ", mycrc);
82 if (mycrc == sfvTable[cnt].crc) {