From 2bda27b80d06742915cbbafc74096a14b24e64e9 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 25 Oct 2024 19:49:26 +0200 Subject: [PATCH] Revert "those should be size_t" This reverts commit b357c09171d52c891b1a829775d000bb9c3596b6. --- src/lzf.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/lzf.c b/src/lzf.c index d5a837888..751ff4518 100644 --- a/src/lzf.c +++ b/src/lzf.c @@ -451,8 +451,16 @@ lzf_compress (const void *const in_data, size_t in_len, * and fails to support both assumptions is windows 64 bit, we make a * special workaround for it. */ - - size_t off; +#if defined (_WIN32) && defined (_M_X64) + /* workaround for missing POSIX compliance */ +#if __GNUC__ + unsigned long long off; +#else + unsigned __int64 off; +#endif +#else + unsigned long off; +#endif unsigned int hval; int lit; @@ -490,7 +498,7 @@ lzf_compress (const void *const in_data, size_t in_len, { /* match found at *ref++ */ unsigned int len = 2; - size_t maxlen = in_end - ip - len; + unsigned int maxlen = in_end - ip - len; maxlen = maxlen > LZF_MAX_REF ? LZF_MAX_REF : maxlen; if (expect_false (op + 3 + 1 >= out_end)) /* first a faster conservative test */