________________________________________ From: Bruno Haible [br...@clisp.org] Sent: Friday, January 24, 2020 12:53 PM To: bug-gnulib@gnu.org; John Donoghue Subject: Re: MSYS2/MINGW64 large file support
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 I will change it to do that - the real issue I am seeing is actually using fseeko - but with other modules included - it just looked like I could mimic the same behaviour using a simpler code project. I will take another look at the original issue I was seeing and see if I can identify at what place the issue occurs and post a new thread Thanks for the help