From nobody Fri Sep 12 19:09:33 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cNkWl44BLz62fJ0 for ; Fri, 12 Sep 2025 19:09:55 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from gid2.gid.co.uk (ns0.gid.co.uk [IPv6:2001:470:94de::240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gid2.gid.co.uk", Issuer "gid2.gid.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cNkWk6K9rz46Rd; Fri, 12 Sep 2025 19:09:54 +0000 (UTC) (envelope-from rb@gid.co.uk) Authentication-Results: mx1.freebsd.org; none Received: from mx0.gid.co.uk (mx0.gid.co.uk [194.32.164.250]) by gid2.gid.co.uk (8.15.2/8.15.2) with ESMTP id 58CJ9m0Z015163; Fri, 12 Sep 2025 20:09:48 +0100 (BST) (envelope-from rb@gid.co.uk) Received: from smtpclient.apple ([194.32.164.24]) by mx0.gid.co.uk (8.14.2/8.14.2) with ESMTP id 58CJ9hNU008625; Fri, 12 Sep 2025 20:09:43 +0100 (BST) (envelope-from rb@gid.co.uk) Content-Type: text/plain; charset=utf-8 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: d549de769055 - main - libc: Remove readdir_r(3) [This broke building rust 1.88] From: rb@gid.co.uk In-Reply-To: <86qzwcgcmp.fsf@ltc.des.dev> Date: Fri, 12 Sep 2025 20:09:33 +0100 Cc: Olivier Certner , FreeBSD Current , Alan Somers , Toomas Soome Content-Transfer-Encoding: quoted-printable Message-Id: References: <1F6A4621-1505-4F78-97C6-85EA556B2165.ref@yahoo.com> <4148862.BRNeRiNLvY@ravel> <0F481EDD-24F4-4F2C-BCBB-9B016DD313F3@gid.co.uk> <86qzwcgcmp.fsf@ltc.des.dev> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3826.700.81) X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cNkWk6K9rz46Rd Hi, > On 12 Sep 2025, at 11:59, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Bob Bishop writes: >> And while I=E2=80=99m here, POSIX.1 defines for readdir_r (and = readdir): >>=20 >> [EOVERFLOW] >> One of the values in the structure to be returned cannot be = represented correctly. >>=20 >> =E2=80=A6which I think would cover the case of indeterminate = NAME_MAX/PATH_MAX for readdir_r. >=20 > No, because readdir_r() has no way of knowing the size of the buffer > that was passed to it. It doesn=E2=80=99t need to know. If NAME_MAX is defined, the user must supply an adequately sized buffer = (based on NAME_MAX) or shoot themselves in the foot. If NAME_MAX is indefinite, readdir_r() returns EOVERFLOW immediately. > [=E2=80=A6] -- Bob Bishop rb@gid.co.uk