bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MSYS2/MINGW64 large file support


From: Bruno Haible
Subject: Re: MSYS2/MINGW64 large file support
Date: Fri, 24 Jan 2020 18:53:14 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

Hi,

John Donoghue wrote:
> Running a non cross configure and make works, and running the binary:
> ./bigtest
> test big file
> sizeof(off_t)=8
> seek status=0
> tell pos=5368709120
> 
> 
> Running a cross configure: ./configure  --host=x86_64-w64-mingw32 and then 
> make created bigtest.exe
> Copying that to a msys2/mingw64 install from yesterday and running 
> ./bigtest.exe fails:
> 
> ./bigtest.exe
> test big file
> sizeof(off_t)=8
> seek status=-1
> tell pos=0

Looks like a largefile/fseek/ftell problem indeed.

The Gnulib documentation
https://www.gnu.org/software/gnulib/manual/html_node/fseek.html
https://www.gnu.org/software/gnulib/manual/html_node/ftell.html
tells you that these problems are not solved by requesting the modules
'fseek' and 'ftell'. But that you need 'fseeko' and 'ftello' instead.

These are the lines that you will need to change:

>     int status = fseek(f, 0, SEEK_END);
> ...
>     off_t p = ftell(f);
> ...
> ./gnulib/gnulib-tool  --import fseek ftell largefile stdio

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]