This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]