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: 777849 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wrx591T7Gz9s76 for ; Tue, 20 Jun 2017 02:19:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="bgjz1XM8"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; q=dns; s=default; b= oQRiWr2ZW44Qe+T28QUF0ZYCD1qlnIA91eaKQtNVtAGbLJ3uGIwF9oU1BbmMAiQ1 UkJDh7GrMO3NOSvepG8q4J8B1g32CwO8kDc58V/Y04eTIj8DF4pBW1CRB1LascrJ jLojuxDInFT/NdmmBcDF+J8Gq+m7FgCAwRhoiGuy/RA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; s=default; bh=7PgGbP 1BpqrkP3fA0wdNBtniLfs=; b=bgjz1XM8DrjUkLgnbdoE1vTF06Wn+bFqNi4JGT RAcdsXjTaZUHCsqTmYAf47RldI+D/h51RR3h4xpyAEkw4UtwGIYZ3o5NBo+otEeK IAeZbHG/eGAgpMiPB4rGSi33FFpncMp33VNSXcZ+dcPhx/HfsS9vJ2lMF3yqWcBI r5JEc= 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. */