This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[patch config]: Activate POSIX printf/scanf by default for w64 based toolchain
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Thu, 22 Dec 2011 20:14:39 +0100
- Subject: [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