2 * Here we postprocess autoconf generated prefix-config.h entries.
\r
3 * This is generally for things like "off_t" which is left undefined
\r
4 * in plain config.h if the host system does already have it but we do
\r
5 * need the prefix variant - so we add here a #define _zzip_off_t off_t
\r
7 * This file is supposed to only carry '#define's.
\r
8 * See <zzip/types.h> for definitions that might be seen by the compiler.
\r
11 * Guido Draheim <guidod@gmx.de>
\r
13 * Copyright (c) 2001,2002,2003,2004 Guido Draheim
\r
14 * All rights reserved,
\r
15 * use under the restrictions of the
\r
16 * Lesser GNU General Public License
\r
17 * or alternatively the restrictions
\r
18 * of the Mozilla Public License 1.1
\r
21 #ifndef _ZZIP_CONF_H
\r
22 #define _ZZIP_CONF_H 1
\r
24 #if !defined ZZIP_OMIT_CONFIG_H
\r
25 # if defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__
\r
26 # include <zzip/_msvc.h>
\r
27 # elif defined ZZIP_1_H
\r
28 # include "zzip-1.h"
\r
29 # elif defined ZZIP_2_H
\r
30 # include "zzip-2.h"
\r
31 # elif defined ZZIP_3_H
\r
32 # include "zzip-3.h"
\r
33 # elif defined ZZIP_4_H
\r
34 # include "zzip-4.h"
\r
35 # elif defined ZZIP_5_H
\r
36 # include "zzip-5.h"
\r
37 # else /* autoconf generated */
\r
38 # include <zzip/_config.h>
\r
42 /* especially win32 platforms do not declare off_t so far - see zzip-msvc.h */
\r
45 #define _zzip_off_t ZZIP_off_t
\r
47 #define _zzip_off_t off_t
\r
51 /* currently unused, all current zziplib-users do have ansi-C94 compilers. */
\r
54 #define _zzip_const ZZIP_const
\r
56 #define _zzip_const const
\r
59 #ifndef _zzip_inline
\r
61 #define _zzip_inline ZZIP_inline
\r
63 #define _zzip_inline inline
\r
66 #ifndef _zzip_restrict
\r
67 #ifdef ZZIP_restrict
\r
68 #define _zzip_restrict ZZIP_restrict
\r
70 #define _zzip_restrict restrict
\r
73 #ifndef _zzip_size_t
\r
75 #define _zzip_size_t ZZIP_size_t
\r
77 #define _zzip_size_t size_t
\r
80 #ifndef _zzip_ssize_t
\r
82 #define _zzip_ssize_t ZZIP_ssize_t
\r
84 #define _zzip_ssize_t ssize_t
\r
88 /* whether this library shall use a 64bit off_t largefile variant in 64on32: */
\r
89 /* (some exported names must be renamed to avoid bad calls after linking) */
\r
90 #if defined ZZIP_LARGEFILE_SENSITIVE
\r
91 # if _FILE_OFFSET_BITS+0 == 64
\r
92 # define ZZIP_LARGEFILE_RENAME
\r
93 # elif defined _LARGE_FILES /* used on older AIX to get at 64bit off_t */
\r
94 # define ZZIP_LARGEFILE_RENAME
\r
95 # elif defined _ZZIP_LARGEFILE /* or simply use this one for zzip64 runs */
\r
96 # define ZZIP_LARGEFILE_RENAME
\r
100 /* if the environment did not setup these for 64bit off_t largefile... */
\r
101 #ifdef ZZIP_LARGEFILE_RENAME
\r
102 # ifndef _FILE_OFFSET_BITS
\r
103 # ifdef ZZIP__FILE_OFFSET_BITS /* == 64 */
\r
104 # define _FILE_OFFSET_BITS ZZIP__FILE_OFFSET_BITS
\r
107 # ifndef _LARGE_FILES
\r
108 # ifdef ZZIP__LARGE_FILES /* == 1 */
\r
109 # define _LARGE_FILES ZZIP__LARGE_FILES
\r
112 # ifndef _LARGEFILE_SOURCE
\r
113 # ifdef ZZIP__LARGEFILE_SOURCE /* == 1 */
\r
114 # define _LARGEFILE_SOURCE ZZIP__LARGEFILE_SOURCE
\r
121 /* mingw32msvc errno : would be in winsock.h */
\r
123 #define EREMOTE ESPIPE
\r
128 #define ELOOP EILSEQ
\r
130 #define ELOOP ENOEXEC
\r
134 #if defined __WATCOMC__
\r
135 #undef _zzip_inline
\r
136 #define _zzip_inline static
\r
139 #if defined _MSC_VER || defined __WATCOMC__
\r
145 # ifndef _zzip_lseek
\r
146 # define _zzip_lseek _lseek
\r
148 # ifndef _zzip_read
\r
149 # define _zzip_read _read
\r
151 # ifndef _zzip_write
\r
152 # define _zzip_write _write
\r
155 # ifndef _zzip_stat
\r
156 # define _zzip_stat _stat
\r
159 # endif /* !__STDC__ */
\r
163 #if defined _MSC_VER || defined __WATCOMC__
\r
164 # ifndef strcasecmp
\r
165 # define strcasecmp _stricmp
\r
169 # ifndef _zzip_lseek
\r
170 # define _zzip_lseek lseek
\r
173 # ifndef _zzip_read
\r
174 # define _zzip_read read
\r
177 # ifndef _zzip_write
\r
178 # define _zzip_write write
\r
182 # ifndef _zzip_stat
\r
183 # define _zzip_stat stat
\r
188 #if defined __GNUC__ || defined __attribute__
\r
189 #define __zzip_attribute__(X) __attribute__(X)
\r
191 #define __zzip_attribute__(X)
\r
194 #if defined ZZIP_EXPORTS || defined ZZIPLIB_EXPORTS
\r
199 /* based on zconf.h : */
\r
200 /* compile with -DZZIP_DLL for Windows DLL support */
\r
201 #if defined ZZIP_DLL
\r
202 # if defined _WINDOWS || defined WINDOWS || defined _WIN32
\r
203 /*# include <windows.h>*/
\r
205 # if !defined _zzip_export && defined _MSC_VER && (defined WIN32 || defined _WIN32)
\r
206 # define _zzip_export __declspec(dllexport) /*WINAPI*/
\r
208 # if !defined _zzip_export && defined __BORLANDC__
\r
209 # if __BORLANDC__ >= 0x0500 && defined WIN32
\r
210 # include <windows.h>
\r
211 # define _zzip_export __declspec(dllexport) /*WINAPI*/
\r
213 # if defined _Windows && defined __DLL__
\r
214 # define _zzip_export _export
\r
218 # if !defined _zzip_export && defined __GNUC__
\r
219 # if defined __declspec
\r
220 # define _zzip_export extern __declspec(dllexport)
\r
222 # define _zzip_export extern
\r
225 # if !defined _zzip_export && defined __BEOS__
\r
226 # define _zzip_export extern __declspec(export)
\r
228 # if !defined _zzip_export && defined __WATCOMC__
\r
229 # define _zzip_export extern __declspec(dllexport)
\r
230 # define ZEXPORT __syscall
\r
231 # define ZEXTERN extern
\r
235 #if !defined _zzip_export
\r
236 # if defined __GNUC__ /* || !defined HAVE_LIBZZIP */
\r
237 # define _zzip_export extern
\r
238 # elif defined __declspec || (defined _MSC_VER && defined ZZIP_DLL)
\r
239 # define _zzip_export extern __declspec(dllimport)
\r
241 # define _zzip_export extern
\r