diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:27:17 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:27:17 -0700 |
commit | e0ff940e1adb68d3575705ebf1546d9f07ad3b4a (patch) | |
tree | 792ac6996d1225c0955027050296126bc8ff6e26 /gzguts.h | |
parent | 7df877eccdd826e94df53215f65dee639428e83f (diff) | |
download | zlib-e0ff940e1adb68d3575705ebf1546d9f07ad3b4a.tar.gz zlib-e0ff940e1adb68d3575705ebf1546d9f07ad3b4a.tar.bz2 zlib-e0ff940e1adb68d3575705ebf1546d9f07ad3b4a.zip |
zlib 1.2.3.8v1.2.3.8
Diffstat (limited to 'gzguts.h')
-rw-r--r-- | gzguts.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -19,6 +19,7 @@ | |||
19 | #ifdef STDC | 19 | #ifdef STDC |
20 | # include <string.h> | 20 | # include <string.h> |
21 | # include <stdlib.h> | 21 | # include <stdlib.h> |
22 | # include <limits.h> | ||
22 | #endif | 23 | #endif |
23 | #include <fcntl.h> | 24 | #include <fcntl.h> |
24 | 25 | ||
@@ -119,3 +120,13 @@ ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *)); | |||
119 | #if defined UNDER_CE && defined NO_ERRNO_H | 120 | #if defined UNDER_CE && defined NO_ERRNO_H |
120 | ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); | 121 | ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); |
121 | #endif | 122 | #endif |
123 | |||
124 | /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t | ||
125 | value -- needed when comparing unsigned to z_off64_t, which is signed | ||
126 | (possible z_off64_t types off_t, off64_t, and long are all signed) */ | ||
127 | #ifdef INT_MAX | ||
128 | # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) | ||
129 | #else | ||
130 | ZEXTERN unsigned ZEXPORT gz_intmax OF((void)); | ||
131 | # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) | ||
132 | #endif | ||