From patchwork Mon Jun 19 16:19:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 21102 Received: (qmail 84146 invoked by alias); 19 Jun 2017 16:19:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 84125 invoked by uid 89); 19 Jun 2017 16:19:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 45CEF80471 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@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 45CEF80471 Date: Mon, 19 Jun 2017 18:19:30 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] vfprintf: Reduce WORK_BUFFER_SIZE for wchar_t builds User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20170619161930.5E4C6402AEC0E@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) 2017-06-19 Florian Weimer * 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. */