From: JonY <jo...@us...> - 2012-10-26 13:12:19
|
On 10/25/2012 17:17, JonY wrote: > On 10/25/2012 15:04, Ruben Van Boxem wrote: >> Currently, trunk has several new features, some of which have matured quite >> a while ago (I'm looking at you, large file support for C streams). It also >> has some more WIP stuff. >> > > If any branching is going to happen, please hold on, I'm still doing > some final testing on the vswprintf fix for libstdc++ to_string. > > Well, it shouldn't break anything since it wasn't working before anyway. Patch to trunk CRT, I can't commit until it's tested enough. Index: crt/stdio.h =================================================================== --- crt/stdio.h (revision 5433) +++ crt/stdio.h (working copy) @@ -742,12 +742,22 @@ return __mingw_vwprintf( __format, __local_argv ); } +/* For libstdc++ */ +#if defined(__cplusplus) && (__cplusplus >= 201103L) && defined(__GNUC__) __mingw_ovr +/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) +int vswprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); +} +#else +__mingw_ovr /* __attribute__((__format__ (gnu_printf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) int vswprintf (wchar_t *__stream, const wchar_t *__format, __builtin_va_list __local_argv) { return __mingw_vswprintf( __stream, __format, __local_argv ); } +#endif /* defined(__cplusplus) && (__cplusplus >= 201103L) && defined(__GNUC__) */ #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ __mingw_ovr Index: crt/wchar.h =================================================================== --- crt/wchar.h (revision 5433) +++ crt/wchar.h (working copy) @@ -568,12 +568,22 @@ return __mingw_vwprintf( __format, __local_argv ); } +/* For libstdc++ */ +#if defined(__cplusplus) && (__cplusplus >= 201103L) && defined(__GNUC__) __mingw_ovr -/* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) +/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) +int vswprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); +} +#else +__mingw_ovr +/* __attribute__((__format__ (gnu_printf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) int vswprintf (wchar_t *__stream, const wchar_t *__format, __builtin_va_list __local_argv) { return __mingw_vswprintf( __stream, __format, __local_argv ); } +#endif /* defined(__cplusplus) && (__cplusplus >= 201103L) && defined(__GNUC__) */ /*#ifndef __NO_ISOCEXT */ /* externs in libmingwex.a */ __mingw_ovr |