A very good day to You,
I stumbled upon a little problem when trying to read binary data from a file with a program compiled using the MinGW-w64 32-bit compiler (the one currently distributed with Qt - build-info is attached as a separate file) running under a Windows 10 64-bit system.
An MWI is attached as well - it first creates a file with meaningless data and then tries to read part of it back. The part to read is 2 times 4 bytes, i.e. 8 bytes total. Querying _ftelli64() afterwards however returns only "7" for me if the file stream is buffered (the default).
The MinGW-w64 64-bit compiler returns "8" (as does a current MSVC). For an unbuffered stream MinGW-w64 32-bit also returns "8".
Am I doing something wrong? Did I overlook something in the documentation which should prevent me from using _ftelli64() in this fashion? Or might this be a problem of Microsoft Windows 10 in relation with the MinGW-w64 32-bit compiler?
Feedback would be very much appreciated,
J. Wilde
I should probably add that
ftello64returns "8" for all tested compilers.Hi. I am seeing this exact same bug. It occurs only with the 32-bit compiler (the 64-bit compiler is fine) and the executables fail exactly the same way whether they are run on Wine or an XP VM (which I assume means they'll fail anywhere they will run). I grabbed the MS demo of ftell() and modified it to demonstrate with just a few lines:
Cheers!