Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
26 | pmbaty | 1 | /* lzodefs.h -- architecture, OS and compiler specific defines |
2 | |||
3 | This file is part of the LZO real-time data compression library. |
||
4 | |||
5 | Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer |
||
6 | All Rights Reserved. |
||
7 | |||
8 | The LZO library is free software; you can redistribute it and/or |
||
9 | modify it under the terms of the GNU General Public License as |
||
10 | published by the Free Software Foundation; either version 2 of |
||
11 | the License, or (at your option) any later version. |
||
12 | |||
13 | The LZO library is distributed in the hope that it will be useful, |
||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
16 | GNU General Public License for more details. |
||
17 | |||
18 | You should have received a copy of the GNU General Public License |
||
19 | along with the LZO library; see the file COPYING. |
||
20 | If not, write to the Free Software Foundation, Inc., |
||
21 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||
22 | |||
23 | Markus F.X.J. Oberhumer |
||
24 | <markus@oberhumer.com> |
||
25 | http://www.oberhumer.com/opensource/lzo/ |
||
26 | */ |
||
27 | |||
28 | |||
29 | #ifndef __LZODEFS_H_INCLUDED |
||
30 | #define __LZODEFS_H_INCLUDED 1 |
||
31 | |||
32 | #if defined(__CYGWIN32__) && !defined(__CYGWIN__) |
||
33 | # define __CYGWIN__ __CYGWIN32__ |
||
34 | #endif |
||
35 | #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) |
||
36 | # define _ALL_SOURCE 1 |
||
37 | #endif |
||
38 | #if defined(__mips__) && defined(__R5900__) |
||
39 | # if !defined(__LONG_MAX__) |
||
40 | # define __LONG_MAX__ 9223372036854775807L |
||
41 | # endif |
||
42 | #endif |
||
43 | #if 0 |
||
44 | #elif !defined(__LZO_LANG_OVERRIDE) |
||
45 | #if (defined(__clang__) || defined(__GNUC__)) && defined(__ASSEMBLER__) |
||
46 | # if (__ASSEMBLER__+0) <= 0 |
||
47 | # error "__ASSEMBLER__" |
||
48 | # else |
||
49 | # define LZO_LANG_ASSEMBLER 1 |
||
50 | # endif |
||
51 | #elif defined(__cplusplus) |
||
52 | # if (__cplusplus+0) <= 0 |
||
53 | # error "__cplusplus" |
||
54 | # elif (__cplusplus < 199711L) |
||
55 | # define LZO_LANG_CXX 1 |
||
56 | # elif defined(_MSC_VER) && defined(_MSVC_LANG) && (_MSVC_LANG+0 >= 201402L) && 1 |
||
57 | # define LZO_LANG_CXX _MSVC_LANG |
||
58 | # else |
||
59 | # define LZO_LANG_CXX __cplusplus |
||
60 | # endif |
||
61 | # define LZO_LANG_CPLUSPLUS LZO_LANG_CXX |
||
62 | #else |
||
63 | # if defined(__STDC_VERSION__) && (__STDC_VERSION__+0 >= 199409L) |
||
64 | # define LZO_LANG_C __STDC_VERSION__ |
||
65 | # else |
||
66 | # define LZO_LANG_C 1 |
||
67 | # endif |
||
68 | #endif |
||
69 | #endif |
||
70 | #if !defined(LZO_CFG_NO_DISABLE_WUNDEF) |
||
71 | #if defined(__ARMCC_VERSION) |
||
72 | # pragma diag_suppress 193 |
||
73 | #elif defined(__clang__) && defined(__clang_minor__) |
||
74 | # pragma clang diagnostic ignored "-Wundef" |
||
75 | #elif defined(__INTEL_COMPILER) |
||
76 | # pragma warning(disable: 193) |
||
77 | #elif defined(__KEIL__) && defined(__C166__) |
||
78 | # pragma warning disable = 322 |
||
79 | #elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__) |
||
80 | # if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2)) |
||
81 | # pragma GCC diagnostic ignored "-Wundef" |
||
82 | # endif |
||
83 | #elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) |
||
84 | # if ((_MSC_VER-0) >= 1300) |
||
85 | # pragma warning(disable: 4668) |
||
86 | # endif |
||
87 | #endif |
||
88 | #endif |
||
89 | #if 0 && defined(__POCC__) && defined(_WIN32) |
||
90 | # if (__POCC__ >= 400) |
||
91 | # pragma warn(disable: 2216) |
||
92 | # endif |
||
93 | #endif |
||
94 | #if 0 && defined(__WATCOMC__) |
||
95 | # if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) |
||
96 | # pragma warning 203 9 |
||
97 | # endif |
||
98 | #endif |
||
99 | #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) |
||
100 | # pragma option -h |
||
101 | #endif |
||
102 | #if !(LZO_CFG_NO_DISABLE_WCRTNONSTDC) |
||
103 | #ifndef _CRT_NONSTDC_NO_DEPRECATE |
||
104 | #define _CRT_NONSTDC_NO_DEPRECATE 1 |
||
105 | #endif |
||
106 | #ifndef _CRT_NONSTDC_NO_WARNINGS |
||
107 | #define _CRT_NONSTDC_NO_WARNINGS 1 |
||
108 | #endif |
||
109 | #ifndef _CRT_SECURE_NO_DEPRECATE |
||
110 | #define _CRT_SECURE_NO_DEPRECATE 1 |
||
111 | #endif |
||
112 | #ifndef _CRT_SECURE_NO_WARNINGS |
||
113 | #define _CRT_SECURE_NO_WARNINGS 1 |
||
114 | #endif |
||
115 | #endif |
||
116 | #if 0 |
||
117 | #define LZO_0xffffUL 0xfffful |
||
118 | #define LZO_0xffffffffUL 0xfffffffful |
||
119 | #else |
||
120 | #define LZO_0xffffUL 65535ul |
||
121 | #define LZO_0xffffffffUL 4294967295ul |
||
122 | #endif |
||
123 | #define LZO_0xffffL LZO_0xffffUL |
||
124 | #define LZO_0xffffffffL LZO_0xffffffffUL |
||
125 | #if (LZO_0xffffL == LZO_0xffffffffL) |
||
126 | # error "your preprocessor is broken 1" |
||
127 | #endif |
||
128 | #if (16ul * 16384ul != 262144ul) |
||
129 | # error "your preprocessor is broken 2" |
||
130 | #endif |
||
131 | #if 0 |
||
132 | #if (32767 >= 4294967295ul) |
||
133 | # error "your preprocessor is broken 3" |
||
134 | #endif |
||
135 | #if (65535u >= 4294967295ul) |
||
136 | # error "your preprocessor is broken 4" |
||
137 | #endif |
||
138 | #endif |
||
139 | #if defined(__COUNTER__) |
||
140 | # ifndef LZO_CFG_USE_COUNTER |
||
141 | # define LZO_CFG_USE_COUNTER 1 |
||
142 | # endif |
||
143 | #else |
||
144 | # undef LZO_CFG_USE_COUNTER |
||
145 | #endif |
||
146 | #if (UINT_MAX == LZO_0xffffL) |
||
147 | #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) |
||
148 | # if !defined(MSDOS) |
||
149 | # define MSDOS 1 |
||
150 | # endif |
||
151 | # if !defined(_MSDOS) |
||
152 | # define _MSDOS 1 |
||
153 | # endif |
||
154 | #elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) |
||
155 | # if (__VERSION == 520) && (MB_LEN_MAX == 1) |
||
156 | # if !defined(__AZTEC_C__) |
||
157 | # define __AZTEC_C__ __VERSION |
||
158 | # endif |
||
159 | # if !defined(__DOS__) |
||
160 | # define __DOS__ 1 |
||
161 | # endif |
||
162 | # endif |
||
163 | #endif |
||
164 | #endif |
||
165 | #if (UINT_MAX == LZO_0xffffL) |
||
166 | #if defined(_MSC_VER) && defined(M_I86HM) |
||
167 | # define ptrdiff_t long |
||
168 | # define _PTRDIFF_T_DEFINED 1 |
||
169 | #endif |
||
170 | #endif |
||
171 | #if (UINT_MAX == LZO_0xffffL) |
||
172 | # undef __LZO_RENAME_A |
||
173 | # undef __LZO_RENAME_B |
||
174 | # if defined(__AZTEC_C__) && defined(__DOS__) |
||
175 | # define __LZO_RENAME_A 1 |
||
176 | # elif defined(_MSC_VER) && defined(MSDOS) |
||
177 | # if (_MSC_VER < 600) |
||
178 | # define __LZO_RENAME_A 1 |
||
179 | # elif (_MSC_VER < 700) |
||
180 | # define __LZO_RENAME_B 1 |
||
181 | # endif |
||
182 | # elif defined(__TSC__) && defined(__OS2__) |
||
183 | # define __LZO_RENAME_A 1 |
||
184 | # elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) |
||
185 | # define __LZO_RENAME_A 1 |
||
186 | # elif defined(__PACIFIC__) && defined(DOS) |
||
187 | # if !defined(__far) |
||
188 | # define __far far |
||
189 | # endif |
||
190 | # if !defined(__near) |
||
191 | # define __near near |
||
192 | # endif |
||
193 | # endif |
||
194 | # if defined(__LZO_RENAME_A) |
||
195 | # if !defined(__cdecl) |
||
196 | # define __cdecl cdecl |
||
197 | # endif |
||
198 | # if !defined(__far) |
||
199 | # define __far far |
||
200 | # endif |
||
201 | # if !defined(__huge) |
||
202 | # define __huge huge |
||
203 | # endif |
||
204 | # if !defined(__near) |
||
205 | # define __near near |
||
206 | # endif |
||
207 | # if !defined(__pascal) |
||
208 | # define __pascal pascal |
||
209 | # endif |
||
210 | # if !defined(__huge) |
||
211 | # define __huge huge |
||
212 | # endif |
||
213 | # elif defined(__LZO_RENAME_B) |
||
214 | # if !defined(__cdecl) |
||
215 | # define __cdecl _cdecl |
||
216 | # endif |
||
217 | # if !defined(__far) |
||
218 | # define __far _far |
||
219 | # endif |
||
220 | # if !defined(__huge) |
||
221 | # define __huge _huge |
||
222 | # endif |
||
223 | # if !defined(__near) |
||
224 | # define __near _near |
||
225 | # endif |
||
226 | # if !defined(__pascal) |
||
227 | # define __pascal _pascal |
||
228 | # endif |
||
229 | # elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) |
||
230 | # if !defined(__cdecl) |
||
231 | # define __cdecl cdecl |
||
232 | # endif |
||
233 | # if !defined(__pascal) |
||
234 | # define __pascal pascal |
||
235 | # endif |
||
236 | # endif |
||
237 | # undef __LZO_RENAME_A |
||
238 | # undef __LZO_RENAME_B |
||
239 | #endif |
||
240 | #if (UINT_MAX == LZO_0xffffL) |
||
241 | #if defined(__AZTEC_C__) && defined(__DOS__) |
||
242 | # define LZO_BROKEN_CDECL_ALT_SYNTAX 1 |
||
243 | #elif defined(_MSC_VER) && defined(MSDOS) |
||
244 | # if (_MSC_VER < 600) |
||
245 | # define LZO_BROKEN_INTEGRAL_CONSTANTS 1 |
||
246 | # endif |
||
247 | # if (_MSC_VER < 700) |
||
248 | # define LZO_BROKEN_INTEGRAL_PROMOTION 1 |
||
249 | # define LZO_BROKEN_SIZEOF 1 |
||
250 | # endif |
||
251 | #elif defined(__PACIFIC__) && defined(DOS) |
||
252 | # define LZO_BROKEN_INTEGRAL_CONSTANTS 1 |
||
253 | #elif defined(__TURBOC__) && defined(__MSDOS__) |
||
254 | # if (__TURBOC__ < 0x0150) |
||
255 | # define LZO_BROKEN_CDECL_ALT_SYNTAX 1 |
||
256 | # define LZO_BROKEN_INTEGRAL_CONSTANTS 1 |
||
257 | # define LZO_BROKEN_INTEGRAL_PROMOTION 1 |
||
258 | # endif |
||
259 | # if (__TURBOC__ < 0x0200) |
||
260 | # define LZO_BROKEN_SIZEOF 1 |
||
261 | # endif |
||
262 | # if (__TURBOC__ < 0x0400) && defined(__cplusplus) |
||
263 | # define LZO_BROKEN_CDECL_ALT_SYNTAX 1 |
||
264 | # endif |
||
265 | #elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) |
||
266 | # define LZO_BROKEN_CDECL_ALT_SYNTAX 1 |
||
267 | # define LZO_BROKEN_SIZEOF 1 |
||
268 | #endif |
||
269 | #endif |
||
270 | #if defined(__WATCOMC__) && (__WATCOMC__ < 900) |
||
271 | # define LZO_BROKEN_INTEGRAL_CONSTANTS 1 |
||
272 | #endif |
||
273 | #if defined(_CRAY) && defined(_CRAY1) |
||
274 | # define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 |
||
275 | #endif |
||
276 | #define LZO_PP_STRINGIZE(x) #x |
||
277 | #define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) |
||
278 | #define LZO_PP_CONCAT0() /*empty*/ |
||
279 | #define LZO_PP_CONCAT1(a) a |
||
280 | #define LZO_PP_CONCAT2(a,b) a ## b |
||
281 | #define LZO_PP_CONCAT3(a,b,c) a ## b ## c |
||
282 | #define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d |
||
283 | #define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e |
||
284 | #define LZO_PP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f |
||
285 | #define LZO_PP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g |
||
286 | #define LZO_PP_ECONCAT0() LZO_PP_CONCAT0() |
||
287 | #define LZO_PP_ECONCAT1(a) LZO_PP_CONCAT1(a) |
||
288 | #define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) |
||
289 | #define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) |
||
290 | #define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) |
||
291 | #define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) |
||
292 | #define LZO_PP_ECONCAT6(a,b,c,d,e,f) LZO_PP_CONCAT6(a,b,c,d,e,f) |
||
293 | #define LZO_PP_ECONCAT7(a,b,c,d,e,f,g) LZO_PP_CONCAT7(a,b,c,d,e,f,g) |
||
294 | #define LZO_PP_EMPTY /*empty*/ |
||
295 | #define LZO_PP_EMPTY0() /*empty*/ |
||
296 | #define LZO_PP_EMPTY1(a) /*empty*/ |
||
297 | #define LZO_PP_EMPTY2(a,b) /*empty*/ |
||
298 | #define LZO_PP_EMPTY3(a,b,c) /*empty*/ |
||
299 | #define LZO_PP_EMPTY4(a,b,c,d) /*empty*/ |
||
300 | #define LZO_PP_EMPTY5(a,b,c,d,e) /*empty*/ |
||
301 | #define LZO_PP_EMPTY6(a,b,c,d,e,f) /*empty*/ |
||
302 | #define LZO_PP_EMPTY7(a,b,c,d,e,f,g) /*empty*/ |
||
303 | #if 1 |
||
304 | #define LZO_CPP_STRINGIZE(x) #x |
||
305 | #define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) |
||
306 | #define LZO_CPP_CONCAT2(a,b) a ## b |
||
307 | #define LZO_CPP_CONCAT3(a,b,c) a ## b ## c |
||
308 | #define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d |
||
309 | #define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e |
||
310 | #define LZO_CPP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f |
||
311 | #define LZO_CPP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g |
||
312 | #define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) |
||
313 | #define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) |
||
314 | #define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) |
||
315 | #define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) |
||
316 | #define LZO_CPP_ECONCAT6(a,b,c,d,e,f) LZO_CPP_CONCAT6(a,b,c,d,e,f) |
||
317 | #define LZO_CPP_ECONCAT7(a,b,c,d,e,f,g) LZO_CPP_CONCAT7(a,b,c,d,e,f,g) |
||
318 | #endif |
||
319 | #define __LZO_MASK_GEN(o,b) (((((o) << ((b)-((b)!=0))) - (o)) << 1) + (o)*((b)!=0)) |
||
320 | #if 1 && defined(__cplusplus) |
||
321 | # if !defined(__STDC_CONSTANT_MACROS) |
||
322 | # define __STDC_CONSTANT_MACROS 1 |
||
323 | # endif |
||
324 | # if !defined(__STDC_LIMIT_MACROS) |
||
325 | # define __STDC_LIMIT_MACROS 1 |
||
326 | # endif |
||
327 | #endif |
||
328 | #if defined(__cplusplus) |
||
329 | # define LZO_EXTERN_C extern "C" |
||
330 | # define LZO_EXTERN_C_BEGIN extern "C" { |
||
331 | # define LZO_EXTERN_C_END } |
||
332 | #else |
||
333 | # define LZO_EXTERN_C extern |
||
334 | # define LZO_EXTERN_C_BEGIN /*empty*/ |
||
335 | # define LZO_EXTERN_C_END /*empty*/ |
||
336 | #endif |
||
337 | #if !defined(__LZO_OS_OVERRIDE) |
||
338 | #if (LZO_OS_FREESTANDING) |
||
339 | # define LZO_INFO_OS "freestanding" |
||
340 | #elif (LZO_OS_EMBEDDED) |
||
341 | # define LZO_INFO_OS "embedded" |
||
342 | #elif 1 && defined(__IAR_SYSTEMS_ICC__) |
||
343 | # define LZO_OS_EMBEDDED 1 |
||
344 | # define LZO_INFO_OS "embedded" |
||
345 | #elif defined(__CYGWIN__) && defined(__GNUC__) |
||
346 | # define LZO_OS_CYGWIN 1 |
||
347 | # define LZO_INFO_OS "cygwin" |
||
348 | #elif defined(__EMX__) && defined(__GNUC__) |
||
349 | # define LZO_OS_EMX 1 |
||
350 | # define LZO_INFO_OS "emx" |
||
351 | #elif defined(__BEOS__) |
||
352 | # define LZO_OS_BEOS 1 |
||
353 | # define LZO_INFO_OS "beos" |
||
354 | #elif defined(__Lynx__) |
||
355 | # define LZO_OS_LYNXOS 1 |
||
356 | # define LZO_INFO_OS "lynxos" |
||
357 | #elif defined(__OS400__) |
||
358 | # define LZO_OS_OS400 1 |
||
359 | # define LZO_INFO_OS "os400" |
||
360 | #elif defined(__QNX__) |
||
361 | # define LZO_OS_QNX 1 |
||
362 | # define LZO_INFO_OS "qnx" |
||
363 | #elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) |
||
364 | # define LZO_OS_DOS32 1 |
||
365 | # define LZO_INFO_OS "dos32" |
||
366 | #elif defined(__BORLANDC__) && defined(__DPMI16__) |
||
367 | # define LZO_OS_DOS16 1 |
||
368 | # define LZO_INFO_OS "dos16" |
||
369 | #elif defined(__ZTC__) && defined(DOS386) |
||
370 | # define LZO_OS_DOS32 1 |
||
371 | # define LZO_INFO_OS "dos32" |
||
372 | #elif defined(__OS2__) || defined(__OS2V2__) |
||
373 | # if (UINT_MAX == LZO_0xffffL) |
||
374 | # define LZO_OS_OS216 1 |
||
375 | # define LZO_INFO_OS "os216" |
||
376 | # elif (UINT_MAX == LZO_0xffffffffL) |
||
377 | # define LZO_OS_OS2 1 |
||
378 | # define LZO_INFO_OS "os2" |
||
379 | # else |
||
380 | # error "check your limits.h header" |
||
381 | # endif |
||
382 | #elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) |
||
383 | # define LZO_OS_WIN64 1 |
||
384 | # define LZO_INFO_OS "win64" |
||
385 | #elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) |
||
386 | # define LZO_OS_WIN32 1 |
||
387 | # define LZO_INFO_OS "win32" |
||
388 | #elif defined(__MWERKS__) && defined(__INTEL__) |
||
389 | # define LZO_OS_WIN32 1 |
||
390 | # define LZO_INFO_OS "win32" |
||
391 | #elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) |
||
392 | # if (UINT_MAX == LZO_0xffffL) |
||
393 | # define LZO_OS_WIN16 1 |
||
394 | # define LZO_INFO_OS "win16" |
||
395 | # elif (UINT_MAX == LZO_0xffffffffL) |
||
396 | # define LZO_OS_WIN32 1 |
||
397 | # define LZO_INFO_OS "win32" |
||
398 | # else |
||
399 | # error "check your limits.h header" |
||
400 | # endif |
||
401 | #elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) |
||
402 | # if (UINT_MAX == LZO_0xffffL) |
||
403 | # define LZO_OS_DOS16 1 |
||
404 | # define LZO_INFO_OS "dos16" |
||
405 | # elif (UINT_MAX == LZO_0xffffffffL) |
||
406 | # define LZO_OS_DOS32 1 |
||
407 | # define LZO_INFO_OS "dos32" |
||
408 | # else |
||
409 | # error "check your limits.h header" |
||
410 | # endif |
||
411 | #elif defined(__WATCOMC__) |
||
412 | # if defined(__NT__) && (UINT_MAX == LZO_0xffffL) |
||
413 | # define LZO_OS_DOS16 1 |
||
414 | # define LZO_INFO_OS "dos16" |
||
415 | # elif defined(__NT__) && (__WATCOMC__ < 1100) |
||
416 | # define LZO_OS_WIN32 1 |
||
417 | # define LZO_INFO_OS "win32" |
||
418 | # elif defined(__linux__) || defined(__LINUX__) |
||
419 | # define LZO_OS_POSIX 1 |
||
420 | # define LZO_INFO_OS "posix" |
||
421 | # else |
||
422 | # error "please specify a target using the -bt compiler option" |
||
423 | # endif |
||
424 | #elif defined(__palmos__) |
||
425 | # define LZO_OS_PALMOS 1 |
||
426 | # define LZO_INFO_OS "palmos" |
||
427 | #elif defined(__TOS__) || defined(__atarist__) |
||
428 | # define LZO_OS_TOS 1 |
||
429 | # define LZO_INFO_OS "tos" |
||
430 | #elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__) |
||
431 | # define LZO_OS_MACCLASSIC 1 |
||
432 | # define LZO_INFO_OS "macclassic" |
||
433 | #elif defined(__VMS) |
||
434 | # define LZO_OS_VMS 1 |
||
435 | # define LZO_INFO_OS "vms" |
||
436 | #elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__) |
||
437 | # define LZO_OS_CONSOLE 1 |
||
438 | # define LZO_OS_CONSOLE_PS2 1 |
||
439 | # define LZO_INFO_OS "console" |
||
440 | # define LZO_INFO_OS_CONSOLE "ps2" |
||
441 | #elif defined(__mips__) && defined(__psp__) |
||
442 | # define LZO_OS_CONSOLE 1 |
||
443 | # define LZO_OS_CONSOLE_PSP 1 |
||
444 | # define LZO_INFO_OS "console" |
||
445 | # define LZO_INFO_OS_CONSOLE "psp" |
||
446 | #else |
||
447 | # define LZO_OS_POSIX 1 |
||
448 | # define LZO_INFO_OS "posix" |
||
449 | #endif |
||
450 | #if (LZO_OS_POSIX) |
||
451 | # if defined(_AIX) || defined(__AIX__) || defined(__aix__) |
||
452 | # define LZO_OS_POSIX_AIX 1 |
||
453 | # define LZO_INFO_OS_POSIX "aix" |
||
454 | # elif defined(__FreeBSD__) |
||
455 | # define LZO_OS_POSIX_FREEBSD 1 |
||
456 | # define LZO_INFO_OS_POSIX "freebsd" |
||
457 | # elif defined(__hpux__) || defined(__hpux) |
||
458 | # define LZO_OS_POSIX_HPUX 1 |
||
459 | # define LZO_INFO_OS_POSIX "hpux" |
||
460 | # elif defined(__INTERIX) |
||
461 | # define LZO_OS_POSIX_INTERIX 1 |
||
462 | # define LZO_INFO_OS_POSIX "interix" |
||
463 | # elif defined(__IRIX__) || defined(__irix__) |
||
464 | # define LZO_OS_POSIX_IRIX 1 |
||
465 | # define LZO_INFO_OS_POSIX "irix" |
||
466 | # elif defined(__linux__) || defined(__linux) || defined(__LINUX__) |
||
467 | # define LZO_OS_POSIX_LINUX 1 |
||
468 | # define LZO_INFO_OS_POSIX "linux" |
||
469 | # elif defined(__APPLE__) && defined(__MACH__) |
||
470 | # if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000) |
||
471 | # define LZO_OS_POSIX_DARWIN 1040 |
||
472 | # define LZO_INFO_OS_POSIX "darwin_iphone" |
||
473 | # elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040) |
||
474 | # define LZO_OS_POSIX_DARWIN __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ |
||
475 | # define LZO_INFO_OS_POSIX "darwin" |
||
476 | # else |
||
477 | # define LZO_OS_POSIX_DARWIN 1 |
||
478 | # define LZO_INFO_OS_POSIX "darwin" |
||
479 | # endif |
||
480 | # define LZO_OS_POSIX_MACOSX LZO_OS_POSIX_DARWIN |
||
481 | # elif defined(__minix__) || defined(__minix) |
||
482 | # define LZO_OS_POSIX_MINIX 1 |
||
483 | # define LZO_INFO_OS_POSIX "minix" |
||
484 | # elif defined(__NetBSD__) |
||
485 | # define LZO_OS_POSIX_NETBSD 1 |
||
486 | # define LZO_INFO_OS_POSIX "netbsd" |
||
487 | # elif defined(__OpenBSD__) |
||
488 | # define LZO_OS_POSIX_OPENBSD 1 |
||
489 | # define LZO_INFO_OS_POSIX "openbsd" |
||
490 | # elif defined(__osf__) |
||
491 | # define LZO_OS_POSIX_OSF 1 |
||
492 | # define LZO_INFO_OS_POSIX "osf" |
||
493 | # elif defined(__solaris__) || defined(__sun) |
||
494 | # if defined(__SVR4) || defined(__svr4__) |
||
495 | # define LZO_OS_POSIX_SOLARIS 1 |
||
496 | # define LZO_INFO_OS_POSIX "solaris" |
||
497 | # else |
||
498 | # define LZO_OS_POSIX_SUNOS 1 |
||
499 | # define LZO_INFO_OS_POSIX "sunos" |
||
500 | # endif |
||
501 | # elif defined(__ultrix__) || defined(__ultrix) |
||
502 | # define LZO_OS_POSIX_ULTRIX 1 |
||
503 | # define LZO_INFO_OS_POSIX "ultrix" |
||
504 | # elif defined(_UNICOS) |
||
505 | # define LZO_OS_POSIX_UNICOS 1 |
||
506 | # define LZO_INFO_OS_POSIX "unicos" |
||
507 | # else |
||
508 | # define LZO_OS_POSIX_UNKNOWN 1 |
||
509 | # define LZO_INFO_OS_POSIX "unknown" |
||
510 | # endif |
||
511 | #endif |
||
512 | #endif |
||
513 | #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) |
||
514 | # if (UINT_MAX != LZO_0xffffL) |
||
515 | # error "unexpected configuration - check your compiler defines" |
||
516 | # endif |
||
517 | # if (ULONG_MAX != LZO_0xffffffffL) |
||
518 | # error "unexpected configuration - check your compiler defines" |
||
519 | # endif |
||
520 | #endif |
||
521 | #if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) |
||
522 | # if (UINT_MAX != LZO_0xffffffffL) |
||
523 | # error "unexpected configuration - check your compiler defines" |
||
524 | # endif |
||
525 | # if (ULONG_MAX != LZO_0xffffffffL) |
||
526 | # error "unexpected configuration - check your compiler defines" |
||
527 | # endif |
||
528 | #endif |
||
529 | #if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) |
||
530 | # define LZO_CC_CILLY 1 |
||
531 | # define LZO_INFO_CC "Cilly" |
||
532 | # if defined(__CILLY__) |
||
533 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) |
||
534 | # else |
||
535 | # define LZO_INFO_CCVER "unknown" |
||
536 | # endif |
||
537 | #elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) |
||
538 | # define LZO_CC_SDCC 1 |
||
539 | # define LZO_INFO_CC "sdcc" |
||
540 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) |
||
541 | #elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) |
||
542 | # define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0)) |
||
543 | # define LZO_INFO_CC "Pathscale C" |
||
544 | # define LZO_INFO_CCVER __PATHSCALE__ |
||
545 | # if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) |
||
546 | # define LZO_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) |
||
547 | # endif |
||
548 | #elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0) |
||
549 | # define LZO_CC_INTELC __INTEL_COMPILER |
||
550 | # define LZO_INFO_CC "Intel C" |
||
551 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) |
||
552 | # if defined(_MSC_VER) && ((_MSC_VER-0) > 0) |
||
553 | # define LZO_CC_INTELC_MSC _MSC_VER |
||
554 | # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) |
||
555 | # define LZO_CC_INTELC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) |
||
556 | # endif |
||
557 | #elif defined(__POCC__) && defined(_WIN32) |
||
558 | # define LZO_CC_PELLESC 1 |
||
559 | # define LZO_INFO_CC "Pelles C" |
||
560 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) |
||
561 | #elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) |
||
562 | # if defined(__GNUC_PATCHLEVEL__) |
||
563 | # define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) |
||
564 | # else |
||
565 | # define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) |
||
566 | # endif |
||
567 | # define LZO_CC_ARMCC __ARMCC_VERSION |
||
568 | # define LZO_INFO_CC "ARM C Compiler" |
||
569 | # define LZO_INFO_CCVER __VERSION__ |
||
570 | #elif defined(__clang__) && defined(__c2__) && defined(__c2_version__) && defined(_MSC_VER) |
||
571 | # define LZO_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0)) |
||
572 | # define LZO_CC_CLANG_C2 _MSC_VER |
||
573 | # define LZO_CC_CLANG_VENDOR_MICROSOFT 1 |
||
574 | # define LZO_INFO_CC "clang/c2" |
||
575 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__c2_version__) |
||
576 | #elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__) |
||
577 | # if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) |
||
578 | # define LZO_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0)) |
||
579 | # else |
||
580 | # define LZO_CC_CLANG 0x010000L |
||
581 | # endif |
||
582 | # if defined(_MSC_VER) && ((_MSC_VER-0) > 0) |
||
583 | # define LZO_CC_CLANG_MSC _MSC_VER |
||
584 | # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) |
||
585 | # define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) |
||
586 | # endif |
||
587 | # if defined(__APPLE_CC__) |
||
588 | # define LZO_CC_CLANG_VENDOR_APPLE 1 |
||
589 | # define LZO_INFO_CC "clang/apple" |
||
590 | # else |
||
591 | # define LZO_CC_CLANG_VENDOR_LLVM 1 |
||
592 | # define LZO_INFO_CC "clang" |
||
593 | # endif |
||
594 | # if defined(__clang_version__) |
||
595 | # define LZO_INFO_CCVER __clang_version__ |
||
596 | # else |
||
597 | # define LZO_INFO_CCVER __VERSION__ |
||
598 | # endif |
||
599 | #elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) |
||
600 | # if defined(__GNUC_PATCHLEVEL__) |
||
601 | # define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) |
||
602 | # else |
||
603 | # define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) |
||
604 | # endif |
||
605 | # define LZO_CC_LLVM LZO_CC_LLVM_GNUC |
||
606 | # define LZO_INFO_CC "llvm-gcc" |
||
607 | # define LZO_INFO_CCVER __VERSION__ |
||
608 | #elif defined(__ACK__) && defined(_ACK) |
||
609 | # define LZO_CC_ACK 1 |
||
610 | # define LZO_INFO_CC "Amsterdam Compiler Kit C" |
||
611 | # define LZO_INFO_CCVER "unknown" |
||
612 | #elif defined(__ARMCC_VERSION) && !defined(__GNUC__) |
||
613 | # define LZO_CC_ARMCC __ARMCC_VERSION |
||
614 | # define LZO_CC_ARMCC_ARMCC __ARMCC_VERSION |
||
615 | # define LZO_INFO_CC "ARM C Compiler" |
||
616 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ARMCC_VERSION) |
||
617 | #elif defined(__AZTEC_C__) |
||
618 | # define LZO_CC_AZTECC 1 |
||
619 | # define LZO_INFO_CC "Aztec C" |
||
620 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) |
||
621 | #elif defined(__CODEGEARC__) |
||
622 | # define LZO_CC_CODEGEARC 1 |
||
623 | # define LZO_INFO_CC "CodeGear C" |
||
624 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) |
||
625 | #elif defined(__BORLANDC__) |
||
626 | # define LZO_CC_BORLANDC 1 |
||
627 | # define LZO_INFO_CC "Borland C" |
||
628 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) |
||
629 | #elif defined(_CRAYC) && defined(_RELEASE) |
||
630 | # define LZO_CC_CRAYC 1 |
||
631 | # define LZO_INFO_CC "Cray C" |
||
632 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) |
||
633 | #elif defined(__DMC__) && defined(__SC__) |
||
634 | # define LZO_CC_DMC 1 |
||
635 | # define LZO_INFO_CC "Digital Mars C" |
||
636 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) |
||
637 | #elif defined(__DECC) |
||
638 | # define LZO_CC_DECC 1 |
||
639 | # define LZO_INFO_CC "DEC C" |
||
640 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) |
||
641 | #elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0) |
||
642 | # define LZO_CC_GHS 1 |
||
643 | # define LZO_INFO_CC "Green Hills C" |
||
644 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER) |
||
645 | # if defined(_MSC_VER) && ((_MSC_VER-0) > 0) |
||
646 | # define LZO_CC_GHS_MSC _MSC_VER |
||
647 | # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) |
||
648 | # define LZO_CC_GHS_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) |
||
649 | # endif |
||
650 | #elif defined(__HIGHC__) |
||
651 | # define LZO_CC_HIGHC 1 |
||
652 | # define LZO_INFO_CC "MetaWare High C" |
||
653 | # define LZO_INFO_CCVER "unknown" |
||
654 | #elif defined(__HP_aCC) && ((__HP_aCC-0) > 0) |
||
655 | # define LZO_CC_HPACC __HP_aCC |
||
656 | # define LZO_INFO_CC "HP aCC" |
||
657 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__HP_aCC) |
||
658 | #elif defined(__IAR_SYSTEMS_ICC__) |
||
659 | # define LZO_CC_IARC 1 |
||
660 | # define LZO_INFO_CC "IAR C" |
||
661 | # if defined(__VER__) |
||
662 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) |
||
663 | # else |
||
664 | # define LZO_INFO_CCVER "unknown" |
||
665 | # endif |
||
666 | #elif defined(__IBMC__) && ((__IBMC__-0) > 0) |
||
667 | # define LZO_CC_IBMC __IBMC__ |
||
668 | # define LZO_INFO_CC "IBM C" |
||
669 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) |
||
670 | #elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0) |
||
671 | # define LZO_CC_IBMC __IBMCPP__ |
||
672 | # define LZO_INFO_CC "IBM C" |
||
673 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMCPP__) |
||
674 | #elif defined(__KEIL__) && defined(__C166__) |
||
675 | # define LZO_CC_KEILC 1 |
||
676 | # define LZO_INFO_CC "Keil C" |
||
677 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) |
||
678 | #elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) |
||
679 | # define LZO_CC_LCCWIN32 1 |
||
680 | # define LZO_INFO_CC "lcc-win32" |
||
681 | # define LZO_INFO_CCVER "unknown" |
||
682 | #elif defined(__LCC__) |
||
683 | # define LZO_CC_LCC 1 |
||
684 | # define LZO_INFO_CC "lcc" |
||
685 | # if defined(__LCC_VERSION__) |
||
686 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) |
||
687 | # else |
||
688 | # define LZO_INFO_CCVER "unknown" |
||
689 | # endif |
||
690 | #elif defined(__MWERKS__) && ((__MWERKS__-0) > 0) |
||
691 | # define LZO_CC_MWERKS __MWERKS__ |
||
692 | # define LZO_INFO_CC "Metrowerks C" |
||
693 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) |
||
694 | #elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) |
||
695 | # define LZO_CC_NDPC 1 |
||
696 | # define LZO_INFO_CC "Microway NDP C" |
||
697 | # define LZO_INFO_CCVER "unknown" |
||
698 | #elif defined(__PACIFIC__) |
||
699 | # define LZO_CC_PACIFICC 1 |
||
700 | # define LZO_INFO_CC "Pacific C" |
||
701 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) |
||
702 | #elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) |
||
703 | # if defined(__PGIC_PATCHLEVEL__) |
||
704 | # define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0)) |
||
705 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) "." LZO_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__) |
||
706 | # else |
||
707 | # define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100) |
||
708 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0" |
||
709 | # endif |
||
710 | # define LZO_INFO_CC "Portland Group PGI C" |
||
711 | #elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) |
||
712 | # define LZO_CC_PGI 1 |
||
713 | # define LZO_INFO_CC "Portland Group PGI C" |
||
714 | # define LZO_INFO_CCVER "unknown" |
||
715 | #elif defined(__PUREC__) && defined(__TOS__) |
||
716 | # define LZO_CC_PUREC 1 |
||
717 | # define LZO_INFO_CC "Pure C" |
||
718 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) |
||
719 | #elif defined(__SC__) && defined(__ZTC__) |
||
720 | # define LZO_CC_SYMANTECC 1 |
||
721 | # define LZO_INFO_CC "Symantec C" |
||
722 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) |
||
723 | #elif defined(__SUNPRO_C) |
||
724 | # define LZO_INFO_CC "SunPro C" |
||
725 | # if ((__SUNPRO_C-0) > 0) |
||
726 | # define LZO_CC_SUNPROC __SUNPRO_C |
||
727 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) |
||
728 | # else |
||
729 | # define LZO_CC_SUNPROC 1 |
||
730 | # define LZO_INFO_CCVER "unknown" |
||
731 | # endif |
||
732 | #elif defined(__SUNPRO_CC) |
||
733 | # define LZO_INFO_CC "SunPro C" |
||
734 | # if ((__SUNPRO_CC-0) > 0) |
||
735 | # define LZO_CC_SUNPROC __SUNPRO_CC |
||
736 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) |
||
737 | # else |
||
738 | # define LZO_CC_SUNPROC 1 |
||
739 | # define LZO_INFO_CCVER "unknown" |
||
740 | # endif |
||
741 | #elif defined(__TINYC__) |
||
742 | # define LZO_CC_TINYC 1 |
||
743 | # define LZO_INFO_CC "Tiny C" |
||
744 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) |
||
745 | #elif defined(__TSC__) |
||
746 | # define LZO_CC_TOPSPEEDC 1 |
||
747 | # define LZO_INFO_CC "TopSpeed C" |
||
748 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) |
||
749 | #elif defined(__WATCOMC__) |
||
750 | # define LZO_CC_WATCOMC 1 |
||
751 | # define LZO_INFO_CC "Watcom C" |
||
752 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) |
||
753 | #elif defined(__TURBOC__) |
||
754 | # define LZO_CC_TURBOC 1 |
||
755 | # define LZO_INFO_CC "Turbo C" |
||
756 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) |
||
757 | #elif defined(__ZTC__) |
||
758 | # define LZO_CC_ZORTECHC 1 |
||
759 | # define LZO_INFO_CC "Zortech C" |
||
760 | # if ((__ZTC__-0) == 0x310) |
||
761 | # define LZO_INFO_CCVER "0x310" |
||
762 | # else |
||
763 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) |
||
764 | # endif |
||
765 | #elif defined(__GNUC__) && defined(__VERSION__) |
||
766 | # if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) |
||
767 | # define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) |
||
768 | # elif defined(__GNUC_MINOR__) |
||
769 | # define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) |
||
770 | # else |
||
771 | # define LZO_CC_GNUC (__GNUC__ * 0x10000L) |
||
772 | # endif |
||
773 | # define LZO_INFO_CC "gcc" |
||
774 | # define LZO_INFO_CCVER __VERSION__ |
||
775 | #elif defined(_MSC_VER) && ((_MSC_VER-0) > 0) |
||
776 | # define LZO_CC_MSC _MSC_VER |
||
777 | # define LZO_INFO_CC "Microsoft C" |
||
778 | # if defined(_MSC_FULL_VER) |
||
779 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) |
||
780 | # else |
||
781 | # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) |
||
782 | # endif |
||
783 | #else |
||
784 | # define LZO_CC_UNKNOWN 1 |
||
785 | # define LZO_INFO_CC "unknown" |
||
786 | # define LZO_INFO_CCVER "unknown" |
||
787 | #endif |
||
788 | #if (LZO_CC_GNUC) && defined(__OPEN64__) |
||
789 | # if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__) |
||
790 | # define LZO_CC_OPEN64 (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0)) |
||
791 | # define LZO_CC_OPEN64_GNUC LZO_CC_GNUC |
||
792 | # endif |
||
793 | #endif |
||
794 | #if (LZO_CC_GNUC) && defined(__PCC__) |
||
795 | # if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__) |
||
796 | # define LZO_CC_PCC (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0)) |
||
797 | # define LZO_CC_PCC_GNUC LZO_CC_GNUC |
||
798 | # endif |
||
799 | #endif |
||
800 | #if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) |
||
801 | # error "LZO_CC_MSC: _MSC_FULL_VER is not defined" |
||
802 | #endif |
||
803 | #if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) |
||
804 | # if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) |
||
805 | # if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) |
||
806 | # define LZO_ARCH_CRAY_MPP 1 |
||
807 | # elif defined(_CRAY1) |
||
808 | # define LZO_ARCH_CRAY_PVP 1 |
||
809 | # endif |
||
810 | # endif |
||
811 | #endif |
||
812 | #if !defined(__LZO_ARCH_OVERRIDE) |
||
813 | #if (LZO_ARCH_GENERIC) |
||
814 | # define LZO_INFO_ARCH "generic" |
||
815 | #elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) |
||
816 | # define LZO_ARCH_I086 1 |
||
817 | # define LZO_INFO_ARCH "i086" |
||
818 | #elif defined(__aarch64__) || defined(_M_ARM64) |
||
819 | # define LZO_ARCH_ARM64 1 |
||
820 | # define LZO_INFO_ARCH "arm64" |
||
821 | #elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) |
||
822 | # define LZO_ARCH_ALPHA 1 |
||
823 | # define LZO_INFO_ARCH "alpha" |
||
824 | #elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) |
||
825 | # define LZO_ARCH_ALPHA 1 |
||
826 | # define LZO_INFO_ARCH "alpha" |
||
827 | #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) |
||
828 | # define LZO_ARCH_AMD64 1 |
||
829 | # define LZO_INFO_ARCH "amd64" |
||
830 | #elif defined(__arm__) || defined(_M_ARM) |
||
831 | # define LZO_ARCH_ARM 1 |
||
832 | # define LZO_INFO_ARCH "arm" |
||
833 | #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) |
||
834 | # define LZO_ARCH_ARM 1 |
||
835 | # define LZO_INFO_ARCH "arm" |
||
836 | #elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) |
||
837 | # define LZO_ARCH_AVR 1 |
||
838 | # define LZO_INFO_ARCH "avr" |
||
839 | #elif defined(__avr32__) || defined(__AVR32__) |
||
840 | # define LZO_ARCH_AVR32 1 |
||
841 | # define LZO_INFO_ARCH "avr32" |
||
842 | #elif defined(__bfin__) |
||
843 | # define LZO_ARCH_BLACKFIN 1 |
||
844 | # define LZO_INFO_ARCH "blackfin" |
||
845 | #elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) |
||
846 | # define LZO_ARCH_C166 1 |
||
847 | # define LZO_INFO_ARCH "c166" |
||
848 | #elif defined(__cris__) |
||
849 | # define LZO_ARCH_CRIS 1 |
||
850 | # define LZO_INFO_ARCH "cris" |
||
851 | #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) |
||
852 | # define LZO_ARCH_EZ80 1 |
||
853 | # define LZO_INFO_ARCH "ez80" |
||
854 | #elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) |
||
855 | # define LZO_ARCH_H8300 1 |
||
856 | # define LZO_INFO_ARCH "h8300" |
||
857 | #elif defined(__hppa__) || defined(__hppa) |
||
858 | # define LZO_ARCH_HPPA 1 |
||
859 | # define LZO_INFO_ARCH "hppa" |
||
860 | #elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) |
||
861 | # define LZO_ARCH_I386 1 |
||
862 | # define LZO_ARCH_IA32 1 |
||
863 | # define LZO_INFO_ARCH "i386" |
||
864 | #elif (LZO_CC_ZORTECHC && defined(__I86__)) |
||
865 | # define LZO_ARCH_I386 1 |
||
866 | # define LZO_ARCH_IA32 1 |
||
867 | # define LZO_INFO_ARCH "i386" |
||
868 | #elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) |
||
869 | # define LZO_ARCH_I386 1 |
||
870 | # define LZO_ARCH_IA32 1 |
||
871 | # define LZO_INFO_ARCH "i386" |
||
872 | #elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) |
||
873 | # define LZO_ARCH_IA64 1 |
||
874 | # define LZO_INFO_ARCH "ia64" |
||
875 | #elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) |
||
876 | # define LZO_ARCH_M16C 1 |
||
877 | # define LZO_INFO_ARCH "m16c" |
||
878 | #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) |
||
879 | # define LZO_ARCH_M16C 1 |
||
880 | # define LZO_INFO_ARCH "m16c" |
||
881 | #elif defined(__m32r__) |
||
882 | # define LZO_ARCH_M32R 1 |
||
883 | # define LZO_INFO_ARCH "m32r" |
||
884 | #elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) |
||
885 | # define LZO_ARCH_M68K 1 |
||
886 | # define LZO_INFO_ARCH "m68k" |
||
887 | #elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) |
||
888 | # define LZO_ARCH_MCS251 1 |
||
889 | # define LZO_INFO_ARCH "mcs251" |
||
890 | #elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) |
||
891 | # define LZO_ARCH_MCS51 1 |
||
892 | # define LZO_INFO_ARCH "mcs51" |
||
893 | #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) |
||
894 | # define LZO_ARCH_MCS51 1 |
||
895 | # define LZO_INFO_ARCH "mcs51" |
||
896 | #elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) |
||
897 | # define LZO_ARCH_MIPS 1 |
||
898 | # define LZO_INFO_ARCH "mips" |
||
899 | #elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) |
||
900 | # define LZO_ARCH_MSP430 1 |
||
901 | # define LZO_INFO_ARCH "msp430" |
||
902 | #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) |
||
903 | # define LZO_ARCH_MSP430 1 |
||
904 | # define LZO_INFO_ARCH "msp430" |
||
905 | #elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) |
||
906 | # define LZO_ARCH_POWERPC 1 |
||
907 | # define LZO_INFO_ARCH "powerpc" |
||
908 | #elif defined(__powerpc64__) || defined(__powerpc64) || defined(__ppc64__) || defined(__PPC64__) |
||
909 | # define LZO_ARCH_POWERPC 1 |
||
910 | # define LZO_INFO_ARCH "powerpc" |
||
911 | #elif defined(__powerpc64le__) || defined(__powerpc64le) || defined(__ppc64le__) || defined(__PPC64LE__) |
||
912 | # define LZO_ARCH_POWERPC 1 |
||
913 | # define LZO_INFO_ARCH "powerpc" |
||
914 | #elif defined(__riscv) |
||
915 | # define LZO_ARCH_RISCV 1 |
||
916 | # define LZO_INFO_ARCH "riscv" |
||
917 | #elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) |
||
918 | # define LZO_ARCH_S390 1 |
||
919 | # define LZO_INFO_ARCH "s390" |
||
920 | #elif defined(__sh__) || defined(_M_SH) |
||
921 | # define LZO_ARCH_SH 1 |
||
922 | # define LZO_INFO_ARCH "sh" |
||
923 | #elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) |
||
924 | # define LZO_ARCH_SPARC 1 |
||
925 | # define LZO_INFO_ARCH "sparc" |
||
926 | #elif defined(__SPU__) |
||
927 | # define LZO_ARCH_SPU 1 |
||
928 | # define LZO_INFO_ARCH "spu" |
||
929 | #elif (UINT_MAX == LZO_0xffffL) && defined(__z80) |
||
930 | # define LZO_ARCH_Z80 1 |
||
931 | # define LZO_INFO_ARCH "z80" |
||
932 | #elif (LZO_ARCH_CRAY_PVP) |
||
933 | # if defined(_CRAYSV1) |
||
934 | # define LZO_ARCH_CRAY_SV1 1 |
||
935 | # define LZO_INFO_ARCH "cray_sv1" |
||
936 | # elif (_ADDR64) |
||
937 | # define LZO_ARCH_CRAY_T90 1 |
||
938 | # define LZO_INFO_ARCH "cray_t90" |
||
939 | # elif (_ADDR32) |
||
940 | # define LZO_ARCH_CRAY_YMP 1 |
||
941 | # define LZO_INFO_ARCH "cray_ymp" |
||
942 | # else |
||
943 | # define LZO_ARCH_CRAY_XMP 1 |
||
944 | # define LZO_INFO_ARCH "cray_xmp" |
||
945 | # endif |
||
946 | #else |
||
947 | # define LZO_ARCH_UNKNOWN 1 |
||
948 | # define LZO_INFO_ARCH "unknown" |
||
949 | #endif |
||
950 | #endif |
||
951 | #if !defined(LZO_ARCH_ARM_THUMB2) |
||
952 | #if (LZO_ARCH_ARM) |
||
953 | # if defined(__thumb__) || defined(__thumb) || defined(_M_THUMB) |
||
954 | # if defined(__thumb2__) |
||
955 | # define LZO_ARCH_ARM_THUMB2 1 |
||
956 | # elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4) |
||
957 | # define LZO_ARCH_ARM_THUMB2 1 |
||
958 | # elif 1 && defined(_MSC_VER) && defined(_M_THUMB) && ((_M_THUMB)+0 >= 7) |
||
959 | # define LZO_ARCH_ARM_THUMB2 1 |
||
960 | # endif |
||
961 | # endif |
||
962 | #endif |
||
963 | #endif |
||
964 | #if (LZO_ARCH_ARM_THUMB2) |
||
965 | # undef LZO_INFO_ARCH |
||
966 | # define LZO_INFO_ARCH "arm_thumb2" |
||
967 | #endif |
||
968 | #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) |
||
969 | # error "FIXME - missing define for CPU architecture" |
||
970 | #endif |
||
971 | #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) |
||
972 | # error "FIXME - missing LZO_OS_WIN32 define for CPU architecture" |
||
973 | #endif |
||
974 | #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) |
||
975 | # error "FIXME - missing LZO_OS_WIN64 define for CPU architecture" |
||
976 | #endif |
||
977 | #if (LZO_OS_OS216 || LZO_OS_WIN16) |
||
978 | # define LZO_ARCH_I086PM 1 |
||
979 | #elif 1 && (LZO_OS_DOS16 && defined(BLX286)) |
||
980 | # define LZO_ARCH_I086PM 1 |
||
981 | #elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) |
||
982 | # define LZO_ARCH_I086PM 1 |
||
983 | #elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) |
||
984 | # define LZO_ARCH_I086PM 1 |
||
985 | #endif |
||
986 | #if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) |
||
987 | # define LZO_ARCH_X64 1 |
||
988 | #elif (!LZO_ARCH_AMD64 && LZO_ARCH_X64) && defined(__LZO_ARCH_OVERRIDE) |
||
989 | # define LZO_ARCH_AMD64 1 |
||
990 | #endif |
||
991 | #if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) |
||
992 | # define LZO_ARCH_AARCH64 1 |
||
993 | #elif (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) && defined(__LZO_ARCH_OVERRIDE) |
||
994 | # define LZO_ARCH_ARM64 1 |
||
995 | #endif |
||
996 | #if (LZO_ARCH_I386 && !LZO_ARCH_X86) |
||
997 | # define LZO_ARCH_X86 1 |
||
998 | #elif (!LZO_ARCH_I386 && LZO_ARCH_X86) && defined(__LZO_ARCH_OVERRIDE) |
||
999 | # define LZO_ARCH_I386 1 |
||
1000 | #endif |
||
1001 | #if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) || (!LZO_ARCH_AMD64 && LZO_ARCH_X64) |
||
1002 | # error "unexpected configuration - check your compiler defines" |
||
1003 | #endif |
||
1004 | #if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) || (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) |
||
1005 | # error "unexpected configuration - check your compiler defines" |
||
1006 | #endif |
||
1007 | #if (LZO_ARCH_I386 && !LZO_ARCH_X86) || (!LZO_ARCH_I386 && LZO_ARCH_X86) |
||
1008 | # error "unexpected configuration - check your compiler defines" |
||
1009 | #endif |
||
1010 | #if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM) |
||
1011 | # error "unexpected configuration - check your compiler defines" |
||
1012 | #endif |
||
1013 | #if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM) |
||
1014 | # error "unexpected configuration - check your compiler defines" |
||
1015 | #endif |
||
1016 | #if (LZO_ARCH_ARM_THUMB1 && LZO_ARCH_ARM_THUMB2) |
||
1017 | # error "unexpected configuration - check your compiler defines" |
||
1018 | #endif |
||
1019 | #if (LZO_ARCH_I086PM && !LZO_ARCH_I086) |
||
1020 | # error "unexpected configuration - check your compiler defines" |
||
1021 | #endif |
||
1022 | #if (LZO_ARCH_I086) |
||
1023 | # if (UINT_MAX != LZO_0xffffL) |
||
1024 | # error "unexpected configuration - check your compiler defines" |
||
1025 | # endif |
||
1026 | # if (ULONG_MAX != LZO_0xffffffffL) |
||
1027 | # error "unexpected configuration - check your compiler defines" |
||
1028 | # endif |
||
1029 | #endif |
||
1030 | #if (LZO_ARCH_I386) |
||
1031 | # if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) |
||
1032 | # error "unexpected configuration - check your compiler defines" |
||
1033 | # endif |
||
1034 | # if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) |
||
1035 | # error "unexpected configuration - check your compiler defines" |
||
1036 | # endif |
||
1037 | # if (ULONG_MAX != LZO_0xffffffffL) |
||
1038 | # error "unexpected configuration - check your compiler defines" |
||
1039 | # endif |
||
1040 | #endif |
||
1041 | #if (LZO_ARCH_AMD64 || LZO_ARCH_I386) |
||
1042 | # if !defined(LZO_TARGET_FEATURE_SSE2) |
||
1043 | # if defined(__SSE2__) |
||
1044 | # define LZO_TARGET_FEATURE_SSE2 1 |
||
1045 | # elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) |
||
1046 | # define LZO_TARGET_FEATURE_SSE2 1 |
||
1047 | # elif (LZO_CC_INTELC_MSC || LZO_CC_MSC) && defined(_M_AMD64) |
||
1048 | # define LZO_TARGET_FEATURE_SSE2 1 |
||
1049 | # endif |
||
1050 | # endif |
||
1051 | # if !defined(LZO_TARGET_FEATURE_SSSE3) |
||
1052 | # if (LZO_TARGET_FEATURE_SSE2) |
||
1053 | # if defined(__SSSE3__) |
||
1054 | # define LZO_TARGET_FEATURE_SSSE3 1 |
||
1055 | # elif defined(_MSC_VER) && defined(__AVX__) |
||
1056 | # define LZO_TARGET_FEATURE_SSSE3 1 |
||
1057 | # endif |
||
1058 | # endif |
||
1059 | # endif |
||
1060 | # if !defined(LZO_TARGET_FEATURE_SSE4_2) |
||
1061 | # if (LZO_TARGET_FEATURE_SSSE3) |
||
1062 | # if defined(__SSE4_2__) |
||
1063 | # define LZO_TARGET_FEATURE_SSE4_2 1 |
||
1064 | # endif |
||
1065 | # endif |
||
1066 | # endif |
||
1067 | # if !defined(LZO_TARGET_FEATURE_AVX) |
||
1068 | # if (LZO_TARGET_FEATURE_SSSE3) |
||
1069 | # if defined(__AVX__) |
||
1070 | # define LZO_TARGET_FEATURE_AVX 1 |
||
1071 | # endif |
||
1072 | # endif |
||
1073 | # endif |
||
1074 | # if !defined(LZO_TARGET_FEATURE_AVX2) |
||
1075 | # if (LZO_TARGET_FEATURE_AVX) |
||
1076 | # if defined(__AVX2__) |
||
1077 | # define LZO_TARGET_FEATURE_AVX2 1 |
||
1078 | # endif |
||
1079 | # endif |
||
1080 | # endif |
||
1081 | #endif |
||
1082 | #if (LZO_TARGET_FEATURE_SSSE3 && !(LZO_TARGET_FEATURE_SSE2)) |
||
1083 | # error "unexpected configuration - check your compiler defines" |
||
1084 | #endif |
||
1085 | #if (LZO_TARGET_FEATURE_SSE4_2 && !(LZO_TARGET_FEATURE_SSSE3)) |
||
1086 | # error "unexpected configuration - check your compiler defines" |
||
1087 | #endif |
||
1088 | #if (LZO_TARGET_FEATURE_AVX && !(LZO_TARGET_FEATURE_SSSE3)) |
||
1089 | # error "unexpected configuration - check your compiler defines" |
||
1090 | #endif |
||
1091 | #if (LZO_TARGET_FEATURE_AVX2 && !(LZO_TARGET_FEATURE_AVX)) |
||
1092 | # error "unexpected configuration - check your compiler defines" |
||
1093 | #endif |
||
1094 | #if (LZO_ARCH_ARM) |
||
1095 | # if !defined(LZO_TARGET_FEATURE_NEON) |
||
1096 | # if defined(__ARM_NEON) && ((__ARM_NEON)+0) |
||
1097 | # define LZO_TARGET_FEATURE_NEON 1 |
||
1098 | # elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0) |
||
1099 | # define LZO_TARGET_FEATURE_NEON 1 |
||
1100 | # elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0) |
||
1101 | # define LZO_TARGET_FEATURE_NEON 1 |
||
1102 | # endif |
||
1103 | # endif |
||
1104 | #elif (LZO_ARCH_ARM64) |
||
1105 | # if !defined(LZO_TARGET_FEATURE_NEON) |
||
1106 | # if 1 |
||
1107 | # define LZO_TARGET_FEATURE_NEON 1 |
||
1108 | # endif |
||
1109 | # endif |
||
1110 | #endif |
||
1111 | #if 0 |
||
1112 | #elif !defined(__LZO_MM_OVERRIDE) |
||
1113 | #if (LZO_ARCH_I086) |
||
1114 | #if (UINT_MAX != LZO_0xffffL) |
||
1115 | # error "unexpected configuration - check your compiler defines" |
||
1116 | #endif |
||
1117 | #if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) |
||
1118 | # define LZO_MM_TINY 1 |
||
1119 | #elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) |
||
1120 | # define LZO_MM_HUGE 1 |
||
1121 | #elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) |
||
1122 | # define LZO_MM_SMALL 1 |
||
1123 | #elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) |
||
1124 | # define LZO_MM_MEDIUM 1 |
||
1125 | #elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) |
||
1126 | # define LZO_MM_COMPACT 1 |
||
1127 | #elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) |
||
1128 | # define LZO_MM_LARGE 1 |
||
1129 | #elif (LZO_CC_AZTECC) |
||
1130 | # if defined(_LARGE_CODE) && defined(_LARGE_DATA) |
||
1131 | # define LZO_MM_LARGE 1 |
||
1132 | # elif defined(_LARGE_CODE) |
||
1133 | # define LZO_MM_MEDIUM 1 |
||
1134 | # elif defined(_LARGE_DATA) |
||
1135 | # define LZO_MM_COMPACT 1 |
||
1136 | # else |
||
1137 | # define LZO_MM_SMALL 1 |
||
1138 | # endif |
||
1139 | #elif (LZO_CC_ZORTECHC && defined(__VCM__)) |
||
1140 | # define LZO_MM_LARGE 1 |
||
1141 | #else |
||
1142 | # error "unknown LZO_ARCH_I086 memory model" |
||
1143 | #endif |
||
1144 | #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) |
||
1145 | #define LZO_HAVE_MM_HUGE_PTR 1 |
||
1146 | #define LZO_HAVE_MM_HUGE_ARRAY 1 |
||
1147 | #if (LZO_MM_TINY) |
||
1148 | # undef LZO_HAVE_MM_HUGE_ARRAY |
||
1149 | #endif |
||
1150 | #if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) |
||
1151 | # undef LZO_HAVE_MM_HUGE_PTR |
||
1152 | # undef LZO_HAVE_MM_HUGE_ARRAY |
||
1153 | #elif (LZO_CC_DMC || LZO_CC_SYMANTECC) |
||
1154 | # undef LZO_HAVE_MM_HUGE_ARRAY |
||
1155 | #elif (LZO_CC_MSC && defined(_QC)) |
||
1156 | # undef LZO_HAVE_MM_HUGE_ARRAY |
||
1157 | # if (_MSC_VER < 600) |
||
1158 | # undef LZO_HAVE_MM_HUGE_PTR |
||
1159 | # endif |
||
1160 | #elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) |
||
1161 | # undef LZO_HAVE_MM_HUGE_ARRAY |
||
1162 | #endif |
||
1163 | #if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR) |
||
1164 | # if (LZO_OS_DOS16) |
||
1165 | # error "unexpected configuration - check your compiler defines" |
||
1166 | # elif (LZO_CC_ZORTECHC) |
||
1167 | # else |
||
1168 | # error "unexpected configuration - check your compiler defines" |
||
1169 | # endif |
||
1170 | #endif |
||
1171 | #if defined(__cplusplus) |
||
1172 | extern "C" { |
||
1173 | #endif |
||
1174 | #if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) |
||
1175 | extern void __near __cdecl _AHSHIFT(void); |
||
1176 | # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) |
||
1177 | #elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) |
||
1178 | extern void __near __cdecl _AHSHIFT(void); |
||
1179 | # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) |
||
1180 | #elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) |
||
1181 | extern void __near __cdecl _AHSHIFT(void); |
||
1182 | # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) |
||
1183 | #elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) |
||
1184 | extern void __near __cdecl _AHSHIFT(void); |
||
1185 | # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) |
||
1186 | #elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) |
||
1187 | # define LZO_MM_AHSHIFT 12 |
||
1188 | #elif (LZO_CC_WATCOMC) |
||
1189 | extern unsigned char _HShift; |
||
1190 | # define LZO_MM_AHSHIFT ((unsigned) _HShift) |
||
1191 | #else |
||
1192 | # error "FIXME - implement LZO_MM_AHSHIFT" |
||
1193 | #endif |
||
1194 | #if defined(__cplusplus) |
||
1195 | } |
||
1196 | #endif |
||
1197 | #endif |
||
1198 | #elif (LZO_ARCH_C166) |
||
1199 | #if !defined(__MODEL__) |
||
1200 | # error "FIXME - LZO_ARCH_C166 __MODEL__" |
||
1201 | #elif ((__MODEL__) == 0) |
||
1202 | # define LZO_MM_SMALL 1 |
||
1203 | #elif ((__MODEL__) == 1) |
||
1204 | # define LZO_MM_SMALL 1 |
||
1205 | #elif ((__MODEL__) == 2) |
||
1206 | # define LZO_MM_LARGE 1 |
||
1207 | #elif ((__MODEL__) == 3) |
||
1208 | # define LZO_MM_TINY 1 |
||
1209 | #elif ((__MODEL__) == 4) |
||
1210 | # define LZO_MM_XTINY 1 |
||
1211 | #elif ((__MODEL__) == 5) |
||
1212 | # define LZO_MM_XSMALL 1 |
||
1213 | #else |
||
1214 | # error "FIXME - LZO_ARCH_C166 __MODEL__" |
||
1215 | #endif |
||
1216 | #elif (LZO_ARCH_MCS251) |
||
1217 | #if !defined(__MODEL__) |
||
1218 | # error "FIXME - LZO_ARCH_MCS251 __MODEL__" |
||
1219 | #elif ((__MODEL__) == 0) |
||
1220 | # define LZO_MM_SMALL 1 |
||
1221 | #elif ((__MODEL__) == 2) |
||
1222 | # define LZO_MM_LARGE 1 |
||
1223 | #elif ((__MODEL__) == 3) |
||
1224 | # define LZO_MM_TINY 1 |
||
1225 | #elif ((__MODEL__) == 4) |
||
1226 | # define LZO_MM_XTINY 1 |
||
1227 | #elif ((__MODEL__) == 5) |
||
1228 | # define LZO_MM_XSMALL 1 |
||
1229 | #else |
||
1230 | # error "FIXME - LZO_ARCH_MCS251 __MODEL__" |
||
1231 | #endif |
||
1232 | #elif (LZO_ARCH_MCS51) |
||
1233 | #if !defined(__MODEL__) |
||
1234 | # error "FIXME - LZO_ARCH_MCS51 __MODEL__" |
||
1235 | #elif ((__MODEL__) == 1) |
||
1236 | # define LZO_MM_SMALL 1 |
||
1237 | #elif ((__MODEL__) == 2) |
||
1238 | # define LZO_MM_LARGE 1 |
||
1239 | #elif ((__MODEL__) == 3) |
||
1240 | # define LZO_MM_TINY 1 |
||
1241 | #elif ((__MODEL__) == 4) |
||
1242 | # define LZO_MM_XTINY 1 |
||
1243 | #elif ((__MODEL__) == 5) |
||
1244 | # define LZO_MM_XSMALL 1 |
||
1245 | #else |
||
1246 | # error "FIXME - LZO_ARCH_MCS51 __MODEL__" |
||
1247 | #endif |
||
1248 | #elif (LZO_ARCH_CRAY_PVP) |
||
1249 | # define LZO_MM_PVP 1 |
||
1250 | #else |
||
1251 | # define LZO_MM_FLAT 1 |
||
1252 | #endif |
||
1253 | #if (LZO_MM_COMPACT) |
||
1254 | # define LZO_INFO_MM "compact" |
||
1255 | #elif (LZO_MM_FLAT) |
||
1256 | # define LZO_INFO_MM "flat" |
||
1257 | #elif (LZO_MM_HUGE) |
||
1258 | # define LZO_INFO_MM "huge" |
||
1259 | #elif (LZO_MM_LARGE) |
||
1260 | # define LZO_INFO_MM "large" |
||
1261 | #elif (LZO_MM_MEDIUM) |
||
1262 | # define LZO_INFO_MM "medium" |
||
1263 | #elif (LZO_MM_PVP) |
||
1264 | # define LZO_INFO_MM "pvp" |
||
1265 | #elif (LZO_MM_SMALL) |
||
1266 | # define LZO_INFO_MM "small" |
||
1267 | #elif (LZO_MM_TINY) |
||
1268 | # define LZO_INFO_MM "tiny" |
||
1269 | #else |
||
1270 | # error "unknown memory model" |
||
1271 | #endif |
||
1272 | #endif |
||
1273 | #if !defined(__lzo_gnuc_extension__) |
||
1274 | #if (LZO_CC_GNUC >= 0x020800ul) |
||
1275 | # define __lzo_gnuc_extension__ __extension__ |
||
1276 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1277 | # define __lzo_gnuc_extension__ __extension__ |
||
1278 | #elif (LZO_CC_IBMC >= 600) |
||
1279 | # define __lzo_gnuc_extension__ __extension__ |
||
1280 | #endif |
||
1281 | #endif |
||
1282 | #if !defined(__lzo_gnuc_extension__) |
||
1283 | # define __lzo_gnuc_extension__ /*empty*/ |
||
1284 | #endif |
||
1285 | #if !defined(lzo_has_builtin) |
||
1286 | #if (LZO_CC_CLANG) && defined(__has_builtin) |
||
1287 | # define lzo_has_builtin __has_builtin |
||
1288 | #endif |
||
1289 | #endif |
||
1290 | #if !defined(lzo_has_builtin) |
||
1291 | # define lzo_has_builtin(x) 0 |
||
1292 | #endif |
||
1293 | #if !defined(lzo_has_attribute) |
||
1294 | #if (LZO_CC_CLANG) && defined(__has_attribute) |
||
1295 | # define lzo_has_attribute __has_attribute |
||
1296 | #endif |
||
1297 | #endif |
||
1298 | #if !defined(lzo_has_attribute) |
||
1299 | # define lzo_has_attribute(x) 0 |
||
1300 | #endif |
||
1301 | #if !defined(lzo_has_declspec_attribute) |
||
1302 | #if (LZO_CC_CLANG) && defined(__has_declspec_attribute) |
||
1303 | # define lzo_has_declspec_attribute __has_declspec_attribute |
||
1304 | #endif |
||
1305 | #endif |
||
1306 | #if !defined(lzo_has_declspec_attribute) |
||
1307 | # define lzo_has_declspec_attribute(x) 0 |
||
1308 | #endif |
||
1309 | #if !defined(lzo_has_feature) |
||
1310 | #if (LZO_CC_CLANG) && defined(__has_feature) |
||
1311 | # define lzo_has_feature __has_feature |
||
1312 | #endif |
||
1313 | #endif |
||
1314 | #if !defined(lzo_has_feature) |
||
1315 | # define lzo_has_feature(x) 0 |
||
1316 | #endif |
||
1317 | #if !defined(lzo_has_extension) |
||
1318 | #if (LZO_CC_CLANG) && defined(__has_extension) |
||
1319 | # define lzo_has_extension __has_extension |
||
1320 | #elif (LZO_CC_CLANG) && defined(__has_feature) |
||
1321 | # define lzo_has_extension __has_feature |
||
1322 | #endif |
||
1323 | #endif |
||
1324 | #if !defined(lzo_has_extension) |
||
1325 | # define lzo_has_extension(x) 0 |
||
1326 | #endif |
||
1327 | #if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0 |
||
1328 | # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) |
||
1329 | # define LZO_CFG_USE_NEW_STYLE_CASTS 0 |
||
1330 | # elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1200)) |
||
1331 | # define LZO_CFG_USE_NEW_STYLE_CASTS 0 |
||
1332 | # else |
||
1333 | # define LZO_CFG_USE_NEW_STYLE_CASTS 1 |
||
1334 | # endif |
||
1335 | #endif |
||
1336 | #if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) |
||
1337 | # define LZO_CFG_USE_NEW_STYLE_CASTS 0 |
||
1338 | #endif |
||
1339 | #if !defined(__cplusplus) |
||
1340 | # if defined(LZO_CFG_USE_NEW_STYLE_CASTS) |
||
1341 | # undef LZO_CFG_USE_NEW_STYLE_CASTS |
||
1342 | # endif |
||
1343 | # define LZO_CFG_USE_NEW_STYLE_CASTS 0 |
||
1344 | #endif |
||
1345 | #if !defined(LZO_REINTERPRET_CAST) |
||
1346 | # if (LZO_CFG_USE_NEW_STYLE_CASTS) |
||
1347 | # define LZO_REINTERPRET_CAST(t,e) (reinterpret_cast<t> (e)) |
||
1348 | # endif |
||
1349 | #endif |
||
1350 | #if !defined(LZO_REINTERPRET_CAST) |
||
1351 | # define LZO_REINTERPRET_CAST(t,e) ((t) (e)) |
||
1352 | #endif |
||
1353 | #if !defined(LZO_STATIC_CAST) |
||
1354 | # if (LZO_CFG_USE_NEW_STYLE_CASTS) |
||
1355 | # define LZO_STATIC_CAST(t,e) (static_cast<t> (e)) |
||
1356 | # endif |
||
1357 | #endif |
||
1358 | #if !defined(LZO_STATIC_CAST) |
||
1359 | # define LZO_STATIC_CAST(t,e) ((t) (e)) |
||
1360 | #endif |
||
1361 | #if !defined(LZO_STATIC_CAST2) |
||
1362 | # define LZO_STATIC_CAST2(t1,t2,e) LZO_STATIC_CAST(t1, LZO_STATIC_CAST(t2, e)) |
||
1363 | #endif |
||
1364 | #if !defined(LZO_UNCONST_CAST) |
||
1365 | # if (LZO_CFG_USE_NEW_STYLE_CASTS) |
||
1366 | # define LZO_UNCONST_CAST(t,e) (const_cast<t> (e)) |
||
1367 | # elif (LZO_HAVE_MM_HUGE_PTR) |
||
1368 | # define LZO_UNCONST_CAST(t,e) ((t) (e)) |
||
1369 | # elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1370 | # define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((const void *) (e))))) |
||
1371 | # endif |
||
1372 | #endif |
||
1373 | #if !defined(LZO_UNCONST_CAST) |
||
1374 | # define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((const void *) (e)))) |
||
1375 | #endif |
||
1376 | #if !defined(LZO_UNCONST_VOLATILE_CAST) |
||
1377 | # if (LZO_CFG_USE_NEW_STYLE_CASTS) |
||
1378 | # define LZO_UNCONST_VOLATILE_CAST(t,e) (const_cast<t> (e)) |
||
1379 | # elif (LZO_HAVE_MM_HUGE_PTR) |
||
1380 | # define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) (e)) |
||
1381 | # elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1382 | # define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((lzo_uintptr_t) ((volatile const void *) (e))))) |
||
1383 | # endif |
||
1384 | #endif |
||
1385 | #if !defined(LZO_UNCONST_VOLATILE_CAST) |
||
1386 | # define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((volatile const void *) (e)))) |
||
1387 | #endif |
||
1388 | #if !defined(LZO_UNVOLATILE_CAST) |
||
1389 | # if (LZO_CFG_USE_NEW_STYLE_CASTS) |
||
1390 | # define LZO_UNVOLATILE_CAST(t,e) (const_cast<t> (e)) |
||
1391 | # elif (LZO_HAVE_MM_HUGE_PTR) |
||
1392 | # define LZO_UNVOLATILE_CAST(t,e) ((t) (e)) |
||
1393 | # elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1394 | # define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((volatile void *) (e))))) |
||
1395 | # endif |
||
1396 | #endif |
||
1397 | #if !defined(LZO_UNVOLATILE_CAST) |
||
1398 | # define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((volatile void *) (e)))) |
||
1399 | #endif |
||
1400 | #if !defined(LZO_UNVOLATILE_CONST_CAST) |
||
1401 | # if (LZO_CFG_USE_NEW_STYLE_CASTS) |
||
1402 | # define LZO_UNVOLATILE_CONST_CAST(t,e) (const_cast<t> (e)) |
||
1403 | # elif (LZO_HAVE_MM_HUGE_PTR) |
||
1404 | # define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) (e)) |
||
1405 | # elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1406 | # define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((lzo_uintptr_t) ((volatile const void *) (e))))) |
||
1407 | # endif |
||
1408 | #endif |
||
1409 | #if !defined(LZO_UNVOLATILE_CONST_CAST) |
||
1410 | # define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((volatile const void *) (e)))) |
||
1411 | #endif |
||
1412 | #if !defined(LZO_PCAST) |
||
1413 | # if (LZO_HAVE_MM_HUGE_PTR) |
||
1414 | # define LZO_PCAST(t,e) ((t) (e)) |
||
1415 | # endif |
||
1416 | #endif |
||
1417 | #if !defined(LZO_PCAST) |
||
1418 | # define LZO_PCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(void *, e)) |
||
1419 | #endif |
||
1420 | #if !defined(LZO_CCAST) |
||
1421 | # if (LZO_HAVE_MM_HUGE_PTR) |
||
1422 | # define LZO_CCAST(t,e) ((t) (e)) |
||
1423 | # endif |
||
1424 | #endif |
||
1425 | #if !defined(LZO_CCAST) |
||
1426 | # define LZO_CCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(const void *, e)) |
||
1427 | #endif |
||
1428 | #if !defined(LZO_ICONV) |
||
1429 | # define LZO_ICONV(t,e) LZO_STATIC_CAST(t, e) |
||
1430 | #endif |
||
1431 | #if !defined(LZO_ICAST) |
||
1432 | # define LZO_ICAST(t,e) LZO_STATIC_CAST(t, e) |
||
1433 | #endif |
||
1434 | #if !defined(LZO_ITRUNC) |
||
1435 | # define LZO_ITRUNC(t,e) LZO_STATIC_CAST(t, e) |
||
1436 | #endif |
||
1437 | #if !defined(__lzo_cte) |
||
1438 | # if (LZO_CC_MSC || LZO_CC_WATCOMC) |
||
1439 | # define __lzo_cte(e) ((void)0,(e)) |
||
1440 | # elif 1 |
||
1441 | # define __lzo_cte(e) ((void)0,(e)) |
||
1442 | # endif |
||
1443 | #endif |
||
1444 | #if !defined(__lzo_cte) |
||
1445 | # define __lzo_cte(e) (e) |
||
1446 | #endif |
||
1447 | #if !defined(LZO_BLOCK_BEGIN) |
||
1448 | # define LZO_BLOCK_BEGIN do { |
||
1449 | # define LZO_BLOCK_END } while __lzo_cte(0) |
||
1450 | #endif |
||
1451 | #if !defined(LZO_UNUSED) |
||
1452 | # if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) |
||
1453 | # define LZO_UNUSED(var) ((void) &var) |
||
1454 | # elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) |
||
1455 | # define LZO_UNUSED(var) if (&var) ; else |
||
1456 | # elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030200ul)) |
||
1457 | # define LZO_UNUSED(var) ((void) &var) |
||
1458 | # elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1459 | # define LZO_UNUSED(var) ((void) var) |
||
1460 | # elif (LZO_CC_MSC && (_MSC_VER < 900)) |
||
1461 | # define LZO_UNUSED(var) if (&var) ; else |
||
1462 | # elif (LZO_CC_KEILC) |
||
1463 | # define LZO_UNUSED(var) {extern int lzo_unused__[1-2*!(sizeof(var)>0)]; (void)lzo_unused__;} |
||
1464 | # elif (LZO_CC_PACIFICC) |
||
1465 | # define LZO_UNUSED(var) ((void) sizeof(var)) |
||
1466 | # elif (LZO_CC_WATCOMC) && defined(__cplusplus) |
||
1467 | # define LZO_UNUSED(var) ((void) var) |
||
1468 | # else |
||
1469 | # define LZO_UNUSED(var) ((void) &var) |
||
1470 | # endif |
||
1471 | #endif |
||
1472 | #if !defined(LZO_UNUSED_RESULT) |
||
1473 | # define LZO_UNUSED_RESULT(var) LZO_UNUSED(var) |
||
1474 | #endif |
||
1475 | #if !defined(LZO_UNUSED_FUNC) |
||
1476 | # if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) |
||
1477 | # define LZO_UNUSED_FUNC(func) ((void) func) |
||
1478 | # elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) |
||
1479 | # define LZO_UNUSED_FUNC(func) if (func) ; else |
||
1480 | # elif (LZO_CC_CLANG || LZO_CC_LLVM) |
||
1481 | # define LZO_UNUSED_FUNC(func) ((void) &func) |
||
1482 | # elif (LZO_CC_MSC && (_MSC_VER < 900)) |
||
1483 | # define LZO_UNUSED_FUNC(func) if (func) ; else |
||
1484 | # elif (LZO_CC_MSC) |
||
1485 | # define LZO_UNUSED_FUNC(func) ((void) &func) |
||
1486 | # elif (LZO_CC_KEILC || LZO_CC_PELLESC) |
||
1487 | # define LZO_UNUSED_FUNC(func) {extern int lzo_unused__[1-2*!(sizeof((int)func)>0)]; (void)lzo_unused__;} |
||
1488 | # else |
||
1489 | # define LZO_UNUSED_FUNC(func) ((void) func) |
||
1490 | # endif |
||
1491 | #endif |
||
1492 | #if !defined(LZO_UNUSED_LABEL) |
||
1493 | # if (LZO_CC_CLANG >= 0x020800ul) |
||
1494 | # define LZO_UNUSED_LABEL(l) (__lzo_gnuc_extension__ ((void) ((const void *) &&l))) |
||
1495 | # elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC) |
||
1496 | # define LZO_UNUSED_LABEL(l) if __lzo_cte(0) goto l |
||
1497 | # else |
||
1498 | # define LZO_UNUSED_LABEL(l) switch (0) case 1:goto l |
||
1499 | # endif |
||
1500 | #endif |
||
1501 | #if !defined(LZO_DEFINE_UNINITIALIZED_VAR) |
||
1502 | # if 0 |
||
1503 | # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var |
||
1504 | # elif 0 && (LZO_CC_GNUC) |
||
1505 | # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var |
||
1506 | # else |
||
1507 | # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init |
||
1508 | # endif |
||
1509 | #endif |
||
1510 | #if !defined(__lzo_inline) |
||
1511 | #if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) |
||
1512 | #elif defined(__cplusplus) |
||
1513 | # define __lzo_inline inline |
||
1514 | #elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) |
||
1515 | # define __lzo_inline inline |
||
1516 | #elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) |
||
1517 | # define __lzo_inline __inline |
||
1518 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) |
||
1519 | # define __lzo_inline __inline__ |
||
1520 | #elif (LZO_CC_DMC) |
||
1521 | # define __lzo_inline __inline |
||
1522 | #elif (LZO_CC_GHS) |
||
1523 | # define __lzo_inline __inline__ |
||
1524 | #elif (LZO_CC_IBMC >= 600) |
||
1525 | # define __lzo_inline __inline__ |
||
1526 | #elif (LZO_CC_INTELC) |
||
1527 | # define __lzo_inline __inline |
||
1528 | #elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) |
||
1529 | # define __lzo_inline __inline |
||
1530 | #elif (LZO_CC_MSC && (_MSC_VER >= 900)) |
||
1531 | # define __lzo_inline __inline |
||
1532 | #elif (LZO_CC_SUNPROC >= 0x5100) |
||
1533 | # define __lzo_inline __inline__ |
||
1534 | #endif |
||
1535 | #endif |
||
1536 | #if defined(__lzo_inline) |
||
1537 | # ifndef __lzo_HAVE_inline |
||
1538 | # define __lzo_HAVE_inline 1 |
||
1539 | # endif |
||
1540 | #else |
||
1541 | # define __lzo_inline /*empty*/ |
||
1542 | #endif |
||
1543 | #if !defined(__lzo_forceinline) |
||
1544 | #if (LZO_CC_GNUC >= 0x030200ul) |
||
1545 | # define __lzo_forceinline __inline__ __attribute__((__always_inline__)) |
||
1546 | #elif (LZO_CC_IBMC >= 700) |
||
1547 | # define __lzo_forceinline __inline__ __attribute__((__always_inline__)) |
||
1548 | #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) |
||
1549 | # define __lzo_forceinline __forceinline |
||
1550 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) |
||
1551 | # define __lzo_forceinline __inline__ __attribute__((__always_inline__)) |
||
1552 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1553 | # define __lzo_forceinline __inline__ __attribute__((__always_inline__)) |
||
1554 | #elif (LZO_CC_MSC && (_MSC_VER >= 1200)) |
||
1555 | # define __lzo_forceinline __forceinline |
||
1556 | #elif (LZO_CC_PGI >= 0x0d0a00ul) |
||
1557 | # define __lzo_forceinline __inline__ __attribute__((__always_inline__)) |
||
1558 | #elif (LZO_CC_SUNPROC >= 0x5100) |
||
1559 | # define __lzo_forceinline __inline__ __attribute__((__always_inline__)) |
||
1560 | #endif |
||
1561 | #endif |
||
1562 | #if defined(__lzo_forceinline) |
||
1563 | # ifndef __lzo_HAVE_forceinline |
||
1564 | # define __lzo_HAVE_forceinline 1 |
||
1565 | # endif |
||
1566 | #else |
||
1567 | # define __lzo_forceinline __lzo_inline |
||
1568 | #endif |
||
1569 | #if !defined(__lzo_noinline) |
||
1570 | #if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) |
||
1571 | # define __lzo_noinline __attribute__((__noinline__,__used__)) |
||
1572 | #elif (LZO_CC_GNUC >= 0x030200ul) |
||
1573 | # define __lzo_noinline __attribute__((__noinline__)) |
||
1574 | #elif (LZO_CC_IBMC >= 700) |
||
1575 | # define __lzo_noinline __attribute__((__noinline__)) |
||
1576 | #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) |
||
1577 | # define __lzo_noinline __declspec(noinline) |
||
1578 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) |
||
1579 | # define __lzo_noinline __attribute__((__noinline__)) |
||
1580 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1581 | # define __lzo_noinline __attribute__((__noinline__)) |
||
1582 | #elif (LZO_CC_MSC && (_MSC_VER >= 1300)) |
||
1583 | # define __lzo_noinline __declspec(noinline) |
||
1584 | #elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) |
||
1585 | # if defined(__cplusplus) |
||
1586 | # else |
||
1587 | # define __lzo_noinline __declspec(noinline) |
||
1588 | # endif |
||
1589 | #elif (LZO_CC_PGI >= 0x0d0a00ul) |
||
1590 | # define __lzo_noinline __attribute__((__noinline__)) |
||
1591 | #elif (LZO_CC_SUNPROC >= 0x5100) |
||
1592 | # define __lzo_noinline __attribute__((__noinline__)) |
||
1593 | #endif |
||
1594 | #endif |
||
1595 | #if defined(__lzo_noinline) |
||
1596 | # ifndef __lzo_HAVE_noinline |
||
1597 | # define __lzo_HAVE_noinline 1 |
||
1598 | # endif |
||
1599 | #else |
||
1600 | # define __lzo_noinline /*empty*/ |
||
1601 | #endif |
||
1602 | #if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline) |
||
1603 | # error "unexpected configuration - check your compiler defines" |
||
1604 | #endif |
||
1605 | #if !defined(__lzo_static_inline) |
||
1606 | #if (LZO_CC_IBMC) |
||
1607 | # define __lzo_static_inline __lzo_gnuc_extension__ static __lzo_inline |
||
1608 | #endif |
||
1609 | #endif |
||
1610 | #if !defined(__lzo_static_inline) |
||
1611 | # define __lzo_static_inline static __lzo_inline |
||
1612 | #endif |
||
1613 | #if !defined(__lzo_static_forceinline) |
||
1614 | #if (LZO_CC_IBMC) |
||
1615 | # define __lzo_static_forceinline __lzo_gnuc_extension__ static __lzo_forceinline |
||
1616 | #endif |
||
1617 | #endif |
||
1618 | #if !defined(__lzo_static_forceinline) |
||
1619 | # define __lzo_static_forceinline static __lzo_forceinline |
||
1620 | #endif |
||
1621 | #if !defined(__lzo_static_noinline) |
||
1622 | #if (LZO_CC_IBMC) |
||
1623 | # define __lzo_static_noinline __lzo_gnuc_extension__ static __lzo_noinline |
||
1624 | #endif |
||
1625 | #endif |
||
1626 | #if !defined(__lzo_static_noinline) |
||
1627 | # define __lzo_static_noinline static __lzo_noinline |
||
1628 | #endif |
||
1629 | #if !defined(__lzo_c99_extern_inline) |
||
1630 | #if defined(__GNUC_GNU_INLINE__) |
||
1631 | # define __lzo_c99_extern_inline __lzo_inline |
||
1632 | #elif defined(__GNUC_STDC_INLINE__) |
||
1633 | # define __lzo_c99_extern_inline extern __lzo_inline |
||
1634 | #elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) |
||
1635 | # define __lzo_c99_extern_inline extern __lzo_inline |
||
1636 | #endif |
||
1637 | #if !defined(__lzo_c99_extern_inline) && (__lzo_HAVE_inline) |
||
1638 | # define __lzo_c99_extern_inline __lzo_inline |
||
1639 | #endif |
||
1640 | #endif |
||
1641 | #if defined(__lzo_c99_extern_inline) |
||
1642 | # ifndef __lzo_HAVE_c99_extern_inline |
||
1643 | # define __lzo_HAVE_c99_extern_inline 1 |
||
1644 | # endif |
||
1645 | #else |
||
1646 | # define __lzo_c99_extern_inline /*empty*/ |
||
1647 | #endif |
||
1648 | #if !defined(__lzo_may_alias) |
||
1649 | #if (LZO_CC_GNUC >= 0x030400ul) |
||
1650 | # define __lzo_may_alias __attribute__((__may_alias__)) |
||
1651 | #elif (LZO_CC_CLANG >= 0x020900ul) |
||
1652 | # define __lzo_may_alias __attribute__((__may_alias__)) |
||
1653 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1210)) && 0 |
||
1654 | # define __lzo_may_alias __attribute__((__may_alias__)) |
||
1655 | #elif (LZO_CC_PGI >= 0x0d0a00ul) && 0 |
||
1656 | # define __lzo_may_alias __attribute__((__may_alias__)) |
||
1657 | #endif |
||
1658 | #endif |
||
1659 | #if defined(__lzo_may_alias) |
||
1660 | # ifndef __lzo_HAVE_may_alias |
||
1661 | # define __lzo_HAVE_may_alias 1 |
||
1662 | # endif |
||
1663 | #else |
||
1664 | # define __lzo_may_alias /*empty*/ |
||
1665 | #endif |
||
1666 | #if !defined(__lzo_noreturn) |
||
1667 | #if (LZO_CC_GNUC >= 0x020700ul) |
||
1668 | # define __lzo_noreturn __attribute__((__noreturn__)) |
||
1669 | #elif (LZO_CC_IBMC >= 700) |
||
1670 | # define __lzo_noreturn __attribute__((__noreturn__)) |
||
1671 | #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) |
||
1672 | # define __lzo_noreturn __declspec(noreturn) |
||
1673 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) |
||
1674 | # define __lzo_noreturn __attribute__((__noreturn__)) |
||
1675 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1676 | # define __lzo_noreturn __attribute__((__noreturn__)) |
||
1677 | #elif (LZO_CC_MSC && (_MSC_VER >= 1200)) |
||
1678 | # define __lzo_noreturn __declspec(noreturn) |
||
1679 | #elif (LZO_CC_PGI >= 0x0d0a00ul) |
||
1680 | # define __lzo_noreturn __attribute__((__noreturn__)) |
||
1681 | #endif |
||
1682 | #endif |
||
1683 | #if defined(__lzo_noreturn) |
||
1684 | # ifndef __lzo_HAVE_noreturn |
||
1685 | # define __lzo_HAVE_noreturn 1 |
||
1686 | # endif |
||
1687 | #else |
||
1688 | # define __lzo_noreturn /*empty*/ |
||
1689 | #endif |
||
1690 | #if !defined(__lzo_nothrow) |
||
1691 | #if (LZO_CC_GNUC >= 0x030300ul) |
||
1692 | # define __lzo_nothrow __attribute__((__nothrow__)) |
||
1693 | #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) && defined(__cplusplus) |
||
1694 | # define __lzo_nothrow __declspec(nothrow) |
||
1695 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 900)) |
||
1696 | # define __lzo_nothrow __attribute__((__nothrow__)) |
||
1697 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1698 | # define __lzo_nothrow __attribute__((__nothrow__)) |
||
1699 | #elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) |
||
1700 | # define __lzo_nothrow __declspec(nothrow) |
||
1701 | #endif |
||
1702 | #endif |
||
1703 | #if defined(__lzo_nothrow) |
||
1704 | # ifndef __lzo_HAVE_nothrow |
||
1705 | # define __lzo_HAVE_nothrow 1 |
||
1706 | # endif |
||
1707 | #else |
||
1708 | # define __lzo_nothrow /*empty*/ |
||
1709 | #endif |
||
1710 | #if !defined(__lzo_restrict) |
||
1711 | #if (LZO_CC_GNUC >= 0x030400ul) |
||
1712 | # define __lzo_restrict __restrict__ |
||
1713 | #elif (LZO_CC_IBMC >= 800) && !defined(__cplusplus) |
||
1714 | # define __lzo_restrict __restrict__ |
||
1715 | #elif (LZO_CC_IBMC >= 1210) |
||
1716 | # define __lzo_restrict __restrict__ |
||
1717 | #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) |
||
1718 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) |
||
1719 | # define __lzo_restrict __restrict__ |
||
1720 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM) |
||
1721 | # define __lzo_restrict __restrict__ |
||
1722 | #elif (LZO_CC_MSC && (_MSC_VER >= 1400)) |
||
1723 | # define __lzo_restrict __restrict |
||
1724 | #elif (LZO_CC_PGI >= 0x0d0a00ul) |
||
1725 | # define __lzo_restrict __restrict__ |
||
1726 | #endif |
||
1727 | #endif |
||
1728 | #if defined(__lzo_restrict) |
||
1729 | # ifndef __lzo_HAVE_restrict |
||
1730 | # define __lzo_HAVE_restrict 1 |
||
1731 | # endif |
||
1732 | #else |
||
1733 | # define __lzo_restrict /*empty*/ |
||
1734 | #endif |
||
1735 | #if !defined(__lzo_alignof) |
||
1736 | #if (LZO_CC_ARMCC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) |
||
1737 | # define __lzo_alignof(e) __alignof__(e) |
||
1738 | #elif (LZO_CC_GHS) && !defined(__cplusplus) |
||
1739 | # define __lzo_alignof(e) __alignof__(e) |
||
1740 | #elif (LZO_CC_IBMC >= 600) |
||
1741 | # define __lzo_alignof(e) (__lzo_gnuc_extension__ __alignof__(e)) |
||
1742 | #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) |
||
1743 | # define __lzo_alignof(e) __alignof__(e) |
||
1744 | #elif (LZO_CC_MSC && (_MSC_VER >= 1300)) |
||
1745 | # define __lzo_alignof(e) __alignof(e) |
||
1746 | #elif (LZO_CC_SUNPROC >= 0x5100) |
||
1747 | # define __lzo_alignof(e) __alignof__(e) |
||
1748 | #endif |
||
1749 | #endif |
||
1750 | #if defined(__lzo_alignof) |
||
1751 | # ifndef __lzo_HAVE_alignof |
||
1752 | # define __lzo_HAVE_alignof 1 |
||
1753 | # endif |
||
1754 | #endif |
||
1755 | #if !defined(__lzo_struct_packed) |
||
1756 | #if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) |
||
1757 | #elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul)) |
||
1758 | #elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus) |
||
1759 | #elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul)) |
||
1760 | #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) |
||
1761 | #elif (LZO_CC_GNUC >= 0x030400ul) && !(LZO_CC_PCC_GNUC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386) |
||
1762 | # define __lzo_struct_packed(s) struct s { |
||
1763 | # define __lzo_struct_packed_end() } __attribute__((__gcc_struct__,__packed__)); |
||
1764 | # define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__gcc_struct__,__packed__)); |
||
1765 | #elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100)) |
||
1766 | # define __lzo_struct_packed(s) struct s { |
||
1767 | # define __lzo_struct_packed_end() } __attribute__((__packed__)); |
||
1768 | # define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__)); |
||
1769 | #elif (LZO_CC_IBMC >= 700) |
||
1770 | # define __lzo_struct_packed(s) __lzo_gnuc_extension__ struct s { |
||
1771 | # define __lzo_struct_packed_end() } __attribute__((__packed__)); |
||
1772 | # define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__)); |
||
1773 | #elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) |
||
1774 | # define __lzo_struct_packed(s) __pragma(pack(push,1)) struct s { |
||
1775 | # define __lzo_struct_packed_end() } __pragma(pack(pop)); |
||
1776 | #elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900)) |
||
1777 | # define __lzo_struct_packed(s) _Packed struct s { |
||
1778 | # define __lzo_struct_packed_end() }; |
||
1779 | #endif |
||
1780 | #endif |
||
1781 | #if defined(__lzo_struct_packed) && !defined(__lzo_struct_packed_ma) |
||
1782 | # define __lzo_struct_packed_ma(s) __lzo_struct_packed(s) |
||
1783 | #endif |
||
1784 | #if defined(__lzo_struct_packed_end) && !defined(__lzo_struct_packed_ma_end) |
||
1785 | # define __lzo_struct_packed_ma_end() __lzo_struct_packed_end() |
||
1786 | #endif |
||
1787 | #if !defined(__lzo_byte_struct) |
||
1788 | #if defined(__lzo_struct_packed) |
||
1789 | # define __lzo_byte_struct(s,n) __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end() |
||
1790 | # define __lzo_byte_struct_ma(s,n) __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end() |
||
1791 | #elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_PGI || (LZO_CC_SUNPROC >= 0x5100)) |
||
1792 | # define __lzo_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__)); |
||
1793 | # define __lzo_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__)); |
||
1794 | #endif |
||
1795 | #endif |
||
1796 | #if defined(__lzo_byte_struct) && !defined(__lzo_byte_struct_ma) |
||
1797 | # define __lzo_byte_struct_ma(s,n) __lzo_byte_struct(s,n) |
||
1798 | #endif |
||
1799 | #if !defined(__lzo_struct_align16) && (__lzo_HAVE_alignof) |
||
1800 | #if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul)) |
||
1801 | #elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) |
||
1802 | #elif (LZO_CC_CILLY || LZO_CC_PCC) |
||
1803 | #elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) |
||
1804 | # define __lzo_struct_align16(s) struct __declspec(align(16)) s { |
||
1805 | # define __lzo_struct_align16_end() }; |
||
1806 | # define __lzo_struct_align32(s) struct __declspec(align(32)) s { |
||
1807 | # define __lzo_struct_align32_end() }; |
||
1808 | # define __lzo_struct_align64(s) struct __declspec(align(64)) s { |
||
1809 | # define __lzo_struct_align64_end() }; |
||
1810 | #elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || (LZO_CC_IBMC >= 700) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1811 | # define __lzo_struct_align16(s) struct s { |
||
1812 | # define __lzo_struct_align16_end() } __attribute__((__aligned__(16))); |
||
1813 | # define __lzo_struct_align32(s) struct s { |
||
1814 | # define __lzo_struct_align32_end() } __attribute__((__aligned__(32))); |
||
1815 | # define __lzo_struct_align64(s) struct s { |
||
1816 | # define __lzo_struct_align64_end() } __attribute__((__aligned__(64))); |
||
1817 | #endif |
||
1818 | #endif |
||
1819 | #if !defined(__lzo_union_um) |
||
1820 | #if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus) |
||
1821 | #elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul)) |
||
1822 | #elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus) |
||
1823 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER < 810)) |
||
1824 | #elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul)) |
||
1825 | #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) |
||
1826 | #elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100)) |
||
1827 | # define __lzo_union_am(s) union s { |
||
1828 | # define __lzo_union_am_end() } __lzo_may_alias; |
||
1829 | # define __lzo_union_um(s) union s { |
||
1830 | # define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__)); |
||
1831 | #elif (LZO_CC_IBMC >= 700) |
||
1832 | # define __lzo_union_am(s) __lzo_gnuc_extension__ union s { |
||
1833 | # define __lzo_union_am_end() } __lzo_may_alias; |
||
1834 | # define __lzo_union_um(s) __lzo_gnuc_extension__ union s { |
||
1835 | # define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__)); |
||
1836 | #elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300)) |
||
1837 | # define __lzo_union_um(s) __pragma(pack(push,1)) union s { |
||
1838 | # define __lzo_union_um_end() } __pragma(pack(pop)); |
||
1839 | #elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900)) |
||
1840 | # define __lzo_union_um(s) _Packed union s { |
||
1841 | # define __lzo_union_um_end() }; |
||
1842 | #endif |
||
1843 | #endif |
||
1844 | #if !defined(__lzo_union_am) |
||
1845 | # define __lzo_union_am(s) union s { |
||
1846 | # define __lzo_union_am_end() }; |
||
1847 | #endif |
||
1848 | #if !defined(__lzo_constructor) |
||
1849 | #if (LZO_CC_GNUC >= 0x030400ul) |
||
1850 | # define __lzo_constructor __attribute__((__constructor__,__used__)) |
||
1851 | #elif (LZO_CC_GNUC >= 0x020700ul) |
||
1852 | # define __lzo_constructor __attribute__((__constructor__)) |
||
1853 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) |
||
1854 | # define __lzo_constructor __attribute__((__constructor__,__used__)) |
||
1855 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1856 | # define __lzo_constructor __attribute__((__constructor__)) |
||
1857 | #endif |
||
1858 | #endif |
||
1859 | #if defined(__lzo_constructor) |
||
1860 | # ifndef __lzo_HAVE_constructor |
||
1861 | # define __lzo_HAVE_constructor 1 |
||
1862 | # endif |
||
1863 | #endif |
||
1864 | #if !defined(__lzo_destructor) |
||
1865 | #if (LZO_CC_GNUC >= 0x030400ul) |
||
1866 | # define __lzo_destructor __attribute__((__destructor__,__used__)) |
||
1867 | #elif (LZO_CC_GNUC >= 0x020700ul) |
||
1868 | # define __lzo_destructor __attribute__((__destructor__)) |
||
1869 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) |
||
1870 | # define __lzo_destructor __attribute__((__destructor__,__used__)) |
||
1871 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1872 | # define __lzo_destructor __attribute__((__destructor__)) |
||
1873 | #endif |
||
1874 | #endif |
||
1875 | #if defined(__lzo_destructor) |
||
1876 | # ifndef __lzo_HAVE_destructor |
||
1877 | # define __lzo_HAVE_destructor 1 |
||
1878 | # endif |
||
1879 | #endif |
||
1880 | #if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor) |
||
1881 | # error "unexpected configuration - check your compiler defines" |
||
1882 | #endif |
||
1883 | #if !defined(__lzo_likely) && !defined(__lzo_unlikely) |
||
1884 | #if (LZO_CC_GNUC >= 0x030200ul) |
||
1885 | # define __lzo_likely(e) (__builtin_expect(!!(e),1)) |
||
1886 | # define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) |
||
1887 | #elif (LZO_CC_IBMC >= 1010) |
||
1888 | # define __lzo_likely(e) (__builtin_expect(!!(e),1)) |
||
1889 | # define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) |
||
1890 | #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) |
||
1891 | # define __lzo_likely(e) (__builtin_expect(!!(e),1)) |
||
1892 | # define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) |
||
1893 | #elif (LZO_CC_CLANG && LZO_CC_CLANG_C2) |
||
1894 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
1895 | # define __lzo_likely(e) (__builtin_expect(!!(e),1)) |
||
1896 | # define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) |
||
1897 | #endif |
||
1898 | #endif |
||
1899 | #if defined(__lzo_likely) |
||
1900 | # ifndef __lzo_HAVE_likely |
||
1901 | # define __lzo_HAVE_likely 1 |
||
1902 | # endif |
||
1903 | #else |
||
1904 | # define __lzo_likely(e) (e) |
||
1905 | #endif |
||
1906 | #if defined(__lzo_very_likely) |
||
1907 | # ifndef __lzo_HAVE_very_likely |
||
1908 | # define __lzo_HAVE_very_likely 1 |
||
1909 | # endif |
||
1910 | #else |
||
1911 | # define __lzo_very_likely(e) __lzo_likely(e) |
||
1912 | #endif |
||
1913 | #if defined(__lzo_unlikely) |
||
1914 | # ifndef __lzo_HAVE_unlikely |
||
1915 | # define __lzo_HAVE_unlikely 1 |
||
1916 | # endif |
||
1917 | #else |
||
1918 | # define __lzo_unlikely(e) (e) |
||
1919 | #endif |
||
1920 | #if defined(__lzo_very_unlikely) |
||
1921 | # ifndef __lzo_HAVE_very_unlikely |
||
1922 | # define __lzo_HAVE_very_unlikely 1 |
||
1923 | # endif |
||
1924 | #else |
||
1925 | # define __lzo_very_unlikely(e) __lzo_unlikely(e) |
||
1926 | #endif |
||
1927 | #if !defined(__lzo_loop_forever) |
||
1928 | # if (LZO_CC_IBMC) |
||
1929 | # define __lzo_loop_forever() LZO_BLOCK_BEGIN for (;;) { ; } LZO_BLOCK_END |
||
1930 | # else |
||
1931 | # define __lzo_loop_forever() do { ; } while __lzo_cte(1) |
||
1932 | # endif |
||
1933 | #endif |
||
1934 | #if !defined(__lzo_unreachable) |
||
1935 | #if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul)) && lzo_has_builtin(__builtin_unreachable) |
||
1936 | # define __lzo_unreachable() __builtin_unreachable(); |
||
1937 | #elif (LZO_CC_GNUC >= 0x040500ul) |
||
1938 | # define __lzo_unreachable() __builtin_unreachable(); |
||
1939 | #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1300)) && 1 |
||
1940 | # define __lzo_unreachable() __builtin_unreachable(); |
||
1941 | #endif |
||
1942 | #endif |
||
1943 | #if defined(__lzo_unreachable) |
||
1944 | # ifndef __lzo_HAVE_unreachable |
||
1945 | # define __lzo_HAVE_unreachable 1 |
||
1946 | # endif |
||
1947 | #else |
||
1948 | # if 0 |
||
1949 | # define __lzo_unreachable() ((void)0); |
||
1950 | # else |
||
1951 | # define __lzo_unreachable() __lzo_loop_forever(); |
||
1952 | # endif |
||
1953 | #endif |
||
1954 | #if !defined(lzo_unused_funcs_impl) |
||
1955 | # if 1 && (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) |
||
1956 | # define lzo_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f |
||
1957 | # elif 1 && (LZO_CC_BORLANDC || LZO_CC_GNUC) |
||
1958 | # define lzo_unused_funcs_impl(r,f) static r f |
||
1959 | # else |
||
1960 | # define lzo_unused_funcs_impl(r,f) __lzo_static_forceinline r f |
||
1961 | # endif |
||
1962 | #endif |
||
1963 | #ifndef __LZO_CTA_NAME |
||
1964 | #if (LZO_CFG_USE_COUNTER) |
||
1965 | # define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__COUNTER__) |
||
1966 | #else |
||
1967 | # define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__LINE__) |
||
1968 | #endif |
||
1969 | #endif |
||
1970 | #if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) |
||
1971 | # if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) |
||
1972 | # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END |
||
1973 | # elif (LZO_CC_DMC || LZO_CC_SYMANTECC) |
||
1974 | # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1u-2*!(e)]; LZO_EXTERN_C_END |
||
1975 | # elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) |
||
1976 | # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END |
||
1977 | # elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020900ul)) && defined(__cplusplus) |
||
1978 | # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN int __LZO_CTA_NAME(lzo_cta_f__)(int [1-2*!(e)]); LZO_EXTERN_C_END |
||
1979 | # elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) |
||
1980 | # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__)); LZO_EXTERN_C_END |
||
1981 | # else |
||
1982 | # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-2*!(e)]; LZO_EXTERN_C_END |
||
1983 | # endif |
||
1984 | #endif |
||
1985 | #if !defined(LZO_COMPILE_TIME_ASSERT) |
||
1986 | # if (LZO_CC_AZTECC) |
||
1987 | # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-!(e)];} |
||
1988 | # elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030000ul)) |
||
1989 | # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} |
||
1990 | # elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) |
||
1991 | # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; |
||
1992 | # elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) |
||
1993 | # define LZO_COMPILE_TIME_ASSERT(e) {(void) (0/!!(e));} |
||
1994 | # elif (LZO_CC_GNUC >= 0x040700ul) && (LZO_CFG_USE_COUNTER) && defined(__cplusplus) |
||
1995 | # define LZO_COMPILE_TIME_ASSERT(e) {enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__));} |
||
1996 | # elif (LZO_CC_GNUC >= 0x040700ul) |
||
1997 | # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} |
||
1998 | # elif (LZO_CC_MSC && (_MSC_VER < 900)) |
||
1999 | # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; |
||
2000 | # elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) |
||
2001 | # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; |
||
2002 | # else |
||
2003 | # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)];} |
||
2004 | # endif |
||
2005 | #endif |
||
2006 | #if (LZO_LANG_ASSEMBLER) |
||
2007 | # undef LZO_COMPILE_TIME_ASSERT_HEADER |
||
2008 | # define LZO_COMPILE_TIME_ASSERT_HEADER(e) /*empty*/ |
||
2009 | #else |
||
2010 | LZO_COMPILE_TIME_ASSERT_HEADER(1 == 1) |
||
2011 | #if defined(__cplusplus) |
||
2012 | extern "C" { LZO_COMPILE_TIME_ASSERT_HEADER(2 == 2) } |
||
2013 | #endif |
||
2014 | LZO_COMPILE_TIME_ASSERT_HEADER(3 == 3) |
||
2015 | #endif |
||
2016 | #if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) |
||
2017 | # if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) |
||
2018 | # elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) |
||
2019 | # define __lzo_cdecl __cdecl |
||
2020 | # define __lzo_cdecl_atexit /*empty*/ |
||
2021 | # define __lzo_cdecl_main __cdecl |
||
2022 | # if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) |
||
2023 | # define __lzo_cdecl_qsort __pascal |
||
2024 | # elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) |
||
2025 | # define __lzo_cdecl_qsort _stdcall |
||
2026 | # else |
||
2027 | # define __lzo_cdecl_qsort __cdecl |
||
2028 | # endif |
||
2029 | # elif (LZO_CC_WATCOMC) |
||
2030 | # define __lzo_cdecl __cdecl |
||
2031 | # else |
||
2032 | # define __lzo_cdecl __cdecl |
||
2033 | # define __lzo_cdecl_atexit __cdecl |
||
2034 | # define __lzo_cdecl_main __cdecl |
||
2035 | # define __lzo_cdecl_qsort __cdecl |
||
2036 | # endif |
||
2037 | # if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) |
||
2038 | # elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) |
||
2039 | # define __lzo_cdecl_sighandler __pascal |
||
2040 | # elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) |
||
2041 | # define __lzo_cdecl_sighandler _stdcall |
||
2042 | # elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) |
||
2043 | # define __lzo_cdecl_sighandler __clrcall |
||
2044 | # elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) |
||
2045 | # if defined(_DLL) |
||
2046 | # define __lzo_cdecl_sighandler _far _cdecl _loadds |
||
2047 | # elif defined(_MT) |
||
2048 | # define __lzo_cdecl_sighandler _far _cdecl |
||
2049 | # else |
||
2050 | # define __lzo_cdecl_sighandler _cdecl |
||
2051 | # endif |
||
2052 | # else |
||
2053 | # define __lzo_cdecl_sighandler __cdecl |
||
2054 | # endif |
||
2055 | #elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) |
||
2056 | # define __lzo_cdecl __cdecl |
||
2057 | #elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) |
||
2058 | # define __lzo_cdecl cdecl |
||
2059 | #endif |
||
2060 | #if !defined(__lzo_cdecl) |
||
2061 | # define __lzo_cdecl /*empty*/ |
||
2062 | #endif |
||
2063 | #if !defined(__lzo_cdecl_atexit) |
||
2064 | # define __lzo_cdecl_atexit /*empty*/ |
||
2065 | #endif |
||
2066 | #if !defined(__lzo_cdecl_main) |
||
2067 | # define __lzo_cdecl_main /*empty*/ |
||
2068 | #endif |
||
2069 | #if !defined(__lzo_cdecl_qsort) |
||
2070 | # define __lzo_cdecl_qsort /*empty*/ |
||
2071 | #endif |
||
2072 | #if !defined(__lzo_cdecl_sighandler) |
||
2073 | # define __lzo_cdecl_sighandler /*empty*/ |
||
2074 | #endif |
||
2075 | #if !defined(__lzo_cdecl_va) |
||
2076 | # define __lzo_cdecl_va __lzo_cdecl |
||
2077 | #endif |
||
2078 | #if !(LZO_CFG_NO_WINDOWS_H) |
||
2079 | #if !defined(LZO_HAVE_WINDOWS_H) |
||
2080 | #if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) |
||
2081 | # if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) |
||
2082 | # elif ((LZO_OS_WIN32 && defined(__PW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul))) |
||
2083 | # elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) |
||
2084 | # else |
||
2085 | # define LZO_HAVE_WINDOWS_H 1 |
||
2086 | # endif |
||
2087 | #endif |
||
2088 | #endif |
||
2089 | #endif |
||
2090 | #define LZO_SIZEOF_CHAR 1 |
||
2091 | #ifndef LZO_SIZEOF_SHORT |
||
2092 | #if defined(SIZEOF_SHORT) |
||
2093 | # define LZO_SIZEOF_SHORT (SIZEOF_SHORT) |
||
2094 | #elif defined(__SIZEOF_SHORT__) |
||
2095 | # define LZO_SIZEOF_SHORT (__SIZEOF_SHORT__) |
||
2096 | #endif |
||
2097 | #endif |
||
2098 | #ifndef LZO_SIZEOF_INT |
||
2099 | #if defined(SIZEOF_INT) |
||
2100 | # define LZO_SIZEOF_INT (SIZEOF_INT) |
||
2101 | #elif defined(__SIZEOF_INT__) |
||
2102 | # define LZO_SIZEOF_INT (__SIZEOF_INT__) |
||
2103 | #endif |
||
2104 | #endif |
||
2105 | #ifndef LZO_SIZEOF_LONG |
||
2106 | #if defined(SIZEOF_LONG) |
||
2107 | # define LZO_SIZEOF_LONG (SIZEOF_LONG) |
||
2108 | #elif defined(__SIZEOF_LONG__) |
||
2109 | # define LZO_SIZEOF_LONG (__SIZEOF_LONG__) |
||
2110 | #endif |
||
2111 | #endif |
||
2112 | #ifndef LZO_SIZEOF_LONG_LONG |
||
2113 | #if defined(SIZEOF_LONG_LONG) |
||
2114 | # define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) |
||
2115 | #elif defined(__SIZEOF_LONG_LONG__) |
||
2116 | # define LZO_SIZEOF_LONG_LONG (__SIZEOF_LONG_LONG__) |
||
2117 | #endif |
||
2118 | #endif |
||
2119 | #ifndef LZO_SIZEOF___INT16 |
||
2120 | #if defined(SIZEOF___INT16) |
||
2121 | # define LZO_SIZEOF___INT16 (SIZEOF___INT16) |
||
2122 | #endif |
||
2123 | #endif |
||
2124 | #ifndef LZO_SIZEOF___INT32 |
||
2125 | #if defined(SIZEOF___INT32) |
||
2126 | # define LZO_SIZEOF___INT32 (SIZEOF___INT32) |
||
2127 | #endif |
||
2128 | #endif |
||
2129 | #ifndef LZO_SIZEOF___INT64 |
||
2130 | #if defined(SIZEOF___INT64) |
||
2131 | # define LZO_SIZEOF___INT64 (SIZEOF___INT64) |
||
2132 | #endif |
||
2133 | #endif |
||
2134 | #ifndef LZO_SIZEOF_VOID_P |
||
2135 | #if defined(SIZEOF_VOID_P) |
||
2136 | # define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) |
||
2137 | #elif defined(__SIZEOF_POINTER__) |
||
2138 | # define LZO_SIZEOF_VOID_P (__SIZEOF_POINTER__) |
||
2139 | #endif |
||
2140 | #endif |
||
2141 | #ifndef LZO_SIZEOF_SIZE_T |
||
2142 | #if defined(SIZEOF_SIZE_T) |
||
2143 | # define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) |
||
2144 | #elif defined(__SIZEOF_SIZE_T__) |
||
2145 | # define LZO_SIZEOF_SIZE_T (__SIZEOF_SIZE_T__) |
||
2146 | #endif |
||
2147 | #endif |
||
2148 | #ifndef LZO_SIZEOF_PTRDIFF_T |
||
2149 | #if defined(SIZEOF_PTRDIFF_T) |
||
2150 | # define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) |
||
2151 | #elif defined(__SIZEOF_PTRDIFF_T__) |
||
2152 | # define LZO_SIZEOF_PTRDIFF_T (__SIZEOF_PTRDIFF_T__) |
||
2153 | #endif |
||
2154 | #endif |
||
2155 | #define __LZO_LSR(x,b) (((x)+0ul) >> (b)) |
||
2156 | #if !defined(LZO_SIZEOF_SHORT) |
||
2157 | # if (LZO_ARCH_CRAY_PVP) |
||
2158 | # define LZO_SIZEOF_SHORT 8 |
||
2159 | # elif (USHRT_MAX == LZO_0xffffL) |
||
2160 | # define LZO_SIZEOF_SHORT 2 |
||
2161 | # elif (__LZO_LSR(USHRT_MAX,7) == 1) |
||
2162 | # define LZO_SIZEOF_SHORT 1 |
||
2163 | # elif (__LZO_LSR(USHRT_MAX,15) == 1) |
||
2164 | # define LZO_SIZEOF_SHORT 2 |
||
2165 | # elif (__LZO_LSR(USHRT_MAX,31) == 1) |
||
2166 | # define LZO_SIZEOF_SHORT 4 |
||
2167 | # elif (__LZO_LSR(USHRT_MAX,63) == 1) |
||
2168 | # define LZO_SIZEOF_SHORT 8 |
||
2169 | # elif (__LZO_LSR(USHRT_MAX,127) == 1) |
||
2170 | # define LZO_SIZEOF_SHORT 16 |
||
2171 | # else |
||
2172 | # error "LZO_SIZEOF_SHORT" |
||
2173 | # endif |
||
2174 | #endif |
||
2175 | LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SHORT == sizeof(short)) |
||
2176 | #if !defined(LZO_SIZEOF_INT) |
||
2177 | # if (LZO_ARCH_CRAY_PVP) |
||
2178 | # define LZO_SIZEOF_INT 8 |
||
2179 | # elif (UINT_MAX == LZO_0xffffL) |
||
2180 | # define LZO_SIZEOF_INT 2 |
||
2181 | # elif (UINT_MAX == LZO_0xffffffffL) |
||
2182 | # define LZO_SIZEOF_INT 4 |
||
2183 | # elif (__LZO_LSR(UINT_MAX,7) == 1) |
||
2184 | # define LZO_SIZEOF_INT 1 |
||
2185 | # elif (__LZO_LSR(UINT_MAX,15) == 1) |
||
2186 | # define LZO_SIZEOF_INT 2 |
||
2187 | # elif (__LZO_LSR(UINT_MAX,31) == 1) |
||
2188 | # define LZO_SIZEOF_INT 4 |
||
2189 | # elif (__LZO_LSR(UINT_MAX,63) == 1) |
||
2190 | # define LZO_SIZEOF_INT 8 |
||
2191 | # elif (__LZO_LSR(UINT_MAX,127) == 1) |
||
2192 | # define LZO_SIZEOF_INT 16 |
||
2193 | # else |
||
2194 | # error "LZO_SIZEOF_INT" |
||
2195 | # endif |
||
2196 | #endif |
||
2197 | LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_INT == sizeof(int)) |
||
2198 | #if !defined(LZO_SIZEOF_LONG) |
||
2199 | # if (ULONG_MAX == LZO_0xffffffffL) |
||
2200 | # define LZO_SIZEOF_LONG 4 |
||
2201 | # elif (__LZO_LSR(ULONG_MAX,7) == 1) |
||
2202 | # define LZO_SIZEOF_LONG 1 |
||
2203 | # elif (__LZO_LSR(ULONG_MAX,15) == 1) |
||
2204 | # define LZO_SIZEOF_LONG 2 |
||
2205 | # elif (__LZO_LSR(ULONG_MAX,31) == 1) |
||
2206 | # define LZO_SIZEOF_LONG 4 |
||
2207 | # elif (__LZO_LSR(ULONG_MAX,39) == 1) |
||
2208 | # define LZO_SIZEOF_LONG 5 |
||
2209 | # elif (__LZO_LSR(ULONG_MAX,63) == 1) |
||
2210 | # define LZO_SIZEOF_LONG 8 |
||
2211 | # elif (__LZO_LSR(ULONG_MAX,127) == 1) |
||
2212 | # define LZO_SIZEOF_LONG 16 |
||
2213 | # else |
||
2214 | # error "LZO_SIZEOF_LONG" |
||
2215 | # endif |
||
2216 | #endif |
||
2217 | LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_LONG == sizeof(long)) |
||
2218 | #if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) |
||
2219 | #if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) |
||
2220 | # if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) |
||
2221 | # if (LZO_CC_GNUC >= 0x030300ul) |
||
2222 | # if ((__LONG_MAX__-0) == (__LONG_LONG_MAX__-0)) |
||
2223 | # define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG |
||
2224 | # elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) |
||
2225 | # define LZO_SIZEOF_LONG_LONG 4 |
||
2226 | # endif |
||
2227 | # endif |
||
2228 | # endif |
||
2229 | #endif |
||
2230 | #endif |
||
2231 | #if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) |
||
2232 | #if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) |
||
2233 | #if (LZO_ARCH_I086 && LZO_CC_DMC) |
||
2234 | #elif (LZO_CC_CILLY) && defined(__GNUC__) |
||
2235 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2236 | #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) |
||
2237 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2238 | #elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) |
||
2239 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2240 | #elif (LZO_OS_WIN64 || defined(_WIN64)) |
||
2241 | # define LZO_SIZEOF___INT64 8 |
||
2242 | #elif (LZO_ARCH_I386 && (LZO_CC_DMC)) |
||
2243 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2244 | #elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) |
||
2245 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2246 | #elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) |
||
2247 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2248 | #elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) |
||
2249 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2250 | #elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) |
||
2251 | # define LZO_SIZEOF___INT64 8 |
||
2252 | #elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) |
||
2253 | # define LZO_SIZEOF___INT64 8 |
||
2254 | #elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) |
||
2255 | # define LZO_SIZEOF___INT64 8 |
||
2256 | #elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) |
||
2257 | # define LZO_SIZEOF___INT64 8 |
||
2258 | #elif (LZO_CC_GHS && defined(__LLONG_BIT) && ((__LLONG_BIT-0) == 64)) |
||
2259 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2260 | #elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && ((_INTEGRAL_MAX_BITS-0) == 64)) |
||
2261 | # define LZO_SIZEOF___INT64 8 |
||
2262 | #elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) |
||
2263 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2264 | #elif (defined(__vms) || defined(__VMS)) && ((__INITIAL_POINTER_SIZE-0) == 64) |
||
2265 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2266 | #elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) |
||
2267 | #elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) |
||
2268 | # define LZO_SIZEOF_LONG_LONG 8 |
||
2269 | #endif |
||
2270 | #endif |
||
2271 | #endif |
||
2272 | #if defined(__cplusplus) && (LZO_CC_GNUC) |
||
2273 | # if (LZO_CC_GNUC < 0x020800ul) |
||
2274 | # undef LZO_SIZEOF_LONG_LONG |
||
2275 | # endif |
||
2276 | #endif |
||
2277 | #if (LZO_CFG_NO_LONG_LONG) |
||
2278 | # undef LZO_SIZEOF_LONG_LONG |
||
2279 | #elif defined(__NO_LONG_LONG) |
||
2280 | # undef LZO_SIZEOF_LONG_LONG |
||
2281 | #elif defined(_NO_LONGLONG) |
||
2282 | # undef LZO_SIZEOF_LONG_LONG |
||
2283 | #endif |
||
2284 | #if !defined(LZO_WORDSIZE) |
||
2285 | #if (LZO_ARCH_ALPHA) |
||
2286 | # define LZO_WORDSIZE 8 |
||
2287 | #elif (LZO_ARCH_AMD64) |
||
2288 | # define LZO_WORDSIZE 8 |
||
2289 | #elif (LZO_ARCH_ARM64) |
||
2290 | # define LZO_WORDSIZE 8 |
||
2291 | #elif (LZO_ARCH_AVR) |
||
2292 | # define LZO_WORDSIZE 1 |
||
2293 | #elif (LZO_ARCH_H8300) |
||
2294 | # if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) |
||
2295 | # define LZO_WORDSIZE 4 |
||
2296 | # else |
||
2297 | # define LZO_WORDSIZE 2 |
||
2298 | # endif |
||
2299 | #elif (LZO_ARCH_I086) |
||
2300 | # define LZO_WORDSIZE 2 |
||
2301 | #elif (LZO_ARCH_IA64) |
||
2302 | # define LZO_WORDSIZE 8 |
||
2303 | #elif (LZO_ARCH_M16C) |
||
2304 | # define LZO_WORDSIZE 2 |
||
2305 | #elif (LZO_ARCH_SPU) |
||
2306 | # define LZO_WORDSIZE 4 |
||
2307 | #elif (LZO_ARCH_Z80) |
||
2308 | # define LZO_WORDSIZE 1 |
||
2309 | #elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) |
||
2310 | # define LZO_WORDSIZE 8 |
||
2311 | #elif (LZO_OS_OS400 || defined(__OS400__)) |
||
2312 | # define LZO_WORDSIZE 8 |
||
2313 | #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) |
||
2314 | # define LZO_WORDSIZE 8 |
||
2315 | #endif |
||
2316 | #endif |
||
2317 | #if !defined(LZO_SIZEOF_VOID_P) |
||
2318 | #if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32) |
||
2319 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4) |
||
2320 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) |
||
2321 | # define LZO_SIZEOF_VOID_P 4 |
||
2322 | #elif defined(__ILP64__) || defined(__ILP64) || defined(_ILP64) |
||
2323 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 8) |
||
2324 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) |
||
2325 | # define LZO_SIZEOF_VOID_P 8 |
||
2326 | #elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) |
||
2327 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) |
||
2328 | # define LZO_SIZEOF_VOID_P 8 |
||
2329 | #elif defined(__LP64__) || defined(__LP64) || defined(_LP64) |
||
2330 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) |
||
2331 | # define LZO_SIZEOF_VOID_P 8 |
||
2332 | #elif (LZO_ARCH_AVR) |
||
2333 | # define LZO_SIZEOF_VOID_P 2 |
||
2334 | #elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) |
||
2335 | # define LZO_SIZEOF_VOID_P 2 |
||
2336 | #elif (LZO_ARCH_H8300) |
||
2337 | # if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) |
||
2338 | LZO_COMPILE_TIME_ASSERT_HEADER(LZO_WORDSIZE == 4) |
||
2339 | # if defined(__NORMAL_MODE__) |
||
2340 | # define LZO_SIZEOF_VOID_P 2 |
||
2341 | # else |
||
2342 | # define LZO_SIZEOF_VOID_P 4 |
||
2343 | # endif |
||
2344 | # else |
||
2345 | LZO_COMPILE_TIME_ASSERT_HEADER(LZO_WORDSIZE == 2) |
||
2346 | # define LZO_SIZEOF_VOID_P 2 |
||
2347 | # endif |
||
2348 | # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) |
||
2349 | # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT |
||
2350 | # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT |
||
2351 | # endif |
||
2352 | #elif (LZO_ARCH_I086) |
||
2353 | # if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) |
||
2354 | # define LZO_SIZEOF_VOID_P 2 |
||
2355 | # elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) |
||
2356 | # define LZO_SIZEOF_VOID_P 4 |
||
2357 | # else |
||
2358 | # error "invalid LZO_ARCH_I086 memory model" |
||
2359 | # endif |
||
2360 | #elif (LZO_ARCH_M16C) |
||
2361 | # if defined(__m32c_cpu__) || defined(__m32cm_cpu__) |
||
2362 | # define LZO_SIZEOF_VOID_P 4 |
||
2363 | # else |
||
2364 | # define LZO_SIZEOF_VOID_P 2 |
||
2365 | # endif |
||
2366 | #elif (LZO_ARCH_SPU) |
||
2367 | # define LZO_SIZEOF_VOID_P 4 |
||
2368 | #elif (LZO_ARCH_Z80) |
||
2369 | # define LZO_SIZEOF_VOID_P 2 |
||
2370 | #elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) |
||
2371 | # define LZO_SIZEOF_VOID_P 4 |
||
2372 | #elif (LZO_OS_OS400 || defined(__OS400__)) |
||
2373 | # if defined(__LLP64_IFC__) |
||
2374 | # define LZO_SIZEOF_VOID_P 8 |
||
2375 | # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG |
||
2376 | # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG |
||
2377 | # else |
||
2378 | # define LZO_SIZEOF_VOID_P 16 |
||
2379 | # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG |
||
2380 | # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG |
||
2381 | # endif |
||
2382 | #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) |
||
2383 | # define LZO_SIZEOF_VOID_P 8 |
||
2384 | # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG |
||
2385 | # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG |
||
2386 | #endif |
||
2387 | #endif |
||
2388 | #if !defined(LZO_SIZEOF_VOID_P) |
||
2389 | # define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG |
||
2390 | #endif |
||
2391 | LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_VOID_P == sizeof(void *)) |
||
2392 | #if !defined(LZO_SIZEOF_SIZE_T) |
||
2393 | #if (LZO_ARCH_I086 || LZO_ARCH_M16C) |
||
2394 | # define LZO_SIZEOF_SIZE_T 2 |
||
2395 | #endif |
||
2396 | #endif |
||
2397 | #if !defined(LZO_SIZEOF_SIZE_T) |
||
2398 | # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P |
||
2399 | #endif |
||
2400 | #if defined(offsetof) |
||
2401 | LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SIZE_T == sizeof(size_t)) |
||
2402 | #endif |
||
2403 | #if !defined(LZO_SIZEOF_PTRDIFF_T) |
||
2404 | #if (LZO_ARCH_I086) |
||
2405 | # if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) |
||
2406 | # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P |
||
2407 | # elif (LZO_MM_COMPACT || LZO_MM_LARGE) |
||
2408 | # if (LZO_CC_BORLANDC || LZO_CC_TURBOC) |
||
2409 | # define LZO_SIZEOF_PTRDIFF_T 4 |
||
2410 | # else |
||
2411 | # define LZO_SIZEOF_PTRDIFF_T 2 |
||
2412 | # endif |
||
2413 | # else |
||
2414 | # error "invalid LZO_ARCH_I086 memory model" |
||
2415 | # endif |
||
2416 | #endif |
||
2417 | #endif |
||
2418 | #if !defined(LZO_SIZEOF_PTRDIFF_T) |
||
2419 | # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T |
||
2420 | #endif |
||
2421 | #if defined(offsetof) |
||
2422 | LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) |
||
2423 | #endif |
||
2424 | #if !defined(LZO_WORDSIZE) |
||
2425 | # define LZO_WORDSIZE LZO_SIZEOF_VOID_P |
||
2426 | #endif |
||
2427 | #if (LZO_ABI_NEUTRAL_ENDIAN) |
||
2428 | # undef LZO_ABI_BIG_ENDIAN |
||
2429 | # undef LZO_ABI_LITTLE_ENDIAN |
||
2430 | #elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN) |
||
2431 | #if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) |
||
2432 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2433 | #elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64) |
||
2434 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2435 | #elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430 || LZO_ARCH_RISCV) |
||
2436 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2437 | #elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390 || LZO_ARCH_SPU) |
||
2438 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2439 | #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) |
||
2440 | # if (__LITTLE_ENDIAN__ == 1) |
||
2441 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2442 | # else |
||
2443 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2444 | # endif |
||
2445 | #elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) |
||
2446 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2447 | #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) |
||
2448 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2449 | #elif 1 && (LZO_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) |
||
2450 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2451 | #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) |
||
2452 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2453 | #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) |
||
2454 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2455 | #elif 1 && (LZO_ARCH_ARM) && defined(_MSC_VER) && defined(_WIN32) |
||
2456 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2457 | #elif 1 && (LZO_ARCH_ARM && LZO_CC_ARMCC_ARMCC) |
||
2458 | # if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) |
||
2459 | # error "unexpected configuration - check your compiler defines" |
||
2460 | # elif defined(__BIG_ENDIAN) |
||
2461 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2462 | # else |
||
2463 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2464 | # endif |
||
2465 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2466 | #elif 1 && (LZO_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) |
||
2467 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2468 | #elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__) |
||
2469 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2470 | #elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__) |
||
2471 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2472 | #elif 1 && (LZO_ARCH_ARM64) && defined(_MSC_VER) && defined(_WIN32) |
||
2473 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2474 | #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) |
||
2475 | # define LZO_ABI_BIG_ENDIAN 1 |
||
2476 | #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) |
||
2477 | # define LZO_ABI_LITTLE_ENDIAN 1 |
||
2478 | #endif |
||
2479 | #endif |
||
2480 | #if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN) |
||
2481 | # error "unexpected configuration - check your compiler defines" |
||
2482 | #endif |
||
2483 | #if (LZO_ABI_BIG_ENDIAN) |
||
2484 | # define LZO_INFO_ABI_ENDIAN "be" |
||
2485 | #elif (LZO_ABI_LITTLE_ENDIAN) |
||
2486 | # define LZO_INFO_ABI_ENDIAN "le" |
||
2487 | #elif (LZO_ABI_NEUTRAL_ENDIAN) |
||
2488 | # define LZO_INFO_ABI_ENDIAN "neutral" |
||
2489 | #endif |
||
2490 | #if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) |
||
2491 | # define LZO_ABI_I8LP16 1 |
||
2492 | # define LZO_INFO_ABI_PM "i8lp16" |
||
2493 | #elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) |
||
2494 | # define LZO_ABI_ILP16 1 |
||
2495 | # define LZO_INFO_ABI_PM "ilp16" |
||
2496 | #elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) |
||
2497 | # define LZO_ABI_LP32 1 |
||
2498 | # define LZO_INFO_ABI_PM "lp32" |
||
2499 | #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) |
||
2500 | # define LZO_ABI_ILP32 1 |
||
2501 | # define LZO_INFO_ABI_PM "ilp32" |
||
2502 | #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) |
||
2503 | # define LZO_ABI_LLP64 1 |
||
2504 | # define LZO_INFO_ABI_PM "llp64" |
||
2505 | #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) |
||
2506 | # define LZO_ABI_LP64 1 |
||
2507 | # define LZO_INFO_ABI_PM "lp64" |
||
2508 | #elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) |
||
2509 | # define LZO_ABI_ILP64 1 |
||
2510 | # define LZO_INFO_ABI_PM "ilp64" |
||
2511 | #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) |
||
2512 | # define LZO_ABI_IP32L64 1 |
||
2513 | # define LZO_INFO_ABI_PM "ip32l64" |
||
2514 | #endif |
||
2515 | #if (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_VOID_P == 4 && LZO_WORDSIZE == 8) |
||
2516 | # define LZO_ABI_IP32W64 1 |
||
2517 | # ifndef LZO_INFO_ABI_PM |
||
2518 | # define LZO_INFO_ABI_PM "ip32w64" |
||
2519 | # endif |
||
2520 | #endif |
||
2521 | #if 0 |
||
2522 | #elif !defined(__LZO_LIBC_OVERRIDE) |
||
2523 | #if (LZO_LIBC_NAKED) |
||
2524 | # define LZO_INFO_LIBC "naked" |
||
2525 | #elif (LZO_LIBC_FREESTANDING) |
||
2526 | # define LZO_INFO_LIBC "freestanding" |
||
2527 | #elif (LZO_LIBC_MOSTLY_FREESTANDING) |
||
2528 | # define LZO_INFO_LIBC "mfreestanding" |
||
2529 | #elif (LZO_LIBC_ISOC90) |
||
2530 | # define LZO_INFO_LIBC "isoc90" |
||
2531 | #elif (LZO_LIBC_ISOC99) |
||
2532 | # define LZO_INFO_LIBC "isoc99" |
||
2533 | #elif (LZO_CC_ARMCC_ARMCC) && defined(__ARMCLIB_VERSION) |
||
2534 | # define LZO_LIBC_ISOC90 1 |
||
2535 | # define LZO_INFO_LIBC "isoc90" |
||
2536 | #elif defined(__dietlibc__) |
||
2537 | # define LZO_LIBC_DIETLIBC 1 |
||
2538 | # define LZO_INFO_LIBC "dietlibc" |
||
2539 | #elif defined(_NEWLIB_VERSION) |
||
2540 | # define LZO_LIBC_NEWLIB 1 |
||
2541 | # define LZO_INFO_LIBC "newlib" |
||
2542 | #elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) |
||
2543 | # if defined(__UCLIBC_SUBLEVEL__) |
||
2544 | # define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + (__UCLIBC_MINOR__-0) * 0x100 + (__UCLIBC_SUBLEVEL__-0)) |
||
2545 | # else |
||
2546 | # define LZO_LIBC_UCLIBC 0x00090bL |
||
2547 | # endif |
||
2548 | # define LZO_INFO_LIBC "uc" "libc" |
||
2549 | #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) |
||
2550 | # define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + (__GLIBC_MINOR__-0) * 0x100) |
||
2551 | # define LZO_INFO_LIBC "glibc" |
||
2552 | #elif (LZO_CC_MWERKS) && defined(__MSL__) |
||
2553 | # define LZO_LIBC_MSL __MSL__ |
||
2554 | # define LZO_INFO_LIBC "msl" |
||
2555 | #elif 1 && defined(__IAR_SYSTEMS_ICC__) |
||
2556 | # define LZO_LIBC_ISOC90 1 |
||
2557 | # define LZO_INFO_LIBC "isoc90" |
||
2558 | #else |
||
2559 | # define LZO_LIBC_DEFAULT 1 |
||
2560 | # define LZO_INFO_LIBC "default" |
||
2561 | #endif |
||
2562 | #endif |
||
2563 | #if (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) |
||
2564 | # define LZO_ASM_SYNTAX_MSC 1 |
||
2565 | #elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) |
||
2566 | #elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul)) |
||
2567 | #elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) |
||
2568 | # define LZO_ASM_SYNTAX_GNUC 1 |
||
2569 | #elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) |
||
2570 | # define LZO_ASM_SYNTAX_GNUC 1 |
||
2571 | #elif (LZO_CC_GNUC) |
||
2572 | # define LZO_ASM_SYNTAX_GNUC 1 |
||
2573 | #endif |
||
2574 | #if (LZO_ASM_SYNTAX_GNUC) |
||
2575 | #if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) |
||
2576 | # define __LZO_ASM_CLOBBER "ax" |
||
2577 | # define __LZO_ASM_CLOBBER_LIST_CC /*empty*/ |
||
2578 | # define __LZO_ASM_CLOBBER_LIST_CC_MEMORY /*empty*/ |
||
2579 | # define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ |
||
2580 | #elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1000)) |
||
2581 | # define __LZO_ASM_CLOBBER "memory" |
||
2582 | # define __LZO_ASM_CLOBBER_LIST_CC /*empty*/ |
||
2583 | # define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "memory" |
||
2584 | # define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ |
||
2585 | #else |
||
2586 | # define __LZO_ASM_CLOBBER "cc", "memory" |
||
2587 | # define __LZO_ASM_CLOBBER_LIST_CC : "cc" |
||
2588 | # define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "cc", "memory" |
||
2589 | # define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/ |
||
2590 | #endif |
||
2591 | #endif |
||
2592 | #if (LZO_ARCH_ALPHA) |
||
2593 | # define LZO_OPT_AVOID_UINT_INDEX 1 |
||
2594 | #elif (LZO_ARCH_AMD64) |
||
2595 | # define LZO_OPT_AVOID_INT_INDEX 1 |
||
2596 | # define LZO_OPT_AVOID_UINT_INDEX 1 |
||
2597 | # ifndef LZO_OPT_UNALIGNED16 |
||
2598 | # define LZO_OPT_UNALIGNED16 1 |
||
2599 | # endif |
||
2600 | # ifndef LZO_OPT_UNALIGNED32 |
||
2601 | # define LZO_OPT_UNALIGNED32 1 |
||
2602 | # endif |
||
2603 | # ifndef LZO_OPT_UNALIGNED64 |
||
2604 | # define LZO_OPT_UNALIGNED64 1 |
||
2605 | # endif |
||
2606 | #elif (LZO_ARCH_ARM) |
||
2607 | # if defined(__ARM_FEATURE_UNALIGNED) |
||
2608 | # if ((__ARM_FEATURE_UNALIGNED)+0) |
||
2609 | # ifndef LZO_OPT_UNALIGNED16 |
||
2610 | # define LZO_OPT_UNALIGNED16 1 |
||
2611 | # endif |
||
2612 | # ifndef LZO_OPT_UNALIGNED32 |
||
2613 | # define LZO_OPT_UNALIGNED32 1 |
||
2614 | # endif |
||
2615 | # endif |
||
2616 | # elif 1 && (LZO_ARCH_ARM_THUMB2) |
||
2617 | # ifndef LZO_OPT_UNALIGNED16 |
||
2618 | # define LZO_OPT_UNALIGNED16 1 |
||
2619 | # endif |
||
2620 | # ifndef LZO_OPT_UNALIGNED32 |
||
2621 | # define LZO_OPT_UNALIGNED32 1 |
||
2622 | # endif |
||
2623 | # elif 1 && defined(__ARM_ARCH) && ((__ARM_ARCH)+0 >= 7) |
||
2624 | # ifndef LZO_OPT_UNALIGNED16 |
||
2625 | # define LZO_OPT_UNALIGNED16 1 |
||
2626 | # endif |
||
2627 | # ifndef LZO_OPT_UNALIGNED32 |
||
2628 | # define LZO_OPT_UNALIGNED32 1 |
||
2629 | # endif |
||
2630 | # elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7) |
||
2631 | # ifndef LZO_OPT_UNALIGNED16 |
||
2632 | # define LZO_OPT_UNALIGNED16 1 |
||
2633 | # endif |
||
2634 | # ifndef LZO_OPT_UNALIGNED32 |
||
2635 | # define LZO_OPT_UNALIGNED32 1 |
||
2636 | # endif |
||
2637 | # elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R)) |
||
2638 | # ifndef LZO_OPT_UNALIGNED16 |
||
2639 | # define LZO_OPT_UNALIGNED16 1 |
||
2640 | # endif |
||
2641 | # ifndef LZO_OPT_UNALIGNED32 |
||
2642 | # define LZO_OPT_UNALIGNED32 1 |
||
2643 | # endif |
||
2644 | # elif 1 && defined(_MSC_VER) && defined(_M_ARM) && ((_M_ARM)+0 >= 7) |
||
2645 | # ifndef LZO_OPT_UNALIGNED16 |
||
2646 | # define LZO_OPT_UNALIGNED16 1 |
||
2647 | # endif |
||
2648 | # ifndef LZO_OPT_UNALIGNED32 |
||
2649 | # define LZO_OPT_UNALIGNED32 1 |
||
2650 | # endif |
||
2651 | # endif |
||
2652 | #elif (LZO_ARCH_ARM64) |
||
2653 | # ifndef LZO_OPT_UNALIGNED16 |
||
2654 | # define LZO_OPT_UNALIGNED16 1 |
||
2655 | # endif |
||
2656 | # ifndef LZO_OPT_UNALIGNED32 |
||
2657 | # define LZO_OPT_UNALIGNED32 1 |
||
2658 | # endif |
||
2659 | # ifndef LZO_OPT_UNALIGNED64 |
||
2660 | # define LZO_OPT_UNALIGNED64 1 |
||
2661 | # endif |
||
2662 | #elif (LZO_ARCH_CRIS) |
||
2663 | # ifndef LZO_OPT_UNALIGNED16 |
||
2664 | # define LZO_OPT_UNALIGNED16 1 |
||
2665 | # endif |
||
2666 | # ifndef LZO_OPT_UNALIGNED32 |
||
2667 | # define LZO_OPT_UNALIGNED32 1 |
||
2668 | # endif |
||
2669 | #elif (LZO_ARCH_I386) |
||
2670 | # ifndef LZO_OPT_UNALIGNED16 |
||
2671 | # define LZO_OPT_UNALIGNED16 1 |
||
2672 | # endif |
||
2673 | # ifndef LZO_OPT_UNALIGNED32 |
||
2674 | # define LZO_OPT_UNALIGNED32 1 |
||
2675 | # endif |
||
2676 | #elif (LZO_ARCH_IA64) |
||
2677 | # define LZO_OPT_AVOID_INT_INDEX 1 |
||
2678 | # define LZO_OPT_AVOID_UINT_INDEX 1 |
||
2679 | # define LZO_OPT_PREFER_POSTINC 1 |
||
2680 | #elif (LZO_ARCH_M68K) |
||
2681 | # define LZO_OPT_PREFER_POSTINC 1 |
||
2682 | # define LZO_OPT_PREFER_PREDEC 1 |
||
2683 | # if defined(__mc68020__) && !defined(__mcoldfire__) |
||
2684 | # ifndef LZO_OPT_UNALIGNED16 |
||
2685 | # define LZO_OPT_UNALIGNED16 1 |
||
2686 | # endif |
||
2687 | # ifndef LZO_OPT_UNALIGNED32 |
||
2688 | # define LZO_OPT_UNALIGNED32 1 |
||
2689 | # endif |
||
2690 | # endif |
||
2691 | #elif (LZO_ARCH_MIPS) |
||
2692 | # define LZO_OPT_AVOID_UINT_INDEX 1 |
||
2693 | #elif (LZO_ARCH_POWERPC) |
||
2694 | # define LZO_OPT_PREFER_PREINC 1 |
||
2695 | # define LZO_OPT_PREFER_PREDEC 1 |
||
2696 | # if (LZO_ABI_BIG_ENDIAN) || (LZO_WORDSIZE == 8) |
||
2697 | # ifndef LZO_OPT_UNALIGNED16 |
||
2698 | # define LZO_OPT_UNALIGNED16 1 |
||
2699 | # endif |
||
2700 | # ifndef LZO_OPT_UNALIGNED32 |
||
2701 | # define LZO_OPT_UNALIGNED32 1 |
||
2702 | # endif |
||
2703 | # if (LZO_WORDSIZE == 8) |
||
2704 | # ifndef LZO_OPT_UNALIGNED64 |
||
2705 | # define LZO_OPT_UNALIGNED64 1 |
||
2706 | # endif |
||
2707 | # endif |
||
2708 | # endif |
||
2709 | #elif (LZO_ARCH_RISCV) |
||
2710 | # define LZO_OPT_AVOID_UINT_INDEX 1 |
||
2711 | # ifndef LZO_OPT_UNALIGNED16 |
||
2712 | # define LZO_OPT_UNALIGNED16 1 |
||
2713 | # endif |
||
2714 | # ifndef LZO_OPT_UNALIGNED32 |
||
2715 | # define LZO_OPT_UNALIGNED32 1 |
||
2716 | # endif |
||
2717 | # if (LZO_WORDSIZE == 8) |
||
2718 | # ifndef LZO_OPT_UNALIGNED64 |
||
2719 | # define LZO_OPT_UNALIGNED64 1 |
||
2720 | # endif |
||
2721 | # endif |
||
2722 | #elif (LZO_ARCH_S390) |
||
2723 | # ifndef LZO_OPT_UNALIGNED16 |
||
2724 | # define LZO_OPT_UNALIGNED16 1 |
||
2725 | # endif |
||
2726 | # ifndef LZO_OPT_UNALIGNED32 |
||
2727 | # define LZO_OPT_UNALIGNED32 1 |
||
2728 | # endif |
||
2729 | # if (LZO_WORDSIZE == 8) |
||
2730 | # ifndef LZO_OPT_UNALIGNED64 |
||
2731 | # define LZO_OPT_UNALIGNED64 1 |
||
2732 | # endif |
||
2733 | # endif |
||
2734 | #elif (LZO_ARCH_SH) |
||
2735 | # define LZO_OPT_PREFER_POSTINC 1 |
||
2736 | # define LZO_OPT_PREFER_PREDEC 1 |
||
2737 | #endif |
||
2738 | #ifndef LZO_CFG_NO_INLINE_ASM |
||
2739 | #if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) |
||
2740 | # define LZO_CFG_NO_INLINE_ASM 1 |
||
2741 | #elif (LZO_CC_LLVM) |
||
2742 | # define LZO_CFG_NO_INLINE_ASM 1 |
||
2743 | #endif |
||
2744 | #endif |
||
2745 | #if (LZO_CFG_NO_INLINE_ASM) |
||
2746 | # undef LZO_ASM_SYNTAX_MSC |
||
2747 | # undef LZO_ASM_SYNTAX_GNUC |
||
2748 | # undef __LZO_ASM_CLOBBER |
||
2749 | # undef __LZO_ASM_CLOBBER_LIST_CC |
||
2750 | # undef __LZO_ASM_CLOBBER_LIST_CC_MEMORY |
||
2751 | # undef __LZO_ASM_CLOBBER_LIST_EMPTY |
||
2752 | #endif |
||
2753 | #ifndef LZO_CFG_NO_UNALIGNED |
||
2754 | #if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) |
||
2755 | # define LZO_CFG_NO_UNALIGNED 1 |
||
2756 | #endif |
||
2757 | #endif |
||
2758 | #if (LZO_CFG_NO_UNALIGNED) |
||
2759 | # undef LZO_OPT_UNALIGNED16 |
||
2760 | # undef LZO_OPT_UNALIGNED32 |
||
2761 | # undef LZO_OPT_UNALIGNED64 |
||
2762 | #endif |
||
2763 | #if defined(__LZO_INFOSTR_MM) |
||
2764 | #elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) |
||
2765 | # define __LZO_INFOSTR_MM "" |
||
2766 | #elif defined(LZO_INFO_MM) |
||
2767 | # define __LZO_INFOSTR_MM "." LZO_INFO_MM |
||
2768 | #else |
||
2769 | # define __LZO_INFOSTR_MM "" |
||
2770 | #endif |
||
2771 | #if defined(__LZO_INFOSTR_PM) |
||
2772 | #elif defined(LZO_INFO_ABI_PM) |
||
2773 | # define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM |
||
2774 | #else |
||
2775 | # define __LZO_INFOSTR_PM "" |
||
2776 | #endif |
||
2777 | #if defined(__LZO_INFOSTR_ENDIAN) |
||
2778 | #elif defined(LZO_INFO_ABI_ENDIAN) |
||
2779 | # define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN |
||
2780 | #else |
||
2781 | # define __LZO_INFOSTR_ENDIAN "" |
||
2782 | #endif |
||
2783 | #if defined(__LZO_INFOSTR_OSNAME) |
||
2784 | #elif defined(LZO_INFO_OS_CONSOLE) |
||
2785 | # define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE |
||
2786 | #elif defined(LZO_INFO_OS_POSIX) |
||
2787 | # define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX |
||
2788 | #else |
||
2789 | # define __LZO_INFOSTR_OSNAME LZO_INFO_OS |
||
2790 | #endif |
||
2791 | #if defined(__LZO_INFOSTR_LIBC) |
||
2792 | #elif defined(LZO_INFO_LIBC) |
||
2793 | # define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC |
||
2794 | #else |
||
2795 | # define __LZO_INFOSTR_LIBC "" |
||
2796 | #endif |
||
2797 | #if defined(__LZO_INFOSTR_CCVER) |
||
2798 | #elif defined(LZO_INFO_CCVER) |
||
2799 | # define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER |
||
2800 | #else |
||
2801 | # define __LZO_INFOSTR_CCVER "" |
||
2802 | #endif |
||
2803 | #define LZO_INFO_STRING \ |
||
2804 | LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ |
||
2805 | " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER |
||
2806 | #if !(LZO_CFG_SKIP_LZO_TYPES) |
||
2807 | #if (!(LZO_SIZEOF_SHORT+0 > 0 && LZO_SIZEOF_INT+0 > 0 && LZO_SIZEOF_LONG+0 > 0)) |
||
2808 | # error "missing defines for sizes" |
||
2809 | #endif |
||
2810 | #if (!(LZO_SIZEOF_PTRDIFF_T+0 > 0 && LZO_SIZEOF_SIZE_T+0 > 0 && LZO_SIZEOF_VOID_P+0 > 0)) |
||
2811 | # error "missing defines for sizes" |
||
2812 | #endif |
||
2813 | #define LZO_TYPEOF_CHAR 1u |
||
2814 | #define LZO_TYPEOF_SHORT 2u |
||
2815 | #define LZO_TYPEOF_INT 3u |
||
2816 | #define LZO_TYPEOF_LONG 4u |
||
2817 | #define LZO_TYPEOF_LONG_LONG 5u |
||
2818 | #define LZO_TYPEOF___INT8 17u |
||
2819 | #define LZO_TYPEOF___INT16 18u |
||
2820 | #define LZO_TYPEOF___INT32 19u |
||
2821 | #define LZO_TYPEOF___INT64 20u |
||
2822 | #define LZO_TYPEOF___INT128 21u |
||
2823 | #define LZO_TYPEOF___INT256 22u |
||
2824 | #define LZO_TYPEOF___MODE_QI 33u |
||
2825 | #define LZO_TYPEOF___MODE_HI 34u |
||
2826 | #define LZO_TYPEOF___MODE_SI 35u |
||
2827 | #define LZO_TYPEOF___MODE_DI 36u |
||
2828 | #define LZO_TYPEOF___MODE_TI 37u |
||
2829 | #define LZO_TYPEOF_CHAR_P 129u |
||
2830 | #if !defined(lzo_llong_t) |
||
2831 | #if (LZO_SIZEOF_LONG_LONG+0 > 0) |
||
2832 | # if !(LZO_LANG_ASSEMBLER) |
||
2833 | __lzo_gnuc_extension__ typedef long long lzo_llong_t__; |
||
2834 | __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; |
||
2835 | # endif |
||
2836 | # define lzo_llong_t lzo_llong_t__ |
||
2837 | # define lzo_ullong_t lzo_ullong_t__ |
||
2838 | #endif |
||
2839 | #endif |
||
2840 | #if !defined(lzo_int16e_t) |
||
2841 | #if (LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT) && (LZO_SIZEOF_SHORT != 2) |
||
2842 | # undef LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T |
||
2843 | #endif |
||
2844 | #if (LZO_SIZEOF_LONG == 2) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT) |
||
2845 | # define lzo_int16e_t long |
||
2846 | # define lzo_uint16e_t unsigned long |
||
2847 | # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_LONG |
||
2848 | #elif (LZO_SIZEOF_INT == 2) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT) |
||
2849 | # define lzo_int16e_t int |
||
2850 | # define lzo_uint16e_t unsigned int |
||
2851 | # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_INT |
||
2852 | #elif (LZO_SIZEOF_SHORT == 2) |
||
2853 | # define lzo_int16e_t short int |
||
2854 | # define lzo_uint16e_t unsigned short int |
||
2855 | # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_SHORT |
||
2856 | #elif 1 && !(LZO_CFG_TYPE_NO_MODE_HI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) |
||
2857 | # if !(LZO_LANG_ASSEMBLER) |
||
2858 | typedef int lzo_int16e_hi_t__ __attribute__((__mode__(__HI__))); |
||
2859 | typedef unsigned int lzo_uint16e_hi_t__ __attribute__((__mode__(__HI__))); |
||
2860 | # endif |
||
2861 | # define lzo_int16e_t lzo_int16e_hi_t__ |
||
2862 | # define lzo_uint16e_t lzo_uint16e_hi_t__ |
||
2863 | # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___MODE_HI |
||
2864 | #elif (LZO_SIZEOF___INT16 == 2) |
||
2865 | # define lzo_int16e_t __int16 |
||
2866 | # define lzo_uint16e_t unsigned __int16 |
||
2867 | # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___INT16 |
||
2868 | #else |
||
2869 | #endif |
||
2870 | #endif |
||
2871 | #if defined(lzo_int16e_t) |
||
2872 | # define LZO_SIZEOF_LZO_INT16E_T 2 |
||
2873 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == 2) |
||
2874 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == LZO_SIZEOF_LZO_INT16E_T) |
||
2875 | #endif |
||
2876 | #if !defined(lzo_int32e_t) |
||
2877 | #if (LZO_CFG_PREFER_TYPEOF_ACC_INT32E_T == LZO_TYPEOF_INT) && (LZO_SIZEOF_INT != 4) |
||
2878 | # undef LZO_CFG_PREFER_TYPEOF_ACC_INT32E_T |
||
2879 | #endif |
||
2880 | #if (LZO_SIZEOF_LONG == 4) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT32E_T == LZO_TYPEOF_INT) |
||
2881 | # define lzo_int32e_t long int |
||
2882 | # define lzo_uint32e_t unsigned long int |
||
2883 | # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG |
||
2884 | #elif (LZO_SIZEOF_INT == 4) |
||
2885 | # define lzo_int32e_t int |
||
2886 | # define lzo_uint32e_t unsigned int |
||
2887 | # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_INT |
||
2888 | #elif (LZO_SIZEOF_SHORT == 4) |
||
2889 | # define lzo_int32e_t short int |
||
2890 | # define lzo_uint32e_t unsigned short int |
||
2891 | # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_SHORT |
||
2892 | #elif (LZO_SIZEOF_LONG_LONG == 4) |
||
2893 | # define lzo_int32e_t lzo_llong_t |
||
2894 | # define lzo_uint32e_t lzo_ullong_t |
||
2895 | # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG_LONG |
||
2896 | #elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) && (__INT_MAX__+0 > 2147483647L) |
||
2897 | # if !(LZO_LANG_ASSEMBLER) |
||
2898 | typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); |
||
2899 | typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); |
||
2900 | # endif |
||
2901 | # define lzo_int32e_t lzo_int32e_si_t__ |
||
2902 | # define lzo_uint32e_t lzo_uint32e_si_t__ |
||
2903 | # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI |
||
2904 | #elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L) |
||
2905 | # if !(LZO_LANG_ASSEMBLER) |
||
2906 | typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); |
||
2907 | typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); |
||
2908 | # endif |
||
2909 | # define lzo_int32e_t lzo_int32e_si_t__ |
||
2910 | # define lzo_uint32e_t lzo_uint32e_si_t__ |
||
2911 | # define LZO_INT32_C(c) (c##LL) |
||
2912 | # define LZO_UINT32_C(c) (c##ULL) |
||
2913 | # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI |
||
2914 | #elif (LZO_SIZEOF___INT32 == 4) |
||
2915 | # define lzo_int32e_t __int32 |
||
2916 | # define lzo_uint32e_t unsigned __int32 |
||
2917 | # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___INT32 |
||
2918 | #else |
||
2919 | #endif |
||
2920 | #endif |
||
2921 | #if defined(lzo_int32e_t) |
||
2922 | # define LZO_SIZEOF_LZO_INT32E_T 4 |
||
2923 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == 4) |
||
2924 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == LZO_SIZEOF_LZO_INT32E_T) |
||
2925 | #endif |
||
2926 | #if !defined(lzo_int64e_t) |
||
2927 | #if (LZO_SIZEOF___INT64 == 8) |
||
2928 | # if (LZO_CC_BORLANDC) && !defined(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T) |
||
2929 | # define LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T LZO_TYPEOF___INT64 |
||
2930 | # endif |
||
2931 | #endif |
||
2932 | #if (LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF_LONG_LONG) && (LZO_SIZEOF_LONG_LONG != 8) |
||
2933 | # undef LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T |
||
2934 | #endif |
||
2935 | #if (LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64) && (LZO_SIZEOF___INT64 != 8) |
||
2936 | # undef LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T |
||
2937 | #endif |
||
2938 | #if (LZO_SIZEOF_INT == 8) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) |
||
2939 | # define lzo_int64e_t int |
||
2940 | # define lzo_uint64e_t unsigned int |
||
2941 | # define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_INT |
||
2942 | #elif (LZO_SIZEOF_LONG == 8) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF_LONG_LONG) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64) |
||
2943 | # define lzo_int64e_t long int |
||
2944 | # define lzo_uint64e_t unsigned long int |
||
2945 | # define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG |
||
2946 | #elif (LZO_SIZEOF_LONG_LONG == 8) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64) |
||
2947 | # define lzo_int64e_t lzo_llong_t |
||
2948 | # define lzo_uint64e_t lzo_ullong_t |
||
2949 | # define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG_LONG |
||
2950 | # if (LZO_CC_BORLANDC) |
||
2951 | # define LZO_INT64_C(c) ((c) + 0ll) |
||
2952 | # define LZO_UINT64_C(c) ((c) + 0ull) |
||
2953 | # elif 0 |
||
2954 | # define LZO_INT64_C(c) (__lzo_gnuc_extension__ (c##LL)) |
||
2955 | # define LZO_UINT64_C(c) (__lzo_gnuc_extension__ (c##ULL)) |
||
2956 | # else |
||
2957 | # define LZO_INT64_C(c) (c##LL) |
||
2958 | # define LZO_UINT64_C(c) (c##ULL) |
||
2959 | # endif |
||
2960 | #elif (LZO_SIZEOF___INT64 == 8) |
||
2961 | # define lzo_int64e_t __int64 |
||
2962 | # define lzo_uint64e_t unsigned __int64 |
||
2963 | # define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF___INT64 |
||
2964 | # if (LZO_CC_BORLANDC) |
||
2965 | # define LZO_INT64_C(c) ((c) + 0i64) |
||
2966 | # define LZO_UINT64_C(c) ((c) + 0ui64) |
||
2967 | # else |
||
2968 | # define LZO_INT64_C(c) (c##i64) |
||
2969 | # define LZO_UINT64_C(c) (c##ui64) |
||
2970 | # endif |
||
2971 | #else |
||
2972 | #endif |
||
2973 | #endif |
||
2974 | #if defined(lzo_int64e_t) |
||
2975 | # define LZO_SIZEOF_LZO_INT64E_T 8 |
||
2976 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == 8) |
||
2977 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == LZO_SIZEOF_LZO_INT64E_T) |
||
2978 | #endif |
||
2979 | #if !defined(lzo_int32l_t) |
||
2980 | #if defined(lzo_int32e_t) |
||
2981 | # define lzo_int32l_t lzo_int32e_t |
||
2982 | # define lzo_uint32l_t lzo_uint32e_t |
||
2983 | # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LZO_INT32E_T |
||
2984 | # define LZO_TYPEOF_LZO_INT32L_T LZO_TYPEOF_LZO_INT32E_T |
||
2985 | #elif (LZO_SIZEOF_INT >= 4) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) |
||
2986 | # define lzo_int32l_t int |
||
2987 | # define lzo_uint32l_t unsigned int |
||
2988 | # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_INT |
||
2989 | # define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_INT |
||
2990 | #elif (LZO_SIZEOF_LONG >= 4) |
||
2991 | # define lzo_int32l_t long int |
||
2992 | # define lzo_uint32l_t unsigned long int |
||
2993 | # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LONG |
||
2994 | # define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_LONG |
||
2995 | #else |
||
2996 | # error "lzo_int32l_t" |
||
2997 | #endif |
||
2998 | #endif |
||
2999 | #if 1 |
||
3000 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) >= 4) |
||
3001 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) == LZO_SIZEOF_LZO_INT32L_T) |
||
3002 | #endif |
||
3003 | #if !defined(lzo_int64l_t) |
||
3004 | #if defined(lzo_int64e_t) |
||
3005 | # define lzo_int64l_t lzo_int64e_t |
||
3006 | # define lzo_uint64l_t lzo_uint64e_t |
||
3007 | # define LZO_SIZEOF_LZO_INT64L_T LZO_SIZEOF_LZO_INT64E_T |
||
3008 | # define LZO_TYPEOF_LZO_INT64L_T LZO_TYPEOF_LZO_INT64E_T |
||
3009 | #else |
||
3010 | #endif |
||
3011 | #endif |
||
3012 | #if defined(lzo_int64l_t) |
||
3013 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) >= 8) |
||
3014 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) == LZO_SIZEOF_LZO_INT64L_T) |
||
3015 | #endif |
||
3016 | #if !defined(lzo_int32f_t) |
||
3017 | #if (LZO_SIZEOF_SIZE_T >= 8) |
||
3018 | # define lzo_int32f_t lzo_int64l_t |
||
3019 | # define lzo_uint32f_t lzo_uint64l_t |
||
3020 | # define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT64L_T |
||
3021 | # define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT64L_T |
||
3022 | #else |
||
3023 | # define lzo_int32f_t lzo_int32l_t |
||
3024 | # define lzo_uint32f_t lzo_uint32l_t |
||
3025 | # define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT32L_T |
||
3026 | # define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT32L_T |
||
3027 | #endif |
||
3028 | #endif |
||
3029 | #if 1 |
||
3030 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) >= 4) |
||
3031 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) == LZO_SIZEOF_LZO_INT32F_T) |
||
3032 | #endif |
||
3033 | #if !defined(lzo_int64f_t) |
||
3034 | #if defined(lzo_int64l_t) |
||
3035 | # define lzo_int64f_t lzo_int64l_t |
||
3036 | # define lzo_uint64f_t lzo_uint64l_t |
||
3037 | # define LZO_SIZEOF_LZO_INT64F_T LZO_SIZEOF_LZO_INT64L_T |
||
3038 | # define LZO_TYPEOF_LZO_INT64F_T LZO_TYPEOF_LZO_INT64L_T |
||
3039 | #else |
||
3040 | #endif |
||
3041 | #endif |
||
3042 | #if defined(lzo_int64f_t) |
||
3043 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) >= 8) |
||
3044 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) == LZO_SIZEOF_LZO_INT64F_T) |
||
3045 | #endif |
||
3046 | #if !defined(lzo_intptr_t) |
||
3047 | #if 1 && (LZO_OS_OS400 && (LZO_SIZEOF_VOID_P == 16)) |
||
3048 | # define __LZO_INTPTR_T_IS_POINTER 1 |
||
3049 | # if !(LZO_LANG_ASSEMBLER) |
||
3050 | typedef char * lzo_intptr_t; |
||
3051 | typedef char * lzo_uintptr_t; |
||
3052 | # endif |
||
3053 | # define lzo_intptr_t lzo_intptr_t |
||
3054 | # define lzo_uintptr_t lzo_uintptr_t |
||
3055 | # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_VOID_P |
||
3056 | # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_CHAR_P |
||
3057 | #elif (LZO_CC_MSC && (_MSC_VER >= 1300) && (LZO_SIZEOF_VOID_P == 4) && (LZO_SIZEOF_INT == 4)) |
||
3058 | # if !(LZO_LANG_ASSEMBLER) |
||
3059 | typedef __w64 int lzo_intptr_t; |
||
3060 | typedef __w64 unsigned int lzo_uintptr_t; |
||
3061 | # endif |
||
3062 | # define lzo_intptr_t lzo_intptr_t |
||
3063 | # define lzo_uintptr_t lzo_uintptr_t |
||
3064 | # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT |
||
3065 | # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT |
||
3066 | #elif (LZO_SIZEOF_SHORT == LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT > LZO_SIZEOF_VOID_P) |
||
3067 | # define lzo_intptr_t short |
||
3068 | # define lzo_uintptr_t unsigned short |
||
3069 | # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_SHORT |
||
3070 | # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_SHORT |
||
3071 | #elif (LZO_SIZEOF_INT >= LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) |
||
3072 | # define lzo_intptr_t int |
||
3073 | # define lzo_uintptr_t unsigned int |
||
3074 | # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT |
||
3075 | # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT |
||
3076 | #elif (LZO_SIZEOF_LONG >= LZO_SIZEOF_VOID_P) |
||
3077 | # define lzo_intptr_t long |
||
3078 | # define lzo_uintptr_t unsigned long |
||
3079 | # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LONG |
||
3080 | # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LONG |
||
3081 | #elif (LZO_SIZEOF_LZO_INT64L_T >= LZO_SIZEOF_VOID_P) |
||
3082 | # define lzo_intptr_t lzo_int64l_t |
||
3083 | # define lzo_uintptr_t lzo_uint64l_t |
||
3084 | # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LZO_INT64L_T |
||
3085 | # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LZO_INT64L_T |
||
3086 | #else |
||
3087 | # error "lzo_intptr_t" |
||
3088 | #endif |
||
3089 | #endif |
||
3090 | #if 1 |
||
3091 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) >= sizeof(void *)) |
||
3092 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) == sizeof(lzo_uintptr_t)) |
||
3093 | #endif |
||
3094 | #if !defined(lzo_word_t) |
||
3095 | #if defined(LZO_WORDSIZE) && (LZO_WORDSIZE+0 > 0) |
||
3096 | #if (LZO_WORDSIZE == LZO_SIZEOF_LZO_INTPTR_T) && !(__LZO_INTPTR_T_IS_POINTER) |
||
3097 | # define lzo_word_t lzo_uintptr_t |
||
3098 | # define lzo_sword_t lzo_intptr_t |
||
3099 | # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INTPTR_T |
||
3100 | # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LZO_INTPTR_T |
||
3101 | #elif (LZO_WORDSIZE == LZO_SIZEOF_LONG) |
||
3102 | # define lzo_word_t unsigned long |
||
3103 | # define lzo_sword_t long |
||
3104 | # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG |
||
3105 | # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LONG |
||
3106 | #elif (LZO_WORDSIZE == LZO_SIZEOF_INT) |
||
3107 | # define lzo_word_t unsigned int |
||
3108 | # define lzo_sword_t int |
||
3109 | # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT |
||
3110 | # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_INT |
||
3111 | #elif (LZO_WORDSIZE == LZO_SIZEOF_SHORT) |
||
3112 | # define lzo_word_t unsigned short |
||
3113 | # define lzo_sword_t short |
||
3114 | # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_SHORT |
||
3115 | # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_SHORT |
||
3116 | #elif (LZO_WORDSIZE == 1) |
||
3117 | # define lzo_word_t unsigned char |
||
3118 | # define lzo_sword_t signed char |
||
3119 | # define LZO_SIZEOF_LZO_WORD_T 1 |
||
3120 | # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_CHAR |
||
3121 | #elif (LZO_WORDSIZE == LZO_SIZEOF_LZO_INT64L_T) |
||
3122 | # define lzo_word_t lzo_uint64l_t |
||
3123 | # define lzo_sword_t lzo_int64l_t |
||
3124 | # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T |
||
3125 | # define LZO_TYPEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T |
||
3126 | #elif (LZO_ARCH_SPU) && (LZO_CC_GNUC) |
||
3127 | #if 0 |
||
3128 | # if !(LZO_LANG_ASSEMBLER) |
||
3129 | typedef unsigned lzo_word_t __attribute__((__mode__(__V16QI__))); |
||
3130 | typedef int lzo_sword_t __attribute__((__mode__(__V16QI__))); |
||
3131 | # endif |
||
3132 | # define lzo_word_t lzo_word_t |
||
3133 | # define lzo_sword_t lzo_sword_t |
||
3134 | # define LZO_SIZEOF_LZO_WORD_T 16 |
||
3135 | # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF___MODE_V16QI |
||
3136 | #endif |
||
3137 | #else |
||
3138 | # error "lzo_word_t" |
||
3139 | #endif |
||
3140 | #endif |
||
3141 | #endif |
||
3142 | #if 1 && defined(lzo_word_t) |
||
3143 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_word_t) == LZO_WORDSIZE) |
||
3144 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_sword_t) == LZO_WORDSIZE) |
||
3145 | #endif |
||
3146 | #if 1 |
||
3147 | #define lzo_int8_t signed char |
||
3148 | #define lzo_uint8_t unsigned char |
||
3149 | #define LZO_SIZEOF_LZO_INT8_T 1 |
||
3150 | #define LZO_TYPEOF_LZO_INT8_T LZO_TYPEOF_CHAR |
||
3151 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1) |
||
3152 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t)) |
||
3153 | #endif |
||
3154 | #if defined(lzo_int16e_t) |
||
3155 | #define lzo_int16_t lzo_int16e_t |
||
3156 | #define lzo_uint16_t lzo_uint16e_t |
||
3157 | #define LZO_SIZEOF_LZO_INT16_T LZO_SIZEOF_LZO_INT16E_T |
||
3158 | #define LZO_TYPEOF_LZO_INT16_T LZO_TYPEOF_LZO_INT16E_T |
||
3159 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2) |
||
3160 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == sizeof(lzo_uint16_t)) |
||
3161 | #endif |
||
3162 | #if defined(lzo_int32e_t) |
||
3163 | #define lzo_int32_t lzo_int32e_t |
||
3164 | #define lzo_uint32_t lzo_uint32e_t |
||
3165 | #define LZO_SIZEOF_LZO_INT32_T LZO_SIZEOF_LZO_INT32E_T |
||
3166 | #define LZO_TYPEOF_LZO_INT32_T LZO_TYPEOF_LZO_INT32E_T |
||
3167 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4) |
||
3168 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == sizeof(lzo_uint32_t)) |
||
3169 | #endif |
||
3170 | #if defined(lzo_int64e_t) |
||
3171 | #define lzo_int64_t lzo_int64e_t |
||
3172 | #define lzo_uint64_t lzo_uint64e_t |
||
3173 | #define LZO_SIZEOF_LZO_INT64_T LZO_SIZEOF_LZO_INT64E_T |
||
3174 | #define LZO_TYPEOF_LZO_INT64_T LZO_TYPEOF_LZO_INT64E_T |
||
3175 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8) |
||
3176 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == sizeof(lzo_uint64_t)) |
||
3177 | #endif |
||
3178 | #if 1 |
||
3179 | #define lzo_int_least32_t lzo_int32l_t |
||
3180 | #define lzo_uint_least32_t lzo_uint32l_t |
||
3181 | #define LZO_SIZEOF_LZO_INT_LEAST32_T LZO_SIZEOF_LZO_INT32L_T |
||
3182 | #define LZO_TYPEOF_LZO_INT_LEAST32_T LZO_TYPEOF_LZO_INT32L_T |
||
3183 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) >= 4) |
||
3184 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) == sizeof(lzo_uint_least32_t)) |
||
3185 | #endif |
||
3186 | #if defined(lzo_int64l_t) |
||
3187 | #define lzo_int_least64_t lzo_int64l_t |
||
3188 | #define lzo_uint_least64_t lzo_uint64l_t |
||
3189 | #define LZO_SIZEOF_LZO_INT_LEAST64_T LZO_SIZEOF_LZO_INT64L_T |
||
3190 | #define LZO_TYPEOF_LZO_INT_LEAST64_T LZO_TYPEOF_LZO_INT64L_T |
||
3191 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) >= 8) |
||
3192 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) == sizeof(lzo_uint_least64_t)) |
||
3193 | #endif |
||
3194 | #if 1 |
||
3195 | #define lzo_int_fast32_t lzo_int32f_t |
||
3196 | #define lzo_uint_fast32_t lzo_uint32f_t |
||
3197 | #define LZO_SIZEOF_LZO_INT_FAST32_T LZO_SIZEOF_LZO_INT32F_T |
||
3198 | #define LZO_TYPEOF_LZO_INT_FAST32_T LZO_TYPEOF_LZO_INT32F_T |
||
3199 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) >= 4) |
||
3200 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) == sizeof(lzo_uint_fast32_t)) |
||
3201 | #endif |
||
3202 | #if defined(lzo_int64f_t) |
||
3203 | #define lzo_int_fast64_t lzo_int64f_t |
||
3204 | #define lzo_uint_fast64_t lzo_uint64f_t |
||
3205 | #define LZO_SIZEOF_LZO_INT_FAST64_T LZO_SIZEOF_LZO_INT64F_T |
||
3206 | #define LZO_TYPEOF_LZO_INT_FAST64_T LZO_TYPEOF_LZO_INT64F_T |
||
3207 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) >= 8) |
||
3208 | LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast64_t)) |
||
3209 | #endif |
||
3210 | #if !defined(LZO_INT16_C) |
||
3211 | # if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 2) |
||
3212 | # define LZO_INT16_C(c) ((c) + 0) |
||
3213 | # define LZO_UINT16_C(c) ((c) + 0U) |
||
3214 | # elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 2) |
||
3215 | # define LZO_INT16_C(c) ((c) + 0L) |
||
3216 | # define LZO_UINT16_C(c) ((c) + 0UL) |
||
3217 | # elif (LZO_SIZEOF_INT >= 2) |
||
3218 | # define LZO_INT16_C(c) (c) |
||
3219 | # define LZO_UINT16_C(c) (c##U) |
||
3220 | # elif (LZO_SIZEOF_LONG >= 2) |
||
3221 | # define LZO_INT16_C(c) (c##L) |
||
3222 | # define LZO_UINT16_C(c) (c##UL) |
||
3223 | # else |
||
3224 | # error "LZO_INT16_C" |
||
3225 | # endif |
||
3226 | #endif |
||
3227 | #if !defined(LZO_INT32_C) |
||
3228 | # if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 4) |
||
3229 | # define LZO_INT32_C(c) ((c) + 0) |
||
3230 | # define LZO_UINT32_C(c) ((c) + 0U) |
||
3231 | # elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 4) |
||
3232 | # define LZO_INT32_C(c) ((c) + 0L) |
||
3233 | # define LZO_UINT32_C(c) ((c) + 0UL) |
||
3234 | # elif (LZO_SIZEOF_INT >= 4) |
||
3235 | # define LZO_INT32_C(c) (c) |
||
3236 | # define LZO_UINT32_C(c) (c##U) |
||
3237 | # elif (LZO_SIZEOF_LONG >= 4) |
||
3238 | # define LZO_INT32_C(c) (c##L) |
||
3239 | # define LZO_UINT32_C(c) (c##UL) |
||
3240 | # elif (LZO_SIZEOF_LONG_LONG >= 4) |
||
3241 | # define LZO_INT32_C(c) (c##LL) |
||
3242 | # define LZO_UINT32_C(c) (c##ULL) |
||
3243 | # else |
||
3244 | # error "LZO_INT32_C" |
||
3245 | # endif |
||
3246 | #endif |
||
3247 | #if !defined(LZO_INT64_C) && defined(lzo_int64l_t) |
||
3248 | # if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 8) |
||
3249 | # define LZO_INT64_C(c) ((c) + 0) |
||
3250 | # define LZO_UINT64_C(c) ((c) + 0U) |
||
3251 | # elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 8) |
||
3252 | # define LZO_INT64_C(c) ((c) + 0L) |
||
3253 | # define LZO_UINT64_C(c) ((c) + 0UL) |
||
3254 | # elif (LZO_SIZEOF_INT >= 8) |
||
3255 | # define LZO_INT64_C(c) (c) |
||
3256 | # define LZO_UINT64_C(c) (c##U) |
||
3257 | # elif (LZO_SIZEOF_LONG >= 8) |
||
3258 | # define LZO_INT64_C(c) (c##L) |
||
3259 | # define LZO_UINT64_C(c) (c##UL) |
||
3260 | # else |
||
3261 | # error "LZO_INT64_C" |
||
3262 | # endif |
||
3263 | #endif |
||
3264 | #endif |
||
3265 | |||
3266 | #endif /* already included */ |
||
3267 | |||
3268 | /* vim:set ts=4 sw=4 et: */ |