diff options
author | Arne Schwabe <arne@rfc2549.org> | 2015-08-10 13:51:40 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2015-08-10 13:51:40 +0200 |
commit | 98399ed51045871f8d73599322b6947d6b2b80d0 (patch) | |
tree | 28eb352fc1fd89f9c0969cfe0e7c384dee8b17df /main | |
parent | e6af88b346e9eb5be462429bf9786e7e89ce0e0d (diff) |
Update lzo to 2.09
Diffstat (limited to 'main')
249 files changed, 2345 insertions, 1176 deletions
diff --git a/main/lzo/B/dos32/bc_pp.bat b/main/lzo/B/dos32/bc_pp.bat index 77063464..a85ed440 100644 --- a/main/lzo/B/dos32/bc_pp.bat +++ b/main/lzo/B/dos32/bc_pp.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Borland C/C++ + Borland PowerPack 1.0 (DPMI32)
diff --git a/main/lzo/B/dos32/dj2.bat b/main/lzo/B/dos32/dj2.bat index 85928d02..7e152e9e 100644 --- a/main/lzo/B/dos32/dj2.bat +++ b/main/lzo/B/dos32/dj2.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // djgpp2 + gcc
diff --git a/main/lzo/B/dos32/dm.bat b/main/lzo/B/dos32/dm.bat index 9384bed5..126763eb 100644 --- a/main/lzo/B/dos32/dm.bat +++ b/main/lzo/B/dos32/dm.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Digital Mars C/C++
diff --git a/main/lzo/B/dos32/emx.bat b/main/lzo/B/dos32/emx.bat index 04423424..46249725 100644 --- a/main/lzo/B/dos32/emx.bat +++ b/main/lzo/B/dos32/emx.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // emx + gcc
diff --git a/main/lzo/B/dos32/highc.bat b/main/lzo/B/dos32/highc.bat index a9881164..f1591ba3 100644 --- a/main/lzo/B/dos32/highc.bat +++ b/main/lzo/B/dos32/highc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // MetaWare High C/C++ (using Pharlap DOS extender)
diff --git a/main/lzo/B/dos32/ndp.bat b/main/lzo/B/dos32/ndp.bat index 2b203118..71882ec1 100644 --- a/main/lzo/B/dos32/ndp.bat +++ b/main/lzo/B/dos32/ndp.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Microway NDP C/C++
diff --git a/main/lzo/B/dos32/sc.bat b/main/lzo/B/dos32/sc.bat index 44fed188..22a46847 100644 --- a/main/lzo/B/dos32/sc.bat +++ b/main/lzo/B/dos32/sc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Symantec C/C++
diff --git a/main/lzo/B/dos32/wc.bat b/main/lzo/B/dos32/wc.bat index 21de11dc..3698f6b5 100644 --- a/main/lzo/B/dos32/wc.bat +++ b/main/lzo/B/dos32/wc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Watcom C/C++ (using DOS/4G extender)
diff --git a/main/lzo/B/dos32/zc.bat b/main/lzo/B/dos32/zc.bat index 193502f9..4bbc6a4a 100644 --- a/main/lzo/B/dos32/zc.bat +++ b/main/lzo/B/dos32/zc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Zortech C/C++
diff --git a/main/lzo/B/generic/Makefile b/main/lzo/B/generic/Makefile index 322ebe8a..68c6e2fe 100644 --- a/main/lzo/B/generic/Makefile +++ b/main/lzo/B/generic/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1996-2014 Markus F.X.J. Oberhumer +# Copyright (C) 1996-2015 Markus F.X.J. Oberhumer # # this is modelled after build.sh; needs GNU make 3.80 or better diff --git a/main/lzo/B/generic/build.sh b/main/lzo/B/generic/build.sh index 0480314e..e71a98d2 100755 --- a/main/lzo/B/generic/build.sh +++ b/main/lzo/B/generic/build.sh @@ -1,7 +1,7 @@ #! /bin/sh -# vi:ts=4:et +## vim:set ts=4 sw=4 et: set -e -echo "// Copyright (C) 1996-2014 Markus F.X.J. Oberhumer" +echo "// Copyright (C) 1996-2015 Markus F.X.J. Oberhumer" echo "//" echo "// Generic Posix/Unix system" echo "// Generic C compiler" diff --git a/main/lzo/B/generic/build_freestanding.sh b/main/lzo/B/generic/build_freestanding.sh index 9473dd6d..9d391e9a 100755 --- a/main/lzo/B/generic/build_freestanding.sh +++ b/main/lzo/B/generic/build_freestanding.sh @@ -1,5 +1,5 @@ #! /bin/sh -# vi:ts=4:et +## vim:set ts=4 sw=4 et: test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../.. diff --git a/main/lzo/B/generic/build_gcc.sh b/main/lzo/B/generic/build_gcc.sh index 179d8c0f..241bbf0f 100755 --- a/main/lzo/B/generic/build_gcc.sh +++ b/main/lzo/B/generic/build_gcc.sh @@ -1,5 +1,5 @@ #! /bin/sh -# vi:ts=4:et +## vim:set ts=4 sw=4 et: set -e echo "// Using GNU C compiler." echo "//" diff --git a/main/lzo/B/generic/clean.sh b/main/lzo/B/generic/clean.sh index 2728d2de..87bd4c82 100755 --- a/main/lzo/B/generic/clean.sh +++ b/main/lzo/B/generic/clean.sh @@ -1,6 +1,6 @@ #! /bin/sh -# vi:ts=4:et -# Copyright (C) 1996-2014 Markus F.X.J. Oberhumer +## vim:set ts=4 sw=4 et: +# Copyright (C) 1996-2015 Markus F.X.J. Oberhumer rm -f *.o liblzo2.a dict.out lzopack.out precomp.out precomp2.out simple.out lzotest.out testmini.out diff --git a/main/lzo/B/os2/emx.bat b/main/lzo/B/os2/emx.bat index 2367d65c..bc635711 100644 --- a/main/lzo/B/os2/emx.bat +++ b/main/lzo/B/os2/emx.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // emx + gcc
diff --git a/main/lzo/B/os2/wc.bat b/main/lzo/B/os2/wc.bat index 44b43f50..5e795679 100644 --- a/main/lzo/B/os2/wc.bat +++ b/main/lzo/B/os2/wc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // Watcom C/C++
diff --git a/main/lzo/B/os2/zc.bat b/main/lzo/B/os2/zc.bat index 5e4e7f68..9a1bc02d 100644 --- a/main/lzo/B/os2/zc.bat +++ b/main/lzo/B/os2/zc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // Zortech C/C++
diff --git a/main/lzo/B/win32/bc.bat b/main/lzo/B/win32/bc.bat index 811acdbb..f8cf27c3 100644 --- a/main/lzo/B/win32/bc.bat +++ b/main/lzo/B/win32/bc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Borland C/C++
diff --git a/main/lzo/B/win32/cygwin.bat b/main/lzo/B/win32/cygwin.bat index 57533e0e..c961d0b1 100644 --- a/main/lzo/B/win32/cygwin.bat +++ b/main/lzo/B/win32/cygwin.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // cygwin + gcc
diff --git a/main/lzo/B/win32/dm.bat b/main/lzo/B/win32/dm.bat index 5c65dfe4..c0b88aad 100644 --- a/main/lzo/B/win32/dm.bat +++ b/main/lzo/B/win32/dm.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Digital Mars C/C++
diff --git a/main/lzo/B/win32/ic.bat b/main/lzo/B/win32/ic.bat index f9f6f5a5..30c635c4 100644 --- a/main/lzo/B/win32/ic.bat +++ b/main/lzo/B/win32/ic.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Intel C/C++
diff --git a/main/lzo/B/win32/lccwin32.bat b/main/lzo/B/win32/lccwin32.bat index e01ee98a..1c270c07 100644 --- a/main/lzo/B/win32/lccwin32.bat +++ b/main/lzo/B/win32/lccwin32.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // lcc-win32
diff --git a/main/lzo/B/win32/mingw.bat b/main/lzo/B/win32/mingw.bat index 81830ae6..d466f461 100644 --- a/main/lzo/B/win32/mingw.bat +++ b/main/lzo/B/win32/mingw.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // MinGW + gcc
diff --git a/main/lzo/B/win32/mwerks.bat b/main/lzo/B/win32/mwerks.bat index 8aad1488..f1e4d08d 100644 --- a/main/lzo/B/win32/mwerks.bat +++ b/main/lzo/B/win32/mwerks.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Metrowerks CodeWarrior C/C++
diff --git a/main/lzo/B/win32/pellesc.bat b/main/lzo/B/win32/pellesc.bat index 7123f1b1..cfe8af50 100644 --- a/main/lzo/B/win32/pellesc.bat +++ b/main/lzo/B/win32/pellesc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Pelles C
diff --git a/main/lzo/B/win32/pgi.bat b/main/lzo/B/win32/pgi.bat index 82e17727..8b20d778 100644 --- a/main/lzo/B/win32/pgi.bat +++ b/main/lzo/B/win32/pgi.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Portland Group PGI C/C++
diff --git a/main/lzo/B/win32/pw32.bat b/main/lzo/B/win32/pw32.bat index 583ca493..7b4d6306 100644 --- a/main/lzo/B/win32/pw32.bat +++ b/main/lzo/B/win32/pw32.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // PW32 + gcc
diff --git a/main/lzo/B/win32/rsxnt.bat b/main/lzo/B/win32/rsxnt.bat index 3077f6f4..de8d876e 100644 --- a/main/lzo/B/win32/rsxnt.bat +++ b/main/lzo/B/win32/rsxnt.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // rsxnt + gcc
diff --git a/main/lzo/B/win32/sc.bat b/main/lzo/B/win32/sc.bat index b1f5c463..2d56617a 100644 --- a/main/lzo/B/win32/sc.bat +++ b/main/lzo/B/win32/sc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Symantec C/C++
diff --git a/main/lzo/B/win32/vc.bat b/main/lzo/B/win32/vc.bat index 0b7d1f65..0d66e815 100644 --- a/main/lzo/B/win32/vc.bat +++ b/main/lzo/B/win32/vc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Microsoft Visual C/C++
diff --git a/main/lzo/B/win32/vc_dll.bat b/main/lzo/B/win32/vc_dll.bat index 72788c0a..7b0a02bb 100644 --- a/main/lzo/B/win32/vc_dll.bat +++ b/main/lzo/B/win32/vc_dll.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Microsoft Visual C/C++ (DLL)
diff --git a/main/lzo/B/win32/wc.bat b/main/lzo/B/win32/wc.bat index 64e34a23..685df93d 100644 --- a/main/lzo/B/win32/wc.bat +++ b/main/lzo/B/win32/wc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Watcom C/C++
diff --git a/main/lzo/B/win64/ic.bat b/main/lzo/B/win64/ic.bat index 154d5e4d..9ddc3dd9 100644 --- a/main/lzo/B/win64/ic.bat +++ b/main/lzo/B/win64/ic.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 64-bit (Itanium)
@echo // Intel C/C++
diff --git a/main/lzo/B/win64/ic_dll.bat b/main/lzo/B/win64/ic_dll.bat index 620fadcc..0bf285ff 100644 --- a/main/lzo/B/win64/ic_dll.bat +++ b/main/lzo/B/win64/ic_dll.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 64-bit (Itanium)
@echo // Intel C/C++ (DLL)
diff --git a/main/lzo/B/win64/vc.bat b/main/lzo/B/win64/vc.bat index 1aada926..888bd06d 100644 --- a/main/lzo/B/win64/vc.bat +++ b/main/lzo/B/win64/vc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 64-bit (AMD64 or Itanium)
@echo // Microsoft Visual C/C++
diff --git a/main/lzo/B/win64/vc_dll.bat b/main/lzo/B/win64/vc_dll.bat index 63ea5fc8..8427e197 100644 --- a/main/lzo/B/win64/vc_dll.bat +++ b/main/lzo/B/win64/vc_dll.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2014 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2015 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 64-bit (AMD64 or Itanium)
@echo // Microsoft Visual C/C++ (DLL)
diff --git a/main/lzo/CMakeLists.txt b/main/lzo/CMakeLists.txt new file mode 100644 index 00000000..bf79f637 --- /dev/null +++ b/main/lzo/CMakeLists.txt @@ -0,0 +1,234 @@ +# +# CMakeLists.txt --- a simple "CMake" file for building LZO +# +# This file is part of the LZO data compression library. +# +# Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer +# All Rights Reserved. +# + +# +# simple usage: +# mkdir -p build && cd build && cmake .. && make +# +# another usage example: +# mkdir -p build/release-i686 +# cd build/release-i686 +# cmake ../.. -DENABLE_STATIC=0 -DENABLE_SHARED=1 \ +# -DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS="-m32 -march=i686" \ +# -DCMAKE_INSTALL_PREFIX=/opt/local/prefix-i686 +# make VERBOSE=1 +# make install +# +# see http://www.cmake.org/ for more info +# + +# +# init +# + +cmake_minimum_required(VERSION 2.6 FATAL_ERROR) + +# Disallow in-source builds. Note that you will still have to manually +# clean up a few files if you accidentally try an in-source build. +set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) +set(CMAKE_DISABLE_SOURCE_CHANGES ON) +if(",${CMAKE_SOURCE_DIR}," STREQUAL ",${CMAKE_BINARY_DIR},") + message(FATAL_ERROR "ERROR: In-source builds are not allowed.") +endif() + +project(lzo C) + +# +# configuration options +# + +option(ENABLE_STATIC "Build static LZO library." ON) +option(ENABLE_SHARED "Build shared LZO library." OFF) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) +endif() +if(NOT CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "" FORCE) +endif() + +# +# targets +# + +file(GLOB lzo_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.c") +list(SORT lzo_SOURCES) + +# LZO library +if(NOT ENABLE_STATIC AND NOT ENABLE_SHARED) + set(ENABLE_STATIC ON) +endif() +if(ENABLE_STATIC) + add_library(lzo_static STATIC ${lzo_SOURCES}) + set_target_properties(lzo_static PROPERTIES OUTPUT_NAME lzo2) +endif() +if(ENABLE_SHARED) + add_library(lzo_shared SHARED ${lzo_SOURCES}) + set_target_properties(lzo_shared PROPERTIES OUTPUT_NAME lzo2) + set_target_properties(lzo_shared PROPERTIES SOVERSION 2 VERSION 2.0.0) +endif() + +# tests & examples +macro(lzo_add_executable t) + add_executable(${t} ${ARGN}) + if(ENABLE_STATIC) + target_link_libraries(${t} lzo_static) + else() + target_link_libraries(${t} lzo_shared) + endif() +endmacro() +# main test driver +lzo_add_executable(lzotest lzotest/lzotest.c) +# examples +lzo_add_executable(dict examples/dict.c) +lzo_add_executable(lzopack examples/lzopack.c) +lzo_add_executable(overlap examples/overlap.c) +lzo_add_executable(precomp examples/precomp.c) +lzo_add_executable(precomp2 examples/precomp2.c) +lzo_add_executable(simple examples/simple.c) +# some boring internal test programs +if(0) + lzo_add_executable(align tests/align.c) + lzo_add_executable(chksum tests/chksum.c) + lzo_add_executable(promote tests/promote.c) + lzo_add_executable(sizes tests/sizes.c) +endif() + +# miniLZO +if(1) + add_executable(testmini minilzo/testmini.c minilzo/minilzo.c) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/lzo) # needed for "lzoconf.h" +endif() + +# +# compilation flags +# + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckLibraryExists) +include(CheckSymbolExists) +include(CheckTypeSize) +include(TestBigEndian) + +# Checks for header files +macro(mfx_check_include_file f var) + check_include_file("${f}" "mfx_${var}") + if(NOT ",${mfx_${var}}," STREQUAL ",,") + add_definitions(-D${var}=1) + set(mfx_${var} 1) + else() + set(mfx_${var} 0) + endif() +endmacro() +# mfx_ACC_CHECK_HEADERS +set(l assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h) +foreach(f ${l}) + string(TOUPPER "${f}" var) + string(REGEX REPLACE "[^0-9A-Z_]" "_" var "${var}") + mfx_check_include_file("${f}" "HAVE_${var}") +endforeach() + +# Checks for typedefs and structures +macro(mfx_check_type_size type var) + check_type_size("${type}" "mfx_${var}") + if("${mfx_${var}}" MATCHES "^[1-9][0-9]*$") + add_definitions(-D${var}=${mfx_${var}}) + else() + set(mfx_${var} 0) + endif() +endmacro() +# mfx_ACC_CHECK_SIZEOF + mfx_CHECK_SIZEOF +set(l short int long "long long" __int16 __int32 __int64 "void *" size_t ptrdiff_t intmax_t uintmax_t intptr_t uintptr_t float double "long double" dev_t fpos_t mode_t off_t ssize_t time_t) +foreach(f ${l}) + string(TOUPPER "${f}" var) + string(REGEX REPLACE " \\*" "_P" var "${var}") + string(REGEX REPLACE "[^0-9A-Z_]" "_" var "${var}") + mfx_check_type_size("${f}" "SIZEOF_${var}") +endforeach() + +# Checks for library functions +macro(mfx_check_function_exists func var) + check_function_exists("${func}" "mfx_${var}") + if(NOT ",${mfx_${var}}," STREQUAL ",,") + add_definitions(-D${var}=1) + set(mfx_${var} 1) + else() + set(mfx_${var} 0) + endif() +endmacro() +# mfx_ACC_CHECK_FUNCS +set(l access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) +foreach(f ${l}) + string(TOUPPER "${f}" var) + string(REGEX REPLACE "[^0-9A-Z_]" "_" var "${var}") + mfx_check_function_exists("${f}" "HAVE_${var}") +endforeach() + +# mfx_LZO_CHECK_ENDIAN +TEST_BIG_ENDIAN(big_endian) +if ("${big_endian}" MATCHES "^1$") + add_definitions(-DLZO_ABI_BIG_ENDIAN=1) +elseif ("${big_endian}" MATCHES "^0$") + add_definitions(-DLZO_ABI_LITTLE_ENDIAN=1) +else() + message(FATAL_ERROR "ERROR: TEST_BIG_ENDIAN failed with result '${big_endian}'.") +endif() + +# LZO_HAVE_CONFIG_H +add_definitions(-DLZO_CFG_NO_CONFIG_HEADER=1) + +# +# "make install" +# + +# these subdirs are relative to CMAKE_INSTALL_PREFIX +if(NOT DEFINED install_doc_subdir) + set(install_doc_subdir "share/doc/lzo") +endif() +if(NOT DEFINED install_include_subdir) + set(install_include_subdir "include/lzo") +endif() +if(NOT DEFINED install_lib_subdir) + set(install_lib_subdir "lib") +endif() +if(NOT DEFINED install_examples_subdir) + set(install_examples_subdir "libexec/lzo/examples") +endif() + +set(doc_DATA AUTHORS COPYING NEWS THANKS doc/LZO.FAQ doc/LZO.TXT doc/LZOAPI.TXT) +set(pkginclude_HEADERS + include/lzo/lzo1.h include/lzo/lzo1a.h include/lzo/lzo1b.h + include/lzo/lzo1c.h include/lzo/lzo1f.h include/lzo/lzo1x.h + include/lzo/lzo1y.h include/lzo/lzo1z.h include/lzo/lzo2a.h + include/lzo/lzo_asm.h include/lzo/lzoconf.h include/lzo/lzodefs.h + include/lzo/lzoutil.h +) + +install(FILES ${doc_DATA} DESTINATION "${install_doc_subdir}") +install(FILES ${pkginclude_HEADERS} DESTINATION "${install_include_subdir}") +if(ENABLE_STATIC) + install(TARGETS lzo_static DESTINATION "${install_lib_subdir}") +endif() +if(ENABLE_SHARED) + install(TARGETS lzo_shared DESTINATION "${install_lib_subdir}") +endif() +if(0) + set(lzo_EXAMPLES lzopack lzotest simple) + if(NOT ENABLE_STATIC) + set(d "${CMAKE_INSTALL_PREFIX}/${install_lib_subdir}") + set_target_properties(${lzo_EXAMPLES} PROPERTIES INSTALL_RPATH "${d}") + endif() + install(TARGETS ${lzo_EXAMPLES} DESTINATION "${install_examples_subdir}") +endif() + +# vim:set ft=cmake ts=4 sw=4 tw=0 et: diff --git a/main/lzo/Makefile.am b/main/lzo/Makefile.am index 246dc603..8365cab4 100644 --- a/main/lzo/Makefile.am +++ b/main/lzo/Makefile.am @@ -4,7 +4,7 @@ # # This file is part of the LZO data compression library. # -# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +# Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer # All Rights Reserved. # @@ -20,7 +20,7 @@ noinst_PROGRAMS = ##************************************************************************/ doc_DATA = AUTHORS COPYING NEWS THANKS doc/LZO.FAQ doc/LZO.TXT doc/LZOAPI.TXT -EXTRA_DIST += BUGS autoconf/shtool +EXTRA_DIST += BUGS CMakeLists.txt autoconf/shtool # hooks for Automake targets dist-hook: dist-hook-1 @@ -31,7 +31,7 @@ dist-hook-1: check-local: all-am ./lzotest/lzotest -mlzo -n2 -q $(top_srcdir)/COPYING @echo - @echo "All checks passed." + @echo "===== All checks passed. Type 'make test' for more exhaustive testing. =====" @echo # special targets @@ -44,13 +44,13 @@ basic-test: all test: all ./lzotest/lzotest -mavail -n10 -q $(top_srcdir)/COPYING - $(SHELL) -e $(top_srcdir)/util/check.sh $(top_srcdir) + LZOTEST=./lzotest/lzotest$(EXEEXT) $(SHELL) -e "$(top_srcdir)/util/check.sh" "$(top_srcdir)" ./tests/align ./tests/chksum ./examples/simple ./minilzo/testmini @echo - @echo "All tests passed. Now you are ready to install LZO." + @echo "===== All tests passed. Now you are ready to install LZO. =====" @echo diff --git a/main/lzo/Makefile.in b/main/lzo/Makefile.in index 6b77e152..a88e6a81 100644 --- a/main/lzo/Makefile.in +++ b/main/lzo/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -19,7 +19,7 @@ # # This file is part of the LZO data compression library. # -# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +# Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer # All Rights Reserved. # @@ -27,7 +27,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -98,26 +108,13 @@ noinst_PROGRAMS = examples/dict$(EXEEXT) examples/lzopack$(EXEEXT) \ tests/chksum$(EXEEXT) tests/promote$(EXEEXT) \ tests/sizes$(EXEEXT) minilzo/testmini$(EXEEXT) subdir = . -DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.hin $(top_srcdir)/autoconf/mkinstalldirs \ - $(top_srcdir)/autoconf/depcomp $(pkginclude_HEADERS) COPYING \ - THANKS autoconf/compile autoconf/config.guess \ - autoconf/config.rpath autoconf/config.sub autoconf/depcomp \ - autoconf/install-sh autoconf/mdate-sh autoconf/missing \ - autoconf/mkinstalldirs autoconf/py-compile autoconf/ylwrap \ - autoconf/ltmain.sh $(top_srcdir)/autoconf/compile \ - $(top_srcdir)/autoconf/config.guess \ - $(top_srcdir)/autoconf/config.sub \ - $(top_srcdir)/autoconf/install-sh \ - $(top_srcdir)/autoconf/ltmain.sh \ - $(top_srcdir)/autoconf/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/autoconf/local.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(pkginclude_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs @@ -325,6 +322,20 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.hin \ + $(top_srcdir)/autoconf/ar-lib $(top_srcdir)/autoconf/compile \ + $(top_srcdir)/autoconf/config.guess \ + $(top_srcdir)/autoconf/config.sub \ + $(top_srcdir)/autoconf/depcomp \ + $(top_srcdir)/autoconf/install-sh \ + $(top_srcdir)/autoconf/ltmain.sh \ + $(top_srcdir)/autoconf/missing \ + $(top_srcdir)/autoconf/mkinstalldirs AUTHORS COPYING ChangeLog \ + INSTALL NEWS README THANKS autoconf/ar-lib autoconf/compile \ + autoconf/config.guess autoconf/config.rpath \ + autoconf/config.sub autoconf/depcomp autoconf/install-sh \ + autoconf/ltmain.sh autoconf/mdate-sh autoconf/missing \ + autoconf/mkinstalldirs autoconf/py-compile autoconf/ylwrap DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -464,19 +475,19 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = BUGS autoconf/shtool src/compr1b.h src/compr1c.h \ - src/config1.h src/config1a.h src/config1b.h src/config1c.h \ - src/config1f.h src/config1x.h src/config1y.h src/config1z.h \ - src/config2a.h src/lzo1_cm.ch src/lzo1_d.ch src/lzo1a_cm.ch \ - src/lzo1a_cr.ch src/lzo1a_de.h src/lzo1b_c.ch src/lzo1b_cc.h \ - src/lzo1b_cm.ch src/lzo1b_cr.ch src/lzo1b_d.ch src/lzo1b_de.h \ - src/lzo1b_r.ch src/lzo1b_sm.ch src/lzo1b_tm.ch src/lzo1c_cc.h \ - src/lzo1f_d.ch src/lzo1x_c.ch src/lzo1x_d.ch src/lzo1x_oo.ch \ - src/lzo2a_d.ch src/lzo_conf.h src/lzo_dict.h src/lzo_dll.ch \ - src/lzo_func.h src/lzo_mchw.ch src/lzo_ptr.h src/lzo_supp.h \ - src/lzo_swd.ch src/stats1a.h src/stats1b.h src/stats1c.h \ - examples/portab.h examples/portab_a.h lzotest/asm.h \ - lzotest/db.h lzotest/wrap.h lzotest/wrapmisc.h \ +EXTRA_DIST = BUGS CMakeLists.txt autoconf/shtool src/compr1b.h \ + src/compr1c.h src/config1.h src/config1a.h src/config1b.h \ + src/config1c.h src/config1f.h src/config1x.h src/config1y.h \ + src/config1z.h src/config2a.h src/lzo1_cm.ch src/lzo1_d.ch \ + src/lzo1a_cm.ch src/lzo1a_cr.ch src/lzo1a_de.h src/lzo1b_c.ch \ + src/lzo1b_cc.h src/lzo1b_cm.ch src/lzo1b_cr.ch src/lzo1b_d.ch \ + src/lzo1b_de.h src/lzo1b_r.ch src/lzo1b_sm.ch src/lzo1b_tm.ch \ + src/lzo1c_cc.h src/lzo1f_d.ch src/lzo1x_c.ch src/lzo1x_d.ch \ + src/lzo1x_oo.ch src/lzo2a_d.ch src/lzo_conf.h src/lzo_dict.h \ + src/lzo_dll.ch src/lzo_func.h src/lzo_mchw.ch src/lzo_ptr.h \ + src/lzo_supp.h src/lzo_swd.ch src/stats1a.h src/stats1b.h \ + src/stats1c.h examples/portab.h examples/portab_a.h \ + lzotest/asm.h lzotest/db.h lzotest/wrap.h lzotest/wrapmisc.h \ minilzo/Makefile.minilzo minilzo/README.LZO minilzo/minilzo.h AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) LDADD = src/liblzo2.la @@ -566,7 +577,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1189,15 +1199,15 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -1233,17 +1243,17 @@ distcheck: dist esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -1445,6 +1455,8 @@ uninstall-am: uninstall-docDATA uninstall-libLTLIBRARIES \ uninstall-docDATA uninstall-libLTLIBRARIES \ uninstall-pkgincludeHEADERS +.PRECIOUS: Makefile + # hooks for Automake targets dist-hook: dist-hook-1 @@ -1455,7 +1467,7 @@ dist-hook-1: check-local: all-am ./lzotest/lzotest -mlzo -n2 -q $(top_srcdir)/COPYING @echo - @echo "All checks passed." + @echo "===== All checks passed. Type 'make test' for more exhaustive testing. =====" @echo # special targets @@ -1468,13 +1480,13 @@ basic-test: all test: all ./lzotest/lzotest -mavail -n10 -q $(top_srcdir)/COPYING - $(SHELL) -e $(top_srcdir)/util/check.sh $(top_srcdir) + LZOTEST=./lzotest/lzotest$(EXEEXT) $(SHELL) -e "$(top_srcdir)/util/check.sh" "$(top_srcdir)" ./tests/align ./tests/chksum ./examples/simple ./minilzo/testmini @echo - @echo "All tests passed. Now you are ready to install LZO." + @echo "===== All tests passed. Now you are ready to install LZO. =====" @echo @MAINT@-include $(top_srcdir)/Makefile.maint diff --git a/main/lzo/NEWS b/main/lzo/NEWS index 103c4d87..80da4ea3 100644 --- a/main/lzo/NEWS +++ b/main/lzo/NEWS @@ -2,17 +2,26 @@ User visible changes for LZO -- a real-time data compression library ============================================================================ +Changes in 2.09 (04 Feb 2015) + * Work around gcc bug #64516 that could affect architectures like + armv4, armv5 and sparc. + +Changes in 2.08 (29 Jun 2014) + * Updated the Autoconf scripts to fix some reported build problems. + * Added CMake build support. + * Fixed lzo_init() on big-endian architectures like Sparc. + Changes in 2.07 (25 Jun 2014) * Fixed a potential integer overflow condition in the "safe" decompressor variants which could result in a possible buffer overrun when processing maliciously crafted compressed input data. - As this issue only affects 32-bit systems and also can only happen if - you use uncommonly huge buffer sizes where you have to decompress more - than 16 MiB (2^24 bytes) compressed bytes within a single function call, - the practical implications are limited. + Fortunately this issue only affects 32-bit systems and also can only happen + if you use uncommonly huge buffer sizes where you have to decompress more + than 16 MiB (> 2^24 bytes) untrusted compressed bytes within a single + function call, so the practical implications are limited. - POTENTIAL SECURITY ISSUE. + POTENTIAL SECURITY ISSUE. CVE-2014-4607. * Removed support for ancient configurations like 16-bit "huge" pointers - LZO now requires a flat 32-bit or 64-bit memory model. diff --git a/main/lzo/aclocal.m4 b/main/lzo/aclocal.m4 index b6ae565b..9db4ce90 100644 --- a/main/lzo/aclocal.m4 +++ b/main/lzo/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8618,7 +8618,7 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8630,10 +8630,10 @@ m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -8649,14 +8649,74 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + AC_LANG_POP([C])]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) + # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8676,7 +8736,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8721,15 +8781,14 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8760,7 +8819,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8951,7 +9010,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9027,7 +9086,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9117,8 +9176,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -9191,7 +9250,11 @@ to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -9220,7 +9283,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9231,7 +9294,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -9241,7 +9304,7 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9263,7 +9326,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9298,7 +9361,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9348,7 +9411,7 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9387,7 +9450,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9416,7 +9479,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9463,7 +9526,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9482,7 +9545,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9563,7 +9626,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9623,7 +9686,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9651,7 +9714,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9670,7 +9733,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/main/lzo/asm/i386/obj/macho32/lzo1c_s1.o b/main/lzo/asm/i386/obj/macho32/lzo1c_s1.o Binary files differnew file mode 100644 index 00000000..d70edd91 --- /dev/null +++ b/main/lzo/asm/i386/obj/macho32/lzo1c_s1.o diff --git a/main/lzo/asm/i386/obj/macho32/lzo1f_f1.o b/main/lzo/asm/i386/obj/macho32/lzo1f_f1.o Binary files differnew file mode 100644 index 00000000..06cc4909 --- /dev/null +++ b/main/lzo/asm/i386/obj/macho32/lzo1f_f1.o diff --git a/main/lzo/asm/i386/obj/macho32/lzo1x_f1.o b/main/lzo/asm/i386/obj/macho32/lzo1x_f1.o Binary files differnew file mode 100644 index 00000000..3644103a --- /dev/null +++ b/main/lzo/asm/i386/obj/macho32/lzo1x_f1.o diff --git a/main/lzo/asm/i386/obj/macho32/lzo1x_s1.o b/main/lzo/asm/i386/obj/macho32/lzo1x_s1.o Binary files differnew file mode 100644 index 00000000..79edb273 --- /dev/null +++ b/main/lzo/asm/i386/obj/macho32/lzo1x_s1.o diff --git a/main/lzo/asm/i386/obj/macho32/lzo1y_f1.o b/main/lzo/asm/i386/obj/macho32/lzo1y_f1.o Binary files differnew file mode 100644 index 00000000..68e0a005 --- /dev/null +++ b/main/lzo/asm/i386/obj/macho32/lzo1y_f1.o diff --git a/main/lzo/asm/i386/obj/macho32/lzo1y_s1.o b/main/lzo/asm/i386/obj/macho32/lzo1y_s1.o Binary files differnew file mode 100644 index 00000000..f47ecade --- /dev/null +++ b/main/lzo/asm/i386/obj/macho32/lzo1y_s1.o diff --git a/main/lzo/asm/i386/src/enter.ash b/main/lzo/asm/i386/src/enter.ash index c121c573..fbfc9b8b 100644 --- a/main/lzo/asm/i386/src/enter.ash +++ b/main/lzo/asm/i386/src/enter.ash @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -71,7 +71,4 @@ #endif -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/leave.ash b/main/lzo/asm/i386/src/leave.ash index 2aa02867..209e2bbd 100644 --- a/main/lzo/asm/i386/src/leave.ash +++ b/main/lzo/asm/i386/src/leave.ash @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -96,7 +96,4 @@ .L_end: -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo1c_d.ash b/main/lzo/asm/i386/src/lzo1c_d.ash index 4560452b..d373ed26 100644 --- a/main/lzo/asm/i386/src/lzo1c_d.ash +++ b/main/lzo/asm/i386/src/lzo1c_d.ash @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -166,7 +166,4 @@ setnz %al -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo1c_s1.S b/main/lzo/asm/i386/src/lzo1c_s1.S index d1cdd628..2de44637 100644 --- a/main/lzo/asm/i386/src/lzo1c_s1.S +++ b/main/lzo/asm/i386/src/lzo1c_s1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -43,7 +43,4 @@ LZO_PUBLIC_END(lzo1c_decompress_asm) -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo1f_d.ash b/main/lzo/asm/i386/src/lzo1f_d.ash index 50248d8b..edbe0a6a 100644 --- a/main/lzo/asm/i386/src/lzo1f_d.ash +++ b/main/lzo/asm/i386/src/lzo1f_d.ash @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -158,7 +158,4 @@ setnz %al -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo1f_f1.S b/main/lzo/asm/i386/src/lzo1f_f1.S index 5566cc57..b77c8943 100644 --- a/main/lzo/asm/i386/src/lzo1f_f1.S +++ b/main/lzo/asm/i386/src/lzo1f_f1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -43,7 +43,4 @@ LZO_PUBLIC_END(lzo1f_decompress_asm_fast) -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo1x_d.ash b/main/lzo/asm/i386/src/lzo1x_d.ash index a05f15dc..35d1ca4f 100644 --- a/main/lzo/asm/i386/src/lzo1x_d.ash +++ b/main/lzo/asm/i386/src/lzo1x_d.ash @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -383,7 +383,4 @@ setnz %al -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo1x_f1.S b/main/lzo/asm/i386/src/lzo1x_f1.S index f9706f13..20810526 100644 --- a/main/lzo/asm/i386/src/lzo1x_f1.S +++ b/main/lzo/asm/i386/src/lzo1x_f1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -45,7 +45,4 @@ LZO_PUBLIC_END(lzo1x_decompress_asm_fast) -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo1x_s1.S b/main/lzo/asm/i386/src/lzo1x_s1.S index 198980de..c034d7a3 100644 --- a/main/lzo/asm/i386/src/lzo1x_s1.S +++ b/main/lzo/asm/i386/src/lzo1x_s1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -43,7 +43,4 @@ LZO_PUBLIC_END(lzo1x_decompress_asm) -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo1y_f1.S b/main/lzo/asm/i386/src/lzo1y_f1.S index 98ab9152..2fbd0228 100644 --- a/main/lzo/asm/i386/src/lzo1y_f1.S +++ b/main/lzo/asm/i386/src/lzo1y_f1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -47,7 +47,4 @@ LZO_PUBLIC_END(lzo1y_decompress_asm_fast) -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo1y_s1.S b/main/lzo/asm/i386/src/lzo1y_s1.S index b48212f5..245a8f7a 100644 --- a/main/lzo/asm/i386/src/lzo1y_s1.S +++ b/main/lzo/asm/i386/src/lzo1y_s1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -45,7 +45,4 @@ LZO_PUBLIC_END(lzo1y_decompress_asm) -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src/lzo_asm.h b/main/lzo/asm/i386/src/lzo_asm.h index 1958517d..538b4089 100644 --- a/main/lzo/asm/i386/src/lzo_asm.h +++ b/main/lzo/asm/i386/src/lzo_asm.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -268,8 +268,4 @@ #endif - -/* -vi:ts=4 -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/asm/i386/src_gas/all/asm_all.S b/main/lzo/asm/i386/src_gas/all/asm_all.S index 6da894b2..730ed07a 100644 --- a/main/lzo/asm/i386/src_gas/all/asm_all.S +++ b/main/lzo/asm/i386/src_gas/all/asm_all.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -27,36 +27,60 @@ /***** DO NOT EDIT - GENERATED AUTOMATICALLY *****/ +#ifndef NAME1 #if (defined(__MACH__) && defined(__APPLE__)) -# define NAME1(x) _ ## x +# define NAME1(a) _ ## a #else -# define NAME1(x) _ ## x -# define NAME2(x) x +# define NAME1(a) _ ## a +# define NAME2(a) a +#endif +#endif +#ifndef LZO_PP_CONCAT2 +# define LZO_PP_CONCAT2(a,b) a ## b #endif #ifndef p2align -# define p2align(x) .p2align x +# define p2align(a) .p2align a #endif #ifndef globalf -# define globalf(x) .globl x +# define globalf(a) .globl a +#endif +#ifndef hiddenf +# if defined(__ELF__) +# define hiddenf(a) .hidden a +# elif (defined(__MACH__) && defined(__APPLE__)) +# define hiddenf(a) .private_extern a +# else +# define hiddenf(a) +# endif #endif #ifndef typef # if defined(__ELF__) -# define typef(x) .type x,@function +# define typef(a) .type a,@function # else -# define typef(x) +# define typef(a) # endif #endif #ifndef sizef # if defined(__ELF__) -# define sizef(x,s) .size x,s +# define sizef(a,b) .size a,b # else -# define sizef(x,s) +# define sizef(a,b) # endif #endif #if defined(__ELF__) .section .note.GNU-stack,"",@progbits #endif .text +#if defined(_WIN32) || defined(__WIN32__) +# if defined(LZO_WIN32_FEAT_00) +# LZO_WIN32_FEAT_00 +# else +#if defined(__GNUC__) && !defined(__clang__) +.globl @feat.00 +#endif +@feat.00 = 1 +# endif +#endif #if defined(__ELF__) || (defined(__MACH__) && defined(__APPLE__)) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(__WIN64__) p2align(6) #else diff --git a/main/lzo/asm/i386/src_gas/asminit.def b/main/lzo/asm/i386/src_gas/asminit.def index 1115582f..257190d0 100644 --- a/main/lzo/asm/i386/src_gas/asminit.def +++ b/main/lzo/asm/i386/src_gas/asminit.def @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -25,31 +25,46 @@ http://www.oberhumer.com/opensource/lzo/ */ +#ifndef NAME1 #if (defined(__MACH__) && defined(__APPLE__)) -# define NAME1(x) _ ## x +# define NAME1(a) _ ## a #else -# define NAME1(x) _ ## x -# define NAME2(x) x +# define NAME1(a) _ ## a +# define NAME2(a) a +#endif +#endif + +#ifndef LZO_PP_CONCAT2 +# define LZO_PP_CONCAT2(a,b) a ## b #endif #ifndef p2align -# define p2align(x) .p2align x +# define p2align(a) .p2align a #endif #ifndef globalf -# define globalf(x) .globl x +# define globalf(a) .globl a +#endif +#ifndef hiddenf +# if defined(__ELF__) +# define hiddenf(a) .hidden a +# elif (defined(__MACH__) && defined(__APPLE__)) +# define hiddenf(a) .private_extern a +# else +# define hiddenf(a) +# endif #endif #ifndef typef # if defined(__ELF__) -# define typef(x) .type x,@function +# define typef(a) .type a,@function # else -# define typef(x) +# define typef(a) # endif #endif #ifndef sizef # if defined(__ELF__) -# define sizef(x,s) .size x,s +# define sizef(a,b) .size a,b # else -# define sizef(x,s) +# define sizef(a,b) # endif #endif @@ -57,6 +72,16 @@ .section .note.GNU-stack,"",@progbits #endif .text +#if defined(_WIN32) || defined(__WIN32__) +# if defined(LZO_WIN32_FEAT_00) +# LZO_WIN32_FEAT_00 +# else +#if defined(__GNUC__) && !defined(__clang__) +.globl @feat.00 +#endif +@feat.00 = 1 +# endif +#endif #if defined(__ELF__) || (defined(__MACH__) && defined(__APPLE__)) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(__WIN64__) p2align(6) #else diff --git a/main/lzo/asm/i386/src_gas/lzo1c_s1.S b/main/lzo/asm/i386/src_gas/lzo1c_s1.S index c21ef485..4f15ca8f 100644 --- a/main/lzo/asm/i386/src_gas/lzo1c_s1.S +++ b/main/lzo/asm/i386/src_gas/lzo1c_s1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_gas/lzo1f_f1.S b/main/lzo/asm/i386/src_gas/lzo1f_f1.S index eec8c8a6..a2c3c4e4 100644 --- a/main/lzo/asm/i386/src_gas/lzo1f_f1.S +++ b/main/lzo/asm/i386/src_gas/lzo1f_f1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_gas/lzo1x_f1.S b/main/lzo/asm/i386/src_gas/lzo1x_f1.S index 87ef8d7d..8e2bcc9e 100644 --- a/main/lzo/asm/i386/src_gas/lzo1x_f1.S +++ b/main/lzo/asm/i386/src_gas/lzo1x_f1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_gas/lzo1x_s1.S b/main/lzo/asm/i386/src_gas/lzo1x_s1.S index 69523a73..ed43092b 100644 --- a/main/lzo/asm/i386/src_gas/lzo1x_s1.S +++ b/main/lzo/asm/i386/src_gas/lzo1x_s1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_gas/lzo1y_f1.S b/main/lzo/asm/i386/src_gas/lzo1y_f1.S index cfc59937..32ee007a 100644 --- a/main/lzo/asm/i386/src_gas/lzo1y_f1.S +++ b/main/lzo/asm/i386/src_gas/lzo1y_f1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_gas/lzo1y_s1.S b/main/lzo/asm/i386/src_gas/lzo1y_s1.S index b7900ca6..6a52bbbc 100644 --- a/main/lzo/asm/i386/src_gas/lzo1y_s1.S +++ b/main/lzo/asm/i386/src_gas/lzo1y_s1.S @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_masm/all/asm_all.asm b/main/lzo/asm/i386/src_masm/all/asm_all.asm index c35e2969..bda48d44 100644 --- a/main/lzo/asm/i386/src_masm/all/asm_all.asm +++ b/main/lzo/asm/i386/src_masm/all/asm_all.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_masm/asminit.def b/main/lzo/asm/i386/src_masm/asminit.def index 81a9d21c..749eb9b5 100644 --- a/main/lzo/asm/i386/src_masm/asminit.def +++ b/main/lzo/asm/i386/src_masm/asminit.def @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_masm/lzo1c_s1.asm b/main/lzo/asm/i386/src_masm/lzo1c_s1.asm index f6aae35f..f9418df3 100644 --- a/main/lzo/asm/i386/src_masm/lzo1c_s1.asm +++ b/main/lzo/asm/i386/src_masm/lzo1c_s1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_masm/lzo1f_f1.asm b/main/lzo/asm/i386/src_masm/lzo1f_f1.asm index 23ee4493..ec51f0ba 100644 --- a/main/lzo/asm/i386/src_masm/lzo1f_f1.asm +++ b/main/lzo/asm/i386/src_masm/lzo1f_f1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_masm/lzo1x_f1.asm b/main/lzo/asm/i386/src_masm/lzo1x_f1.asm index 7e77a174..efe2f040 100644 --- a/main/lzo/asm/i386/src_masm/lzo1x_f1.asm +++ b/main/lzo/asm/i386/src_masm/lzo1x_f1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_masm/lzo1x_s1.asm b/main/lzo/asm/i386/src_masm/lzo1x_s1.asm index f466aa8a..1c31acc5 100644 --- a/main/lzo/asm/i386/src_masm/lzo1x_s1.asm +++ b/main/lzo/asm/i386/src_masm/lzo1x_s1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_masm/lzo1y_f1.asm b/main/lzo/asm/i386/src_masm/lzo1y_f1.asm index c4ff7a36..f111ccb5 100644 --- a/main/lzo/asm/i386/src_masm/lzo1y_f1.asm +++ b/main/lzo/asm/i386/src_masm/lzo1y_f1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_masm/lzo1y_s1.asm b/main/lzo/asm/i386/src_masm/lzo1y_s1.asm index 4c8d7108..c7779489 100644 --- a/main/lzo/asm/i386/src_masm/lzo1y_s1.asm +++ b/main/lzo/asm/i386/src_masm/lzo1y_s1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_nasm/all/asm_all.asm b/main/lzo/asm/i386/src_nasm/all/asm_all.asm index b0df7de7..f453e626 100644 --- a/main/lzo/asm/i386/src_nasm/all/asm_all.asm +++ b/main/lzo/asm/i386/src_nasm/all/asm_all.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or @@ -49,23 +49,36 @@ bits 32 %define __OUTPUT_FORMAT__ win64 %endif %endif +%ifndef NAME1 %ifidni __OUTPUT_FORMAT__,macho32 -%define NAME1(x) _ %+ x +%define NAME1(a) _ %+ a %elifidni __OUTPUT_FORMAT__,macho64 -%define NAME1(x) _ %+ x +%define NAME1(a) _ %+ a %else -%define NAME1(x) _ %+ x -%define NAME2(x) x +%define NAME1(a) _ %+ a +%define NAME2(a) a +%endif %endif %ifidni __OUTPUT_FORMAT__,elf32 -%define globalf(x) global x:function (x %+ _end - x) -%define globalf_end(x) x %+ _end: +%define globalf(a) global a:function (a %+ _end - a) +%define globalfh(a) global a:function hidden (a %+ _end - a) +%define globalf_end(a) a %+ _end: %elifidni __OUTPUT_FORMAT__,elf64 -%define globalf(x) global x:function (x %+ _end - x) -%define globalf_end(x) x %+ _end: +%define globalf(a) global a:function (a %+ _end - a) +%define globalfh(a) global a:function hidden (a %+ _end - a) +%define globalf_end(a) a %+ _end: %else -%define globalf(x) global x -%define globalf_end(x) +%define globalf(a) global a +%define globalfh(a) global a +%define globalf_end(a) +%endif +%ifndef LZO_SEH_EXCEPTIONS +%ifidni __OUTPUT_FORMAT__,win64 +%define LZO_SEH_EXCEPTIONS 1 +%endif +%endif +%ifndef LZO_SEH_EXCEPTIONS +%define LZO_SEH_EXCEPTIONS 0 %endif %ifidni __OUTPUT_FORMAT__,elf32 section .note.GNU-stack noalloc noexec nowrite progbits diff --git a/main/lzo/asm/i386/src_nasm/asminit.def b/main/lzo/asm/i386/src_nasm/asminit.def index 0ccdb8d7..773cf997 100644 --- a/main/lzo/asm/i386/src_nasm/asminit.def +++ b/main/lzo/asm/i386/src_nasm/asminit.def @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or @@ -48,24 +48,40 @@ bits 32 %endif %endif +%ifndef NAME1 %ifidni __OUTPUT_FORMAT__,macho32 -%define NAME1(x) _ %+ x +%define NAME1(a) _ %+ a %elifidni __OUTPUT_FORMAT__,macho64 -%define NAME1(x) _ %+ x +%define NAME1(a) _ %+ a %else -%define NAME1(x) _ %+ x -%define NAME2(x) x +%define NAME1(a) _ %+ a +%define NAME2(a) a +%endif %endif %ifidni __OUTPUT_FORMAT__,elf32 -%define globalf(x) global x:function (x %+ _end - x) -%define globalf_end(x) x %+ _end: +%define globalf(a) global a:function (a %+ _end - a) +;define globalfh(a) global a:function hidden +%define globalfh(a) global a:function hidden (a %+ _end - a) +%define globalf_end(a) a %+ _end: %elifidni __OUTPUT_FORMAT__,elf64 -%define globalf(x) global x:function (x %+ _end - x) -%define globalf_end(x) x %+ _end: +%define globalf(a) global a:function (a %+ _end - a) +;define globalfh(a) global a:function hidden +%define globalfh(a) global a:function hidden (a %+ _end - a) +%define globalf_end(a) a %+ _end: %else -%define globalf(x) global x -%define globalf_end(x) +%define globalf(a) global a +%define globalfh(a) global a +%define globalf_end(a) +%endif + +%ifndef LZO_SEH_EXCEPTIONS +%ifidni __OUTPUT_FORMAT__,win64 +%define LZO_SEH_EXCEPTIONS 1 +%endif +%endif +%ifndef LZO_SEH_EXCEPTIONS +%define LZO_SEH_EXCEPTIONS 0 %endif %ifidni __OUTPUT_FORMAT__,elf32 diff --git a/main/lzo/asm/i386/src_nasm/lzo1c_s1.asm b/main/lzo/asm/i386/src_nasm/lzo1c_s1.asm index e35e627b..982b4745 100644 --- a/main/lzo/asm/i386/src_nasm/lzo1c_s1.asm +++ b/main/lzo/asm/i386/src_nasm/lzo1c_s1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_nasm/lzo1f_f1.asm b/main/lzo/asm/i386/src_nasm/lzo1f_f1.asm index 514ab474..ccf37ed7 100644 --- a/main/lzo/asm/i386/src_nasm/lzo1f_f1.asm +++ b/main/lzo/asm/i386/src_nasm/lzo1f_f1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_nasm/lzo1x_f1.asm b/main/lzo/asm/i386/src_nasm/lzo1x_f1.asm index 585963b7..e269caa0 100644 --- a/main/lzo/asm/i386/src_nasm/lzo1x_f1.asm +++ b/main/lzo/asm/i386/src_nasm/lzo1x_f1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_nasm/lzo1x_s1.asm b/main/lzo/asm/i386/src_nasm/lzo1x_s1.asm index 98790b91..ad054be1 100644 --- a/main/lzo/asm/i386/src_nasm/lzo1x_s1.asm +++ b/main/lzo/asm/i386/src_nasm/lzo1x_s1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_nasm/lzo1y_f1.asm b/main/lzo/asm/i386/src_nasm/lzo1y_f1.asm index 6ca700d8..ddd55fb1 100644 --- a/main/lzo/asm/i386/src_nasm/lzo1y_f1.asm +++ b/main/lzo/asm/i386/src_nasm/lzo1y_f1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/asm/i386/src_nasm/lzo1y_s1.asm b/main/lzo/asm/i386/src_nasm/lzo1y_s1.asm index b5c6ee75..ce880041 100644 --- a/main/lzo/asm/i386/src_nasm/lzo1y_s1.asm +++ b/main/lzo/asm/i386/src_nasm/lzo1y_s1.asm @@ -2,7 +2,7 @@ ; ; This file is part of the LZO real-time data compression library. ; -; Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/autoconf/ar-lib b/main/lzo/autoconf/ar-lib new file mode 100755 index 00000000..1700c5ed --- /dev/null +++ b/main/lzo/autoconf/ar-lib @@ -0,0 +1,270 @@ +#! /bin/sh +# Wrapper for Microsoft lib.exe + +me=ar-lib +scriptversion=2012-03-01.08; # UTC + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# Written by Peter Rosin <peda@lysator.liu.se>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv in + mingw) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat <<EOF +Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...] + +Members may be specified in a file named with @FILE. +EOF + exit $? + ;; + -v | --v*) + echo "$me, version $scriptversion" + exit $? + ;; +esac + +if test $# -lt 3; then + func_error "you must specify a program, an action and an archive" +fi + +AR=$1 +shift +while : +do + if test $# -lt 2; then + func_error "you must specify a program, an action and an archive" + fi + case $1 in + -lib | -LIB \ + | -ltcg | -LTCG \ + | -machine* | -MACHINE* \ + | -subsystem* | -SUBSYSTEM* \ + | -verbose | -VERBOSE \ + | -wx* | -WX* ) + AR="$AR $1" + shift + ;; + *) + action=$1 + shift + break + ;; + esac +done +orig_archive=$1 +shift +func_file_conv "$orig_archive" +archive=$file + +# strip leading dash in $action +action=${action#-} + +delete= +extract= +list= +quick= +replace= +index= +create= + +while test -n "$action" +do + case $action in + d*) delete=yes ;; + x*) extract=yes ;; + t*) list=yes ;; + q*) quick=yes ;; + r*) replace=yes ;; + s*) index=yes ;; + S*) ;; # the index is always updated implicitly + c*) create=yes ;; + u*) ;; # TODO: don't ignore the update modifier + v*) ;; # TODO: don't ignore the verbose modifier + *) + func_error "unknown action specified" + ;; + esac + action=${action#?} +done + +case $delete$extract$list$quick$replace,$index in + yes,* | ,yes) + ;; + yesyes*) + func_error "more than one action specified" + ;; + *) + func_error "no action specified" + ;; +esac + +if test -n "$delete"; then + if test ! -f "$orig_archive"; then + func_error "archive not found" + fi + for member + do + case $1 in + @*) + func_at_file "${1#@}" -REMOVE "$archive" + ;; + *) + func_file_conv "$1" + $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $? + ;; + esac + done + +elif test -n "$extract"; then + if test ! -f "$orig_archive"; then + func_error "archive not found" + fi + if test $# -gt 0; then + for member + do + case $1 in + @*) + func_at_file "${1#@}" -EXTRACT "$archive" + ;; + *) + func_file_conv "$1" + $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $? + ;; + esac + done + else + $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member + do + $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? + done + fi + +elif test -n "$quick$replace"; then + if test ! -f "$orig_archive"; then + if test -z "$create"; then + echo "$me: creating $orig_archive" + fi + orig_archive= + else + orig_archive=$archive + fi + + for member + do + case $1 in + @*) + func_file_conv "${1#@}" + set x "$@" "@$file" + ;; + *) + func_file_conv "$1" + set x "$@" "$file" + ;; + esac + shift + shift + done + + if test -n "$orig_archive"; then + $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $? + else + $AR -NOLOGO -OUT:"$archive" "$@" || exit $? + fi + +elif test -n "$list"; then + if test ! -f "$orig_archive"; then + func_error "archive not found" + fi + $AR -NOLOGO -LIST "$archive" || exit $? +fi diff --git a/main/lzo/autoconf/compile b/main/lzo/autoconf/compile index a85b723c..69fad9c9 100755 --- a/main/lzo/autoconf/compile +++ b/main/lzo/autoconf/compile @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2015 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify diff --git a/main/lzo/autoconf/config.guess b/main/lzo/autoconf/config.guess index 1f5c50c0..dbfb9786 100755 --- a/main/lzo/autoconf/config.guess +++ b/main/lzo/autoconf/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2014-03-23' +timestamp='2015-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,12 +24,12 @@ timestamp='2014-03-23' # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to <config-patches@gnu.org>. me=`echo "$0" | sed -e 's,.*/,,'` @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -579,8 +579,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi diff --git a/main/lzo/autoconf/config.rpath b/main/lzo/autoconf/config.rpath index b625621f..a3e25c84 100755 --- a/main/lzo/autoconf/config.rpath +++ b/main/lzo/autoconf/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2014 Free Software Foundation, Inc. +# Copyright 1996-2015 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # diff --git a/main/lzo/autoconf/config.sub b/main/lzo/autoconf/config.sub index d654d03c..6d2e94c8 100755 --- a/main/lzo/autoconf/config.sub +++ b/main/lzo/autoconf/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2014-05-01' +timestamp='2015-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ timestamp='2014-05-01' # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to <config-patches@gnu.org>. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -260,7 +260,7 @@ case $basic_machine in | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ - | fido | fr30 | frv \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ @@ -302,6 +302,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -312,6 +313,7 @@ case $basic_machine in | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -326,6 +328,9 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none @@ -436,6 +441,7 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -773,6 +779,9 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -828,6 +837,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -1373,7 +1386,7 @@ case $os in | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ diff --git a/main/lzo/autoconf/depcomp b/main/lzo/autoconf/depcomp index 4e70ff0b..fda2463f 100755 --- a/main/lzo/autoconf/depcomp +++ b/main/lzo/autoconf/depcomp @@ -3,7 +3,7 @@ scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2015 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/main/lzo/autoconf/local.m4 b/main/lzo/autoconf/local.m4 index 5c0ba29d..38754b1d 100644 --- a/main/lzo/autoconf/local.m4 +++ b/main/lzo/autoconf/local.m4 @@ -196,7 +196,7 @@ esac dnl Serial 13 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -263,6 +263,10 @@ dnl configure.ac when using autoheader 2.62. #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# undef __USE_MINGW_ANSI_STDIO +#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -295,6 +299,7 @@ dnl configure.ac when using autoheader 2.62. AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_GNU_SOURCE]) + AC_DEFINE([__USE_MINGW_ANSI_STDIO]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], @@ -445,7 +450,7 @@ AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [ AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) ]) -dnl Serial 2 mfx/m4/lzo_lzochk.m4 +dnl Serial 3 mfx/m4/lzo_lzochk.m4 AC_DEFUN([mfx_LZO_LZOCHK], [ mfx_tmp=$1 @@ -456,9 +461,11 @@ test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" AC_MSG_CHECKING([whether your compiler passes the LZO conformance test]) AC_LANG_CONFTEST([AC_LANG_PROGRAM( -[[#define LZO_CFG_NO_CONFIG_HEADER 1 +[[#include <limits.h> +#include <stddef.h> +#define LZO_CFG_NO_CONFIG_HEADER 1 #define LZO_WANT_ACC_INCD_H 1 -#include $2 +$2 #include $3 #undef LZOCHK_ASSERT @@ -548,7 +555,7 @@ AC_C_BIGENDIAN([AC_DEFINE(NRV_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is b ]) # Checks for stat-related time functions. -# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2014 Free Software +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2015 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation diff --git a/main/lzo/autoconf/mdate-sh b/main/lzo/autoconf/mdate-sh index e8dfaca1..b793600a 100755 --- a/main/lzo/autoconf/mdate-sh +++ b/main/lzo/autoconf/mdate-sh @@ -3,7 +3,7 @@ scriptversion=2010-08-21.06; # UTC -# Copyright (C) 1995-2014 Free Software Foundation, Inc. +# Copyright (C) 1995-2015 Free Software Foundation, Inc. # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995 # # This program is free software; you can redistribute it and/or modify diff --git a/main/lzo/autoconf/missing b/main/lzo/autoconf/missing index f62bbae3..3af28289 100755 --- a/main/lzo/autoconf/missing +++ b/main/lzo/autoconf/missing @@ -3,7 +3,7 @@ scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify diff --git a/main/lzo/autoconf/py-compile b/main/lzo/autoconf/py-compile index bc203914..382e0835 100755 --- a/main/lzo/autoconf/py-compile +++ b/main/lzo/autoconf/py-compile @@ -3,7 +3,7 @@ scriptversion=2011-06-08.12; # UTC -# Copyright (C) 2000-2014 Free Software Foundation, Inc. +# Copyright (C) 2000-2015 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/main/lzo/autoconf/ylwrap b/main/lzo/autoconf/ylwrap index 13fa706c..49716bbe 100755 --- a/main/lzo/autoconf/ylwrap +++ b/main/lzo/autoconf/ylwrap @@ -3,7 +3,7 @@ scriptversion=2013-01-12.17; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 Free Software Foundation, Inc. # # Written by Tom Tromey <tromey@cygnus.com>. # diff --git a/main/lzo/config.hin b/main/lzo/config.hin index bd528c0a..985cca77 100644 --- a/main/lzo/config.hin +++ b/main/lzo/config.hin @@ -1,5 +1,8 @@ /* config.hin. Generated from configure.ac by autoheader. */ +#ifndef __LZO_AUTOCONF_CONFIG_H_INCLUDED +#define __LZO_AUTOCONF_CONFIG_H_INCLUDED 1 + /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD @@ -388,3 +391,5 @@ /* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t + +#endif /* already included */ diff --git a/main/lzo/configure b/main/lzo/configure index 4ff70230..06a488d2 100755 --- a/main/lzo/configure +++ b/main/lzo/configure @@ -1,10 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for LZO 2.07. +# Generated by GNU Autoconf 2.69 for LZO 2.09. # # Report bugs to <markus@oberhumer.com>. # -# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer. +# Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer. # All Rights Reserved. # This configure script may be copied, distributed and modified under the # terms of the GNU General Public License; see COPYING for more details. @@ -595,8 +595,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='LZO' PACKAGE_TARNAME='lzo' -PACKAGE_VERSION='2.07' -PACKAGE_STRING='LZO 2.07' +PACKAGE_VERSION='2.09' +PACKAGE_STRING='LZO 2.09' PACKAGE_BUGREPORT='markus@oberhumer.com' PACKAGE_URL='http://www.oberhumer.com/opensource/lzo/' @@ -653,8 +653,6 @@ NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB -ac_ct_AR -AR DLLTOOL OBJDUMP LN_S @@ -710,6 +708,8 @@ DEPDIR am__leading_dot CCASFLAGS CCAS +ac_ct_AR +AR OBJEXT EXEEXT ac_ct_CC @@ -1337,7 +1337,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures LZO 2.07 to adapt to many kinds of systems. +\`configure' configures LZO 2.09 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1408,7 +1408,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LZO 2.07:";; + short | recursive ) echo "Configuration of LZO 2.09:";; esac cat <<\_ACEOF @@ -1521,14 +1521,14 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LZO configure 2.07 +LZO configure 2.09 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer. +Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer. All Rights Reserved. This configure script may be copied, distributed and modified under the terms of the GNU General Public License; see COPYING for more details. @@ -2132,7 +2132,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by LZO $as_me 2.07, which was +It was created by LZO $as_me 2.09, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2531,7 +2531,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -2591,7 +2591,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Checks for stat-related time functions. -# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2014 Free Software +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2015 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation @@ -3589,8 +3589,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3652,6 +3652,178 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar lib "link -lib" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac + rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then @@ -4048,7 +4220,6 @@ $as_echo "$mfx_tmp" >&6; } ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : @@ -4820,7 +4991,7 @@ rm -rf conftest* fi -am__api_version='1.14' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -5009,7 +5180,7 @@ else $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -5294,7 +5465,7 @@ fi # Define the identity of the package. PACKAGE='lzo' - VERSION='2.07' + VERSION='2.09' cat >>confdefs.h <<_ACEOF @@ -5328,8 +5499,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -5514,6 +5685,7 @@ END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi + # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; @@ -5556,6 +5728,8 @@ AM_BACKSLASH='\' ac_config_headers="$ac_config_headers config.h:config.hin" + + # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} @@ -13942,7 +14116,7 @@ fi # ************************************************************************/ -mfx_tmp="-I$srcdir" +mfx_tmp="-I$srcdir/include -I$srcdir" mfx_save_CPPFLAGS=$CPPFLAGS test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" @@ -13951,21 +14125,23 @@ $as_echo_n "checking whether your compiler passes the LZO conformance test... " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include <limits.h> +#include <stddef.h> #define LZO_CFG_NO_CONFIG_HEADER 1 #define LZO_WANT_ACC_INCD_H 1 -#include "include/lzo/lzodefs.h" -#include "src/lzo_supp.h" +#include <lzo/lzoconf.h> +#include <src/lzo_supp.h> #undef LZOCHK_ASSERT #define LZOCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT_HEADER(expr) #define LZO_WANT_ACC_CHK_CH 1 -#include "src/lzo_supp.h" +#include <src/lzo_supp.h> #undef LZOCHK_ASSERT #define LZOCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr) static void test_lzo_compile_time_assert(void) { #define LZO_WANT_ACC_CHK_CH 1 -#include "src/lzo_supp.h" +#include <src/lzo_supp.h> } #undef NDEBUG @@ -13974,7 +14150,7 @@ static void test_lzo_compile_time_assert(void) { #define LZOCHK_ASSERT(expr) assert(expr); static int test_lzo_run_time_assert(int r) { #define LZO_WANT_ACC_CHK_CH 1 -#include "src/lzo_supp.h" +#include <src/lzo_supp.h> return r; } @@ -14586,7 +14762,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by LZO $as_me 2.07, which was +This file was extended by LZO $as_me 2.09, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14653,7 +14829,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -LZO config.status 2.07 +LZO config.status 2.09 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -16288,7 +16464,7 @@ cat <<EOF LZO ${PACKAGE_VERSION} configured. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -16306,9 +16482,11 @@ cat <<EOF http://www.oberhumer.com/opensource/lzo/ -Type \`make' to build LZO. Type \`make install' to install LZO. -After installing LZO, please read the accompanied documentation. +Type 'make' to build LZO. +Type 'make check' and 'make test' to test LZO. +Type 'make install' to install LZO. +After installing LZO, please have a look at 'examples/simple.c'. EOF -# vi:ts=4:et +# vim:set ts=4 sw=4 et: diff --git a/main/lzo/configure.ac b/main/lzo/configure.ac index e2dff5fc..4dee7f05 100644 --- a/main/lzo/configure.ac +++ b/main/lzo/configure.ac @@ -3,7 +3,7 @@ # # This file is part of the LZO data compression library. # -# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +# Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer # All Rights Reserved. # # The LZO library is free software; you can redistribute it and/or @@ -31,13 +31,13 @@ # // Init # ************************************************************************/ -AC_COPYRIGHT([Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer. +AC_COPYRIGHT([Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer. All Rights Reserved. This configure script may be copied, distributed and modified under the terms of the GNU General Public License; see COPYING for more details.]) AC_PREREQ(2.69) -AC_INIT([LZO],[2.07],[markus@oberhumer.com],[lzo],[http://www.oberhumer.com/opensource/lzo/]) +AC_INIT([LZO],[2.09],[markus@oberhumer.com],[lzo],[http://www.oberhumer.com/opensource/lzo/]) AC_MSG_NOTICE([Configuring LZO $PACKAGE_VERSION]) AC_CONFIG_SRCDIR(src/lzo_init.c) AC_CONFIG_AUX_DIR(autoconf) @@ -60,6 +60,7 @@ fi AC_PROG_CC AM_PROG_CC_C_O +AM_PROG_AR AM_PROG_AS AC_PROG_CPP mfx_PROG_CPPFLAGS @@ -67,9 +68,12 @@ AC_C_CONST mfx_LZO_CHECK_ENDIAN AC_SYS_LARGEFILE -AM_INIT_AUTOMAKE([1.14.1 gnu subdir-objects]) +AM_INIT_AUTOMAKE([1.15 gnu subdir-objects -Wall -Werror]) AM_SILENT_RULES([yes]) AC_CONFIG_HEADERS([config.h:config.hin]) +AH_TOP([#ifndef __LZO_AUTOCONF_CONFIG_H_INCLUDED +#define __LZO_AUTOCONF_CONFIG_H_INCLUDED 1]) +AH_BOTTOM([#endif /* already included */]) AC_ENABLE_STATIC AC_DISABLE_SHARED @@ -164,7 +168,7 @@ AM_CONDITIONAL(LZO_USE_ASM_i386_obj_elf32, [false]) # // Write output files # ************************************************************************/ -mfx_LZO_LZOCHK(["-I$srcdir"],["include/lzo/lzodefs.h"],["src/lzo_supp.h"]) +mfx_LZO_LZOCHK(["-I$srcdir/include -I$srcdir"],[#include <lzo/lzoconf.h>],[<src/lzo_supp.h>]) if test -r .Conf.settings2; then . ./.Conf.settings2 @@ -203,7 +207,7 @@ cat <<EOF LZO ${PACKAGE_VERSION} configured. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -221,9 +225,11 @@ cat <<EOF http://www.oberhumer.com/opensource/lzo/ -Type \`make' to build LZO. Type \`make install' to install LZO. -After installing LZO, please read the accompanied documentation. +Type 'make' to build LZO. +Type 'make check' and 'make test' to test LZO. +Type 'make install' to install LZO. +After installing LZO, please have a look at 'examples/simple.c'. EOF -# vi:ts=4:et +# vim:set ts=4 sw=4 et: diff --git a/main/lzo/doc/LZO.TXT b/main/lzo/doc/LZO.TXT index 2d3b5aa7..430f10d1 100644 --- a/main/lzo/doc/LZO.TXT +++ b/main/lzo/doc/LZO.TXT @@ -6,8 +6,8 @@ Author : Markus Franz Xaver Johannes Oberhumer <markus@oberhumer.com> http://www.oberhumer.com/opensource/lzo/ - Version : 2.07 - Date : 25 Jun 2014 + Version : 2.09 + Date : 04 Feb 2015 Abstract @@ -277,7 +277,7 @@ Copyright --------- - LZO is Copyright (C) 1996-2014 Markus Franz Xaver Oberhumer + LZO is Copyright (C) 1996-2015 Markus Franz Xaver Oberhumer All Rights Reserved. LZO is distributed under the terms of the GNU General Public License (GPL). diff --git a/main/lzo/examples/dict.c b/main/lzo/examples/dict.c index 3ccc9a53..5d8ca62c 100644 --- a/main/lzo/examples/dict.c +++ b/main/lzo/examples/dict.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,8 +32,8 @@ // Please study LZO.FAQ and simple.c first. **************************************************************************/ -#include "lzo/lzoconf.h" -#include "lzo/lzo1x.h" +#include <lzo/lzoconf.h> +#include <lzo/lzo1x.h> /* portability layer */ static const char *progname = NULL; @@ -192,7 +192,7 @@ int __lzo_cdecl_main main(int argc, char *argv[]) printf("\nLZO real-time data compression library (v%s, %s).\n", lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); + printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); progname = argv[0]; diff --git a/main/lzo/examples/lzopack.c b/main/lzo/examples/lzopack.c index 10e2c1dc..c01b47dc 100644 --- a/main/lzo/examples/lzopack.c +++ b/main/lzo/examples/lzopack.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -36,8 +36,8 @@ // Please study LZO.FAQ and simple.c first. **************************************************************************/ -#include "lzo/lzoconf.h" -#include "lzo/lzo1x.h" +#include <lzo/lzoconf.h> +#include <lzo/lzo1x.h> /* portability layer */ static const char *progname = NULL; @@ -68,12 +68,12 @@ static lzo_uint xread(FILE *fp, lzo_voidp buf, lzo_uint len, lzo_bool allow_eof) l = (lzo_uint) lzo_fread(fp, buf, len); if (l > len) { - fprintf(stderr, "\nsomething's wrong with your C library !!!\n"); + fprintf(stderr, "\n%s: internal error - something is wrong with your C library !!!\n", progname); exit(1); } if (l != len && !allow_eof) { - fprintf(stderr, "\nread error - premature end of file\n"); + fprintf(stderr, "\n%s: read error - premature end of file\n", progname); exit(1); } total_in += (unsigned long) l; @@ -84,7 +84,7 @@ static lzo_uint xwrite(FILE *fp, const lzo_voidp buf, lzo_uint len) { if (fp != NULL && lzo_fwrite(fp, buf, len) != len) { - fprintf(stderr, "\nwrite error (disk full ?)\n"); + fprintf(stderr, "\n%s: write error (disk full ?)\n", progname); exit(1); } total_out += (unsigned long) len; @@ -120,7 +120,7 @@ static lzo_uint32_t xread32(FILE *fp) return v; } -static void xwrite32(FILE *fp, lzo_xint v) +static void xwrite32(FILE *fp, lzo_uint v) { unsigned char b[4]; @@ -274,7 +274,7 @@ static int do_decompress(FILE *fi, FILE *fo) /* * Step 1: check magic header, read flags & block size, init checksum */ - if (xread(fi, m, sizeof(magic),1) != sizeof(magic) || + if (xread(fi, m, sizeof(magic), 1) != sizeof(magic) || memcmp(m, magic, sizeof(magic)) != 0) { printf("%s: header error - this file is not compressed by lzopack\n", progname); @@ -299,7 +299,7 @@ static int do_decompress(FILE *fi, FILE *fo) r = 3; goto err; } - checksum = lzo_adler32(0,NULL,0); + checksum = lzo_adler32(0, NULL, 0); /* * Step 2: allocate buffer for in-place decompression @@ -509,7 +509,7 @@ int __lzo_cdecl_main main(int argc, char *argv[]) printf("\nLZO real-time data compression library (v%s, %s).\n", lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); + printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); #if 0 printf( diff --git a/main/lzo/examples/overlap.c b/main/lzo/examples/overlap.c index 114fe3b4..215e055e 100644 --- a/main/lzo/examples/overlap.c +++ b/main/lzo/examples/overlap.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -33,8 +33,8 @@ // Please study LZO.FAQ and simple.c first. **************************************************************************/ -#include "lzo/lzoconf.h" -#include "lzo/lzo1x.h" +#include <lzo/lzoconf.h> +#include <lzo/lzo1x.h> /* portability layer */ static const char *progname = NULL; @@ -259,7 +259,7 @@ int __lzo_cdecl_main main(int argc, char *argv[]) printf("\nLZO real-time data compression library (v%s, %s).\n", lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); + printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); progname = argv[0]; if (i < argc && argv[i][0] == '-') diff --git a/main/lzo/examples/portab.h b/main/lzo/examples/portab.h index d8217ed3..3c220689 100644 --- a/main/lzo/examples/portab.h +++ b/main/lzo/examples/portab.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ */ -#include "lzo/lzoconf.h" +#include <lzo/lzoconf.h> #if (LZO_CC_MSC && (_MSC_VER >= 1000 && _MSC_VER < 1200)) /* avoid '-W4' warnings in system header files */ diff --git a/main/lzo/examples/portab_a.h b/main/lzo/examples/portab_a.h index a3fbec90..57ff4445 100644 --- a/main/lzo/examples/portab_a.h +++ b/main/lzo/examples/portab_a.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/examples/precomp.c b/main/lzo/examples/precomp.c index 01b1e77f..dafd3ea2 100644 --- a/main/lzo/examples/precomp.c +++ b/main/lzo/examples/precomp.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -35,9 +35,9 @@ // the algorithm that achieves the best compression ratio. **************************************************************************/ -#include "lzo/lzoconf.h" -#include "lzo/lzo1x.h" -#include "lzo/lzo1y.h" +#include <lzo/lzoconf.h> +#include <lzo/lzo1x.h> +#include <lzo/lzo1y.h> #define USE_LZO1X 1 #define USE_LZO1Y 1 @@ -89,7 +89,7 @@ int __lzo_cdecl_main main(int argc, char *argv[]) printf("\nLZO real-time data compression library (v%s, %s).\n", lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); + printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); progname = argv[0]; if (argc < 2 || argc > 3) diff --git a/main/lzo/examples/precomp2.c b/main/lzo/examples/precomp2.c index 93dd8b55..6c359b93 100644 --- a/main/lzo/examples/precomp2.c +++ b/main/lzo/examples/precomp2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -38,9 +38,9 @@ // NOTE: this program can be quite slow for highly redundant files **************************************************************************/ -#include "lzo/lzoconf.h" -#include "lzo/lzo1x.h" -#include "lzo/lzo1y.h" +#include <lzo/lzoconf.h> +#include <lzo/lzo1x.h> +#include <lzo/lzo1y.h> LZO_EXTERN(int) lzo1x_999_compress_internal ( const lzo_bytep in , lzo_uint in_len, @@ -123,7 +123,7 @@ int __lzo_cdecl_main main(int argc, char *argv[]) printf("\nLZO real-time data compression library (v%s, %s).\n", lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); + printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); progname = argv[0]; if (argc < 2 || argc > 3) diff --git a/main/lzo/examples/simple.c b/main/lzo/examples/simple.c index 42f814a7..9ebfa971 100644 --- a/main/lzo/examples/simple.c +++ b/main/lzo/examples/simple.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -34,11 +34,11 @@ **************************************************************************/ /* We will be using the LZO1X-1 algorithm, so we have - * to include <lzo1x.h> + * to include <lzo/lzo1x.h> */ -#include "lzo/lzoconf.h" -#include "lzo/lzo1x.h" +#include <lzo/lzoconf.h> +#include <lzo/lzo1x.h> /* portability layer */ static const char *progname = NULL; @@ -78,7 +78,7 @@ int __lzo_cdecl_main main(int argc, char *argv[]) printf("\nLZO real-time data compression library (v%s, %s).\n", lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); + printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); /* * Step 1: initialize the LZO library diff --git a/main/lzo/include/lzo/lzo1.h b/main/lzo/include/lzo/lzo1.h index 433d91d9..b5a67b65 100644 --- a/main/lzo/include/lzo/lzo1.h +++ b/main/lzo/include/lzo/lzo1.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO1_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -81,4 +81,4 @@ lzo1_99_compress ( const lzo_bytep src, lzo_uint src_len, #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzo1a.h b/main/lzo/include/lzo/lzo1a.h index 46d7e75d..ca761e5f 100644 --- a/main/lzo/include/lzo/lzo1a.h +++ b/main/lzo/include/lzo/lzo1a.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO1A_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -81,4 +81,4 @@ lzo1a_99_compress ( const lzo_bytep src, lzo_uint src_len, #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzo1b.h b/main/lzo/include/lzo/lzo1b.h index 3295b9e7..bbfd7548 100644 --- a/main/lzo/include/lzo/lzo1b.h +++ b/main/lzo/include/lzo/lzo1b.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO1B_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -145,4 +145,4 @@ lzo1b_999_compress ( const lzo_bytep src, lzo_uint src_len, #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzo1c.h b/main/lzo/include/lzo/lzo1c.h index 6fa3cf92..20010823 100644 --- a/main/lzo/include/lzo/lzo1c.h +++ b/main/lzo/include/lzo/lzo1c.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO1C_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -145,4 +145,4 @@ lzo1c_999_compress ( const lzo_bytep src, lzo_uint src_len, #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzo1f.h b/main/lzo/include/lzo/lzo1f.h index adc6b0d9..504e5230 100644 --- a/main/lzo/include/lzo/lzo1f.h +++ b/main/lzo/include/lzo/lzo1f.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO1F_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -93,4 +93,4 @@ lzo1f_999_compress ( const lzo_bytep src, lzo_uint src_len, #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzo1x.h b/main/lzo/include/lzo/lzo1x.h index ef591db7..f1599a60 100644 --- a/main/lzo/include/lzo/lzo1x.h +++ b/main/lzo/include/lzo/lzo1x.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO1X_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -162,4 +162,4 @@ lzo1x_optimize ( lzo_bytep src, lzo_uint src_len, #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzo1y.h b/main/lzo/include/lzo/lzo1y.h index 37370c78..da199c0f 100644 --- a/main/lzo/include/lzo/lzo1y.h +++ b/main/lzo/include/lzo/lzo1y.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO1Y_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -130,4 +130,4 @@ lzo1y_optimize ( lzo_bytep src, lzo_uint src_len, #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzo1z.h b/main/lzo/include/lzo/lzo1z.h index b097e119..5adb905d 100644 --- a/main/lzo/include/lzo/lzo1z.h +++ b/main/lzo/include/lzo/lzo1z.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO1Z_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -106,4 +106,4 @@ lzo1z_decompress_dict_safe ( const lzo_bytep src, lzo_uint src_len, #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzo2a.h b/main/lzo/include/lzo/lzo2a.h index 1c9ef2e9..ded7f9eb 100644 --- a/main/lzo/include/lzo/lzo2a.h +++ b/main/lzo/include/lzo/lzo2a.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO2A_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -77,4 +77,4 @@ lzo2a_999_compress ( const lzo_bytep src, lzo_uint src_len, #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzo_asm.h b/main/lzo/include/lzo/lzo_asm.h index d5f6ff63..5a654bf7 100644 --- a/main/lzo/include/lzo/lzo_asm.h +++ b/main/lzo/include/lzo/lzo_asm.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZO_ASM_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -137,4 +137,4 @@ lzo_rdtsc_asm(lzo_uint32_tp /* lzo_uint32_t ticks[2] */ ); #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzoconf.h b/main/lzo/include/lzo/lzoconf.h index 02fb202d..64ef2793 100644 --- a/main/lzo/include/lzo/lzoconf.h +++ b/main/lzo/include/lzo/lzoconf.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -29,9 +29,9 @@ #ifndef __LZOCONF_H_INCLUDED #define __LZOCONF_H_INCLUDED 1 -#define LZO_VERSION 0x2070 -#define LZO_VERSION_STRING "2.07" -#define LZO_VERSION_DATE "Jun 25 2014" +#define LZO_VERSION 0x2090 +#define LZO_VERSION_STRING "2.09" +#define LZO_VERSION_DATE "Feb 04 2015" /* internal Autoconf configuration file - only used when building LZO */ #if defined(LZO_HAVE_CONFIG_H) @@ -57,7 +57,7 @@ /* get OS and architecture defines */ #ifndef __LZODEFS_H_INCLUDED -#include "lzodefs.h" +#include <lzo/lzodefs.h> #endif @@ -94,25 +94,29 @@ extern "C" { # if (LZO_OS_WIN64) typedef unsigned __int64 lzo_uint; typedef __int64 lzo_int; +# define LZO_TYPEOF_LZO_INT LZO_TYPEOF___INT64 # else typedef lzo_ullong_t lzo_uint; typedef lzo_llong_t lzo_int; +# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG_LONG # endif -# define LZO_SIZEOF_LZO_UINT 8 +# define LZO_SIZEOF_LZO_INT 8 # define LZO_UINT_MAX 0xffffffffffffffffull # define LZO_INT_MAX 9223372036854775807LL # define LZO_INT_MIN (-1LL - LZO_INT_MAX) # elif (LZO_ABI_IP32L64) /* MIPS R5900 */ typedef unsigned int lzo_uint; typedef int lzo_int; -# define LZO_SIZEOF_LZO_UINT LZO_SIZEOF_INT +# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_INT # define LZO_UINT_MAX UINT_MAX # define LZO_INT_MAX INT_MAX # define LZO_INT_MIN INT_MIN # elif (ULONG_MAX >= LZO_0xffffffffL) typedef unsigned long lzo_uint; typedef long lzo_int; -# define LZO_SIZEOF_LZO_UINT LZO_SIZEOF_LONG +# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_LONG +# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG # define LZO_UINT_MAX ULONG_MAX # define LZO_INT_MAX LONG_MAX # define LZO_INT_MIN LONG_MIN @@ -122,7 +126,7 @@ extern "C" { #endif /* The larger type of lzo_uint and lzo_uint32_t. */ -#if (LZO_SIZEOF_LZO_UINT >= 4) +#if (LZO_SIZEOF_LZO_INT >= 4) # define lzo_xint lzo_uint #else # define lzo_xint lzo_uint32_t @@ -131,7 +135,8 @@ extern "C" { typedef int lzo_bool; /* sanity checks */ -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == LZO_SIZEOF_LZO_UINT) +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int) == LZO_SIZEOF_LZO_INT) +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == LZO_SIZEOF_LZO_INT) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint)) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint32_t)) @@ -163,14 +168,14 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint32_t)) #endif /* Older LZO versions used to support ancient systems and memory models - * like 16-bit MSDOS with __huge pointers and Cray PVP, but these + * such as 16-bit MSDOS with __huge pointers or Cray PVP, but these * obsolete configurations are not supported any longer. */ #if defined(__LZO_MMODEL_HUGE) -#error "__LZO_MMODEL_HUGE is unsupported" +#error "__LZO_MMODEL_HUGE memory model is unsupported" #endif #if (LZO_MM_PVP) -#error "LZO_MM_PVP is unsupported" +#error "LZO_MM_PVP memory model is unsupported" #endif #if (LZO_SIZEOF_INT < 4) #error "LZO_SIZEOF_INT < 4 is unsupported" @@ -221,13 +226,13 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(char *) == sizeof(lzo_bytep)) /* __cdecl calling convention for public C and assembly functions */ #if !defined(LZO_PUBLIC) -# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL +# define LZO_PUBLIC(r) __LZO_EXPORT1 r __LZO_EXPORT2 __LZO_CDECL #endif #if !defined(LZO_EXTERN) -# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype) +# define LZO_EXTERN(r) __LZO_EXTERN_C LZO_PUBLIC(r) #endif #if !defined(LZO_PRIVATE) -# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL +# define LZO_PRIVATE(r) static r __LZO_CDECL #endif /* function types */ @@ -399,6 +404,10 @@ LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp p, lzo_uint size); /* deprecated types */ typedef union { lzo_bytep a; lzo_uint b; } __lzo_pu_u; typedef union { lzo_bytep a; lzo_uint32_t b; } __lzo_pu32_u; +/* deprecated defines */ +#if !defined(LZO_SIZEOF_LZO_UINT) +# define LZO_SIZEOF_LZO_UINT LZO_SIZEOF_LZO_INT +#endif #if defined(LZO_CFG_COMPAT) @@ -441,4 +450,4 @@ typedef union { lzo_bytep a; lzo_uint32_t b; } __lzo_pu32_u; #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/include/lzo/lzodefs.h b/main/lzo/include/lzo/lzodefs.h index f4ae9487..1535c1e2 100644 --- a/main/lzo/include/lzo/lzodefs.h +++ b/main/lzo/include/lzo/lzodefs.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -398,7 +398,7 @@ #elif defined(__TOS__) || defined(__atarist__) # define LZO_OS_TOS 1 # define LZO_INFO_OS "tos" -#elif defined(macintosh) && !defined(__ppc__) +#elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__) # define LZO_OS_MACCLASSIC 1 # define LZO_INFO_OS "macclassic" #elif defined(__VMS) @@ -782,22 +782,11 @@ #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) # define LZO_ARCH_AMD64 1 # define LZO_INFO_ARCH "amd64" -#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +#elif defined(__arm__) || defined(_M_ARM) # define LZO_ARCH_ARM 1 -# define LZO_ARCH_ARM_THUMB 1 -# define LZO_INFO_ARCH "arm_thumb" +# define LZO_INFO_ARCH "arm" #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) # define LZO_ARCH_ARM 1 -# if defined(__CPU_MODE__) && ((__CPU_MODE__-0) == 1) -# define LZO_ARCH_ARM_THUMB 1 -# define LZO_INFO_ARCH "arm_thumb" -# elif defined(__CPU_MODE__) && ((__CPU_MODE__-0) == 2) -# define LZO_INFO_ARCH "arm" -# else -# define LZO_INFO_ARCH "arm" -# endif -#elif defined(__arm__) || defined(_M_ARM) -# define LZO_ARCH_ARM 1 # define LZO_INFO_ARCH "arm" #elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) # define LZO_ARCH_AVR 1 @@ -905,6 +894,19 @@ # define LZO_INFO_ARCH "unknown" #endif #endif +#if !defined(LZO_ARCH_ARM_THUMB2) +#if (LZO_ARCH_ARM) +# if defined(__ARM_ARCH_ISA_THUMB) +# if ((__ARM_ARCH_ISA_THUMB)+0 >= 2) +# define LZO_ARCH_ARM_THUMB2 1 +# endif +# elif 1 && defined(__thumb2__) +# define LZO_ARCH_ARM_THUMB2 1 +# elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4) +# define LZO_ARCH_ARM_THUMB2 1 +# endif +#endif +#endif #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) # error "FIXME - missing define for CPU architecture" #endif @@ -947,13 +949,10 @@ #if (LZO_ARCH_I386 && !LZO_ARCH_X86) || (!LZO_ARCH_I386 && LZO_ARCH_X86) # error "unexpected configuration - check your compiler defines" #endif -#if (LZO_ARCH_ARM_THUMB && !LZO_ARCH_ARM) +#if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM) # error "unexpected configuration - check your compiler defines" #endif -#if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM_THUMB) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM_THUMB) +#if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM) # error "unexpected configuration - check your compiler defines" #endif #if (LZO_ARCH_ARM_THUMB1 && LZO_ARCH_ARM_THUMB2) @@ -985,7 +984,9 @@ # if !defined(LZO_TARGET_FEATURE_SSE2) # if defined(__SSE2__) # define LZO_TARGET_FEATURE_SSE2 1 -# elif defined(_MSC_VER) && ((defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) || defined(_M_AMD64)) +# elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) +# define LZO_TARGET_FEATURE_SSE2 1 +# elif (LZO_CC_INTELC_MSC || LZO_CC_MSC) && defined(_M_AMD64) # define LZO_TARGET_FEATURE_SSE2 1 # endif # endif @@ -1034,7 +1035,11 @@ #endif #if (LZO_ARCH_ARM) # if !defined(LZO_TARGET_FEATURE_NEON) -# if defined(__ARM_NEON__) +# if defined(__ARM_NEON) && ((__ARM_NEON)+0) +# define LZO_TARGET_FEATURE_NEON 1 +# elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0) +# define LZO_TARGET_FEATURE_NEON 1 +# elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0) # define LZO_TARGET_FEATURE_NEON 1 # endif # endif @@ -1220,6 +1225,48 @@ extern "C" { #if !defined(__lzo_gnuc_extension__) # define __lzo_gnuc_extension__ /*empty*/ #endif +#if !defined(lzo_has_builtin) +#if (LZO_CC_CLANG) && defined(__has_builtin) +# define lzo_has_builtin __has_builtin +#endif +#endif +#if !defined(lzo_has_builtin) +# define lzo_has_builtin(x) 0 +#endif +#if !defined(lzo_has_attribute) +#if (LZO_CC_CLANG) && defined(__has_attribute) +# define lzo_has_attribute __has_attribute +#endif +#endif +#if !defined(lzo_has_attribute) +# define lzo_has_attribute(x) 0 +#endif +#if !defined(lzo_has_declspec_attribute) +#if (LZO_CC_CLANG) && defined(__has_declspec_attribute) +# define lzo_has_declspec_attribute __has_declspec_attribute +#endif +#endif +#if !defined(lzo_has_declspec_attribute) +# define lzo_has_declspec_attribute(x) 0 +#endif +#if !defined(lzo_has_feature) +#if (LZO_CC_CLANG) && defined(__has_feature) +# define lzo_has_feature __has_feature +#endif +#endif +#if !defined(lzo_has_feature) +# define lzo_has_feature(x) 0 +#endif +#if !defined(lzo_has_extension) +#if (LZO_CC_CLANG) && defined(__has_extension) +# define lzo_has_extension __has_extension +#elif (LZO_CC_CLANG) && defined(__has_feature) +# define lzo_has_extension __has_feature +#endif +#endif +#if !defined(lzo_has_extension) +# define lzo_has_extension 0 +#endif #if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0 # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) # define LZO_CFG_USE_NEW_STYLE_CASTS 0 @@ -1356,7 +1403,7 @@ extern "C" { # elif (LZO_CC_MSC && (_MSC_VER < 900)) # define LZO_UNUSED(var) if (&var) ; else # elif (LZO_CC_KEILC) -# define LZO_UNUSED(var) {LZO_EXTERN_C int lzo_unused__[1-2*!(sizeof(var)>0)];} +# define LZO_UNUSED(var) {extern int lzo_unused__[1-2*!(sizeof(var)>0)]; (void)lzo_unused__;} # elif (LZO_CC_PACIFICC) # define LZO_UNUSED(var) ((void) sizeof(var)) # elif (LZO_CC_WATCOMC) && defined(__cplusplus) @@ -1377,7 +1424,7 @@ extern "C" { # elif (LZO_CC_MSC) # define LZO_UNUSED_FUNC(func) ((void) &func) # elif (LZO_CC_KEILC || LZO_CC_PELLESC) -# define LZO_UNUSED_FUNC(func) {LZO_EXTERN_C int lzo_unused_func__[1-2*!(sizeof((int)func)>0)];} +# define LZO_UNUSED_FUNC(func) {extern int lzo_unused__[1-2*!(sizeof((int)func)>0)]; (void)lzo_unused__;} # else # define LZO_UNUSED_FUNC(func) ((void) func) # endif @@ -1793,21 +1840,28 @@ extern "C" { # define __lzo_HAVE_likely 1 # endif #else -# define __lzo_likely(e) (e) +# define __lzo_likely(e) (e) +#endif +#if defined(__lzo_very_likely) +# ifndef __lzo_HAVE_very_likely +# define __lzo_HAVE_very_likely 1 +# endif +#else +# define __lzo_very_likely(e) __lzo_likely(e) #endif #if defined(__lzo_unlikely) # ifndef __lzo_HAVE_unlikely # define __lzo_HAVE_unlikely 1 # endif #else -# define __lzo_unlikely(e) (e) +# define __lzo_unlikely(e) (e) #endif -#if !defined(__lzo_static_unused_void_func) -# 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) -# define __lzo_static_unused_void_func(f) static void __attribute__((__unused__)) f(void) -# else -# define __lzo_static_unused_void_func(f) static __lzo_inline void f(void) +#if defined(__lzo_very_unlikely) +# ifndef __lzo_HAVE_very_unlikely +# define __lzo_HAVE_very_unlikely 1 # endif +#else +# define __lzo_very_unlikely(e) __lzo_unlikely(e) #endif #if !defined(__lzo_loop_forever) # if (LZO_CC_IBMC) @@ -1817,7 +1871,7 @@ extern "C" { # endif #endif #if !defined(__lzo_unreachable) -#if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul)) +#if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul)) && lzo_has_builtin(__builtin_unreachable) # define __lzo_unreachable() __builtin_unreachable(); #elif (LZO_CC_GNUC >= 0x040500ul) # define __lzo_unreachable() __builtin_unreachable(); @@ -1836,6 +1890,15 @@ extern "C" { # define __lzo_unreachable() __lzo_loop_forever(); # endif #endif +#if !defined(lzo_unused_funcs_impl) +# 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) +# define lzo_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f +# elif 1 && (LZO_CC_BORLANDC || LZO_CC_GNUC) +# define lzo_unused_funcs_impl(r,f) static r f +# else +# define lzo_unused_funcs_impl(r,f) __lzo_static_forceinline r f +# endif +#endif #ifndef __LZO_CTA_NAME #if (LZO_CFG_USE_COUNTER) # define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__COUNTER__) @@ -1861,6 +1924,8 @@ extern "C" { #if !defined(LZO_COMPILE_TIME_ASSERT) # if (LZO_CC_AZTECC) # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-!(e)];} +# elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030000ul)) +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} # elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; # elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) @@ -1948,7 +2013,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(3 == 3) #if !defined(LZO_HAVE_WINDOWS_H) #if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) # if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) -# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +# elif ((LZO_OS_WIN32 && defined(__PW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul))) # elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) # else # define LZO_HAVE_WINDOWS_H 1 @@ -2310,6 +2375,8 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) # define LZO_ABI_BIG_ENDIAN 1 #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) # define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) +# define LZO_ABI_BIG_ENDIAN 1 #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) # define LZO_ABI_BIG_ENDIAN 1 #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) @@ -2323,6 +2390,8 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) # define LZO_ABI_LITTLE_ENDIAN 1 # endif # define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) +# define LZO_ABI_BIG_ENDIAN 1 #elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__) # define LZO_ABI_BIG_ENDIAN 1 #elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__) @@ -2455,20 +2524,29 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) # endif #elif (LZO_ARCH_ARM) # if defined(__ARM_FEATURE_UNALIGNED) +# if ((__ARM_FEATURE_UNALIGNED)+0) +# ifndef LZO_OPT_UNALIGNED16 +# define LZO_OPT_UNALIGNED16 1 +# endif +# ifndef LZO_OPT_UNALIGNED32 +# define LZO_OPT_UNALIGNED32 1 +# endif +# endif +# elif 1 && (LZO_ARCH_ARM_THUMB2) # ifndef LZO_OPT_UNALIGNED16 # define LZO_OPT_UNALIGNED16 1 # endif # ifndef LZO_OPT_UNALIGNED32 # define LZO_OPT_UNALIGNED32 1 # endif -# elif defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM+0) >= 7) +# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7) # ifndef LZO_OPT_UNALIGNED16 # define LZO_OPT_UNALIGNED16 1 # endif # ifndef LZO_OPT_UNALIGNED32 # define LZO_OPT_UNALIGNED32 1 # endif -# elif defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM+0) >= 6) && !defined(__TARGET_PROFILE_M) +# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R)) # ifndef LZO_OPT_UNALIGNED16 # define LZO_OPT_UNALIGNED16 1 # endif @@ -2624,6 +2702,23 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) #if (!(LZO_SIZEOF_PTRDIFF_T+0 > 0 && LZO_SIZEOF_SIZE_T+0 > 0 && LZO_SIZEOF_VOID_P+0 > 0)) # error "missing defines for sizes" #endif +#define LZO_TYPEOF_CHAR 1u +#define LZO_TYPEOF_SHORT 2u +#define LZO_TYPEOF_INT 3u +#define LZO_TYPEOF_LONG 4u +#define LZO_TYPEOF_LONG_LONG 5u +#define LZO_TYPEOF___INT8 17u +#define LZO_TYPEOF___INT16 18u +#define LZO_TYPEOF___INT32 19u +#define LZO_TYPEOF___INT64 20u +#define LZO_TYPEOF___INT128 21u +#define LZO_TYPEOF___INT256 22u +#define LZO_TYPEOF___MODE_QI 33u +#define LZO_TYPEOF___MODE_HI 34u +#define LZO_TYPEOF___MODE_SI 35u +#define LZO_TYPEOF___MODE_DI 36u +#define LZO_TYPEOF___MODE_TI 37u +#define LZO_TYPEOF_CHAR_P 129u #if !defined(lzo_llong_t) #if (LZO_SIZEOF_LONG_LONG+0 > 0) __lzo_gnuc_extension__ typedef long long lzo_llong_t__; @@ -2636,20 +2731,25 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if (LZO_SIZEOF_LONG == 2) # define lzo_int16e_t long # define lzo_uint16e_t unsigned long +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_LONG #elif (LZO_SIZEOF_INT == 2) # define lzo_int16e_t int # define lzo_uint16e_t unsigned int +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_SHORT == 2) # define lzo_int16e_t short int # define lzo_uint16e_t unsigned short int +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_SHORT #elif 1 && !(LZO_CFG_TYPE_NO_MODE_HI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) typedef int lzo_int16e_hi_t__ __attribute__((__mode__(__HI__))); typedef unsigned int lzo_uint16e_hi_t__ __attribute__((__mode__(__HI__))); # define lzo_int16e_t lzo_int16e_hi_t__ # define lzo_uint16e_t lzo_uint16e_hi_t__ +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___MODE_HI #elif (LZO_SIZEOF___INT16 == 2) # define lzo_int16e_t __int16 # define lzo_uint16e_t unsigned __int16 +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___INT16 #else #endif #endif @@ -2662,20 +2762,25 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if (LZO_SIZEOF_LONG == 4) # define lzo_int32e_t long int # define lzo_uint32e_t unsigned long int +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG #elif (LZO_SIZEOF_INT == 4) # define lzo_int32e_t int # define lzo_uint32e_t unsigned int +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_SHORT == 4) # define lzo_int32e_t short int # define lzo_uint32e_t unsigned short int +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_SHORT #elif (LZO_SIZEOF_LONG_LONG == 4) # define lzo_int32e_t lzo_llong_t # define lzo_uint32e_t lzo_ullong_t +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG_LONG #elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) && (__INT_MAX__+0 > 2147483647L) typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); # define lzo_int32e_t lzo_int32e_si_t__ # define lzo_uint32e_t lzo_uint32e_si_t__ +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI #elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L) typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); @@ -2683,9 +2788,11 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_uint32e_t lzo_uint32e_si_t__ # define LZO_INT32_C(c) (c##LL) # define LZO_UINT32_C(c) (c##ULL) +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI #elif (LZO_SIZEOF___INT32 == 4) # define lzo_int32e_t __int32 # define lzo_uint32e_t unsigned __int32 +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___INT32 #else #endif #endif @@ -2703,14 +2810,15 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if (LZO_SIZEOF_INT == 8) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) # define lzo_int64e_t int # define lzo_uint64e_t unsigned int -# define LZO_SIZEOF_LZO_INT64E_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_LONG == 8) # define lzo_int64e_t long int # define lzo_uint64e_t unsigned long int -# define LZO_SIZEOF_LZO_INT64E_T LZO_SIZEOF_LONG +# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG #elif (LZO_SIZEOF_LONG_LONG == 8) && !(LZO_CFG_TYPE_PREFER___INT64) # define lzo_int64e_t lzo_llong_t # define lzo_uint64e_t lzo_ullong_t +# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG_LONG # if (LZO_CC_BORLANDC) # define LZO_INT64_C(c) ((c) + 0ll) # define LZO_UINT64_C(c) ((c) + 0ull) @@ -2721,10 +2829,10 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define LZO_INT64_C(c) (c##LL) # define LZO_UINT64_C(c) (c##ULL) # endif -# define LZO_SIZEOF_LZO_INT64E_T LZO_SIZEOF_LONG_LONG #elif (LZO_SIZEOF___INT64 == 8) # define lzo_int64e_t __int64 # define lzo_uint64e_t unsigned __int64 +# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF___INT64 # if (LZO_CC_BORLANDC) # define LZO_INT64_C(c) ((c) + 0i64) # define LZO_UINT64_C(c) ((c) + 0ui64) @@ -2732,11 +2840,11 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define LZO_INT64_C(c) (c##i64) # define LZO_UINT64_C(c) (c##ui64) # endif -# define LZO_SIZEOF_LZO_INT64E_T LZO_SIZEOF___INT64 #else #endif #endif #if defined(lzo_int64e_t) +# define LZO_SIZEOF_LZO_INT64E_T 8 LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == 8) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == LZO_SIZEOF_LZO_INT64E_T) #endif @@ -2745,14 +2853,17 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_int32l_t lzo_int32e_t # define lzo_uint32l_t lzo_uint32e_t # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LZO_INT32E_T +# define LZO_TYPEOF_LZO_INT32L_T LZO_TYPEOF_LZO_INT32E_T #elif (LZO_SIZEOF_INT >= 4) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) # define lzo_int32l_t int # define lzo_uint32l_t unsigned int # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_INT #elif (LZO_SIZEOF_LONG >= 4) # define lzo_int32l_t long int # define lzo_uint32l_t unsigned long int # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LONG +# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_LONG #else # error "lzo_int32l_t" #endif @@ -2766,6 +2877,7 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_int64l_t lzo_int64e_t # define lzo_uint64l_t lzo_uint64e_t # define LZO_SIZEOF_LZO_INT64L_T LZO_SIZEOF_LZO_INT64E_T +# define LZO_TYPEOF_LZO_INT64L_T LZO_TYPEOF_LZO_INT64E_T #else #endif #endif @@ -2778,10 +2890,12 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_int32f_t lzo_int64l_t # define lzo_uint32f_t lzo_uint64l_t # define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT64L_T #else # define lzo_int32f_t lzo_int32l_t # define lzo_uint32f_t lzo_uint32l_t # define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT32L_T +# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT32L_T #endif #endif #if 1 @@ -2793,6 +2907,7 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_int64f_t lzo_int64l_t # define lzo_uint64f_t lzo_uint64l_t # define LZO_SIZEOF_LZO_INT64F_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_TYPEOF_LZO_INT64F_T LZO_TYPEOF_LZO_INT64L_T #else #endif #endif @@ -2803,33 +2918,39 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if !defined(lzo_intptr_t) #if 1 && (LZO_OS_OS400 && (LZO_SIZEOF_VOID_P == 16)) # define __LZO_INTPTR_T_IS_POINTER 1 - typedef char* lzo_intptr_t; - typedef char* lzo_uintptr_t; + typedef char * lzo_intptr_t; + typedef char * lzo_uintptr_t; # define lzo_intptr_t lzo_intptr_t # define lzo_uintptr_t lzo_uintptr_t # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_VOID_P +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_CHAR_P #elif (LZO_CC_MSC && (_MSC_VER >= 1300) && (LZO_SIZEOF_VOID_P == 4) && (LZO_SIZEOF_INT == 4)) typedef __w64 int lzo_intptr_t; typedef __w64 unsigned int lzo_uintptr_t; # define lzo_intptr_t lzo_intptr_t # define lzo_uintptr_t lzo_uintptr_t # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_SHORT == LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT > LZO_SIZEOF_VOID_P) # define lzo_intptr_t short # define lzo_uintptr_t unsigned short # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_SHORT +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_SHORT #elif (LZO_SIZEOF_INT >= LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) # define lzo_intptr_t int # define lzo_uintptr_t unsigned int # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_LONG >= LZO_SIZEOF_VOID_P) # define lzo_intptr_t long # define lzo_uintptr_t unsigned long # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LONG +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LONG #elif (LZO_SIZEOF_LZO_INT64L_T >= LZO_SIZEOF_VOID_P) # define lzo_intptr_t lzo_int64l_t # define lzo_uintptr_t lzo_uint64l_t # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LZO_INT64L_T #else # error "lzo_intptr_t" #endif @@ -2843,27 +2964,33 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if (LZO_WORDSIZE == LZO_SIZEOF_LZO_INTPTR_T) && !(__LZO_INTPTR_T_IS_POINTER) # define lzo_word_t lzo_uintptr_t # define lzo_sword_t lzo_intptr_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INTPTR_T +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INTPTR_T +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LZO_INTPTR_T #elif (LZO_WORDSIZE == LZO_SIZEOF_LONG) # define lzo_word_t unsigned long # define lzo_sword_t long -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LONG #elif (LZO_WORDSIZE == LZO_SIZEOF_INT) # define lzo_word_t unsigned int # define lzo_sword_t int -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_INT #elif (LZO_WORDSIZE == LZO_SIZEOF_SHORT) # define lzo_word_t unsigned short # define lzo_sword_t short -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_SHORT +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_SHORT +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_SHORT #elif (LZO_WORDSIZE == 1) # define lzo_word_t unsigned char # define lzo_sword_t signed char -# define LZO_SIZEOF_LZO_WORD_T 1 +# define LZO_SIZEOF_LZO_WORD_T 1 +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_CHAR #elif (LZO_WORDSIZE == LZO_SIZEOF_LZO_INT64L_T) # define lzo_word_t lzo_uint64l_t # define lzo_sword_t lzo_int64l_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_TYPEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T #elif (LZO_ARCH_SPU) && (LZO_CC_GNUC) #if 0 typedef unsigned lzo_word_t __attribute__((__mode__(__V16QI__))); @@ -2871,6 +2998,7 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_word_t lzo_word_t # define lzo_sword_t lzo_sword_t # define LZO_SIZEOF_LZO_WORD_T 16 +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF___MODE_V16QI #endif #else # error "lzo_word_t" @@ -2885,6 +3013,7 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #define lzo_int8_t signed char #define lzo_uint8_t unsigned char #define LZO_SIZEOF_LZO_INT8_T 1 +#define LZO_TYPEOF_LZO_INT8_T LZO_TYPEOF_CHAR LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t)) #endif @@ -2892,6 +3021,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t)) #define lzo_int16_t lzo_int16e_t #define lzo_uint16_t lzo_uint16e_t #define LZO_SIZEOF_LZO_INT16_T LZO_SIZEOF_LZO_INT16E_T +#define LZO_TYPEOF_LZO_INT16_T LZO_TYPEOF_LZO_INT16E_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == sizeof(lzo_uint16_t)) #endif @@ -2899,6 +3029,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == sizeof(lzo_uint16_t)) #define lzo_int32_t lzo_int32e_t #define lzo_uint32_t lzo_uint32e_t #define LZO_SIZEOF_LZO_INT32_T LZO_SIZEOF_LZO_INT32E_T +#define LZO_TYPEOF_LZO_INT32_T LZO_TYPEOF_LZO_INT32E_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == sizeof(lzo_uint32_t)) #endif @@ -2906,6 +3037,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == sizeof(lzo_uint32_t)) #define lzo_int64_t lzo_int64e_t #define lzo_uint64_t lzo_uint64e_t #define LZO_SIZEOF_LZO_INT64_T LZO_SIZEOF_LZO_INT64E_T +#define LZO_TYPEOF_LZO_INT64_T LZO_TYPEOF_LZO_INT64E_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == sizeof(lzo_uint64_t)) #endif @@ -2913,6 +3045,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == sizeof(lzo_uint64_t)) #define lzo_int_least32_t lzo_int32l_t #define lzo_uint_least32_t lzo_uint32l_t #define LZO_SIZEOF_LZO_INT_LEAST32_T LZO_SIZEOF_LZO_INT32L_T +#define LZO_TYPEOF_LZO_INT_LEAST32_T LZO_TYPEOF_LZO_INT32L_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) >= 4) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) == sizeof(lzo_uint_least32_t)) #endif @@ -2920,6 +3053,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) == sizeof(lzo_uint_leas #define lzo_int_least64_t lzo_int64l_t #define lzo_uint_least64_t lzo_uint64l_t #define LZO_SIZEOF_LZO_INT_LEAST64_T LZO_SIZEOF_LZO_INT64L_T +#define LZO_TYPEOF_LZO_INT_LEAST64_T LZO_TYPEOF_LZO_INT64L_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) >= 8) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) == sizeof(lzo_uint_least64_t)) #endif @@ -2927,6 +3061,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) == sizeof(lzo_uint_leas #define lzo_int_fast32_t lzo_int32f_t #define lzo_uint_fast32_t lzo_uint32f_t #define LZO_SIZEOF_LZO_INT_FAST32_T LZO_SIZEOF_LZO_INT32F_T +#define LZO_TYPEOF_LZO_INT_FAST32_T LZO_TYPEOF_LZO_INT32F_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) >= 4) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) == sizeof(lzo_uint_fast32_t)) #endif @@ -2934,6 +3069,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) == sizeof(lzo_uint_fast3 #define lzo_int_fast64_t lzo_int64f_t #define lzo_uint_fast64_t lzo_uint64f_t #define LZO_SIZEOF_LZO_INT_FAST64_T LZO_SIZEOF_LZO_INT64F_T +#define LZO_TYPEOF_LZO_INT_FAST64_T LZO_TYPEOF_LZO_INT64F_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) >= 8) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast64_t)) #endif diff --git a/main/lzo/include/lzo/lzoutil.h b/main/lzo/include/lzo/lzoutil.h index 23ea5229..f44156f8 100644 --- a/main/lzo/include/lzo/lzoutil.h +++ b/main/lzo/include/lzo/lzoutil.h @@ -1,8 +1,8 @@ -/* lzoutil.h -- utilitiy functions for use by applications [DEPRECATED] +/* lzoutil.h -- utility functions for use by applications This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #define __LZOUTIL_H_INCLUDED 1 #ifndef __LZOCONF_H_INCLUDED -#include "lzoconf.h" +#include <lzo/lzoconf.h> #endif #ifdef __cplusplus @@ -40,7 +40,8 @@ extern "C" { /*********************************************************************** // LZO-v1 deprecated macros (which were used in the old example programs) -// DO NOT USE +// +// THIS FILE IS DEPRECATED. DO NOT USE. ************************************************************************/ #define lzo_alloc(a,b) (malloc((a)*(b))) @@ -58,4 +59,4 @@ extern "C" { #endif /* already included */ -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/lzotest/asm.h b/main/lzo/lzotest/asm.h index cbc07156..72b82893 100644 --- a/main/lzo/lzotest/asm.h +++ b/main/lzo/lzotest/asm.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ **************************************************************************/ #if defined(LZO_USE_ASM) -# include "lzo/lzo_asm.h" +# include <lzo/lzo_asm.h> #else # define lzo1c_decompress_asm 0 # define lzo1c_decompress_asm_safe 0 @@ -64,7 +64,4 @@ #define lzo1f_decompress_asm_safe 0 -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/lzotest/db.h b/main/lzo/lzotest/db.h index 9ce0a6ca..36fc481d 100644 --- a/main/lzo/lzotest/db.h +++ b/main/lzo/lzotest/db.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -473,13 +473,5 @@ zlib_crc32_x_compress, 0, 0, 0, 0, 0, 0, 0 }, #endif -#if defined(__LZO_PROFESSIONAL__) -# include "lzopro/t_db.ch" -#endif - - - -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/lzotest/lzotest.c b/main/lzo/lzotest/lzotest.c index e4359d3e..e4bae0f8 100644 --- a/main/lzo/lzotest/lzotest.c +++ b/main/lzo/lzotest/lzotest.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ */ -#include "lzo/lzoconf.h" +#include <lzo/lzoconf.h> /************************************************************************* @@ -90,43 +90,34 @@ /* LZO algorithms */ #if defined(HAVE_LZO1_H) -# include "lzo/lzo1.h" +# include <lzo/lzo1.h> #endif #if defined(HAVE_LZO1A_H) -# include "lzo/lzo1a.h" +# include <lzo/lzo1a.h> #endif #if defined(HAVE_LZO1B_H) -# include "lzo/lzo1b.h" +# include <lzo/lzo1b.h> #endif #if defined(HAVE_LZO1C_H) -# include "lzo/lzo1c.h" +# include <lzo/lzo1c.h> #endif #if defined(HAVE_LZO1F_H) -# include "lzo/lzo1f.h" +# include <lzo/lzo1f.h> #endif #if defined(HAVE_LZO1X_H) -# include "lzo/lzo1x.h" -# if defined(__LZO_PROFESSIONAL__) -# include "lzo/lzopro/lzo1x.h" -# endif +# include <lzo/lzo1x.h> #endif #if defined(HAVE_LZO1Y_H) -# include "lzo/lzo1y.h" -# if defined(__LZO_PROFESSIONAL__) -# include "lzo/lzopro/lzo1y.h" -# endif +# include <lzo/lzo1y.h> #endif #if defined(HAVE_LZO1Z_H) -# include "lzo/lzo1z.h" +# include <lzo/lzo1z.h> #endif #if defined(HAVE_LZO2A_H) -# include "lzo/lzo2a.h" +# include <lzo/lzo2a.h> #endif #if defined(HAVE_LZO2B_H) -# include "lzo/lzo2b.h" -#endif -#if defined(__LZO_PROFESSIONAL__) -# include "lzopro/t_config.ch" +# include <lzo/lzo2b.h> #endif /* other compressors */ #if defined(HAVE_ZLIB_H) @@ -207,10 +198,6 @@ enum { M_Z_CRC32 = 6012, #endif -#if defined(__LZO_PROFESSIONAL__) -# include "lzopro/m_enum.ch" -#endif - M_UNUSED }; @@ -619,7 +606,7 @@ lzo_bool is_compressor ( const compress_t *c ) // check that memory gets accessed within bounds **************************************************************************/ -static void memchecker_init ( mblock_t *mb, lzo_xint l, unsigned char random_byte ) +static void memchecker_init ( mblock_t *mb, lzo_uint l, unsigned char random_byte ) { lzo_uint i; lzo_uint len = (lzo_uint) l; @@ -645,7 +632,7 @@ static void memchecker_init ( mblock_t *mb, lzo_xint l, unsigned char random_byt } -static int memchecker_check ( mblock_t *mb, lzo_xint l, unsigned char random_byte ) +static int memchecker_check ( mblock_t *mb, lzo_uint l, unsigned char random_byte ) { lzo_uint i; lzo_uint len = (lzo_uint) l; @@ -1495,9 +1482,6 @@ void license(void) fp = stdout; fflush(stdout); fflush(stderr); -#if defined(__LZO_PROFESSIONAL__) -# include "lzopro/license.ch" -#else fprintf(fp, " The LZO library is free software; you can redistribute it and/or\n" " modify it under the terms of the GNU General Public License as\n" @@ -1521,7 +1505,6 @@ fprintf(fp, " http://www.oberhumer.com/opensource/lzo/\n" "\n" ); -#endif fflush(fp); exit(EXIT_OK); @@ -1646,9 +1629,6 @@ static void parse_methods(const char *p) else if (m_strcmp(p,"bzip2") == 0) add_all_methods(M_BZIP2_1,M_BZIP2_9); #endif -#if defined(__LZO_PROFESSIONAL__) -# include "lzopro/t_opt_m.ch" -#endif else if (m_strisdigit(p)) add_method(atoi(p)); else @@ -1922,15 +1902,9 @@ int __lzo_cdecl_main main(int argc, char *argv[]) if ((*s == '/' || *s == '\\') && s[1]) progname = s + 1; -#if defined(__LZO_PROFESSIONAL__) - printf("\nLZO Professional real-time data compression library (v%s, %s).\n", - lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); -#else printf("\nLZO real-time data compression library (v%s, %s).\n", lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); -#endif + printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); /* @@ -2089,7 +2063,4 @@ int __lzo_cdecl_main main(int argc, char *argv[]) } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/lzotest/wrap.h b/main/lzo/lzotest/wrap.h index e85cd939..d2a9c13a 100644 --- a/main/lzo/lzotest/wrap.h +++ b/main/lzo/lzotest/wrap.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -211,9 +211,9 @@ memcpy_x_compress ( const lzo_bytep src, lzo_uint src_len, lzo_bytep dst, lzo_uintp dst_len, lzo_voidp wrkmem ) { - lzo_memcpy(dst,src,src_len); + lzo_memcpy(dst, src, src_len); *dst_len = src_len; - if (wrkmem) wrkmem = 0; /* avoid warning */ + LZO_UNUSED(wrkmem); return 0; } @@ -223,10 +223,9 @@ memset_x_compress ( const lzo_bytep src, lzo_uint src_len, lzo_bytep dst, lzo_uintp dst_len, lzo_voidp wrkmem ) { - lzo_memset(dst,0,src_len); + lzo_memset(dst, 0, src_len); *dst_len = src_len; - if (src) src = 0; /* avoid warning */ - if (wrkmem) wrkmem = 0; /* avoid warning */ + LZO_UNUSED(src); LZO_UNUSED(wrkmem); return 0; } @@ -240,8 +239,7 @@ adler32_x_compress ( const lzo_bytep src, lzo_uint src_len, adler = lzo_adler32(0, NULL, 0); adler = lzo_adler32(adler, dst, src_len); *dst_len = src_len; - if (src) src = 0; /* avoid warning */ - if (wrkmem) wrkmem = 0; /* avoid warning */ + LZO_UNUSED(src); LZO_UNUSED(wrkmem); return 0; } @@ -255,18 +253,9 @@ crc32_x_compress ( const lzo_bytep src, lzo_uint src_len, crc = lzo_crc32(0, NULL, 0); crc = lzo_crc32(crc, dst, src_len); *dst_len = src_len; - if (src) src = 0; /* avoid warning */ - if (wrkmem) wrkmem = 0; /* avoid warning */ + LZO_UNUSED(src); LZO_UNUSED(wrkmem); return 0; } -#if defined(__LZO_PROFESSIONAL__) -# include "lzopro/t_wrap.ch" -#endif - - -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/lzotest/wrapmisc.h b/main/lzo/lzotest/wrapmisc.h index dfcb9187..12c48091 100644 --- a/main/lzo/lzotest/wrapmisc.h +++ b/main/lzo/lzotest/wrapmisc.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -270,7 +270,4 @@ zlib_crc32_x_compress ( const m_bytep src, m_uint src_len, #endif /* ALG_ZLIB */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/minilzo/Makefile.minilzo b/main/lzo/minilzo/Makefile.minilzo index e511e74e..6e301637 100644 --- a/main/lzo/minilzo/Makefile.minilzo +++ b/main/lzo/minilzo/Makefile.minilzo @@ -1,7 +1,7 @@ # # a very simple Makefile for miniLZO # -# Copyright (C) 1996-2014 Markus F.X.J. Oberhumer +# Copyright (C) 1996-2015 Markus F.X.J. Oberhumer # PROGRAM = testmini diff --git a/main/lzo/minilzo/README.LZO b/main/lzo/minilzo/README.LZO index 9a8fbb40..b82d13b8 100644 --- a/main/lzo/minilzo/README.LZO +++ b/main/lzo/minilzo/README.LZO @@ -6,8 +6,8 @@ Author : Markus Franz Xaver Johannes Oberhumer <markus@oberhumer.com> http://www.oberhumer.com/opensource/lzo/ - Version : 2.07 - Date : 25 Jun 2014 + Version : 2.09 + Date : 04 Feb 2015 I've created miniLZO for projects where it is inconvenient to include (or require) the full LZO source code just because you @@ -110,7 +110,7 @@ Appendix D: Copyright --------------------- - LZO and miniLZO are Copyright (C) 1996-2014 Markus Franz Xaver Oberhumer + LZO and miniLZO are Copyright (C) 1996-2015 Markus Franz Xaver Oberhumer All Rights Reserved. LZO and miniLZO are distributed under the terms of the GNU General diff --git a/main/lzo/minilzo/minilzo.c b/main/lzo/minilzo/minilzo.c index 26513174..801f5300 100644 --- a/main/lzo/minilzo/minilzo.c +++ b/main/lzo/minilzo/minilzo.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -418,7 +418,7 @@ #elif defined(__TOS__) || defined(__atarist__) # define LZO_OS_TOS 1 # define LZO_INFO_OS "tos" -#elif defined(macintosh) && !defined(__ppc__) +#elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__) # define LZO_OS_MACCLASSIC 1 # define LZO_INFO_OS "macclassic" #elif defined(__VMS) @@ -802,22 +802,11 @@ #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) # define LZO_ARCH_AMD64 1 # define LZO_INFO_ARCH "amd64" -#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +#elif defined(__arm__) || defined(_M_ARM) # define LZO_ARCH_ARM 1 -# define LZO_ARCH_ARM_THUMB 1 -# define LZO_INFO_ARCH "arm_thumb" +# define LZO_INFO_ARCH "arm" #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) # define LZO_ARCH_ARM 1 -# if defined(__CPU_MODE__) && ((__CPU_MODE__-0) == 1) -# define LZO_ARCH_ARM_THUMB 1 -# define LZO_INFO_ARCH "arm_thumb" -# elif defined(__CPU_MODE__) && ((__CPU_MODE__-0) == 2) -# define LZO_INFO_ARCH "arm" -# else -# define LZO_INFO_ARCH "arm" -# endif -#elif defined(__arm__) || defined(_M_ARM) -# define LZO_ARCH_ARM 1 # define LZO_INFO_ARCH "arm" #elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) # define LZO_ARCH_AVR 1 @@ -925,6 +914,19 @@ # define LZO_INFO_ARCH "unknown" #endif #endif +#if !defined(LZO_ARCH_ARM_THUMB2) +#if (LZO_ARCH_ARM) +# if defined(__ARM_ARCH_ISA_THUMB) +# if ((__ARM_ARCH_ISA_THUMB)+0 >= 2) +# define LZO_ARCH_ARM_THUMB2 1 +# endif +# elif 1 && defined(__thumb2__) +# define LZO_ARCH_ARM_THUMB2 1 +# elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4) +# define LZO_ARCH_ARM_THUMB2 1 +# endif +#endif +#endif #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) # error "FIXME - missing define for CPU architecture" #endif @@ -967,13 +969,10 @@ #if (LZO_ARCH_I386 && !LZO_ARCH_X86) || (!LZO_ARCH_I386 && LZO_ARCH_X86) # error "unexpected configuration - check your compiler defines" #endif -#if (LZO_ARCH_ARM_THUMB && !LZO_ARCH_ARM) +#if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM) # error "unexpected configuration - check your compiler defines" #endif -#if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM_THUMB) -# error "unexpected configuration - check your compiler defines" -#endif -#if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM_THUMB) +#if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM) # error "unexpected configuration - check your compiler defines" #endif #if (LZO_ARCH_ARM_THUMB1 && LZO_ARCH_ARM_THUMB2) @@ -1005,7 +1004,9 @@ # if !defined(LZO_TARGET_FEATURE_SSE2) # if defined(__SSE2__) # define LZO_TARGET_FEATURE_SSE2 1 -# elif defined(_MSC_VER) && ((defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) || defined(_M_AMD64)) +# elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) +# define LZO_TARGET_FEATURE_SSE2 1 +# elif (LZO_CC_INTELC_MSC || LZO_CC_MSC) && defined(_M_AMD64) # define LZO_TARGET_FEATURE_SSE2 1 # endif # endif @@ -1054,7 +1055,11 @@ #endif #if (LZO_ARCH_ARM) # if !defined(LZO_TARGET_FEATURE_NEON) -# if defined(__ARM_NEON__) +# if defined(__ARM_NEON) && ((__ARM_NEON)+0) +# define LZO_TARGET_FEATURE_NEON 1 +# elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0) +# define LZO_TARGET_FEATURE_NEON 1 +# elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0) # define LZO_TARGET_FEATURE_NEON 1 # endif # endif @@ -1240,6 +1245,48 @@ extern "C" { #if !defined(__lzo_gnuc_extension__) # define __lzo_gnuc_extension__ /*empty*/ #endif +#if !defined(lzo_has_builtin) +#if (LZO_CC_CLANG) && defined(__has_builtin) +# define lzo_has_builtin __has_builtin +#endif +#endif +#if !defined(lzo_has_builtin) +# define lzo_has_builtin(x) 0 +#endif +#if !defined(lzo_has_attribute) +#if (LZO_CC_CLANG) && defined(__has_attribute) +# define lzo_has_attribute __has_attribute +#endif +#endif +#if !defined(lzo_has_attribute) +# define lzo_has_attribute(x) 0 +#endif +#if !defined(lzo_has_declspec_attribute) +#if (LZO_CC_CLANG) && defined(__has_declspec_attribute) +# define lzo_has_declspec_attribute __has_declspec_attribute +#endif +#endif +#if !defined(lzo_has_declspec_attribute) +# define lzo_has_declspec_attribute(x) 0 +#endif +#if !defined(lzo_has_feature) +#if (LZO_CC_CLANG) && defined(__has_feature) +# define lzo_has_feature __has_feature +#endif +#endif +#if !defined(lzo_has_feature) +# define lzo_has_feature(x) 0 +#endif +#if !defined(lzo_has_extension) +#if (LZO_CC_CLANG) && defined(__has_extension) +# define lzo_has_extension __has_extension +#elif (LZO_CC_CLANG) && defined(__has_feature) +# define lzo_has_extension __has_feature +#endif +#endif +#if !defined(lzo_has_extension) +# define lzo_has_extension 0 +#endif #if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0 # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) # define LZO_CFG_USE_NEW_STYLE_CASTS 0 @@ -1376,7 +1423,7 @@ extern "C" { # elif (LZO_CC_MSC && (_MSC_VER < 900)) # define LZO_UNUSED(var) if (&var) ; else # elif (LZO_CC_KEILC) -# define LZO_UNUSED(var) {LZO_EXTERN_C int lzo_unused__[1-2*!(sizeof(var)>0)];} +# define LZO_UNUSED(var) {extern int lzo_unused__[1-2*!(sizeof(var)>0)]; (void)lzo_unused__;} # elif (LZO_CC_PACIFICC) # define LZO_UNUSED(var) ((void) sizeof(var)) # elif (LZO_CC_WATCOMC) && defined(__cplusplus) @@ -1397,7 +1444,7 @@ extern "C" { # elif (LZO_CC_MSC) # define LZO_UNUSED_FUNC(func) ((void) &func) # elif (LZO_CC_KEILC || LZO_CC_PELLESC) -# define LZO_UNUSED_FUNC(func) {LZO_EXTERN_C int lzo_unused_func__[1-2*!(sizeof((int)func)>0)];} +# define LZO_UNUSED_FUNC(func) {extern int lzo_unused__[1-2*!(sizeof((int)func)>0)]; (void)lzo_unused__;} # else # define LZO_UNUSED_FUNC(func) ((void) func) # endif @@ -1813,21 +1860,28 @@ extern "C" { # define __lzo_HAVE_likely 1 # endif #else -# define __lzo_likely(e) (e) +# define __lzo_likely(e) (e) +#endif +#if defined(__lzo_very_likely) +# ifndef __lzo_HAVE_very_likely +# define __lzo_HAVE_very_likely 1 +# endif +#else +# define __lzo_very_likely(e) __lzo_likely(e) #endif #if defined(__lzo_unlikely) # ifndef __lzo_HAVE_unlikely # define __lzo_HAVE_unlikely 1 # endif #else -# define __lzo_unlikely(e) (e) +# define __lzo_unlikely(e) (e) #endif -#if !defined(__lzo_static_unused_void_func) -# 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) -# define __lzo_static_unused_void_func(f) static void __attribute__((__unused__)) f(void) -# else -# define __lzo_static_unused_void_func(f) static __lzo_inline void f(void) +#if defined(__lzo_very_unlikely) +# ifndef __lzo_HAVE_very_unlikely +# define __lzo_HAVE_very_unlikely 1 # endif +#else +# define __lzo_very_unlikely(e) __lzo_unlikely(e) #endif #if !defined(__lzo_loop_forever) # if (LZO_CC_IBMC) @@ -1837,7 +1891,7 @@ extern "C" { # endif #endif #if !defined(__lzo_unreachable) -#if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul)) +#if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul)) && lzo_has_builtin(__builtin_unreachable) # define __lzo_unreachable() __builtin_unreachable(); #elif (LZO_CC_GNUC >= 0x040500ul) # define __lzo_unreachable() __builtin_unreachable(); @@ -1856,6 +1910,15 @@ extern "C" { # define __lzo_unreachable() __lzo_loop_forever(); # endif #endif +#if !defined(lzo_unused_funcs_impl) +# 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) +# define lzo_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f +# elif 1 && (LZO_CC_BORLANDC || LZO_CC_GNUC) +# define lzo_unused_funcs_impl(r,f) static r f +# else +# define lzo_unused_funcs_impl(r,f) __lzo_static_forceinline r f +# endif +#endif #ifndef __LZO_CTA_NAME #if (LZO_CFG_USE_COUNTER) # define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__COUNTER__) @@ -1881,6 +1944,8 @@ extern "C" { #if !defined(LZO_COMPILE_TIME_ASSERT) # if (LZO_CC_AZTECC) # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-!(e)];} +# elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030000ul)) +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));} # elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; # elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) @@ -1968,7 +2033,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(3 == 3) #if !defined(LZO_HAVE_WINDOWS_H) #if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) # if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) -# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +# elif ((LZO_OS_WIN32 && defined(__PW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul))) # elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) # else # define LZO_HAVE_WINDOWS_H 1 @@ -2330,6 +2395,8 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) # define LZO_ABI_BIG_ENDIAN 1 #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) # define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) +# define LZO_ABI_BIG_ENDIAN 1 #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) # define LZO_ABI_BIG_ENDIAN 1 #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) @@ -2343,6 +2410,8 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) # define LZO_ABI_LITTLE_ENDIAN 1 # endif # define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) +# define LZO_ABI_BIG_ENDIAN 1 #elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__) # define LZO_ABI_BIG_ENDIAN 1 #elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__) @@ -2475,20 +2544,29 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) # endif #elif (LZO_ARCH_ARM) # if defined(__ARM_FEATURE_UNALIGNED) +# if ((__ARM_FEATURE_UNALIGNED)+0) # ifndef LZO_OPT_UNALIGNED16 # define LZO_OPT_UNALIGNED16 1 # endif # ifndef LZO_OPT_UNALIGNED32 # define LZO_OPT_UNALIGNED32 1 # endif -# elif defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM+0) >= 7) +# endif +# elif 1 && (LZO_ARCH_ARM_THUMB2) # ifndef LZO_OPT_UNALIGNED16 # define LZO_OPT_UNALIGNED16 1 # endif # ifndef LZO_OPT_UNALIGNED32 # define LZO_OPT_UNALIGNED32 1 # endif -# elif defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM+0) >= 6) && !defined(__TARGET_PROFILE_M) +# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7) +# ifndef LZO_OPT_UNALIGNED16 +# define LZO_OPT_UNALIGNED16 1 +# endif +# ifndef LZO_OPT_UNALIGNED32 +# define LZO_OPT_UNALIGNED32 1 +# endif +# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R)) # ifndef LZO_OPT_UNALIGNED16 # define LZO_OPT_UNALIGNED16 1 # endif @@ -2644,6 +2722,23 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) #if (!(LZO_SIZEOF_PTRDIFF_T+0 > 0 && LZO_SIZEOF_SIZE_T+0 > 0 && LZO_SIZEOF_VOID_P+0 > 0)) # error "missing defines for sizes" #endif +#define LZO_TYPEOF_CHAR 1u +#define LZO_TYPEOF_SHORT 2u +#define LZO_TYPEOF_INT 3u +#define LZO_TYPEOF_LONG 4u +#define LZO_TYPEOF_LONG_LONG 5u +#define LZO_TYPEOF___INT8 17u +#define LZO_TYPEOF___INT16 18u +#define LZO_TYPEOF___INT32 19u +#define LZO_TYPEOF___INT64 20u +#define LZO_TYPEOF___INT128 21u +#define LZO_TYPEOF___INT256 22u +#define LZO_TYPEOF___MODE_QI 33u +#define LZO_TYPEOF___MODE_HI 34u +#define LZO_TYPEOF___MODE_SI 35u +#define LZO_TYPEOF___MODE_DI 36u +#define LZO_TYPEOF___MODE_TI 37u +#define LZO_TYPEOF_CHAR_P 129u #if !defined(lzo_llong_t) #if (LZO_SIZEOF_LONG_LONG+0 > 0) __lzo_gnuc_extension__ typedef long long lzo_llong_t__; @@ -2656,20 +2751,25 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if (LZO_SIZEOF_LONG == 2) # define lzo_int16e_t long # define lzo_uint16e_t unsigned long +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_LONG #elif (LZO_SIZEOF_INT == 2) # define lzo_int16e_t int # define lzo_uint16e_t unsigned int +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_SHORT == 2) # define lzo_int16e_t short int # define lzo_uint16e_t unsigned short int +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_SHORT #elif 1 && !(LZO_CFG_TYPE_NO_MODE_HI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) typedef int lzo_int16e_hi_t__ __attribute__((__mode__(__HI__))); typedef unsigned int lzo_uint16e_hi_t__ __attribute__((__mode__(__HI__))); # define lzo_int16e_t lzo_int16e_hi_t__ # define lzo_uint16e_t lzo_uint16e_hi_t__ +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___MODE_HI #elif (LZO_SIZEOF___INT16 == 2) # define lzo_int16e_t __int16 # define lzo_uint16e_t unsigned __int16 +# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___INT16 #else #endif #endif @@ -2682,20 +2782,25 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if (LZO_SIZEOF_LONG == 4) # define lzo_int32e_t long int # define lzo_uint32e_t unsigned long int +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG #elif (LZO_SIZEOF_INT == 4) # define lzo_int32e_t int # define lzo_uint32e_t unsigned int +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_SHORT == 4) # define lzo_int32e_t short int # define lzo_uint32e_t unsigned short int +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_SHORT #elif (LZO_SIZEOF_LONG_LONG == 4) # define lzo_int32e_t lzo_llong_t # define lzo_uint32e_t lzo_ullong_t +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG_LONG #elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) && (__INT_MAX__+0 > 2147483647L) typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); # define lzo_int32e_t lzo_int32e_si_t__ # define lzo_uint32e_t lzo_uint32e_si_t__ +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI #elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L) typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__))); typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__))); @@ -2703,9 +2808,11 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_uint32e_t lzo_uint32e_si_t__ # define LZO_INT32_C(c) (c##LL) # define LZO_UINT32_C(c) (c##ULL) +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI #elif (LZO_SIZEOF___INT32 == 4) # define lzo_int32e_t __int32 # define lzo_uint32e_t unsigned __int32 +# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___INT32 #else #endif #endif @@ -2723,14 +2830,15 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if (LZO_SIZEOF_INT == 8) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) # define lzo_int64e_t int # define lzo_uint64e_t unsigned int -# define LZO_SIZEOF_LZO_INT64E_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_LONG == 8) # define lzo_int64e_t long int # define lzo_uint64e_t unsigned long int -# define LZO_SIZEOF_LZO_INT64E_T LZO_SIZEOF_LONG +# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG #elif (LZO_SIZEOF_LONG_LONG == 8) && !(LZO_CFG_TYPE_PREFER___INT64) # define lzo_int64e_t lzo_llong_t # define lzo_uint64e_t lzo_ullong_t +# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG_LONG # if (LZO_CC_BORLANDC) # define LZO_INT64_C(c) ((c) + 0ll) # define LZO_UINT64_C(c) ((c) + 0ull) @@ -2741,10 +2849,10 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define LZO_INT64_C(c) (c##LL) # define LZO_UINT64_C(c) (c##ULL) # endif -# define LZO_SIZEOF_LZO_INT64E_T LZO_SIZEOF_LONG_LONG #elif (LZO_SIZEOF___INT64 == 8) # define lzo_int64e_t __int64 # define lzo_uint64e_t unsigned __int64 +# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF___INT64 # if (LZO_CC_BORLANDC) # define LZO_INT64_C(c) ((c) + 0i64) # define LZO_UINT64_C(c) ((c) + 0ui64) @@ -2752,11 +2860,11 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define LZO_INT64_C(c) (c##i64) # define LZO_UINT64_C(c) (c##ui64) # endif -# define LZO_SIZEOF_LZO_INT64E_T LZO_SIZEOF___INT64 #else #endif #endif #if defined(lzo_int64e_t) +# define LZO_SIZEOF_LZO_INT64E_T 8 LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == 8) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == LZO_SIZEOF_LZO_INT64E_T) #endif @@ -2765,14 +2873,17 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_int32l_t lzo_int32e_t # define lzo_uint32l_t lzo_uint32e_t # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LZO_INT32E_T +# define LZO_TYPEOF_LZO_INT32L_T LZO_TYPEOF_LZO_INT32E_T #elif (LZO_SIZEOF_INT >= 4) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) # define lzo_int32l_t int # define lzo_uint32l_t unsigned int # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_INT #elif (LZO_SIZEOF_LONG >= 4) # define lzo_int32l_t long int # define lzo_uint32l_t unsigned long int # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LONG +# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_LONG #else # error "lzo_int32l_t" #endif @@ -2786,6 +2897,7 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_int64l_t lzo_int64e_t # define lzo_uint64l_t lzo_uint64e_t # define LZO_SIZEOF_LZO_INT64L_T LZO_SIZEOF_LZO_INT64E_T +# define LZO_TYPEOF_LZO_INT64L_T LZO_TYPEOF_LZO_INT64E_T #else #endif #endif @@ -2798,10 +2910,12 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_int32f_t lzo_int64l_t # define lzo_uint32f_t lzo_uint64l_t # define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT64L_T #else # define lzo_int32f_t lzo_int32l_t # define lzo_uint32f_t lzo_uint32l_t # define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT32L_T +# define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT32L_T #endif #endif #if 1 @@ -2813,6 +2927,7 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_int64f_t lzo_int64l_t # define lzo_uint64f_t lzo_uint64l_t # define LZO_SIZEOF_LZO_INT64F_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_TYPEOF_LZO_INT64F_T LZO_TYPEOF_LZO_INT64L_T #else #endif #endif @@ -2823,33 +2938,39 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if !defined(lzo_intptr_t) #if 1 && (LZO_OS_OS400 && (LZO_SIZEOF_VOID_P == 16)) # define __LZO_INTPTR_T_IS_POINTER 1 - typedef char* lzo_intptr_t; - typedef char* lzo_uintptr_t; + typedef char * lzo_intptr_t; + typedef char * lzo_uintptr_t; # define lzo_intptr_t lzo_intptr_t # define lzo_uintptr_t lzo_uintptr_t # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_VOID_P +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_CHAR_P #elif (LZO_CC_MSC && (_MSC_VER >= 1300) && (LZO_SIZEOF_VOID_P == 4) && (LZO_SIZEOF_INT == 4)) typedef __w64 int lzo_intptr_t; typedef __w64 unsigned int lzo_uintptr_t; # define lzo_intptr_t lzo_intptr_t # define lzo_uintptr_t lzo_uintptr_t # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_SHORT == LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT > LZO_SIZEOF_VOID_P) # define lzo_intptr_t short # define lzo_uintptr_t unsigned short # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_SHORT +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_SHORT #elif (LZO_SIZEOF_INT >= LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG) # define lzo_intptr_t int # define lzo_uintptr_t unsigned int # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT #elif (LZO_SIZEOF_LONG >= LZO_SIZEOF_VOID_P) # define lzo_intptr_t long # define lzo_uintptr_t unsigned long # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LONG +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LONG #elif (LZO_SIZEOF_LZO_INT64L_T >= LZO_SIZEOF_VOID_P) # define lzo_intptr_t lzo_int64l_t # define lzo_uintptr_t lzo_uint64l_t # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LZO_INT64L_T #else # error "lzo_intptr_t" #endif @@ -2863,27 +2984,33 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #if (LZO_WORDSIZE == LZO_SIZEOF_LZO_INTPTR_T) && !(__LZO_INTPTR_T_IS_POINTER) # define lzo_word_t lzo_uintptr_t # define lzo_sword_t lzo_intptr_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INTPTR_T +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INTPTR_T +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LZO_INTPTR_T #elif (LZO_WORDSIZE == LZO_SIZEOF_LONG) # define lzo_word_t unsigned long # define lzo_sword_t long -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LONG #elif (LZO_WORDSIZE == LZO_SIZEOF_INT) # define lzo_word_t unsigned int # define lzo_sword_t int -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_INT #elif (LZO_WORDSIZE == LZO_SIZEOF_SHORT) # define lzo_word_t unsigned short # define lzo_sword_t short -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_SHORT +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_SHORT +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_SHORT #elif (LZO_WORDSIZE == 1) # define lzo_word_t unsigned char # define lzo_sword_t signed char -# define LZO_SIZEOF_LZO_WORD_T 1 +# define LZO_SIZEOF_LZO_WORD_T 1 +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_CHAR #elif (LZO_WORDSIZE == LZO_SIZEOF_LZO_INT64L_T) # define lzo_word_t lzo_uint64l_t # define lzo_sword_t lzo_int64l_t -# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T +# define LZO_TYPEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T #elif (LZO_ARCH_SPU) && (LZO_CC_GNUC) #if 0 typedef unsigned lzo_word_t __attribute__((__mode__(__V16QI__))); @@ -2891,6 +3018,7 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; # define lzo_word_t lzo_word_t # define lzo_sword_t lzo_sword_t # define LZO_SIZEOF_LZO_WORD_T 16 +# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF___MODE_V16QI #endif #else # error "lzo_word_t" @@ -2905,6 +3033,7 @@ __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__; #define lzo_int8_t signed char #define lzo_uint8_t unsigned char #define LZO_SIZEOF_LZO_INT8_T 1 +#define LZO_TYPEOF_LZO_INT8_T LZO_TYPEOF_CHAR LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t)) #endif @@ -2912,6 +3041,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t)) #define lzo_int16_t lzo_int16e_t #define lzo_uint16_t lzo_uint16e_t #define LZO_SIZEOF_LZO_INT16_T LZO_SIZEOF_LZO_INT16E_T +#define LZO_TYPEOF_LZO_INT16_T LZO_TYPEOF_LZO_INT16E_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == sizeof(lzo_uint16_t)) #endif @@ -2919,6 +3049,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == sizeof(lzo_uint16_t)) #define lzo_int32_t lzo_int32e_t #define lzo_uint32_t lzo_uint32e_t #define LZO_SIZEOF_LZO_INT32_T LZO_SIZEOF_LZO_INT32E_T +#define LZO_TYPEOF_LZO_INT32_T LZO_TYPEOF_LZO_INT32E_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == sizeof(lzo_uint32_t)) #endif @@ -2926,6 +3057,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == sizeof(lzo_uint32_t)) #define lzo_int64_t lzo_int64e_t #define lzo_uint64_t lzo_uint64e_t #define LZO_SIZEOF_LZO_INT64_T LZO_SIZEOF_LZO_INT64E_T +#define LZO_TYPEOF_LZO_INT64_T LZO_TYPEOF_LZO_INT64E_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == sizeof(lzo_uint64_t)) #endif @@ -2933,6 +3065,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == sizeof(lzo_uint64_t)) #define lzo_int_least32_t lzo_int32l_t #define lzo_uint_least32_t lzo_uint32l_t #define LZO_SIZEOF_LZO_INT_LEAST32_T LZO_SIZEOF_LZO_INT32L_T +#define LZO_TYPEOF_LZO_INT_LEAST32_T LZO_TYPEOF_LZO_INT32L_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) >= 4) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) == sizeof(lzo_uint_least32_t)) #endif @@ -2940,6 +3073,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) == sizeof(lzo_uint_leas #define lzo_int_least64_t lzo_int64l_t #define lzo_uint_least64_t lzo_uint64l_t #define LZO_SIZEOF_LZO_INT_LEAST64_T LZO_SIZEOF_LZO_INT64L_T +#define LZO_TYPEOF_LZO_INT_LEAST64_T LZO_TYPEOF_LZO_INT64L_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) >= 8) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) == sizeof(lzo_uint_least64_t)) #endif @@ -2947,6 +3081,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) == sizeof(lzo_uint_leas #define lzo_int_fast32_t lzo_int32f_t #define lzo_uint_fast32_t lzo_uint32f_t #define LZO_SIZEOF_LZO_INT_FAST32_T LZO_SIZEOF_LZO_INT32F_T +#define LZO_TYPEOF_LZO_INT_FAST32_T LZO_TYPEOF_LZO_INT32F_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) >= 4) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) == sizeof(lzo_uint_fast32_t)) #endif @@ -2954,6 +3089,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) == sizeof(lzo_uint_fast3 #define lzo_int_fast64_t lzo_int64f_t #define lzo_uint_fast64_t lzo_uint64f_t #define LZO_SIZEOF_LZO_INT_FAST64_T LZO_SIZEOF_LZO_INT64F_T +#define LZO_TYPEOF_LZO_INT_FAST64_T LZO_TYPEOF_LZO_INT64F_T LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) >= 8) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast64_t)) #endif @@ -3020,7 +3156,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast6 #undef LZO_HAVE_CONFIG_H #include "minilzo.h" -#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2070) +#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2090) # error "version mismatch in miniLZO source files" #endif @@ -3042,13 +3178,23 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast6 #if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED) # error "include this file first" #endif -#include "lzo/lzoconf.h" +#if defined(LZO_CFG_BUILD_DLL) && (LZO_CFG_BUILD_DLL+0) && !defined(__LZO_EXPORT1) && !defined(__LZO_EXPORT2) && 0 +#ifndef __LZODEFS_H_INCLUDED +#if defined(LZO_HAVE_CONFIG_H) +# include <config.h> +#endif +#include <limits.h> +#include <stddef.h> +#include <lzo/lzodefs.h> +#endif +#endif +#include <lzo/lzoconf.h> #if defined(LZO_CFG_EXTRA_CONFIG_HEADER2) # include LZO_CFG_EXTRA_CONFIG_HEADER2 #endif #endif -#if (LZO_VERSION < 0x2070) || !defined(__LZOCONF_H_INCLUDED) +#if !defined(__LZOCONF_H_INCLUDED) || (LZO_VERSION+0 != 0x2090) # error "version mismatch" #endif @@ -3065,6 +3211,9 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast6 #if (LZO_CC_MSC && (_MSC_VER >= 1800)) # pragma warning(disable: 4746) #endif +#if (LZO_CC_INTELC && (__INTEL_COMPILER >= 900)) +# pragma warning(disable: 1684) +#endif #if (LZO_CC_SUNPROC) #if !defined(__cplusplus) @@ -3074,6 +3223,32 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast6 #endif #endif +#if !defined(__LZO_NOEXPORT1) +# define __LZO_NOEXPORT1 /*empty*/ +#endif +#if !defined(__LZO_NOEXPORT2) +# define __LZO_NOEXPORT2 /*empty*/ +#endif + +#if 1 +# define LZO_PUBLIC_DECL(r) LZO_EXTERN(r) +#endif +#if 1 +# define LZO_PUBLIC_IMPL(r) LZO_PUBLIC(r) +#endif +#if !defined(LZO_LOCAL_DECL) +# define LZO_LOCAL_DECL(r) __LZO_EXTERN_C LZO_LOCAL_IMPL(r) +#endif +#if !defined(LZO_LOCAL_IMPL) +# define LZO_LOCAL_IMPL(r) __LZO_NOEXPORT1 r __LZO_NOEXPORT2 __LZO_CDECL +#endif +#if 1 +# define LZO_STATIC_DECL(r) LZO_PRIVATE(r) +#endif +#if 1 +# define LZO_STATIC_IMPL(r) LZO_PRIVATE(r) +#endif + #if defined(__LZO_IN_MINILZO) || (LZO_CFG_FREESTANDING) #elif 1 # include <string.h> @@ -3269,6 +3444,9 @@ __lzo_static_forceinline unsigned lzo_bitops_ctlz32_func(lzo_uint32_t v) #elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_INT == 4) unsigned r; r = (unsigned) __builtin_clz(v); return r; #define lzo_bitops_ctlz32(v) ((unsigned) __builtin_clz(v)) +#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG == 8) && (LZO_WORDSIZE >= 8) + unsigned r; r = (unsigned) __builtin_clzl(v); return r ^ 32; +#define lzo_bitops_ctlz32(v) (((unsigned) __builtin_clzl(v)) ^ 32) #else LZO_UNUSED(v); return 0; #endif @@ -3338,25 +3516,20 @@ __lzo_static_forceinline unsigned lzo_bitops_cttz64_func(lzo_uint64_t v) } #endif -#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) -static void __attribute__((__unused__)) -#else -__lzo_static_forceinline void -#endif -lzo_bitops_unused_funcs(void) +lzo_unused_funcs_impl(void, lzo_bitops_unused_funcs)(void) { + LZO_UNUSED_FUNC(lzo_bitops_unused_funcs); LZO_UNUSED_FUNC(lzo_bitops_ctlz32_func); LZO_UNUSED_FUNC(lzo_bitops_cttz32_func); #if defined(lzo_uint64_t) LZO_UNUSED_FUNC(lzo_bitops_ctlz64_func); LZO_UNUSED_FUNC(lzo_bitops_cttz64_func); #endif - LZO_UNUSED_FUNC(lzo_bitops_unused_funcs); } #if defined(__lzo_alignof) && !(LZO_CFG_NO_UNALIGNED) -#ifndef __lzo_memops_tcheck -#define __lzo_memops_tcheck(t,a,b) ((void)0, sizeof(t) == (a) && __lzo_alignof(t) == (b)) +#if !defined(lzo_memops_tcheck__) && 0 +#define lzo_memops_tcheck__(t,a,b) ((void)0, sizeof(t) == (a) && __lzo_alignof(t) == (b)) #endif #endif #ifndef lzo_memops_TU0p @@ -3473,9 +3646,9 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU1p)0)==1) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) #define LZO_MEMOPS_COPY2(dd,ss) \ * (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss) -#elif defined(__lzo_memops_tcheck) +#elif defined(lzo_memops_tcheck__) #define LZO_MEMOPS_COPY2(dd,ss) \ - LZO_BLOCK_BEGIN if (__lzo_memops_tcheck(lzo_memops_TU2,2,1)) { \ + LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU2,2,1)) { \ * (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss); \ } else { LZO_MEMOPS_MOVE2(dd,ss); } LZO_BLOCK_END #else @@ -3485,9 +3658,9 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4) #define LZO_MEMOPS_COPY4(dd,ss) \ * (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss) -#elif defined(__lzo_memops_tcheck) +#elif defined(lzo_memops_tcheck__) #define LZO_MEMOPS_COPY4(dd,ss) \ - LZO_BLOCK_BEGIN if (__lzo_memops_tcheck(lzo_memops_TU4,4,1)) { \ + LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU4,4,1)) { \ * (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss); \ } else { LZO_MEMOPS_MOVE4(dd,ss); } LZO_BLOCK_END #else @@ -3504,9 +3677,9 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8) #elif (LZO_OPT_UNALIGNED32) #define LZO_MEMOPS_COPY8(dd,ss) \ LZO_BLOCK_BEGIN LZO_MEMOPS_COPY4(dd,ss); LZO_MEMOPS_COPY4((lzo_memops_TU1p)(lzo_memops_TU0p)(dd)+4,(const lzo_memops_TU1p)(const lzo_memops_TU0p)(ss)+4); LZO_BLOCK_END -#elif defined(__lzo_memops_tcheck) +#elif defined(lzo_memops_tcheck__) #define LZO_MEMOPS_COPY8(dd,ss) \ - LZO_BLOCK_BEGIN if (__lzo_memops_tcheck(lzo_memops_TU8,8,1)) { \ + LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU8,8,1)) { \ * (lzo_memops_TU8p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss); \ } else { LZO_MEMOPS_MOVE8(dd,ss); } LZO_BLOCK_END #else @@ -3540,7 +3713,7 @@ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss) return v; } #if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE16(ss) * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss) +#define LZO_MEMOPS_GET_LE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss)) #else #define LZO_MEMOPS_GET_LE16(ss) lzo_memops_get_le16(ss) #endif @@ -3557,18 +3730,18 @@ __lzo_static_forceinline lzo_uint32_t lzo_memops_get_le32(const lzo_voidp ss) v = (lzo_uint32_t) vv; #else const lzo_memops_TU1p s = (const lzo_memops_TU1p) ss; - v = (lzo_uint32_t) (((lzo_uint32_t)s[0] << 24) | ((lzo_uint32_t)s[1] << 16) | ((lzo_uint32_t)s[2] << 8) | ((lzo_uint32_t)s[3])); + v = (lzo_uint32_t) (((lzo_uint32_t)s[0]) | ((lzo_uint32_t)s[1] << 8) | ((lzo_uint32_t)s[2] << 16) | ((lzo_uint32_t)s[3] << 24)); #endif return v; } #if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE32(ss) * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss) +#define LZO_MEMOPS_GET_LE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss)) #else #define LZO_MEMOPS_GET_LE32(ss) lzo_memops_get_le32(ss) #endif #if (LZO_OPT_UNALIGNED64) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE64(ss) * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss) +#define LZO_MEMOPS_GET_LE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss)) #endif __lzo_static_forceinline lzo_uint16_t lzo_memops_get_ne16(const lzo_voidp ss) @@ -3578,7 +3751,8 @@ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_ne16(const lzo_voidp ss) return v; } #if (LZO_OPT_UNALIGNED16) -#define LZO_MEMOPS_GET_NE16(ss) * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss) +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) +#define LZO_MEMOPS_GET_NE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss)) #else #define LZO_MEMOPS_GET_NE16(ss) lzo_memops_get_ne16(ss) #endif @@ -3590,13 +3764,15 @@ __lzo_static_forceinline lzo_uint32_t lzo_memops_get_ne32(const lzo_voidp ss) return v; } #if (LZO_OPT_UNALIGNED32) -#define LZO_MEMOPS_GET_NE32(ss) * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss) +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4) +#define LZO_MEMOPS_GET_NE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss)) #else #define LZO_MEMOPS_GET_NE32(ss) lzo_memops_get_ne32(ss) #endif #if (LZO_OPT_UNALIGNED64) -#define LZO_MEMOPS_GET_NE64(ss) * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss) +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8) +#define LZO_MEMOPS_GET_NE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss)) #endif __lzo_static_forceinline void lzo_memops_put_le16(lzo_voidp dd, lzo_uint16_t vv) @@ -3661,13 +3837,9 @@ __lzo_static_forceinline void lzo_memops_put_ne32(lzo_voidp dd, lzo_uint32_t vv) #define LZO_MEMOPS_PUT_NE32(dd,vv) lzo_memops_put_ne32(dd,vv) #endif -#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) -static void __attribute__((__unused__)) -#else -__lzo_static_forceinline void -#endif -lzo_memops_unused_funcs(void) +lzo_unused_funcs_impl(void, lzo_memops_unused_funcs)(void) { + LZO_UNUSED_FUNC(lzo_memops_unused_funcs); LZO_UNUSED_FUNC(lzo_memops_get_le16); LZO_UNUSED_FUNC(lzo_memops_get_le32); LZO_UNUSED_FUNC(lzo_memops_get_ne16); @@ -3676,7 +3848,6 @@ lzo_memops_unused_funcs(void) LZO_UNUSED_FUNC(lzo_memops_put_le32); LZO_UNUSED_FUNC(lzo_memops_put_ne16); LZO_UNUSED_FUNC(lzo_memops_put_ne32); - LZO_UNUSED_FUNC(lzo_memops_unused_funcs); } #endif @@ -3889,11 +4060,16 @@ __lzo_align_gap(const lzo_voidp ptr, lzo_uint size) #error "__LZO_UINTPTR_T_IS_POINTER is unsupported" #else lzo_uintptr_t p, n; + if (size < 2) return 0; p = __lzo_ptr_linear(ptr); +#if 0 n = (((p + size - 1) / size) * size) - p; +#else + if ((size & (size - 1)) != 0) + return 0; + n = size; n = ((p + n - 1) & ~(n - 1)) - p; +#endif #endif - - assert(size > 0); assert((long)n >= 0); assert(n <= size); return (unsigned)n; @@ -3906,23 +4082,25 @@ __lzo_align_gap(const lzo_voidp ptr, lzo_uint size) * keep this copyright string in the executable of your product. */ -static const char __lzo_copyright[] = +static const char lzo_copyright_[] = #if !defined(__LZO_IN_MINLZO) LZO_VERSION_STRING; #else "\r\n\n" "LZO data compression library.\n" - "$Copyright: LZO Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\n" + "$Copyright: LZO Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\n" "<markus@oberhumer.com>\n" "http://www.oberhumer.com $\n\n" "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n" "$Info: " LZO_INFO_STRING " $\n"; #endif +static const char lzo_version_string_[] = LZO_VERSION_STRING; +static const char lzo_version_date_[] = LZO_VERSION_DATE; LZO_PUBLIC(const lzo_bytep) lzo_copyright(void) { - return (const lzo_bytep) __lzo_copyright; + return (const lzo_bytep) lzo_copyright_; } LZO_PUBLIC(unsigned) @@ -3934,35 +4112,35 @@ lzo_version(void) LZO_PUBLIC(const char *) lzo_version_string(void) { - return LZO_VERSION_STRING; + return lzo_version_string_; } LZO_PUBLIC(const char *) lzo_version_date(void) { - return LZO_VERSION_DATE; + return lzo_version_date_; } LZO_PUBLIC(const lzo_charp) _lzo_version_string(void) { - return LZO_VERSION_STRING; + return lzo_version_string_; } LZO_PUBLIC(const lzo_charp) _lzo_version_date(void) { - return LZO_VERSION_DATE; + return lzo_version_date_; } #define LZO_BASE 65521u #define LZO_NMAX 5552 #define LZO_DO1(buf,i) s1 += buf[i]; s2 += s1 -#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1); -#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2); -#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4); -#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8); +#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1) +#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2) +#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4) +#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8) LZO_PUBLIC(lzo_uint32_t) lzo_adler32(lzo_uint32_t adler, const lzo_bytep buf, lzo_uint len) @@ -4164,6 +4342,14 @@ _lzo_config_check(void) r &= UA_GET_LE16(p) == 0; u.b[1] = 128; r &= UA_GET_LE16(p) == 128; + u.b[2] = 129; + r &= UA_GET_LE16(p) == LZO_UINT16_C(0x8180); +#if (LZO_ABI_BIG_ENDIAN) + r &= UA_GET_NE16(p) == LZO_UINT16_C(0x8081); +#endif +#if (LZO_ABI_LITTLE_ENDIAN) + r &= UA_GET_NE16(p) == LZO_UINT16_C(0x8180); +#endif u.a[0] = u.a[1] = 0; u.b[0] = 3; u.b[5] = 4; p = u2p(&u, 1); @@ -4171,6 +4357,14 @@ _lzo_config_check(void) r &= UA_GET_LE32(p) == 0; u.b[1] = 128; r &= UA_GET_LE32(p) == 128; + u.b[2] = 129; u.b[3] = 130; u.b[4] = 131; + r &= UA_GET_LE32(p) == LZO_UINT32_C(0x83828180); +#if (LZO_ABI_BIG_ENDIAN) + r &= UA_GET_NE32(p) == LZO_UINT32_C(0x80818283); +#endif +#if (LZO_ABI_LITTLE_ENDIAN) + r &= UA_GET_NE32(p) == LZO_UINT32_C(0x83828180); +#endif #if defined(UA_GET_NE64) u.c[0] = u.c[1] = 0; u.b[0] = 5; u.b[9] = 6; @@ -4308,7 +4502,7 @@ int __far __pascal LibMain ( int a, short b, short c, long d ) #endif #if !defined(__LZO_IN_MINILZO) -#include "lzo/lzo1x.h" +#include <lzo/lzo1x.h> #endif #ifndef LZO_EOF_CODE @@ -4500,7 +4694,7 @@ extern "C" { #if !defined(DVAL_ASSERT) #if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG) -#if (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_LLVM) +#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) static void __attribute__((__unused__)) #else static void diff --git a/main/lzo/minilzo/minilzo.h b/main/lzo/minilzo/minilzo.h index fd2fb321..e5adc6ed 100644 --- a/main/lzo/minilzo/minilzo.h +++ b/main/lzo/minilzo/minilzo.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,15 +32,25 @@ */ -#ifndef __MINILZO_H -#define __MINILZO_H 1 +#ifndef __MINILZO_H_INCLUDED +#define __MINILZO_H_INCLUDED 1 -#define MINILZO_VERSION 0x2070 +#define MINILZO_VERSION 0x2090 -#ifdef __LZOCONF_H +#if defined(__LZOCONF_H_INCLUDED) # error "you cannot use both LZO and miniLZO" #endif +/* internal Autoconf configuration file - only used when building miniLZO */ +#ifdef MINILZO_HAVE_CONFIG_H +# include <config.h> +#endif +#include <limits.h> +#include <stddef.h> + +#ifndef __LZODEFS_H_INCLUDED +#include "lzodefs.h" +#endif #undef LZO_HAVE_CONFIG_H #include "lzoconf.h" @@ -92,3 +102,5 @@ lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len, #endif /* already included */ + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/minilzo/testmini.c b/main/lzo/minilzo/testmini.c index 581943ff..f6615d72 100644 --- a/main/lzo/minilzo/testmini.c +++ b/main/lzo/minilzo/testmini.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) printf("\nLZO real-time data compression library (v%s, %s).\n", lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); + printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); /* @@ -144,7 +144,5 @@ int main(int argc, char *argv[]) return 0; } -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/compr1b.h b/main/lzo/src/compr1b.h index 32b22669..8c23fe85 100644 --- a/main/lzo/src/compr1b.h +++ b/main/lzo/src/compr1b.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -64,6 +64,5 @@ LZO_COMPRESS ( const lzo_bytep in, lzo_uint in_len, return _lzo1b_do_compress(in,in_len,out,out_len,wrkmem,do_compress); } -/* -vi:ts=4:et -*/ + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/compr1c.h b/main/lzo/src/compr1c.h index 566ba447..b5e8fb36 100644 --- a/main/lzo/src/compr1c.h +++ b/main/lzo/src/compr1c.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -64,6 +64,5 @@ LZO_COMPRESS ( const lzo_bytep in, lzo_uint in_len, return _lzo1c_do_compress(in,in_len,out,out_len,wrkmem,do_compress); } -/* -vi:ts=4:et -*/ + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/config1.h b/main/lzo/src/config1.h index 592f4737..99dd3610 100644 --- a/main/lzo/src/config1.h +++ b/main/lzo/src/config1.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ #define __LZO_CONFIG1_H 1 #include "lzo_conf.h" -#include "lzo/lzo1.h" +#include <lzo/lzo1.h> #define LZO_NO_R1 1 #include "config1a.h" @@ -43,7 +43,4 @@ #endif /* already included */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/config1a.h b/main/lzo/src/config1a.h index 3f0aa48f..c3164473 100644 --- a/main/lzo/src/config1a.h +++ b/main/lzo/src/config1a.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ #define __LZO_CONFIG1A_H 1 #include "lzo_conf.h" -#include "lzo/lzo1a.h" +#include <lzo/lzo1a.h> #undef LZO_COLLECT_STATS /* no support for stats here */ @@ -178,7 +178,5 @@ #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/config1b.h b/main/lzo/src/config1b.h index 26f47cbe..5b4e64aa 100644 --- a/main/lzo/src/config1b.h +++ b/main/lzo/src/config1b.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ #define __LZO_CONFIG1B_H 1 #include "lzo_conf.h" -#include "lzo/lzo1b.h" +#include <lzo/lzo1b.h> /*********************************************************************** @@ -122,7 +122,5 @@ #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/config1c.h b/main/lzo/src/config1c.h index a465eaf6..7a888d95 100644 --- a/main/lzo/src/config1c.h +++ b/main/lzo/src/config1c.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ #define __LZO_CONFIG1C_H 1 #include "lzo_conf.h" -#include "lzo/lzo1c.h" +#include <lzo/lzo1c.h> /*********************************************************************** @@ -127,7 +127,5 @@ #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/config1f.h b/main/lzo/src/config1f.h index 5e2a8e96..d6ca61d9 100644 --- a/main/lzo/src/config1f.h +++ b/main/lzo/src/config1f.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ #define __LZO_CONFIG1F_H 1 #include "lzo_conf.h" -#include "lzo/lzo1f.h" +#include <lzo/lzo1f.h> /*********************************************************************** @@ -79,7 +79,5 @@ #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/config1x.h b/main/lzo/src/config1x.h index cbbc1672..72ced781 100644 --- a/main/lzo/src/config1x.h +++ b/main/lzo/src/config1x.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ #include "lzo_conf.h" #if !defined(__LZO_IN_MINILZO) -#include "lzo/lzo1x.h" +#include <lzo/lzo1x.h> #endif @@ -102,7 +102,5 @@ #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/config1y.h b/main/lzo/src/config1y.h index a36dac14..33869757 100644 --- a/main/lzo/src/config1y.h +++ b/main/lzo/src/config1y.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -40,7 +40,7 @@ #endif #include "lzo_conf.h" -#include "lzo/lzo1y.h" +#include <lzo/lzo1y.h> #define M2_MAX_LEN 14 #define M2_MAX_OFFSET 0x0400 @@ -48,7 +48,5 @@ #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/config1z.h b/main/lzo/src/config1z.h index fcbc8385..e2f7a21c 100644 --- a/main/lzo/src/config1z.h +++ b/main/lzo/src/config1z.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -40,14 +40,12 @@ #endif #include "lzo_conf.h" -#include "lzo/lzo1z.h" +#include <lzo/lzo1z.h> #define M2_MAX_OFFSET 0x0700 #include "config1x.h" #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/config2a.h b/main/lzo/src/config2a.h index 16b74b03..17c8281d 100644 --- a/main/lzo/src/config2a.h +++ b/main/lzo/src/config2a.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ #define __LZO_CONFIG2A_H 1 #include "lzo_conf.h" -#include "lzo/lzo2a.h" +#include <lzo/lzo2a.h> /*********************************************************************** @@ -137,7 +137,5 @@ #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1.c b/main/lzo/src/lzo1.c index e629730c..96c159ed 100644 --- a/main/lzo/src/lzo1.c +++ b/main/lzo/src/lzo1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -27,7 +27,7 @@ #include "lzo_conf.h" -#include "lzo/lzo1.h" +#include <lzo/lzo1.h> /*********************************************************************** @@ -618,6 +618,4 @@ lzo1_compress ( const lzo_bytep in , lzo_uint in_len, } -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1_99.c b/main/lzo/src/lzo1_99.c index a0ebf369..506add27 100644 --- a/main/lzo/src/lzo1_99.c +++ b/main/lzo/src/lzo1_99.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -113,6 +113,4 @@ LZO_COMPRESS ( const lzo_bytep in, lzo_uint in_len, } -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1_cm.ch b/main/lzo/src/lzo1_cm.ch index 9e6ee32f..bfb19191 100644 --- a/main/lzo/src/lzo1_cm.ch +++ b/main/lzo/src/lzo1_cm.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -35,6 +35,4 @@ #include "lzo1a_cm.ch" -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1_d.ch b/main/lzo/src/lzo1_d.ch index e4dff04e..2e15a4a5 100644 --- a/main/lzo/src/lzo1_d.ch +++ b/main/lzo/src/lzo1_d.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -153,8 +153,4 @@ #endif - -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1a.c b/main/lzo/src/lzo1a.c index e0894f60..1af4dba1 100644 --- a/main/lzo/src/lzo1a.c +++ b/main/lzo/src/lzo1a.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -27,7 +27,7 @@ #include "lzo_conf.h" -#include "lzo/lzo1a.h" +#include <lzo/lzo1a.h> /*********************************************************************** @@ -640,6 +640,4 @@ lzo1a_compress ( const lzo_bytep in , lzo_uint in_len, } -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1a_99.c b/main/lzo/src/lzo1a_99.c index 0feddbda..75579d4f 100644 --- a/main/lzo/src/lzo1a_99.c +++ b/main/lzo/src/lzo1a_99.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -113,6 +113,4 @@ LZO_COMPRESS ( const lzo_bytep in, lzo_uint in_len, } -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1a_cm.ch b/main/lzo/src/lzo1a_cm.ch index 75289d5b..1b36e3c1 100644 --- a/main/lzo/src/lzo1a_cm.ch +++ b/main/lzo/src/lzo1a_cm.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -225,6 +225,4 @@ assert(ii == ip); -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1a_cr.ch b/main/lzo/src/lzo1a_cr.ch index cc1f7b4e..eef584b8 100644 --- a/main/lzo/src/lzo1a_cr.ch +++ b/main/lzo/src/lzo1a_cr.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -110,7 +110,5 @@ store_run(lzo_bytep const oo, const lzo_bytep const ii, lzo_uint r_len) #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1a_de.h b/main/lzo/src/lzo1a_de.h index 28c4be74..aaa01377 100644 --- a/main/lzo/src/lzo1a_de.h +++ b/main/lzo/src/lzo1a_de.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -140,7 +140,5 @@ RBITS | MBITS MIN THR. MSIZE MAXS MINL MAXL MAXO R0MAX R0FAST #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_1.c b/main/lzo/src/lzo1b_1.c index 7dfa93a5..101adba9 100644 --- a/main/lzo/src/lzo1b_1.c +++ b/main/lzo/src/lzo1b_1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 1 #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_2.c b/main/lzo/src/lzo1b_2.c index cfe8adf2..933bebb1 100644 --- a/main/lzo/src/lzo1b_2.c +++ b/main/lzo/src/lzo1b_2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 2 #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_3.c b/main/lzo/src/lzo1b_3.c index b1059950..0d070eaf 100644 --- a/main/lzo/src/lzo1b_3.c +++ b/main/lzo/src/lzo1b_3.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 3 #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_4.c b/main/lzo/src/lzo1b_4.c index c666d6d1..17be356d 100644 --- a/main/lzo/src/lzo1b_4.c +++ b/main/lzo/src/lzo1b_4.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 2 #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_5.c b/main/lzo/src/lzo1b_5.c index 67e9facd..920dbf1a 100644 --- a/main/lzo/src/lzo1b_5.c +++ b/main/lzo/src/lzo1b_5.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 3 #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_6.c b/main/lzo/src/lzo1b_6.c index bdbcce8c..114aadd4 100644 --- a/main/lzo/src/lzo1b_6.c +++ b/main/lzo/src/lzo1b_6.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 5 #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_7.c b/main/lzo/src/lzo1b_7.c index 1d415e05..9f5e6d79 100644 --- a/main/lzo/src/lzo1b_7.c +++ b/main/lzo/src/lzo1b_7.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 3 #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_8.c b/main/lzo/src/lzo1b_8.c index a0cb8e12..94d20427 100644 --- a/main/lzo/src/lzo1b_8.c +++ b/main/lzo/src/lzo1b_8.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 8 #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_9.c b/main/lzo/src/lzo1b_9.c index 9eb51d60..2d0532d2 100644 --- a/main/lzo/src/lzo1b_9.c +++ b/main/lzo/src/lzo1b_9.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 9 #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_99.c b/main/lzo/src/lzo1b_99.c index b39e145f..570f2b08 100644 --- a/main/lzo/src/lzo1b_99.c +++ b/main/lzo/src/lzo1b_99.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -35,3 +35,4 @@ #define MATCH_IP_END in_end #include "compr1b.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_9x.c b/main/lzo/src/lzo1b_9x.c index b1c9a1bd..285caad1 100644 --- a/main/lzo/src/lzo1b_9x.c +++ b/main/lzo/src/lzo1b_9x.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -347,7 +347,4 @@ lzo1b_999_compress ( const lzo_bytep in , lzo_uint in_len, } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_c.ch b/main/lzo/src/lzo1b_c.ch index 4fb79d46..f13a8124 100644 --- a/main/lzo/src/lzo1b_c.ch +++ b/main/lzo/src/lzo1b_c.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -259,6 +259,4 @@ match: #endif -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_cc.c b/main/lzo/src/lzo1b_cc.c index cf597d52..c3318ce7 100644 --- a/main/lzo/src/lzo1b_cc.c +++ b/main/lzo/src/lzo1b_cc.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -34,10 +34,11 @@ // compression internal entry point. ************************************************************************/ -int _lzo1b_do_compress ( const lzo_bytep in, lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem, - lzo_compress_t func ) +LZO_LOCAL_IMPL(int) +_lzo1b_do_compress ( const lzo_bytep in, lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem, + lzo_compress_t func ) { int r; #if defined(LZO_TEST_COMPRESS_OVERRUN) @@ -149,7 +150,4 @@ void _lzo1b_stats_calc(lzo_stats_t *lzo_stats) #endif -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_cc.h b/main/lzo/src/lzo1b_cc.h index d92a095f..403025fd 100644 --- a/main/lzo/src/lzo1b_cc.h +++ b/main/lzo/src/lzo1b_cc.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -57,25 +57,21 @@ extern const lzo_compress_t _lzo1b_99_compress_func; // ************************************************************************/ -LZO_EXTERN(lzo_bytep ) +LZO_LOCAL_DECL(lzo_bytep ) _lzo1b_store_run ( lzo_bytep const oo, const lzo_bytep const ii, lzo_uint r_len); #define STORE_RUN _lzo1b_store_run -lzo_compress_t _lzo1b_get_compress_func(int clevel); - -int _lzo1b_do_compress ( const lzo_bytep in, lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem, - lzo_compress_t func ); +LZO_LOCAL_DECL(int) +_lzo1b_do_compress ( const lzo_bytep in, lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem, + lzo_compress_t func ); #endif /* already included */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_cm.ch b/main/lzo/src/lzo1b_cm.ch index 2a90b509..ccfa869f 100644 --- a/main/lzo/src/lzo1b_cm.ch +++ b/main/lzo/src/lzo1b_cm.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -277,6 +277,4 @@ assert(ii == ip); -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_cr.ch b/main/lzo/src/lzo1b_cr.ch index faf12e2a..844ce94c 100644 --- a/main/lzo/src/lzo1b_cr.ch +++ b/main/lzo/src/lzo1b_cr.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -109,6 +109,4 @@ assert(ii == ip); -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_d.ch b/main/lzo/src/lzo1b_d.ch index cf253573..4fe164f7 100644 --- a/main/lzo/src/lzo1b_d.ch +++ b/main/lzo/src/lzo1b_d.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -265,7 +265,4 @@ lookbehind_overrun: } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_d1.c b/main/lzo/src/lzo1b_d1.c index cd52b250..190eaa2f 100644 --- a/main/lzo/src/lzo1b_d1.c +++ b/main/lzo/src/lzo1b_d1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo1b_decompress #include "lzo1b_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_d2.c b/main/lzo/src/lzo1b_d2.c index 879b4aef..98a2704a 100644 --- a/main/lzo/src/lzo1b_d2.c +++ b/main/lzo/src/lzo1b_d2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo1b_decompress_safe #include "lzo1b_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_de.h b/main/lzo/src/lzo1b_de.h index c88ee614..cf5abe9d 100644 --- a/main/lzo/src/lzo1b_de.h +++ b/main/lzo/src/lzo1b_de.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -326,7 +326,5 @@ extern "C" { #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_r.ch b/main/lzo/src/lzo1b_r.ch index d6ca5fa2..827a67de 100644 --- a/main/lzo/src/lzo1b_r.ch +++ b/main/lzo/src/lzo1b_r.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ // store a literal run (internal) ************************************************************************/ -LZO_PUBLIC(lzo_bytep ) +LZO_LOCAL_IMPL(lzo_bytep ) STORE_RUN ( lzo_bytep const oo, const lzo_bytep const ii, lzo_uint r_len) { lzo_bytep op; @@ -99,7 +99,4 @@ STORE_RUN ( lzo_bytep const oo, const lzo_bytep const ii, lzo_uint r_len) } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_rr.c b/main/lzo/src/lzo1b_rr.c index 6442ea85..c91bbeca 100644 --- a/main/lzo/src/lzo1b_rr.c +++ b/main/lzo/src/lzo1b_rr.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -29,3 +29,5 @@ #include "config1b.h" #include "lzo1b_r.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_sm.ch b/main/lzo/src/lzo1b_sm.ch index 032ec41b..06a83e29 100644 --- a/main/lzo/src/lzo1b_sm.ch +++ b/main/lzo/src/lzo1b_sm.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -193,6 +193,4 @@ #endif /* (DD_BITS == 0) */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_tm.ch b/main/lzo/src/lzo1b_tm.ch index 96b96f00..a2da025d 100644 --- a/main/lzo/src/lzo1b_tm.ch +++ b/main/lzo/src/lzo1b_tm.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -81,7 +81,4 @@ try_match: #endif /* (DD_BITS == 0) */ - -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1b_xx.c b/main/lzo/src/lzo1b_xx.c index 21eec0aa..56f30066 100644 --- a/main/lzo/src/lzo1b_xx.c +++ b/main/lzo/src/lzo1b_xx.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ static const lzo_compress_t * const c_funcs [9] = }; -lzo_compress_t _lzo1b_get_compress_func(int clevel) +static lzo_compress_t lzo1b_get_compress_func(int clevel) { const lzo_compress_t *f; @@ -56,7 +56,7 @@ lzo_compress_t _lzo1b_get_compress_func(int clevel) if (clevel == LZO1B_DEFAULT_COMPRESSION) clevel = LZO1B_BEST_SPEED; else - return 0; + return (lzo_compress_t) 0; } f = c_funcs[clevel-1]; assert(f && *f); @@ -72,15 +72,11 @@ lzo1b_compress ( const lzo_bytep src, lzo_uint src_len, { lzo_compress_t f; - f = _lzo1b_get_compress_func(clevel); + f = lzo1b_get_compress_func(clevel); if (!f) return LZO_E_ERROR; return _lzo1b_do_compress(src,src_len,dst,dst_len,wrkmem,f); } - -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_1.c b/main/lzo/src/lzo1c_1.c index fa9ae7d6..28c3f0c2 100644 --- a/main/lzo/src/lzo1c_1.c +++ b/main/lzo/src/lzo1c_1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 1 #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_2.c b/main/lzo/src/lzo1c_2.c index eb48954e..fa09d31a 100644 --- a/main/lzo/src/lzo1c_2.c +++ b/main/lzo/src/lzo1c_2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 2 #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_3.c b/main/lzo/src/lzo1c_3.c index cd6b861d..c8faa165 100644 --- a/main/lzo/src/lzo1c_3.c +++ b/main/lzo/src/lzo1c_3.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 3 #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_4.c b/main/lzo/src/lzo1c_4.c index 81eafa5f..ca772d93 100644 --- a/main/lzo/src/lzo1c_4.c +++ b/main/lzo/src/lzo1c_4.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 2 #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_5.c b/main/lzo/src/lzo1c_5.c index b2fa252a..7e8c546b 100644 --- a/main/lzo/src/lzo1c_5.c +++ b/main/lzo/src/lzo1c_5.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 3 #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_6.c b/main/lzo/src/lzo1c_6.c index 44760049..632b8c0f 100644 --- a/main/lzo/src/lzo1c_6.c +++ b/main/lzo/src/lzo1c_6.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 5 #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_7.c b/main/lzo/src/lzo1c_7.c index 0b16c07d..ad8a6abb 100644 --- a/main/lzo/src/lzo1c_7.c +++ b/main/lzo/src/lzo1c_7.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 3 #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_8.c b/main/lzo/src/lzo1c_8.c index 727f2fc1..abb2b497 100644 --- a/main/lzo/src/lzo1c_8.c +++ b/main/lzo/src/lzo1c_8.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 8 #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_9.c b/main/lzo/src/lzo1c_9.c index 6705bd7d..abbd0a1f 100644 --- a/main/lzo/src/lzo1c_9.c +++ b/main/lzo/src/lzo1c_9.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,4 @@ #define CLEVEL 9 #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_99.c b/main/lzo/src/lzo1c_99.c index bec243b0..c583e83f 100644 --- a/main/lzo/src/lzo1c_99.c +++ b/main/lzo/src/lzo1c_99.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -35,3 +35,4 @@ #define MATCH_IP_END in_end #include "compr1c.h" +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_9x.c b/main/lzo/src/lzo1c_9x.c index 9a7d6d0e..cbc4e514 100644 --- a/main/lzo/src/lzo1c_9x.c +++ b/main/lzo/src/lzo1c_9x.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -361,7 +361,4 @@ lzo1c_999_compress ( const lzo_bytep in , lzo_uint in_len, } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_cc.c b/main/lzo/src/lzo1c_cc.c index f6999dba..f7044250 100644 --- a/main/lzo/src/lzo1c_cc.c +++ b/main/lzo/src/lzo1c_cc.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -34,10 +34,11 @@ // compression internal entry point. ************************************************************************/ -int _lzo1c_do_compress ( const lzo_bytep in, lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem, - lzo_compress_t func ) +LZO_LOCAL_IMPL(int) +_lzo1c_do_compress ( const lzo_bytep in, lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem, + lzo_compress_t func ) { int r; #if defined(LZO_TEST_COMPRESS_OVERRUN) @@ -149,7 +150,4 @@ void _lzo1c_stats_calc(lzo_stats_t *lzo_stats) #endif -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_cc.h b/main/lzo/src/lzo1c_cc.h index ff63ff06..f8b7d830 100644 --- a/main/lzo/src/lzo1c_cc.h +++ b/main/lzo/src/lzo1c_cc.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -57,25 +57,21 @@ extern const lzo_compress_t _lzo1c_99_compress_func; // ************************************************************************/ -LZO_EXTERN(lzo_bytep ) +LZO_LOCAL_DECL(lzo_bytep ) _lzo1c_store_run ( lzo_bytep const oo, const lzo_bytep const ii, lzo_uint r_len); #define STORE_RUN _lzo1c_store_run -lzo_compress_t _lzo1c_get_compress_func(int clevel); - -int _lzo1c_do_compress ( const lzo_bytep in, lzo_uint in_len, - lzo_bytep out, lzo_uintp out_len, - lzo_voidp wrkmem, - lzo_compress_t func ); +LZO_LOCAL_DECL(int) +_lzo1c_do_compress ( const lzo_bytep in, lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem, + lzo_compress_t func ); #endif /* already included */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_d1.c b/main/lzo/src/lzo1c_d1.c index 63b6eaf4..e3fec206 100644 --- a/main/lzo/src/lzo1c_d1.c +++ b/main/lzo/src/lzo1c_d1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo1c_decompress #include "lzo1b_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_d2.c b/main/lzo/src/lzo1c_d2.c index 64bc8e62..fa83cdda 100644 --- a/main/lzo/src/lzo1c_d2.c +++ b/main/lzo/src/lzo1c_d2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -46,3 +46,5 @@ LZO_PUBLIC(int) lzo1c_decompress_asm_safe return lzo1c_decompress_safe(src, src_len, dst, dst_len, wrkmem); } #endif + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_rr.c b/main/lzo/src/lzo1c_rr.c index 860d36e1..7851fa43 100644 --- a/main/lzo/src/lzo1c_rr.c +++ b/main/lzo/src/lzo1c_rr.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -29,3 +29,5 @@ #include "config1c.h" #include "lzo1b_r.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1c_xx.c b/main/lzo/src/lzo1c_xx.c index 7a0e5940..8b46509d 100644 --- a/main/lzo/src/lzo1c_xx.c +++ b/main/lzo/src/lzo1c_xx.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ static const lzo_compress_t * const c_funcs [9] = }; -lzo_compress_t _lzo1c_get_compress_func(int clevel) +static lzo_compress_t lzo1c_get_compress_func(int clevel) { const lzo_compress_t *f; @@ -56,7 +56,7 @@ lzo_compress_t _lzo1c_get_compress_func(int clevel) if (clevel == LZO1C_DEFAULT_COMPRESSION) clevel = LZO1C_BEST_SPEED; else - return 0; + return (lzo_compress_t) 0; } f = c_funcs[clevel-1]; assert(f && *f); @@ -72,15 +72,11 @@ lzo1c_compress ( const lzo_bytep src, lzo_uint src_len, { lzo_compress_t f; - f = _lzo1c_get_compress_func(clevel); + f = lzo1c_get_compress_func(clevel); if (!f) return LZO_E_ERROR; return _lzo1c_do_compress(src,src_len,dst,dst_len,wrkmem,f); } - -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1f_1.c b/main/lzo/src/lzo1f_1.c index 0f8612e4..44a138c8 100644 --- a/main/lzo/src/lzo1f_1.c +++ b/main/lzo/src/lzo1f_1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -27,7 +27,7 @@ #include "lzo_conf.h" -#include "lzo/lzo1f.h" +#include <lzo/lzo1f.h> /*********************************************************************** @@ -298,7 +298,4 @@ lzo1f_1_compress ( const lzo_bytep in , lzo_uint in_len, } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1f_9x.c b/main/lzo/src/lzo1f_9x.c index eb78d8cb..353aca0a 100644 --- a/main/lzo/src/lzo1f_9x.c +++ b/main/lzo/src/lzo1f_9x.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -327,7 +327,4 @@ lzo1f_999_compress ( const lzo_bytep in , lzo_uint in_len, } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1f_d.ch b/main/lzo/src/lzo1f_d.ch index b22916e5..c5093c19 100644 --- a/main/lzo/src/lzo1f_d.ch +++ b/main/lzo/src/lzo1f_d.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -207,7 +207,4 @@ lookbehind_overrun: } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1f_d1.c b/main/lzo/src/lzo1f_d1.c index 0c505584..278fb680 100644 --- a/main/lzo/src/lzo1f_d1.c +++ b/main/lzo/src/lzo1f_d1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo1f_decompress #include "lzo1f_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1f_d2.c b/main/lzo/src/lzo1f_d2.c index b762a7af..f98f8556 100644 --- a/main/lzo/src/lzo1f_d2.c +++ b/main/lzo/src/lzo1f_d2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -46,3 +46,5 @@ LZO_PUBLIC(int) lzo1f_decompress_asm_fast_safe return lzo1f_decompress_safe(src, src_len, dst, dst_len, wrkmem); } #endif + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_1.c b/main/lzo/src/lzo1x_1.c index 2bdecce0..2c6cb46d 100644 --- a/main/lzo/src/lzo1x_1.c +++ b/main/lzo/src/lzo1x_1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -53,3 +53,5 @@ #endif #include "lzo1x_c.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_1k.c b/main/lzo/src/lzo1x_1k.c index cbfa2344..74291c0e 100644 --- a/main/lzo/src/lzo1x_1k.c +++ b/main/lzo/src/lzo1x_1k.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -53,3 +53,5 @@ #endif #include "lzo1x_c.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_1l.c b/main/lzo/src/lzo1x_1l.c index ee857bce..6fa81fd7 100644 --- a/main/lzo/src/lzo1x_1l.c +++ b/main/lzo/src/lzo1x_1l.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -53,3 +53,5 @@ #endif #include "lzo1x_c.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_1o.c b/main/lzo/src/lzo1x_1o.c index 28fdaffc..8fd85842 100644 --- a/main/lzo/src/lzo1x_1o.c +++ b/main/lzo/src/lzo1x_1o.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -54,3 +54,5 @@ #endif #include "lzo1x_c.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_9x.c b/main/lzo/src/lzo1x_9x.c index 9de75df0..4432e48d 100644 --- a/main/lzo/src/lzo1x_9x.c +++ b/main/lzo/src/lzo1x_9x.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -109,7 +109,7 @@ code_match ( LZO_COMPRESS_T *c, lzo_bytep op, lzo_uint m_len, lzo_uint m_off ) lzo_uint x_len = m_len; lzo_uint x_off = m_off; - c->match_bytes += (unsigned long) m_len; + c->match_bytes += m_len; #if 0 /* @@ -265,7 +265,7 @@ code_match ( LZO_COMPRESS_T *c, lzo_bytep op, lzo_uint m_len, lzo_uint m_off ) static lzo_bytep STORE_RUN ( LZO_COMPRESS_T *c, lzo_bytep op, const lzo_bytep ii, lzo_uint t ) { - c->lit_bytes += (unsigned long) t; + c->lit_bytes += t; if (op == c->out && t <= 238) { @@ -864,7 +864,4 @@ lzo1x_999_compress ( const lzo_bytep in , lzo_uint in_len, } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_c.ch b/main/lzo/src/lzo1x_c.ch index 805f71d3..562e0b14 100644 --- a/main/lzo/src/lzo1x_c.ch +++ b/main/lzo/src/lzo1x_c.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -400,6 +400,4 @@ DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len, } -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_d.ch b/main/lzo/src/lzo1x_d.ch index aa0a8e08..5107f5fd 100644 --- a/main/lzo/src/lzo1x_d.ch +++ b/main/lzo/src/lzo1x_d.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -472,7 +472,4 @@ lookbehind_overrun: } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_d1.c b/main/lzo/src/lzo1x_d1.c index 2342afdb..b31f6de1 100644 --- a/main/lzo/src/lzo1x_d1.c +++ b/main/lzo/src/lzo1x_d1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo1x_decompress #include "lzo1x_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_d2.c b/main/lzo/src/lzo1x_d2.c index 477522cb..abe94632 100644 --- a/main/lzo/src/lzo1x_d2.c +++ b/main/lzo/src/lzo1x_d2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -57,3 +57,5 @@ LZO_PUBLIC(int) lzo1x_decompress_asm_fast_safe return lzo1x_decompress_safe(src, src_len, dst, dst_len, wrkmem); } #endif + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_d3.c b/main/lzo/src/lzo1x_d3.c index 8da06923..8bde36fb 100644 --- a/main/lzo/src/lzo1x_d3.c +++ b/main/lzo/src/lzo1x_d3.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -90,7 +90,4 @@ lzo1x_decompress_dict_safe ( const lzo_bytep in, lzo_uint in_len, #include "lzo1x_d.ch" -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_o.c b/main/lzo/src/lzo1x_o.c index 5b3dbafd..be596a77 100644 --- a/main/lzo/src/lzo1x_o.c +++ b/main/lzo/src/lzo1x_o.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -31,3 +31,5 @@ #define DO_OPTIMIZE lzo1x_optimize #include "lzo1x_oo.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1x_oo.ch b/main/lzo/src/lzo1x_oo.ch index ebb406ff..82871bbb 100644 --- a/main/lzo/src/lzo1x_oo.ch +++ b/main/lzo/src/lzo1x_oo.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -349,7 +349,4 @@ eof_found: } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1y_1.c b/main/lzo/src/lzo1y_1.c index dfa4487a..5e1186b7 100644 --- a/main/lzo/src/lzo1y_1.c +++ b/main/lzo/src/lzo1y_1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -53,3 +53,5 @@ #endif #include "lzo1x_c.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1y_9x.c b/main/lzo/src/lzo1y_9x.c index 464d849e..d905a17c 100644 --- a/main/lzo/src/lzo1y_9x.c +++ b/main/lzo/src/lzo1y_9x.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -28,3 +28,5 @@ #define LZO1Y 1 #include "lzo1x_9x.c" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1y_d1.c b/main/lzo/src/lzo1y_d1.c index e10877e7..78e372cc 100644 --- a/main/lzo/src/lzo1y_d1.c +++ b/main/lzo/src/lzo1y_d1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo1y_decompress #include "lzo1x_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1y_d2.c b/main/lzo/src/lzo1y_d2.c index 0aeeec6e..2f14724e 100644 --- a/main/lzo/src/lzo1y_d2.c +++ b/main/lzo/src/lzo1y_d2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -57,3 +57,5 @@ LZO_PUBLIC(int) lzo1y_decompress_asm_fast_safe return lzo1y_decompress_safe(src, src_len, dst, dst_len, wrkmem); } #endif + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1y_d3.c b/main/lzo/src/lzo1y_d3.c index 494a5f52..9c617500 100644 --- a/main/lzo/src/lzo1y_d3.c +++ b/main/lzo/src/lzo1y_d3.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -31,3 +31,5 @@ #define lzo1x_decompress_dict_safe lzo1y_decompress_dict_safe #include "lzo1x_d3.c" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1y_o.c b/main/lzo/src/lzo1y_o.c index 27abd469..f6d2c0a6 100644 --- a/main/lzo/src/lzo1y_o.c +++ b/main/lzo/src/lzo1y_o.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -31,3 +31,5 @@ #define DO_OPTIMIZE lzo1y_optimize #include "lzo1x_oo.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1z_9x.c b/main/lzo/src/lzo1z_9x.c index 579b161a..8914dafc 100644 --- a/main/lzo/src/lzo1z_9x.c +++ b/main/lzo/src/lzo1z_9x.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -28,3 +28,5 @@ #define LZO1Z 1 #include "lzo1x_9x.c" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1z_d1.c b/main/lzo/src/lzo1z_d1.c index 81cc02ac..53d4dbce 100644 --- a/main/lzo/src/lzo1z_d1.c +++ b/main/lzo/src/lzo1z_d1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo1z_decompress #include "lzo1x_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1z_d2.c b/main/lzo/src/lzo1z_d2.c index 2a132e61..bb213640 100644 --- a/main/lzo/src/lzo1z_d2.c +++ b/main/lzo/src/lzo1z_d2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo1z_decompress_safe #include "lzo1x_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo1z_d3.c b/main/lzo/src/lzo1z_d3.c index d82dc324..784bb7f7 100644 --- a/main/lzo/src/lzo1z_d3.c +++ b/main/lzo/src/lzo1z_d3.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -31,3 +31,5 @@ #define lzo1x_decompress_dict_safe lzo1z_decompress_dict_safe #include "lzo1x_d3.c" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo2a_9x.c b/main/lzo/src/lzo2a_9x.c index 2fec38c2..0e14916f 100644 --- a/main/lzo/src/lzo2a_9x.c +++ b/main/lzo/src/lzo2a_9x.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -343,7 +343,4 @@ lzo2a_999_compress ( const lzo_bytep in , lzo_uint in_len, } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo2a_d.ch b/main/lzo/src/lzo2a_d.ch index 1f4acf12..dcd2b54c 100644 --- a/main/lzo/src/lzo2a_d.ch +++ b/main/lzo/src/lzo2a_d.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -171,7 +171,4 @@ lookbehind_overrun: } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo2a_d1.c b/main/lzo/src/lzo2a_d1.c index a32f4cd4..5694738b 100644 --- a/main/lzo/src/lzo2a_d1.c +++ b/main/lzo/src/lzo2a_d1.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo2a_decompress #include "lzo2a_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo2a_d2.c b/main/lzo/src/lzo2a_d2.c index c3c3bed3..5bf1a219 100644 --- a/main/lzo/src/lzo2a_d2.c +++ b/main/lzo/src/lzo2a_d2.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -32,3 +32,5 @@ #define DO_DECOMPRESS lzo2a_decompress_safe #include "lzo2a_d.ch" + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_conf.h b/main/lzo/src/lzo_conf.h index 3543b140..06901817 100644 --- a/main/lzo/src/lzo_conf.h +++ b/main/lzo/src/lzo_conf.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -46,13 +46,26 @@ #if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED) # error "include this file first" #endif -#include "lzo/lzoconf.h" +#if defined(LZO_CFG_BUILD_DLL) && (LZO_CFG_BUILD_DLL+0) && !defined(__LZO_EXPORT1) && !defined(__LZO_EXPORT2) && 0 + /* idea: we could auto-define __LZO_EXPORT1 for DLL exports */ +#ifndef __LZODEFS_H_INCLUDED +#if defined(LZO_HAVE_CONFIG_H) +# include <config.h> +#endif +#include <limits.h> +#include <stddef.h> +#include <lzo/lzodefs.h> +#endif + /* #define __LZO_EXPORT1 __attribute__((__visibility__("default"))) */ + /* #define __LZO_EXPORT1 __declspec(dllexport) */ +#endif +#include <lzo/lzoconf.h> #if defined(LZO_CFG_EXTRA_CONFIG_HEADER2) # include LZO_CFG_EXTRA_CONFIG_HEADER2 #endif -#endif +#endif /* !defined(__LZO_IN_MINILZO) */ -#if (LZO_VERSION < 0x2070) || !defined(__LZOCONF_H_INCLUDED) +#if !defined(__LZOCONF_H_INCLUDED) || (LZO_VERSION+0 != 0x2090) # error "version mismatch" #endif @@ -78,6 +91,10 @@ /* disable '-Wall' warnings in system header files */ # pragma warning(disable: 4746) #endif +#if (LZO_CC_INTELC && (__INTEL_COMPILER >= 900)) + /* disable pedantic warnings in system header files */ +# pragma warning(disable: 1684) +#endif #if (LZO_CC_SUNPROC) #if !defined(__cplusplus) @@ -89,6 +106,37 @@ /*********************************************************************** +// function types +************************************************************************/ + +#if !defined(__LZO_NOEXPORT1) +# define __LZO_NOEXPORT1 /*empty*/ +#endif +#if !defined(__LZO_NOEXPORT2) +# define __LZO_NOEXPORT2 /*empty*/ +#endif + +#if 1 +# define LZO_PUBLIC_DECL(r) LZO_EXTERN(r) +#endif +#if 1 +# define LZO_PUBLIC_IMPL(r) LZO_PUBLIC(r) +#endif +#if !defined(LZO_LOCAL_DECL) +# define LZO_LOCAL_DECL(r) __LZO_EXTERN_C LZO_LOCAL_IMPL(r) +#endif +#if !defined(LZO_LOCAL_IMPL) +# define LZO_LOCAL_IMPL(r) __LZO_NOEXPORT1 r __LZO_NOEXPORT2 __LZO_CDECL +#endif +#if 1 +# define LZO_STATIC_DECL(r) LZO_PRIVATE(r) +#endif +#if 1 +# define LZO_STATIC_IMPL(r) LZO_PRIVATE(r) +#endif + + +/*********************************************************************** // ************************************************************************/ @@ -384,7 +432,5 @@ LZO_EXTERN(const lzo_bytep) lzo_copyright(void); #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_crc.c b/main/lzo/src/lzo_crc.c index adb72381..b35ec234 100644 --- a/main/lzo/src/lzo_crc.c +++ b/main/lzo/src/lzo_crc.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -105,10 +105,10 @@ lzo_get_crc32_table(void) #define LZO_DO1(buf,i) \ crc = table[(unsigned char)((unsigned char)crc ^ buf[i])] ^ (crc >> 8) #endif -#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1); -#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2); -#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4); -#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8); +#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1) +#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2) +#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4) +#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8) LZO_PUBLIC(lzo_uint32_t) @@ -150,6 +150,4 @@ lzo_crc32(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len) #undef LZO_DO16 -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_dict.h b/main/lzo/src/lzo_dict.h index c3dd52bf..68ec43ff 100644 --- a/main/lzo/src/lzo_dict.h +++ b/main/lzo/src/lzo_dict.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -207,7 +207,7 @@ extern "C" { #if !defined(DVAL_ASSERT) #if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG) -#if (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_LLVM) +#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) static void __attribute__((__unused__)) #else static void @@ -303,7 +303,5 @@ DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_dll.ch b/main/lzo/src/lzo_dll.ch index 3b80edff..6fda0bc0 100644 --- a/main/lzo/src/lzo_dll.ch +++ b/main/lzo/src/lzo_dll.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -47,6 +47,4 @@ int __far __pascal LibMain ( int a, short b, short c, long d ) #endif -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_func.h b/main/lzo/src/lzo_func.h index f11f2ae3..3c204da9 100644 --- a/main/lzo/src/lzo_func.h +++ b/main/lzo/src/lzo_func.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -74,6 +74,9 @@ __lzo_static_forceinline unsigned lzo_bitops_ctlz32_func(lzo_uint32_t v) #elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_INT == 4) unsigned r; r = (unsigned) __builtin_clz(v); return r; #define lzo_bitops_ctlz32(v) ((unsigned) __builtin_clz(v)) +#elif (LZO_BITOPS_USE_GNUC_BITSCAN) && (LZO_SIZEOF_LONG == 8) && (LZO_WORDSIZE >= 8) + unsigned r; r = (unsigned) __builtin_clzl(v); return r ^ 32; +#define lzo_bitops_ctlz32(v) (((unsigned) __builtin_clzl(v)) ^ 32) #else LZO_UNUSED(v); return 0; #endif @@ -143,20 +146,15 @@ __lzo_static_forceinline unsigned lzo_bitops_cttz64_func(lzo_uint64_t v) } #endif -#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) -static void __attribute__((__unused__)) -#else -__lzo_static_forceinline void -#endif -lzo_bitops_unused_funcs(void) +lzo_unused_funcs_impl(void, lzo_bitops_unused_funcs)(void) { + LZO_UNUSED_FUNC(lzo_bitops_unused_funcs); LZO_UNUSED_FUNC(lzo_bitops_ctlz32_func); LZO_UNUSED_FUNC(lzo_bitops_cttz32_func); #if defined(lzo_uint64_t) LZO_UNUSED_FUNC(lzo_bitops_ctlz64_func); LZO_UNUSED_FUNC(lzo_bitops_cttz64_func); #endif - LZO_UNUSED_FUNC(lzo_bitops_unused_funcs); } @@ -165,8 +163,9 @@ lzo_bitops_unused_funcs(void) ************************************************************************/ #if defined(__lzo_alignof) && !(LZO_CFG_NO_UNALIGNED) -#ifndef __lzo_memops_tcheck -#define __lzo_memops_tcheck(t,a,b) ((void)0, sizeof(t) == (a) && __lzo_alignof(t) == (b)) +/* CBUG: disabled because of gcc bug 64516 */ +#if !defined(lzo_memops_tcheck__) && 0 +#define lzo_memops_tcheck__(t,a,b) ((void)0, sizeof(t) == (a) && __lzo_alignof(t) == (b)) #endif #endif #ifndef lzo_memops_TU0p @@ -283,9 +282,9 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU1p)0)==1) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) #define LZO_MEMOPS_COPY2(dd,ss) \ * (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss) -#elif defined(__lzo_memops_tcheck) +#elif defined(lzo_memops_tcheck__) #define LZO_MEMOPS_COPY2(dd,ss) \ - LZO_BLOCK_BEGIN if (__lzo_memops_tcheck(lzo_memops_TU2,2,1)) { \ + LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU2,2,1)) { \ * (lzo_memops_TU2p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss); \ } else { LZO_MEMOPS_MOVE2(dd,ss); } LZO_BLOCK_END #else @@ -295,9 +294,9 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4) #define LZO_MEMOPS_COPY4(dd,ss) \ * (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss) -#elif defined(__lzo_memops_tcheck) +#elif defined(lzo_memops_tcheck__) #define LZO_MEMOPS_COPY4(dd,ss) \ - LZO_BLOCK_BEGIN if (__lzo_memops_tcheck(lzo_memops_TU4,4,1)) { \ + LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU4,4,1)) { \ * (lzo_memops_TU4p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss); \ } else { LZO_MEMOPS_MOVE4(dd,ss); } LZO_BLOCK_END #else @@ -314,9 +313,9 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8) #elif (LZO_OPT_UNALIGNED32) #define LZO_MEMOPS_COPY8(dd,ss) \ LZO_BLOCK_BEGIN LZO_MEMOPS_COPY4(dd,ss); LZO_MEMOPS_COPY4((lzo_memops_TU1p)(lzo_memops_TU0p)(dd)+4,(const lzo_memops_TU1p)(const lzo_memops_TU0p)(ss)+4); LZO_BLOCK_END -#elif defined(__lzo_memops_tcheck) +#elif defined(lzo_memops_tcheck__) #define LZO_MEMOPS_COPY8(dd,ss) \ - LZO_BLOCK_BEGIN if (__lzo_memops_tcheck(lzo_memops_TU8,8,1)) { \ + LZO_BLOCK_BEGIN if (lzo_memops_tcheck__(lzo_memops_TU8,8,1)) { \ * (lzo_memops_TU8p) (lzo_memops_TU0p) (dd) = * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss); \ } else { LZO_MEMOPS_MOVE8(dd,ss); } LZO_BLOCK_END #else @@ -350,7 +349,7 @@ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss) return v; } #if (LZO_OPT_UNALIGNED16) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE16(ss) * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss) +#define LZO_MEMOPS_GET_LE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss)) #else #define LZO_MEMOPS_GET_LE16(ss) lzo_memops_get_le16(ss) #endif @@ -367,18 +366,18 @@ __lzo_static_forceinline lzo_uint32_t lzo_memops_get_le32(const lzo_voidp ss) v = (lzo_uint32_t) vv; #else const lzo_memops_TU1p s = (const lzo_memops_TU1p) ss; - v = (lzo_uint32_t) (((lzo_uint32_t)s[0] << 24) | ((lzo_uint32_t)s[1] << 16) | ((lzo_uint32_t)s[2] << 8) | ((lzo_uint32_t)s[3])); + v = (lzo_uint32_t) (((lzo_uint32_t)s[0]) | ((lzo_uint32_t)s[1] << 8) | ((lzo_uint32_t)s[2] << 16) | ((lzo_uint32_t)s[3] << 24)); #endif return v; } #if (LZO_OPT_UNALIGNED32) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE32(ss) * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss) +#define LZO_MEMOPS_GET_LE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss)) #else #define LZO_MEMOPS_GET_LE32(ss) lzo_memops_get_le32(ss) #endif #if (LZO_OPT_UNALIGNED64) && (LZO_ABI_LITTLE_ENDIAN) -#define LZO_MEMOPS_GET_LE64(ss) * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss) +#define LZO_MEMOPS_GET_LE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss)) #endif __lzo_static_forceinline lzo_uint16_t lzo_memops_get_ne16(const lzo_voidp ss) @@ -388,7 +387,8 @@ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_ne16(const lzo_voidp ss) return v; } #if (LZO_OPT_UNALIGNED16) -#define LZO_MEMOPS_GET_NE16(ss) * (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss) +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU2p)0)==2) +#define LZO_MEMOPS_GET_NE16(ss) (* (const lzo_memops_TU2p) (const lzo_memops_TU0p) (ss)) #else #define LZO_MEMOPS_GET_NE16(ss) lzo_memops_get_ne16(ss) #endif @@ -400,13 +400,15 @@ __lzo_static_forceinline lzo_uint32_t lzo_memops_get_ne32(const lzo_voidp ss) return v; } #if (LZO_OPT_UNALIGNED32) -#define LZO_MEMOPS_GET_NE32(ss) * (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss) +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU4p)0)==4) +#define LZO_MEMOPS_GET_NE32(ss) (* (const lzo_memops_TU4p) (const lzo_memops_TU0p) (ss)) #else #define LZO_MEMOPS_GET_NE32(ss) lzo_memops_get_ne32(ss) #endif #if (LZO_OPT_UNALIGNED64) -#define LZO_MEMOPS_GET_NE64(ss) * (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss) +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8) +#define LZO_MEMOPS_GET_NE64(ss) (* (const lzo_memops_TU8p) (const lzo_memops_TU0p) (ss)) #endif __lzo_static_forceinline void lzo_memops_put_le16(lzo_voidp dd, lzo_uint16_t vv) @@ -471,13 +473,9 @@ __lzo_static_forceinline void lzo_memops_put_ne32(lzo_voidp dd, lzo_uint32_t vv) #define LZO_MEMOPS_PUT_NE32(dd,vv) lzo_memops_put_ne32(dd,vv) #endif -#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) -static void __attribute__((__unused__)) -#else -__lzo_static_forceinline void -#endif -lzo_memops_unused_funcs(void) +lzo_unused_funcs_impl(void, lzo_memops_unused_funcs)(void) { + LZO_UNUSED_FUNC(lzo_memops_unused_funcs); LZO_UNUSED_FUNC(lzo_memops_get_le16); LZO_UNUSED_FUNC(lzo_memops_get_le32); LZO_UNUSED_FUNC(lzo_memops_get_ne16); @@ -486,7 +484,6 @@ lzo_memops_unused_funcs(void) LZO_UNUSED_FUNC(lzo_memops_put_le32); LZO_UNUSED_FUNC(lzo_memops_put_ne16); LZO_UNUSED_FUNC(lzo_memops_put_ne32); - LZO_UNUSED_FUNC(lzo_memops_unused_funcs); } #endif /* already included */ diff --git a/main/lzo/src/lzo_init.c b/main/lzo/src/lzo_init.c index 4128a602..142e95cd 100644 --- a/main/lzo/src/lzo_init.c +++ b/main/lzo/src/lzo_init.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -118,6 +118,14 @@ _lzo_config_check(void) r &= UA_GET_LE16(p) == 0; u.b[1] = 128; r &= UA_GET_LE16(p) == 128; + u.b[2] = 129; + r &= UA_GET_LE16(p) == LZO_UINT16_C(0x8180); +#if (LZO_ABI_BIG_ENDIAN) + r &= UA_GET_NE16(p) == LZO_UINT16_C(0x8081); +#endif +#if (LZO_ABI_LITTLE_ENDIAN) + r &= UA_GET_NE16(p) == LZO_UINT16_C(0x8180); +#endif u.a[0] = u.a[1] = 0; u.b[0] = 3; u.b[5] = 4; p = u2p(&u, 1); @@ -125,6 +133,14 @@ _lzo_config_check(void) r &= UA_GET_LE32(p) == 0; u.b[1] = 128; r &= UA_GET_LE32(p) == 128; + u.b[2] = 129; u.b[3] = 130; u.b[4] = 131; + r &= UA_GET_LE32(p) == LZO_UINT32_C(0x83828180); +#if (LZO_ABI_BIG_ENDIAN) + r &= UA_GET_NE32(p) == LZO_UINT32_C(0x80818283); +#endif +#if (LZO_ABI_LITTLE_ENDIAN) + r &= UA_GET_NE32(p) == LZO_UINT32_C(0x83828180); +#endif #if defined(UA_GET_NE64) u.c[0] = u.c[1] = 0; u.b[0] = 5; u.b[9] = 6; @@ -220,6 +236,4 @@ __lzo_init_v2(unsigned v, int s1, int s2, int s3, int s4, int s5, #endif -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_mchw.ch b/main/lzo/src/lzo_mchw.ch index 8273612a..bcfec46b 100644 --- a/main/lzo/src/lzo_mchw.ch +++ b/main/lzo/src/lzo_mchw.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -55,16 +55,16 @@ typedef struct lzo_uint printcount; /* counter for reporting progress every 1K bytes */ /* some stats */ - unsigned long lit_bytes; - unsigned long match_bytes; - unsigned long rep_bytes; - unsigned long lazy; + lzo_uint lit_bytes; + lzo_uint match_bytes; + lzo_uint rep_bytes; + lzo_uint lazy; #if defined(LZO1B) lzo_uint r1_m_len; /* some stats */ - unsigned long r1_r, m3_r, m2_m, m3_m; + lzo_uint r1_r, m3_r, m2_m, m3_m; #endif #if defined(LZO1C) @@ -72,7 +72,7 @@ typedef struct lzo_bytep m3; /* some stats */ - unsigned long r1_r, m3_r, m2_m, m3_m; + lzo_uint r1_r, m3_r, m2_m, m3_m; #endif #if defined(LZO1F) @@ -80,7 +80,7 @@ typedef struct lzo_uint r1_m_len; /* some stats */ - unsigned long r1_r, m2_m, m3_m; + lzo_uint r1_r, m2_m, m3_m; #endif #if defined(LZO1X) || defined(LZO1Y) || defined(LZO1Z) @@ -88,13 +88,13 @@ typedef struct lzo_uint r1_m_len; /* some stats */ - unsigned long m1a_m, m1b_m, m2_m, m3_m, m4_m; - unsigned long lit1_r, lit2_r, lit3_r; + lzo_uint m1a_m, m1b_m, m2_m, m3_m, m4_m; + lzo_uint lit1_r, lit2_r, lit3_r; #endif #if defined(LZO2A) /* some stats */ - unsigned long m1, m2, m3, m4; + lzo_uint m1, m2, m3, m4; #endif } LZO_COMPRESS_T; @@ -219,7 +219,4 @@ find_match ( LZO_COMPRESS_T *c, lzo_swd_p s, } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_ptr.c b/main/lzo/src/lzo_ptr.c index 2896b70b..38359ff2 100644 --- a/main/lzo/src/lzo_ptr.c +++ b/main/lzo/src/lzo_ptr.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -61,18 +61,20 @@ __lzo_align_gap(const lzo_voidp ptr, lzo_uint size) #error "__LZO_UINTPTR_T_IS_POINTER is unsupported" #else lzo_uintptr_t p, n; + if (size < 2) return 0; p = __lzo_ptr_linear(ptr); +#if 0 n = (((p + size - 1) / size) * size) - p; +#else + if ((size & (size - 1)) != 0) + return 0; + n = size; n = ((p + n - 1) & ~(n - 1)) - p; +#endif #endif - - assert(size > 0); assert((long)n >= 0); assert(n <= size); return (unsigned)n; } - -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_ptr.h b/main/lzo/src/lzo_ptr.h index 1e23548f..736c7c5f 100644 --- a/main/lzo/src/lzo_ptr.h +++ b/main/lzo/src/lzo_ptr.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -119,7 +119,5 @@ lzo_full_align_t; #endif /* already included */ -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_str.c b/main/lzo/src/lzo_str.c index a7ca638f..3364e8af 100644 --- a/main/lzo/src/lzo_str.c +++ b/main/lzo/src/lzo_str.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -54,6 +54,4 @@ #undef LZOLIB_PUBLIC -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_supp.h b/main/lzo/src/lzo_supp.h index f7d0351e..87307f99 100644 --- a/main/lzo/src/lzo_supp.h +++ b/main/lzo/src/lzo_supp.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -1517,7 +1517,7 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a LZOCHK_ASSERT(__LZO_MASK_GEN(1u,2) == 3) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,3) == 7) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,8) == 255) -#if (SIZEOF_INT >= 2) +#if (LZO_SIZEOF_INT >= 2) LZOCHK_ASSERT(__LZO_MASK_GEN(1,15) == 32767) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,16) == 0xffffU) LZOCHK_ASSERT(__LZO_MASK_GEN(0u,16) == 0u) @@ -1525,22 +1525,22 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,16) == 0xffffUL) LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,16) == 0ul) #endif -#if (SIZEOF_INT >= 4) +#if (LZO_SIZEOF_INT >= 4) LZOCHK_ASSERT(__LZO_MASK_GEN(1,31) == 2147483647) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,32) == 0xffffffffU) LZOCHK_ASSERT(__LZO_MASK_GEN(0u,32) == 0u) #endif -#if (SIZEOF_LONG >= 4) +#if (LZO_SIZEOF_LONG >= 4) LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,32) == 0xffffffffUL) LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,32) == 0ul) #endif -#if (SIZEOF_LONG >= 8) +#if (LZO_SIZEOF_LONG >= 8) LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,64) == 0xffffffffffffffffUL) LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,64) == 0ul) #endif #if !(LZO_BROKEN_INTEGRAL_PROMOTION) - LZOCHK_ASSERT(__LZO_MASK_GEN(1u,SIZEOF_INT*8) == ~0u) - LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,SIZEOF_LONG*8) == ~0ul) + LZOCHK_ASSERT(__LZO_MASK_GEN(1u,LZO_SIZEOF_INT*8) == ~0u) + LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,LZO_SIZEOF_LONG*8) == ~0ul) #endif #if 1 LZOCHK_ASSERT(__LZO_MASK_GEN(0,0) == 0) @@ -1575,10 +1575,10 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a LZOCHK_ASSERT((~0ul & ~0) == ~0ul) LZOCHK_ASSERT((~0ul & ~0u) == ~0u) #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) -#elif (SIZEOF_INT == 2) +#elif (LZO_SIZEOF_INT == 2) LZOCHK_ASSERT((~0l & ~0u) == 0xffffU) LZOCHK_ASSERT((~0ul & ~0u) == 0xffffU) -#elif (SIZEOF_INT == 4) +#elif (LZO_SIZEOF_INT == 4) LZOCHK_ASSERT((~0l & ~0u) == 0xffffffffU) LZOCHK_ASSERT((~0ul & ~0u) == 0xffffffffU) #endif @@ -1626,8 +1626,8 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a #else LZOCHK_ASSERT(sizeof(short) == sizeof(LZO_STATIC_CAST(short, 0))) #endif -#if (SIZEOF_SHORT > 0) - LZOCHK_ASSERT(sizeof(short) == SIZEOF_SHORT) +#if (LZO_SIZEOF_SHORT > 0) + LZOCHK_ASSERT(sizeof(short) == LZO_SIZEOF_SHORT) #endif LZOCHK_ASSERT_IS_SIGNED_T(int) LZOCHK_ASSERT_IS_UNSIGNED_T(unsigned int) @@ -1638,8 +1638,8 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a LZOCHK_ASSERT(sizeof(int) >= sizeof(short)) LZOCHK_ASSERT(sizeof(int) == sizeof(0)) LZOCHK_ASSERT(sizeof(int) == sizeof(LZO_STATIC_CAST(int, 0))) -#if (SIZEOF_INT > 0) - LZOCHK_ASSERT(sizeof(int) == SIZEOF_INT) +#if (LZO_SIZEOF_INT > 0) + LZOCHK_ASSERT(sizeof(int) == LZO_SIZEOF_INT) #endif LZOCHK_ASSERT(sizeof(0) == sizeof(int)) LZOCHK_ASSERT_IS_SIGNED_T(long) @@ -1651,15 +1651,15 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a LZOCHK_ASSERT(sizeof(long) >= sizeof(int)) LZOCHK_ASSERT(sizeof(long) == sizeof(0L)) LZOCHK_ASSERT(sizeof(long) == sizeof(LZO_STATIC_CAST(long, 0))) -#if (SIZEOF_LONG > 0) - LZOCHK_ASSERT(sizeof(long) == SIZEOF_LONG) +#if (LZO_SIZEOF_LONG > 0) + LZOCHK_ASSERT(sizeof(long) == LZO_SIZEOF_LONG) #endif LZOCHK_ASSERT(sizeof(0L) == sizeof(long)) LZOCHK_ASSERT_IS_UNSIGNED_T(size_t) LZOCHK_ASSERT(sizeof(size_t) >= sizeof(int)) LZOCHK_ASSERT(sizeof(size_t) == sizeof(sizeof(0))) -#if (SIZEOF_SIZE_T > 0) - LZOCHK_ASSERT(sizeof(size_t) == SIZEOF_SIZE_T) +#if (LZO_SIZEOF_SIZE_T > 0) + LZOCHK_ASSERT(sizeof(size_t) == LZO_SIZEOF_SIZE_T) #endif LZOCHK_ASSERT_IS_SIGNED_T(ptrdiff_t) LZOCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(int)) @@ -1670,13 +1670,13 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a LZOCHK_ASSERT(4 == sizeof(LZO_STATIC_CAST(char __huge*, 0) - LZO_STATIC_CAST(char __huge*, 0))) # endif #endif -#if (SIZEOF_PTRDIFF_T > 0) - LZOCHK_ASSERT(sizeof(ptrdiff_t) == SIZEOF_PTRDIFF_T) +#if (LZO_SIZEOF_PTRDIFF_T > 0) + LZOCHK_ASSERT(sizeof(ptrdiff_t) == LZO_SIZEOF_PTRDIFF_T) #endif LZOCHK_ASSERT(sizeof(void*) >= sizeof(char*)) -#if (SIZEOF_VOID_P > 0) - LZOCHK_ASSERT(sizeof(void*) == SIZEOF_VOID_P) - LZOCHK_ASSERT(sizeof(char*) == SIZEOF_VOID_P) +#if (LZO_SIZEOF_VOID_P > 0) + LZOCHK_ASSERT(sizeof(void*) == LZO_SIZEOF_VOID_P) + LZOCHK_ASSERT(sizeof(char*) == LZO_SIZEOF_VOID_P) #endif #if (LZO_HAVE_MM_HUGE_PTR) LZOCHK_ASSERT(4 == sizeof(void __huge*)) @@ -1692,14 +1692,14 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a #if defined(LZOCHK_CFG_PEDANTIC) #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) #else - LZOCHK_ASSERT((1 << (8*SIZEOF_INT-1)) < 0) + LZOCHK_ASSERT((1 << (8*LZO_SIZEOF_INT-1)) < 0) #endif #endif - LZOCHK_ASSERT((1u << (8*SIZEOF_INT-1)) > 0) + LZOCHK_ASSERT((1u << (8*LZO_SIZEOF_INT-1)) > 0) #if defined(LZOCHK_CFG_PEDANTIC) - LZOCHK_ASSERT((1l << (8*SIZEOF_LONG-1)) < 0) + LZOCHK_ASSERT((1l << (8*LZO_SIZEOF_LONG-1)) < 0) #endif - LZOCHK_ASSERT((1ul << (8*SIZEOF_LONG-1)) > 0) + LZOCHK_ASSERT((1ul << (8*LZO_SIZEOF_LONG-1)) > 0) #if defined(lzo_int16e_t) LZOCHK_ASSERT(sizeof(lzo_int16e_t) == 2) LZOCHK_ASSERT(sizeof(lzo_int16e_t) == LZO_SIZEOF_LZO_INT16E_T) @@ -1852,13 +1852,13 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) >> 63) == 1) LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) & ~0) == LZO_UINT64_C(0xffffffffffffffff)) LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) & ~0l) == LZO_UINT64_C(0xffffffffffffffff)) -#if (SIZEOF_INT == 4) +#if (LZO_SIZEOF_INT == 4) # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) # else LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) & (~0u+0u)) == 0xffffffffu) # endif #endif -#if (SIZEOF_LONG == 4) +#if (LZO_SIZEOF_LONG == 4) # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) # else LZOCHK_ASSERT((LZO_UINT64_C(0xffffffffffffffff) & (~0ul+0ul)) == 0xfffffffful) @@ -1940,13 +1940,13 @@ LZOLIB_EXTERN(int, lzo_spawnve) (int mode, const char* fn, const char* const * a LZOCHK_ASSERT(sizeof(void (*)(void)) == 8) #endif #if (LZO_CC_NDPC) -#elif (SIZEOF_INT > 1) +#elif (LZO_SIZEOF_INT > 1) LZOCHK_ASSERT( LZO_STATIC_CAST(int, LZO_STATIC_CAST(unsigned char, LZO_STATIC_CAST(signed char, -1))) == 255) #endif #if defined(LZOCHK_CFG_PEDANTIC) #if (LZO_CC_KEILC) #elif (LZO_CC_NDPC) -#elif !(LZO_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1) +#elif !(LZO_BROKEN_INTEGRAL_PROMOTION) && (LZO_SIZEOF_INT > 1) LZOCHK_ASSERT( ((LZO_STATIC_CAST(unsigned char, 128)) << LZO_STATIC_CAST(int, (8*sizeof(int)-8))) < 0) #endif #endif diff --git a/main/lzo/src/lzo_swd.ch b/main/lzo/src/lzo_swd.ch index 566aca45..4a73a6b4 100644 --- a/main/lzo/src/lzo_swd.ch +++ b/main/lzo/src/lzo_swd.ch @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -237,20 +237,33 @@ void swd_insertdict(lzo_swd_p s, lzo_uint node, lzo_uint len) // ************************************************************************/ +static void swd_exit(lzo_swd_p s); + static int swd_init(lzo_swd_p s, const lzo_bytep dict, lzo_uint dict_len) { #if defined(__LZO_CHECKER) + unsigned r = 1; s->b = (lzo_bytep) malloc(SWD_N + SWD_F + SWD_F); s->head3 = (swd_uintp) malloc(sizeof(swd_uint) * SWD_HSIZE); s->succ3 = (swd_uintp) malloc(sizeof(swd_uint) * (SWD_N + SWD_F)); s->best3 = (swd_uintp) malloc(sizeof(swd_uint) * (SWD_N + SWD_F)); s->llen3 = (swd_uintp) malloc(sizeof(swd_uint) * SWD_HSIZE); + r &= s->b != NULL; + r &= s->head3 != NULL; + r &= s->succ3 != NULL; + r &= s->best3 != NULL; + r &= s->llen3 != NULL; #ifdef HEAD2 IF_HEAD2(s) { s->head2 = (swd_uintp) malloc(sizeof(swd_uint) * 65536L); + r &= s->head2 != NULL; } #endif + if (r != 1) { + swd_exit(s); + return LZO_E_OUT_OF_MEMORY; + } #endif s->m_len = 0; @@ -683,7 +696,4 @@ void swd_findbest(lzo_swd_p s) #undef s_get_head3 -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/lzo_util.c b/main/lzo/src/lzo_util.c index 1f2a4d54..2f8059f5 100644 --- a/main/lzo/src/lzo_util.c +++ b/main/lzo/src/lzo_util.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -37,25 +37,27 @@ * keep this copyright string in the executable of your product. .*/ -static const char __lzo_copyright[] = +static const char lzo_copyright_[] = #if !defined(__LZO_IN_MINLZO) /* save space as some people want a really small decompressor */ LZO_VERSION_STRING; #else "\r\n\n" "LZO data compression library.\n" - "$Copyright: LZO Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\n" + "$Copyright: LZO Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\n" "<markus@oberhumer.com>\n" "http://www.oberhumer.com $\n\n" "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n" "$Info: " LZO_INFO_STRING " $\n"; #endif +static const char lzo_version_string_[] = LZO_VERSION_STRING; +static const char lzo_version_date_[] = LZO_VERSION_DATE; LZO_PUBLIC(const lzo_bytep) lzo_copyright(void) { - return (const lzo_bytep) __lzo_copyright; + return (const lzo_bytep) lzo_copyright_; } LZO_PUBLIC(unsigned) @@ -67,25 +69,25 @@ lzo_version(void) LZO_PUBLIC(const char *) lzo_version_string(void) { - return LZO_VERSION_STRING; + return lzo_version_string_; } LZO_PUBLIC(const char *) lzo_version_date(void) { - return LZO_VERSION_DATE; + return lzo_version_date_; } LZO_PUBLIC(const lzo_charp) _lzo_version_string(void) { - return LZO_VERSION_STRING; + return lzo_version_string_; } LZO_PUBLIC(const lzo_charp) _lzo_version_date(void) { - return LZO_VERSION_DATE; + return lzo_version_date_; } @@ -100,10 +102,10 @@ _lzo_version_date(void) /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ #define LZO_DO1(buf,i) s1 += buf[i]; s2 += s1 -#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1); -#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2); -#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4); -#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8); +#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1) +#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2) +#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4) +#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8) LZO_PUBLIC(lzo_uint32_t) lzo_adler32(lzo_uint32_t adler, const lzo_bytep buf, lzo_uint len) @@ -143,6 +145,4 @@ lzo_adler32(lzo_uint32_t adler, const lzo_bytep buf, lzo_uint len) #undef LZO_DO16 -/* -vi:ts=4:et -*/ +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/stats1a.h b/main/lzo/src/stats1a.h index 5c2af38c..8edfd908 100644 --- a/main/lzo/src/stats1a.h +++ b/main/lzo/src/stats1a.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -120,6 +120,5 @@ extern lzo1a_stats_t *lzo1a_stats; #endif /* already included */ -/* -vi:ts=4:et -*/ + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/stats1b.h b/main/lzo/src/stats1b.h index 453e7ab3..20274cd7 100644 --- a/main/lzo/src/stats1b.h +++ b/main/lzo/src/stats1b.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -125,6 +125,5 @@ extern lzo1b_stats_t * const lzo1b_stats; #endif /* already included */ -/* -vi:ts=4:et -*/ + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/src/stats1c.h b/main/lzo/src/stats1c.h index 7f1f4cd9..8804c2c7 100644 --- a/main/lzo/src/stats1c.h +++ b/main/lzo/src/stats1c.h @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -44,6 +44,5 @@ #endif /* already included */ -/* -vi:ts=4:et -*/ + +/* vim:set ts=4 sw=4 et: */ diff --git a/main/lzo/tests/align.c b/main/lzo/tests/align.c index a4c5f7db..59bf8333 100644 --- a/main/lzo/tests/align.c +++ b/main/lzo/tests/align.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ #include "src/lzo_conf.h" #include "src/lzo_ptr.h" #endif -#include "lzo/lzoconf.h" +#include <lzo/lzoconf.h> /* utility layer */ #define WANT_LZO_MALLOC 1 @@ -56,12 +56,12 @@ static unsigned long align_test(lzo_bytep block, lzo_uint len, lzo_uint step) unsigned long i = 0; assert(step > 0); - assert(step <= 65536L); + assert(step <= 65536ul); assert((step & (step - 1)) == 0); for (offset = step; offset < len; offset += step) { - k1 = LZO_PTR_ALIGN_UP(b1+1,step); + k1 = LZO_PTR_ALIGN_UP(b1 + 1, step); k2 = b2 + offset; if (k1 != k2) { @@ -109,7 +109,7 @@ static unsigned long align_test(lzo_bytep block, lzo_uint len, lzo_uint step) for (k = b1 + 1; k <= k1; k++) { - x = LZO_PTR_ALIGN_UP(k,step); + x = LZO_PTR_ALIGN_UP(k, step); if (x != k1) { printf("error 3: base: %p %p %p i %lu step %ld offset %ld: " @@ -135,7 +135,7 @@ static unsigned long align_test(lzo_bytep block, lzo_uint len, lzo_uint step) // **************************************************************************/ -#define BLOCK_LEN (128*1024ul) +#define BLOCK_SIZE (128*1024ul) int main(int argc, char *argv[]) { @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) printf("lzo_init() failed !!!\n"); return 3; } - buf = (lzo_bytep) lzo_malloc(2*BLOCK_LEN + 256); + buf = (lzo_bytep) lzo_malloc(2*BLOCK_SIZE + 256); if (buf == NULL) { printf("out of memory\n"); @@ -165,22 +165,22 @@ int main(int argc, char *argv[]) printf("Align init: %p ( 0x%lx )\n", buf, (unsigned long) (size_t) buf); #endif - for (step = 1; step <= 65536L; step *= 2) + for (step = 1; step <= 65536ul; step *= 2) { lzo_bytep block = buf; unsigned long n; unsigned gap; - gap = __lzo_align_gap(block,step); - block = LZO_PTR_ALIGN_UP(block,step); + gap = __lzo_align_gap(block, step); + block = LZO_PTR_ALIGN_UP(block, step); if (opt_verbose >= 1) printf("STEP %5lu: GAP: %5lu %p %p %5lu\n", (unsigned long) step, (unsigned long) gap, buf, block, (unsigned long) (block - buf)); - n = align_test(block,BLOCK_LEN,step); + n = align_test(block, BLOCK_SIZE, step); if (n == 0) return 1; - if ((n + 1) * step != BLOCK_LEN) + if ((n + 1) * step != BLOCK_SIZE) { printf("error 4: %ld %lu\n", (long)step, n); return 1; diff --git a/main/lzo/tests/chksum.c b/main/lzo/tests/chksum.c index bb5b502b..fb4fb0dd 100644 --- a/main/lzo/tests/chksum.c +++ b/main/lzo/tests/chksum.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ */ -#include "lzo/lzoconf.h" +#include <lzo/lzoconf.h> /* utility layer */ #define WANT_LZO_MALLOC 1 @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) { lzo_bytep block; - lzo_uint block_len; + lzo_uint block_size; lzo_uint32_t adler, crc; if (argc < 0 && argv == NULL) /* avoid warning about unused args */ @@ -53,18 +53,18 @@ int main(int argc, char *argv[]) } /* prepare the block */ - block_len = 128 * 1024L; - block = (lzo_bytep) lzo_malloc(block_len); + block_size = 128 * 1024L; + block = (lzo_bytep) lzo_malloc(block_size); if (block == NULL) { printf("out of memory\n"); return 3; } - lzo_memset(block, 0, block_len); + lzo_memset(block, 0, block_size); /* adler32 checksum */ adler = lzo_adler32(0, NULL, 0); - adler = lzo_adler32(adler, block, block_len); + adler = lzo_adler32(adler, block, block_size); if (adler != 0x001e0001UL) { printf("adler32 checksum error !!! (0x%08lx)\n", (long) adler); @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) /* crc32 checksum */ crc = lzo_crc32(0, NULL, 0); - crc = lzo_crc32(crc, block, block_len); + crc = lzo_crc32(crc, block, block_size); if (crc != 0x7ee8cdcdUL) { printf("crc32 checksum error !!! (0x%08lx)\n", (long) crc); diff --git a/main/lzo/tests/promote.c b/main/lzo/tests/promote.c index 30c6da60..1bf8d63e 100644 --- a/main/lzo/tests/promote.c +++ b/main/lzo/tests/promote.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or diff --git a/main/lzo/tests/sizes.c b/main/lzo/tests/sizes.c index 3840fe2a..6be9c1da 100644 --- a/main/lzo/tests/sizes.c +++ b/main/lzo/tests/sizes.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ #endif #endif -#include "lzo/lzoconf.h" +#include <lzo/lzoconf.h> #include <stdio.h> #if (LZO_CC_MSC && (_MSC_VER >= 1300)) diff --git a/main/lzo/util/check.sh b/main/lzo/util/check.sh index f412803f..9c7790ad 100644 --- a/main/lzo/util/check.sh +++ b/main/lzo/util/check.sh @@ -4,24 +4,32 @@ set -e # # usage: util/check.sh [directory] # -# This script runs lzotest with all algorithms on a complete directory tree. +# This script runs lzotest with all algorithms +# on a complete directory tree. # It is not suitable for accurate timings. # -# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +# Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer # -LZOTEST="lzotest" -test -x ./lzotest/lzotest && LZOTEST="./lzotest/lzotest" -test -x ./lzotest.exe && LZOTEST="./lzotest.exe" -test -x ./lzotest.out && LZOTEST="./lzotest.out" +if test "X$LZOTEST" = X; then +LZOTEST="./lzotest/lzotest" +for d in ./lzotest .; do + for ext in "" .exe .out; do + if test -f "$d/lzotest$ext" && test -x "$d/lzotest$ext"; then + LZOTEST="$d/lzotest$ext" + break 2 + fi + done +done +fi -dir="${*-.}" +dir="${1-.}" -TMPFILE="/tmp/lzo_$$.tmp" -rm -f $TMPFILE -(find $dir/ -type f -print > $TMPFILE) || true +TMPFILE="/tmp/lzotest_$$.tmp" +rm -f "$TMPFILE" +(find "$dir/." -type f -print | LC_ALL=C sort > "$TMPFILE") || true -## methods=`$LZOTEST -m | sed -n 's/^ *-m\([0-9]*\).*/\1/p'` +## methods=`"$LZOTEST" -m | sed -n 's/^ *-m\([0-9]*\).*/\1/p'` ## methods="9721 9722 9723 9724 9725 9726 9727 9728 9729" methods="21 31 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 61 71 81" methods="$methods 111 112 115" @@ -33,11 +41,12 @@ methods="$methods 902 912 942 962 972 982 992" LFLAGS="-q -T -n2 -S" LFLAGS="-q -T -n2" -for i in $methods; do - cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS +for m in $methods; do + cat "$TMPFILE" | "$LZOTEST" "-m$m" -@ $LFLAGS done -rm -f $TMPFILE +rm -f "$TMPFILE" echo "Done." exit 0 +# vim:set ts=4 sw=4 et: diff --git a/main/lzo/util/checkasm.sh b/main/lzo/util/checkasm.sh index 4fee682e..aef5ec00 100644 --- a/main/lzo/util/checkasm.sh +++ b/main/lzo/util/checkasm.sh @@ -8,39 +8,48 @@ set -e # on a complete directory tree. # It is not suitable for accurate timings. # -# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +# Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer # -LZOTEST="lzotest" -test -x ./lzotest/lzotest && LZOTEST="./lzotest/lzotest" -test -x ./lzotest.exe && LZOTEST="./lzotest.exe" -test -x ./lzotest.out && LZOTEST="./lzotest.out" -LFLAGS="-q" +if test "X$LZOTEST" = X; then +LZOTEST="./lzotest/lzotest" +for d in ./lzotest .; do + for ext in "" .exe .out; do + if test -f "$d/lzotest$ext" && test -x "$d/lzotest$ext"; then + LZOTEST="$d/lzotest$ext" + break 2 + fi + done +done +fi -dir="${*-.}" +dir="${1-.}" -TMPFILE="/tmp/lzo_$$.tmp" -rm -f $TMPFILE -(find $dir/ -type f -print > $TMPFILE) || true +TMPFILE="/tmp/lzotest_$$.tmp" +rm -f "$TMPFILE" +(find "$dir/." -type f -print | LC_ALL=C sort > "$TMPFILE") || true + +LFLAGS="-q" -for i in 11; do - cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -A - cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -A -S +for m in 11; do + cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -A + cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -A -S done -for i in 61; do - cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -F - cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -F -S +for m in 61; do + cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -F + cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -F -S done -for i in 71 81; do - cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -A - cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -A -S - cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -F - cat $TMPFILE | $LZOTEST -m${i} -@ $LFLAGS -F -S +for m in 71 81; do + cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -A + cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -A -S + cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -F + cat "$TMPFILE" | "$LZOTEST" -m${m} -@ $LFLAGS -F -S done -rm -f $TMPFILE +rm -f "$TMPFILE" echo "Done." exit 0 +# vim:set ts=4 sw=4 et: diff --git a/main/lzo/util/notime.pl b/main/lzo/util/notime.pl index 5fa7d4d1..a4e92b0a 100644 --- a/main/lzo/util/notime.pl +++ b/main/lzo/util/notime.pl @@ -1,6 +1,5 @@ #! /usr/bin/perl -## -## vi:ts=4 +## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*- ## ##---------------------------------------------------------------------------## ## @@ -10,7 +9,7 @@ ## Description: ## Remove timing values from a table created by table.pl ## -## Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +## Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ## ##---------------------------------------------------------------------------## diff --git a/main/lzo/util/overlap.sh b/main/lzo/util/overlap.sh index 8f3b16b1..2e1ffa4d 100644 --- a/main/lzo/util/overlap.sh +++ b/main/lzo/util/overlap.sh @@ -4,24 +4,32 @@ set -e # # usage: util/overlap.sh [directory] # -# This script runs the overlap example program on a complete directory tree. +# This script runs the overlap example program +# on a complete directory tree. # -# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +# Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer # -OVERLAP="overlap" -test -x ./examples/overlap && OVERLAP="./examples/overlap" -test -x ./overlap.exe && OVERLAP="./overlap.exe" +OVERLAP="./examples/overlap" +for d in ./examples .; do + for ext in "" .exe .out; do + if test -f "$d/overlap$ext" && test -x "$d/overlap$ext"; then + OVERLAP="$d/overlap$ext" + break 2 + fi + done +done -dir="${*-.}" +dir="${1-.}" TMPFILE="/tmp/lzo_$$.tmp" -rm -f $TMPFILE -(find $dir/ -type f -print0 > $TMPFILE) || true +rm -f "$TMPFILE" +(find "$dir/." -type f -print0 | LC_ALL=C sort -z > "$TMPFILE") || true -cat $TMPFILE | xargs -0 -r $OVERLAP +cat "$TMPFILE" | xargs -0 -r "$OVERLAP" -rm -f $TMPFILE +rm -f "$TMPFILE" echo "Done." exit 0 +# vim:set ts=4 sw=4 et: diff --git a/main/lzo/util/shortf.pl b/main/lzo/util/shortf.pl index 3e447cdd..44a2e839 100644 --- a/main/lzo/util/shortf.pl +++ b/main/lzo/util/shortf.pl @@ -1,6 +1,5 @@ #! /usr/bin/perl -## -## vi:ts=4 +## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*- ## ##---------------------------------------------------------------------------## ## @@ -10,7 +9,7 @@ ## Description: ## Create short files for compression test ## -## Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +## Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ## ##---------------------------------------------------------------------------## diff --git a/main/lzo/util/table.pl b/main/lzo/util/table.pl index 8b352073..abc193ea 100644 --- a/main/lzo/util/table.pl +++ b/main/lzo/util/table.pl @@ -1,6 +1,5 @@ #! /usr/bin/perl -## -## vi:ts=4:et +## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*- ## ##---------------------------------------------------------------------------## ## @@ -10,7 +9,7 @@ ## Description: ## Convert the output of the LZO lzotest program into a nice table. ## -## Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +## Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ## ##---------------------------------------------------------------------------## diff --git a/main/lzo/util/uncompr.pl b/main/lzo/util/uncompr.pl index 54ec9e06..d6fafb02 100644 --- a/main/lzo/util/uncompr.pl +++ b/main/lzo/util/uncompr.pl @@ -1,6 +1,5 @@ #! /usr/bin/perl -## -## vi:ts=4 +## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*- ## ##---------------------------------------------------------------------------## ## @@ -10,7 +9,7 @@ ## Description: ## Create incompressible files for compression test ## -## Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +## Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer ## ##---------------------------------------------------------------------------## |