lrzip/lzma
Eli Schwartz dc6342ea61
build: fix incorrect use of shell commands in handmade libtool file
The "echo" command was soft-deprecated from the shell programming
language in ~1992. There is no way to use it correctly if:

- the "-e" or "-n" or "-E" or any other options are used
- backslash escape sequences are used
- the printed string contains shell variables containing either of the
  above

In recognition of the fact that echo was historically used in many
scripts, some of which avoided these issues and therefore succeeded when
run, the "echo" command was NOT marked as obsolescent, out of fear that
marking it as obsolescent would lead to vendors removing "echo" entirely
and breaking existing scripts (or at least, the subset of scripts which
managed to work correctly).

However, it is warned against, that after 1992 you should avoid writing
new code that uses "echo" and instead use "printf".

printf has an actual definition of its behavior, which echo did not, and
that behavior is to interpret backslash escapes in the first parameter,
which is necessary by this Makefile.am in order to embed newlines into
the generated libtool file. Simply replacing "echo -e" with "printf"
will therefore correctly and reliably do the intended functionality. We
also add one final embedded newline to avoid producing a file without an
end-of-line character on the last line of the file.

Fixes: https://github.com/ckolivas/lrzip/issues/257
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
2025-02-06 10:53:48 -05:00
..
ASM/x86 Avoid executable stack (#243) 2023-04-28 10:25:04 +10:00
C build: fix incorrect use of shell commands in handmade libtool file 2025-02-06 10:53:48 -05:00
7zC.txt Fix more CRLF EOL 2010-04-25 16:20:51 +10:00
7zFormat.txt Fix more CRLF EOL 2010-04-25 16:20:51 +10:00
history.txt Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
lzma.txt Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
Makefile.am Fix distdir to include ASM files. 2021-02-15 22:45:37 +11:00
Methods.txt Update to lzma 920 library. 2011-09-15 08:26:07 +10:00
README Initial import 2010-03-29 10:07:08 +11:00
README-Alloc Initial import 2010-03-29 10:07:08 +11:00

JANUARY 2009

This is an updated LZMA library wrapper provided with SDK 4.63.
The SDK is available here: http://www.7-zip.org/sdk.html.

It is written completely in C and compilation and integration
is much simpler. To enable multithreading support, compile
with COMPRESS_MF_MT and _REENTRANT defined. MF=Match Finder, 
MT=Multi Thread. In addition, link in pthread. This is default
behavior in lrzip. For single thread support, remove these
defines in the Makefile.

Some additional documentation is provided from the SDK.

File ./C/7zCrcT8.c is added to support ASM CRC code. Taken
from p7zip.org.

Original README text follows.

This is a zlib like library for the lzma encoder/decoder originally created
by Oleg I. Vdovikin <oleg@cs.msu.su> and modified for lrzip by Con Kolivas
<kernel@kolivas.org>
It is based on a stripped down source tree of the lzma SDK by Igor Pavlov.
http://www.7-zip.org

You can build a standalone library called liblzma.a which gives functions
equivalent to compress2() and uncompress() called lzma_compress() and
lzma_uncompress().

Updated for recent SDK 4.57 and added assembler routines for crc
using p7zip.org variant by Peter Hyman