GNU bug report logs - #74196
maint: assume proper behavior of tolower

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: gzip; Reported by: Collin Funk <collin.funk1@HIDDEN>; dated Sun, 3 Nov 2024 23:48:02 UTC; Maintainer for gzip is bug-gzip@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Nov 2024 22:34:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 11 17:34:10 2024
Received: from localhost ([127.0.0.1]:59577 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tAcz4-00083e-KK
	for submit <at> debbugs.gnu.org; Mon, 11 Nov 2024 17:34:10 -0500
Received: from lists.gnu.org ([209.51.188.17]:54292)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1tAcz2-00083V-O7
 for submit <at> debbugs.gnu.org; Mon, 11 Nov 2024 17:34:09 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eggert@HIDDEN>)
 id 1tAcz2-0003k5-H2
 for bug-gzip@HIDDEN; Mon, 11 Nov 2024 17:34:08 -0500
Received: from mail.cs.ucla.edu ([131.179.128.66])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eggert@HIDDEN>)
 id 1tAcz0-0007DO-LM
 for bug-gzip@HIDDEN; Mon, 11 Nov 2024 17:34:08 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 3054C3C00FA8F
 for <bug-gzip@HIDDEN>; Mon, 11 Nov 2024 14:34:04 -0800 (PST)
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP
 id DHMnQn-nwyJM for <bug-gzip@HIDDEN>; Mon, 11 Nov 2024 14:34:04 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id EAABA3C00FAAC
 for <bug-gzip@HIDDEN>; Mon, 11 Nov 2024 14:34:03 -0800 (PST)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu EAABA3C00FAAC
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
 s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1731364444;
 bh=Y0E5IOzveMkI6R60BAx1L6X+d2uwE/gqrRk/osSLfWY=;
 h=Message-ID:Date:MIME-Version:To:From;
 b=Kuz76ErUK7t0dJ8qfucIWjDHR4pwzS9GL487FrSImQGhJkAGfxGAQFhb2+wbZZFC6
 rEIs7lACM9OYxVtDg5OCqylV2fYVvoSRXeFQci21XRF/qQW1vbQlu4rmipRWQ9Eky9
 T1H7p8bfci1nsidDm5ysIojShJgqWO7X+cKioaHGgvv2SmU1P+oqjUcK6lRuIyb1jM
 FsNLVuCYjDZPHrbGFHatlcR25+f1Nc+p8wL06lmPY2wUNNO1vxNgjYgNrwCZ+4J7KM
 AJ2F0MvYj3jEg/lldPyeIqP6lCTrrPJ1+Fjx32B45AdWpP2TmOXp/IzmqAm6/+//RE
 QoUxd3nhbavSQ==
X-Virus-Scanned: amavis at mail.cs.ucla.edu
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP
 id 1WTveIcRLB1y for <bug-gzip@HIDDEN>; Mon, 11 Nov 2024 14:34:03 -0800 (PST)
Received: from [192.168.254.12] (unknown [47.150.137.250])
 by mail.cs.ucla.edu (Postfix) with ESMTPSA id CAF583C00FA8F
 for <bug-gzip@HIDDEN>; Mon, 11 Nov 2024 14:34:03 -0800 (PST)
Message-ID: <b10acc82-90d8-4155-8b1a-4a6dd8e30eb1@HIDDEN>
Date: Mon, 11 Nov 2024 14:34:03 -0800
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74196: maint: assume proper behavior of tolower
To: bug-gzip@HIDDEN
References: <87v7x36fsl.fsf@HIDDEN> <87ed3qm4uo.fsf@HIDDEN>
 <87msi5vcgo.fsf@HIDDEN>
Content-Language: en-US
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <87msi5vcgo.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=131.179.128.66; envelope-from=eggert@HIDDEN;
 helo=mail.cs.ucla.edu
X-Spam_score_int: -19
X-Spam_score: -2.0
X-Spam_bar: --
X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

On 2024-11-11 10:42, Collin Funk wrote:
> I doubt MSDOS, OS2, ATARI would be supported by Gnulib.

Not only are they not supported by Gnulib, I'm sure gzip hasn't worked 
on them for decades. We just haven't bothered to rip out all the 
supporting code.




Information forwarded to bug-gzip@HIDDEN:
bug#74196; Package gzip. Full text available.

Message received at 74196 <at> debbugs.gnu.org:


Received: (at 74196) by debbugs.gnu.org; 11 Nov 2024 18:43:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 11 13:43:58 2024
Received: from localhost ([127.0.0.1]:59161 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tAZOI-0005uI-3Q
	for submit <at> debbugs.gnu.org; Mon, 11 Nov 2024 13:43:58 -0500
Received: from mail-pf1-f175.google.com ([209.85.210.175]:44505)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <collin.funk1@HIDDEN>) id 1tAZOF-0005u2-O9
 for 74196 <at> debbugs.gnu.org; Mon, 11 Nov 2024 13:43:56 -0500
Received: by mail-pf1-f175.google.com with SMTP id
 d2e1a72fcca58-720aa3dbda5so3412966b3a.1
 for <74196 <at> debbugs.gnu.org>; Mon, 11 Nov 2024 10:43:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1731350569; x=1731955369; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=QQuMsb/uO6k2d9gfdQlzcWmbTSW0yqWIdCTN10akI9I=;
 b=eUfXttDO+RYrY5tpeviuiu8wx0+u8HiGatctjfhaNfBTHZDsRtvEHipmmcnAADLU/c
 0TLI4hlLfPgZMdGpz3gYHg7AHgIF3HCNuxS8TXTcYaRq5ReD2a9cO/03MLQUCGcHSB1k
 0E6pvCDgU4qdVFIxMMfyjOg9YWtLROnubY4UoJFxlbpstpqMktgOo49TTddjCAEix+n5
 wfn8N0Cdis4PIbWJzfhbrzSW0FS8EJ0JjC7a4oONtYnRWwoDhHJRQ+A5K7xHbGLBp8+h
 eTdjdeOV6Yhgj6DqxIhsGnHnFpIgcQfC8ZcoA8PK0pD3rEvePWd6AbkgprMp4W5irqIx
 snSA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1731350569; x=1731955369;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=QQuMsb/uO6k2d9gfdQlzcWmbTSW0yqWIdCTN10akI9I=;
 b=UA+ngO+F2mvu4EgbWkynw1CBXEAHv46uPlFyx+eG+EzB63nJZaQz5uRlmR0pOyzi/V
 OH7nvfDOebDMdh8dYnt576KVXrAh214epTCjttgFTqj3kifARy1b1Saw5yz2PQ+Tdtda
 384sx8gIm7GySpvlOQsVt5oFfYW4pG7gGdNeAzZe/W6F73MJzOwGxnsg+tUqhTouS/tI
 iZC5x/l+pwO6+W9TlwtyV91kcwJ6KwSpe8ZdYj9WrUPlr/ByWldDyKs1ubdxKoMJQ7vV
 LUVj/JkSJVTDY4gdRBYh+kcT5OWKQufCpaQuzX+j+0BNWZhluUYiD23jZ+GDKFwuA/L0
 5yhQ==
X-Gm-Message-State: AOJu0YwTcRyNBsWLG7BsaKUFg9/jP3CXLGiCuxdM4zPQJeNfvTYtLbRu
 8yKjEeBpbSQJFA8QD+QnAhbYEhJI2toBkXBp5bQtFBndrYdQJXx1jAGfqA==
X-Google-Smtp-Source: AGHT+IGpw4xtLqGs67GuVD68LAmWOrNf4FwT8gqF14HeUmHojCiGrNWeKWNYwFZqDPtT/hw9zVC3KA==
X-Received: by 2002:a05:6a00:2e9e:b0:71e:5b4a:66d4 with SMTP id
 d2e1a72fcca58-724132a6546mr19440464b3a.9.1731350569314; 
 Mon, 11 Nov 2024 10:42:49 -0800 (PST)
Received: from fedora (static-198-54-134-53.cust.tzulo.com. [198.54.134.53])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-724078aaa2csm9474381b3a.57.2024.11.11.10.42.48
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 11 Nov 2024 10:42:48 -0800 (PST)
From: Collin Funk <collin.funk1@HIDDEN>
To: Simon Josefsson <simon@HIDDEN>
Subject: Re: bug#74196: maint: assume proper behavior of tolower
In-Reply-To: <87ed3qm4uo.fsf@HIDDEN> (Simon Josefsson's message of "Tue, 
 05 Nov 2024 10:01:35 +0100")
References: <87v7x36fsl.fsf@HIDDEN> <87ed3qm4uo.fsf@HIDDEN>
Date: Mon, 11 Nov 2024 10:42:47 -0800
Message-ID: <87msi5vcgo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 74196
Cc: 74196 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Hi Simon,

Simon Josefsson <simon@HIDDEN> writes:

> This is for MSDOS/OS2/WIN32/ATARI only as far as I can tell -- do we
> know that tolower() works as expected on these architectures?  What
> problem is caused by the current behaviour?  I think it would be nice to
> establish that first.

I doubt MSDOS, OS2, ATARI would be supported by Gnulib. I haven't used
them so I can't say for sure. But they are old.

> This changes strlwr(), it would be good to audit all usages of it to
> understand impact of a change.

Good point. It is only used in 'gzip_base_name' from util.c. It looks
like that is used in a few files to convert the input file name to the
archive file name. Probably needed for some proprietary systems,
although I'm not sure which ones.

Collin




Information forwarded to bug-gzip@HIDDEN:
bug#74196; Package gzip. Full text available.

Message received at 74196 <at> debbugs.gnu.org:


Received: (at 74196) by debbugs.gnu.org; 5 Nov 2024 09:03:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 05 04:03:36 2024
Received: from localhost ([127.0.0.1]:43458 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t8FTM-0008It-Fl
	for submit <at> debbugs.gnu.org; Tue, 05 Nov 2024 04:03:36 -0500
Received: from uggla.sjd.se ([178.174.241.107]:60616)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <simon@HIDDEN>) id 1t8FTJ-0008Ij-7z
 for 74196 <at> debbugs.gnu.org; Tue, 05 Nov 2024 04:03:34 -0500
DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed;
 d=josefsson.org; s=ed2303; h=Content-Type:MIME-Version:Message-ID:In-Reply-To
 :Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding
 :Content-ID:Content-Description;
 bh=33AUCohM+33TzjwxEvediMirX4Er/Cuf2rJuf2+coa0=; t=1730797413; x=1732007013; 
 b=BIreY1eUtmi69Id/jfSTYzA9gO2BpEOX+1GmrVFzpyINwFxcr/ooB/wLq98KcWDzWN37f+wGer6
 UhFGUjmQHCw==;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=josefsson.org; s=rsa2303; h=Content-Type:MIME-Version:Message-ID:
 In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:
 Content-Transfer-Encoding:Content-ID:Content-Description;
 bh=33AUCohM+33TzjwxEvediMirX4Er/Cuf2rJuf2+coa0=; t=1730797413; x=1732007013; 
 b=OIhfvrBQNO5mD/4lv8Rew1GaNuxUUg+ETTQ0BUfnyewzujgpGrmsWdDX2/UoT0YikUVteuUlB+j
 LIaSJ1rsnVwswN5T9CYZZ5qn7xptppGFb0SIv7ofQDoZAPTQBWIAjad6z/5W81IyMVG2kzQOmSTx1
 4R6ggZUoJTRrUxrp1stEuTSjMWM/QOPHd43Ken5yodJj6xtOS1mChHIojhNHkXaom0PEKA7LIc/YP
 CcyXCpUg7W0MDAnlIPZ8FbNTYAlCZjRyp5aNiWv72HNIWBKkpG08zGNyH1UrPRoPLNuY4W7dhmYeg
 TwdTpoXmJ4cfzbxizFJvp94tjRNcboB9V1D1F+c60krjq1aXeWQiXhjvfGJJNccIv9aGkYl+BsI9h
 8TFXzve4ufhfNje3epSDq8XBsYEWNXrskmdG0pmhuEP4iOhBUMYXE+iwV+2da9ECnHqZjA1ZF;
Received: from h-178-174-130-130.a498.priv.bahnhof.se ([178.174.130.130]:38818
 helo=kaka) by uggla.sjd.se with esmtpsa (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95)
 (envelope-from <simon@HIDDEN>) id 1t8FRA-0005Vz-Cn;
 Tue, 05 Nov 2024 09:01:20 +0000
From: Simon Josefsson <simon@HIDDEN>
To: Collin Funk <collin.funk1@HIDDEN>
Subject: Re: bug#74196: maint: assume proper behavior of tolower
References: <87v7x36fsl.fsf@HIDDEN>
OpenPGP: id=B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE;
 url=https://josefsson.org/key-20190320.txt
X-Hashcash: 1:23:241105:collin.funk1@HIDDEN::eNCmPVgsE/tEGKsv:Iqt7
X-Hashcash: 1:23:241105:74196 <at> debbugs.gnu.org::0yUeJypwZx/CAB10:aBBT
Date: Tue, 05 Nov 2024 10:01:35 +0100
In-Reply-To: <87v7x36fsl.fsf@HIDDEN> (Collin Funk's message of "Sun, 03 Nov
 2024 15:47:22 -0800")
Message-ID: <87ed3qm4uo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74196
Cc: 74196 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Collin Funk <collin.funk1@HIDDEN> writes:

> -#  define casemap(c) tolow(c) /* Force file names to lower case */

This is for MSDOS/OS2/WIN32/ATARI only as far as I can tell -- do we
know that tolower() works as expected on these architectures?  What
problem is caused by the current behaviour?  I think it would be nice to
establish that first.

> @@ -228,7 +228,7 @@ strlwr (char *s)
...
> -      *t = tolow ((unsigned char) *t);
> +      *t = tolower ((unsigned char) *t);

This changes strlwr(), it would be good to audit all usages of it to
understand impact of a change.

/Simon

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZyne7xQcc2ltb25Aam9z
ZWZzc29uLm9yZwAKCRBRcisI/kdFoqLdAP4xmwBUPe3XOFmK3aLTKWgtxcFT9TEJ
WjBISaav+Q0RUgEA9XMiBSNH8dYIkQzNyLJGkYVEeaqFzwjZWDJcqR9DeAY=
=nGlD
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gzip@HIDDEN:
bug#74196; Package gzip. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Nov 2024 23:47:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 03 18:47:31 2024
Received: from localhost ([127.0.0.1]:35763 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t7kJe-0002BE-Pi
	for submit <at> debbugs.gnu.org; Sun, 03 Nov 2024 18:47:31 -0500
Received: from lists.gnu.org ([209.51.188.17]:33660)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <collin.funk1@HIDDEN>) id 1t7kJd-0002B8-HL
 for submit <at> debbugs.gnu.org; Sun, 03 Nov 2024 18:47:30 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <collin.funk1@HIDDEN>)
 id 1t7kJd-00032K-9K
 for bug-gzip@HIDDEN; Sun, 03 Nov 2024 18:47:29 -0500
Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <collin.funk1@HIDDEN>)
 id 1t7kJb-0007Uk-It
 for bug-gzip@HIDDEN; Sun, 03 Nov 2024 18:47:29 -0500
Received: by mail-pf1-x433.google.com with SMTP id
 d2e1a72fcca58-72061bfec2dso3385321b3a.2
 for <bug-gzip@HIDDEN>; Sun, 03 Nov 2024 15:47:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1730677645; x=1731282445; darn=gnu.org;
 h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc
 :subject:date:message-id:reply-to;
 bh=Lds4FiA5NqfVuQylZtcIu5CDcpSvcuUHeM+hcMb2JaA=;
 b=KaWEV/YOF79HS9R3AmV9i8rmuX4ilQ7ltEquzfpNOWGgMGAKsPRJYBwtMREAROk8Bw
 48cl6M6bWIkOzM7gcu+/IFTjMStbsUmAdGsddEEfh2sY5hP6ynzMCIth7wwir+mCfgc9
 GRoPA1F2ujjfvtLAZvsJwA32b4TU4KeMAb2rVT+yaNLI3pYzB+LkGaWvqfBd8a3fasmh
 LMjP0oWz6IBEZfbmtQbg9TVeMj/1snwfcPi/JUqDigDOsFlylW/if7gd/4Y2PI8BMkVc
 7nOBZ+f5nlnvSnvpQQWCGZ4Wp+QijTf8HJb06ssIxGmSzLH/8vg9K/vy3a0TZp3xYe7r
 VmVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1730677645; x=1731282445;
 h=mime-version:user-agent:message-id:date:subject:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=Lds4FiA5NqfVuQylZtcIu5CDcpSvcuUHeM+hcMb2JaA=;
 b=ObLthxlXd0WT4C3PG/RofNQqI1hl5Sp/Un05RwlycoYceNsgxBw5XxX+pkZiJg1qAY
 Rr7eFK9P5OAAksVJrmUL5qJcXZqxLrt+xEJ6bFfnYSoxJUEV/bAtqIE9c1NqPttWSe42
 DZW4hdotE+00jTqd4VQ2gxEmRZjJmXwEUOH8wPbR0b7lUqX4VeYrwmCHN9wpwpmypxYw
 6XlWZaCTzc/KTj3oZaso0iOZM/jbyx/XKXxTf3uFfP/C+ghNv5r1xttCYp61KIpLRtjn
 dQ4TJoFo8gYUqRVFh53MkyYKTwsDNSytvEYECoQp4eO1APbAV+CuvPad81Ft2eEK9Wiy
 UFSA==
X-Gm-Message-State: AOJu0YwhfBEiD0dKSjef4sjhWrsvsYaDfFwuthZpSpwMY8YVNtGWbiyw
 70iH5Q7Ed+plz0qyDI26djCtZ6Bm4XFr+ZUw7i8VH6ry2TStz4s0czTPFA==
X-Google-Smtp-Source: AGHT+IFElk2j/OS46V30qvksKamXZohyVjGgJpgJZKYteAXy9XOEv5foOB3+gta3HTJIHxl1CDjc2A==
X-Received: by 2002:a05:6a21:9d83:b0:1d8:b962:6087 with SMTP id
 adf61e73a8af0-1dba5219014mr15983755637.10.1730677644665; 
 Sun, 03 Nov 2024 15:47:24 -0800 (PST)
Received: from fedora (static-198-54-134-111.cust.tzulo.com. [198.54.134.111])
 by smtp.gmail.com with ESMTPSA id
 41be03b00d2f7-7ee45a00514sm5803191a12.66.2024.11.03.15.47.23
 for <bug-gzip@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 03 Nov 2024 15:47:23 -0800 (PST)
From: Collin Funk <collin.funk1@HIDDEN>
To: bug-gzip@HIDDEN
Subject: maint: assume proper behavior of tolower
Date: Sun, 03 Nov 2024 15:47:22 -0800
Message-ID: <87v7x36fsl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2607:f8b0:4864:20::433;
 envelope-from=collin.funk1@HIDDEN; helo=mail-pf1-x433.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

--=-=-=
Content-Type: text/plain

Some pre-standard C implementations of tolower had undefined behavior if
the character passed to it was not an uppercase character.

This patch removes the isupper check before calling tolower since any
reasonable platform will behave correctly.

Collin


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-maint-assume-proper-behavior-of-tolower.patch

From 118dba90c89a97c4343bbf6afd19c2c92919481f Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@HIDDEN>
Date: Sun, 3 Nov 2024 15:41:46 -0800
Subject: [PATCH] maint: assume proper behavior of tolower

* gzip.h (tolow): Remove macro.
* tailor.h (casemap): Use tolower instead of tolow.
* util.c (strlwr): Likewise.
---
 gzip.h   | 2 --
 tailor.h | 8 ++++----
 util.c   | 2 +-
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/gzip.h b/gzip.h
index c895674..606b2bc 100644
--- a/gzip.h
+++ b/gzip.h
@@ -226,8 +226,6 @@ extern int save_orig_name; /* set if original name must be saved */
 #define seekable()    0  /* force sequential output */
 #define translate_eol 0  /* no option -a yet */
 
-#define tolow(c)  (isupper (c) ? tolower (c) : (c))  /* force to lower case */
-
 /* Macros for getting two-byte and four-byte header values */
 #define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8))
 #define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16))
diff --git a/tailor.h b/tailor.h
index b2878b2..5f309a8 100644
--- a/tailor.h
+++ b/tailor.h
@@ -54,7 +54,7 @@
 #  define Z_SUFFIX "z"
 #  define NO_SIZE_CHECK
 #  define UNLINK_READONLY_BUG
-#  define casemap(c) tolow(c) /* Force file names to lower case */
+#  define casemap(c) tolower(c) /* Force file names to lower case */
 #  include <io.h>
 #  define OS_CODE  0x00
 #  define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
@@ -71,7 +71,7 @@
 #    define NO_MULTIPLE_DOTS
 #    define MAX_EXT_CHARS 3
 #    define Z_SUFFIX "z"
-#    define casemap(c) tolow(c)
+#    define casemap(c) tolower(c)
 #  endif
 #  define UNLINK_READONLY_BUG
 #  include <io.h>
@@ -107,7 +107,7 @@
 #    define NO_MULTIPLE_DOTS
 #    define MAX_EXT_CHARS 3
 #    define Z_SUFFIX "z"
-#    define casemap(c) tolow(c) /* Force file names to lower case */
+#    define casemap(c) tolower(c) /* Force file names to lower case */
 #  endif
 #  define OS_CODE  0x0b
 #endif
@@ -140,7 +140,7 @@
 #    define NO_MULTIPLE_DOTS
 #    define MAX_EXT_CHARS 3
 #    define Z_SUFFIX "z"
-#    define casemap(c) tolow(c) /* Force file names to lower case */
+#    define casemap(c) tolower(c) /* Force file names to lower case */
 #  endif
 #endif
 
diff --git a/util.c b/util.c
index 6fcbf67..86de1ba 100644
--- a/util.c
+++ b/util.c
@@ -228,7 +228,7 @@ strlwr (char *s)
 {
     char *t;
     for (t = s; *t; t++)
-      *t = tolow ((unsigned char) *t);
+      *t = tolower ((unsigned char) *t);
     return s;
 }
 
-- 
2.47.0


--=-=-=--




Acknowledgement sent to Collin Funk <collin.funk1@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gzip@HIDDEN. Full text available.
Report forwarded to bug-gzip@HIDDEN:
bug#74196; Package gzip. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.