Your message dated Wed, 16 Jan 2008 13:47:29 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Bug#306210: Test program working with current mingw32
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: mingw32
Version: 3.4.2.20040916.1-2
Severity: normal
Hi,
there is a problem with the binaries created by the cross-compiler; if
they use the standard C++ library to access big files, seeking beyond
4GB does not appear to work.
For a loong time, this was an upstream problem, but it was fixed with
mingw.org's 3.4.0 release. Unfortunately, it still happens with
binaries that I cross-compile from Debian. :-(
The small program below prints the correct value "63" when compiled
under Windows XP using mingw.org's binaries, but prints "-1
strerror: no error" (i.e. EOF) when cross-compiled.
Working configurations on Windows were all the post-3.4.0 ones that I
tried. Today, I specifically re-checked that the following results in
working binaries:
gcc-core-3.4.1-20040711-1.tar.gz
gcc-g++-3.4.1-20040711-1.tar.gz
w32api-2.5.tar.gz
mingw-runtime-3.3.tar.gz
gcc-core-3.4.2-20040916-1.tar.gz
gcc-g++-3.4.2-20040916-1.tar.gz
w32api-2.5.tar.gz (sorry, forgot upgrading that)
mingw-runtime-3.7.tar.gz
"g++ -v" prints this:
Reading specs from C:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as
--host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls
--enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry
--disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt
--without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter
--enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
A fix for this would be very much appreciated!! - Compiling on Windows
with MSYS is such a PITA! :-/
----------------------------------------------------------------------
#include <fstream>
#include <iostream>
#include <string.h>
using namespace std;
int main() {
fstream f("testfile", ios::binary|ios::in|ios::out|ios::trunc);
#ifdef __MINGW32__
unsigned long long left = 0x100001000ULL;
char buf[4096];
memset(buf, 0, 4096);
f.write(buf, 4096);
f.write("[EMAIL PROTECTED]", 10); // 64 aka '@' at 0x1004
f.write(buf, 4096 - 10);
left -= 8192;
while (left > 0) {
f.write(buf, 4096);
left -= 4096;
}
#else
f.seekp(0x100001000ULL);
#endif
f.write("YADA?YADA!", 10);
f.seekg(0x100001004ULL);
cout << f.get() << endl; // Should print 63 for the '?' at 0x100001004
cout << "strerror: " << strerror(errno) << endl;
}
----------------------------------------------------------------------
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (990, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.27
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-15)
Versions of packages mingw32 depends on:
ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an
ii mingw32-binutils 2.15.94-20050118.1-1 Minimalist GNU win32 (cross) binut
ii mingw32-runtime 3.7-1 Minimalist GNU win32 (cross) runti
-- no debconf information
--- End Message ---
--- Begin Message ---
On Wed, Jan 16, 2008 at 10:56:28AM +0100, Vincent Bernat wrote:
> I have just tested the test program on a Windows XP platform. I get a
> 4GB file and the program ends with:
> 63
> strerror: No error
>
> Therefore, I suppose the bug can be closed.
I haven't tested it myself, but I have no reason not to believe you. :)
Thanks for trying it out - yes, I'm closing this bug.
Cheers,
Richard
--
__ _
|_) /| Richard Atterer
| \/¯| http://atterer.net
¯ '` ¯
--- End Message ---