summaryrefslogtreecommitdiff
path: root/crc32.c
diff options
context:
space:
mode:
authorMika Lindqvist <postmaster@raasu.org>2015-12-14 10:11:39 +0200
committerMika Lindqvist <postmaster@raasu.org>2015-12-14 11:00:22 +0200
commit9c3a28087793a922367f1f5d6a8ffea9a9b14fd5 (patch)
tree9ace9c59c235da0d7c0e56813b53df206277e2ec /crc32.c
parente478ddb4639fb28f1baba83930d780a9dc5aae53 (diff)
Type cleanup.
Diffstat (limited to 'crc32.c')
-rw-r--r--crc32.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crc32.c b/crc32.c
index 7ab796d..960a552 100644
--- a/crc32.c
+++ b/crc32.c
@@ -13,7 +13,7 @@
#ifdef __MINGW32__
# include <sys/param.h>
-#elif _WIN32
+#elif defined(WIN32) || defined(_WIN32)
# define LITTLE_ENDIAN 1234
# define BIG_ENDIAN 4321
# if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)
@@ -49,9 +49,9 @@
#include "deflate.h"
#if BYTE_ORDER == LITTLE_ENDIAN
-static uint32_t crc32_little(uint32_t, const unsigned char *, unsigned);
+static uint32_t crc32_little(uint32_t, const unsigned char *, z_off64_t);
#elif BYTE_ORDER == BIG_ENDIAN
-static uint32_t crc32_big(uint32_t, const unsigned char *, unsigned);
+static uint32_t crc32_big(uint32_t, const unsigned char *, z_off64_t);
#endif
/* Local functions for crc concatenation */
@@ -196,7 +196,7 @@ const uint32_t * ZEXPORT get_crc_table(void) {
#define DO4 DO1; DO1; DO1; DO1
/* ========================================================================= */
-uint32_t ZEXPORT crc32(uint32_t crc, const unsigned char *buf, uInt len) {
+uint32_t ZEXPORT crc32(uint32_t crc, const unsigned char *buf, z_off64_t len) {
if (buf == Z_NULL) return 0;
#ifdef DYNAMIC_CRC_TABLE
@@ -240,7 +240,7 @@ uint32_t ZEXPORT crc32(uint32_t crc, const unsigned char *buf, uInt len) {
#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
/* ========================================================================= */
-static uint32_t crc32_little(uint32_t crc, const unsigned char *buf, unsigned len) {
+static uint32_t crc32_little(uint32_t crc, const unsigned char *buf, z_off64_t len) {
register uint32_t c;
register const uint32_t *buf4;
@@ -282,7 +282,7 @@ static uint32_t crc32_little(uint32_t crc, const unsigned char *buf, unsigned le
#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
/* ========================================================================= */
-static uint32_t crc32_big(uint32_t crc, const unsigned char *buf, unsigned len) {
+static uint32_t crc32_big(uint32_t crc, const unsigned char *buf, z_off64_t len) {
register uint32_t c;
register const uint32_t *buf4;