NetBSD Problem Report #58613

From www@netbsd.org  Sat Aug 17 19:42:18 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 642AA1A9243
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 17 Aug 2024 19:42:18 +0000 (UTC)
Message-Id: <20240817194217.21BFC1A9244@mollari.NetBSD.org>
Date: Sat, 17 Aug 2024 19:42:17 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: c*rtomb, mbrtoc* should have locale-parametric _l variants
X-Send-Pr-Version: www-1.0

>Number:         58613
>Category:       lib
>Synopsis:       c*rtomb, mbrtoc* should have locale-parametric _l variants
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    riastradh
>State:          needs-pullups
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 17 19:45:00 +0000 2024
>Closed-Date:    
>Last-Modified:  Sat Aug 17 23:29:48 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The c32rtonetbsd_l Foundation
>Environment:
>Description:
The new functions

- c8rtomb, mbrtoc8
- c16rtomb, mbrtoc16
- c32rtomb, mbrtoc32

which are part of C11 (C23, for the c8 ones) should have variants

- c8rtomb_l, mbrtoc8_l
- c16rtomb_l, mbrtoc16_l
- c32rtomb_l, mbrtoc32_l

that take the locale as a parameter, like FreeBSD has.  This is a nonstandard extension but it's an obvious one.
>How-To-Repeat:
thinking about it
>Fix:
Yes, please!

>Release-Note:

>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58613 CVS commit: src
Date: Sat, 17 Aug 2024 21:24:54 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Sat Aug 17 21:24:54 UTC 2024

 Modified Files:
 	src/include: uchar.h
 	src/lib/libc/include: namespace.h
 	src/lib/libc/locale: c16rtomb.c c32rtomb.c c8rtomb.c mbrtoc16.c
 	    mbrtoc32.c mbrtoc8.c

 Log Message:
 libc: Add _l variants of the cNrtomb and mbrtocN functions.

 These accept an explicit locale parameter, rather than using the
 current locale.

 Visible under _NETBSD_SOURCE, not exposed otherwise.

 NOTE: This adds libc symbols.  Riding the libc minor bump for the
 non-_l variants of these from two days ago -- hope that's not pushing
 it too far.

 PR lib/58613: c*rtomb, mbrtoc* should have locale-parametric _l
 variants


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/include/uchar.h
 cvs rdiff -u -r1.204 -r1.205 src/lib/libc/include/namespace.h
 cvs rdiff -u -r1.4 -r1.5 src/lib/libc/locale/c16rtomb.c
 cvs rdiff -u -r1.2 -r1.3 src/lib/libc/locale/c32rtomb.c
 cvs rdiff -u -r1.3 -r1.4 src/lib/libc/locale/c8rtomb.c \
     src/lib/libc/locale/mbrtoc8.c
 cvs rdiff -u -r1.5 -r1.6 src/lib/libc/locale/mbrtoc16.c \
     src/lib/libc/locale/mbrtoc32.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: lib-bug-people->riastradh
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Sat, 17 Aug 2024 23:26:46 +0000
Responsible-Changed-Why:
mine


State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 17 Aug 2024 23:29:48 +0000
State-Changed-Why:
fixed in HEAD, can pullup-9 and pullup-10 after PR 52374 and PR 58601
NOTE: adds symbols to libc


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.