summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Ross <phil.ross@gmail.com>2019-05-21 20:46:14 +0100
committerMark Wielaard <mark@klomp.org>2019-07-09 23:01:34 +0200
commit13d8bce0393ca21cbca1e8ba7692466a64fd46dd (patch)
tree1faaecfd8b1a07289fa0542be0db2c15791559cc
parentUpdate prepare-release.sh for Makefile* and date ranges. (diff)
downloadbzip2-13d8bce0393ca21cbca1e8ba7692466a64fd46dd.tar.gz
bzip2-13d8bce0393ca21cbca1e8ba7692466a64fd46dd.tar.bz2
bzip2-13d8bce0393ca21cbca1e8ba7692466a64fd46dd.tar.xz
Fix a 'not a normal file' error when compressing large files.
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.
-rw-r--r--bzip2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bzip2.c b/bzip2.c
index be3b3be..76c6c94 100644
--- a/bzip2.c
+++ b/bzip2.c
@@ -132,8 +132,8 @@
132 132
133# define NORETURN /**/ 133# define NORETURN /**/
134# define PATH_SEP '\\' 134# define PATH_SEP '\\'
135# define MY_LSTAT _stat 135# define MY_LSTAT _stati64
136# define MY_STAT _stat 136# define MY_STAT _stati64
137# define MY_S_ISREG(x) ((x) & _S_IFREG) 137# define MY_S_ISREG(x) ((x) & _S_IFREG)
138# define MY_S_ISDIR(x) ((x) & _S_IFDIR) 138# define MY_S_ISDIR(x) ((x) & _S_IFDIR)
139 139