_stati64 patch (Was: [PATCH] Fix include path separator)

Joshua Watt jpewhacker@gmail.com
Tue Jan 1 00:00:00 GMT 2019


On 7/9/19 4:11 PM, Mark Wielaard wrote:
> Hi Joshua,
>
> On Tue, 2019-07-09 at 10:00 -0500, Joshua Watt wrote:
>> On 7/5/19 3:38 AM, Mark Wielaard wrote:
>>> 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?
>> The patch compiles without issues using msvc 18.0 (Visual Studio 2013)
>> and 64-bit MinGW gcc 7.3.0. 'make test' passes also.
> Thanks for the extra testing. Lets apply this patch then.
> It would be good to be able to handle large files on Windows too.
>
>> The "patch in a patch" format was a little confusing at first :)
> Oops, sorry, I wanted to make sure I cherry-picked the original patch
> from Phil, but in doing so, I got the patch-in-patch variant. I applied
> the straight diff one (as attached) so that the source matches what was
> applied on the 1.1.x branch.
>
> BTW. I don't know much about windows, and I assume it doesn't ship with
> bash. But maybe you could take a peek at the bzip2-tests repository and
> see if you could somehow make that work on Windows?
> https://sourceware.org/git/bzip2-tests.git

Windows isn't really my preferred OS either; I'm tasked with maintaining 
an embedded Linux cross compiling environment for Windows as part of my 
day job, so I end up dealing with it more that I would perhaps like :)

Anyway, the good news is that you don't really need to make any changes 
to the bzip2-tests repo; it works fine on Windows as is. As previously 
stated, I compiled bzip2 using MinGW (http://www.mingw.org/). There is 
also a related project called msys (http://www.mingw.org/wiki/MSYS) that 
will give you a traditional bash shell (as well as most other standard 
utilities) in Windows. The run-tests.sh script works just fine there and 
all the tests pass, using a build of bzip2 from b07b105 ("Accept as many 
selectors as the file format allows.").


>
> Cheers,
>
> Mark



More information about the Bzip2-devel mailing list