Skip to content

Commit

Permalink
Fix a 'not a normal file' error when compressing large files.
Browse files Browse the repository at this point in the history
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 philr/bzip2-windows#3.
  • Loading branch information
philr authored and zhaoxiu-zeng committed Jan 20, 2022
1 parent a7b82cf commit fa1a93f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bzip2.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@

# 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)

Expand Down

0 comments on commit fa1a93f

Please sign in to comment.