Update miniLZO to 2.0.4. Apparently fixes a bug when used with gcc 4.5

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7075 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2011-02-05 04:59:33 +00:00
parent 4a20647ab6
commit 0841be0fea
5 changed files with 409 additions and 281 deletions

View File

@ -6,8 +6,8 @@
Author : Markus Franz Xaver Johannes Oberhumer Author : Markus Franz Xaver Johannes Oberhumer
<markus@oberhumer.com> <markus@oberhumer.com>
http://www.oberhumer.com/opensource/lzo/ http://www.oberhumer.com/opensource/lzo/
Version : 2.03 Version : 2.04
Date : 30 Apr 2008 Date : 31 Oct 2010
I've created miniLZO for projects where it is inconvenient to I've created miniLZO for projects where it is inconvenient to
include (or require) the full LZO source code just because you include (or require) the full LZO source code just because you
@ -24,7 +24,7 @@
To use miniLZO just copy these files into your source directory, add To use miniLZO just copy these files into your source directory, add
minilzo.c to your Makefile and #include minilzo.h from your program. minilzo.c to your Makefile and #include minilzo.h from your program.
Note: you also must distribute this file (`README.LZO') with your project. Note: you also must distribute this file ('README.LZO') with your project.
minilzo.o compiles to about 6 kB (using gcc or Visual C on a i386), and minilzo.o compiles to about 6 kB (using gcc or Visual C on a i386), and
the sources are about 30 kB when packed with zip - so there's no more the sources are about 30 kB when packed with zip - so there's no more
@ -49,13 +49,13 @@
out-of-the-box on most machines. out-of-the-box on most machines.
If you are running on a very unusual architecture and lzo_init() fails then If you are running on a very unusual architecture and lzo_init() fails then
you should first recompile with `-DLZO_DEBUG' to see what causes the failure. you should first recompile with '-DLZO_DEBUG' to see what causes the failure.
The most probable case is something like `sizeof(char *) != sizeof(long)'. The most probable case is something like 'sizeof(char *) != sizeof(long)'.
After identifying the problem you can compile by adding some defines After identifying the problem you can compile by adding some defines
like `-DSIZEOF_CHAR_P=8' to your Makefile. like '-DSIZEOF_CHAR_P=8' to your Makefile.
The best solution is (of course) using Autoconf - if your project uses The best solution is (of course) using Autoconf - if your project uses
Autoconf anyway just add `-DMINILZO_HAVE_CONFIG_H' to your compiler Autoconf anyway just add '-DMINILZO_HAVE_CONFIG_H' to your compiler
flags when compiling minilzo.c. See the LZO distribution for an example flags when compiling minilzo.c. See the LZO distribution for an example
how to set up configure.in. how to set up configure.in.
@ -87,7 +87,7 @@
lzo_memset() lzo_memset()
Appendix C: suggested macros for `configure.in' when using Autoconf Appendix C: suggested macros for 'configure.in' when using Autoconf
------------------------------------------------------------------- -------------------------------------------------------------------
Checks for typedefs and structures Checks for typedefs and structures
AC_CHECK_TYPE(ptrdiff_t,long) AC_CHECK_TYPE(ptrdiff_t,long)
@ -111,7 +111,7 @@
Appendix D: Copyright Appendix D: Copyright
--------------------- ---------------------
LZO and miniLZO are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, LZO and miniLZO are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005, 2006, 2007, 2008 Markus Franz Xaver Johannes Oberhumer 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Markus Franz Xaver Oberhumer
LZO and miniLZO are distributed under the terms of the GNU General LZO and miniLZO are distributed under the terms of the GNU General
Public License (GPL). See the file COPYING. Public License (GPL). See the file COPYING.

View File

@ -2,6 +2,8 @@
This file is part of the LZO real-time data compression library. This file is part of the LZO real-time data compression library.
Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
@ -39,11 +41,11 @@
#ifndef __LZOCONF_H_INCLUDED #ifndef __LZOCONF_H_INCLUDED
#define __LZOCONF_H_INCLUDED #define __LZOCONF_H_INCLUDED 1
#define LZO_VERSION 0x2030 #define LZO_VERSION 0x2040
#define LZO_VERSION_STRING "2.03" #define LZO_VERSION_STRING "2.04"
#define LZO_VERSION_DATE "Apr 30 2008" #define LZO_VERSION_DATE "Oct 31 2010"
/* internal Autoconf configuration file - only used when building LZO */ /* internal Autoconf configuration file - only used when building LZO */
#if defined(LZO_HAVE_CONFIG_H) #if defined(LZO_HAVE_CONFIG_H)
@ -167,12 +169,12 @@ extern "C" {
/* Memory model that allows to access memory at offsets of lzo_uint. */ /* Memory model that allows to access memory at offsets of lzo_uint. */
#if !defined(__LZO_MMODEL) #if !defined(__LZO_MMODEL)
# if (LZO_UINT_MAX <= UINT_MAX) # if (LZO_UINT_MAX <= UINT_MAX)
# define __LZO_MMODEL # define __LZO_MMODEL /*empty*/
# elif defined(LZO_HAVE_MM_HUGE_PTR) # elif defined(LZO_HAVE_MM_HUGE_PTR)
# define __LZO_MMODEL_HUGE 1 # define __LZO_MMODEL_HUGE 1
# define __LZO_MMODEL __huge # define __LZO_MMODEL __huge
# else # else
# define __LZO_MMODEL # define __LZO_MMODEL /*empty*/
# endif # endif
#endif #endif
@ -189,7 +191,7 @@ extern "C" {
#define lzo_xintp lzo_xint __LZO_MMODEL * #define lzo_xintp lzo_xint __LZO_MMODEL *
#define lzo_voidpp lzo_voidp __LZO_MMODEL * #define lzo_voidpp lzo_voidp __LZO_MMODEL *
#define lzo_bytepp lzo_bytep __LZO_MMODEL * #define lzo_bytepp lzo_bytep __LZO_MMODEL *
/* deprecated - use `lzo_bytep' instead of `lzo_byte *' */ /* deprecated - use 'lzo_bytep' instead of 'lzo_byte *' */
#define lzo_byte unsigned char __LZO_MMODEL #define lzo_byte unsigned char __LZO_MMODEL
typedef int lzo_bool; typedef int lzo_bool;
@ -215,10 +217,10 @@ typedef int lzo_bool;
/* DLL export information */ /* DLL export information */
#if !defined(__LZO_EXPORT1) #if !defined(__LZO_EXPORT1)
# define __LZO_EXPORT1 # define __LZO_EXPORT1 /*empty*/
#endif #endif
#if !defined(__LZO_EXPORT2) #if !defined(__LZO_EXPORT2)
# define __LZO_EXPORT2 # define __LZO_EXPORT2 /*empty*/
#endif #endif
/* __cdecl calling convention for public C and assembly functions */ /* __cdecl calling convention for public C and assembly functions */
@ -341,32 +343,32 @@ LZO_EXTERN(const lzo_charp) _lzo_version_date(void);
/* string functions */ /* string functions */
LZO_EXTERN(int) LZO_EXTERN(int)
lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len); lzo_memcmp(const lzo_voidp a, const lzo_voidp b, lzo_uint len);
LZO_EXTERN(lzo_voidp) LZO_EXTERN(lzo_voidp)
lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); lzo_memcpy(lzo_voidp dst, const lzo_voidp src, lzo_uint len);
LZO_EXTERN(lzo_voidp) LZO_EXTERN(lzo_voidp)
lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); lzo_memmove(lzo_voidp dst, const lzo_voidp src, lzo_uint len);
LZO_EXTERN(lzo_voidp) LZO_EXTERN(lzo_voidp)
lzo_memset(lzo_voidp _s, int _c, lzo_uint _len); lzo_memset(lzo_voidp buf, int c, lzo_uint len);
/* checksum functions */ /* checksum functions */
LZO_EXTERN(lzo_uint32) LZO_EXTERN(lzo_uint32)
lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len); lzo_adler32(lzo_uint32 c, const lzo_bytep buf, lzo_uint len);
LZO_EXTERN(lzo_uint32) LZO_EXTERN(lzo_uint32)
lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len); lzo_crc32(lzo_uint32 c, const lzo_bytep buf, lzo_uint len);
LZO_EXTERN(const lzo_uint32p) LZO_EXTERN(const lzo_uint32p)
lzo_get_crc32_table(void); lzo_get_crc32_table(void);
/* misc. */ /* misc. */
LZO_EXTERN(int) _lzo_config_check(void); LZO_EXTERN(int) _lzo_config_check(void);
typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u; typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u;
typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u; typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u;
typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t; typedef union { void *vp; lzo_bytep bp; lzo_uint u; lzo_uint32 u32; unsigned long l; } lzo_align_t;
/* align a char pointer on a boundary that is a multiple of `size' */ /* align a char pointer on a boundary that is a multiple of 'size' */
LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size); LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp p, lzo_uint size);
#define LZO_PTR_ALIGN_UP(_ptr,_size) \ #define LZO_PTR_ALIGN_UP(p,size) \
((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size))) ((p) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(p),(lzo_uint)(size)))
/*********************************************************************** /***********************************************************************
@ -395,8 +397,8 @@ LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
# define __LZO_WIN 1 # define __LZO_WIN 1
#endif #endif
#define __LZO_CMODEL #define __LZO_CMODEL /*empty*/
#define __LZO_DMODEL #define __LZO_DMODEL /*empty*/
#define __LZO_ENTRY __LZO_CDECL #define __LZO_ENTRY __LZO_CDECL
#define LZO_EXTERN_CDECL LZO_EXTERN #define LZO_EXTERN_CDECL LZO_EXTERN
#define LZO_ALIGN LZO_PTR_ALIGN_UP #define LZO_ALIGN LZO_PTR_ALIGN_UP

View File

@ -2,6 +2,8 @@
This file is part of the LZO real-time data compression library. This file is part of the LZO real-time data compression library.
Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
@ -121,7 +123,7 @@
#endif #endif
#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) #if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL)
# define ptrdiff_t long # define ptrdiff_t long
# define _PTRDIFF_T_DEFINED # define _PTRDIFF_T_DEFINED 1
#endif #endif
#if (UINT_MAX == LZO_0xffffL) #if (UINT_MAX == LZO_0xffffL)
# undef __LZO_RENAME_A # undef __LZO_RENAME_A
@ -265,9 +267,9 @@
# define LZO_EXTERN_C extern # define LZO_EXTERN_C extern
#endif #endif
#if !defined(__LZO_OS_OVERRIDE) #if !defined(__LZO_OS_OVERRIDE)
#if defined(LZO_OS_FREESTANDING) #if (LZO_OS_FREESTANDING)
# define LZO_INFO_OS "freestanding" # define LZO_INFO_OS "freestanding"
#elif defined(LZO_OS_EMBEDDED) #elif (LZO_OS_EMBEDDED)
# define LZO_INFO_OS "embedded" # define LZO_INFO_OS "embedded"
#elif 1 && defined(__IAR_SYSTEMS_ICC__) #elif 1 && defined(__IAR_SYSTEMS_ICC__)
# define LZO_OS_EMBEDDED 1 # define LZO_OS_EMBEDDED 1
@ -476,12 +478,27 @@
# define LZO_CC_PELLESC 1 # define LZO_CC_PELLESC 1
# define LZO_INFO_CC "Pelles C" # define LZO_INFO_CC "Pelles C"
# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__)
#elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__) #elif defined(__clang__) && defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) # if defined(__GNUC_PATCHLEVEL__)
# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) # define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
# else # else
# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) # define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
# endif # endif
# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__)
# define LZO_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__)
# else
# define LZO_CC_CLANG_CLANG 0x020700L
# endif
# define LZO_CC_CLANG LZO_CC_CLANG_GNUC
# define LZO_INFO_CC "clang"
# define LZO_INFO_CCVER __VERSION__
#elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
# if defined(__GNUC_PATCHLEVEL__)
# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
# else
# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
# endif
# define LZO_CC_LLVM LZO_CC_LLVM_GNUC
# define LZO_INFO_CC "llvm-gcc" # define LZO_INFO_CC "llvm-gcc"
# define LZO_INFO_CCVER __VERSION__ # define LZO_INFO_CCVER __VERSION__
#elif defined(__GNUC__) && defined(__VERSION__) #elif defined(__GNUC__) && defined(__VERSION__)
@ -502,6 +519,10 @@
# define LZO_CC_AZTECC 1 # define LZO_CC_AZTECC 1
# define LZO_INFO_CC "Aztec C" # define LZO_INFO_CC "Aztec C"
# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__)
#elif defined(__CODEGEARC__)
# define LZO_CC_CODEGEARC 1
# define LZO_INFO_CC "CodeGear C"
# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__)
#elif defined(__BORLANDC__) #elif defined(__BORLANDC__)
# define LZO_CC_BORLANDC 1 # define LZO_CC_BORLANDC 1
# define LZO_INFO_CC "Borland C" # define LZO_INFO_CC "Borland C"
@ -632,7 +653,7 @@
#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) #if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" # error "LZO_CC_MSC: _MSC_FULL_VER is not defined"
#endif #endif
#if !defined(__LZO_ARCH_OVERRIDE) && !defined(LZO_ARCH_GENERIC) && defined(_CRAY) #if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY)
# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) # if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY)
# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) # if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
# define LZO_ARCH_CRAY_MPP 1 # define LZO_ARCH_CRAY_MPP 1
@ -642,7 +663,7 @@
# endif # endif
#endif #endif
#if !defined(__LZO_ARCH_OVERRIDE) #if !defined(__LZO_ARCH_OVERRIDE)
#if defined(LZO_ARCH_GENERIC) #if (LZO_ARCH_GENERIC)
# define LZO_INFO_ARCH "generic" # define LZO_INFO_ARCH "generic"
#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) #elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
# define LZO_ARCH_I086 1 # define LZO_ARCH_I086 1
@ -677,6 +698,9 @@
#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) #elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__)
# define LZO_ARCH_AVR 1 # define LZO_ARCH_AVR 1
# define LZO_INFO_ARCH "avr" # define LZO_INFO_ARCH "avr"
#elif defined(__avr32__) || defined(__AVR32__)
# define LZO_ARCH_AVR32 1
# define LZO_INFO_ARCH "avr32"
#elif defined(__bfin__) #elif defined(__bfin__)
# define LZO_ARCH_BLACKFIN 1 # define LZO_ARCH_BLACKFIN 1
# define LZO_INFO_ARCH "blackfin" # define LZO_INFO_ARCH "blackfin"
@ -799,10 +823,10 @@
# define LZO_ARCH_I086PM 1 # define LZO_ARCH_I086PM 1
# define LZO_ARCH_IA16PM 1 # define LZO_ARCH_IA16PM 1
#endif #endif
#if defined(LZO_ARCH_ARM_THUMB) && !defined(LZO_ARCH_ARM) #if (LZO_ARCH_ARM_THUMB) && !(LZO_ARCH_ARM)
# error "this should not happen" # error "this should not happen"
#endif #endif
#if defined(LZO_ARCH_I086PM) && !defined(LZO_ARCH_I086) #if (LZO_ARCH_I086PM) && !(LZO_ARCH_I086)
# error "this should not happen" # error "this should not happen"
#endif #endif
#if (LZO_ARCH_I086) #if (LZO_ARCH_I086)
@ -875,7 +899,7 @@
#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) #elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295))
# undef LZO_HAVE_MM_HUGE_ARRAY # undef LZO_HAVE_MM_HUGE_ARRAY
#endif #endif
#if (LZO_ARCH_I086PM) && !defined(LZO_HAVE_MM_HUGE_PTR) #if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR)
# if (LZO_OS_DOS16) # if (LZO_OS_DOS16)
# error "this should not happen" # error "this should not happen"
# elif (LZO_CC_ZORTECHC) # elif (LZO_CC_ZORTECHC)
@ -1091,7 +1115,7 @@ extern "C" {
#if (LZO_ARCH_I086 && LZO_CC_DMC) #if (LZO_ARCH_I086 && LZO_CC_DMC)
#elif (LZO_CC_CILLY) && defined(__GNUC__) #elif (LZO_CC_CILLY) && defined(__GNUC__)
# define LZO_SIZEOF_LONG_LONG 8 # define LZO_SIZEOF_LONG_LONG 8
#elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) #elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define LZO_SIZEOF_LONG_LONG 8 # define LZO_SIZEOF_LONG_LONG 8
#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) #elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400))
# define LZO_SIZEOF_LONG_LONG 8 # define LZO_SIZEOF_LONG_LONG 8
@ -1125,12 +1149,12 @@ extern "C" {
#endif #endif
#endif #endif
#endif #endif
#if defined(__cplusplus) && defined(LZO_CC_GNUC) #if defined(__cplusplus) && (LZO_CC_GNUC)
# if (LZO_CC_GNUC < 0x020800ul) # if (LZO_CC_GNUC < 0x020800ul)
# undef LZO_SIZEOF_LONG_LONG # undef LZO_SIZEOF_LONG_LONG
# endif # endif
#endif #endif
#if defined(LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) #if (LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG)
# undef LZO_SIZEOF_LONG_LONG # undef LZO_SIZEOF_LONG_LONG
#endif #endif
#if !defined(LZO_SIZEOF_VOID_P) #if !defined(LZO_SIZEOF_VOID_P)
@ -1229,15 +1253,17 @@ extern "C" {
# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T
#endif #endif
#endif #endif
#if defined(LZO_ABI_NEUTRAL_ENDIAN) #if (LZO_ABI_NEUTRAL_ENDIAN)
# undef LZO_ABI_BIG_ENDIAN # undef LZO_ABI_BIG_ENDIAN
# undef LZO_ABI_LITTLE_ENDIAN # undef LZO_ABI_LITTLE_ENDIAN
#elif !defined(LZO_ABI_BIG_ENDIAN) && !defined(LZO_ABI_LITTLE_ENDIAN) #elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN)
#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) #if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP)
# define LZO_ABI_BIG_ENDIAN 1 # define LZO_ABI_BIG_ENDIAN 1
#elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64)
# define LZO_ABI_LITTLE_ENDIAN 1
#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) #elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430)
# define LZO_ABI_LITTLE_ENDIAN 1 # define LZO_ABI_LITTLE_ENDIAN 1
#elif (LZO_ARCH_M68K || LZO_ARCH_S390) #elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390)
# define LZO_ABI_BIG_ENDIAN 1 # define LZO_ABI_BIG_ENDIAN 1
#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
# if (__LITTLE_ENDIAN__ == 1) # if (__LITTLE_ENDIAN__ == 1)
@ -1259,14 +1285,14 @@ extern "C" {
# define LZO_ABI_LITTLE_ENDIAN 1 # define LZO_ABI_LITTLE_ENDIAN 1
#endif #endif
#endif #endif
#if defined(LZO_ABI_BIG_ENDIAN) && defined(LZO_ABI_LITTLE_ENDIAN) #if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN)
# error "this should not happen" # error "this should not happen"
#endif #endif
#if defined(LZO_ABI_BIG_ENDIAN) #if (LZO_ABI_BIG_ENDIAN)
# define LZO_INFO_ABI_ENDIAN "be" # define LZO_INFO_ABI_ENDIAN "be"
#elif defined(LZO_ABI_LITTLE_ENDIAN) #elif (LZO_ABI_LITTLE_ENDIAN)
# define LZO_INFO_ABI_ENDIAN "le" # define LZO_INFO_ABI_ENDIAN "le"
#elif defined(LZO_ABI_NEUTRAL_ENDIAN) #elif (LZO_ABI_NEUTRAL_ENDIAN)
# define LZO_INFO_ABI_ENDIAN "neutral" # define LZO_INFO_ABI_ENDIAN "neutral"
#endif #endif
#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) #if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
@ -1292,15 +1318,15 @@ extern "C" {
# define LZO_INFO_ABI_PM "ip32l64" # define LZO_INFO_ABI_PM "ip32l64"
#endif #endif
#if !defined(__LZO_LIBC_OVERRIDE) #if !defined(__LZO_LIBC_OVERRIDE)
#if defined(LZO_LIBC_NAKED) #if (LZO_LIBC_NAKED)
# define LZO_INFO_LIBC "naked" # define LZO_INFO_LIBC "naked"
#elif defined(LZO_LIBC_FREESTANDING) #elif (LZO_LIBC_FREESTANDING)
# define LZO_INFO_LIBC "freestanding" # define LZO_INFO_LIBC "freestanding"
#elif defined(LZO_LIBC_MOSTLY_FREESTANDING) #elif (LZO_LIBC_MOSTLY_FREESTANDING)
# define LZO_INFO_LIBC "mfreestanding" # define LZO_INFO_LIBC "mfreestanding"
#elif defined(LZO_LIBC_ISOC90) #elif (LZO_LIBC_ISOC90)
# define LZO_INFO_LIBC "isoc90" # define LZO_INFO_LIBC "isoc90"
#elif defined(LZO_LIBC_ISOC99) #elif (LZO_LIBC_ISOC99)
# define LZO_INFO_LIBC "isoc99" # define LZO_INFO_LIBC "isoc99"
#elif defined(__dietlibc__) #elif defined(__dietlibc__)
# define LZO_LIBC_DIETLIBC 1 # define LZO_LIBC_DIETLIBC 1
@ -1332,22 +1358,24 @@ extern "C" {
#if !defined(__lzo_gnuc_extension__) #if !defined(__lzo_gnuc_extension__)
#if (LZO_CC_GNUC >= 0x020800ul) #if (LZO_CC_GNUC >= 0x020800ul)
# define __lzo_gnuc_extension__ __extension__ # define __lzo_gnuc_extension__ __extension__
#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define __lzo_gnuc_extension__ __extension__ # define __lzo_gnuc_extension__ __extension__
#else #else
# define __lzo_gnuc_extension__ # define __lzo_gnuc_extension__ /*empty*/
#endif #endif
#endif #endif
#if !defined(__lzo_ua_volatile) #if !defined(__lzo_ua_volatile)
# define __lzo_ua_volatile volatile # define __lzo_ua_volatile volatile
#endif #endif
#if !defined(__lzo_alignof) #if !defined(__lzo_alignof)
#if (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) #if (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
# define __lzo_alignof(e) __alignof__(e) # define __lzo_alignof(e) __alignof__(e)
#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700))
# define __lzo_alignof(e) __alignof__(e) # define __lzo_alignof(e) __alignof__(e)
#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) #elif (LZO_CC_MSC && (_MSC_VER >= 1300))
# define __lzo_alignof(e) __alignof(e) # define __lzo_alignof(e) __alignof(e)
#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
# define __lzo_alignof(e) __alignof__(e)
#endif #endif
#endif #endif
#if defined(__lzo_alignof) #if defined(__lzo_alignof)
@ -1358,7 +1386,7 @@ extern "C" {
# define __lzo_constructor __attribute__((__constructor__,__used__)) # define __lzo_constructor __attribute__((__constructor__,__used__))
#elif (LZO_CC_GNUC >= 0x020700ul) #elif (LZO_CC_GNUC >= 0x020700ul)
# define __lzo_constructor __attribute__((__constructor__)) # define __lzo_constructor __attribute__((__constructor__))
#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define __lzo_constructor __attribute__((__constructor__)) # define __lzo_constructor __attribute__((__constructor__))
#endif #endif
#endif #endif
@ -1370,14 +1398,14 @@ extern "C" {
# define __lzo_destructor __attribute__((__destructor__,__used__)) # define __lzo_destructor __attribute__((__destructor__,__used__))
#elif (LZO_CC_GNUC >= 0x020700ul) #elif (LZO_CC_GNUC >= 0x020700ul)
# define __lzo_destructor __attribute__((__destructor__)) # define __lzo_destructor __attribute__((__destructor__))
#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define __lzo_destructor __attribute__((__destructor__)) # define __lzo_destructor __attribute__((__destructor__))
#endif #endif
#endif #endif
#if defined(__lzo_destructor) #if defined(__lzo_destructor)
# define __lzo_HAVE_destructor 1 # define __lzo_HAVE_destructor 1
#endif #endif
#if defined(__lzo_HAVE_destructor) && !defined(__lzo_HAVE_constructor) #if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor)
# error "this should not happen" # error "this should not happen"
#endif #endif
#if !defined(__lzo_inline) #if !defined(__lzo_inline)
@ -1386,7 +1414,7 @@ extern "C" {
# define __lzo_inline inline # define __lzo_inline inline
#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) #elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
# define __lzo_inline __inline # define __lzo_inline __inline
#elif (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) #elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
# define __lzo_inline __inline__ # define __lzo_inline __inline__
#elif (LZO_CC_DMC) #elif (LZO_CC_DMC)
# define __lzo_inline __inline # define __lzo_inline __inline
@ -1396,6 +1424,8 @@ extern "C" {
# define __lzo_inline __inline # define __lzo_inline __inline
#elif (LZO_CC_MSC && (_MSC_VER >= 900)) #elif (LZO_CC_MSC && (_MSC_VER >= 900))
# define __lzo_inline __inline # define __lzo_inline __inline
#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
# define __lzo_inline __inline__
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
# define __lzo_inline inline # define __lzo_inline inline
#endif #endif
@ -1403,7 +1433,7 @@ extern "C" {
#if defined(__lzo_inline) #if defined(__lzo_inline)
# define __lzo_HAVE_inline 1 # define __lzo_HAVE_inline 1
#else #else
# define __lzo_inline # define __lzo_inline /*empty*/
#endif #endif
#if !defined(__lzo_forceinline) #if !defined(__lzo_forceinline)
#if (LZO_CC_GNUC >= 0x030200ul) #if (LZO_CC_GNUC >= 0x030200ul)
@ -1412,16 +1442,18 @@ extern "C" {
# define __lzo_forceinline __forceinline # define __lzo_forceinline __forceinline
#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) #elif (LZO_CC_MSC && (_MSC_VER >= 1200))
# define __lzo_forceinline __forceinline # define __lzo_forceinline __forceinline
#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
# define __lzo_forceinline __inline__ __attribute__((__always_inline__))
#endif #endif
#endif #endif
#if defined(__lzo_forceinline) #if defined(__lzo_forceinline)
# define __lzo_HAVE_forceinline 1 # define __lzo_HAVE_forceinline 1
#else #else
# define __lzo_forceinline # define __lzo_forceinline /*empty*/
#endif #endif
#if !defined(__lzo_noinline) #if !defined(__lzo_noinline)
#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) #if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul)
@ -1432,7 +1464,7 @@ extern "C" {
# define __lzo_noinline __declspec(noinline) # define __lzo_noinline __declspec(noinline)
#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
# define __lzo_noinline __attribute__((__noinline__)) # define __lzo_noinline __attribute__((__noinline__))
#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define __lzo_noinline __attribute__((__noinline__)) # define __lzo_noinline __attribute__((__noinline__))
#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) #elif (LZO_CC_MSC && (_MSC_VER >= 1300))
# define __lzo_noinline __declspec(noinline) # define __lzo_noinline __declspec(noinline)
@ -1441,14 +1473,16 @@ extern "C" {
# else # else
# define __lzo_noinline __declspec(noinline) # define __lzo_noinline __declspec(noinline)
# endif # endif
#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
# define __lzo_noinline __attribute__((__noinline__))
#endif #endif
#endif #endif
#if defined(__lzo_noinline) #if defined(__lzo_noinline)
# define __lzo_HAVE_noinline 1 # define __lzo_HAVE_noinline 1
#else #else
# define __lzo_noinline # define __lzo_noinline /*empty*/
#endif #endif
#if (defined(__lzo_HAVE_forceinline) || defined(__lzo_HAVE_noinline)) && !defined(__lzo_HAVE_inline) #if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline)
# error "this should not happen" # error "this should not happen"
#endif #endif
#if !defined(__lzo_noreturn) #if !defined(__lzo_noreturn)
@ -1458,7 +1492,7 @@ extern "C" {
# define __lzo_noreturn __declspec(noreturn) # define __lzo_noreturn __declspec(noreturn)
#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC)
# define __lzo_noreturn __attribute__((__noreturn__)) # define __lzo_noreturn __attribute__((__noreturn__))
#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define __lzo_noreturn __attribute__((__noreturn__)) # define __lzo_noreturn __attribute__((__noreturn__))
#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) #elif (LZO_CC_MSC && (_MSC_VER >= 1200))
# define __lzo_noreturn __declspec(noreturn) # define __lzo_noreturn __declspec(noreturn)
@ -1467,16 +1501,16 @@ extern "C" {
#if defined(__lzo_noreturn) #if defined(__lzo_noreturn)
# define __lzo_HAVE_noreturn 1 # define __lzo_HAVE_noreturn 1
#else #else
# define __lzo_noreturn # define __lzo_noreturn /*empty*/
#endif #endif
#if !defined(__lzo_nothrow) #if !defined(__lzo_nothrow)
#if (LZO_CC_GNUC >= 0x030300ul) #if (LZO_CC_GNUC >= 0x030300ul)
# define __lzo_nothrow __attribute__((__nothrow__)) # define __lzo_nothrow __attribute__((__nothrow__))
#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus) #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus)
# define __lzo_nothrow __declspec(nothrow) # define __lzo_nothrow __declspec(nothrow)
#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 900) && LZO_CC_SYNTAX_GNUC)
# define __lzo_nothrow __attribute__((__nothrow__)) # define __lzo_nothrow __attribute__((__nothrow__))
#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define __lzo_nothrow __attribute__((__nothrow__)) # define __lzo_nothrow __attribute__((__nothrow__))
#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) #elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
# define __lzo_nothrow __declspec(nothrow) # define __lzo_nothrow __declspec(nothrow)
@ -1485,14 +1519,14 @@ extern "C" {
#if defined(__lzo_nothrow) #if defined(__lzo_nothrow)
# define __lzo_HAVE_nothrow 1 # define __lzo_HAVE_nothrow 1
#else #else
# define __lzo_nothrow # define __lzo_nothrow /*empty*/
#endif #endif
#if !defined(__lzo_restrict) #if !defined(__lzo_restrict)
#if (LZO_CC_GNUC >= 0x030400ul) #if (LZO_CC_GNUC >= 0x030400ul)
# define __lzo_restrict __restrict__ # define __lzo_restrict __restrict__
#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC)
# define __lzo_restrict __restrict__ # define __lzo_restrict __restrict__
#elif (LZO_CC_LLVM) #elif (LZO_CC_CLANG || LZO_CC_LLVM)
# define __lzo_restrict __restrict__ # define __lzo_restrict __restrict__
#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) #elif (LZO_CC_MSC && (_MSC_VER >= 1400))
# define __lzo_restrict __restrict # define __lzo_restrict __restrict
@ -1501,7 +1535,7 @@ extern "C" {
#if defined(__lzo_restrict) #if defined(__lzo_restrict)
# define __lzo_HAVE_restrict 1 # define __lzo_HAVE_restrict 1
#else #else
# define __lzo_restrict # define __lzo_restrict /*empty*/
#endif #endif
#if !defined(__lzo_likely) && !defined(__lzo_unlikely) #if !defined(__lzo_likely) && !defined(__lzo_unlikely)
#if (LZO_CC_GNUC >= 0x030200ul) #if (LZO_CC_GNUC >= 0x030200ul)
@ -1510,7 +1544,7 @@ extern "C" {
#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800))
# define __lzo_likely(e) (__builtin_expect(!!(e),1)) # define __lzo_likely(e) (__builtin_expect(!!(e),1))
# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) # define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define __lzo_likely(e) (__builtin_expect(!!(e),1)) # define __lzo_likely(e) (__builtin_expect(!!(e),1))
# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) # define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
#endif #endif
@ -1530,7 +1564,7 @@ extern "C" {
# define LZO_UNUSED(var) ((void) &var) # define LZO_UNUSED(var) ((void) &var)
# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) # elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC)
# define LZO_UNUSED(var) if (&var) ; else # define LZO_UNUSED(var) if (&var) ; else
# elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) # elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define LZO_UNUSED(var) ((void) var) # define LZO_UNUSED(var) ((void) var)
# elif (LZO_CC_MSC && (_MSC_VER < 900)) # elif (LZO_CC_MSC && (_MSC_VER < 900))
# define LZO_UNUSED(var) if (&var) ; else # define LZO_UNUSED(var) if (&var) ; else
@ -1549,7 +1583,7 @@ extern "C" {
# define LZO_UNUSED_FUNC(func) ((void) func) # define LZO_UNUSED_FUNC(func) ((void) func)
# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) # elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC)
# define LZO_UNUSED_FUNC(func) if (func) ; else # define LZO_UNUSED_FUNC(func) if (func) ; else
# elif (LZO_CC_LLVM) # elif (LZO_CC_CLANG || LZO_CC_LLVM)
# define LZO_UNUSED_FUNC(func) ((void) &func) # define LZO_UNUSED_FUNC(func) ((void) &func)
# elif (LZO_CC_MSC && (_MSC_VER < 900)) # elif (LZO_CC_MSC && (_MSC_VER < 900))
# define LZO_UNUSED_FUNC(func) if (func) ; else # define LZO_UNUSED_FUNC(func) if (func) ; else
@ -1564,7 +1598,7 @@ extern "C" {
#if !defined(LZO_UNUSED_LABEL) #if !defined(LZO_UNUSED_LABEL)
# if (LZO_CC_WATCOMC) && defined(__cplusplus) # if (LZO_CC_WATCOMC) && defined(__cplusplus)
# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l # define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l
# elif (LZO_CC_INTELC || LZO_CC_WATCOMC) # elif (LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC)
# define LZO_UNUSED_LABEL(l) if (0) goto l # define LZO_UNUSED_LABEL(l) if (0) goto l
# else # else
# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l # define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l
@ -1579,6 +1613,15 @@ extern "C" {
# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init
# endif # endif
#endif #endif
#if !defined(LZO_UNCONST_CAST)
# if 0 && defined(__cplusplus)
# define LZO_UNCONST_CAST(t,e) (const_cast<t> (e))
# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((lzo_uintptr_t) ((const void *) (e))))))
# else
# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((const void *) (e)))))
# endif
#endif
#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) #if !defined(LZO_COMPILE_TIME_ASSERT_HEADER)
# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) # if (LZO_CC_AZTECC || LZO_CC_ZORTECHC)
# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; # define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)];
@ -1607,7 +1650,7 @@ extern "C" {
# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) # if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC)
# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) # elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
# define __lzo_cdecl __cdecl # define __lzo_cdecl __cdecl
# define __lzo_cdecl_atexit # define __lzo_cdecl_atexit /*empty*/
# define __lzo_cdecl_main __cdecl # define __lzo_cdecl_main __cdecl
# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) # if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
# define __lzo_cdecl_qsort __pascal # define __lzo_cdecl_qsort __pascal
@ -1648,24 +1691,24 @@ extern "C" {
# define __lzo_cdecl cdecl # define __lzo_cdecl cdecl
#endif #endif
#if !defined(__lzo_cdecl) #if !defined(__lzo_cdecl)
# define __lzo_cdecl # define __lzo_cdecl /*empty*/
#endif #endif
#if !defined(__lzo_cdecl_atexit) #if !defined(__lzo_cdecl_atexit)
# define __lzo_cdecl_atexit # define __lzo_cdecl_atexit /*empty*/
#endif #endif
#if !defined(__lzo_cdecl_main) #if !defined(__lzo_cdecl_main)
# define __lzo_cdecl_main # define __lzo_cdecl_main /*empty*/
#endif #endif
#if !defined(__lzo_cdecl_qsort) #if !defined(__lzo_cdecl_qsort)
# define __lzo_cdecl_qsort # define __lzo_cdecl_qsort /*empty*/
#endif #endif
#if !defined(__lzo_cdecl_sighandler) #if !defined(__lzo_cdecl_sighandler)
# define __lzo_cdecl_sighandler # define __lzo_cdecl_sighandler /*empty*/
#endif #endif
#if !defined(__lzo_cdecl_va) #if !defined(__lzo_cdecl_va)
# define __lzo_cdecl_va __lzo_cdecl # define __lzo_cdecl_va __lzo_cdecl
#endif #endif
#if !defined(LZO_CFG_NO_WINDOWS_H) #if !(LZO_CFG_NO_WINDOWS_H)
#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) #if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64)
# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) # if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000))
# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) # elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__)
@ -1711,7 +1754,7 @@ extern "C" {
#elif (LZO_ARCH_POWERPC) #elif (LZO_ARCH_POWERPC)
# define LZO_OPT_PREFER_PREINC 1 # define LZO_OPT_PREFER_PREINC 1
# define LZO_OPT_PREFER_PREDEC 1 # define LZO_OPT_PREFER_PREDEC 1
# if defined(LZO_ABI_BIG_ENDIAN) # if (LZO_ABI_BIG_ENDIAN)
# define LZO_OPT_UNALIGNED16 1 # define LZO_OPT_UNALIGNED16 1
# define LZO_OPT_UNALIGNED32 1 # define LZO_OPT_UNALIGNED32 1
# endif # endif
@ -1725,28 +1768,29 @@ extern "C" {
# define LZO_OPT_PREFER_POSTINC 1 # define LZO_OPT_PREFER_POSTINC 1
# define LZO_OPT_PREFER_PREDEC 1 # define LZO_OPT_PREFER_PREDEC 1
#endif #endif
#if !defined(LZO_CFG_NO_INLINE_ASM) #ifndef LZO_CFG_NO_INLINE_ASM
#if defined(LZO_CC_LLVM) #if (LZO_CC_LLVM)
# define LZO_CFG_NO_INLINE_ASM 1 # define LZO_CFG_NO_INLINE_ASM 1
#endif #endif
#endif #endif
#if !defined(LZO_CFG_NO_UNALIGNED) #ifndef LZO_CFG_NO_UNALIGNED
#if defined(LZO_ABI_NEUTRAL_ENDIAN) || defined(LZO_ARCH_GENERIC) #if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC)
# define LZO_CFG_NO_UNALIGNED 1 # define LZO_CFG_NO_UNALIGNED 1
#endif #endif
#endif #endif
#if defined(LZO_CFG_NO_UNALIGNED) #if (LZO_CFG_NO_UNALIGNED)
# undef LZO_OPT_UNALIGNED16 # undef LZO_OPT_UNALIGNED16
# undef LZO_OPT_UNALIGNED32 # undef LZO_OPT_UNALIGNED32
# undef LZO_OPT_UNALIGNED64 # undef LZO_OPT_UNALIGNED64
#endif #endif
#if defined(LZO_CFG_NO_INLINE_ASM) #if (LZO_CFG_NO_INLINE_ASM)
#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) #elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
# define LZO_ASM_SYNTAX_MSC 1 # define LZO_ASM_SYNTAX_MSC 1
#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) #elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
#elif (LZO_ARCH_I386 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) #elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul))
#elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
# define LZO_ASM_SYNTAX_GNUC 1 # define LZO_ASM_SYNTAX_GNUC 1
#elif (LZO_ARCH_AMD64 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) #elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
# define LZO_ASM_SYNTAX_GNUC 1 # define LZO_ASM_SYNTAX_GNUC 1
#endif #endif
#if (LZO_ASM_SYNTAX_GNUC) #if (LZO_ASM_SYNTAX_GNUC)

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,8 @@
This file is part of the LZO real-time data compression library. This file is part of the LZO real-time data compression library.
Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
@ -45,9 +47,9 @@
#ifndef __MINILZO_H #ifndef __MINILZO_H
#define __MINILZO_H #define __MINILZO_H 1
#define MINILZO_VERSION 0x2030 #define MINILZO_VERSION 0x2040
#ifdef __LZOCONF_H #ifdef __LZOCONF_H
# error "you cannot use both LZO and miniLZO" # error "you cannot use both LZO and miniLZO"