1
0
mirror of https://gitlab.com/bzip2/bzip2.git synced 2025-08-09 13:22:45 +03:00
Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Federico Mena Quintero
636c0704c7 Merge branch 'fix_large_files_on_windows' into 'master'
Fix a 'not a normal file' error when compressing large files on Windows.

See merge request federicomenaquintero/bzip2!17
2019-06-14 13:40:50 +00:00
Federico Mena Quintero
389961dbdd testStream(): Remove unused variable 2019-06-14 07:49:46 -05:00
Phil Ross
c31711ae29 Fix a 'not a normal file' error when compressing large files on Windows.
The bzip2 command on Windows would report a 'not a normal file' error
for files of size greater than 2^32 - 1 bytes.

Use _stati64 instead of _stat so that a successful result is returned
for large files.

From: https://github.com/philr/bzip2-windows/blob/v1.0.6.1/patches/06-support_64bit_file_sizes.diff

See also: https://github.com/philr/bzip2-windows/issues/3
2019-06-08 13:04:05 +01:00
Dylan Baker
736902410a add meson build system 2019-06-06 11:10:32 -07:00
Dylan Baker
6b00476951 bzip2.c: mingw wants sys/stat.h, not sys\stat.h
MSVC (at least recent versions) doesn't seem to care about / vs \
either.
2019-06-06 08:48:47 -07:00
Wenzong Fan
a7700e70df (#10): fix bunzip2 -qt returns 0 for corrupt archives
"bzip2 -t FILE" returns 2 if FILE exists, but is not a valid bzip2 file.
"bzip2 -qt FILE" returns 0 when this happens, although it does print out
an error message as is does so.

This has been fix by Debian, just port changes from Debian patch file
"20-legacy.patch".

Debian defect:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279025

Fix item from changelog:
http://archive.debian.net/changelogs/pool/main/b/bzip2/bzip2_1.0.2-7/changelog

Fixes https://gitlab.com/federicomenaquintero/bzip2/issues/10

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
2019-06-05 19:52:28 -05:00
Mark Wielaard
5b923861db Change Julian's email address to jseward@acm.org 2019-03-30 22:56:16 +01:00
Julian Seward
962d60610c bzip2-1.0.6 2010-09-06 22:13:13 +02:00
Julian Seward
a1d78c5501 bzip2-1.0.5 2007-12-10 22:13:13 +01:00
Julian Seward
f10a33538e bzip2-1.0.4 2006-12-20 22:13:13 +01:00
Julian Seward
4d540bfc95 bzip2-1.0.3 2005-02-15 22:13:13 +01:00
Julian Seward
099d844292 bzip2-1.0.2 2001-12-30 22:13:13 +01:00
Julian Seward
795b859eee bzip2-1.0.1 2000-06-24 22:13:13 +02:00
Julian Seward
f93cd82a9a bzip2-0.9.5d 1999-09-04 22:13:13 +02:00
Julian Seward
977101ad5f bzip2-0.9.0c 1998-08-23 22:13:13 +02:00
Julian Seward
1eb67a9d8f bzip2-0.1pl2 1997-08-29 22:13:13 +02:00
Julian Seward
33d1340302 bzip2-0.1 1997-08-07 22:13:13 +02:00