Skip to content

Commit a6f197e

Browse files
committed
src/common: update minilzo to v2.10
re #694
1 parent 7041918 commit a6f197e

4 files changed

Lines changed: 834 additions & 215 deletions

File tree

src/common/lzoconf.h

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
This file is part of the LZO real-time data compression library.
44
5-
Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
5+
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
66
All Rights Reserved.
77
88
The LZO library is free software; you can redistribute it and/or
@@ -29,9 +29,9 @@
2929
#ifndef __LZOCONF_H_INCLUDED
3030
#define __LZOCONF_H_INCLUDED 1
3131

32-
#define LZO_VERSION 0x2070
33-
#define LZO_VERSION_STRING "2.07"
34-
#define LZO_VERSION_DATE "Jun 25 2014"
32+
#define LZO_VERSION 0x20a0 /* 2.10 */
33+
#define LZO_VERSION_STRING "2.10"
34+
#define LZO_VERSION_DATE "Mar 01 2017"
3535

3636
/* internal Autoconf configuration file - only used when building LZO */
3737
#if defined(LZO_HAVE_CONFIG_H)
@@ -57,7 +57,7 @@
5757

5858
/* get OS and architecture defines */
5959
#ifndef __LZODEFS_H_INCLUDED
60-
#include "lzodefs.h"
60+
#include <lzo/lzodefs.h>
6161
#endif
6262

6363

@@ -94,25 +94,29 @@ extern "C" {
9494
# if (LZO_OS_WIN64)
9595
typedef unsigned __int64 lzo_uint;
9696
typedef __int64 lzo_int;
97+
# define LZO_TYPEOF_LZO_INT LZO_TYPEOF___INT64
9798
# else
9899
typedef lzo_ullong_t lzo_uint;
99100
typedef lzo_llong_t lzo_int;
101+
# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG_LONG
100102
# endif
101-
# define LZO_SIZEOF_LZO_UINT 8
103+
# define LZO_SIZEOF_LZO_INT 8
102104
# define LZO_UINT_MAX 0xffffffffffffffffull
103105
# define LZO_INT_MAX 9223372036854775807LL
104106
# define LZO_INT_MIN (-1LL - LZO_INT_MAX)
105107
# elif (LZO_ABI_IP32L64) /* MIPS R5900 */
106108
typedef unsigned int lzo_uint;
107109
typedef int lzo_int;
108-
# define LZO_SIZEOF_LZO_UINT LZO_SIZEOF_INT
110+
# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_INT
111+
# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_INT
109112
# define LZO_UINT_MAX UINT_MAX
110113
# define LZO_INT_MAX INT_MAX
111114
# define LZO_INT_MIN INT_MIN
112115
# elif (ULONG_MAX >= LZO_0xffffffffL)
113116
typedef unsigned long lzo_uint;
114117
typedef long lzo_int;
115-
# define LZO_SIZEOF_LZO_UINT LZO_SIZEOF_LONG
118+
# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_LONG
119+
# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG
116120
# define LZO_UINT_MAX ULONG_MAX
117121
# define LZO_INT_MAX LONG_MAX
118122
# define LZO_INT_MIN LONG_MIN
@@ -122,7 +126,7 @@ extern "C" {
122126
#endif
123127

124128
/* The larger type of lzo_uint and lzo_uint32_t. */
125-
#if (LZO_SIZEOF_LZO_UINT >= 4)
129+
#if (LZO_SIZEOF_LZO_INT >= 4)
126130
# define lzo_xint lzo_uint
127131
#else
128132
# define lzo_xint lzo_uint32_t
@@ -131,7 +135,8 @@ extern "C" {
131135
typedef int lzo_bool;
132136

133137
/* sanity checks */
134-
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == LZO_SIZEOF_LZO_UINT)
138+
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int) == LZO_SIZEOF_LZO_INT)
139+
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == LZO_SIZEOF_LZO_INT)
135140
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint))
136141
LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint32_t))
137142

@@ -163,14 +168,14 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint32_t))
163168
#endif
164169

165170
/* Older LZO versions used to support ancient systems and memory models
166-
* like 16-bit MSDOS with __huge pointers and Cray PVP, but these
171+
* such as 16-bit MSDOS with __huge pointers or Cray PVP, but these
167172
* obsolete configurations are not supported any longer.
168173
*/
169174
#if defined(__LZO_MMODEL_HUGE)
170-
#error "__LZO_MMODEL_HUGE is unsupported"
175+
#error "__LZO_MMODEL_HUGE memory model is unsupported"
171176
#endif
172177
#if (LZO_MM_PVP)
173-
#error "LZO_MM_PVP is unsupported"
178+
#error "LZO_MM_PVP memory model is unsupported"
174179
#endif
175180
#if (LZO_SIZEOF_INT < 4)
176181
#error "LZO_SIZEOF_INT < 4 is unsupported"
@@ -221,13 +226,13 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(char *) == sizeof(lzo_bytep))
221226

222227
/* __cdecl calling convention for public C and assembly functions */
223228
#if !defined(LZO_PUBLIC)
224-
# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
229+
# define LZO_PUBLIC(r) __LZO_EXPORT1 r __LZO_EXPORT2 __LZO_CDECL
225230
#endif
226231
#if !defined(LZO_EXTERN)
227-
# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
232+
# define LZO_EXTERN(r) __LZO_EXTERN_C LZO_PUBLIC(r)
228233
#endif
229234
#if !defined(LZO_PRIVATE)
230-
# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL
235+
# define LZO_PRIVATE(r) static r __LZO_CDECL
231236
#endif
232237

233238
/* function types */
@@ -399,6 +404,10 @@ LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp p, lzo_uint size);
399404
/* deprecated types */
400405
typedef union { lzo_bytep a; lzo_uint b; } __lzo_pu_u;
401406
typedef union { lzo_bytep a; lzo_uint32_t b; } __lzo_pu32_u;
407+
/* deprecated defines */
408+
#if !defined(LZO_SIZEOF_LZO_UINT)
409+
# define LZO_SIZEOF_LZO_UINT LZO_SIZEOF_LZO_INT
410+
#endif
402411

403412
#if defined(LZO_CFG_COMPAT)
404413

@@ -441,4 +450,4 @@ typedef union { lzo_bytep a; lzo_uint32_t b; } __lzo_pu32_u;
441450
#endif /* already included */
442451

443452

444-
/* vim:set ts=4 et: */
453+
/* vim:set ts=4 sw=4 et: */

0 commit comments

Comments
 (0)