From patchwork Thu Feb 24 21:45:45 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: 51374 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 A899439484A1 for ; Thu, 24 Feb 2022 21:46:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A899439484A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1645739201; bh=gf6AdgezS792VRsL3oPuFA0Rz+WlQocLipalPkZpcVg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ArWpmyaR1gcU84TJeMPPka53TmQjGwsX0o4zk691AVCElMjyoMd3h56YwyVu28lus wOIr3TbxLlm6fC11stvCxchPhjd/qy8pbVT+Z8U7fL+bqW34jA433ddkNiVdMm5Zt9 ZOw09JeWESw74p/HktqD9rgDu6LMMJN9C1+UlhEE= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 2EC46394743F for ; Thu, 24 Feb 2022 21:46:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2EC46394743F Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-362-UCTqm8RZN6uSLaCL8tvnGQ-1; Thu, 24 Feb 2022 16:46:19 -0500 X-MC-Unique: UCTqm8RZN6uSLaCL8tvnGQ-1 Received: by mail-qv1-f71.google.com with SMTP id jr12-20020a0562142a8c00b0042d7901650cso4163423qvb.17 for ; Thu, 24 Feb 2022 13:46:19 -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=gf6AdgezS792VRsL3oPuFA0Rz+WlQocLipalPkZpcVg=; b=4WvlcnX0V9OVbHMelEDeJg3Si1wOTbEgQeEcG8e/Mtm98M855uqB9oX5c14eV5Co0e ZzSFlWc6nWLQh36faxPts0Jslj1TWR4Z/sCE4rRWpbzPkgerRorSEh+aVvu2KsENvi4+ nQuV7xKl8zSqjU8VUnRtxT6wsJMvjceW/y9w4kjOalGdQR5NI5YqI18EvobY3HjoXoSU EU0kvasAiMxMyMMIAI1/aRamAqm0ImbFtqhRjKCjmrHbhIFBoHbf4YC391/2DNUT6X/p wdHyoH1wLIocHMQibP6gCtueahiAQ3IPh3oIZTPx5Vd7ASyLqAE4wxSB75uEqnbggPxU ihRw== X-Gm-Message-State: AOAM531Y73Q/e6STbXwukOFB/n9Cq5E66YHMqk1UH/hBFShXKWMNv9rK fwAaz/2PxTwFE35jHE/uSxJ/veCbLke8eAaYT+vhOFjGtUu5L8mzy4SPY+UFE1EafuNuBaqO2eG 47mfykP2zoGAuoFbYynJgVUK3+XqMQbqDK3qU43z+ScJpBFYO+u+T0hmILZ+UwF/utP2Fzg== X-Received: by 2002:a05:622a:15cc:b0:2de:8dbd:8b3 with SMTP id d12-20020a05622a15cc00b002de8dbd08b3mr4336061qty.524.1645739178975; Thu, 24 Feb 2022 13:46:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLnkJTb0QAdMoKJcZBqi35JnOy/WeAjYO0ZhjNm+gMexWlNlCeWQSvSe+dBjDrTt1ivgZZ7A== X-Received: by 2002:a05:622a:15cc:b0:2de:8dbd:8b3 with SMTP id d12-20020a05622a15cc00b002de8dbd08b3mr4336044qty.524.1645739178650; Thu, 24 Feb 2022 13:46:18 -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 f7-20020a05622a104700b002d4b318692esm316117qte.31.2022.02.24.13.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 13:46:17 -0800 (PST) To: libc-alpha@sourceware.org, dj@redhat.com Subject: [PATCH v2 0/2] Improve LC_MONETARY handling. Date: Thu, 24 Feb 2022 16:45:45 -0500 Message-Id: <20220224214547.911386-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 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 | 3 +- localedata/gen-locale.sh | 10 +- 3 files changed, 155 insertions(+), 40 deletions(-)