summaryrefslogtreecommitdiff
path: root/contrib/minizip/ioapi.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:26 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:26 -0700
commit7751bd4c715ea8478113e34b49b5a794a4642e8e (patch)
tree537ba82b3780f933c2f17028febd6fe3a2332190 /contrib/minizip/ioapi.h
parente0ff940e1adb68d3575705ebf1546d9f07ad3b4a (diff)
downloadzlib-1.2.3.9.tar.gz
zlib-1.2.3.9.tar.bz2
zlib-1.2.3.9.zip
zlib 1.2.3.9v1.2.3.9
Diffstat (limited to 'contrib/minizip/ioapi.h')
-rw-r--r--contrib/minizip/ioapi.h48
1 files changed, 27 insertions, 21 deletions
diff --git a/contrib/minizip/ioapi.h b/contrib/minizip/ioapi.h
index 1c7feb0..8309c4c 100644
--- a/contrib/minizip/ioapi.h
+++ b/contrib/minizip/ioapi.h
@@ -1,52 +1,57 @@
1/* ioapi.h -- IO base function header for compress/uncompress .zip 1/* ioapi.h -- IO base function header for compress/uncompress .zip
2 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) 2 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
3 3
4 Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) 4 Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
5 5
6 Modifications for Zip64 support 6 Modifications for Zip64 support
7 Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) 7 Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
8 8
9 For more info read MiniZip_info.txt 9 For more info read MiniZip_info.txt
10 10
11 Changes 11 Changes
12 12
13 Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) 13 Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this)
14 Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. 14 Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux.
15 More if/def section may be needed to support other platforms 15 More if/def section may be needed to support other platforms
16 Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. 16 Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows.
17 (but you should use iowin32.c for windows instead) 17 (but you should use iowin32.c for windows instead)
18 18
19*/ 19*/
20 20
21#ifndef _ZLIBIOAPI64_H 21#ifndef _ZLIBIOAPI64_H
22#define _ZLIBIOAPI64_H 22#define _ZLIBIOAPI64_H
23 23
24#ifndef _WIN32 24#if (!defined(_WIN32)) && (!defined(WIN32))
25 25
26 // Linux needs this to support file operation on files larger then 4+GB 26 // Linux needs this to support file operation on files larger then 4+GB
27 // But might need better if/def to select just the platforms that needs them. 27 // But might need better if/def to select just the platforms that needs them.
28 28
29 #ifndef __USE_FILE_OFFSET64 29 #ifndef __USE_FILE_OFFSET64
30 #define __USE_FILE_OFFSET64 30 #define __USE_FILE_OFFSET64
31 #endif 31 #endif
32 #ifndef __USE_LARGEFILE64 32 #ifndef __USE_LARGEFILE64
33 #define __USE_LARGEFILE64 33 #define __USE_LARGEFILE64
34 #endif 34 #endif
35 #ifndef _LARGEFILE64_SOURCE 35 #ifndef _LARGEFILE64_SOURCE
36 #define _LARGEFILE64_SOURCE 36 #define _LARGEFILE64_SOURCE
37 #endif 37 #endif
38 #ifndef _FILE_OFFSET_BIT 38 #ifndef _FILE_OFFSET_BIT
39 #define _FILE_OFFSET_BIT 64 39 #define _FILE_OFFSET_BIT 64
40 #endif 40 #endif
41#endif 41#endif
42 42
43#include <stdio.h> 43#include <stdio.h>
44#include <stdlib.h> 44#include <stdlib.h>
45#include "zlib.h" 45#include "zlib.h"
46 46
47#if defined(USE_FILE32API)
48#define fopen64 fopen
49#define ftello64 ftell
50#define fseeko64 fseek
51#else
47#ifdef _MSC_VER 52#ifdef _MSC_VER
48 #define fopen64 fopen 53 #define fopen64 fopen
49 #if _MSC_VER >= 1400 54 #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC)))
50 #define ftello64 _ftelli64 55 #define ftello64 _ftelli64
51 #define fseeko64 _fseeki64 56 #define fseeko64 _fseeki64
52 #else // old MSC 57 #else // old MSC
@@ -54,11 +59,12 @@
54 #define fseeko64 fseek 59 #define fseeko64 fseek
55 #endif 60 #endif
56#endif 61#endif
62#endif
57 63
58/* 64/*
59#ifndef ZPOS64_T 65#ifndef ZPOS64_T
60 #ifdef _WIN32 66 #ifdef _WIN32
61 #define ZPOS64_T fpos_t 67 #define ZPOS64_T fpos_t
62 #else 68 #else
63 #include <stdint.h> 69 #include <stdint.h>
64 #define ZPOS64_T uint64_t 70 #define ZPOS64_T uint64_t