summaryrefslogtreecommitdiffstats
path: root/newlib
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-08-10 09:37:32 +0000
committerCorinna Vinschen <corinna@vinschen.de>2012-08-10 09:37:32 +0000
commitc9ace3130c04171d5112008faa5337897e260c30 (patch)
tree43b0a4c62574148068fe66048424b4fc025ad4d7 /newlib
parent52d2371da52be037af8020220650645df497d90d (diff)
downloadcygnal-c9ace3130c04171d5112008faa5337897e260c30.tar.gz
cygnal-c9ace3130c04171d5112008faa5337897e260c30.tar.bz2
cygnal-c9ace3130c04171d5112008faa5337897e260c30.zip
* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Fix guard around state to
allow usage in !FLOATING_POINT && _WANT_IO_C99_FORMATS case.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/stdio/vfwprintf.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 2be47231f..cc8e7dccc 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Fix guard around state to
+ allow usage in !FLOATING_POINT && _WANT_IO_C99_FORMATS case.
+
2012-08-08 Eric Blake <eblake@redhat.com>
* libc/posix/engine.c(dissect): Guard diagnostic pragma for right
diff --git a/newlib/libc/stdio/vfwprintf.c b/newlib/libc/stdio/vfwprintf.c
index 7d38ecf82..968c218b5 100644
--- a/newlib/libc/stdio/vfwprintf.c
+++ b/newlib/libc/stdio/vfwprintf.c
@@ -399,8 +399,8 @@ _DEFUN(_VFWPRINTF_R, (data, fp, fmt0, ap),
wchar_t thousands_sep = L'\0';
const char *grouping = NULL;
#endif
-#if defined (FLOATING_POINT) && defined (_MB_CAPABLE) \
- && !defined (__HAVE_LOCALE_INFO_EXTENDED__)
+#if defined (_MB_CAPABLE) && !defined (__HAVE_LOCALE_INFO_EXTENDED__) \
+ && (defined (FLOATING_POINT) || defined (_WANT_IO_C99_FORMATS))
mbstate_t state; /* mbtowc calls from library must not change state */
#endif
#ifdef FLOATING_POINT