diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-09-18 21:46:44 +0200 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-10-01 10:02:09 -0700 |
commit | 7142fcfeed453401ee47b0e36b5018a58575c065 (patch) | |
tree | b310ac82219eedd8fdb2f8de20123d7bd39cd6df | |
parent | a4f7c653748f5b5116e841c11af7adae7a140b88 (diff) | |
download | zlib-7142fcfeed453401ee47b0e36b5018a58575c065.tar.gz zlib-7142fcfeed453401ee47b0e36b5018a58575c065.tar.bz2 zlib-7142fcfeed453401ee47b0e36b5018a58575c065.zip |
Always add large file support for windows
-rw-r--r-- | gzlib.c | 4 | ||||
-rw-r--r-- | win32/zlib.def | 9 | ||||
-rw-r--r-- | zconf.h.in | 6 | ||||
-rw-r--r-- | zutil.h | 2 |
4 files changed, 17 insertions, 4 deletions
@@ -5,11 +5,15 @@ | |||
5 | 5 | ||
6 | #include "gzguts.h" | 6 | #include "gzguts.h" |
7 | 7 | ||
8 | #if defined(_WIN32) | ||
9 | # define LSEEK _lseeki64 | ||
10 | #else | ||
8 | #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 | 11 | #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 |
9 | # define LSEEK lseek64 | 12 | # define LSEEK lseek64 |
10 | #else | 13 | #else |
11 | # define LSEEK lseek | 14 | # define LSEEK lseek |
12 | #endif | 15 | #endif |
16 | #endif | ||
13 | 17 | ||
14 | /* Local functions */ | 18 | /* Local functions */ |
15 | local void gz_reset OF((gz_statep)); | 19 | local void gz_reset OF((gz_statep)); |
diff --git a/win32/zlib.def b/win32/zlib.def index d2e09f2..eee109f 100644 --- a/win32/zlib.def +++ b/win32/zlib.def | |||
@@ -1,6 +1,4 @@ | |||
1 | LIBRARY | ||
2 | ; zlib data compression library | 1 | ; zlib data compression library |
3 | |||
4 | EXPORTS | 2 | EXPORTS |
5 | ; basic functions | 3 | ; basic functions |
6 | zlibVersion | 4 | zlibVersion |
@@ -58,6 +56,13 @@ EXPORTS | |||
58 | gzclose_w | 56 | gzclose_w |
59 | gzerror | 57 | gzerror |
60 | gzclearerr | 58 | gzclearerr |
59 | ; large file functions | ||
60 | gzopen64 | ||
61 | gzseek64 | ||
62 | gztell64 | ||
63 | gzoffset64 | ||
64 | adler32_combine64 | ||
65 | crc32_combine64 | ||
61 | ; checksum functions | 66 | ; checksum functions |
62 | adler32 | 67 | adler32 |
63 | crc32 | 68 | crc32 |
@@ -412,11 +412,15 @@ typedef uLong FAR uLongf; | |||
412 | # define z_off_t long | 412 | # define z_off_t long |
413 | #endif | 413 | #endif |
414 | 414 | ||
415 | #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 | 415 | #if !defined(_WIN32) && (defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0) |
416 | # define z_off64_t off64_t | 416 | # define z_off64_t off64_t |
417 | #else | 417 | #else |
418 | # if defined(_WIN32) | ||
419 | # define z_off64_t __int64 | ||
420 | # else | ||
418 | # define z_off64_t z_off_t | 421 | # define z_off64_t z_off_t |
419 | #endif | 422 | #endif |
423 | #endif | ||
420 | 424 | ||
421 | #if defined(__OS400__) | 425 | #if defined(__OS400__) |
422 | # define NO_vsnprintf | 426 | # define NO_vsnprintf |
@@ -160,7 +160,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
160 | #endif | 160 | #endif |
161 | 161 | ||
162 | /* provide prototypes for these when building zlib without LFS */ | 162 | /* provide prototypes for these when building zlib without LFS */ |
163 | #if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 | 163 | #if !defined(_WIN32) && (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) |
164 | ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); | 164 | ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); |
165 | ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); | 165 | ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); |
166 | #endif | 166 | #endif |