From: Florian Weimer Date: Thu, 29 Jun 2017 07:34:22 +0000 (+0200) Subject: vfprintf: Reduce WORK_BUFFER_SIZE for wchar_t builds X-Git-Tag: upstream/2.30~3135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08d01cae60aa3966ed21e6ec70bbe9fef730e012;p=platform%2Fupstream%2Fglibc.git vfprintf: Reduce WORK_BUFFER_SIZE for wchar_t builds --- diff --git a/ChangeLog b/ChangeLog index 5e2cc46..db0c4ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2017-06-29 Florian Weimer + * stdio-common/vfprintf.c (WORK_BUFFER_SIZE): Reduce size for + wchar_t builds. + +2017-06-29 Florian Weimer + * stdio-common/tst-vfprintf-mbs-prec.c: New file. * stdio-common/Makefile (tests): Add tst-vfprintf-mbs-prec. diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index b8c87a5..4e22c75 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -205,7 +205,7 @@ typedef wchar_t THOUSANDS_SEP_T; static const CHAR_T null[] = L_("(null)"); /* Size of the work_buffer variable (in characters, not bytes. */ -enum { WORK_BUFFER_SIZE = 1000 }; +enum { WORK_BUFFER_SIZE = 1000 / sizeof (CHAR_T) }; /* This table maps a character into a number representing a class. In each step there is a destination label for each class. */