c78952
From 9a1e99c5628bafa9e3970a5317b721da704bec6a Mon Sep 17 00:00:00 2001
87ae4b
From: Peter Jones <pjones@redhat.com>
87ae4b
Date: Thu, 4 Dec 2014 15:36:09 -0500
31cddd
Subject: [PATCH] Update to minilzo-2.08
87ae4b
87ae4b
This fixes CVE-2014-4607 - lzo: lzo1x_decompress_safe() integer overflow
87ae4b
87ae4b
Signed-off-by: Peter Jones <pjones@redhat.com>
87ae4b
---
ec4acb
 grub-core/lib/minilzo/minilzo.c | 3801 +++++++++++++++++++++++++++------------
87ae4b
 grub-core/lib/minilzo/lzoconf.h |  216 ++-
ec4acb
 grub-core/lib/minilzo/lzodefs.h | 2320 ++++++++++++++++++------
87ae4b
 grub-core/lib/minilzo/minilzo.h |   21 +-
ec4acb
 4 files changed, 4489 insertions(+), 1869 deletions(-)
87ae4b
ec4acb
diff --git a/grub-core/lib/minilzo/minilzo.c b/grub-core/lib/minilzo/minilzo.c
ec4acb
index 25a1f68b3b5..ab2be5f4fd0 100644
ec4acb
--- a/grub-core/lib/minilzo/minilzo.c
ec4acb
+++ b/grub-core/lib/minilzo/minilzo.c
87ae4b
@@ -2,22 +2,7 @@
87ae4b
 
87ae4b
    This file is part of the LZO real-time data compression library.
87ae4b
 
87ae4b
-   Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
87ae4b
-   Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
87ae4b
+   Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
87ae4b
    All Rights Reserved.
87ae4b
 
87ae4b
    The LZO library is free software; you can redistribute it and/or
ec4acb
@@ -67,12 +52,6 @@
ec4acb
 #if defined(__CYGWIN32__) && !defined(__CYGWIN__)
ec4acb
 #  define __CYGWIN__ __CYGWIN32__
87ae4b
 #endif
ec4acb
-#if defined(__IBMCPP__) && !defined(__IBMC__)
ec4acb
-#  define __IBMC__ __IBMCPP__
87ae4b
-#endif
ec4acb
-#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER)
ec4acb
-#  define __INTEL_COMPILER __ICL
ec4acb
-#endif
ec4acb
 #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE)
ec4acb
 #  define _ALL_SOURCE 1
ec4acb
 #endif
ec4acb
@@ -81,19 +60,30 @@
ec4acb
 #    define __LONG_MAX__ 9223372036854775807L
87ae4b
 #  endif
87ae4b
 #endif
ec4acb
-#if defined(__INTEL_COMPILER) && defined(__linux__)
ec4acb
+#if !defined(LZO_CFG_NO_DISABLE_WUNDEF)
ec4acb
+#if defined(__ARMCC_VERSION)
ec4acb
+#  pragma diag_suppress 193
ec4acb
+#elif defined(__clang__) && defined(__clang_minor__)
ec4acb
+#  pragma clang diagnostic ignored "-Wundef"
ec4acb
+#elif defined(__INTEL_COMPILER)
ec4acb
 #  pragma warning(disable: 193)
87ae4b
-#endif
ec4acb
-#if defined(__KEIL__) && defined(__C166__)
ec4acb
+#elif defined(__KEIL__) && defined(__C166__)
ec4acb
 #  pragma warning disable = 322
ec4acb
-#elif 0 && defined(__C251__)
ec4acb
-#  pragma warning disable = 322
87ae4b
-#endif
ec4acb
-#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
ec4acb
-#  if (_MSC_VER >= 1300)
ec4acb
+#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__)
ec4acb
+#  if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2))
ec4acb
+#    pragma GCC diagnostic ignored "-Wundef"
ec4acb
+#  endif
ec4acb
+#elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
ec4acb
+#  if ((_MSC_VER-0) >= 1300)
ec4acb
 #    pragma warning(disable: 4668)
ec4acb
 #  endif
87ae4b
 #endif
ec4acb
+#endif
ec4acb
+#if 0 && defined(__POCC__) && defined(_WIN32)
ec4acb
+#  if (__POCC__ >= 400)
ec4acb
+#    pragma warn(disable: 2216)
ec4acb
+#  endif
ec4acb
+#endif
ec4acb
 #if 0 && defined(__WATCOMC__)
ec4acb
 #  if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
ec4acb
 #    pragma warning 203 9
ec4acb
@@ -102,13 +92,29 @@
ec4acb
 #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
ec4acb
 #  pragma option -h
87ae4b
 #endif
ec4acb
+#if !(LZO_CFG_NO_DISABLE_WCRTNONSTDC)
ec4acb
+#ifndef _CRT_NONSTDC_NO_DEPRECATE
ec4acb
+#define _CRT_NONSTDC_NO_DEPRECATE 1
87ae4b
+#endif
ec4acb
+#ifndef _CRT_NONSTDC_NO_WARNINGS
ec4acb
+#define _CRT_NONSTDC_NO_WARNINGS 1
87ae4b
+#endif
ec4acb
+#ifndef _CRT_SECURE_NO_DEPRECATE
ec4acb
+#define _CRT_SECURE_NO_DEPRECATE 1
87ae4b
+#endif
ec4acb
+#ifndef _CRT_SECURE_NO_WARNINGS
ec4acb
+#define _CRT_SECURE_NO_WARNINGS 1
87ae4b
+#endif
87ae4b
+#endif
87ae4b
 #if 0
87ae4b
-#define LZO_0xffffL             0xfffful
87ae4b
-#define LZO_0xffffffffL         0xfffffffful
87ae4b
+#define LZO_0xffffUL            0xfffful
87ae4b
+#define LZO_0xffffffffUL        0xfffffffful
87ae4b
 #else
87ae4b
-#define LZO_0xffffL             65535ul
87ae4b
-#define LZO_0xffffffffL         4294967295ul
87ae4b
+#define LZO_0xffffUL            65535ul
87ae4b
+#define LZO_0xffffffffUL        4294967295ul
87ae4b
 #endif
87ae4b
+#define LZO_0xffffL             LZO_0xffffUL
87ae4b
+#define LZO_0xffffffffL         LZO_0xffffffffUL
87ae4b
 #if (LZO_0xffffL == LZO_0xffffffffL)
87ae4b
 #  error "your preprocessor is broken 1"
87ae4b
 #endif
ec4acb
@@ -123,6 +129,13 @@
87ae4b
 #  error "your preprocessor is broken 4"
87ae4b
 #endif
87ae4b
 #endif
87ae4b
+#if defined(__COUNTER__)
87ae4b
+#  ifndef LZO_CFG_USE_COUNTER
87ae4b
+#  define LZO_CFG_USE_COUNTER 1
87ae4b
+#  endif
87ae4b
+#else
87ae4b
+#  undef LZO_CFG_USE_COUNTER
87ae4b
+#endif
87ae4b
 #if (UINT_MAX == LZO_0xffffL)
87ae4b
 #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
87ae4b
 #  if !defined(MSDOS)
ec4acb
@@ -253,14 +266,31 @@
87ae4b
 #endif
87ae4b
 #define LZO_PP_STRINGIZE(x)             #x
87ae4b
 #define LZO_PP_MACRO_EXPAND(x)          LZO_PP_STRINGIZE(x)
87ae4b
+#define LZO_PP_CONCAT0()                /*empty*/
87ae4b
+#define LZO_PP_CONCAT1(a)               a
87ae4b
 #define LZO_PP_CONCAT2(a,b)             a ## b
87ae4b
 #define LZO_PP_CONCAT3(a,b,c)           a ## b ## c
87ae4b
 #define LZO_PP_CONCAT4(a,b,c,d)         a ## b ## c ## d
87ae4b
 #define LZO_PP_CONCAT5(a,b,c,d,e)       a ## b ## c ## d ## e
87ae4b
+#define LZO_PP_CONCAT6(a,b,c,d,e,f)     a ## b ## c ## d ## e ## f
87ae4b
+#define LZO_PP_CONCAT7(a,b,c,d,e,f,g)   a ## b ## c ## d ## e ## f ## g
87ae4b
+#define LZO_PP_ECONCAT0()               LZO_PP_CONCAT0()
87ae4b
+#define LZO_PP_ECONCAT1(a)              LZO_PP_CONCAT1(a)
87ae4b
 #define LZO_PP_ECONCAT2(a,b)            LZO_PP_CONCAT2(a,b)
87ae4b
 #define LZO_PP_ECONCAT3(a,b,c)          LZO_PP_CONCAT3(a,b,c)
87ae4b
 #define LZO_PP_ECONCAT4(a,b,c,d)        LZO_PP_CONCAT4(a,b,c,d)
87ae4b
 #define LZO_PP_ECONCAT5(a,b,c,d,e)      LZO_PP_CONCAT5(a,b,c,d,e)
87ae4b
+#define LZO_PP_ECONCAT6(a,b,c,d,e,f)    LZO_PP_CONCAT6(a,b,c,d,e,f)
87ae4b
+#define LZO_PP_ECONCAT7(a,b,c,d,e,f,g)  LZO_PP_CONCAT7(a,b,c,d,e,f,g)
87ae4b
+#define LZO_PP_EMPTY                    /*empty*/
87ae4b
+#define LZO_PP_EMPTY0()                 /*empty*/
87ae4b
+#define LZO_PP_EMPTY1(a)                /*empty*/
87ae4b
+#define LZO_PP_EMPTY2(a,b)              /*empty*/
87ae4b
+#define LZO_PP_EMPTY3(a,b,c)            /*empty*/
87ae4b
+#define LZO_PP_EMPTY4(a,b,c,d)          /*empty*/
87ae4b
+#define LZO_PP_EMPTY5(a,b,c,d,e)        /*empty*/
87ae4b
+#define LZO_PP_EMPTY6(a,b,c,d,e,f)      /*empty*/
87ae4b
+#define LZO_PP_EMPTY7(a,b,c,d,e,f,g)    /*empty*/
87ae4b
 #if 1
87ae4b
 #define LZO_CPP_STRINGIZE(x)            #x
87ae4b
 #define LZO_CPP_MACRO_EXPAND(x)         LZO_CPP_STRINGIZE(x)
ec4acb
@@ -268,12 +298,16 @@
87ae4b
 #define LZO_CPP_CONCAT3(a,b,c)          a ## b ## c
87ae4b
 #define LZO_CPP_CONCAT4(a,b,c,d)        a ## b ## c ## d
87ae4b
 #define LZO_CPP_CONCAT5(a,b,c,d,e)      a ## b ## c ## d ## e
87ae4b
+#define LZO_CPP_CONCAT6(a,b,c,d,e,f)    a ## b ## c ## d ## e ## f
87ae4b
+#define LZO_CPP_CONCAT7(a,b,c,d,e,f,g)  a ## b ## c ## d ## e ## f ## g
87ae4b
 #define LZO_CPP_ECONCAT2(a,b)           LZO_CPP_CONCAT2(a,b)
87ae4b
 #define LZO_CPP_ECONCAT3(a,b,c)         LZO_CPP_CONCAT3(a,b,c)
87ae4b
 #define LZO_CPP_ECONCAT4(a,b,c,d)       LZO_CPP_CONCAT4(a,b,c,d)
87ae4b
 #define LZO_CPP_ECONCAT5(a,b,c,d,e)     LZO_CPP_CONCAT5(a,b,c,d,e)
87ae4b
+#define LZO_CPP_ECONCAT6(a,b,c,d,e,f)   LZO_CPP_CONCAT6(a,b,c,d,e,f)
87ae4b
+#define LZO_CPP_ECONCAT7(a,b,c,d,e,f,g) LZO_CPP_CONCAT7(a,b,c,d,e,f,g)
87ae4b
 #endif
87ae4b
-#define __LZO_MASK_GEN(o,b)     (((((o) << ((b)-1)) - (o)) << 1) + (o))
87ae4b
+#define __LZO_MASK_GEN(o,b)     (((((o) << ((b)-!!(b))) - (o)) << 1) + (o)*!!(b))
87ae4b
 #if 1 && defined(__cplusplus)
87ae4b
 #  if !defined(__STDC_CONSTANT_MACROS)
87ae4b
 #    define __STDC_CONSTANT_MACROS 1
ec4acb
@@ -283,9 +317,13 @@
87ae4b
 #  endif
87ae4b
 #endif
87ae4b
 #if defined(__cplusplus)
87ae4b
-#  define LZO_EXTERN_C extern "C"
87ae4b
+#  define LZO_EXTERN_C          extern "C"
87ae4b
+#  define LZO_EXTERN_C_BEGIN    extern "C" {
87ae4b
+#  define LZO_EXTERN_C_END      }
87ae4b
 #else
87ae4b
-#  define LZO_EXTERN_C extern
87ae4b
+#  define LZO_EXTERN_C          extern
87ae4b
+#  define LZO_EXTERN_C_BEGIN    /*empty*/
87ae4b
+#  define LZO_EXTERN_C_END      /*empty*/
87ae4b
 #endif
87ae4b
 #if !defined(__LZO_OS_OVERRIDE)
87ae4b
 #if (LZO_OS_FREESTANDING)
ec4acb
@@ -386,12 +424,12 @@
87ae4b
 #elif defined(__VMS)
87ae4b
 #  define LZO_OS_VMS            1
87ae4b
 #  define LZO_INFO_OS           "vms"
87ae4b
-#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
87ae4b
+#elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)
87ae4b
 #  define LZO_OS_CONSOLE        1
87ae4b
 #  define LZO_OS_CONSOLE_PS2    1
87ae4b
 #  define LZO_INFO_OS           "console"
87ae4b
 #  define LZO_INFO_OS_CONSOLE   "ps2"
87ae4b
-#elif (defined(__mips__) && defined(__psp__))
87ae4b
+#elif defined(__mips__) && defined(__psp__)
87ae4b
 #  define LZO_OS_CONSOLE        1
87ae4b
 #  define LZO_OS_CONSOLE_PSP    1
87ae4b
 #  define LZO_INFO_OS           "console"
ec4acb
@@ -419,9 +457,18 @@
87ae4b
 #  elif defined(__linux__) || defined(__linux) || defined(__LINUX__)
87ae4b
 #    define LZO_OS_POSIX_LINUX      1
87ae4b
 #    define LZO_INFO_OS_POSIX       "linux"
87ae4b
-#  elif defined(__APPLE__) || defined(__MACOS__)
87ae4b
-#    define LZO_OS_POSIX_MACOSX     1
87ae4b
-#    define LZO_INFO_OS_POSIX       "macosx"
87ae4b
+#  elif defined(__APPLE__) && defined(__MACH__)
87ae4b
+#    if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000)
87ae4b
+#      define LZO_OS_POSIX_DARWIN     1040
87ae4b
+#      define LZO_INFO_OS_POSIX       "darwin_iphone"
87ae4b
+#    elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040)
87ae4b
+#      define LZO_OS_POSIX_DARWIN     __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
87ae4b
+#      define LZO_INFO_OS_POSIX       "darwin"
87ae4b
+#    else
87ae4b
+#      define LZO_OS_POSIX_DARWIN     1
87ae4b
+#      define LZO_INFO_OS_POSIX       "darwin"
87ae4b
+#    endif
87ae4b
+#    define LZO_OS_POSIX_MACOSX     LZO_OS_POSIX_DARWIN
87ae4b
 #  elif defined(__minix__) || defined(__minix)
87ae4b
 #    define LZO_OS_POSIX_MINIX      1
87ae4b
 #    define LZO_INFO_OS_POSIX       "minix"
ec4acb
@@ -456,18 +503,18 @@
87ae4b
 #endif
87ae4b
 #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
87ae4b
 #  if (UINT_MAX != LZO_0xffffL)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  endif
87ae4b
 #  if (ULONG_MAX != LZO_0xffffffffL)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  endif
87ae4b
 #endif
87ae4b
 #if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64)
87ae4b
 #  if (UINT_MAX != LZO_0xffffffffL)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  endif
87ae4b
 #  if (ULONG_MAX != LZO_0xffffffffL)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  endif
87ae4b
 #endif
87ae4b
 #if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
ec4acb
@@ -483,59 +530,65 @@
87ae4b
 #  define LZO_INFO_CC           "sdcc"
87ae4b
 #  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(SDCC)
87ae4b
 #elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__)
87ae4b
-#  define LZO_CC_PATHSCALE      (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__)
87ae4b
+#  define LZO_CC_PATHSCALE      (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0))
87ae4b
 #  define LZO_INFO_CC           "Pathscale C"
87ae4b
 #  define LZO_INFO_CCVER        __PATHSCALE__
87ae4b
-#elif defined(__INTEL_COMPILER)
87ae4b
-#  define LZO_CC_INTELC         1
87ae4b
+#  if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
87ae4b
+#    define LZO_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
87ae4b
+#  endif
87ae4b
+#elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0)
87ae4b
+#  define LZO_CC_INTELC         __INTEL_COMPILER
87ae4b
 #  define LZO_INFO_CC           "Intel C"
87ae4b
 #  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__INTEL_COMPILER)
87ae4b
-#  if defined(_WIN32) || defined(_WIN64)
87ae4b
-#    define LZO_CC_SYNTAX_MSC 1
87ae4b
-#  else
87ae4b
-#    define LZO_CC_SYNTAX_GNUC 1
87ae4b
+#  if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
87ae4b
+#    define LZO_CC_INTELC_MSC   _MSC_VER
87ae4b
+#  elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
87ae4b
+#    define LZO_CC_INTELC_GNUC   (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
87ae4b
 #  endif
87ae4b
 #elif defined(__POCC__) && defined(_WIN32)
87ae4b
 #  define LZO_CC_PELLESC        1
87ae4b
 #  define LZO_INFO_CC           "Pelles C"
87ae4b
 #  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__POCC__)
87ae4b
-#elif defined(__clang__) && defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
87ae4b
+#elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
87ae4b
 #  if defined(__GNUC_PATCHLEVEL__)
87ae4b
-#    define LZO_CC_CLANG_GNUC   (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
87ae4b
+#    define LZO_CC_ARMCC_GNUC   (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
87ae4b
 #  else
87ae4b
-#    define LZO_CC_CLANG_GNUC   (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
87ae4b
+#    define LZO_CC_ARMCC_GNUC   (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
87ae4b
 #  endif
87ae4b
+#  define LZO_CC_ARMCC          __ARMCC_VERSION
87ae4b
+#  define LZO_INFO_CC           "ARM C Compiler"
87ae4b
+#  define LZO_INFO_CCVER        __VERSION__
87ae4b
+#elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__)
87ae4b
 #  if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__)
87ae4b
-#    define LZO_CC_CLANG_CLANG  (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__)
87ae4b
+#    define LZO_CC_CLANG        (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0))
87ae4b
 #  else
87ae4b
-#    define LZO_CC_CLANG_CLANG  0x010000L
87ae4b
+#    define LZO_CC_CLANG        0x010000L
87ae4b
+#  endif
87ae4b
+#  if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
87ae4b
+#    define LZO_CC_CLANG_MSC    _MSC_VER
87ae4b
+#  elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
87ae4b
+#    define LZO_CC_CLANG_GNUC   (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
87ae4b
 #  endif
87ae4b
-#  define LZO_CC_CLANG          LZO_CC_CLANG_GNUC
87ae4b
 #  define LZO_INFO_CC           "clang"
87ae4b
 #  define LZO_INFO_CCVER        __VERSION__
87ae4b
 #elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
87ae4b
 #  if defined(__GNUC_PATCHLEVEL__)
87ae4b
-#    define LZO_CC_LLVM_GNUC    (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
87ae4b
+#    define LZO_CC_LLVM_GNUC    (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
87ae4b
 #  else
87ae4b
-#    define LZO_CC_LLVM_GNUC    (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
87ae4b
+#    define LZO_CC_LLVM_GNUC    (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
87ae4b
 #  endif
87ae4b
 #  define LZO_CC_LLVM           LZO_CC_LLVM_GNUC
87ae4b
 #  define LZO_INFO_CC           "llvm-gcc"
87ae4b
 #  define LZO_INFO_CCVER        __VERSION__
87ae4b
-#elif defined(__GNUC__) && defined(__VERSION__)
87ae4b
-#  if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
87ae4b
-#    define LZO_CC_GNUC         (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
87ae4b
-#  elif defined(__GNUC_MINOR__)
87ae4b
-#    define LZO_CC_GNUC         (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
87ae4b
-#  else
87ae4b
-#    define LZO_CC_GNUC         (__GNUC__ * 0x10000L)
87ae4b
-#  endif
87ae4b
-#  define LZO_INFO_CC           "gcc"
87ae4b
-#  define LZO_INFO_CCVER        __VERSION__
87ae4b
 #elif defined(__ACK__) && defined(_ACK)
87ae4b
 #  define LZO_CC_ACK            1
87ae4b
 #  define LZO_INFO_CC           "Amsterdam Compiler Kit C"
87ae4b
 #  define LZO_INFO_CCVER        "unknown"
87ae4b
+#elif defined(__ARMCC_VERSION) && !defined(__GNUC__)
87ae4b
+#  define LZO_CC_ARMCC          __ARMCC_VERSION
87ae4b
+#  define LZO_CC_ARMCC_ARMCC    __ARMCC_VERSION
87ae4b
+#  define LZO_INFO_CC           "ARM C Compiler"
87ae4b
+#  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__ARMCC_VERSION)
87ae4b
 #elif defined(__AZTEC_C__)
87ae4b
 #  define LZO_CC_AZTECC         1
87ae4b
 #  define LZO_INFO_CC           "Aztec C"
ec4acb
@@ -560,10 +613,23 @@
87ae4b
 #  define LZO_CC_DECC           1
87ae4b
 #  define LZO_INFO_CC           "DEC C"
87ae4b
 #  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__DECC)
87ae4b
+#elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0)
87ae4b
+#  define LZO_CC_GHS            1
87ae4b
+#  define LZO_INFO_CC           "Green Hills C"
87ae4b
+#  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER)
87ae4b
+#  if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
87ae4b
+#    define LZO_CC_GHS_MSC      _MSC_VER
87ae4b
+#  elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
87ae4b
+#    define LZO_CC_GHS_GNUC     (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
87ae4b
+#  endif
87ae4b
 #elif defined(__HIGHC__)
87ae4b
 #  define LZO_CC_HIGHC          1
87ae4b
 #  define LZO_INFO_CC           "MetaWare High C"
87ae4b
 #  define LZO_INFO_CCVER        "unknown"
87ae4b
+#elif defined(__HP_aCC) && ((__HP_aCC-0) > 0)
87ae4b
+#  define LZO_CC_HPACC          __HP_aCC
87ae4b
+#  define LZO_INFO_CC           "HP aCC"
87ae4b
+#  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__HP_aCC)
87ae4b
 #elif defined(__IAR_SYSTEMS_ICC__)
87ae4b
 #  define LZO_CC_IARC           1
87ae4b
 #  define LZO_INFO_CC           "IAR C"
ec4acb
@@ -572,10 +638,14 @@
87ae4b
 #  else
87ae4b
 #    define LZO_INFO_CCVER      "unknown"
87ae4b
 #  endif
87ae4b
-#elif defined(__IBMC__)
87ae4b
-#  define LZO_CC_IBMC           1
87ae4b
+#elif defined(__IBMC__) && ((__IBMC__-0) > 0)
87ae4b
+#  define LZO_CC_IBMC           __IBMC__
87ae4b
 #  define LZO_INFO_CC           "IBM C"
87ae4b
 #  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__IBMC__)
87ae4b
+#elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0)
87ae4b
+#  define LZO_CC_IBMC           __IBMCPP__
87ae4b
+#  define LZO_INFO_CC           "IBM C"
87ae4b
+#  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__IBMCPP__)
87ae4b
 #elif defined(__KEIL__) && defined(__C166__)
87ae4b
 #  define LZO_CC_KEILC          1
87ae4b
 #  define LZO_INFO_CC           "Keil C"
ec4acb
@@ -592,16 +662,8 @@
87ae4b
 #  else
87ae4b
 #    define LZO_INFO_CCVER      "unknown"
87ae4b
 #  endif
87ae4b
-#elif defined(_MSC_VER)
87ae4b
-#  define LZO_CC_MSC            1
87ae4b
-#  define LZO_INFO_CC           "Microsoft C"
87ae4b
-#  if defined(_MSC_FULL_VER)
87ae4b
-#    define LZO_INFO_CCVER      LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER)
87ae4b
-#  else
87ae4b
-#    define LZO_INFO_CCVER      LZO_PP_MACRO_EXPAND(_MSC_VER)
87ae4b
-#  endif
87ae4b
-#elif defined(__MWERKS__)
87ae4b
-#  define LZO_CC_MWERKS         1
87ae4b
+#elif defined(__MWERKS__) && ((__MWERKS__-0) > 0)
87ae4b
+#  define LZO_CC_MWERKS         __MWERKS__
87ae4b
 #  define LZO_INFO_CC           "Metrowerks C"
87ae4b
 #  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__MWERKS__)
87ae4b
 #elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
ec4acb
@@ -612,6 +674,15 @@
87ae4b
 #  define LZO_CC_PACIFICC       1
87ae4b
 #  define LZO_INFO_CC           "Pacific C"
87ae4b
 #  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__PACIFIC__)
87ae4b
+#elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__)
87ae4b
+#  if defined(__PGIC_PATCHLEVEL__)
87ae4b
+#    define LZO_CC_PGI          (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0))
87ae4b
+#    define LZO_INFO_CCVER      LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) "." LZO_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__)
87ae4b
+#  else
87ae4b
+#    define LZO_CC_PGI          (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100)
87ae4b
+#    define LZO_INFO_CCVER      LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0"
87ae4b
+#  endif
87ae4b
+#  define LZO_INFO_CC           "Portland Group PGI C"
87ae4b
 #elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
87ae4b
 #  define LZO_CC_PGI            1
87ae4b
 #  define LZO_INFO_CC           "Portland Group PGI C"
ec4acb
@@ -626,7 +697,7 @@
87ae4b
 #  define LZO_INFO_CCVER        LZO_PP_MACRO_EXPAND(__SC__)
87ae4b
 #elif defined(__SUNPRO_C)
87ae4b
 #  define LZO_INFO_CC           "SunPro C"
87ae4b
-#  if ((__SUNPRO_C)+0 > 0)
87ae4b
+#  if ((__SUNPRO_C-0) > 0)
87ae4b
 #    define LZO_CC_SUNPROC      __SUNPRO_C
87ae4b
 #    define LZO_INFO_CCVER      LZO_PP_MACRO_EXPAND(__SUNPRO_C)
87ae4b
 #  else
ec4acb
@@ -635,7 +706,7 @@
87ae4b
 #  endif
87ae4b
 #elif defined(__SUNPRO_CC)
87ae4b
 #  define LZO_INFO_CC           "SunPro C"
87ae4b
-#  if ((__SUNPRO_CC)+0 > 0)
87ae4b
+#  if ((__SUNPRO_CC-0) > 0)
87ae4b
 #    define LZO_CC_SUNPROC      __SUNPRO_CC
87ae4b
 #    define LZO_INFO_CCVER      LZO_PP_MACRO_EXPAND(__SUNPRO_CC)
87ae4b
 #  else
ec4acb
@@ -661,16 +732,46 @@
87ae4b
 #elif defined(__ZTC__)
87ae4b
 #  define LZO_CC_ZORTECHC       1
87ae4b
 #  define LZO_INFO_CC           "Zortech C"
87ae4b
-#  if (__ZTC__ == 0x310)
87ae4b
+#  if ((__ZTC__-0) == 0x310)
87ae4b
 #    define LZO_INFO_CCVER      "0x310"
87ae4b
 #  else
87ae4b
 #    define LZO_INFO_CCVER      LZO_PP_MACRO_EXPAND(__ZTC__)
87ae4b
 #  endif
87ae4b
+#elif defined(__GNUC__) && defined(__VERSION__)
87ae4b
+#  if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
87ae4b
+#    define LZO_CC_GNUC         (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
87ae4b
+#  elif defined(__GNUC_MINOR__)
87ae4b
+#    define LZO_CC_GNUC         (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
87ae4b
+#  else
87ae4b
+#    define LZO_CC_GNUC         (__GNUC__ * 0x10000L)
87ae4b
+#  endif
87ae4b
+#  define LZO_INFO_CC           "gcc"
87ae4b
+#  define LZO_INFO_CCVER        __VERSION__
87ae4b
+#elif defined(_MSC_VER) && ((_MSC_VER-0) > 0)
87ae4b
+#  define LZO_CC_MSC            _MSC_VER
87ae4b
+#  define LZO_INFO_CC           "Microsoft C"
87ae4b
+#  if defined(_MSC_FULL_VER)
87ae4b
+#    define LZO_INFO_CCVER      LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER)
87ae4b
+#  else
87ae4b
+#    define LZO_INFO_CCVER      LZO_PP_MACRO_EXPAND(_MSC_VER)
87ae4b
+#  endif
87ae4b
 #else
87ae4b
 #  define LZO_CC_UNKNOWN        1
87ae4b
 #  define LZO_INFO_CC           "unknown"
87ae4b
 #  define LZO_INFO_CCVER        "unknown"
87ae4b
 #endif
87ae4b
+#if (LZO_CC_GNUC) && defined(__OPEN64__)
87ae4b
+#  if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__)
87ae4b
+#    define LZO_CC_OPEN64       (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0))
87ae4b
+#    define LZO_CC_OPEN64_GNUC  LZO_CC_GNUC
87ae4b
+#  endif
87ae4b
+#endif
87ae4b
+#if (LZO_CC_GNUC) && defined(__PCC__)
87ae4b
+#  if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__)
87ae4b
+#    define LZO_CC_PCC          (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0))
87ae4b
+#    define LZO_CC_PCC_GNUC     LZO_CC_GNUC
87ae4b
+#  endif
87ae4b
+#endif
87ae4b
 #if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
87ae4b
 #  error "LZO_CC_MSC: _MSC_FULL_VER is not defined"
87ae4b
 #endif
ec4acb
@@ -688,8 +789,10 @@
87ae4b
 #  define LZO_INFO_ARCH             "generic"
87ae4b
 #elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
87ae4b
 #  define LZO_ARCH_I086             1
87ae4b
-#  define LZO_ARCH_IA16             1
87ae4b
 #  define LZO_INFO_ARCH             "i086"
87ae4b
+#elif defined(__aarch64__)
87ae4b
+#  define LZO_ARCH_ARM64            1
87ae4b
+#  define LZO_INFO_ARCH             "arm64"
87ae4b
 #elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
87ae4b
 #  define LZO_ARCH_ALPHA            1
87ae4b
 #  define LZO_INFO_ARCH             "alpha"
ec4acb
@@ -705,10 +808,10 @@
87ae4b
 #  define LZO_INFO_ARCH             "arm_thumb"
87ae4b
 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__)
87ae4b
 #  define LZO_ARCH_ARM              1
87ae4b
-#  if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1)
87ae4b
+#  if defined(__CPU_MODE__) && ((__CPU_MODE__-0) == 1)
87ae4b
 #    define LZO_ARCH_ARM_THUMB      1
87ae4b
 #    define LZO_INFO_ARCH           "arm_thumb"
87ae4b
-#  elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2)
87ae4b
+#  elif defined(__CPU_MODE__) && ((__CPU_MODE__-0) == 2)
87ae4b
 #    define LZO_INFO_ARCH           "arm"
87ae4b
 #  else
87ae4b
 #    define LZO_INFO_ARCH           "arm"
ec4acb
@@ -826,53 +929,147 @@
87ae4b
 #  error "FIXME - missing define for CPU architecture"
87ae4b
 #endif
87ae4b
 #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32)
87ae4b
-#  error "FIXME - missing WIN32 define for CPU architecture"
87ae4b
+#  error "FIXME - missing LZO_OS_WIN32 define for CPU architecture"
87ae4b
 #endif
87ae4b
 #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64)
87ae4b
-#  error "FIXME - missing WIN64 define for CPU architecture"
87ae4b
+#  error "FIXME - missing LZO_OS_WIN64 define for CPU architecture"
87ae4b
 #endif
87ae4b
 #if (LZO_OS_OS216 || LZO_OS_WIN16)
87ae4b
 #  define LZO_ARCH_I086PM           1
87ae4b
-#  define LZO_ARCH_IA16PM           1
87ae4b
 #elif 1 && (LZO_OS_DOS16 && defined(BLX286))
87ae4b
 #  define LZO_ARCH_I086PM           1
87ae4b
-#  define LZO_ARCH_IA16PM           1
87ae4b
 #elif 1 && (LZO_OS_DOS16 && defined(DOSX286))
87ae4b
 #  define LZO_ARCH_I086PM           1
87ae4b
-#  define LZO_ARCH_IA16PM           1
87ae4b
 #elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__))
87ae4b
 #  define LZO_ARCH_I086PM           1
87ae4b
-#  define LZO_ARCH_IA16PM           1
87ae4b
 #endif
87ae4b
-#if (LZO_ARCH_ARM_THUMB) && !(LZO_ARCH_ARM)
87ae4b
-#  error "this should not happen"
87ae4b
+#if (LZO_ARCH_AMD64 && !LZO_ARCH_X64)
87ae4b
+#  define LZO_ARCH_X64              1
87ae4b
+#elif (!LZO_ARCH_AMD64 && LZO_ARCH_X64) && defined(__LZO_ARCH_OVERRIDE)
87ae4b
+#  define LZO_ARCH_AMD64            1
ec4acb
 #endif
ec4acb
-#if (LZO_ARCH_I086PM) && !(LZO_ARCH_I086)
ec4acb
-#  error "this should not happen"
87ae4b
+#if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64)
87ae4b
+#  define LZO_ARCH_AARCH64          1
87ae4b
+#elif (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) && defined(__LZO_ARCH_OVERRIDE)
87ae4b
+#  define LZO_ARCH_ARM64            1
87ae4b
+#endif
87ae4b
+#if (LZO_ARCH_I386 && !LZO_ARCH_X86)
87ae4b
+#  define LZO_ARCH_X86              1
87ae4b
+#elif (!LZO_ARCH_I386 && LZO_ARCH_X86) && defined(__LZO_ARCH_OVERRIDE)
87ae4b
+#  define LZO_ARCH_I386            1
87ae4b
+#endif
87ae4b
+#if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) || (!LZO_ARCH_AMD64 && LZO_ARCH_X64)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) || (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_ARCH_I386 && !LZO_ARCH_X86) || (!LZO_ARCH_I386 && LZO_ARCH_X86)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_ARCH_ARM_THUMB && !LZO_ARCH_ARM)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM_THUMB)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM_THUMB)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
ec4acb
+#endif
87ae4b
+#if (LZO_ARCH_ARM_THUMB1 && LZO_ARCH_ARM_THUMB2)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_ARCH_I086PM && !LZO_ARCH_I086)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
 #endif
87ae4b
 #if (LZO_ARCH_I086)
87ae4b
 #  if (UINT_MAX != LZO_0xffffL)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  endif
87ae4b
 #  if (ULONG_MAX != LZO_0xffffffffL)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  endif
87ae4b
 #endif
87ae4b
 #if (LZO_ARCH_I386)
87ae4b
 #  if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  endif
87ae4b
 #  if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  endif
87ae4b
 #  if (ULONG_MAX != LZO_0xffffffffL)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
ec4acb
 #  endif
ec4acb
 #endif
ec4acb
-#if !defined(__LZO_MM_OVERRIDE)
87ae4b
+#if (LZO_ARCH_AMD64 || LZO_ARCH_I386)
87ae4b
+#  if !defined(LZO_TARGET_FEATURE_SSE2)
87ae4b
+#    if defined(__SSE2__)
87ae4b
+#      define LZO_TARGET_FEATURE_SSE2       1
87ae4b
+#    elif defined(_MSC_VER) && ((defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) || defined(_M_AMD64))
87ae4b
+#      define LZO_TARGET_FEATURE_SSE2       1
87ae4b
+#    endif
87ae4b
+#  endif
87ae4b
+#  if !defined(LZO_TARGET_FEATURE_SSSE3)
87ae4b
+#  if (LZO_TARGET_FEATURE_SSE2)
87ae4b
+#    if defined(__SSSE3__)
87ae4b
+#      define LZO_TARGET_FEATURE_SSSE3      1
87ae4b
+#    elif defined(_MSC_VER) && defined(__AVX__)
87ae4b
+#      define LZO_TARGET_FEATURE_SSSE3      1
87ae4b
+#    endif
87ae4b
+#  endif
87ae4b
+#  endif
87ae4b
+#  if !defined(LZO_TARGET_FEATURE_SSE4_2)
87ae4b
+#  if (LZO_TARGET_FEATURE_SSSE3)
87ae4b
+#    if defined(__SSE4_2__)
87ae4b
+#      define LZO_TARGET_FEATURE_SSE4_2     1
87ae4b
+#    endif
87ae4b
+#  endif
87ae4b
+#  endif
87ae4b
+#  if !defined(LZO_TARGET_FEATURE_AVX)
87ae4b
+#  if (LZO_TARGET_FEATURE_SSSE3)
87ae4b
+#    if defined(__AVX__)
87ae4b
+#      define LZO_TARGET_FEATURE_AVX        1
87ae4b
+#    endif
87ae4b
+#  endif
87ae4b
+#  endif
87ae4b
+#  if !defined(LZO_TARGET_FEATURE_AVX2)
87ae4b
+#  if (LZO_TARGET_FEATURE_AVX)
87ae4b
+#    if defined(__AVX2__)
87ae4b
+#      define LZO_TARGET_FEATURE_AVX2       1
87ae4b
+#    endif
87ae4b
+#  endif
87ae4b
+#  endif
87ae4b
+#endif
87ae4b
+#if (LZO_TARGET_FEATURE_SSSE3 && !(LZO_TARGET_FEATURE_SSE2))
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_TARGET_FEATURE_SSE4_2 && !(LZO_TARGET_FEATURE_SSSE3))
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_TARGET_FEATURE_AVX && !(LZO_TARGET_FEATURE_SSSE3))
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_TARGET_FEATURE_AVX2 && !(LZO_TARGET_FEATURE_AVX))
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
87ae4b
+#if (LZO_ARCH_ARM)
87ae4b
+#  if !defined(LZO_TARGET_FEATURE_NEON)
87ae4b
+#    if defined(__ARM_NEON__)
87ae4b
+#      define LZO_TARGET_FEATURE_NEON       1
87ae4b
+#    endif
87ae4b
+#  endif
87ae4b
+#elif (LZO_ARCH_ARM64)
87ae4b
+#  if !defined(LZO_TARGET_FEATURE_NEON)
87ae4b
+#    if 1
87ae4b
+#      define LZO_TARGET_FEATURE_NEON       1
87ae4b
+#    endif
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if 0
87ae4b
+#elif !defined(__LZO_MM_OVERRIDE)
87ae4b
 #if (LZO_ARCH_I086)
87ae4b
 #if (UINT_MAX != LZO_0xffffL)
87ae4b
-#  error "this should not happen"
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
 #endif
87ae4b
 #if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
87ae4b
 #  define LZO_MM_TINY           1
ec4acb
@@ -899,7 +1096,7 @@
87ae4b
 #elif (LZO_CC_ZORTECHC && defined(__VCM__))
87ae4b
 #  define LZO_MM_LARGE          1
87ae4b
 #else
87ae4b
-#  error "unknown memory model"
87ae4b
+#  error "unknown LZO_ARCH_I086 memory model"
87ae4b
 #endif
87ae4b
 #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
87ae4b
 #define LZO_HAVE_MM_HUGE_PTR        1
ec4acb
@@ -922,10 +1119,10 @@
87ae4b
 #endif
87ae4b
 #if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR)
87ae4b
 #  if (LZO_OS_DOS16)
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  elif (LZO_CC_ZORTECHC)
87ae4b
 #  else
87ae4b
-#    error "this should not happen"
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
 #  endif
87ae4b
 #endif
87ae4b
 #ifdef __cplusplus
ec4acb
@@ -957,7 +1154,7 @@ extern "C" {
87ae4b
 #endif
87ae4b
 #elif (LZO_ARCH_C166)
87ae4b
 #if !defined(__MODEL__)
87ae4b
-#  error "FIXME - C166 __MODEL__"
87ae4b
+#  error "FIXME - LZO_ARCH_C166 __MODEL__"
87ae4b
 #elif ((__MODEL__) == 0)
87ae4b
 #  define LZO_MM_SMALL          1
87ae4b
 #elif ((__MODEL__) == 1)
ec4acb
@@ -971,11 +1168,11 @@ extern "C" {
87ae4b
 #elif ((__MODEL__) == 5)
87ae4b
 #  define LZO_MM_XSMALL         1
87ae4b
 #else
87ae4b
-#  error "FIXME - C166 __MODEL__"
87ae4b
+#  error "FIXME - LZO_ARCH_C166 __MODEL__"
87ae4b
 #endif
87ae4b
 #elif (LZO_ARCH_MCS251)
87ae4b
 #if !defined(__MODEL__)
87ae4b
-#  error "FIXME - MCS251 __MODEL__"
87ae4b
+#  error "FIXME - LZO_ARCH_MCS251 __MODEL__"
87ae4b
 #elif ((__MODEL__) == 0)
87ae4b
 #  define LZO_MM_SMALL          1
87ae4b
 #elif ((__MODEL__) == 2)
ec4acb
@@ -987,11 +1184,11 @@ extern "C" {
87ae4b
 #elif ((__MODEL__) == 5)
87ae4b
 #  define LZO_MM_XSMALL         1
87ae4b
 #else
87ae4b
-#  error "FIXME - MCS251 __MODEL__"
87ae4b
+#  error "FIXME - LZO_ARCH_MCS251 __MODEL__"
87ae4b
 #endif
87ae4b
 #elif (LZO_ARCH_MCS51)
87ae4b
 #if !defined(__MODEL__)
87ae4b
-#  error "FIXME - MCS51 __MODEL__"
87ae4b
+#  error "FIXME - LZO_ARCH_MCS51 __MODEL__"
87ae4b
 #elif ((__MODEL__) == 1)
87ae4b
 #  define LZO_MM_SMALL          1
87ae4b
 #elif ((__MODEL__) == 2)
ec4acb
@@ -1003,7 +1200,7 @@ extern "C" {
87ae4b
 #elif ((__MODEL__) == 5)
87ae4b
 #  define LZO_MM_XSMALL         1
87ae4b
 #else
87ae4b
-#  error "FIXME - MCS51 __MODEL__"
87ae4b
+#  error "FIXME - LZO_ARCH_MCS51 __MODEL__"
87ae4b
 #endif
87ae4b
 #elif (LZO_ARCH_CRAY_PVP)
87ae4b
 #  define LZO_MM_PVP            1
ec4acb
@@ -1030,35 +1227,818 @@ extern "C" {
87ae4b
 #  error "unknown memory model"
87ae4b
 #endif
87ae4b
 #endif
87ae4b
+#if !defined(__lzo_gnuc_extension__)
87ae4b
+#if (LZO_CC_GNUC >= 0x020800ul)
87ae4b
+#  define __lzo_gnuc_extension__    __extension__
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#  define __lzo_gnuc_extension__    __extension__
87ae4b
+#elif (LZO_CC_IBMC >= 600)
87ae4b
+#  define __lzo_gnuc_extension__    __extension__
87ae4b
+#else
ec4acb
+#endif
ec4acb
+#endif
87ae4b
+#if !defined(__lzo_gnuc_extension__)
87ae4b
+#  define __lzo_gnuc_extension__    /*empty*/
ec4acb
+#endif
87ae4b
+#if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0
87ae4b
+#  if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul))
87ae4b
+#    define LZO_CFG_USE_NEW_STYLE_CASTS 0
87ae4b
+#  elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1200))
87ae4b
+#    define LZO_CFG_USE_NEW_STYLE_CASTS 0
87ae4b
+#  else
87ae4b
+#    define LZO_CFG_USE_NEW_STYLE_CASTS 1
87ae4b
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_CFG_USE_NEW_STYLE_CASTS)
87ae4b
+#  define LZO_CFG_USE_NEW_STYLE_CASTS 0
ec4acb
+#endif
87ae4b
+#if !defined(__cplusplus)
87ae4b
+#  if defined(LZO_CFG_USE_NEW_STYLE_CASTS)
87ae4b
+#    undef LZO_CFG_USE_NEW_STYLE_CASTS
87ae4b
+#  endif
87ae4b
+#  define LZO_CFG_USE_NEW_STYLE_CASTS 0
ec4acb
+#endif
87ae4b
+#if !defined(LZO_REINTERPRET_CAST)
87ae4b
+#  if (LZO_CFG_USE_NEW_STYLE_CASTS)
87ae4b
+#    define LZO_REINTERPRET_CAST(t,e)       (reinterpret_cast<t> (e))
87ae4b
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_REINTERPRET_CAST)
87ae4b
+#  define LZO_REINTERPRET_CAST(t,e)         ((t) (e))
ec4acb
+#endif
87ae4b
+#if !defined(LZO_STATIC_CAST)
87ae4b
+#  if (LZO_CFG_USE_NEW_STYLE_CASTS)
87ae4b
+#    define LZO_STATIC_CAST(t,e)            (static_cast<t> (e))
87ae4b
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_STATIC_CAST)
87ae4b
+#  define LZO_STATIC_CAST(t,e)              ((t) (e))
ec4acb
+#endif
87ae4b
+#if !defined(LZO_STATIC_CAST2)
87ae4b
+#  define LZO_STATIC_CAST2(t1,t2,e)         LZO_STATIC_CAST(t1, LZO_STATIC_CAST(t2, e))
ec4acb
+#endif
87ae4b
+#if !defined(LZO_UNCONST_CAST)
87ae4b
+#  if (LZO_CFG_USE_NEW_STYLE_CASTS)
87ae4b
+#    define LZO_UNCONST_CAST(t,e)           (const_cast<t> (e))
87ae4b
+#  elif (LZO_HAVE_MM_HUGE_PTR)
87ae4b
+#    define LZO_UNCONST_CAST(t,e)           ((t) (e))
87ae4b
+#  elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#    define LZO_UNCONST_CAST(t,e)           ((t) ((void *) ((lzo_uintptr_t) ((const void *) (e)))))
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_UNCONST_CAST)
87ae4b
+#  define LZO_UNCONST_CAST(t,e)             ((t) ((void *) ((const void *) (e))))
87ae4b
+#endif
87ae4b
+#if !defined(LZO_UNCONST_VOLATILE_CAST)
87ae4b
+#  if (LZO_CFG_USE_NEW_STYLE_CASTS)
87ae4b
+#    define LZO_UNCONST_VOLATILE_CAST(t,e)  (const_cast<t> (e))
87ae4b
+#  elif (LZO_HAVE_MM_HUGE_PTR)
87ae4b
+#    define LZO_UNCONST_VOLATILE_CAST(t,e)  ((t) (e))
87ae4b
+#  elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#    define LZO_UNCONST_VOLATILE_CAST(t,e)  ((t) ((volatile void *) ((lzo_uintptr_t) ((volatile const void *) (e)))))
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_UNCONST_VOLATILE_CAST)
87ae4b
+#  define LZO_UNCONST_VOLATILE_CAST(t,e)    ((t) ((volatile void *) ((volatile const void *) (e))))
87ae4b
+#endif
87ae4b
+#if !defined(LZO_UNVOLATILE_CAST)
87ae4b
+#  if (LZO_CFG_USE_NEW_STYLE_CASTS)
87ae4b
+#    define LZO_UNVOLATILE_CAST(t,e)        (const_cast<t> (e))
87ae4b
+#  elif (LZO_HAVE_MM_HUGE_PTR)
87ae4b
+#    define LZO_UNVOLATILE_CAST(t,e)        ((t) (e))
87ae4b
+#  elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#    define LZO_UNVOLATILE_CAST(t,e)        ((t) ((void *) ((lzo_uintptr_t) ((volatile void *) (e)))))
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_UNVOLATILE_CAST)
87ae4b
+#  define LZO_UNVOLATILE_CAST(t,e)          ((t) ((void *) ((volatile void *) (e))))
ec4acb
+#endif
87ae4b
+#if !defined(LZO_UNVOLATILE_CONST_CAST)
87ae4b
+#  if (LZO_CFG_USE_NEW_STYLE_CASTS)
87ae4b
+#    define LZO_UNVOLATILE_CONST_CAST(t,e)  (const_cast<t> (e))
87ae4b
+#  elif (LZO_HAVE_MM_HUGE_PTR)
87ae4b
+#    define LZO_UNVOLATILE_CONST_CAST(t,e)  ((t) (e))
87ae4b
+#  elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#    define LZO_UNVOLATILE_CONST_CAST(t,e)  ((t) ((const void *) ((lzo_uintptr_t) ((volatile const void *) (e)))))
87ae4b
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_UNVOLATILE_CONST_CAST)
87ae4b
+#  define LZO_UNVOLATILE_CONST_CAST(t,e)    ((t) ((const void *) ((volatile const void *) (e))))
ec4acb
+#endif
87ae4b
+#if !defined(LZO_PCAST)
87ae4b
+#  if (LZO_HAVE_MM_HUGE_PTR)
87ae4b
+#    define LZO_PCAST(t,e)                  ((t) (e))
87ae4b
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_PCAST)
87ae4b
+#  define LZO_PCAST(t,e)                    LZO_STATIC_CAST(t, LZO_STATIC_CAST(void *, e))
87ae4b
+#endif
87ae4b
+#if !defined(LZO_CCAST)
87ae4b
+#  if (LZO_HAVE_MM_HUGE_PTR)
87ae4b
+#    define LZO_CCAST(t,e)                  ((t) (e))
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_CCAST)
87ae4b
+#  define LZO_CCAST(t,e)                    LZO_STATIC_CAST(t, LZO_STATIC_CAST(const void *, e))
ec4acb
+#endif
87ae4b
+#if !defined(LZO_ICONV)
87ae4b
+#  define LZO_ICONV(t,e)                    LZO_STATIC_CAST(t, e)
87ae4b
+#endif
87ae4b
+#if !defined(LZO_ICAST)
87ae4b
+#  define LZO_ICAST(t,e)                    LZO_STATIC_CAST(t, e)
87ae4b
+#endif
87ae4b
+#if !defined(LZO_ITRUNC)
87ae4b
+#  define LZO_ITRUNC(t,e)                   LZO_STATIC_CAST(t, e)
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_cte)
87ae4b
+#  if (LZO_CC_MSC || LZO_CC_WATCOMC)
87ae4b
+#    define __lzo_cte(e)            ((void)0,(e))
87ae4b
+#  elif 1
87ae4b
+#    define __lzo_cte(e)            ((void)0,(e))
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(__lzo_cte)
87ae4b
+#  define __lzo_cte(e)              (e)
ec4acb
+#endif
87ae4b
+#if !defined(LZO_BLOCK_BEGIN)
87ae4b
+#  define LZO_BLOCK_BEGIN           do {
87ae4b
+#  define LZO_BLOCK_END             } while __lzo_cte(0)
87ae4b
+#endif
87ae4b
+#if !defined(LZO_UNUSED)
87ae4b
+#  if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
87ae4b
+#    define LZO_UNUSED(var)         ((void) &var)
87ae4b
+#  elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC)
87ae4b
+#    define LZO_UNUSED(var)         if (&var) ; else
87ae4b
+#  elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030200ul))
87ae4b
+#    define LZO_UNUSED(var)         ((void) &var)
87ae4b
+#  elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#    define LZO_UNUSED(var)         ((void) var)
87ae4b
+#  elif (LZO_CC_MSC && (_MSC_VER < 900))
87ae4b
+#    define LZO_UNUSED(var)         if (&var) ; else
87ae4b
+#  elif (LZO_CC_KEILC)
87ae4b
+#    define LZO_UNUSED(var)         {LZO_EXTERN_C int lzo_unused__[1-2*!(sizeof(var)>0)];}
87ae4b
+#  elif (LZO_CC_PACIFICC)
87ae4b
+#    define LZO_UNUSED(var)         ((void) sizeof(var))
87ae4b
+#  elif (LZO_CC_WATCOMC) && defined(__cplusplus)
87ae4b
+#    define LZO_UNUSED(var)         ((void) var)
ec4acb
+#  else
87ae4b
+#    define LZO_UNUSED(var)         ((void) &var)
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_UNUSED_FUNC)
87ae4b
+#  if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
87ae4b
+#    define LZO_UNUSED_FUNC(func)   ((void) func)
87ae4b
+#  elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC)
87ae4b
+#    define LZO_UNUSED_FUNC(func)   if (func) ; else
87ae4b
+#  elif (LZO_CC_CLANG || LZO_CC_LLVM)
87ae4b
+#    define LZO_UNUSED_FUNC(func)   ((void) &func)
87ae4b
+#  elif (LZO_CC_MSC && (_MSC_VER < 900))
87ae4b
+#    define LZO_UNUSED_FUNC(func)   if (func) ; else
87ae4b
+#  elif (LZO_CC_MSC)
87ae4b
+#    define LZO_UNUSED_FUNC(func)   ((void) &func)
87ae4b
+#  elif (LZO_CC_KEILC || LZO_CC_PELLESC)
87ae4b
+#    define LZO_UNUSED_FUNC(func)   {LZO_EXTERN_C int lzo_unused_func__[1-2*!(sizeof((int)func)>0)];}
ec4acb
+#  else
87ae4b
+#    define LZO_UNUSED_FUNC(func)   ((void) func)
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_UNUSED_LABEL)
87ae4b
+#  if (LZO_CC_CLANG >= 0x020800ul)
87ae4b
+#    define LZO_UNUSED_LABEL(l)     (__lzo_gnuc_extension__ ((void) ((const void *) &&l)))
87ae4b
+#  elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC)
87ae4b
+#    define LZO_UNUSED_LABEL(l)     if __lzo_cte(0) goto l
ec4acb
+#  else
87ae4b
+#    define LZO_UNUSED_LABEL(l)     switch (0) case 1:goto l
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_DEFINE_UNINITIALIZED_VAR)
87ae4b
+#  if 0
87ae4b
+#    define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init)  type var
87ae4b
+#  elif 0 && (LZO_CC_GNUC)
87ae4b
+#    define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init)  type var = var
ec4acb
+#  else
87ae4b
+#    define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init)  type var = init
ec4acb
+#  endif
ec4acb
+#endif
ec4acb
+#if !defined(__lzo_inline)
ec4acb
+#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295))
ec4acb
+#elif defined(__cplusplus)
ec4acb
+#  define __lzo_inline          inline
87ae4b
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L)
87ae4b
+#  define __lzo_inline          inline
ec4acb
+#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
ec4acb
+#  define __lzo_inline          __inline
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
ec4acb
+#  define __lzo_inline          __inline__
ec4acb
+#elif (LZO_CC_DMC)
ec4acb
+#  define __lzo_inline          __inline
87ae4b
+#elif (LZO_CC_GHS)
87ae4b
+#  define __lzo_inline          __inline__
87ae4b
+#elif (LZO_CC_IBMC >= 600)
87ae4b
+#  define __lzo_inline          __inline__
ec4acb
+#elif (LZO_CC_INTELC)
ec4acb
+#  define __lzo_inline          __inline
ec4acb
+#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405))
ec4acb
+#  define __lzo_inline          __inline
ec4acb
+#elif (LZO_CC_MSC && (_MSC_VER >= 900))
ec4acb
+#  define __lzo_inline          __inline
87ae4b
+#elif (LZO_CC_SUNPROC >= 0x5100)
ec4acb
+#  define __lzo_inline          __inline__
ec4acb
+#endif
ec4acb
+#endif
ec4acb
+#if defined(__lzo_inline)
87ae4b
+#  ifndef __lzo_HAVE_inline
ec4acb
+#  define __lzo_HAVE_inline 1
87ae4b
+#  endif
ec4acb
+#else
ec4acb
+#  define __lzo_inline          /*empty*/
ec4acb
+#endif
ec4acb
+#if !defined(__lzo_forceinline)
ec4acb
+#if (LZO_CC_GNUC >= 0x030200ul)
ec4acb
+#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
87ae4b
+#elif (LZO_CC_IBMC >= 700)
87ae4b
+#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
87ae4b
+#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450))
ec4acb
+#  define __lzo_forceinline     __forceinline
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
ec4acb
+#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
ec4acb
+#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
ec4acb
+#elif (LZO_CC_MSC && (_MSC_VER >= 1200))
ec4acb
+#  define __lzo_forceinline     __forceinline
87ae4b
+#elif (LZO_CC_PGI >= 0x0d0a00ul)
87ae4b
+#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
87ae4b
+#elif (LZO_CC_SUNPROC >= 0x5100)
ec4acb
+#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
ec4acb
+#endif
ec4acb
+#endif
ec4acb
+#if defined(__lzo_forceinline)
87ae4b
+#  ifndef __lzo_HAVE_forceinline
ec4acb
+#  define __lzo_HAVE_forceinline 1
87ae4b
+#  endif
ec4acb
+#else
87ae4b
+#  define __lzo_forceinline     __lzo_inline
ec4acb
+#endif
ec4acb
+#if !defined(__lzo_noinline)
ec4acb
+#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul)
ec4acb
+#  define __lzo_noinline        __attribute__((__noinline__,__used__))
ec4acb
+#elif (LZO_CC_GNUC >= 0x030200ul)
ec4acb
+#  define __lzo_noinline        __attribute__((__noinline__))
87ae4b
+#elif (LZO_CC_IBMC >= 700)
87ae4b
+#  define __lzo_noinline        __attribute__((__noinline__))
87ae4b
+#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600))
ec4acb
+#  define __lzo_noinline        __declspec(noinline)
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
ec4acb
+#  define __lzo_noinline        __attribute__((__noinline__))
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
ec4acb
+#  define __lzo_noinline        __attribute__((__noinline__))
ec4acb
+#elif (LZO_CC_MSC && (_MSC_VER >= 1300))
ec4acb
+#  define __lzo_noinline        __declspec(noinline)
ec4acb
+#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64))
ec4acb
+#  if defined(__cplusplus)
ec4acb
+#  else
ec4acb
+#    define __lzo_noinline      __declspec(noinline)
ec4acb
+#  endif
87ae4b
+#elif (LZO_CC_PGI >= 0x0d0a00ul)
87ae4b
+#  define __lzo_noinline        __attribute__((__noinline__))
87ae4b
+#elif (LZO_CC_SUNPROC >= 0x5100)
ec4acb
+#  define __lzo_noinline        __attribute__((__noinline__))
ec4acb
+#endif
ec4acb
+#endif
ec4acb
+#if defined(__lzo_noinline)
87ae4b
+#  ifndef __lzo_HAVE_noinline
ec4acb
+#  define __lzo_HAVE_noinline 1
87ae4b
+#  endif
ec4acb
+#else
ec4acb
+#  define __lzo_noinline        /*empty*/
ec4acb
+#endif
ec4acb
+#if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
ec4acb
+#endif
87ae4b
+#if !defined(__lzo_static_inline)
87ae4b
+#if (LZO_CC_IBMC)
87ae4b
+#  define __lzo_static_inline       __lzo_gnuc_extension__ static __lzo_inline
ec4acb
+#endif
ec4acb
+#endif
87ae4b
+#if !defined(__lzo_static_inline)
87ae4b
+#  define __lzo_static_inline       static __lzo_inline
ec4acb
+#endif
87ae4b
+#if !defined(__lzo_static_forceinline)
87ae4b
+#if (LZO_CC_IBMC)
87ae4b
+#  define __lzo_static_forceinline  __lzo_gnuc_extension__ static __lzo_forceinline
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_static_forceinline)
87ae4b
+#  define __lzo_static_forceinline  static __lzo_forceinline
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_static_noinline)
87ae4b
+#if (LZO_CC_IBMC)
87ae4b
+#  define __lzo_static_noinline     __lzo_gnuc_extension__ static __lzo_noinline
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_static_noinline)
87ae4b
+#  define __lzo_static_noinline     static __lzo_noinline
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_c99_extern_inline)
87ae4b
+#if defined(__GNUC_GNU_INLINE__)
87ae4b
+#  define __lzo_c99_extern_inline   __lzo_inline
87ae4b
+#elif defined(__GNUC_STDC_INLINE__)
87ae4b
+#  define __lzo_c99_extern_inline   extern __lzo_inline
87ae4b
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L)
87ae4b
+#  define __lzo_c99_extern_inline   extern __lzo_inline
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_c99_extern_inline) && (__lzo_HAVE_inline)
87ae4b
+#  define __lzo_c99_extern_inline   __lzo_inline
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if defined(__lzo_c99_extern_inline)
87ae4b
+#  ifndef __lzo_HAVE_c99_extern_inline
87ae4b
+#  define __lzo_HAVE_c99_extern_inline 1
87ae4b
+#  endif
87ae4b
+#else
87ae4b
+#  define __lzo_c99_extern_inline   /*empty*/
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_may_alias)
87ae4b
+#if (LZO_CC_GNUC >= 0x030400ul)
87ae4b
+#  define __lzo_may_alias       __attribute__((__may_alias__))
87ae4b
+#elif (LZO_CC_CLANG >= 0x020900ul)
87ae4b
+#  define __lzo_may_alias       __attribute__((__may_alias__))
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1210)) && 0
87ae4b
+#  define __lzo_may_alias       __attribute__((__may_alias__))
87ae4b
+#elif (LZO_CC_PGI >= 0x0d0a00ul) && 0
87ae4b
+#  define __lzo_may_alias       __attribute__((__may_alias__))
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if defined(__lzo_may_alias)
87ae4b
+#  ifndef __lzo_HAVE_may_alias
87ae4b
+#  define __lzo_HAVE_may_alias 1
87ae4b
+#  endif
87ae4b
+#else
87ae4b
+#  define __lzo_may_alias       /*empty*/
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_noreturn)
87ae4b
+#if (LZO_CC_GNUC >= 0x020700ul)
87ae4b
+#  define __lzo_noreturn        __attribute__((__noreturn__))
87ae4b
+#elif (LZO_CC_IBMC >= 700)
87ae4b
+#  define __lzo_noreturn        __attribute__((__noreturn__))
87ae4b
+#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450))
87ae4b
+#  define __lzo_noreturn        __declspec(noreturn)
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600))
87ae4b
+#  define __lzo_noreturn        __attribute__((__noreturn__))
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#  define __lzo_noreturn        __attribute__((__noreturn__))
87ae4b
+#elif (LZO_CC_MSC && (_MSC_VER >= 1200))
87ae4b
+#  define __lzo_noreturn        __declspec(noreturn)
87ae4b
+#elif (LZO_CC_PGI >= 0x0d0a00ul)
87ae4b
+#  define __lzo_noreturn        __attribute__((__noreturn__))
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if defined(__lzo_noreturn)
87ae4b
+#  ifndef __lzo_HAVE_noreturn
87ae4b
+#  define __lzo_HAVE_noreturn 1
87ae4b
+#  endif
87ae4b
+#else
87ae4b
+#  define __lzo_noreturn        /*empty*/
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_nothrow)
87ae4b
+#if (LZO_CC_GNUC >= 0x030300ul)
87ae4b
+#  define __lzo_nothrow         __attribute__((__nothrow__))
87ae4b
+#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) && defined(__cplusplus)
87ae4b
+#  define __lzo_nothrow         __declspec(nothrow)
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 900))
87ae4b
+#  define __lzo_nothrow         __attribute__((__nothrow__))
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#  define __lzo_nothrow         __attribute__((__nothrow__))
87ae4b
+#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
ec4acb
+#  define __lzo_nothrow         __declspec(nothrow)
ec4acb
+#endif
ec4acb
+#endif
ec4acb
+#if defined(__lzo_nothrow)
87ae4b
+#  ifndef __lzo_HAVE_nothrow
ec4acb
+#  define __lzo_HAVE_nothrow 1
87ae4b
+#  endif
ec4acb
+#else
ec4acb
+#  define __lzo_nothrow         /*empty*/
ec4acb
+#endif
ec4acb
+#if !defined(__lzo_restrict)
ec4acb
+#if (LZO_CC_GNUC >= 0x030400ul)
ec4acb
+#  define __lzo_restrict        __restrict__
87ae4b
+#elif (LZO_CC_IBMC >= 800) && !defined(__cplusplus)
ec4acb
+#  define __lzo_restrict        __restrict__
87ae4b
+#elif (LZO_CC_IBMC >= 1210)
87ae4b
+#  define __lzo_restrict        __restrict__
87ae4b
+#elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600))
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600))
87ae4b
+#  define __lzo_restrict        __restrict__
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM)
ec4acb
+#  define __lzo_restrict        __restrict__
ec4acb
+#elif (LZO_CC_MSC && (_MSC_VER >= 1400))
ec4acb
+#  define __lzo_restrict        __restrict
87ae4b
+#elif (LZO_CC_PGI >= 0x0d0a00ul)
87ae4b
+#  define __lzo_restrict        __restrict__
ec4acb
+#endif
ec4acb
+#endif
ec4acb
+#if defined(__lzo_restrict)
87ae4b
+#  ifndef __lzo_HAVE_restrict
ec4acb
+#  define __lzo_HAVE_restrict 1
87ae4b
+#  endif
ec4acb
+#else
ec4acb
+#  define __lzo_restrict        /*empty*/
ec4acb
+#endif
87ae4b
+#if !defined(__lzo_alignof)
87ae4b
+#if (LZO_CC_ARMCC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
87ae4b
+#  define __lzo_alignof(e)      __alignof__(e)
87ae4b
+#elif (LZO_CC_GHS) && !defined(__cplusplus)
87ae4b
+#  define __lzo_alignof(e)      __alignof__(e)
87ae4b
+#elif (LZO_CC_IBMC >= 600)
87ae4b
+#  define __lzo_alignof(e)      (__lzo_gnuc_extension__ __alignof__(e))
87ae4b
+#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700))
87ae4b
+#  define __lzo_alignof(e)      __alignof__(e)
87ae4b
+#elif (LZO_CC_MSC && (_MSC_VER >= 1300))
87ae4b
+#  define __lzo_alignof(e)      __alignof(e)
87ae4b
+#elif (LZO_CC_SUNPROC >= 0x5100)
87ae4b
+#  define __lzo_alignof(e)      __alignof__(e)
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if defined(__lzo_alignof)
87ae4b
+#  ifndef __lzo_HAVE_alignof
87ae4b
+#  define __lzo_HAVE_alignof 1
87ae4b
+#  endif
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_struct_packed)
87ae4b
+#if   (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
87ae4b
+#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul))
87ae4b
+#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
87ae4b
+#elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul))
87ae4b
+#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus)
87ae4b
+#elif (LZO_CC_GNUC >= 0x030400ul) && !(LZO_CC_PCC_GNUC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386)
87ae4b
+#  define __lzo_struct_packed(s)        struct s {
87ae4b
+#  define __lzo_struct_packed_end()     } __attribute__((__gcc_struct__,__packed__));
87ae4b
+#  define __lzo_struct_packed_ma_end()  } __lzo_may_alias __attribute__((__gcc_struct__,__packed__));
87ae4b
+#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))
87ae4b
+#  define __lzo_struct_packed(s)        struct s {
87ae4b
+#  define __lzo_struct_packed_end()     } __attribute__((__packed__));
87ae4b
+#  define __lzo_struct_packed_ma_end()  } __lzo_may_alias __attribute__((__packed__));
87ae4b
+#elif (LZO_CC_IBMC >= 700)
87ae4b
+#  define __lzo_struct_packed(s)        __lzo_gnuc_extension__ struct s {
87ae4b
+#  define __lzo_struct_packed_end()     } __attribute__((__packed__));
87ae4b
+#  define __lzo_struct_packed_ma_end()  } __lzo_may_alias __attribute__((__packed__));
87ae4b
+#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300))
87ae4b
+#  define __lzo_struct_packed(s)        __pragma(pack(push,1)) struct s {
87ae4b
+#  define __lzo_struct_packed_end()     } __pragma(pack(pop));
87ae4b
+#elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900))
87ae4b
+#  define __lzo_struct_packed(s)        _Packed struct s {
87ae4b
+#  define __lzo_struct_packed_end()     };
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if defined(__lzo_struct_packed) && !defined(__lzo_struct_packed_ma)
87ae4b
+#  define __lzo_struct_packed_ma(s)     __lzo_struct_packed(s)
87ae4b
+#endif
87ae4b
+#if defined(__lzo_struct_packed_end) && !defined(__lzo_struct_packed_ma_end)
87ae4b
+#  define __lzo_struct_packed_ma_end()  __lzo_struct_packed_end()
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_byte_struct)
87ae4b
+#if defined(__lzo_struct_packed)
87ae4b
+#  define __lzo_byte_struct(s,n)        __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end()
87ae4b
+#  define __lzo_byte_struct_ma(s,n)     __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end()
87ae4b
+#elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_PGI || (LZO_CC_SUNPROC >= 0x5100))
87ae4b
+#  define __lzo_byte_struct(s,n)        struct s { unsigned char a[n]; } __attribute__((__packed__));
87ae4b
+#  define __lzo_byte_struct_ma(s,n)     struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__));
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if defined(__lzo_byte_struct) &&  !defined(__lzo_byte_struct_ma)
87ae4b
+#  define __lzo_byte_struct_ma(s,n)     __lzo_byte_struct(s,n)
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_struct_align16) && (__lzo_HAVE_alignof)
87ae4b
+#if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul))
87ae4b
+#elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
87ae4b
+#elif (LZO_CC_CILLY || LZO_CC_PCC)
87ae4b
+#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300))
87ae4b
+#  define __lzo_struct_align16(s)       struct __declspec(align(16)) s {
87ae4b
+#  define __lzo_struct_align16_end()    };
87ae4b
+#  define __lzo_struct_align32(s)       struct __declspec(align(32)) s {
87ae4b
+#  define __lzo_struct_align32_end()    };
87ae4b
+#  define __lzo_struct_align64(s)       struct __declspec(align(64)) s {
87ae4b
+#  define __lzo_struct_align64_end()    };
87ae4b
+#elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || (LZO_CC_IBMC >= 700) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#  define __lzo_struct_align16(s)       struct s {
87ae4b
+#  define __lzo_struct_align16_end()    } __attribute__((__aligned__(16)));
87ae4b
+#  define __lzo_struct_align32(s)       struct s {
87ae4b
+#  define __lzo_struct_align32_end()    } __attribute__((__aligned__(32)));
87ae4b
+#  define __lzo_struct_align64(s)       struct s {
87ae4b
+#  define __lzo_struct_align64_end()    } __attribute__((__aligned__(64)));
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_union_um)
87ae4b
+#if   (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
87ae4b
+#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul))
87ae4b
+#elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER < 810))
87ae4b
+#elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul))
87ae4b
+#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus)
87ae4b
+#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))
87ae4b
+#  define __lzo_union_am(s)             union s {
87ae4b
+#  define __lzo_union_am_end()          } __lzo_may_alias;
87ae4b
+#  define __lzo_union_um(s)             union s {
87ae4b
+#  define __lzo_union_um_end()          } __lzo_may_alias __attribute__((__packed__));
87ae4b
+#elif (LZO_CC_IBMC >= 700)
87ae4b
+#  define __lzo_union_am(s)             __lzo_gnuc_extension__ union s {
87ae4b
+#  define __lzo_union_am_end()          } __lzo_may_alias;
87ae4b
+#  define __lzo_union_um(s)             __lzo_gnuc_extension__ union s {
87ae4b
+#  define __lzo_union_um_end()          } __lzo_may_alias __attribute__((__packed__));
87ae4b
+#elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300))
87ae4b
+#  define __lzo_union_um(s)             __pragma(pack(push,1)) union s {
87ae4b
+#  define __lzo_union_um_end()          } __pragma(pack(pop));
87ae4b
+#elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900))
87ae4b
+#  define __lzo_union_um(s)             _Packed union s {
87ae4b
+#  define __lzo_union_um_end()          };
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_union_am)
87ae4b
+#  define __lzo_union_am(s)             union s {
87ae4b
+#  define __lzo_union_am_end()          };
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_constructor)
87ae4b
+#if (LZO_CC_GNUC >= 0x030400ul)
87ae4b
+#  define __lzo_constructor     __attribute__((__constructor__,__used__))
87ae4b
+#elif (LZO_CC_GNUC >= 0x020700ul)
87ae4b
+#  define __lzo_constructor     __attribute__((__constructor__))
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
87ae4b
+#  define __lzo_constructor     __attribute__((__constructor__,__used__))
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#  define __lzo_constructor     __attribute__((__constructor__))
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if defined(__lzo_constructor)
87ae4b
+#  ifndef __lzo_HAVE_constructor
87ae4b
+#  define __lzo_HAVE_constructor 1
87ae4b
+#  endif
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_destructor)
87ae4b
+#if (LZO_CC_GNUC >= 0x030400ul)
87ae4b
+#  define __lzo_destructor      __attribute__((__destructor__,__used__))
87ae4b
+#elif (LZO_CC_GNUC >= 0x020700ul)
87ae4b
+#  define __lzo_destructor      __attribute__((__destructor__))
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
87ae4b
+#  define __lzo_destructor      __attribute__((__destructor__,__used__))
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#  define __lzo_destructor      __attribute__((__destructor__))
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if defined(__lzo_destructor)
87ae4b
+#  ifndef __lzo_HAVE_destructor
87ae4b
+#  define __lzo_HAVE_destructor 1
87ae4b
+#  endif
87ae4b
+#endif
87ae4b
+#if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor)
87ae4b
+#  error "unexpected configuration - check your compiler defines"
87ae4b
+#endif
ec4acb
+#if !defined(__lzo_likely) && !defined(__lzo_unlikely)
ec4acb
+#if (LZO_CC_GNUC >= 0x030200ul)
ec4acb
+#  define __lzo_likely(e)       (__builtin_expect(!!(e),1))
ec4acb
+#  define __lzo_unlikely(e)     (__builtin_expect(!!(e),0))
87ae4b
+#elif (LZO_CC_IBMC >= 1010)
87ae4b
+#  define __lzo_likely(e)       (__builtin_expect(!!(e),1))
87ae4b
+#  define __lzo_unlikely(e)     (__builtin_expect(!!(e),0))
ec4acb
+#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800))
ec4acb
+#  define __lzo_likely(e)       (__builtin_expect(!!(e),1))
ec4acb
+#  define __lzo_unlikely(e)     (__builtin_expect(!!(e),0))
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
ec4acb
+#  define __lzo_likely(e)       (__builtin_expect(!!(e),1))
ec4acb
+#  define __lzo_unlikely(e)     (__builtin_expect(!!(e),0))
ec4acb
+#endif
ec4acb
+#endif
ec4acb
+#if defined(__lzo_likely)
87ae4b
+#  ifndef __lzo_HAVE_likely
ec4acb
+#  define __lzo_HAVE_likely 1
87ae4b
+#  endif
ec4acb
+#else
ec4acb
+#  define __lzo_likely(e)       (e)
ec4acb
+#endif
ec4acb
+#if defined(__lzo_unlikely)
87ae4b
+#  ifndef __lzo_HAVE_unlikely
ec4acb
+#  define __lzo_HAVE_unlikely 1
87ae4b
+#  endif
ec4acb
+#else
ec4acb
+#  define __lzo_unlikely(e)     (e)
ec4acb
+#endif
87ae4b
+#if !defined(__lzo_static_unused_void_func)
87ae4b
+#  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)
87ae4b
+#    define __lzo_static_unused_void_func(f)    static void __attribute__((__unused__)) f(void)
ec4acb
+#  else
87ae4b
+#    define __lzo_static_unused_void_func(f)    static __lzo_inline void f(void)
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(__lzo_loop_forever)
87ae4b
+#  if (LZO_CC_IBMC)
87ae4b
+#    define __lzo_loop_forever()    LZO_BLOCK_BEGIN for (;;) { ; } LZO_BLOCK_END
ec4acb
+#  else
87ae4b
+#    define __lzo_loop_forever()    do { ; } while __lzo_cte(1)
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#if !defined(__lzo_unreachable)
87ae4b
+#if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul))
87ae4b
+#  define __lzo_unreachable()       __builtin_unreachable();
87ae4b
+#elif (LZO_CC_GNUC >= 0x040500ul)
87ae4b
+#  define __lzo_unreachable()       __builtin_unreachable();
87ae4b
+#elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1300)) && 1
87ae4b
+#  define __lzo_unreachable()       __builtin_unreachable();
ec4acb
+#endif
87ae4b
+#endif
87ae4b
+#if defined(__lzo_unreachable)
87ae4b
+#  ifndef __lzo_HAVE_unreachable
87ae4b
+#  define __lzo_HAVE_unreachable 1
87ae4b
+#  endif
87ae4b
+#else
ec4acb
+#  if 0
87ae4b
+#  define __lzo_unreachable()       ((void)0);
ec4acb
+#  else
87ae4b
+#  define __lzo_unreachable()       __lzo_loop_forever();
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+#ifndef __LZO_CTA_NAME
87ae4b
+#if (LZO_CFG_USE_COUNTER)
87ae4b
+#  define __LZO_CTA_NAME(a)         LZO_PP_ECONCAT2(a,__COUNTER__)
87ae4b
+#else
87ae4b
+#  define __LZO_CTA_NAME(a)         LZO_PP_ECONCAT2(a,__LINE__)
87ae4b
+#endif
ec4acb
+#endif
ec4acb
+#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER)
ec4acb
+#  if (LZO_CC_AZTECC || LZO_CC_ZORTECHC)
87ae4b
+#    define LZO_COMPILE_TIME_ASSERT_HEADER(e)  LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END
ec4acb
+#  elif (LZO_CC_DMC || LZO_CC_SYMANTECC)
87ae4b
+#    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
ec4acb
+#  elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
87ae4b
+#    define LZO_COMPILE_TIME_ASSERT_HEADER(e)  LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END
87ae4b
+#  elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020900ul)) && defined(__cplusplus)
87ae4b
+#    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
87ae4b
+#  elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__)
87ae4b
+#    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
ec4acb
+#  else
87ae4b
+#    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
ec4acb
+#  endif
ec4acb
+#endif
ec4acb
+#if !defined(LZO_COMPILE_TIME_ASSERT)
ec4acb
+#  if (LZO_CC_AZTECC)
87ae4b
+#    define LZO_COMPILE_TIME_ASSERT(e)  {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-!(e)];}
ec4acb
+#  elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
ec4acb
+#    define LZO_COMPILE_TIME_ASSERT(e)  switch(0) case 1:case !(e):break;
87ae4b
+#  elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__)
87ae4b
+#    define LZO_COMPILE_TIME_ASSERT(e)  {(void) (0/!!(e));}
87ae4b
+#  elif (LZO_CC_GNUC >= 0x040700ul) && (LZO_CFG_USE_COUNTER) && defined(__cplusplus)
87ae4b
+#    define LZO_COMPILE_TIME_ASSERT(e)  {enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__));}
87ae4b
+#  elif (LZO_CC_GNUC >= 0x040700ul)
87ae4b
+#    define LZO_COMPILE_TIME_ASSERT(e)  {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));}
ec4acb
+#  elif (LZO_CC_MSC && (_MSC_VER < 900))
ec4acb
+#    define LZO_COMPILE_TIME_ASSERT(e)  switch(0) case 1:case !(e):break;
ec4acb
+#  elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
ec4acb
+#    define LZO_COMPILE_TIME_ASSERT(e)  switch(0) case 1:case !(e):break;
ec4acb
+#  else
87ae4b
+#    define LZO_COMPILE_TIME_ASSERT(e)  {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)];}
ec4acb
+#  endif
ec4acb
+#endif
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(1 == 1)
87ae4b
+#if defined(__cplusplus)
87ae4b
+extern "C" { LZO_COMPILE_TIME_ASSERT_HEADER(2 == 2) }
87ae4b
+#endif
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(3 == 3)
ec4acb
+#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)
ec4acb
+#  if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC)
ec4acb
+#  elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
ec4acb
+#    define __lzo_cdecl                 __cdecl
ec4acb
+#    define __lzo_cdecl_atexit          /*empty*/
ec4acb
+#    define __lzo_cdecl_main            __cdecl
ec4acb
+#    if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
ec4acb
+#      define __lzo_cdecl_qsort         __pascal
ec4acb
+#    elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
ec4acb
+#      define __lzo_cdecl_qsort         _stdcall
ec4acb
+#    else
ec4acb
+#      define __lzo_cdecl_qsort         __cdecl
ec4acb
+#    endif
ec4acb
+#  elif (LZO_CC_WATCOMC)
ec4acb
+#    define __lzo_cdecl                 __cdecl
ec4acb
+#  else
ec4acb
+#    define __lzo_cdecl                 __cdecl
ec4acb
+#    define __lzo_cdecl_atexit          __cdecl
ec4acb
+#    define __lzo_cdecl_main            __cdecl
ec4acb
+#    define __lzo_cdecl_qsort           __cdecl
ec4acb
+#  endif
ec4acb
+#  if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC)
ec4acb
+#  elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
ec4acb
+#    define __lzo_cdecl_sighandler      __pascal
ec4acb
+#  elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
ec4acb
+#    define __lzo_cdecl_sighandler      _stdcall
ec4acb
+#  elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
ec4acb
+#    define __lzo_cdecl_sighandler      __clrcall
ec4acb
+#  elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
ec4acb
+#    if defined(_DLL)
ec4acb
+#      define __lzo_cdecl_sighandler    _far _cdecl _loadds
ec4acb
+#    elif defined(_MT)
ec4acb
+#      define __lzo_cdecl_sighandler    _far _cdecl
ec4acb
+#    else
87ae4b
+#      define __lzo_cdecl_sighandler    _cdecl
87ae4b
+#    endif
87ae4b
+#  else
87ae4b
+#    define __lzo_cdecl_sighandler      __cdecl
87ae4b
+#  endif
87ae4b
+#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC)
87ae4b
+#  define __lzo_cdecl                   __cdecl
87ae4b
+#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC))
87ae4b
+#  define __lzo_cdecl                   cdecl
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_cdecl)
87ae4b
+#  define __lzo_cdecl                   /*empty*/
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_cdecl_atexit)
87ae4b
+#  define __lzo_cdecl_atexit            /*empty*/
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_cdecl_main)
87ae4b
+#  define __lzo_cdecl_main              /*empty*/
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_cdecl_qsort)
87ae4b
+#  define __lzo_cdecl_qsort             /*empty*/
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_cdecl_sighandler)
87ae4b
+#  define __lzo_cdecl_sighandler        /*empty*/
87ae4b
+#endif
87ae4b
+#if !defined(__lzo_cdecl_va)
87ae4b
+#  define __lzo_cdecl_va                __lzo_cdecl
87ae4b
+#endif
87ae4b
+#if !(LZO_CFG_NO_WINDOWS_H)
87ae4b
+#if !defined(LZO_HAVE_WINDOWS_H)
87ae4b
+#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64)
87ae4b
+#  if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000))
87ae4b
+#  elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__)
87ae4b
+#  elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul)))
87ae4b
+#  else
87ae4b
+#    define LZO_HAVE_WINDOWS_H 1
87ae4b
+#  endif
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF_SHORT
ec4acb
 #if defined(SIZEOF_SHORT)
ec4acb
 #  define LZO_SIZEOF_SHORT          (SIZEOF_SHORT)
87ae4b
+#elif defined(__SIZEOF_SHORT__)
87ae4b
+#  define LZO_SIZEOF_SHORT          (__SIZEOF_SHORT__)
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF_INT
ec4acb
 #if defined(SIZEOF_INT)
ec4acb
 #  define LZO_SIZEOF_INT            (SIZEOF_INT)
87ae4b
+#elif defined(__SIZEOF_INT__)
87ae4b
+#  define LZO_SIZEOF_INT            (__SIZEOF_INT__)
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF_LONG
ec4acb
 #if defined(SIZEOF_LONG)
ec4acb
 #  define LZO_SIZEOF_LONG           (SIZEOF_LONG)
87ae4b
+#elif defined(__SIZEOF_LONG__)
87ae4b
+#  define LZO_SIZEOF_LONG           (__SIZEOF_LONG__)
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF_LONG_LONG
ec4acb
 #if defined(SIZEOF_LONG_LONG)
ec4acb
 #  define LZO_SIZEOF_LONG_LONG      (SIZEOF_LONG_LONG)
87ae4b
+#elif defined(__SIZEOF_LONG_LONG__)
87ae4b
+#  define LZO_SIZEOF_LONG_LONG      (__SIZEOF_LONG_LONG__)
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF___INT16
ec4acb
 #if defined(SIZEOF___INT16)
ec4acb
 #  define LZO_SIZEOF___INT16        (SIZEOF___INT16)
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF___INT32
ec4acb
 #if defined(SIZEOF___INT32)
ec4acb
 #  define LZO_SIZEOF___INT32        (SIZEOF___INT32)
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF___INT64
ec4acb
 #if defined(SIZEOF___INT64)
ec4acb
 #  define LZO_SIZEOF___INT64        (SIZEOF___INT64)
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF_VOID_P
ec4acb
 #if defined(SIZEOF_VOID_P)
ec4acb
 #  define LZO_SIZEOF_VOID_P         (SIZEOF_VOID_P)
87ae4b
+#elif defined(__SIZEOF_POINTER__)
87ae4b
+#  define LZO_SIZEOF_VOID_P         (__SIZEOF_POINTER__)
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF_SIZE_T
ec4acb
 #if defined(SIZEOF_SIZE_T)
ec4acb
 #  define LZO_SIZEOF_SIZE_T         (SIZEOF_SIZE_T)
87ae4b
+#elif defined(__SIZEOF_SIZE_T__)
87ae4b
+#  define LZO_SIZEOF_SIZE_T         (__SIZEOF_SIZE_T__)
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#ifndef LZO_SIZEOF_PTRDIFF_T
ec4acb
 #if defined(SIZEOF_PTRDIFF_T)
ec4acb
 #  define LZO_SIZEOF_PTRDIFF_T      (SIZEOF_PTRDIFF_T)
87ae4b
+#elif defined(__SIZEOF_PTRDIFF_T__)
87ae4b
+#  define LZO_SIZEOF_PTRDIFF_T      (__SIZEOF_PTRDIFF_T__)
87ae4b
+#endif
ec4acb
 #endif
ec4acb
 #define __LZO_LSR(x,b)    (((x)+0ul) >> (b))
ec4acb
 #if !defined(LZO_SIZEOF_SHORT)
ec4acb
@@ -1080,6 +2060,7 @@ extern "C" {
ec4acb
 #    error "LZO_SIZEOF_SHORT"
ec4acb
 #  endif
ec4acb
 #endif
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SHORT == sizeof(short))
ec4acb
 #if !defined(LZO_SIZEOF_INT)
ec4acb
 #  if (LZO_ARCH_CRAY_PVP)
ec4acb
 #    define LZO_SIZEOF_INT          8
ec4acb
@@ -1101,6 +2082,7 @@ extern "C" {
ec4acb
 #    error "LZO_SIZEOF_INT"
ec4acb
 #  endif
ec4acb
 #endif
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_INT == sizeof(int))
ec4acb
 #if !defined(LZO_SIZEOF_LONG)
ec4acb
 #  if (ULONG_MAX == LZO_0xffffffffL)
ec4acb
 #    define LZO_SIZEOF_LONG         4
ec4acb
@@ -1110,6 +2092,8 @@ extern "C" {
ec4acb
 #    define LZO_SIZEOF_LONG         2
ec4acb
 #  elif (__LZO_LSR(ULONG_MAX,31) == 1)
ec4acb
 #    define LZO_SIZEOF_LONG         4
87ae4b
+#  elif (__LZO_LSR(ULONG_MAX,39) == 1)
87ae4b
+#    define LZO_SIZEOF_LONG         5
ec4acb
 #  elif (__LZO_LSR(ULONG_MAX,63) == 1)
ec4acb
 #    define LZO_SIZEOF_LONG         8
ec4acb
 #  elif (__LZO_LSR(ULONG_MAX,127) == 1)
ec4acb
@@ -1118,11 +2102,12 @@ extern "C" {
ec4acb
 #    error "LZO_SIZEOF_LONG"
ec4acb
 #  endif
ec4acb
 #endif
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_LONG == sizeof(long))
ec4acb
 #if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64)
ec4acb
 #if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8)
ec4acb
 #  if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__)
ec4acb
 #    if (LZO_CC_GNUC >= 0x030300ul)
ec4acb
-#      if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0)
87ae4b
+#      if ((__LONG_MAX__-0) == (__LONG_LONG_MAX__-0))
ec4acb
 #        define LZO_SIZEOF_LONG_LONG      LZO_SIZEOF_LONG
ec4acb
 #      elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1)
ec4acb
 #        define LZO_SIZEOF_LONG_LONG      4
ec4acb
@@ -1136,7 +2121,7 @@ extern "C" {
ec4acb
 #if (LZO_ARCH_I086 && LZO_CC_DMC)
ec4acb
 #elif (LZO_CC_CILLY) && defined(__GNUC__)
ec4acb
 #  define LZO_SIZEOF_LONG_LONG      8
ec4acb
-#elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
87ae4b
+#elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
ec4acb
 #  define LZO_SIZEOF_LONG_LONG      8
ec4acb
 #elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400))
ec4acb
 #  define LZO_SIZEOF_LONG_LONG      8
ec4acb
@@ -1158,11 +2143,13 @@ extern "C" {
ec4acb
 #  define LZO_SIZEOF___INT64        8
ec4acb
 #elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100)))
ec4acb
 #  define LZO_SIZEOF___INT64        8
ec4acb
-#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64))
87ae4b
+#elif (LZO_CC_GHS && defined(__LLONG_BIT) && ((__LLONG_BIT-0) == 64))
87ae4b
+#  define LZO_SIZEOF_LONG_LONG      8
87ae4b
+#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && ((_INTEGRAL_MAX_BITS-0) == 64))
ec4acb
 #  define LZO_SIZEOF___INT64        8
ec4acb
 #elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
ec4acb
 #  define LZO_SIZEOF_LONG_LONG      8
ec4acb
-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
87ae4b
+#elif (defined(__vms) || defined(__VMS)) && ((__INITIAL_POINTER_SIZE-0) == 64)
ec4acb
 #  define LZO_SIZEOF_LONG_LONG      8
ec4acb
 #elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2)
ec4acb
 #elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
ec4acb
@@ -1175,87 +2162,127 @@ extern "C" {
ec4acb
 #    undef LZO_SIZEOF_LONG_LONG
ec4acb
 #  endif
ec4acb
 #endif
ec4acb
-#if (LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG)
87ae4b
+#if (LZO_CFG_NO_LONG_LONG)
87ae4b
+#  undef LZO_SIZEOF_LONG_LONG
87ae4b
+#elif defined(__NO_LONG_LONG)
87ae4b
+#  undef LZO_SIZEOF_LONG_LONG
87ae4b
+#elif defined(_NO_LONGLONG)
ec4acb
 #  undef LZO_SIZEOF_LONG_LONG
ec4acb
 #endif
ec4acb
-#if !defined(LZO_SIZEOF_VOID_P)
ec4acb
-#if (LZO_ARCH_I086)
ec4acb
-#  define __LZO_WORDSIZE            2
ec4acb
-#  if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM)
ec4acb
-#    define LZO_SIZEOF_VOID_P       2
ec4acb
-#  elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE)
ec4acb
-#    define LZO_SIZEOF_VOID_P       4
87ae4b
+#if !defined(LZO_WORDSIZE)
87ae4b
+#if (LZO_ARCH_ALPHA)
87ae4b
+#  define LZO_WORDSIZE              8
87ae4b
+#elif (LZO_ARCH_AMD64)
87ae4b
+#  define LZO_WORDSIZE              8
87ae4b
+#elif (LZO_ARCH_AVR)
87ae4b
+#  define LZO_WORDSIZE              1
87ae4b
+#elif (LZO_ARCH_H8300)
87ae4b
+#  if defined(__NORMAL_MODE__)
87ae4b
+#    define LZO_WORDSIZE            4
87ae4b
+#  elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
87ae4b
+#    define LZO_WORDSIZE            4
ec4acb
 #  else
ec4acb
-#    error "LZO_MM"
87ae4b
+#    define LZO_WORDSIZE            2
ec4acb
 #  endif
ec4acb
-#elif (LZO_ARCH_AVR || LZO_ARCH_Z80)
ec4acb
-#  define __LZO_WORDSIZE            1
87ae4b
+#elif (LZO_ARCH_I086)
87ae4b
+#  define LZO_WORDSIZE              2
87ae4b
+#elif (LZO_ARCH_IA64)
87ae4b
+#  define LZO_WORDSIZE              8
87ae4b
+#elif (LZO_ARCH_M16C)
87ae4b
+#  define LZO_WORDSIZE              2
87ae4b
+#elif (LZO_ARCH_SPU)
87ae4b
+#  define LZO_WORDSIZE              4
87ae4b
+#elif (LZO_ARCH_Z80)
87ae4b
+#  define LZO_WORDSIZE              1
87ae4b
+#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
87ae4b
+#  define LZO_WORDSIZE              8
87ae4b
+#elif (LZO_OS_OS400 || defined(__OS400__))
87ae4b
+#  define LZO_WORDSIZE              8
87ae4b
+#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
87ae4b
+#  define LZO_WORDSIZE              8
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if !defined(LZO_SIZEOF_VOID_P)
87ae4b
+#if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32)
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int)  == 4)
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4)
87ae4b
+#  define LZO_SIZEOF_VOID_P         4
87ae4b
+#elif defined(__ILP64__) || defined(__ILP64) || defined(_ILP64)
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int)  == 8)
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8)
87ae4b
+#  define LZO_SIZEOF_VOID_P         8
87ae4b
+#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4)
87ae4b
+#  define LZO_SIZEOF_VOID_P         8
87ae4b
+#elif defined(__LP64__) || defined(__LP64) || defined(_LP64)
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8)
87ae4b
+#  define LZO_SIZEOF_VOID_P         8
87ae4b
+#elif (LZO_ARCH_AVR)
ec4acb
 #  define LZO_SIZEOF_VOID_P         2
ec4acb
 #elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430)
ec4acb
 #  define LZO_SIZEOF_VOID_P         2
ec4acb
 #elif (LZO_ARCH_H8300)
ec4acb
 #  if defined(__NORMAL_MODE__)
ec4acb
-#    define __LZO_WORDSIZE          4
ec4acb
 #    define LZO_SIZEOF_VOID_P       2
ec4acb
 #  elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
ec4acb
-#    define __LZO_WORDSIZE          4
ec4acb
 #    define LZO_SIZEOF_VOID_P       4
ec4acb
 #  else
ec4acb
-#    define __LZO_WORDSIZE          2
ec4acb
 #    define LZO_SIZEOF_VOID_P       2
ec4acb
 #  endif
ec4acb
 #  if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4)
ec4acb
 #    define LZO_SIZEOF_SIZE_T       LZO_SIZEOF_INT
ec4acb
 #    define LZO_SIZEOF_PTRDIFF_T    LZO_SIZEOF_INT
ec4acb
 #  endif
87ae4b
+#elif (LZO_ARCH_I086)
87ae4b
+#  if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM)
87ae4b
+#    define LZO_SIZEOF_VOID_P       2
87ae4b
+#  elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE)
87ae4b
+#    define LZO_SIZEOF_VOID_P       4
87ae4b
+#  else
87ae4b
+#    error "invalid LZO_ARCH_I086 memory model"
87ae4b
+#  endif
ec4acb
 #elif (LZO_ARCH_M16C)
ec4acb
-#  define __LZO_WORDSIZE            2
ec4acb
 #  if defined(__m32c_cpu__) || defined(__m32cm_cpu__)
ec4acb
 #    define LZO_SIZEOF_VOID_P       4
ec4acb
 #  else
ec4acb
 #    define LZO_SIZEOF_VOID_P       2
ec4acb
 #  endif
87ae4b
+#elif (LZO_ARCH_SPU)
87ae4b
+#  define LZO_SIZEOF_VOID_P         4
87ae4b
+#elif (LZO_ARCH_Z80)
87ae4b
+#  define LZO_SIZEOF_VOID_P         2
ec4acb
 #elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
ec4acb
-#  define __LZO_WORDSIZE            8
ec4acb
 #  define LZO_SIZEOF_VOID_P         4
ec4acb
-#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
ec4acb
-#  define __LZO_WORDSIZE            8
ec4acb
-#  define LZO_SIZEOF_VOID_P         8
ec4acb
-#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
ec4acb
-#  define LZO_SIZEOF_VOID_P         LZO_SIZEOF_LONG
ec4acb
-#  define LZO_SIZEOF_SIZE_T         LZO_SIZEOF_LONG
ec4acb
-#  define LZO_SIZEOF_PTRDIFF_T      LZO_SIZEOF_LONG
ec4acb
 #elif (LZO_OS_OS400 || defined(__OS400__))
ec4acb
-#  define __LZO_WORDSIZE            LZO_SIZEOF_LONG
ec4acb
-#  define LZO_SIZEOF_VOID_P         16
ec4acb
-#  define LZO_SIZEOF_SIZE_T         LZO_SIZEOF_LONG
ec4acb
-#  define LZO_SIZEOF_PTRDIFF_T      LZO_SIZEOF_LONG
ec4acb
-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
ec4acb
-#  define LZO_SIZEOF_VOID_P         8
ec4acb
-#  define LZO_SIZEOF_SIZE_T         LZO_SIZEOF_LONG
ec4acb
-#  define LZO_SIZEOF_PTRDIFF_T      LZO_SIZEOF_LONG
ec4acb
-#elif (LZO_ARCH_SPU)
ec4acb
-# if 0
ec4acb
-#  define __LZO_WORDSIZE            16
ec4acb
-# endif
ec4acb
-#  define LZO_SIZEOF_VOID_P         4
ec4acb
-#else
ec4acb
-#  define LZO_SIZEOF_VOID_P         LZO_SIZEOF_LONG
ec4acb
-#endif
ec4acb
-#endif
ec4acb
-#if !defined(LZO_WORDSIZE)
ec4acb
-#  if defined(__LZO_WORDSIZE)
ec4acb
-#    define LZO_WORDSIZE            __LZO_WORDSIZE
87ae4b
+#  if defined(__LLP64_IFC__)
87ae4b
+#    define LZO_SIZEOF_VOID_P       8
87ae4b
+#    define LZO_SIZEOF_SIZE_T       LZO_SIZEOF_LONG
87ae4b
+#    define LZO_SIZEOF_PTRDIFF_T    LZO_SIZEOF_LONG
ec4acb
 #  else
ec4acb
-#    define LZO_WORDSIZE            LZO_SIZEOF_VOID_P
87ae4b
+#    define LZO_SIZEOF_VOID_P       16
87ae4b
+#    define LZO_SIZEOF_SIZE_T       LZO_SIZEOF_LONG
87ae4b
+#    define LZO_SIZEOF_PTRDIFF_T    LZO_SIZEOF_LONG
ec4acb
 #  endif
87ae4b
+#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
87ae4b
+#  define LZO_SIZEOF_VOID_P         8
87ae4b
+#  define LZO_SIZEOF_SIZE_T         LZO_SIZEOF_LONG
87ae4b
+#  define LZO_SIZEOF_PTRDIFF_T      LZO_SIZEOF_LONG
ec4acb
 #endif
87ae4b
+#endif
87ae4b
+#if !defined(LZO_SIZEOF_VOID_P)
87ae4b
+#  define LZO_SIZEOF_VOID_P         LZO_SIZEOF_LONG
87ae4b
+#endif
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_VOID_P == sizeof(void *))
ec4acb
 #if !defined(LZO_SIZEOF_SIZE_T)
ec4acb
 #if (LZO_ARCH_I086 || LZO_ARCH_M16C)
ec4acb
 #  define LZO_SIZEOF_SIZE_T         2
ec4acb
-#else
87ae4b
+#endif
87ae4b
+#endif
87ae4b
+#if !defined(LZO_SIZEOF_SIZE_T)
ec4acb
 #  define LZO_SIZEOF_SIZE_T         LZO_SIZEOF_VOID_P
ec4acb
 #endif
87ae4b
+#if defined(offsetof)
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SIZE_T == sizeof(size_t))
ec4acb
 #endif
ec4acb
 #if !defined(LZO_SIZEOF_PTRDIFF_T)
ec4acb
 #if (LZO_ARCH_I086)
ec4acb
@@ -1268,11 +2295,18 @@ extern "C" {
ec4acb
 #      define LZO_SIZEOF_PTRDIFF_T  2
87ae4b
 #    endif
87ae4b
 #  else
ec4acb
-#    error "LZO_MM"
87ae4b
+#    error "invalid LZO_ARCH_I086 memory model"
87ae4b
 #  endif
ec4acb
-#else
ec4acb
+#endif
ec4acb
+#endif
87ae4b
+#if !defined(LZO_SIZEOF_PTRDIFF_T)
ec4acb
 #  define LZO_SIZEOF_PTRDIFF_T      LZO_SIZEOF_SIZE_T
87ae4b
 #endif
87ae4b
+#if defined(offsetof)
87ae4b
+LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
ec4acb
+#endif
87ae4b
+#if !defined(LZO_WORDSIZE)
87ae4b
+#  define LZO_WORDSIZE              LZO_SIZEOF_VOID_P
87ae4b
 #endif
ec4acb
 #if (LZO_ABI_NEUTRAL_ENDIAN)
ec4acb
 #  undef LZO_ABI_BIG_ENDIAN
ec4acb
@@ -1284,7 +2318,7 @@ extern "C" {
ec4acb
 #  define LZO_ABI_LITTLE_ENDIAN     1
ec4acb
 #elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430)
ec4acb
 #  define LZO_ABI_LITTLE_ENDIAN     1
ec4acb
-#elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390)
87ae4b
+#elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390 || LZO_ARCH_SPU)
ec4acb
 #  define LZO_ABI_BIG_ENDIAN        1
ec4acb
 #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
ec4acb
 #  if (__LITTLE_ENDIAN__ == 1)
ec4acb
@@ -1300,6 +2334,19 @@ extern "C" {
ec4acb
 #  define LZO_ABI_BIG_ENDIAN        1
ec4acb
 #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
ec4acb
 #  define LZO_ABI_LITTLE_ENDIAN     1
87ae4b
+#elif 1 && (LZO_ARCH_ARM && LZO_CC_ARMCC_ARMCC)
87ae4b
+#  if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN)
87ae4b
+#    error "unexpected configuration - check your compiler defines"
87ae4b
+#  elif defined(__BIG_ENDIAN)
87ae4b
+#    define LZO_ABI_BIG_ENDIAN      1
87ae4b
+#  else
87ae4b
+#    define LZO_ABI_LITTLE_ENDIAN   1
87ae4b
+#  endif
87ae4b
+#  define LZO_ABI_LITTLE_ENDIAN     1
87ae4b
+#elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__)
87ae4b
+#  define LZO_ABI_BIG_ENDIAN        1
87ae4b
+#elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__)
87ae4b
+#  define LZO_ABI_LITTLE_ENDIAN     1
ec4acb
 #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
ec4acb
 #  define LZO_ABI_BIG_ENDIAN        1
ec4acb
 #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
ec4acb
@@ -1307,7 +2354,7 @@ extern "C" {
87ae4b
 #endif
87ae4b
 #endif
ec4acb
 #if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN)
ec4acb
-#  error "this should not happen"
87ae4b
+#  error "unexpected configuration - check your compiler defines"
ec4acb
 #endif
ec4acb
 #if (LZO_ABI_BIG_ENDIAN)
ec4acb
 #  define LZO_INFO_ABI_ENDIAN       "be"
ec4acb
@@ -1322,6 +2369,9 @@ extern "C" {
ec4acb
 #elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
ec4acb
 #  define LZO_ABI_ILP16         1
ec4acb
 #  define LZO_INFO_ABI_PM       "ilp16"
87ae4b
+#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4)
87ae4b
+#  define LZO_ABI_LP32          1
87ae4b
+#  define LZO_INFO_ABI_PM       "lp32"
ec4acb
 #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4)
ec4acb
 #  define LZO_ABI_ILP32         1
ec4acb
 #  define LZO_INFO_ABI_PM       "ilp32"
ec4acb
@@ -1338,7 +2388,8 @@ extern "C" {
ec4acb
 #  define LZO_ABI_IP32L64       1
ec4acb
 #  define LZO_INFO_ABI_PM       "ip32l64"
ec4acb
 #endif
ec4acb
-#if !defined(__LZO_LIBC_OVERRIDE)
87ae4b
+#if 0
87ae4b
+#elif !defined(__LZO_LIBC_OVERRIDE)
ec4acb
 #if (LZO_LIBC_NAKED)
ec4acb
 #  define LZO_INFO_LIBC         "naked"
ec4acb
 #elif (LZO_LIBC_FREESTANDING)
ec4acb
@@ -1349,6 +2400,9 @@ extern "C" {
ec4acb
 #  define LZO_INFO_LIBC         "isoc90"
ec4acb
 #elif (LZO_LIBC_ISOC99)
ec4acb
 #  define LZO_INFO_LIBC         "isoc99"
87ae4b
+#elif (LZO_CC_ARMCC_ARMCC) && defined(__ARMCLIB_VERSION)
87ae4b
+#  define LZO_LIBC_ISOC90       1
87ae4b
+#  define LZO_INFO_LIBC         "isoc90"
ec4acb
 #elif defined(__dietlibc__)
ec4acb
 #  define LZO_LIBC_DIETLIBC     1
ec4acb
 #  define LZO_INFO_LIBC         "dietlibc"
ec4acb
@@ -1357,13 +2411,13 @@ extern "C" {
ec4acb
 #  define LZO_INFO_LIBC         "newlib"
ec4acb
 #elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__)
ec4acb
 #  if defined(__UCLIBC_SUBLEVEL__)
ec4acb
-#    define LZO_LIBC_UCLIBC     (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__)
87ae4b
+#    define LZO_LIBC_UCLIBC     (__UCLIBC_MAJOR__ * 0x10000L + (__UCLIBC_MINOR__-0) * 0x100 + (__UCLIBC_SUBLEVEL__-0))
87ae4b
 #  else
ec4acb
 #    define LZO_LIBC_UCLIBC     0x00090bL
87ae4b
 #  endif
ec4acb
-#  define LZO_INFO_LIBC         "uclibc"
87ae4b
+#  define LZO_INFO_LIBC         "uc" "libc"
ec4acb
 #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
ec4acb
-#  define LZO_LIBC_GLIBC        (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100)
87ae4b
+#  define LZO_LIBC_GLIBC        (__GLIBC__ * 0x10000L + (__GLIBC_MINOR__-0) * 0x100)
ec4acb
 #  define LZO_INFO_LIBC         "glibc"
ec4acb
 #elif (LZO_CC_MWERKS) && defined(__MSL__)
ec4acb
 #  define LZO_LIBC_MSL          __MSL__
ec4acb
@@ -1376,423 +2430,159 @@ extern "C" {
ec4acb
 #  define LZO_INFO_LIBC         "default"
87ae4b
 #endif
87ae4b
 #endif
ec4acb
-#if !defined(__lzo_gnuc_extension__)
ec4acb
-#if (LZO_CC_GNUC >= 0x020800ul)
ec4acb
-#  define __lzo_gnuc_extension__    __extension__
ec4acb
-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
ec4acb
-#  define __lzo_gnuc_extension__    __extension__
ec4acb
-#else
ec4acb
-#  define __lzo_gnuc_extension__    /*empty*/
87ae4b
-#endif
ec4acb
-#endif
ec4acb
-#if !defined(__lzo_ua_volatile)
ec4acb
-#  define __lzo_ua_volatile     volatile
ec4acb
-#endif
ec4acb
-#if !defined(__lzo_alignof)
ec4acb
-#if (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
ec4acb
-#  define __lzo_alignof(e)      __alignof__(e)
ec4acb
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700))
ec4acb
-#  define __lzo_alignof(e)      __alignof__(e)
ec4acb
-#elif (LZO_CC_MSC && (_MSC_VER >= 1300))
ec4acb
-#  define __lzo_alignof(e)      __alignof(e)
ec4acb
-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
ec4acb
-#  define __lzo_alignof(e)      __alignof__(e)
ec4acb
-#endif
ec4acb
-#endif
ec4acb
-#if defined(__lzo_alignof)
ec4acb
-#  define __lzo_HAVE_alignof 1
ec4acb
-#endif
ec4acb
-#if !defined(__lzo_constructor)
ec4acb
-#if (LZO_CC_GNUC >= 0x030400ul)
ec4acb
-#  define __lzo_constructor     __attribute__((__constructor__,__used__))
ec4acb
-#elif (LZO_CC_GNUC >= 0x020700ul)
ec4acb
-#  define __lzo_constructor     __attribute__((__constructor__))
ec4acb
-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
ec4acb
-#  define __lzo_constructor     __attribute__((__constructor__))
ec4acb
-#endif
ec4acb
-#endif
ec4acb
-#if defined(__lzo_constructor)
ec4acb
-#  define __lzo_HAVE_constructor 1
ec4acb
-#endif
ec4acb
-#if !defined(__lzo_destructor)
ec4acb
-#if (LZO_CC_GNUC >= 0x030400ul)
ec4acb
-#  define __lzo_destructor      __attribute__((__destructor__,__used__))
ec4acb
-#elif (LZO_CC_GNUC >= 0x020700ul)
ec4acb
-#  define __lzo_destructor      __attribute__((__destructor__))
ec4acb
-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
ec4acb
-#  define __lzo_destructor      __attribute__((__destructor__))
ec4acb
-#endif
ec4acb
-#endif
ec4acb
-#if defined(__lzo_destructor)
ec4acb
-#  define __lzo_HAVE_destructor 1
ec4acb
-#endif
ec4acb
-#if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor)
ec4acb
-#  error "this should not happen"
ec4acb
-#endif
ec4acb
-#if !defined(__lzo_inline)
ec4acb
-#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295))
ec4acb
-#elif defined(__cplusplus)
ec4acb
-#  define __lzo_inline          inline
ec4acb
-#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
ec4acb
-#  define __lzo_inline          __inline
ec4acb
-#elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
ec4acb
-#  define __lzo_inline          __inline__
ec4acb
-#elif (LZO_CC_DMC)
ec4acb
-#  define __lzo_inline          __inline
87ae4b
-#elif (LZO_CC_INTELC)
ec4acb
-#  define __lzo_inline          __inline
ec4acb
-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405))
ec4acb
-#  define __lzo_inline          __inline
ec4acb
-#elif (LZO_CC_MSC && (_MSC_VER >= 900))
ec4acb
-#  define __lzo_inline          __inline
ec4acb
-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
ec4acb
-#  define __lzo_inline          __inline__
ec4acb
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
ec4acb
-#  define __lzo_inline          inline
ec4acb
-#endif
ec4acb
-#endif
ec4acb
-#if defined(__lzo_inline)
ec4acb
-#  define __lzo_HAVE_inline 1
87ae4b
-#else
ec4acb
-#  define __lzo_inline          /*empty*/
87ae4b
-#endif
ec4acb
-#if !defined(__lzo_forceinline)
ec4acb
-#if (LZO_CC_GNUC >= 0x030200ul)
ec4acb
-#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
ec4acb
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC)
ec4acb
-#  define __lzo_forceinline     __forceinline
ec4acb
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
ec4acb
-#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
ec4acb
-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
ec4acb
-#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
ec4acb
-#elif (LZO_CC_MSC && (_MSC_VER >= 1200))
ec4acb
-#  define __lzo_forceinline     __forceinline
ec4acb
-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
ec4acb
-#  define __lzo_forceinline     __inline__ __attribute__((__always_inline__))
87ae4b
-#endif
ec4acb
-#endif
ec4acb
-#if defined(__lzo_forceinline)
ec4acb
-#  define __lzo_HAVE_forceinline 1
ec4acb
-#else
ec4acb
-#  define __lzo_forceinline     /*empty*/
ec4acb
-#endif
ec4acb
-#if !defined(__lzo_noinline)
ec4acb
-#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul)
ec4acb
-#  define __lzo_noinline        __attribute__((__noinline__,__used__))
ec4acb
-#elif (LZO_CC_GNUC >= 0x030200ul)
ec4acb
-#  define __lzo_noinline        __attribute__((__noinline__))
ec4acb
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC)
ec4acb
-#  define __lzo_noinline        __declspec(noinline)
ec4acb
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
ec4acb
-#  define __lzo_noinline        __attribute__((__noinline__))
ec4acb
-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
ec4acb
-#  define __lzo_noinline        __attribute__((__noinline__))
ec4acb
-#elif (LZO_CC_MSC && (_MSC_VER >= 1300))
ec4acb
-#  define __lzo_noinline        __declspec(noinline)
ec4acb
-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64))
ec4acb
-#  if defined(__cplusplus)
ec4acb
-#  else
ec4acb
-#    define __lzo_noinline      __declspec(noinline)
ec4acb
-#  endif
ec4acb
-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
ec4acb
-#  define __lzo_noinline        __attribute__((__noinline__))
ec4acb
-#endif
ec4acb
-#endif
ec4acb
-#if defined(__lzo_noinline)