1
0
mirror of https://gitlab.com/bzip2/bzip2.git synced 2025-08-08 02:02:55 +03:00
Commit Graph

169 Commits

Author SHA1 Message Date
Micah Snyder
5f420d4546 Windows, bzip2.h: Include minwindef.h instead of windows.h
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
2022-03-26 11:58:03 -07:00
Ville Skyttä
1ea1ac188a bzgrep, build: use grep -E/-F instead of egrep and fgrep
`egrep` and `fgrep` have been deprecated in GNU grep since 2007, and in
current post 3.7 Git they have been made to emit obsolescence warnings:
https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1
2022-02-06 18:31:39 +00:00
Ville Skyttä
9ae5232a55 docs: spelling and grammar fixes 2022-02-06 18:27:51 +00:00
Francisco Javier Trujillo Mata
bf5f505d01 Enable CMAKE_POSITION_INDEPENDENT_CODE just when shared lib are enabled 2022-01-31 21:12:06 +01:00
Micah Snyder
ab4061f774 Change USE_OLD_SONAME to build extra lib w. old name
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.
2022-01-30 11:59:25 -08:00
Micah Snyder
4c0d43f0f8 Fix Windows build
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.
2022-01-30 11:50:37 -08:00
Micah Snyder
1ea006590d CMake: Add USE_OLD_SONAME configuration option
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.
2022-01-30 11:50:37 -08:00
Micah Snyder
7b44372099 Project version 1.1.0, libtool version 1:9:0
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
2022-01-30 11:50:37 -08:00
Micah Snyder
10fe37f2eb Project home is now now gitlab.com/bzip2
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.
2022-01-30 11:50:37 -08:00
Micah Snyder
5d159ca220 News: Update to account for 1.0.7, 1.0.8
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.
2022-01-30 11:50:37 -08:00
Mark Wielaard
56c8399086 Don't call unsafe functions from SIGSEGV/SIGBUS signal handler.
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.
2022-01-30 11:50:37 -08:00
Mark Wielaard
c7334a261a manual.xml: Add BZ_SEQUENCE_ERROR to return values of BZ2_bzDecompress
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>
2022-01-30 11:50:37 -08:00
Mark Wielaard
ef10e08eb4 Mention the --help command line option in the documentation.
Bug-Debian: https://bugs.debian.org/517257
2022-01-30 11:50:37 -08:00
Mark Wielaard
228a99c559 bzip2.1: remove blank spaces in man page and drop the .PU macro.
Author: Bjarni Ingi Gislason
Bug-Debian: https://bugs.debian.org/675380
2022-01-30 11:50:37 -08:00
Mark Wielaard
72d05fc59b manual: Add id to legalnotice.
Otherwise the generated HTML will have a different randomly generated
name id which generates spurious diffs.
2022-01-30 11:50:37 -08:00
Mark Wielaard
9873c1c246 fix bzdiff when TMPDIR contains spaces
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>
2022-01-30 11:50:37 -08:00
Mark Wielaard
62c12b8ebc Use UTF-8 encoding and include bzip.css as link for HTML manual. 2022-01-30 11:50:37 -08:00
Micah Snyder
2221ed3deb Test: discard BZIP/BZIP2 vars before testing
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
2021-07-10 03:08:58 -07:00
Micah
2a2a30bd9f Merge branch 'pr-27-dcbaker-fix-tests-fixup' into 'master'
tests/runtests.py: Compare the actual and expected output (replacement)

See merge request bzip2/bzip2!39
2021-07-10 22:46:58 +00:00
Micah Snyder
5b77c775f8 AppVeyor: Remove MSVC2008, Add 2017, Fix 2015
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/
2021-07-10 15:37:58 -07:00
Micah Snyder
857df933cb Windows: Prevent git from changing line endings on test files
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.
2021-07-10 12:33:16 -07:00
Micah
d8b73fcc04 Merge branch 'not-me' into 'master'
Remove myself as maintainer

See merge request bzip2/bzip2!40
2021-06-04 01:43:18 +00:00
Federico Mena Quintero
58bc20462f Remove myself as maintainer 2021-06-03 19:14:52 -05:00
Micah Snyder
99459efa0b Code format housekeeping
There are a bunch of mixed tabs and spaces that are distracting when
reading the code. Just tidying up...
2021-06-01 09:37:23 -07:00
Micah Snyder
44032388da Tests: print actual v. expected on test failure
The compress -3 test is failing on Windows.
This change will print a hex dump in a left/right format to help
triage the failed test.
2021-06-01 09:37:16 -07:00
Micah Snyder
4cb6ecfd34 CMake: Run tests with correct options 2021-06-01 09:36:57 -07:00
Dylan Baker
3ea0df8d80 tests/runtests.py: Compare the actual and expected output
Which should have been done from the get-go, but I just didn't do.
2021-05-31 12:56:25 -07:00
Dylan Baker
917f66c56e meson: make test output more verbose 2021-05-31 12:56:25 -07:00
Micah
bf905ea225 Merge branch 'master' into 'master'
license and version print should output to stdout and exit with code 0

See merge request federicomenaquintero/bzip2!36
2021-05-31 19:53:03 +00:00
Micah
4c7533f434 Merge branch 'master' into 'master'
Minor man page update dealing with bzip2/gzip differences

See merge request federicomenaquintero/bzip2!38
2021-05-31 19:51:38 +00:00
imartisko
f2bbd4e5d8 Minor man page update dealing with bzip2/gzip differences 2021-05-31 19:51:38 +00:00
Micah
775be3c894 Merge branch 'skip_tests_if_no_app' into 'master'
APP tests are disabled if app is not built

See merge request federicomenaquintero/bzip2!37
2021-05-24 01:35:02 +00:00
Dmitry Kargin
8e70ae1957 APP tests are disabled if app is not built 2020-11-08 19:05:44 +03:00
Micah
6211b6500c Merge branch 'win' into 'master'
Fix windows compile failure and add CI

See merge request federicomenaquintero/bzip2!35
2020-09-11 21:11:13 +00:00
Isuru Fernando
e37cc75e84 Add VS 2019 2020-09-06 22:34:53 -05:00
Isuru Fernando
95f6895804 Add appveyor 2020-09-06 22:34:53 -05:00
Isuru Fernando
f85224356b Use generator expressions for target file 2020-09-06 22:34:22 -05:00
Federico Mena Quintero
15255b553e Merge branch 'cmake-install-symlinks' into 'master'
Cmake install bunzip, bzcat, & shellscripts

See merge request federicomenaquintero/bzip2!28
2020-08-11 00:45:27 +00:00
Micah Snyder
17a7a0ebfa Gitlab CI: Test cmake build on Debian
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.
2020-02-20 21:17:33 -05:00
Micah Snyder
b715457c1e CMake Improvements: Fix ENABLE_STATIC_LIB option, and renames static library with _static suffix to differentiate between shared library .lib file on Windows. 2020-02-19 22:05:10 -05:00
Micah Snyder
b850a926ba Meson Improvements: Replaces use of add_project_arguments with executable()'s c_args option, providing a list of args that vary depending on the host OS. Also bumps minimum meson version from 0.48 to 0.50, to alleviate warnings about using features introduced in 0.50. 2019-10-27 19:07:35 -04:00
Micah Snyder
2c8c975075 CMake Improvements: reverted use of TARGET_FILE_SUFFIX because it requires CMake 3.15 or newer, which is not available on all test systems. 2019-10-27 16:26:43 -04:00
Micah Snyder
0023ecfbdb CMake improvements: copy/install bunzip.exe, bzcat.exe to correct directory (eg build\Release for a Release build). 2019-10-27 15:54:26 -04:00
Micah Snyder
095262feae CMake improvements: Replaces add_definitions with target_compile_definitions for bzip2, bzip2recover targets. 2019-10-27 13:33:17 -04:00
Rikard Gynnerstedt
65179284ce license and version print should output to stdout and exit with code 0 2019-10-24 12:48:57 +02:00
Micah Snyder
bae2dfa931 Changes CMake duplicate install targets (bunzip, etc) to symlinks instead of file copies. 2019-09-14 22:58:37 -04:00
Micah Snyder
1de04548d0 Improves CMake formatting, removing unnecessary quotes and fixing indentation. 2019-09-14 21:19:35 -04:00
Micah Snyder
b52681fab6 Moves BZ_UNIX, BZ_LCCWIN32 defines out of bzip2.c and bzip2recover.c and into the build tooling (cmake, meson, and nmake). 2019-09-14 18:51:17 -04:00
Micah Snyder
d0dae15260 Removing hardcoded BZ_UNIX definition which broke the build on Windows. 2019-09-14 18:51:17 -04:00
Micah Snyder
af3ab6c58f CMake build tooling improvement: Adds install for bunzip, bzcat copies of bzip2, as well as shell-scripts bzdiff, bzgrep, bzmore, and their alternately named copies (not available for Windows). 2019-09-14 18:51:17 -04:00