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) 2010 Markus Franz Xaver Johannes Oberhumer 6 Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer 7 Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer 8 Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer 9 Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer 10 Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer 11 Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer 12 Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer 13 Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer 14 Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer 15 Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer 16 Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer 17 Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer 18 Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer 19 Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer 20 All Rights Reserved. 21 22 The LZO library is free software; you can redistribute it and/or 23 modify it under the terms of the GNU General Public License as 24 published by the Free Software Foundation; either version 2 of 25 the License, or (at your option) any later version. 26 27 The LZO library is distributed in the hope that it will be useful, 28 but WITHOUT ANY WARRANTY; without even the implied warranty of 29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 GNU General Public License for more details. 31 32 You should have received a copy of the GNU General Public License 33 along with the LZO library; see the file COPYING. 34 If not, write to the Free Software Foundation, Inc., 35 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 36 37 Markus F.X.J. Oberhumer 38 <markus@oberhumer.com> 39 http://www.oberhumer.com/opensource/lzo/ 40 */ 41 42 43 #ifndef __LZODEFS_H_INCLUDED 44 #define __LZODEFS_H_INCLUDED 1 45 46 #if defined(__CYGWIN32__) && !defined(__CYGWIN__) 47 # define __CYGWIN__ __CYGWIN32__ 48 #endif 49 #if defined(__IBMCPP__) && !defined(__IBMC__) 50 # define __IBMC__ __IBMCPP__ 51 #endif 52 #if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) 53 # define __INTEL_COMPILER __ICL 54 #endif 55 #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) 56 # define _ALL_SOURCE 1 57 #endif 58 #if defined(__mips__) && defined(__R5900__) 59 # if !defined(__LONG_MAX__) 60 # define __LONG_MAX__ 9223372036854775807L 61 # endif 62 #endif 63 #if defined(__INTEL_COMPILER) && defined(__linux__) 64 # pragma warning(disable: 193) 65 #endif 66 #if defined(__KEIL__) && defined(__C166__) 67 # pragma warning disable = 322 68 #elif 0 && defined(__C251__) 69 # pragma warning disable = 322 70 #endif 71 #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) 72 # if (_MSC_VER >= 1300) 73 # pragma warning(disable: 4668) 74 # endif 75 #endif 76 #if 0 && defined(__WATCOMC__) 77 # if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) 78 # pragma warning 203 9 79 # endif 80 #endif 81 #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) 82 # pragma option -h 83 #endif 84 #if 0 85 #define LZO_0xffffL 0xfffful 86 #define LZO_0xffffffffL 0xfffffffful 87 #else 88 #define LZO_0xffffL 65535ul 89 #define LZO_0xffffffffL 4294967295ul 90 #endif 91 #if (LZO_0xffffL == LZO_0xffffffffL) 92 # error "your preprocessor is broken 1" 93 #endif 94 #if (16ul * 16384ul != 262144ul) 95 # error "your preprocessor is broken 2" 96 #endif 97 #if 0 98 #if (32767 >= 4294967295ul) 99 # error "your preprocessor is broken 3" 100 #endif 101 #if (65535u >= 4294967295ul) 102 # error "your preprocessor is broken 4" 103 #endif 104 #endif 105 #if (UINT_MAX == LZO_0xffffL) 106 #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) 107 # if !defined(MSDOS) 108 # define MSDOS 1 109 # endif 110 # if !defined(_MSDOS) 111 # define _MSDOS 1 112 # endif 113 #elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) 114 # if (__VERSION == 520) && (MB_LEN_MAX == 1) 115 # if !defined(__AZTEC_C__) 116 # define __AZTEC_C__ __VERSION 117 # endif 118 # if !defined(__DOS__) 119 # define __DOS__ 1 120 # endif 121 # endif 122 #endif 123 #endif 124 #if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) 125 # define ptrdiff_t long 126 # define _PTRDIFF_T_DEFINED 1 127 #endif 128 #if (UINT_MAX == LZO_0xffffL) 129 # undef __LZO_RENAME_A 130 # undef __LZO_RENAME_B 131 # if defined(__AZTEC_C__) && defined(__DOS__) 132 # define __LZO_RENAME_A 1 133 # elif defined(_MSC_VER) && defined(MSDOS) 134 # if (_MSC_VER < 600) 135 # define __LZO_RENAME_A 1 136 # elif (_MSC_VER < 700) 137 # define __LZO_RENAME_B 1 138 # endif 139 # elif defined(__TSC__) && defined(__OS2__) 140 # define __LZO_RENAME_A 1 141 # elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) 142 # define __LZO_RENAME_A 1 143 # elif defined(__PACIFIC__) && defined(DOS) 144 # if !defined(__far) 145 # define __far far 146 # endif 147 # if !defined(__near) 148 # define __near near 149 # endif 150 # endif 151 # if defined(__LZO_RENAME_A) 152 # if !defined(__cdecl) 153 # define __cdecl cdecl 154 # endif 155 # if !defined(__far) 156 # define __far far 157 # endif 158 # if !defined(__huge) 159 # define __huge huge 160 # endif 161 # if !defined(__near) 162 # define __near near 163 # endif 164 # if !defined(__pascal) 165 # define __pascal pascal 166 # endif 167 # if !defined(__huge) 168 # define __huge huge 169 # endif 170 # elif defined(__LZO_RENAME_B) 171 # if !defined(__cdecl) 172 # define __cdecl _cdecl 173 # endif 174 # if !defined(__far) 175 # define __far _far 176 # endif 177 # if !defined(__huge) 178 # define __huge _huge 179 # endif 180 # if !defined(__near) 181 # define __near _near 182 # endif 183 # if !defined(__pascal) 184 # define __pascal _pascal 185 # endif 186 # elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) 187 # if !defined(__cdecl) 188 # define __cdecl cdecl 189 # endif 190 # if !defined(__pascal) 191 # define __pascal pascal 192 # endif 193 # endif 194 # undef __LZO_RENAME_A 195 # undef __LZO_RENAME_B 196 #endif 197 #if (UINT_MAX == LZO_0xffffL) 198 #if defined(__AZTEC_C__) && defined(__DOS__) 199 # define LZO_BROKEN_CDECL_ALT_SYNTAX 1 200 #elif defined(_MSC_VER) && defined(MSDOS) 201 # if (_MSC_VER < 600) 202 # define LZO_BROKEN_INTEGRAL_CONSTANTS 1 203 # endif 204 # if (_MSC_VER < 700) 205 # define LZO_BROKEN_INTEGRAL_PROMOTION 1 206 # define LZO_BROKEN_SIZEOF 1 207 # endif 208 #elif defined(__PACIFIC__) && defined(DOS) 209 # define LZO_BROKEN_INTEGRAL_CONSTANTS 1 210 #elif defined(__TURBOC__) && defined(__MSDOS__) 211 # if (__TURBOC__ < 0x0150) 212 # define LZO_BROKEN_CDECL_ALT_SYNTAX 1 213 # define LZO_BROKEN_INTEGRAL_CONSTANTS 1 214 # define LZO_BROKEN_INTEGRAL_PROMOTION 1 215 # endif 216 # if (__TURBOC__ < 0x0200) 217 # define LZO_BROKEN_SIZEOF 1 218 # endif 219 # if (__TURBOC__ < 0x0400) && defined(__cplusplus) 220 # define LZO_BROKEN_CDECL_ALT_SYNTAX 1 221 # endif 222 #elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) 223 # define LZO_BROKEN_CDECL_ALT_SYNTAX 1 224 # define LZO_BROKEN_SIZEOF 1 225 #endif 226 #endif 227 #if defined(__WATCOMC__) && (__WATCOMC__ < 900) 228 # define LZO_BROKEN_INTEGRAL_CONSTANTS 1 229 #endif 230 #if defined(_CRAY) && defined(_CRAY1) 231 # define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 232 #endif 233 #define LZO_PP_STRINGIZE(x) #x 234 #define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) 235 #define LZO_PP_CONCAT2(a,b) a ## b 236 #define LZO_PP_CONCAT3(a,b,c) a ## b ## c 237 #define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d 238 #define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e 239 #define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) 240 #define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) 241 #define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) 242 #define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) 243 #if 1 244 #define LZO_CPP_STRINGIZE(x) #x 245 #define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) 246 #define LZO_CPP_CONCAT2(a,b) a ## b 247 #define LZO_CPP_CONCAT3(a,b,c) a ## b ## c 248 #define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d 249 #define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e 250 #define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) 251 #define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) 252 #define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) 253 #define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) 254 #endif 255 #define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) 256 #if 1 && defined(__cplusplus) 257 # if !defined(__STDC_CONSTANT_MACROS) 258 # define __STDC_CONSTANT_MACROS 1 259 # endif 260 # if !defined(__STDC_LIMIT_MACROS) 261 # define __STDC_LIMIT_MACROS 1 262 # endif 263 #endif 264 #if defined(__cplusplus) 265 # define LZO_EXTERN_C extern "C" 266 #else 267 # define LZO_EXTERN_C extern 268 #endif 269 #if !defined(__LZO_OS_OVERRIDE) 270 #if (LZO_OS_FREESTANDING) 271 # define LZO_INFO_OS "freestanding" 272 #elif (LZO_OS_EMBEDDED) 273 # define LZO_INFO_OS "embedded" 274 #elif 1 && defined(__IAR_SYSTEMS_ICC__) 275 # define LZO_OS_EMBEDDED 1 276 # define LZO_INFO_OS "embedded" 277 #elif defined(__CYGWIN__) && defined(__GNUC__) 278 # define LZO_OS_CYGWIN 1 279 # define LZO_INFO_OS "cygwin" 280 #elif defined(__EMX__) && defined(__GNUC__) 281 # define LZO_OS_EMX 1 282 # define LZO_INFO_OS "emx" 283 #elif defined(__BEOS__) 284 # define LZO_OS_BEOS 1 285 # define LZO_INFO_OS "beos" 286 #elif defined(__Lynx__) 287 # define LZO_OS_LYNXOS 1 288 # define LZO_INFO_OS "lynxos" 289 #elif defined(__OS400__) 290 # define LZO_OS_OS400 1 291 # define LZO_INFO_OS "os400" 292 #elif defined(__QNX__) 293 # define LZO_OS_QNX 1 294 # define LZO_INFO_OS "qnx" 295 #elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) 296 # define LZO_OS_DOS32 1 297 # define LZO_INFO_OS "dos32" 298 #elif defined(__BORLANDC__) && defined(__DPMI16__) 299 # define LZO_OS_DOS16 1 300 # define LZO_INFO_OS "dos16" 301 #elif defined(__ZTC__) && defined(DOS386) 302 # define LZO_OS_DOS32 1 303 # define LZO_INFO_OS "dos32" 304 #elif defined(__OS2__) || defined(__OS2V2__) 305 # if (UINT_MAX == LZO_0xffffL) 306 # define LZO_OS_OS216 1 307 # define LZO_INFO_OS "os216" 308 # elif (UINT_MAX == LZO_0xffffffffL) 309 # define LZO_OS_OS2 1 310 # define LZO_INFO_OS "os2" 311 # else 312 # error "check your limits.h header" 313 # endif 314 #elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) 315 # define LZO_OS_WIN64 1 316 # define LZO_INFO_OS "win64" 317 #elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) 318 # define LZO_OS_WIN32 1 319 # define LZO_INFO_OS "win32" 320 #elif defined(__MWERKS__) && defined(__INTEL__) 321 # define LZO_OS_WIN32 1 322 # define LZO_INFO_OS "win32" 323 #elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) 324 # if (UINT_MAX == LZO_0xffffL) 325 # define LZO_OS_WIN16 1 326 # define LZO_INFO_OS "win16" 327 # elif (UINT_MAX == LZO_0xffffffffL) 328 # define LZO_OS_WIN32 1 329 # define LZO_INFO_OS "win32" 330 # else 331 # error "check your limits.h header" 332 # endif 333 #elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) 334 # if (UINT_MAX == LZO_0xffffL) 335 # define LZO_OS_DOS16 1 336 # define LZO_INFO_OS "dos16" 337 # elif (UINT_MAX == LZO_0xffffffffL) 338 # define LZO_OS_DOS32 1 339 # define LZO_INFO_OS "dos32" 340 # else 341 # error "check your limits.h header" 342 # endif 343 #elif defined(__WATCOMC__) 344 # if defined(__NT__) && (UINT_MAX == LZO_0xffffL) 345 # define LZO_OS_DOS16 1 346 # define LZO_INFO_OS "dos16" 347 # elif defined(__NT__) && (__WATCOMC__ < 1100) 348 # define LZO_OS_WIN32 1 349 # define LZO_INFO_OS "win32" 350 # elif defined(__linux__) || defined(__LINUX__) 351 # define LZO_OS_POSIX 1 352 # define LZO_INFO_OS "posix" 353 # else 354 # error "please specify a target using the -bt compiler option" 355 # endif 356 #elif defined(__palmos__) 357 # define LZO_OS_PALMOS 1 358 # define LZO_INFO_OS "palmos" 359 #elif defined(__TOS__) || defined(__atarist__) 360 # define LZO_OS_TOS 1 361 # define LZO_INFO_OS "tos" 362 #elif defined(macintosh) && !defined(__ppc__) 363 # define LZO_OS_MACCLASSIC 1 364 # define LZO_INFO_OS "macclassic" 365 #elif defined(__VMS) 366 # define LZO_OS_VMS 1 367 # define LZO_INFO_OS "vms" 368 #elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) 369 # define LZO_OS_CONSOLE 1 370 # define LZO_OS_CONSOLE_PS2 1 371 # define LZO_INFO_OS "console" 372 # define LZO_INFO_OS_CONSOLE "ps2" 373 #elif (defined(__mips__) && defined(__psp__)) 374 # define LZO_OS_CONSOLE 1 375 # define LZO_OS_CONSOLE_PSP 1 376 # define LZO_INFO_OS "console" 377 # define LZO_INFO_OS_CONSOLE "psp" 378 #else 379 # define LZO_OS_POSIX 1 380 # define LZO_INFO_OS "posix" 381 #endif 382 #if (LZO_OS_POSIX) 383 # if defined(_AIX) || defined(__AIX__) || defined(__aix__) 384 # define LZO_OS_POSIX_AIX 1 385 # define LZO_INFO_OS_POSIX "aix" 386 # elif defined(__FreeBSD__) 387 # define LZO_OS_POSIX_FREEBSD 1 388 # define LZO_INFO_OS_POSIX "freebsd" 389 # elif defined(__hpux__) || defined(__hpux) 390 # define LZO_OS_POSIX_HPUX 1 391 # define LZO_INFO_OS_POSIX "hpux" 392 # elif defined(__INTERIX) 393 # define LZO_OS_POSIX_INTERIX 1 394 # define LZO_INFO_OS_POSIX "interix" 395 # elif defined(__IRIX__) || defined(__irix__) 396 # define LZO_OS_POSIX_IRIX 1 397 # define LZO_INFO_OS_POSIX "irix" 398 # elif defined(__linux__) || defined(__linux) || defined(__LINUX__) 399 # define LZO_OS_POSIX_LINUX 1 400 # define LZO_INFO_OS_POSIX "linux" 401 # elif defined(__APPLE__) || defined(__MACOS__) 402 # define LZO_OS_POSIX_MACOSX 1 403 # define LZO_INFO_OS_POSIX "macosx" 404 # elif defined(__minix__) || defined(__minix) 405 # define LZO_OS_POSIX_MINIX 1 406 # define LZO_INFO_OS_POSIX "minix" 407 # elif defined(__NetBSD__) 408 # define LZO_OS_POSIX_NETBSD 1 409 # define LZO_INFO_OS_POSIX "netbsd" 410 # elif defined(__OpenBSD__) 411 # define LZO_OS_POSIX_OPENBSD 1 412 # define LZO_INFO_OS_POSIX "openbsd" 413 # elif defined(__osf__) 414 # define LZO_OS_POSIX_OSF 1 415 # define LZO_INFO_OS_POSIX "osf" 416 # elif defined(__solaris__) || defined(__sun) 417 # if defined(__SVR4) || defined(__svr4__) 418 # define LZO_OS_POSIX_SOLARIS 1 419 # define LZO_INFO_OS_POSIX "solaris" 420 # else 421 # define LZO_OS_POSIX_SUNOS 1 422 # define LZO_INFO_OS_POSIX "sunos" 423 # endif 424 # elif defined(__ultrix__) || defined(__ultrix) 425 # define LZO_OS_POSIX_ULTRIX 1 426 # define LZO_INFO_OS_POSIX "ultrix" 427 # elif defined(_UNICOS) 428 # define LZO_OS_POSIX_UNICOS 1 429 # define LZO_INFO_OS_POSIX "unicos" 430 # else 431 # define LZO_OS_POSIX_UNKNOWN 1 432 # define LZO_INFO_OS_POSIX "unknown" 433 # endif 434 #endif 435 #endif 436 #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) 437 # if (UINT_MAX != LZO_0xffffL) 438 # error "this should not happen" 439 # endif 440 # if (ULONG_MAX != LZO_0xffffffffL) 441 # error "this should not happen" 442 # endif 443 #endif 444 #if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) 445 # if (UINT_MAX != LZO_0xffffffffL) 446 # error "this should not happen" 447 # endif 448 # if (ULONG_MAX != LZO_0xffffffffL) 449 # error "this should not happen" 450 # endif 451 #endif 452 #if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) 453 # define LZO_CC_CILLY 1 454 # define LZO_INFO_CC "Cilly" 455 # if defined(__CILLY__) 456 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) 457 # else 458 # define LZO_INFO_CCVER "unknown" 459 # endif 460 #elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) 461 # define LZO_CC_SDCC 1 462 # define LZO_INFO_CC "sdcc" 463 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) 464 #elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) 465 # define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) 466 # define LZO_INFO_CC "Pathscale C" 467 # define LZO_INFO_CCVER __PATHSCALE__ 468 #elif defined(__INTEL_COMPILER) 469 # define LZO_CC_INTELC 1 470 # define LZO_INFO_CC "Intel C" 471 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) 472 # if defined(_WIN32) || defined(_WIN64) 473 # define LZO_CC_SYNTAX_MSC 1 474 # else 475 # define LZO_CC_SYNTAX_GNUC 1 476 # endif 477 #elif defined(__POCC__) && defined(_WIN32) 478 # define LZO_CC_PELLESC 1 479 # define LZO_INFO_CC "Pelles C" 480 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) 481 #elif defined(__clang__) && defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) 482 # if defined(__GNUC_PATCHLEVEL__) 483 # define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) 484 # else 485 # define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) 486 # endif 487 # if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) 488 # define LZO_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__) 489 # else 490 # define LZO_CC_CLANG_CLANG 0x020700L 491 # endif 492 # define LZO_CC_CLANG LZO_CC_CLANG_GNUC 493 # define LZO_INFO_CC "clang" 494 # define LZO_INFO_CCVER __VERSION__ 495 #elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) 496 # if defined(__GNUC_PATCHLEVEL__) 497 # define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) 498 # else 499 # define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) 500 # endif 501 # define LZO_CC_LLVM LZO_CC_LLVM_GNUC 502 # define LZO_INFO_CC "llvm-gcc" 503 # define LZO_INFO_CCVER __VERSION__ 504 #elif defined(__GNUC__) && defined(__VERSION__) 505 # if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) 506 # define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) 507 # elif defined(__GNUC_MINOR__) 508 # define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) 509 # else 510 # define LZO_CC_GNUC (__GNUC__ * 0x10000L) 511 # endif 512 # define LZO_INFO_CC "gcc" 513 # define LZO_INFO_CCVER __VERSION__ 514 #elif defined(__ACK__) && defined(_ACK) 515 # define LZO_CC_ACK 1 516 # define LZO_INFO_CC "Amsterdam Compiler Kit C" 517 # define LZO_INFO_CCVER "unknown" 518 #elif defined(__AZTEC_C__) 519 # define LZO_CC_AZTECC 1 520 # define LZO_INFO_CC "Aztec C" 521 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) 522 #elif defined(__CODEGEARC__) 523 # define LZO_CC_CODEGEARC 1 524 # define LZO_INFO_CC "CodeGear C" 525 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) 526 #elif defined(__BORLANDC__) 527 # define LZO_CC_BORLANDC 1 528 # define LZO_INFO_CC "Borland C" 529 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) 530 #elif defined(_CRAYC) && defined(_RELEASE) 531 # define LZO_CC_CRAYC 1 532 # define LZO_INFO_CC "Cray C" 533 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) 534 #elif defined(__DMC__) && defined(__SC__) 535 # define LZO_CC_DMC 1 536 # define LZO_INFO_CC "Digital Mars C" 537 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) 538 #elif defined(__DECC) 539 # define LZO_CC_DECC 1 540 # define LZO_INFO_CC "DEC C" 541 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) 542 #elif defined(__HIGHC__) 543 # define LZO_CC_HIGHC 1 544 # define LZO_INFO_CC "MetaWare High C" 545 # define LZO_INFO_CCVER "unknown" 546 #elif defined(__IAR_SYSTEMS_ICC__) 547 # define LZO_CC_IARC 1 548 # define LZO_INFO_CC "IAR C" 549 # if defined(__VER__) 550 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) 551 # else 552 # define LZO_INFO_CCVER "unknown" 553 # endif 554 #elif defined(__IBMC__) 555 # define LZO_CC_IBMC 1 556 # define LZO_INFO_CC "IBM C" 557 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) 558 #elif defined(__KEIL__) && defined(__C166__) 559 # define LZO_CC_KEILC 1 560 # define LZO_INFO_CC "Keil C" 561 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) 562 #elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) 563 # define LZO_CC_LCCWIN32 1 564 # define LZO_INFO_CC "lcc-win32" 565 # define LZO_INFO_CCVER "unknown" 566 #elif defined(__LCC__) 567 # define LZO_CC_LCC 1 568 # define LZO_INFO_CC "lcc" 569 # if defined(__LCC_VERSION__) 570 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) 571 # else 572 # define LZO_INFO_CCVER "unknown" 573 # endif 574 #elif defined(_MSC_VER) 575 # define LZO_CC_MSC 1 576 # define LZO_INFO_CC "Microsoft C" 577 # if defined(_MSC_FULL_VER) 578 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) 579 # else 580 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) 581 # endif 582 #elif defined(__MWERKS__) 583 # define LZO_CC_MWERKS 1 584 # define LZO_INFO_CC "Metrowerks C" 585 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) 586 #elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) 587 # define LZO_CC_NDPC 1 588 # define LZO_INFO_CC "Microway NDP C" 589 # define LZO_INFO_CCVER "unknown" 590 #elif defined(__PACIFIC__) 591 # define LZO_CC_PACIFICC 1 592 # define LZO_INFO_CC "Pacific C" 593 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) 594 #elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) 595 # define LZO_CC_PGI 1 596 # define LZO_INFO_CC "Portland Group PGI C" 597 # define LZO_INFO_CCVER "unknown" 598 #elif defined(__PUREC__) && defined(__TOS__) 599 # define LZO_CC_PUREC 1 600 # define LZO_INFO_CC "Pure C" 601 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) 602 #elif defined(__SC__) && defined(__ZTC__) 603 # define LZO_CC_SYMANTECC 1 604 # define LZO_INFO_CC "Symantec C" 605 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) 606 #elif defined(__SUNPRO_C) 607 # define LZO_INFO_CC "SunPro C" 608 # if ((__SUNPRO_C)+0 > 0) 609 # define LZO_CC_SUNPROC __SUNPRO_C 610 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) 611 # else 612 # define LZO_CC_SUNPROC 1 613 # define LZO_INFO_CCVER "unknown" 614 # endif 615 #elif defined(__SUNPRO_CC) 616 # define LZO_INFO_CC "SunPro C" 617 # if ((__SUNPRO_CC)+0 > 0) 618 # define LZO_CC_SUNPROC __SUNPRO_CC 619 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) 620 # else 621 # define LZO_CC_SUNPROC 1 622 # define LZO_INFO_CCVER "unknown" 623 # endif 624 #elif defined(__TINYC__) 625 # define LZO_CC_TINYC 1 626 # define LZO_INFO_CC "Tiny C" 627 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) 628 #elif defined(__TSC__) 629 # define LZO_CC_TOPSPEEDC 1 630 # define LZO_INFO_CC "TopSpeed C" 631 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) 632 #elif defined(__WATCOMC__) 633 # define LZO_CC_WATCOMC 1 634 # define LZO_INFO_CC "Watcom C" 635 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) 636 #elif defined(__TURBOC__) 637 # define LZO_CC_TURBOC 1 638 # define LZO_INFO_CC "Turbo C" 639 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) 640 #elif defined(__ZTC__) 641 # define LZO_CC_ZORTECHC 1 642 # define LZO_INFO_CC "Zortech C" 643 # if (__ZTC__ == 0x310) 644 # define LZO_INFO_CCVER "0x310" 645 # else 646 # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) 647 # endif 648 #else 649 # define LZO_CC_UNKNOWN 1 650 # define LZO_INFO_CC "unknown" 651 # define LZO_INFO_CCVER "unknown" 652 #endif 653 #if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) 654 # error "LZO_CC_MSC: _MSC_FULL_VER is not defined" 655 #endif 656 #if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) 657 # if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) 658 # if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) 659 # define LZO_ARCH_CRAY_MPP 1 660 # elif defined(_CRAY1) 661 # define LZO_ARCH_CRAY_PVP 1 662 # endif 663 # endif 664 #endif 665 #if !defined(__LZO_ARCH_OVERRIDE) 666 #if (LZO_ARCH_GENERIC) 667 # define LZO_INFO_ARCH "generic" 668 #elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) 669 # define LZO_ARCH_I086 1 670 # define LZO_ARCH_IA16 1 671 # define LZO_INFO_ARCH "i086" 672 #elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) 673 # define LZO_ARCH_ALPHA 1 674 # define LZO_INFO_ARCH "alpha" 675 #elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) 676 # define LZO_ARCH_ALPHA 1 677 # define LZO_INFO_ARCH "alpha" 678 #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) 679 # define LZO_ARCH_AMD64 1 680 # define LZO_INFO_ARCH "amd64" 681 #elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) 682 # define LZO_ARCH_ARM 1 683 # define LZO_ARCH_ARM_THUMB 1 684 # define LZO_INFO_ARCH "arm_thumb" 685 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) 686 # define LZO_ARCH_ARM 1 687 # if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1) 688 # define LZO_ARCH_ARM_THUMB 1 689 # define LZO_INFO_ARCH "arm_thumb" 690 # elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2) 691 # define LZO_INFO_ARCH "arm" 692 # else 693 # define LZO_INFO_ARCH "arm" 694 # endif 695 #elif defined(__arm__) || defined(_M_ARM) 696 # define LZO_ARCH_ARM 1 697 # define LZO_INFO_ARCH "arm" 698 #elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) 699 # define LZO_ARCH_AVR 1 700 # define LZO_INFO_ARCH "avr" 701 #elif defined(__avr32__) || defined(__AVR32__) 702 # define LZO_ARCH_AVR32 1 703 # define LZO_INFO_ARCH "avr32" 704 #elif defined(__bfin__) 705 # define LZO_ARCH_BLACKFIN 1 706 # define LZO_INFO_ARCH "blackfin" 707 #elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) 708 # define LZO_ARCH_C166 1 709 # define LZO_INFO_ARCH "c166" 710 #elif defined(__cris__) 711 # define LZO_ARCH_CRIS 1 712 # define LZO_INFO_ARCH "cris" 713 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) 714 # define LZO_ARCH_EZ80 1 715 # define LZO_INFO_ARCH "ez80" 716 #elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) 717 # define LZO_ARCH_H8300 1 718 # define LZO_INFO_ARCH "h8300" 719 #elif defined(__hppa__) || defined(__hppa) 720 # define LZO_ARCH_HPPA 1 721 # define LZO_INFO_ARCH "hppa" 722 #elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) 723 # define LZO_ARCH_I386 1 724 # define LZO_ARCH_IA32 1 725 # define LZO_INFO_ARCH "i386" 726 #elif (LZO_CC_ZORTECHC && defined(__I86__)) 727 # define LZO_ARCH_I386 1 728 # define LZO_ARCH_IA32 1 729 # define LZO_INFO_ARCH "i386" 730 #elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) 731 # define LZO_ARCH_I386 1 732 # define LZO_ARCH_IA32 1 733 # define LZO_INFO_ARCH "i386" 734 #elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) 735 # define LZO_ARCH_IA64 1 736 # define LZO_INFO_ARCH "ia64" 737 #elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) 738 # define LZO_ARCH_M16C 1 739 # define LZO_INFO_ARCH "m16c" 740 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) 741 # define LZO_ARCH_M16C 1 742 # define LZO_INFO_ARCH "m16c" 743 #elif defined(__m32r__) 744 # define LZO_ARCH_M32R 1 745 # define LZO_INFO_ARCH "m32r" 746 #elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) 747 # define LZO_ARCH_M68K 1 748 # define LZO_INFO_ARCH "m68k" 749 #elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) 750 # define LZO_ARCH_MCS251 1 751 # define LZO_INFO_ARCH "mcs251" 752 #elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) 753 # define LZO_ARCH_MCS51 1 754 # define LZO_INFO_ARCH "mcs51" 755 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) 756 # define LZO_ARCH_MCS51 1 757 # define LZO_INFO_ARCH "mcs51" 758 #elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) 759 # define LZO_ARCH_MIPS 1 760 # define LZO_INFO_ARCH "mips" 761 #elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) 762 # define LZO_ARCH_MSP430 1 763 # define LZO_INFO_ARCH "msp430" 764 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) 765 # define LZO_ARCH_MSP430 1 766 # define LZO_INFO_ARCH "msp430" 767 #elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) 768 # define LZO_ARCH_POWERPC 1 769 # define LZO_INFO_ARCH "powerpc" 770 #elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) 771 # define LZO_ARCH_S390 1 772 # define LZO_INFO_ARCH "s390" 773 #elif defined(__sh__) || defined(_M_SH) 774 # define LZO_ARCH_SH 1 775 # define LZO_INFO_ARCH "sh" 776 #elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) 777 # define LZO_ARCH_SPARC 1 778 # define LZO_INFO_ARCH "sparc" 779 #elif defined(__SPU__) 780 # define LZO_ARCH_SPU 1 781 # define LZO_INFO_ARCH "spu" 782 #elif (UINT_MAX == LZO_0xffffL) && defined(__z80) 783 # define LZO_ARCH_Z80 1 784 # define LZO_INFO_ARCH "z80" 785 #elif (LZO_ARCH_CRAY_PVP) 786 # if defined(_CRAYSV1) 787 # define LZO_ARCH_CRAY_SV1 1 788 # define LZO_INFO_ARCH "cray_sv1" 789 # elif (_ADDR64) 790 # define LZO_ARCH_CRAY_T90 1 791 # define LZO_INFO_ARCH "cray_t90" 792 # elif (_ADDR32) 793 # define LZO_ARCH_CRAY_YMP 1 794 # define LZO_INFO_ARCH "cray_ymp" 795 # else 796 # define LZO_ARCH_CRAY_XMP 1 797 # define LZO_INFO_ARCH "cray_xmp" 798 # endif 799 #else 800 # define LZO_ARCH_UNKNOWN 1 801 # define LZO_INFO_ARCH "unknown" 802 #endif 803 #endif 804 #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) 805 # error "FIXME - missing define for CPU architecture" 806 #endif 807 #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) 808 # error "FIXME - missing WIN32 define for CPU architecture" 809 #endif 810 #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) 811 # error "FIXME - missing WIN64 define for CPU architecture" 812 #endif 813 #if (LZO_OS_OS216 || LZO_OS_WIN16) 814 # define LZO_ARCH_I086PM 1 815 # define LZO_ARCH_IA16PM 1 816 #elif 1 && (LZO_OS_DOS16 && defined(BLX286)) 817 # define LZO_ARCH_I086PM 1 818 # define LZO_ARCH_IA16PM 1 819 #elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) 820 # define LZO_ARCH_I086PM 1 821 # define LZO_ARCH_IA16PM 1 822 #elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) 823 # define LZO_ARCH_I086PM 1 824 # define LZO_ARCH_IA16PM 1 825 #endif 826 #if (LZO_ARCH_ARM_THUMB) && !(LZO_ARCH_ARM) 827 # error "this should not happen" 828 #endif 829 #if (LZO_ARCH_I086PM) && !(LZO_ARCH_I086) 830 # error "this should not happen" 831 #endif 832 #if (LZO_ARCH_I086) 833 # if (UINT_MAX != LZO_0xffffL) 834 # error "this should not happen" 835 # endif 836 # if (ULONG_MAX != LZO_0xffffffffL) 837 # error "this should not happen" 838 # endif 839 #endif 840 #if (LZO_ARCH_I386) 841 # if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) 842 # error "this should not happen" 843 # endif 844 # if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) 845 # error "this should not happen" 846 # endif 847 # if (ULONG_MAX != LZO_0xffffffffL) 848 # error "this should not happen" 849 # endif 850 #endif 851 #if !defined(__LZO_MM_OVERRIDE) 852 #if (LZO_ARCH_I086) 853 #if (UINT_MAX != LZO_0xffffL) 854 # error "this should not happen" 855 #endif 856 #if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) 857 # define LZO_MM_TINY 1 858 #elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) 859 # define LZO_MM_HUGE 1 860 #elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) 861 # define LZO_MM_SMALL 1 862 #elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) 863 # define LZO_MM_MEDIUM 1 864 #elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) 865 # define LZO_MM_COMPACT 1 866 #elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) 867 # define LZO_MM_LARGE 1 868 #elif (LZO_CC_AZTECC) 869 # if defined(_LARGE_CODE) && defined(_LARGE_DATA) 870 # define LZO_MM_LARGE 1 871 # elif defined(_LARGE_CODE) 872 # define LZO_MM_MEDIUM 1 873 # elif defined(_LARGE_DATA) 874 # define LZO_MM_COMPACT 1 875 # else 876 # define LZO_MM_SMALL 1 877 # endif 878 #elif (LZO_CC_ZORTECHC && defined(__VCM__)) 879 # define LZO_MM_LARGE 1 880 #else 881 # error "unknown memory model" 882 #endif 883 #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) 884 #define LZO_HAVE_MM_HUGE_PTR 1 885 #define LZO_HAVE_MM_HUGE_ARRAY 1 886 #if (LZO_MM_TINY) 887 # undef LZO_HAVE_MM_HUGE_ARRAY 888 #endif 889 #if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) 890 # undef LZO_HAVE_MM_HUGE_PTR 891 # undef LZO_HAVE_MM_HUGE_ARRAY 892 #elif (LZO_CC_DMC || LZO_CC_SYMANTECC) 893 # undef LZO_HAVE_MM_HUGE_ARRAY 894 #elif (LZO_CC_MSC && defined(_QC)) 895 # undef LZO_HAVE_MM_HUGE_ARRAY 896 # if (_MSC_VER < 600) 897 # undef LZO_HAVE_MM_HUGE_PTR 898 # endif 899 #elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) 900 # undef LZO_HAVE_MM_HUGE_ARRAY 901 #endif 902 #if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR) 903 # if (LZO_OS_DOS16) 904 # error "this should not happen" 905 # elif (LZO_CC_ZORTECHC) 906 # else 907 # error "this should not happen" 908 # endif 909 #endif 910 #ifdef __cplusplus 911 extern "C" { 912 #endif 913 #if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) 914 extern void __near __cdecl _AHSHIFT(void); 915 # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) 916 #elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) 917 extern void __near __cdecl _AHSHIFT(void); 918 # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) 919 #elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) 920 extern void __near __cdecl _AHSHIFT(void); 921 # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) 922 #elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) 923 extern void __near __cdecl _AHSHIFT(void); 924 # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) 925 #elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) 926 # define LZO_MM_AHSHIFT 12 927 #elif (LZO_CC_WATCOMC) 928 extern unsigned char _HShift; 929 # define LZO_MM_AHSHIFT ((unsigned) _HShift) 930 #else 931 # error "FIXME - implement LZO_MM_AHSHIFT" 932 #endif 933 #ifdef __cplusplus 934 } 935 #endif 936 #endif 937 #elif (LZO_ARCH_C166) 938 #if !defined(__MODEL__) 939 # error "FIXME - C166 __MODEL__" 940 #elif ((__MODEL__) == 0) 941 # define LZO_MM_SMALL 1 942 #elif ((__MODEL__) == 1) 943 # define LZO_MM_SMALL 1 944 #elif ((__MODEL__) == 2) 945 # define LZO_MM_LARGE 1 946 #elif ((__MODEL__) == 3) 947 # define LZO_MM_TINY 1 948 #elif ((__MODEL__) == 4) 949 # define LZO_MM_XTINY 1 950 #elif ((__MODEL__) == 5) 951 # define LZO_MM_XSMALL 1 952 #else 953 # error "FIXME - C166 __MODEL__" 954 #endif 955 #elif (LZO_ARCH_MCS251) 956 #if !defined(__MODEL__) 957 # error "FIXME - MCS251 __MODEL__" 958 #elif ((__MODEL__) == 0) 959 # define LZO_MM_SMALL 1 960 #elif ((__MODEL__) == 2) 961 # define LZO_MM_LARGE 1 962 #elif ((__MODEL__) == 3) 963 # define LZO_MM_TINY 1 964 #elif ((__MODEL__) == 4) 965 # define LZO_MM_XTINY 1 966 #elif ((__MODEL__) == 5) 967 # define LZO_MM_XSMALL 1 968 #else 969 # error "FIXME - MCS251 __MODEL__" 970 #endif 971 #elif (LZO_ARCH_MCS51) 972 #if !defined(__MODEL__) 973 # error "FIXME - MCS51 __MODEL__" 974 #elif ((__MODEL__) == 1) 975 # define LZO_MM_SMALL 1 976 #elif ((__MODEL__) == 2) 977 # define LZO_MM_LARGE 1 978 #elif ((__MODEL__) == 3) 979 # define LZO_MM_TINY 1 980 #elif ((__MODEL__) == 4) 981 # define LZO_MM_XTINY 1 982 #elif ((__MODEL__) == 5) 983 # define LZO_MM_XSMALL 1 984 #else 985 # error "FIXME - MCS51 __MODEL__" 986 #endif 987 #elif (LZO_ARCH_CRAY_PVP) 988 # define LZO_MM_PVP 1 989 #else 990 # define LZO_MM_FLAT 1 991 #endif 992 #if (LZO_MM_COMPACT) 993 # define LZO_INFO_MM "compact" 994 #elif (LZO_MM_FLAT) 995 # define LZO_INFO_MM "flat" 996 #elif (LZO_MM_HUGE) 997 # define LZO_INFO_MM "huge" 998 #elif (LZO_MM_LARGE) 999 # define LZO_INFO_MM "large" 1000 #elif (LZO_MM_MEDIUM) 1001 # define LZO_INFO_MM "medium" 1002 #elif (LZO_MM_PVP) 1003 # define LZO_INFO_MM "pvp" 1004 #elif (LZO_MM_SMALL) 1005 # define LZO_INFO_MM "small" 1006 #elif (LZO_MM_TINY) 1007 # define LZO_INFO_MM "tiny" 1008 #else 1009 # error "unknown memory model" 1010 #endif 1011 #endif 1012 #if defined(SIZEOF_SHORT) 1013 # define LZO_SIZEOF_SHORT (SIZEOF_SHORT) 1014 #endif 1015 #if defined(SIZEOF_INT) 1016 # define LZO_SIZEOF_INT (SIZEOF_INT) 1017 #endif 1018 #if defined(SIZEOF_LONG) 1019 # define LZO_SIZEOF_LONG (SIZEOF_LONG) 1020 #endif 1021 #if defined(SIZEOF_LONG_LONG) 1022 # define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) 1023 #endif 1024 #if defined(SIZEOF___INT16) 1025 # define LZO_SIZEOF___INT16 (SIZEOF___INT16) 1026 #endif 1027 #if defined(SIZEOF___INT32) 1028 # define LZO_SIZEOF___INT32 (SIZEOF___INT32) 1029 #endif 1030 #if defined(SIZEOF___INT64) 1031 # define LZO_SIZEOF___INT64 (SIZEOF___INT64) 1032 #endif 1033 #if defined(SIZEOF_VOID_P) 1034 # define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) 1035 #endif 1036 #if defined(SIZEOF_SIZE_T) 1037 # define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) 1038 #endif 1039 #if defined(SIZEOF_PTRDIFF_T) 1040 # define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) 1041 #endif 1042 #define __LZO_LSR(x,b) (((x)+0ul) >> (b)) 1043 #if !defined(LZO_SIZEOF_SHORT) 1044 # if (LZO_ARCH_CRAY_PVP) 1045 # define LZO_SIZEOF_SHORT 8 1046 # elif (USHRT_MAX == LZO_0xffffL) 1047 # define LZO_SIZEOF_SHORT 2 1048 # elif (__LZO_LSR(USHRT_MAX,7) == 1) 1049 # define LZO_SIZEOF_SHORT 1 1050 # elif (__LZO_LSR(USHRT_MAX,15) == 1) 1051 # define LZO_SIZEOF_SHORT 2 1052 # elif (__LZO_LSR(USHRT_MAX,31) == 1) 1053 # define LZO_SIZEOF_SHORT 4 1054 # elif (__LZO_LSR(USHRT_MAX,63) == 1) 1055 # define LZO_SIZEOF_SHORT 8 1056 # elif (__LZO_LSR(USHRT_MAX,127) == 1) 1057 # define LZO_SIZEOF_SHORT 16 1058 # else 1059 # error "LZO_SIZEOF_SHORT" 1060 # endif 1061 #endif 1062 #if !defined(LZO_SIZEOF_INT) 1063 # if (LZO_ARCH_CRAY_PVP) 1064 # define LZO_SIZEOF_INT 8 1065 # elif (UINT_MAX == LZO_0xffffL) 1066 # define LZO_SIZEOF_INT 2 1067 # elif (UINT_MAX == LZO_0xffffffffL) 1068 # define LZO_SIZEOF_INT 4 1069 # elif (__LZO_LSR(UINT_MAX,7) == 1) 1070 # define LZO_SIZEOF_INT 1 1071 # elif (__LZO_LSR(UINT_MAX,15) == 1) 1072 # define LZO_SIZEOF_INT 2 1073 # elif (__LZO_LSR(UINT_MAX,31) == 1) 1074 # define LZO_SIZEOF_INT 4 1075 # elif (__LZO_LSR(UINT_MAX,63) == 1) 1076 # define LZO_SIZEOF_INT 8 1077 # elif (__LZO_LSR(UINT_MAX,127) == 1) 1078 # define LZO_SIZEOF_INT 16 1079 # else 1080 # error "LZO_SIZEOF_INT" 1081 # endif 1082 #endif 1083 #if !defined(LZO_SIZEOF_LONG) 1084 # if (ULONG_MAX == LZO_0xffffffffL) 1085 # define LZO_SIZEOF_LONG 4 1086 # elif (__LZO_LSR(ULONG_MAX,7) == 1) 1087 # define LZO_SIZEOF_LONG 1 1088 # elif (__LZO_LSR(ULONG_MAX,15) == 1) 1089 # define LZO_SIZEOF_LONG 2 1090 # elif (__LZO_LSR(ULONG_MAX,31) == 1) 1091 # define LZO_SIZEOF_LONG 4 1092 # elif (__LZO_LSR(ULONG_MAX,63) == 1) 1093 # define LZO_SIZEOF_LONG 8 1094 # elif (__LZO_LSR(ULONG_MAX,127) == 1) 1095 # define LZO_SIZEOF_LONG 16 1096 # else 1097 # error "LZO_SIZEOF_LONG" 1098 # endif 1099 #endif 1100 #if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) 1101 #if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) 1102 # if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) 1103 # if (LZO_CC_GNUC >= 0x030300ul) 1104 # if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) 1105 # define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG 1106 # elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) 1107 # define LZO_SIZEOF_LONG_LONG 4 1108 # endif 1109 # endif 1110 # endif 1111 #endif 1112 #endif 1113 #if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) 1114 #if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) 1115 #if (LZO_ARCH_I086 && LZO_CC_DMC) 1116 #elif (LZO_CC_CILLY) && defined(__GNUC__) 1117 # define LZO_SIZEOF_LONG_LONG 8 1118 #elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1119 # define LZO_SIZEOF_LONG_LONG 8 1120 #elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) 1121 # define LZO_SIZEOF_LONG_LONG 8 1122 #elif (LZO_OS_WIN64 || defined(_WIN64)) 1123 # define LZO_SIZEOF___INT64 8 1124 #elif (LZO_ARCH_I386 && (LZO_CC_DMC)) 1125 # define LZO_SIZEOF_LONG_LONG 8 1126 #elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) 1127 # define LZO_SIZEOF_LONG_LONG 8 1128 #elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) 1129 # define LZO_SIZEOF_LONG_LONG 8 1130 #elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) 1131 # define LZO_SIZEOF_LONG_LONG 8 1132 #elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) 1133 # define LZO_SIZEOF___INT64 8 1134 #elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) 1135 # define LZO_SIZEOF___INT64 8 1136 #elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) 1137 # define LZO_SIZEOF___INT64 8 1138 #elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) 1139 # define LZO_SIZEOF___INT64 8 1140 #elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) 1141 # define LZO_SIZEOF___INT64 8 1142 #elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) 1143 # define LZO_SIZEOF_LONG_LONG 8 1144 #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) 1145 # define LZO_SIZEOF_LONG_LONG 8 1146 #elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) 1147 #elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) 1148 # define LZO_SIZEOF_LONG_LONG 8 1149 #endif 1150 #endif 1151 #endif 1152 #if defined(__cplusplus) && (LZO_CC_GNUC) 1153 # if (LZO_CC_GNUC < 0x020800ul) 1154 # undef LZO_SIZEOF_LONG_LONG 1155 # endif 1156 #endif 1157 #if (LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) 1158 # undef LZO_SIZEOF_LONG_LONG 1159 #endif 1160 #if !defined(LZO_SIZEOF_VOID_P) 1161 #if (LZO_ARCH_I086) 1162 # define __LZO_WORDSIZE 2 1163 # if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) 1164 # define LZO_SIZEOF_VOID_P 2 1165 # elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) 1166 # define LZO_SIZEOF_VOID_P 4 1167 # else 1168 # error "LZO_MM" 1169 # endif 1170 #elif (LZO_ARCH_AVR || LZO_ARCH_Z80) 1171 # define __LZO_WORDSIZE 1 1172 # define LZO_SIZEOF_VOID_P 2 1173 #elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) 1174 # define LZO_SIZEOF_VOID_P 2 1175 #elif (LZO_ARCH_H8300) 1176 # if defined(__NORMAL_MODE__) 1177 # define __LZO_WORDSIZE 4 1178 # define LZO_SIZEOF_VOID_P 2 1179 # elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) 1180 # define __LZO_WORDSIZE 4 1181 # define LZO_SIZEOF_VOID_P 4 1182 # else 1183 # define __LZO_WORDSIZE 2 1184 # define LZO_SIZEOF_VOID_P 2 1185 # endif 1186 # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) 1187 # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT 1188 # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT 1189 # endif 1190 #elif (LZO_ARCH_M16C) 1191 # define __LZO_WORDSIZE 2 1192 # if defined(__m32c_cpu__) || defined(__m32cm_cpu__) 1193 # define LZO_SIZEOF_VOID_P 4 1194 # else 1195 # define LZO_SIZEOF_VOID_P 2 1196 # endif 1197 #elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) 1198 # define __LZO_WORDSIZE 8 1199 # define LZO_SIZEOF_VOID_P 4 1200 #elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) 1201 # define __LZO_WORDSIZE 8 1202 # define LZO_SIZEOF_VOID_P 8 1203 #elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) 1204 # define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG 1205 # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG 1206 # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG 1207 #elif (LZO_OS_OS400 || defined(__OS400__)) 1208 # define __LZO_WORDSIZE LZO_SIZEOF_LONG 1209 # define LZO_SIZEOF_VOID_P 16 1210 # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG 1211 # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG 1212 #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) 1213 # define LZO_SIZEOF_VOID_P 8 1214 # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG 1215 # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG 1216 #elif (LZO_ARCH_SPU) 1217 # if 0 1218 # define __LZO_WORDSIZE 16 1219 # endif 1220 # define LZO_SIZEOF_VOID_P 4 1221 #else 1222 # define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG 1223 #endif 1224 #endif 1225 #if !defined(LZO_WORDSIZE) 1226 # if defined(__LZO_WORDSIZE) 1227 # define LZO_WORDSIZE __LZO_WORDSIZE 1228 # else 1229 # define LZO_WORDSIZE LZO_SIZEOF_VOID_P 1230 # endif 1231 #endif 1232 #if !defined(LZO_SIZEOF_SIZE_T) 1233 #if (LZO_ARCH_I086 || LZO_ARCH_M16C) 1234 # define LZO_SIZEOF_SIZE_T 2 1235 #else 1236 # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P 1237 #endif 1238 #endif 1239 #if !defined(LZO_SIZEOF_PTRDIFF_T) 1240 #if (LZO_ARCH_I086) 1241 # if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) 1242 # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P 1243 # elif (LZO_MM_COMPACT || LZO_MM_LARGE) 1244 # if (LZO_CC_BORLANDC || LZO_CC_TURBOC) 1245 # define LZO_SIZEOF_PTRDIFF_T 4 1246 # else 1247 # define LZO_SIZEOF_PTRDIFF_T 2 1248 # endif 1249 # else 1250 # error "LZO_MM" 1251 # endif 1252 #else 1253 # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T 1254 #endif 1255 #endif 1256 #if (LZO_ABI_NEUTRAL_ENDIAN) 1257 # undef LZO_ABI_BIG_ENDIAN 1258 # undef LZO_ABI_LITTLE_ENDIAN 1259 #elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN) 1260 #if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) 1261 # define LZO_ABI_BIG_ENDIAN 1 1262 #elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64) 1263 # define LZO_ABI_LITTLE_ENDIAN 1 1264 #elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) 1265 # define LZO_ABI_LITTLE_ENDIAN 1 1266 #elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390) 1267 # define LZO_ABI_BIG_ENDIAN 1 1268 #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) 1269 # if (__LITTLE_ENDIAN__ == 1) 1270 # define LZO_ABI_LITTLE_ENDIAN 1 1271 # else 1272 # define LZO_ABI_BIG_ENDIAN 1 1273 # endif 1274 #elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) 1275 # define LZO_ABI_BIG_ENDIAN 1 1276 #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) 1277 # define LZO_ABI_LITTLE_ENDIAN 1 1278 #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) 1279 # define LZO_ABI_BIG_ENDIAN 1 1280 #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) 1281 # define LZO_ABI_LITTLE_ENDIAN 1 1282 #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) 1283 # define LZO_ABI_BIG_ENDIAN 1 1284 #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) 1285 # define LZO_ABI_LITTLE_ENDIAN 1 1286 #endif 1287 #endif 1288 #if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN) 1289 # error "this should not happen" 1290 #endif 1291 #if (LZO_ABI_BIG_ENDIAN) 1292 # define LZO_INFO_ABI_ENDIAN "be" 1293 #elif (LZO_ABI_LITTLE_ENDIAN) 1294 # define LZO_INFO_ABI_ENDIAN "le" 1295 #elif (LZO_ABI_NEUTRAL_ENDIAN) 1296 # define LZO_INFO_ABI_ENDIAN "neutral" 1297 #endif 1298 #if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) 1299 # define LZO_ABI_I8LP16 1 1300 # define LZO_INFO_ABI_PM "i8lp16" 1301 #elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) 1302 # define LZO_ABI_ILP16 1 1303 # define LZO_INFO_ABI_PM "ilp16" 1304 #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) 1305 # define LZO_ABI_ILP32 1 1306 # define LZO_INFO_ABI_PM "ilp32" 1307 #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) 1308 # define LZO_ABI_LLP64 1 1309 # define LZO_INFO_ABI_PM "llp64" 1310 #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) 1311 # define LZO_ABI_LP64 1 1312 # define LZO_INFO_ABI_PM "lp64" 1313 #elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) 1314 # define LZO_ABI_ILP64 1 1315 # define LZO_INFO_ABI_PM "ilp64" 1316 #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) 1317 # define LZO_ABI_IP32L64 1 1318 # define LZO_INFO_ABI_PM "ip32l64" 1319 #endif 1320 #if !defined(__LZO_LIBC_OVERRIDE) 1321 #if (LZO_LIBC_NAKED) 1322 # define LZO_INFO_LIBC "naked" 1323 #elif (LZO_LIBC_FREESTANDING) 1324 # define LZO_INFO_LIBC "freestanding" 1325 #elif (LZO_LIBC_MOSTLY_FREESTANDING) 1326 # define LZO_INFO_LIBC "mfreestanding" 1327 #elif (LZO_LIBC_ISOC90) 1328 # define LZO_INFO_LIBC "isoc90" 1329 #elif (LZO_LIBC_ISOC99) 1330 # define LZO_INFO_LIBC "isoc99" 1331 #elif defined(__dietlibc__) 1332 # define LZO_LIBC_DIETLIBC 1 1333 # define LZO_INFO_LIBC "dietlibc" 1334 #elif defined(_NEWLIB_VERSION) 1335 # define LZO_LIBC_NEWLIB 1 1336 # define LZO_INFO_LIBC "newlib" 1337 #elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) 1338 # if defined(__UCLIBC_SUBLEVEL__) 1339 # define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) 1340 # else 1341 # define LZO_LIBC_UCLIBC 0x00090bL 1342 # endif 1343 # define LZO_INFO_LIBC "uclibc" 1344 #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) 1345 # define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) 1346 # define LZO_INFO_LIBC "glibc" 1347 #elif (LZO_CC_MWERKS) && defined(__MSL__) 1348 # define LZO_LIBC_MSL __MSL__ 1349 # define LZO_INFO_LIBC "msl" 1350 #elif 1 && defined(__IAR_SYSTEMS_ICC__) 1351 # define LZO_LIBC_ISOC90 1 1352 # define LZO_INFO_LIBC "isoc90" 1353 #else 1354 # define LZO_LIBC_DEFAULT 1 1355 # define LZO_INFO_LIBC "default" 1356 #endif 1357 #endif 1358 #if !defined(__lzo_gnuc_extension__) 1359 #if (LZO_CC_GNUC >= 0x020800ul) 1360 # define __lzo_gnuc_extension__ __extension__ 1361 #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1362 # define __lzo_gnuc_extension__ __extension__ 1363 #else 1364 # define __lzo_gnuc_extension__ /*empty*/ 1365 #endif 1366 #endif 1367 #if !defined(__lzo_ua_volatile) 1368 # define __lzo_ua_volatile volatile 1369 #endif 1370 #if !defined(__lzo_alignof) 1371 #if (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) 1372 # define __lzo_alignof(e) __alignof__(e) 1373 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) 1374 # define __lzo_alignof(e) __alignof__(e) 1375 #elif (LZO_CC_MSC && (_MSC_VER >= 1300)) 1376 # define __lzo_alignof(e) __alignof(e) 1377 #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) 1378 # define __lzo_alignof(e) __alignof__(e) 1379 #endif 1380 #endif 1381 #if defined(__lzo_alignof) 1382 # define __lzo_HAVE_alignof 1 1383 #endif 1384 #if !defined(__lzo_constructor) 1385 #if (LZO_CC_GNUC >= 0x030400ul) 1386 # define __lzo_constructor __attribute__((__constructor__,__used__)) 1387 #elif (LZO_CC_GNUC >= 0x020700ul) 1388 # define __lzo_constructor __attribute__((__constructor__)) 1389 #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1390 # define __lzo_constructor __attribute__((__constructor__)) 1391 #endif 1392 #endif 1393 #if defined(__lzo_constructor) 1394 # define __lzo_HAVE_constructor 1 1395 #endif 1396 #if !defined(__lzo_destructor) 1397 #if (LZO_CC_GNUC >= 0x030400ul) 1398 # define __lzo_destructor __attribute__((__destructor__,__used__)) 1399 #elif (LZO_CC_GNUC >= 0x020700ul) 1400 # define __lzo_destructor __attribute__((__destructor__)) 1401 #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1402 # define __lzo_destructor __attribute__((__destructor__)) 1403 #endif 1404 #endif 1405 #if defined(__lzo_destructor) 1406 # define __lzo_HAVE_destructor 1 1407 #endif 1408 #if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor) 1409 # error "this should not happen" 1410 #endif 1411 #if !defined(__lzo_inline) 1412 #if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) 1413 #elif defined(__cplusplus) 1414 # define __lzo_inline inline 1415 #elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) 1416 # define __lzo_inline __inline 1417 #elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) 1418 # define __lzo_inline __inline__ 1419 #elif (LZO_CC_DMC) 1420 # define __lzo_inline __inline 1421 #elif (LZO_CC_INTELC) 1422 # define __lzo_inline __inline 1423 #elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) 1424 # define __lzo_inline __inline 1425 #elif (LZO_CC_MSC && (_MSC_VER >= 900)) 1426 # define __lzo_inline __inline 1427 #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) 1428 # define __lzo_inline __inline__ 1429 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) 1430 # define __lzo_inline inline 1431 #endif 1432 #endif 1433 #if defined(__lzo_inline) 1434 # define __lzo_HAVE_inline 1 1435 #else 1436 # define __lzo_inline /*empty*/ 1437 #endif 1438 #if !defined(__lzo_forceinline) 1439 #if (LZO_CC_GNUC >= 0x030200ul) 1440 # define __lzo_forceinline __inline__ __attribute__((__always_inline__)) 1441 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) 1442 # define __lzo_forceinline __forceinline 1443 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) 1444 # define __lzo_forceinline __inline__ __attribute__((__always_inline__)) 1445 #elif (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_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) 1450 # define __lzo_forceinline __inline__ __attribute__((__always_inline__)) 1451 #endif 1452 #endif 1453 #if defined(__lzo_forceinline) 1454 # define __lzo_HAVE_forceinline 1 1455 #else 1456 # define __lzo_forceinline /*empty*/ 1457 #endif 1458 #if !defined(__lzo_noinline) 1459 #if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) 1460 # define __lzo_noinline __attribute__((__noinline__,__used__)) 1461 #elif (LZO_CC_GNUC >= 0x030200ul) 1462 # define __lzo_noinline __attribute__((__noinline__)) 1463 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC) 1464 # define __lzo_noinline __declspec(noinline) 1465 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) 1466 # define __lzo_noinline __attribute__((__noinline__)) 1467 #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1468 # define __lzo_noinline __attribute__((__noinline__)) 1469 #elif (LZO_CC_MSC && (_MSC_VER >= 1300)) 1470 # define __lzo_noinline __declspec(noinline) 1471 #elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) 1472 # if defined(__cplusplus) 1473 # else 1474 # define __lzo_noinline __declspec(noinline) 1475 # endif 1476 #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) 1477 # define __lzo_noinline __attribute__((__noinline__)) 1478 #endif 1479 #endif 1480 #if defined(__lzo_noinline) 1481 # define __lzo_HAVE_noinline 1 1482 #else 1483 # define __lzo_noinline /*empty*/ 1484 #endif 1485 #if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline) 1486 # error "this should not happen" 1487 #endif 1488 #if !defined(__lzo_noreturn) 1489 #if (LZO_CC_GNUC >= 0x020700ul) 1490 # define __lzo_noreturn __attribute__((__noreturn__)) 1491 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) 1492 # define __lzo_noreturn __declspec(noreturn) 1493 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) 1494 # define __lzo_noreturn __attribute__((__noreturn__)) 1495 #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1496 # define __lzo_noreturn __attribute__((__noreturn__)) 1497 #elif (LZO_CC_MSC && (_MSC_VER >= 1200)) 1498 # define __lzo_noreturn __declspec(noreturn) 1499 #endif 1500 #endif 1501 #if defined(__lzo_noreturn) 1502 # define __lzo_HAVE_noreturn 1 1503 #else 1504 # define __lzo_noreturn /*empty*/ 1505 #endif 1506 #if !defined(__lzo_nothrow) 1507 #if (LZO_CC_GNUC >= 0x030300ul) 1508 # define __lzo_nothrow __attribute__((__nothrow__)) 1509 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus) 1510 # define __lzo_nothrow __declspec(nothrow) 1511 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 900) && LZO_CC_SYNTAX_GNUC) 1512 # define __lzo_nothrow __attribute__((__nothrow__)) 1513 #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1514 # define __lzo_nothrow __attribute__((__nothrow__)) 1515 #elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) 1516 # define __lzo_nothrow __declspec(nothrow) 1517 #endif 1518 #endif 1519 #if defined(__lzo_nothrow) 1520 # define __lzo_HAVE_nothrow 1 1521 #else 1522 # define __lzo_nothrow /*empty*/ 1523 #endif 1524 #if !defined(__lzo_restrict) 1525 #if (LZO_CC_GNUC >= 0x030400ul) 1526 # define __lzo_restrict __restrict__ 1527 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) 1528 # define __lzo_restrict __restrict__ 1529 #elif (LZO_CC_CLANG || LZO_CC_LLVM) 1530 # define __lzo_restrict __restrict__ 1531 #elif (LZO_CC_MSC && (_MSC_VER >= 1400)) 1532 # define __lzo_restrict __restrict 1533 #endif 1534 #endif 1535 #if defined(__lzo_restrict) 1536 # define __lzo_HAVE_restrict 1 1537 #else 1538 # define __lzo_restrict /*empty*/ 1539 #endif 1540 #if !defined(__lzo_likely) && !defined(__lzo_unlikely) 1541 #if (LZO_CC_GNUC >= 0x030200ul) 1542 # define __lzo_likely(e) (__builtin_expect(!!(e),1)) 1543 # define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) 1544 #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) 1545 # define __lzo_likely(e) (__builtin_expect(!!(e),1)) 1546 # define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) 1547 #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1548 # define __lzo_likely(e) (__builtin_expect(!!(e),1)) 1549 # define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) 1550 #endif 1551 #endif 1552 #if defined(__lzo_likely) 1553 # define __lzo_HAVE_likely 1 1554 #else 1555 # define __lzo_likely(e) (e) 1556 #endif 1557 #if defined(__lzo_unlikely) 1558 # define __lzo_HAVE_unlikely 1 1559 #else 1560 # define __lzo_unlikely(e) (e) 1561 #endif 1562 #if !defined(LZO_UNUSED) 1563 # if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) 1564 # define LZO_UNUSED(var) ((void) &var) 1565 # elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) 1566 # define LZO_UNUSED(var) if (&var) ; else 1567 # elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1568 # define LZO_UNUSED(var) ((void) var) 1569 # elif (LZO_CC_MSC && (_MSC_VER < 900)) 1570 # define LZO_UNUSED(var) if (&var) ; else 1571 # elif (LZO_CC_KEILC) 1572 # define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} 1573 # elif (LZO_CC_PACIFICC) 1574 # define LZO_UNUSED(var) ((void) sizeof(var)) 1575 # elif (LZO_CC_WATCOMC) && defined(__cplusplus) 1576 # define LZO_UNUSED(var) ((void) var) 1577 # else 1578 # define LZO_UNUSED(var) ((void) &var) 1579 # endif 1580 #endif 1581 #if !defined(LZO_UNUSED_FUNC) 1582 # if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) 1583 # define LZO_UNUSED_FUNC(func) ((void) func) 1584 # elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) 1585 # define LZO_UNUSED_FUNC(func) if (func) ; else 1586 # elif (LZO_CC_CLANG || LZO_CC_LLVM) 1587 # define LZO_UNUSED_FUNC(func) ((void) &func) 1588 # elif (LZO_CC_MSC && (_MSC_VER < 900)) 1589 # define LZO_UNUSED_FUNC(func) if (func) ; else 1590 # elif (LZO_CC_MSC) 1591 # define LZO_UNUSED_FUNC(func) ((void) &func) 1592 # elif (LZO_CC_KEILC || LZO_CC_PELLESC) 1593 # define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} 1594 # else 1595 # define LZO_UNUSED_FUNC(func) ((void) func) 1596 # endif 1597 #endif 1598 #if !defined(LZO_UNUSED_LABEL) 1599 # if (LZO_CC_WATCOMC) && defined(__cplusplus) 1600 # define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l 1601 # elif (LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC) 1602 # define LZO_UNUSED_LABEL(l) if (0) goto l 1603 # else 1604 # define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l 1605 # endif 1606 #endif 1607 #if !defined(LZO_DEFINE_UNINITIALIZED_VAR) 1608 # if 0 1609 # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var 1610 # elif 0 && (LZO_CC_GNUC) 1611 # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var 1612 # else 1613 # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init 1614 # endif 1615 #endif 1616 #if !defined(LZO_UNCONST_CAST) 1617 # if 0 && defined(__cplusplus) 1618 # define LZO_UNCONST_CAST(t,e) (const_cast<t> (e)) 1619 # elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) 1620 # define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((lzo_uintptr_t) ((const void *) (e)))))) 1621 # else 1622 # define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((const void *) (e))))) 1623 # endif 1624 #endif 1625 #if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) 1626 # if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) 1627 # define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; 1628 # elif (LZO_CC_DMC || LZO_CC_SYMANTECC) 1629 # define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; 1630 # elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) 1631 # define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; 1632 # else 1633 # define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; 1634 # endif 1635 #endif 1636 #if !defined(LZO_COMPILE_TIME_ASSERT) 1637 # if (LZO_CC_AZTECC) 1638 # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} 1639 # elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) 1640 # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; 1641 # elif (LZO_CC_MSC && (_MSC_VER < 900)) 1642 # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; 1643 # elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) 1644 # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; 1645 # else 1646 # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} 1647 # endif 1648 #endif 1649 #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) 1650 # if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) 1651 # elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) 1652 # define __lzo_cdecl __cdecl 1653 # define __lzo_cdecl_atexit /*empty*/ 1654 # define __lzo_cdecl_main __cdecl 1655 # if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) 1656 # define __lzo_cdecl_qsort __pascal 1657 # elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) 1658 # define __lzo_cdecl_qsort _stdcall 1659 # else 1660 # define __lzo_cdecl_qsort __cdecl 1661 # endif 1662 # elif (LZO_CC_WATCOMC) 1663 # define __lzo_cdecl __cdecl 1664 # else 1665 # define __lzo_cdecl __cdecl 1666 # define __lzo_cdecl_atexit __cdecl 1667 # define __lzo_cdecl_main __cdecl 1668 # define __lzo_cdecl_qsort __cdecl 1669 # endif 1670 # if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) 1671 # elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) 1672 # define __lzo_cdecl_sighandler __pascal 1673 # elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) 1674 # define __lzo_cdecl_sighandler _stdcall 1675 # elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) 1676 # define __lzo_cdecl_sighandler __clrcall 1677 # elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) 1678 # if defined(_DLL) 1679 # define __lzo_cdecl_sighandler _far _cdecl _loadds 1680 # elif defined(_MT) 1681 # define __lzo_cdecl_sighandler _far _cdecl 1682 # else 1683 # define __lzo_cdecl_sighandler _cdecl 1684 # endif 1685 # else 1686 # define __lzo_cdecl_sighandler __cdecl 1687 # endif 1688 #elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) 1689 # define __lzo_cdecl __cdecl 1690 #elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) 1691 # define __lzo_cdecl cdecl 1692 #endif 1693 #if !defined(__lzo_cdecl) 1694 # define __lzo_cdecl /*empty*/ 1695 #endif 1696 #if !defined(__lzo_cdecl_atexit) 1697 # define __lzo_cdecl_atexit /*empty*/ 1698 #endif 1699 #if !defined(__lzo_cdecl_main) 1700 # define __lzo_cdecl_main /*empty*/ 1701 #endif 1702 #if !defined(__lzo_cdecl_qsort) 1703 # define __lzo_cdecl_qsort /*empty*/ 1704 #endif 1705 #if !defined(__lzo_cdecl_sighandler) 1706 # define __lzo_cdecl_sighandler /*empty*/ 1707 #endif 1708 #if !defined(__lzo_cdecl_va) 1709 # define __lzo_cdecl_va __lzo_cdecl 1710 #endif 1711 #if !(LZO_CFG_NO_WINDOWS_H) 1712 #if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) 1713 # if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) 1714 # elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) 1715 # elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) 1716 # else 1717 # define LZO_HAVE_WINDOWS_H 1 1718 # endif 1719 #endif 1720 #endif 1721 #if (LZO_ARCH_ALPHA) 1722 # define LZO_OPT_AVOID_UINT_INDEX 1 1723 # define LZO_OPT_AVOID_SHORT 1 1724 # define LZO_OPT_AVOID_USHORT 1 1725 #elif (LZO_ARCH_AMD64) 1726 # define LZO_OPT_AVOID_INT_INDEX 1 1727 # define LZO_OPT_AVOID_UINT_INDEX 1 1728 # define LZO_OPT_UNALIGNED16 1 1729 # define LZO_OPT_UNALIGNED32 1 1730 # define LZO_OPT_UNALIGNED64 1 1731 #elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) 1732 #elif (LZO_ARCH_ARM) 1733 # define LZO_OPT_AVOID_SHORT 1 1734 # define LZO_OPT_AVOID_USHORT 1 1735 #elif (LZO_ARCH_CRIS) 1736 # define LZO_OPT_UNALIGNED16 1 1737 # define LZO_OPT_UNALIGNED32 1 1738 #elif (LZO_ARCH_I386) 1739 # define LZO_OPT_UNALIGNED16 1 1740 # define LZO_OPT_UNALIGNED32 1 1741 #elif (LZO_ARCH_IA64) 1742 # define LZO_OPT_AVOID_INT_INDEX 1 1743 # define LZO_OPT_AVOID_UINT_INDEX 1 1744 # define LZO_OPT_PREFER_POSTINC 1 1745 #elif (LZO_ARCH_M68K) 1746 # define LZO_OPT_PREFER_POSTINC 1 1747 # define LZO_OPT_PREFER_PREDEC 1 1748 # if defined(__mc68020__) && !defined(__mcoldfire__) 1749 # define LZO_OPT_UNALIGNED16 1 1750 # define LZO_OPT_UNALIGNED32 1 1751 # endif 1752 #elif (LZO_ARCH_MIPS) 1753 # define LZO_OPT_AVOID_UINT_INDEX 1 1754 #elif (LZO_ARCH_POWERPC) 1755 # define LZO_OPT_PREFER_PREINC 1 1756 # define LZO_OPT_PREFER_PREDEC 1 1757 # if (LZO_ABI_BIG_ENDIAN) 1758 # define LZO_OPT_UNALIGNED16 1 1759 # define LZO_OPT_UNALIGNED32 1 1760 # endif 1761 #elif (LZO_ARCH_S390) 1762 # define LZO_OPT_UNALIGNED16 1 1763 # define LZO_OPT_UNALIGNED32 1 1764 # if (LZO_SIZEOF_SIZE_T == 8) 1765 # define LZO_OPT_UNALIGNED64 1 1766 # endif 1767 #elif (LZO_ARCH_SH) 1768 # define LZO_OPT_PREFER_POSTINC 1 1769 # define LZO_OPT_PREFER_PREDEC 1 1770 #endif 1771 #ifndef LZO_CFG_NO_INLINE_ASM 1772 #if (LZO_CC_LLVM) 1773 # define LZO_CFG_NO_INLINE_ASM 1 1774 #endif 1775 #endif 1776 #ifndef LZO_CFG_NO_UNALIGNED 1777 #if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) 1778 # define LZO_CFG_NO_UNALIGNED 1 1779 #endif 1780 #endif 1781 #if (LZO_CFG_NO_UNALIGNED) 1782 # undef LZO_OPT_UNALIGNED16 1783 # undef LZO_OPT_UNALIGNED32 1784 # undef LZO_OPT_UNALIGNED64 1785 #endif 1786 #if (LZO_CFG_NO_INLINE_ASM) 1787 #elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) 1788 # define LZO_ASM_SYNTAX_MSC 1 1789 #elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) 1790 #elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul)) 1791 #elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) 1792 # define LZO_ASM_SYNTAX_GNUC 1 1793 #elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) 1794 # define LZO_ASM_SYNTAX_GNUC 1 1795 #endif 1796 #if (LZO_ASM_SYNTAX_GNUC) 1797 #if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) 1798 # define __LZO_ASM_CLOBBER "ax" 1799 #elif (LZO_CC_INTELC) 1800 # define __LZO_ASM_CLOBBER "memory" 1801 #else 1802 # define __LZO_ASM_CLOBBER "cc", "memory" 1803 #endif 1804 #endif 1805 #if defined(__LZO_INFOSTR_MM) 1806 #elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) 1807 # define __LZO_INFOSTR_MM "" 1808 #elif defined(LZO_INFO_MM) 1809 # define __LZO_INFOSTR_MM "." LZO_INFO_MM 1810 #else 1811 # define __LZO_INFOSTR_MM "" 1812 #endif 1813 #if defined(__LZO_INFOSTR_PM) 1814 #elif defined(LZO_INFO_ABI_PM) 1815 # define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM 1816 #else 1817 # define __LZO_INFOSTR_PM "" 1818 #endif 1819 #if defined(__LZO_INFOSTR_ENDIAN) 1820 #elif defined(LZO_INFO_ABI_ENDIAN) 1821 # define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN 1822 #else 1823 # define __LZO_INFOSTR_ENDIAN "" 1824 #endif 1825 #if defined(__LZO_INFOSTR_OSNAME) 1826 #elif defined(LZO_INFO_OS_CONSOLE) 1827 # define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE 1828 #elif defined(LZO_INFO_OS_POSIX) 1829 # define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX 1830 #else 1831 # define __LZO_INFOSTR_OSNAME LZO_INFO_OS 1832 #endif 1833 #if defined(__LZO_INFOSTR_LIBC) 1834 #elif defined(LZO_INFO_LIBC) 1835 # define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC 1836 #else 1837 # define __LZO_INFOSTR_LIBC "" 1838 #endif 1839 #if defined(__LZO_INFOSTR_CCVER) 1840 #elif defined(LZO_INFO_CCVER) 1841 # define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER 1842 #else 1843 # define __LZO_INFOSTR_CCVER "" 1844 #endif 1845 #define LZO_INFO_STRING \ 1846 LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ 1847 " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER 1848 1849 #endif /* already included */ 1850 1851 /* vim:set ts=4 et: */ 1852