From patchwork Fri Feb 25 12:35:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 51394 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EFD713857C4F for ; Fri, 25 Feb 2022 12:36:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFD713857C4F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1645792582; bh=ouYwCmle0FtI2/0RHk35kRIZS83hVktNGm/ENKFarzk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ano1KyUxUngfUuURoxGWqwxgbBi1I4vEzOr7+nM62T3owIkqpS/2OJ9AzMaVsn7Mx wTyLJjXidf/Czjt2LxfNbD6THaq4BBzQy5QTqFJPi4wrV9ScriHFl9khp4GHPqqnjk 2ocz1VCOuvXk9uQYogD3D0C2VulEp4XM8nbnMyPw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 437233858414 for ; Fri, 25 Feb 2022 12:36:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 437233858414 Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-361-KlM-LnvsMh6zpEXZs5SQJg-1; Fri, 25 Feb 2022 07:35:58 -0500 X-MC-Unique: KlM-LnvsMh6zpEXZs5SQJg-1 Received: by mail-il1-f200.google.com with SMTP id j7-20020a92ca07000000b002c2b8f24cffso252641ils.9 for ; Fri, 25 Feb 2022 04:35:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ouYwCmle0FtI2/0RHk35kRIZS83hVktNGm/ENKFarzk=; b=I+mg5eu9BJu0UaPHT5429cRxDbWD/WCTEgFTwYfl/vPbBHDRohWSc6Irxaqeyo2d5V RYghD3viUcl2NdkOcCCgfgPGajFz7QXnXCmq8iexMqfhJnvWxOypVmzVXZkwgi+0+/fR Wv3gZw87lxKmF8+FYilubGoLONbmrMKXsybCFAvnIVBxFjWfPdwOXx17Bc1/fGya5UtZ UG8I2t+GCFTUnLEF7Kr1etA6cKUqXzrxQxDbXLRXzZgS+6BCvCeS23VwwJouxoZ1XnK6 WBVrmh5vRc8yA1P9KoCYIqk3uvZ08waKW5LsTXPslyAOzwYc2Qma4+62U0E6uDY9WhsM yjRw== X-Gm-Message-State: AOAM531TjfWA5oOAUxXoKT1eN7Ct0W6QppJQLvu8jiC/teyfZmYdVBIn Jru/7myrtv2KNC/iUFQD3qmArMnq3drM7fO7uk3TEzVLJ0NLbrtTyNzyoESDsZc40VQi3eRudkC oocEK8H3kk0XB23n7bJHTDL2+3bljc8btuzY3UTtdoFxsfIIXhGoj1H1Uz2fZg11le1FWSg== X-Received: by 2002:a02:cc55:0:b0:311:bd14:fe74 with SMTP id i21-20020a02cc55000000b00311bd14fe74mr5849123jaq.84.1645792557813; Fri, 25 Feb 2022 04:35:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMcBffzxczZnDcWhXzYz9k6s5m7z0cWVLCm6/Q7+XMd3h/Dam9J0YV0dQH+M9N5evtlpUM0Q== X-Received: by 2002:a02:cc55:0:b0:311:bd14:fe74 with SMTP id i21-20020a02cc55000000b00311bd14fe74mr5849073jaq.84.1645792556510; Fri, 25 Feb 2022 04:35:56 -0800 (PST) Received: from athas.redhat.com (135-23-175-80.cpe.pppoe.ca. [135.23.175.80]) by smtp.gmail.com with ESMTPSA id a2-20020a056e02120200b002c21a18437csm1535994ilq.40.2022.02.25.04.35.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 04:35:55 -0800 (PST) To: libc-alpha@sourceware.org Subject: [COMMITTED v3 0/2] Improve LC_MONETARY handling. Date: Fri, 25 Feb 2022 07:35:52 -0500 Message-Id: <20220225123554.964847-1-carlos@redhat.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Carlos O'Donell via Libc-alpha From: Carlos O'Donell Reply-To: Carlos O'Donell Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" In glibc 2.35 we released C.UTF-8, but if you try to compile the locale without '-c' you get the following error: localedef -i C -f UTF-8 C.UTF-8 [error] LC_MONETARY: value for field `mon_decimal_point' must not be an empty string [error] no output file produced because errors were issued The first patch in the series fixes bug 28845 and cleans up LC_MONETARY handling in ld-monetary.c (monetary_finish) for default values and generated errors. In general we downgrade the errors and make them warnings. Lastly, to prevent this from happening again we remove the '-c' from glibc localedef uses since we do not want to force output generation and we should always have locales that compile cleanly. Where locales are not clean we should implement specific warning disabling e.g. --no-warnings=ascii for SHIFT_JIS and SHIFT_JISX0213 (non-ascii locales). Any future locale warnings should fail during locale compilation (install or testing). Changes from v2: - Fixed comment "terminating -1" to "CHAR_MAX". Changes from v1: - Fix spelling mistakes in ld-monetary.c - Expand comments for mon_grouping to explain "\177" oddity. - Keep @flags="" in Makefile for future debugging uses. Carlos O'Donell (2): localedef: Update LC_MONETARY handling (Bug 28845) localedata: Do not generate output if warnings were present. locale/programs/ld-monetary.c | 182 +++++++++++++++++++++++++++------- localedata/Makefile | 4 +- localedata/gen-locale.sh | 10 +- 3 files changed, 156 insertions(+), 40 deletions(-)