ThorstenOtto wrote:How gcc was configured does not have much influence on this. It's more related which Win32 header files were used. The header files from the Mingw32 project do not have any option to make the type off_t 64-bit, you have to use explicit functions like fseeko64()/ftello64. Unlike unix, there is no way to automatically get 64-bit support for all file operations by defining _LARGEFILE_SOURCE and/or _FILE_OFFSET_BITS.
Are you sure of this ? Because I don't explicitly uses fseeko64/ftello64 and yet my version has 64 bit offsets.
Or maybe it's some mingw's headers that alias fseeko to fseeko64 in my case and not in Christer's case ?
EDIT : the mingw's include file handles _FILE_OFFSET_BITS, see sys-root/mingw/include/stdio.h
Code: Select all
#if (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64))
#define fseeko fseeko64
#endif /* (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)) */
And then I see that Hatari's cmake define both -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 (if you looks in the files "flags.cmake" in various directory) :
src/tools/hmsa/CMakeFiles/hmsa.dir/flags.make
Code: Select all
C_FLAGS = -Wcast-qual -Wbad-function-cast -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wall -Wwrite-strings -Wsign-compare -Wformat-security -O3 -DNDEBUG -I/home/npomarede/src/hatari-work/src -I/home/npomarede/src/hatari-work/src/includes -I/home/npomarede/src/hatari-work/src/debug -I/usr/include/SDL -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
So, maybe sthg is missing in Christer's stdio.h for mingw ?