diff --git a/src/stasis/crc32.c b/src/stasis/crc32.c index 8361dfd..72e892c 100644 --- a/src/stasis/crc32.c +++ b/src/stasis/crc32.c @@ -7,7 +7,7 @@ // unsigned long crc = -1L // crc = crc32(buffer, length, crc) -unsigned int stasis_crc32(const void *buffer, unsigned int count, unsigned int crc); +uint32_t stasis_crc32(const void *buffer, unsigned int count, uint32_t crc); static int BuildCRCTable(void); static unsigned int CRCTable[256]; // Table constructed for fast lookup. @@ -34,9 +34,9 @@ static int BuildCRCTable(void) return 0; } /* changed long to int, void to const void - rusty. */ -unsigned int stasis_crc32(const void *buffer, unsigned int count, unsigned int crc) +uint32_t stasis_crc32(const void *buffer, unsigned int count, uint32_t crc) { - unsigned int temp1, temp2; + uint32_t temp1, temp2; static int firsttime = 1; unsigned char *p = (unsigned char *)buffer; diff --git a/stasis/crc32.h b/stasis/crc32.h index 69c796f..5613279 100644 --- a/stasis/crc32.h +++ b/stasis/crc32.h @@ -1,3 +1,5 @@ +#ifndef STASIS_CRC32_H +#define STASIS_CRC32_H /* This CRC code was taken from: http://www.axlradius.com/freestuff/crc2.c (It is presumably in the public domain. Other files under /freestuff/ are...) @@ -13,5 +15,6 @@ unsigned int crc = -1L crc = crc32(buffer, length, crc) */ - -unsigned int stasis_crc32(const void *buffer, unsigned int count, unsigned int crc); +#include +uint32_t stasis_crc32(const void *buffer, unsigned int count, uint32_t crc); +#endif // STASIS_CRC32_H