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