The public header includes windows.h, which is not always desirable and
does not appear to be required. Only the WINAPI definition is required,
for the BZ API calling convention.
Switch from windows.h to wtypes.h + minwindef.h, which define WINAPI.
wtypes.h is required because only including minwindef.h brings in
winnt.h which causes problems.
Resolves: https://gitlab.com/bzip2/bzip2/-/issues/37
Rather than adding a symlink with the old name, this commit changes the
USE_OLD_SONAME option so it builds an extra copy of the library with the
old SONAME.
The commit to fix GCC10's warning regarding non-signal-safe functions in
our fatal signal handler introduced STDERR_FILENO which is a POSIX
definition not supported on Windows.
This commit replaces it with _fileno(stderr) on Windows.
I've also added macros to replace a few other functions with ISO C and
C++ compliant variants.
You can now build with `cmake . -D USE_OLD_SONAME=ON` to have CMake
patch the shared library to use the old SONAME for binary compatibility
with old libbz2 1.0.x installs.
Increase the project version to 1.1.0 as this is a new feature version.
As for all new feature versions, increase the libtool .so version.
Only increase the revision, as no API's were added or removed.
It may look like I've increased it by 2, but that's because v1.0.8 used
Makefiles and was at 1:8:0.
See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
Explain why bzip2 has repositories on sourceware.org and gitlab.com.
Change error messages in bzip2 source to request that bugs be reported
to project's gitlab issues page.
Fixup project homepage in various documents to point to gitlab project.
Remove trailing whitespace from a few documents.
Update the Release Checklist.
Add myself as new maintainer.
Add the notes from 1.0.7 and 1.0.8 patch versions.
Restructure the news as markdown.
Re-order to news so the newest things go at the top.
Remove duplicate item from the AUTHORS document.
GCC10 -fanalyzer notices that we try to call functions that are not
signal safe from our fatal signal handler:
bzip2.c: In function ‘mySIGSEGVorSIGBUScatcher’:
bzip2.c:819:7: warning: call to ‘fprintf’ from within signal handler
[CWE-479] [-Wanalyzer-unsafe-call-within-signal-handler]
It also notices we then call showFileNames and cleanupAndFail which
also call possibly not signal safe functions.
Just write out the error message directly to STDERR and exit without
trying to clean up any files.
BZ_SEQUENCE_ERROR can be returned if BZ2_bzDecompress is called after
an earlier call already returned BZ_STREAM_END.
Reported-by: Vanessa McHale <vamchale@gmail.com>
The bzdiff script doesn't contain enough quotes, so that it doesn't
work if the TMPDIR environment variable is defined and contains
spaces.
https://bugs.debian.org/493710
Author: Vincent Lefevre <vincent@vinc17.org>
The tests may fail if the BZIP or BZIP2 environment variables are set.
To reproduce the issue, run:
BZIP2="--derp" ctest -V
This commit discards those variables before running the tests.
Resolves: https://gitlab.com/bzip2/bzip2/-/issues/31
Fix courtesy of Michael Orlitzky
MSVC2008 appears to be no longer available.
MSVC2015 and 2017 appear to require setting APPVEYOR_BUILD_WORKER_IMAGE
The MSVC2015 x64 vcvarsall.bat command didn't match AppVeyor's
instructions. See: https://www.appveyor.com/docs/lang/cpp/
The sample3.ref test file is plain ascii, which means that Git on
Windows will automatically convert the line endings from \n to \r\n.
This of course causes a test to fail.
Added a .gitattributes file that requires Git to treat *.ref files as
binary, so it won't convert line endings.
Was seeing ModuleNotFoundError: No module named 'skbuild' when using
pip3 to install cmake on Ubuntu 16. Installing with apt-get may resolve
the issue, and switching to use debian:testing to be certain a newer
version of cmake is available.