DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 52OHD0a72368406 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 52OHD0a72368406 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=GjUE8PAn X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6148F385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1742836378; bh=lNXjBupmlseaXjVOoMLU/+DgVqktMzl+P97mh1VtNZI=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GjUE8PAn+Vabpu/p9df3xFx7i5zmmz2PuFxwm7Dxr3s0DWYJy8TFw3rr3thQ9FWOo dyWja5O8WTeyVwF+7RgaC5GMZbTFJ9LsPKgh6iuGQbOlw4bEbHGrDMUqfjJZqib3LN tHjCUnS3AhOqJBPHx4h1FqV6vJXqxNjrAiWXP4ts= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FCCF3858424 Date: Mon, 24 Mar 2025 18:12:30 +0100 To: cygwin AT cygwin DOT com Subject: Re: two bugs in getlocalename_l Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: <4134860 DOT iTQEcLzFEP AT nimes> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4134860.iTQEcLzFEP@nimes> X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Mar 24 14:12, Bruno Haible via Cygwin wrote: > Hi, > > It's good to see the addition of getlocalename_l from POSIX [1] in Cygwin 3.6.0. > > [1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/getlocalename_l.html > > However, there are two bugs: > > > - "If > the value is LC_ALL or is not a supported locale category value (see > <>), <> shall fail." > No, that's now how it is specified. > specified it this > way, but added the > LC_ALL support. Drat. I implemented this prior to id=1741. This is unfortunate. Without LC_ALL, only a single per-thread buffer of size ENCODING_LEN+1 was required to allow LC_GLOBAL_LOCALE. With LC_ALL and with the extra requirement that only a call to getlocalename_l(LC_GLOBAL_LOCALE) overwrites the per-thread LC_GLOBAL_LOCALE string buffer, we now need 2 per-thread buffers of size _LC_LAST * (ENCODING_LEN+1). > - "<> is POSIX-1.2008 since Base Specification Issue 8" > No, it was introduced in POSIX-1.2024. Yeah, that was temporary because the nameof the new standard wasn't known at the time I added this. Thanks, Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple