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