diff mbox

[config] : Activate POSIX printf/scanf by default for w64 based toolchain

Message ID CAEwic4ZoFQwZ7GiX1_DdUWi+1qDCGoE9faUZ+yxdc=bVvN8heg@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Dec. 22, 2011, 7:14 p.m. UTC
Hi,

this patch makes sure that the POSIX compatible printf/scanf faimily
routines getting actived by default for *-w64-mingw* targets.
As libstdc++ internal depends in many aspects on usage of
POSIX-printf/scanf routines, this option has to be activated
unconditionally.

ChangeLog

2011-12-22  Kai Tietz  <ktietz@redhat.com>

        * config/os/mingw32-w64/os_defines.h (__USE_MINGW_ANSI_STDIO): Define.

Tested for x86_64-w64-mingw32, and i686-w64-mingw32.  Mingw.org's
variant is unaffected by this patch.
Ok for apply?

Regards,
Kai

Comments

Jonathan Wakely Dec. 22, 2011, 7:16 p.m. UTC | #1
On 22 December 2011 19:14, Kai Tietz wrote:
>
> 2011-12-22  Kai Tietz  <ktietz@redhat.com>
>
>        * config/os/mingw32-w64/os_defines.h (__USE_MINGW_ANSI_STDIO): Define.
>
> Tested for x86_64-w64-mingw32, and i686-w64-mingw32.  Mingw.org's
> variant is unaffected by this patch.
> Ok for apply?

OK
diff mbox

Patch

Index: config/os/mingw32-w64/os_defines.h
===================================================================
--- config/os/mingw32-w64/os_defines.h  (revision 182475)
+++ config/os/mingw32-w64/os_defines.h  (working copy)
@@ -45,6 +45,12 @@ 
 #undef NOMINMAX
 #define NOMINMAX 1

+// Make sure that POSIX printf/scanf functions are activated.  As
+// libstdc++ depends on POSIX-definitions of those functions, we define
+// it unconditionally.
+#undef __USE_MINGW_ANSI_STDIO
+#define __USE_MINGW_ANSI_STDIO 1
+
 #if defined (_GLIBCXX_DLL)
 #define _GLIBCXX_PSEUDO_VISIBILITY_default __attribute__ ((__dllimport__))
 #else