dlgTextEntry_Keyboard: rename to TouchTextEntry
[xcsoar.git] / src / zzip / conf.h
blob1bb483ef2c3732e66779b1df50864d1955f684ef
1 /*
2 * Here we postprocess autoconf generated prefix-config.h entries.
3 * This is generally for things like "off_t" which is left undefined
4 * in plain config.h if the host system does already have it but we do
5 * need the prefix variant - so we add here a #define _zzip_off_t off_t
7 * This file is supposed to only carry '#define's.
8 * See <zzip/types.h> for definitions that might be seen by the compiler.
10 * Author:
11 * Guido Draheim <guidod@gmx.de>
13 * Copyright (c) 2001,2002,2003,2004 Guido Draheim
14 * All rights reserved,
15 * use under the restrictions of the
16 * Lesser GNU General Public License
17 * or alternatively the restrictions
18 * of the Mozilla Public License 1.1
21 #ifndef _ZZIP_CONF_H
22 #define _ZZIP_CONF_H 1
24 #if !defined ZZIP_OMIT_CONFIG_H
25 # if defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__
26 # include <zzip/_msvc.h>
27 # elif defined ZZIP_1_H
28 # include "zzip-1.h"
29 # elif defined ZZIP_2_H
30 # include "zzip-2.h"
31 # elif defined ZZIP_3_H
32 # include "zzip-3.h"
33 # elif defined ZZIP_4_H
34 # include "zzip-4.h"
35 # elif defined ZZIP_5_H
36 # include "zzip-5.h"
37 # else /* autoconf generated */
38 # include <zzip/_config.h>
39 # endif
40 #endif
42 /* especially win32 platforms do not declare off_t so far - see zzip-msvc.h */
43 #ifndef _zzip_off_t
44 #ifdef ZZIP_off_t
45 #define _zzip_off_t ZZIP_off_t
46 #else
47 #define _zzip_off_t off_t
48 #endif
49 #endif
51 #ifndef _zzip_off64_t
52 #ifdef ZZIP_off64_t
53 #define _zzip_off64_t ZZIP_off64_t
54 #else
55 #define _zzip_off64_t off64_t
56 #endif
57 #endif
59 /* currently unused, all current zziplib-users do have ansi-C94 compilers. */
60 #ifndef _zzip_const
61 #ifdef ZZIP_const
62 #define _zzip_const ZZIP_const
63 #else
64 #define _zzip_const const
65 #endif
66 #endif
67 #ifndef _zzip_inline
68 #ifdef ZZIP_inline
69 #define _zzip_inline ZZIP_inline
70 #else
71 #define _zzip_inline inline
72 #endif
73 #endif
74 #ifndef _zzip_restrict
75 #ifdef ZZIP_restrict
76 #define _zzip_restrict ZZIP_restrict
77 #else
78 #define _zzip_restrict restrict
79 #endif
80 #endif
81 #if defined __linux__ && __GNUC__+0 >= 4
82 #define zzip__new__ __attribute__((malloc))
83 #elif defined __linux__ && __GNUC__+0 >= 3 && __GNUC_MINOR__+0 >= 3
84 #define zzip__new__ __attribute__((malloc))
85 #else
86 #define zzip__new__
87 #endif
89 #ifndef _zzip_size_t
90 #ifdef ZZIP_size_t
91 #define _zzip_size_t ZZIP_size_t
92 #else
93 #define _zzip_size_t size_t
94 #endif
95 #endif
96 #ifndef _zzip_ssize_t
97 #ifdef ZZIP_ssize_t
98 #define _zzip_ssize_t ZZIP_ssize_t
99 #else
100 #define _zzip_ssize_t ssize_t
101 #endif
102 #endif
103 #ifndef _zzip___int64
104 #ifdef ZZIP___int64
105 #define _zzip___int64 ZZIP___int64
106 #else
107 #define _zzip___int64 long long
108 #endif
109 #endif
111 /* whether this library shall use a 64bit off_t largefile variant in 64on32: */
112 /* (some exported names must be renamed to avoid bad calls after linking) */
113 #if defined ZZIP_LARGEFILE_SENSITIVE
114 # if _FILE_OFFSET_BITS+0 == 64
115 # define ZZIP_LARGEFILE_RENAME
116 # elif defined _LARGE_FILES /* used on older AIX to get at 64bit off_t */
117 # define ZZIP_LARGEFILE_RENAME
118 # elif defined _ZZIP_LARGEFILE /* or simply use this one for zzip64 runs */
119 # define ZZIP_LARGEFILE_RENAME
120 # endif
121 #endif
123 /* if the environment did not setup these for 64bit off_t largefile... */
124 #ifdef ZZIP_LARGEFILE_RENAME
125 # ifndef _FILE_OFFSET_BITS
126 # ifdef ZZIP__FILE_OFFSET_BITS /* == 64 */
127 # define _FILE_OFFSET_BITS ZZIP__FILE_OFFSET_BITS
128 # endif
129 # endif
130 # ifndef _LARGE_FILES
131 # ifdef ZZIP__LARGE_FILES /* == 1 */
132 # define _LARGE_FILES ZZIP__LARGE_FILES
133 # endif
134 # endif
135 # ifndef _LARGEFILE_SOURCE
136 # ifdef ZZIP__LARGEFILE_SOURCE /* == 1 */
137 # define _LARGEFILE_SOURCE ZZIP__LARGEFILE_SOURCE
138 # endif
139 # endif
140 #endif
142 #ifdef ZZIP_DISABLED
144 #include <errno.h>
146 /* mingw32msvc errno : would be in winsock.h */
147 #ifndef EREMOTE
148 #define EREMOTE ESPIPE
149 #endif
151 #ifndef ELOOP
152 #if defined EILSEQ
153 #define ELOOP EILSEQ
154 #else
155 #define ELOOP ENOEXEC
156 #endif
157 #endif
159 #endif /* ZZIP_DISABLED */
161 #if defined __WATCOMC__
162 #undef _zzip_inline
163 #define _zzip_inline static
164 #endif
166 #if defined _MSC_VER || defined __WATCOMC__
167 #include <io.h>
168 #endif
170 #ifdef _MSC_VER
171 # if !__STDC__
172 # ifndef _zzip_lseek
173 # define _zzip_lseek _lseek
174 # endif
175 # ifndef _zzip_read
176 # define _zzip_read _read
177 # endif
178 # ifndef _zzip_write
179 # define _zzip_write _write
180 # endif
181 # if 0
182 # ifndef _zzip_stat
183 # define _zzip_stat _stat
184 # endif
185 # endif
186 # endif /* !__STDC__ */
187 #endif
188 /*MSVC*/
190 #if defined _MSC_VER || defined __WATCOMC__
191 # ifndef strcasecmp
192 # define strcasecmp _stricmp
193 # endif
194 #endif
196 # ifndef _zzip_lseek
197 # define _zzip_lseek lseek
198 # endif
200 # ifndef _zzip_read
201 # define _zzip_read read
202 # endif
204 # ifndef _zzip_write
205 # define _zzip_write write
206 # endif
208 # if 0
209 # ifndef _zzip_stat
210 # define _zzip_stat stat
211 # endif
212 # endif
215 #if defined ZZIP_EXPORTS || defined ZZIPLIB_EXPORTS
216 # undef ZZIP_DLL
217 #define ZZIP_DLL 1
218 #endif
220 /* based on zconf.h : */
221 /* compile with -DZZIP_DLL for Windows DLL support */
222 #if defined ZZIP_DLL
223 # if defined _WINDOWS || defined WINDOWS || defined _WIN32
224 /*# include <windows.h>*/
225 # endif
226 # if !defined _zzip_export && defined _MSC_VER && (defined WIN32 || defined _WIN32)
227 # define _zzip_export __declspec(dllexport) /*WINAPI*/
228 # endif
229 # if !defined _zzip_export && defined __BORLANDC__
230 # if __BORLANDC__ >= 0x0500 && defined WIN32
231 # include <windows.h>
232 # define _zzip_export __declspec(dllexport) /*WINAPI*/
233 # else
234 # if defined _Windows && defined __DLL__
235 # define _zzip_export _export
236 # endif
237 # endif
238 # endif
239 # if !defined _zzip_export && defined __GNUC__
240 # if defined __declspec
241 # define _zzip_export extern __declspec(dllexport)
242 # else
243 # define _zzip_export extern
244 # endif
245 # endif
246 # if !defined _zzip_export && defined __BEOS__
247 # define _zzip_export extern __declspec(export)
248 # endif
249 # if !defined _zzip_export && defined __WATCOMC__
250 # define _zzip_export extern __declspec(dllexport)
251 # define ZEXPORT __syscall
252 # define ZEXTERN extern
253 # endif
254 #endif
256 #if !defined _zzip_export
257 # if defined __GNUC__ /* || !defined HAVE_LIBZZIP */
258 # define _zzip_export extern
259 # elif defined __declspec || (defined _MSC_VER && defined ZZIP_DLL)
260 # define _zzip_export extern __declspec(dllimport)
261 # else
262 # define _zzip_export extern
263 # endif
264 #endif
266 #endif