public inbox for bzip2-devel@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Joshua Watt <jpewhacker@gmail.com>
Cc: bzip2-devel@sourceware.org, Phil Ross <phil.ross@gmail.com>
Subject: _stati64 patch (Was: [PATCH] Fix include path separator)
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <20190705083857.GF4777@wildebeest.org> (raw)
In-Reply-To: <CAJdd5GZfTk8EKeUE_C1keKm+gn=qapv9OQGGariiiXP9jyu0wQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

Hi,

On Wed, Jul 03, 2019 at 03:49:45PM -0500, Joshua Watt wrote:
> I did tests with msvc 18.0 (visual studio 2013), and I can probably get
> some newer versions if you want. I can also try with mingw gcc (on Windows;
> already verified on Linux) if you like... I'm not sure what else would be a
> relevant test

There is another Windows specific patch which we haven't applied yet
to the 1.0.x branch because we don't have Windows builders/testers.

It is the attached patch from Phil Ross (CCed) to use _stati64 instead
of _stat to support large >4GB files on Windows.

If you could test the above works on your setups that would be
appreciated.  Do we need any checks to see whether _stati64 is
available? Or can it be used unconditionally as in this patch?

Thanks,

Mark

[-- Attachment #2: 0001-Fix-a-not-a-normal-file-error-when-compressing-large.patch --]
[-- Type: text/x-diff, Size: 1337 bytes --]

From c0ee33ad3d6108eb6f7ddaf71bcc22ea7a3f855f Mon Sep 17 00:00:00 2001
From: Phil Ross <phil.ross@gmail.com>
Date: Tue, 21 May 2019 20:46:14 +0100
Subject: [PATCH] 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.
---
 patches/06-support_64bit_file_sizes.diff | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 patches/06-support_64bit_file_sizes.diff

diff --git a/patches/06-support_64bit_file_sizes.diff b/patches/06-support_64bit_file_sizes.diff
new file mode 100644
index 0000000..abf1425
--- /dev/null
+++ b/patches/06-support_64bit_file_sizes.diff
@@ -0,0 +1,13 @@
+--- bzip2-1.0.6.orig/bzip2.c	2010-09-11 00:04:53.000000000 +0100
++++ bzip2-1.0.6/bzip2.c	2019-05-21 20:40:43.699892600 +0100
+@@ -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)
+ 
-- 
2.20.1


  parent reply	other threads:[~2019-07-05  8:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  0:00 [PATCH] Fix include path separator Joshua Watt
2019-01-01  0:00 ` Mark Wielaard
     [not found]   ` <CAJdd5GZfTk8EKeUE_C1keKm+gn=qapv9OQGGariiiXP9jyu0wQ@mail.gmail.com>
2019-01-01  0:00     ` Mark Wielaard [this message]
2019-01-01  0:00       ` _stati64 patch (Was: [PATCH] Fix include path separator) Joshua Watt
2019-01-01  0:00         ` Mark Wielaard
2019-01-01  0:00           ` Joshua Watt
2019-01-01  0:00             ` Mark Wielaard
2019-01-01  0:00               ` Joshua Watt
2019-01-01  0:00                 ` Mark Wielaard
2019-01-01  0:00                   ` Joshua Watt
2019-01-01  0:00     ` [PATCH] Fix include path separator Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190705083857.GF4777@wildebeest.org \
    --to=mark@klomp.org \
    --cc=bzip2-devel@sourceware.org \
    --cc=jpewhacker@gmail.com \
    --cc=phil.ross@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).