]> sourceware.org Git - bzip2.git/commitdiff
Fix a 'not a normal file' error when compressing large files.
authorPhil Ross <phil.ross@gmail.com>
Tue, 21 May 2019 19:46:14 +0000 (20:46 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 9 Jul 2019 21:01:34 +0000 (23:01 +0200)
The bzip2 command line would report 'not a normal file' for files of
size larger than 2^32 - 1 bytes.

Patch bzip2.c to use _stati64 instead of _stat so that a successful
result is returned for large files.

Resolves https://github.com/philr/bzip2-windows/issues/3.

bzip2.c

diff --git a/bzip2.c b/bzip2.c
index be3b3be402968b69d3e400017edeb1b9b0abbb07..76c6c948e860d49c9131ce5b2573884481aa2f1d 100644 (file)
--- a/bzip2.c
+++ b/bzip2.c
 
 #   define NORETURN       /**/
 #   define PATH_SEP       '\\'
-#   define MY_LSTAT       _stat
-#   define MY_STAT        _stat
+#   define MY_LSTAT       _stati64
+#   define MY_STAT        _stati64
 #   define MY_S_ISREG(x)  ((x) & _S_IFREG)
 #   define MY_S_ISDIR(x)  ((x) & _S_IFDIR)
 
This page took 0.024844 seconds and 5 git commands to generate.