summaryrefslogtreecommitdiff
path: root/main/lzo/src/lzo_conf.h
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-06-29 18:18:50 +0200
committerArne Schwabe <arne@rfc2549.org>2014-06-29 18:18:50 +0200
commit68e19d426ba6d9f048ebfdf337b93a85dc4d5b4c (patch)
treecb33b2698e3f665546a328882c7481b11f633428 /main/lzo/src/lzo_conf.h
parentd3aa9f835d7fd5f53d3a0da6778d46a7067bf074 (diff)
Update lzo version
--HG-- extra : rebase_source : 4310223035376c8ac1773fd03a43289aa96ce4f3
Diffstat (limited to 'main/lzo/src/lzo_conf.h')
-rw-r--r--main/lzo/src/lzo_conf.h288
1 files changed, 143 insertions, 145 deletions
diff --git a/main/lzo/src/lzo_conf.h b/main/lzo/src/lzo_conf.h
index 5fcf9635..3543b140 100644
--- a/main/lzo/src/lzo_conf.h
+++ b/main/lzo/src/lzo_conf.h
@@ -2,22 +2,7 @@
This file is part of the LZO real-time data compression library.
- Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
- 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) 2007 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
The LZO library is free software; you can redistribute it and/or
@@ -51,23 +36,9 @@
#define __LZO_CONF_H 1
#if !defined(__LZO_IN_MINILZO)
-#if (LZO_CFG_FREESTANDING)
+#if defined(LZO_CFG_FREESTANDING) && (LZO_CFG_FREESTANDING)
# define LZO_LIBC_FREESTANDING 1
# define LZO_OS_FREESTANDING 1
-# define ACC_LIBC_FREESTANDING 1
-# define ACC_OS_FREESTANDING 1
-#endif
-#if (LZO_CFG_NO_UNALIGNED)
-# define ACC_CFG_NO_UNALIGNED 1
-#endif
-#if (LZO_ARCH_GENERIC)
-# define ACC_ARCH_GENERIC 1
-#endif
-#if (LZO_ABI_NEUTRAL_ENDIAN)
-# define ACC_ABI_NEUTRAL_ENDIAN 1
-#endif
-#if (LZO_HAVE_CONFIG_H)
-# define ACC_CONFIG_NO_HEADER 1
#endif
#if defined(LZO_CFG_EXTRA_CONFIG_HEADER)
# include LZO_CFG_EXTRA_CONFIG_HEADER
@@ -76,9 +47,12 @@
# error "include this file first"
#endif
#include "lzo/lzoconf.h"
+#if defined(LZO_CFG_EXTRA_CONFIG_HEADER2)
+# include LZO_CFG_EXTRA_CONFIG_HEADER2
+#endif
#endif
-#if (LZO_VERSION < 0x02000) || !defined(__LZOCONF_H_INCLUDED)
+#if (LZO_VERSION < 0x2070) || !defined(__LZOCONF_H_INCLUDED)
# error "version mismatch"
#endif
@@ -87,18 +61,22 @@
// pragmas
************************************************************************/
-#if (LZO_CC_BORLANDC && LZO_ARCH_I086)
-# pragma option -h /* enable fast huge pointers */
+#if (LZO_CC_MSC && (_MSC_VER >= 1000 && _MSC_VER < 1100))
+ /* disable bogus "unreachable code" warnings */
+# pragma warning(disable: 4702)
#endif
-
#if (LZO_CC_MSC && (_MSC_VER >= 1000))
# pragma warning(disable: 4127 4701)
+ /* disable warnings about inlining */
+# pragma warning(disable: 4514 4710 4711)
#endif
#if (LZO_CC_MSC && (_MSC_VER >= 1300))
- /* avoid '-Wall' warnings in system header files */
+ /* disable '-Wall' warnings in system header files */
# pragma warning(disable: 4820)
- /* avoid warnings about inlining */
-# pragma warning(disable: 4514 4710 4711)
+#endif
+#if (LZO_CC_MSC && (_MSC_VER >= 1800))
+ /* disable '-Wall' warnings in system header files */
+# pragma warning(disable: 4746)
#endif
#if (LZO_CC_SUNPROC)
@@ -114,22 +92,34 @@
//
************************************************************************/
-#if (__LZO_MMODEL_HUGE) && !(LZO_HAVE_MM_HUGE_PTR)
-# error "this should not happen - check defines for __huge"
-#endif
-
-#if defined(__LZO_IN_MINILZO) || defined(LZO_CFG_FREESTANDING)
-#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
-# define ACC_WANT_ACC_INCD_H 1
-# define ACC_WANT_ACC_INCE_H 1
-# define ACC_WANT_ACC_INCI_H 1
+#if defined(__LZO_IN_MINILZO) || (LZO_CFG_FREESTANDING)
#elif 1
# include <string.h>
#else
-# define ACC_WANT_ACC_INCD_H 1
+# define LZO_WANT_ACC_INCD_H 1
+#endif
+#if defined(LZO_HAVE_CONFIG_H)
+# define LZO_CFG_NO_CONFIG_HEADER 1
#endif
-#include "miniacc.h"
+#include "lzo_supp.h"
+/* Integral types */
+#if 1 || defined(lzo_int8_t) || defined(lzo_uint8_t)
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1)
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint8_t) == 1)
+#endif
+#if 1 || defined(lzo_int16_t) || defined(lzo_uint16_t)
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2)
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint16_t) == 2)
+#endif
+#if 1 || defined(lzo_int32_t) || defined(lzo_uint32_t)
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4)
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32_t) == 4)
+#endif
+#if defined(lzo_int64_t) || defined(lzo_uint64_t)
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8)
+LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint64_t) == 8)
+#endif
#if (LZO_CFG_FREESTANDING)
# undef HAVE_MEMCMP
@@ -141,33 +131,32 @@
#if !(HAVE_MEMCMP)
# undef memcmp
# define memcmp(a,b,c) lzo_memcmp(a,b,c)
-#elif !(__LZO_MMODEL_HUGE)
+#else
# undef lzo_memcmp
# define lzo_memcmp(a,b,c) memcmp(a,b,c)
#endif
#if !(HAVE_MEMCPY)
# undef memcpy
# define memcpy(a,b,c) lzo_memcpy(a,b,c)
-#elif !(__LZO_MMODEL_HUGE)
+#else
# undef lzo_memcpy
# define lzo_memcpy(a,b,c) memcpy(a,b,c)
#endif
#if !(HAVE_MEMMOVE)
# undef memmove
# define memmove(a,b,c) lzo_memmove(a,b,c)
-#elif !(__LZO_MMODEL_HUGE)
+#else
# undef lzo_memmove
# define lzo_memmove(a,b,c) memmove(a,b,c)
#endif
#if !(HAVE_MEMSET)
# undef memset
# define memset(a,b,c) lzo_memset(a,b,c)
-#elif !(__LZO_MMODEL_HUGE)
+#else
# undef lzo_memset
# define lzo_memset(a,b,c) memset(a,b,c)
#endif
-
#undef NDEBUG
#if (LZO_CFG_FREESTANDING)
# undef LZO_DEBUG
@@ -188,27 +177,29 @@
# define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr)
#endif
-#if !defined(__lzo_inline)
-# define __lzo_inline /*empty*/
-#endif
-#if !defined(__lzo_forceinline)
-# define __lzo_forceinline /*empty*/
-#endif
-#if !defined(__lzo_noinline)
-# define __lzo_noinline /*empty*/
-#endif
-
#if (LZO_CFG_PGO)
-# undef __acc_likely
-# undef __acc_unlikely
# undef __lzo_likely
# undef __lzo_unlikely
-# define __acc_likely(e) (e)
-# define __acc_unlikely(e) (e)
# define __lzo_likely(e) (e)
# define __lzo_unlikely(e) (e)
#endif
+#undef _
+#undef __
+#undef ___
+#undef ____
+#undef _p0
+#undef _p1
+#undef _p2
+#undef _p3
+#undef _p4
+#undef _s0
+#undef _s1
+#undef _s2
+#undef _s3
+#undef _s4
+#undef _ww
+
/***********************************************************************
//
@@ -229,13 +220,10 @@
#define LZO_HIGH(array) ((lzo_uint) (sizeof(array)/sizeof(*(array))))
-/* this always fits into 16 bits */
+/* this always fits into 32 bits */
#define LZO_SIZE(bits) (1u << (bits))
#define LZO_MASK(bits) (LZO_SIZE(bits) - 1)
-#define LZO_LSIZE(bits) (1ul << (bits))
-#define LZO_LMASK(bits) (LZO_LSIZE(bits) - 1)
-
#define LZO_USIZE(bits) ((lzo_uint) 1 << (bits))
#define LZO_UMASK(bits) (LZO_USIZE(bits) - 1)
@@ -243,7 +231,7 @@
#if 0
/* 32*32 multiplies may be faster than 64*64 on some 64-bit machines,
* but then we need extra casts from unsigned<->size_t */
-# define DMUL(a,b) ((lzo_xint) ((lzo_uint32)(a) * (lzo_uint32)(b)))
+# define DMUL(a,b) ((lzo_xint) ((lzo_uint32_t)(a) * (lzo_uint32_t)(b)))
#else
# define DMUL(a,b) ((lzo_xint) ((a) * (b)))
#endif
@@ -259,69 +247,89 @@
* even if it is allowed by your system.
*/
-#if 1 && (LZO_ARCH_AMD64 || LZO_ARCH_I386 || LZO_ARCH_POWERPC)
-# if (LZO_SIZEOF_SHORT == 2)
-# define LZO_UNALIGNED_OK_2 1
-# endif
-# if (LZO_SIZEOF_INT == 4)
-# define LZO_UNALIGNED_OK_4 1
-# endif
+#include "lzo_func.h"
+
+#ifndef UA_SET1
+#define UA_SET1 LZO_MEMOPS_SET1
#endif
-#if 1 && (LZO_ARCH_AMD64)
-# if defined(LZO_UINT64_MAX)
-# define LZO_UNALIGNED_OK_8 1
-# endif
+#ifndef UA_SET2
+#define UA_SET2 LZO_MEMOPS_SET2
#endif
-#if (LZO_CFG_NO_UNALIGNED)
-# undef LZO_UNALIGNED_OK_2
-# undef LZO_UNALIGNED_OK_4
-# undef LZO_UNALIGNED_OK_8
-#endif
-
-#undef UA_GET16
-#undef UA_SET16
-#undef UA_COPY16
-#undef UA_GET32
-#undef UA_SET32
-#undef UA_COPY32
-#undef UA_GET64
-#undef UA_SET64
-#undef UA_COPY64
-#if defined(LZO_UNALIGNED_OK_2)
- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(unsigned short) == 2)
-# if 1 && defined(ACC_UA_COPY16)
-# define UA_GET16 ACC_UA_GET16
-# define UA_SET16 ACC_UA_SET16
-# define UA_COPY16 ACC_UA_COPY16
-# else
-# define UA_GET16(p) (* (__lzo_ua_volatile const lzo_ushortp) (__lzo_ua_volatile const lzo_voidp) (p))
-# define UA_SET16(p,v) ((* (__lzo_ua_volatile lzo_ushortp) (__lzo_ua_volatile lzo_voidp) (p)) = (unsigned short) (v))
-# define UA_COPY16(d,s) UA_SET16(d, UA_GET16(s))
-# endif
+#ifndef UA_SET3
+#define UA_SET3 LZO_MEMOPS_SET3
#endif
-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4)
-# if 1 && defined(ACC_UA_COPY32)
-# define UA_GET32 ACC_UA_GET32
-# define UA_SET32 ACC_UA_SET32
-# define UA_COPY32 ACC_UA_COPY32
-# else
-# define UA_GET32(p) (* (__lzo_ua_volatile const lzo_uint32p) (__lzo_ua_volatile const lzo_voidp) (p))
-# define UA_SET32(p,v) ((* (__lzo_ua_volatile lzo_uint32p) (__lzo_ua_volatile lzo_voidp) (p)) = (lzo_uint32) (v))
-# define UA_COPY32(d,s) UA_SET32(d, UA_GET32(s))
-# endif
+#ifndef UA_SET4
+#define UA_SET4 LZO_MEMOPS_SET4
+#endif
+#ifndef UA_MOVE1
+#define UA_MOVE1 LZO_MEMOPS_MOVE1
+#endif
+#ifndef UA_MOVE2
+#define UA_MOVE2 LZO_MEMOPS_MOVE2
+#endif
+#ifndef UA_MOVE3
+#define UA_MOVE3 LZO_MEMOPS_MOVE3
+#endif
+#ifndef UA_MOVE4
+#define UA_MOVE4 LZO_MEMOPS_MOVE4
+#endif
+#ifndef UA_MOVE8
+#define UA_MOVE8 LZO_MEMOPS_MOVE8
+#endif
+#ifndef UA_COPY1
+#define UA_COPY1 LZO_MEMOPS_COPY1
+#endif
+#ifndef UA_COPY2
+#define UA_COPY2 LZO_MEMOPS_COPY2
+#endif
+#ifndef UA_COPY3
+#define UA_COPY3 LZO_MEMOPS_COPY3
+#endif
+#ifndef UA_COPY4
+#define UA_COPY4 LZO_MEMOPS_COPY4
+#endif
+#ifndef UA_COPY8
+#define UA_COPY8 LZO_MEMOPS_COPY8
+#endif
+#ifndef UA_COPYN
+#define UA_COPYN LZO_MEMOPS_COPYN
+#endif
+#ifndef UA_COPYN_X
+#define UA_COPYN_X LZO_MEMOPS_COPYN
+#endif
+#ifndef UA_GET_LE16
+#define UA_GET_LE16 LZO_MEMOPS_GET_LE16
+#endif
+#ifndef UA_GET_LE32
+#define UA_GET_LE32 LZO_MEMOPS_GET_LE32
+#endif
+#ifdef LZO_MEMOPS_GET_LE64
+#ifndef UA_GET_LE64
+#define UA_GET_LE64 LZO_MEMOPS_GET_LE64
#endif
-#if defined(LZO_UNALIGNED_OK_8)
- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint64) == 8)
-# if 1 && defined(ACC_UA_COPY64)
-# define UA_GET64 ACC_UA_GET64
-# define UA_SET64 ACC_UA_SET64
-# define UA_COPY64 ACC_UA_COPY64
-# else
-# define UA_GET64(p) (* (__lzo_ua_volatile const lzo_uint64p) (__lzo_ua_volatile const lzo_voidp) (p))
-# define UA_SET64(p,v) ((* (__lzo_ua_volatile lzo_uint64p) (__lzo_ua_volatile lzo_voidp) (p)) = (lzo_uint64) (v))
-# define UA_COPY64(d,s) UA_SET64(d, UA_GET64(s))
-# endif
+#endif
+#ifndef UA_GET_NE16
+#define UA_GET_NE16 LZO_MEMOPS_GET_NE16
+#endif
+#ifndef UA_GET_NE32
+#define UA_GET_NE32 LZO_MEMOPS_GET_NE32
+#endif
+#ifdef LZO_MEMOPS_GET_NE64
+#ifndef UA_GET_NE64
+#define UA_GET_NE64 LZO_MEMOPS_GET_NE64
+#endif
+#endif
+#ifndef UA_PUT_LE16
+#define UA_PUT_LE16 LZO_MEMOPS_PUT_LE16
+#endif
+#ifndef UA_PUT_LE32
+#define UA_PUT_LE32 LZO_MEMOPS_PUT_LE32
+#endif
+#ifndef UA_PUT_NE16
+#define UA_PUT_NE16 LZO_MEMOPS_PUT_NE16
+#endif
+#ifndef UA_PUT_NE32
+#define UA_PUT_NE32 LZO_MEMOPS_PUT_NE32
#endif
@@ -342,19 +350,13 @@
/***********************************************************************
-// some globals
+//
************************************************************************/
LZO_EXTERN(const lzo_bytep) lzo_copyright(void);
-
-/***********************************************************************
-//
-************************************************************************/
-
#include "lzo_ptr.h"
-
/* Generate compressed data in a deterministic way.
* This is fully portable, and compression can be faster as well.
* A reason NOT to be deterministic is when the block size is
@@ -369,18 +371,14 @@ LZO_EXTERN(const lzo_bytep) lzo_copyright(void);
#ifndef LZO_DICT_USE_PTR
#define LZO_DICT_USE_PTR 1
-#if 0 && (LZO_ARCH_I086)
-# undef LZO_DICT_USE_PTR
-# define LZO_DICT_USE_PTR 0
-#endif
#endif
#if (LZO_DICT_USE_PTR)
# define lzo_dict_t const lzo_bytep
-# define lzo_dict_p lzo_dict_t __LZO_MMODEL *
+# define lzo_dict_p lzo_dict_t *
#else
# define lzo_dict_t lzo_uint
-# define lzo_dict_p lzo_dict_t __LZO_MMODEL *
+# define lzo_dict_p lzo_dict_t *
#endif