This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] vfprintf: Reduce WORK_BUFFER_SIZE for wchar_t builds
- From: fweimer at redhat dot com (Florian Weimer)
- To: libc-alpha at sourceware dot org
- Date: Mon, 19 Jun 2017 18:19:30 +0200
- Subject: [PATCH] vfprintf: Reduce WORK_BUFFER_SIZE for wchar_t builds
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 45CEF80471
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 45CEF80471
2017-06-19 Florian Weimer <fweimer@redhat.com>
* stdio-common/vfprintf.c (WORK_BUFFER_SIZE): Reduce size for
wchar_t builds.
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index c43326c..76614fc 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -204,7 +204,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. */