3 * Guido Draheim <guidod@gmx.de>
\r
5 * Copyright (c) 2001,2002,2003 Guido Draheim
\r
6 * All rights reserved,
\r
7 * use under the restrictions of the
\r
8 * Lesser GNU General Public License
\r
9 * or alternatively the restrictions
\r
10 * of the Mozilla Public License 1.1
\r
13 #ifndef _ZZIP_CONF_H
\r
14 #define _ZZIP_CONF_H 1
\r
16 #if !defined ZZIP_OMIT_CONFIG_H
\r
17 # if defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__
\r
18 # include <zzip/_msvc.h>
\r
19 # elif defined ZZIP_1_H
\r
20 # include "zzip-1.h"
\r
21 # elif defined ZZIP_2_H
\r
22 # include "zzip-2.h"
\r
23 # elif defined ZZIP_3_H
\r
24 # include "zzip-3.h"
\r
25 # elif defined ZZIP_4_H
\r
26 # include "zzip-4.h"
\r
27 # elif defined ZZIP_5_H
\r
28 # include "zzip-5.h"
\r
29 # else /* autoconf generated */
\r
30 # include <zzip/_config.h>
\r
34 /* especially win32 platforms do not declare off_t so far - see zzip-msvc.h */
\r
37 #define _zzip_off_t ZZIP_off_t
\r
39 #define _zzip_off_t off_t
\r
43 /* currently unused, all current zziplib-users do have ansi-C94 compilers. */
\r
46 #define _zzip_const ZZIP_const
\r
48 #define _zzip_const const
\r
51 #ifndef _zzip_inline
\r
53 #define _zzip_inline ZZIP_inline
\r
55 #define _zzip_inline inline
\r
58 #ifndef _zzip_size_t
\r
60 #define _zzip_size_t ZZIP_size_t
\r
62 #define _zzip_size_t size_t
\r
65 #ifndef _zzip_ssize_t
\r
67 #define _zzip_ssize_t ZZIP_ssize_t
\r
69 #define _zzip_ssize_t ssize_t
\r
73 /* whether this library shall use a 64bit off_t largefile variant in 64on32: */
\r
74 /* (some exported names must be renamed to avoid bad calls after linking) */
\r
75 #if defined ZZIP_LARGEFILE_SENSITIVE
\r
76 # if _FILE_OFFSET_BITS+0 == 64
\r
77 # define ZZIP_LARGEFILE_RENAME
\r
78 # elif defined _LARGE_FILES /* used on older AIX to get at 64bit off_t */
\r
79 # define ZZIP_LARGEFILE_RENAME
\r
80 # elif defined _ZZIP_LARGEFILE /* or simply use this one for zzip64 runs */
\r
81 # define ZZIP_LARGEFILE_RENAME
\r
85 /* if the environment did not setup these for 64bit off_t largefile... */
\r
86 #ifdef ZZIP_LARGEFILE_RENAME
\r
87 # ifndef _FILE_OFFSET_BITS
\r
88 # ifdef ZZIP__FILE_OFFSET_BITS /* == 64 */
\r
89 # define _FILE_OFFSET_BITS ZZIP__FILE_OFFSET_BITS
\r
92 # ifndef _LARGE_FILES
\r
93 # ifdef ZZIP__LARGE_FILES /* == 1 */
\r
94 # define _LARGE_FILES ZZIP__LARGE_FILES
\r
97 # ifndef _LARGEFILE_SOURCE
\r
98 # ifdef ZZIP__LARGEFILE_SOURCE /* == 1 */
\r
99 # define _LARGEFILE_SOURCE ZZIP__LARGEFILE_SOURCE
\r
106 /* mingw32msvc errno : would be in winsock.h */
\r
108 #define EREMOTE ESPIPE
\r
113 #define ELOOP EILSEQ
\r
115 #define ELOOP ENOEXEC
\r
119 #if defined __WATCOMC__
\r
120 #undef _zzip_inline
\r
121 #define _zzip_inline static
\r
124 #if defined _MSC_VER || defined __WATCOMC__
\r
130 # ifndef _zzip_lseek
\r
131 # define _zzip_lseek _lseek
\r
133 # ifndef _zzip_read
\r
134 # define _zzip_read _read
\r
136 # ifndef _zzip_write
\r
137 # define _zzip_write _write
\r
140 # ifndef _zzip_stat
\r
141 # define _zzip_stat _stat
\r
144 # endif /* !__STDC__ */
\r
148 #if defined _MSC_VER || defined __WATCOMC__
\r
149 # ifndef strcasecmp
\r
150 # define strcasecmp _stricmp
\r
154 # ifndef _zzip_lseek
\r
155 # define _zzip_lseek lseek
\r
158 # ifndef _zzip_read
\r
159 # define _zzip_read read
\r
162 # ifndef _zzip_write
\r
163 # define _zzip_write write
\r
167 # ifndef _zzip_stat
\r
168 # define _zzip_stat stat
\r
173 #if !defined __GNUC__ && !defined __attribute__
\r
174 #define __attribute__(X)
\r
177 #if defined ZZIP_EXPORTS || defined ZZIPLIB_EXPORTS
\r
182 /* based on zconf.h : */
\r
183 /* compile with -DZZIP_DLL for Windows DLL support */
\r
184 #if defined ZZIP_DLL
\r
185 # if defined _WINDOWS || defined WINDOWS || defined _WIN32
\r
186 /*# include <windows.h>*/
\r
188 # if !defined _zzip_export && defined _MSC_VER && (defined WIN32 || defined _WIN32)
\r
189 # define _zzip_export __declspec(dllexport) /*WINAPI*/
\r
191 # if !defined _zzip_export && defined __BORLANDC__
\r
192 # if __BORLANDC__ >= 0x0500 && defined WIN32
\r
193 # include <windows.h>
\r
194 # define _zzip_export __declspec(dllexport) /*WINAPI*/
\r
196 # if defined _Windows && defined __DLL__
\r
197 # define _zzip_export _export
\r
201 # if !defined _zzip_export && defined __GNUC__
\r
202 # if defined __declspec
\r
203 # define _zzip_export extern __declspec(dllexport)
\r
205 # define _zzip_export extern
\r
208 # if !defined _zzip_export && defined __BEOS__
\r
209 # define _zzip_export extern __declspec(export)
\r
211 # if !defined _zzip_export && defined __WATCOMC__
\r
212 # define _zzip_export extern __declspec(dllexport)
\r
213 # define ZEXPORT __syscall
\r
214 # define ZEXTERN extern
\r
218 #if !defined _zzip_export
\r
219 # if defined __GNUC__ /* || !defined HAVE_LIBZZIP */
\r
220 # define _zzip_export extern
\r
221 # elif defined __declspec || (defined _MSC_VER && defined ZZIP_DLL)
\r
222 # define _zzip_export extern __declspec(dllimport)
\r
224 # define _zzip_export extern
\r