[PATCH 00/11] C++/MinGW patches

Qian Hong fracting@gmail.com
Mon Nov 2 21:17:00 GMT 2015


Hi Pedro, thanks a lot for the reply!

On Tue, Nov 3, 2015 at 4:46 AM, Pedro Alves <palves@redhat.com> wrote:
> It just looks like msvcrt.dll's printf prints using an
> unexpected format?  Maybe building the test program with
> __USE_MINGW_ANSI_STDIO defined fixes it.  Could you try that?


Yes, msvcrt.dll's printf has a different format than gcc Linux.
I just tried your suggestion but it doesn't make a change, later then
I use __mingw_printf to write a small test case, and found MinGW also
emulate msvcrt's format.

#include <stdio.h>
int main()
{
    double x = 3.40282e+038;
    __mingw_printf("%.5e\n", x);
}

$ i686-w64-mingw32-gcc  test2.c -o test2.exe

$ wine test2.exe # same result on Windows, just tested
3.40282e+038


-- 
Regards,
Qian Hong

-
http://www.winehq.org



More information about the Gdb-patches mailing list