From e0ff940e1adb68d3575705ebf1546d9f07ad3b4a Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:27:17 -0700 Subject: zlib 1.2.3.8 --- gzguts.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gzguts.h') diff --git a/gzguts.h b/gzguts.h index 26791b0..84a9797 100644 --- a/gzguts.h +++ b/gzguts.h @@ -19,6 +19,7 @@ #ifdef STDC # include # include +# include #endif #include @@ -119,3 +120,13 @@ ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *)); #if defined UNDER_CE && defined NO_ERRNO_H ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); #endif + +/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t + value -- needed when comparing unsigned to z_off64_t, which is signed + (possible z_off64_t types off_t, off64_t, and long are all signed) */ +#ifdef INT_MAX +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) +#else +ZEXTERN unsigned ZEXPORT gz_intmax OF((void)); +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) +#endif -- cgit v1.2.3-55-g6feb