NetBSD Problem Report #58802
From www@netbsd.org Fri Nov 1 16:56:25 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) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 50A7E1A9238
for <gnats-bugs@gnats.NetBSD.org>; Fri, 1 Nov 2024 16:56:25 +0000 (UTC)
Message-Id: <20241101165623.E10471A923B@mollari.NetBSD.org>
Date: Fri, 1 Nov 2024 16:56:23 +0000 (UTC)
From: nia@pkgsrc.org
Reply-To: nia@pkgsrc.org
To: gnats-bugs@NetBSD.org
Subject: missing ffsl(), ffsll() functions from POSIX 2024
X-Send-Pr-Version: www-1.0
>Number: 58802
>Category: lib
>Synopsis: missing ffsl(), ffsll() functions from POSIX 2024
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 01 17:00:00 +0000 2024
>Closed-Date: Fri Nov 01 21:20:03 +0000 2024
>Last-Modified: Fri Nov 01 21:20:03 +0000 2024
>Originator: nia
>Release: current
>Organization:
The NetBSD Ffsloundation
>Environment:
current
>Description:
https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/basedefs/strings.h.html
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58802 CVS commit: src
Date: Fri, 1 Nov 2024 18:35:12 +0000
Module Name: src
Committed By: riastradh
Date: Fri Nov 1 18:35:12 UTC 2024
Modified Files:
src/include: strings.h
src/lib/libc/string: Makefile.inc
src/tests/include/sys: Makefile t_bitops.c
Added Files:
src/common/lib/libc/string: ffsl.c ffsll.c
Log Message:
strings.h: Spruce up for POSIX 2024.
1. Add ffsl, ffsll.
2. Hide bcmp, bcopy, bzero, index, rindex for POSIX>=2024.
3. Expose ffs only for NetBSD or POSIX>=2008 with XSI option.
4. Hide popcount* NetBSD extensions for any POSIX.
5. Sprinkle __constfunc on ffs*.
Add tests for ffs/ffsl/ffsll in tests/include/sys/t_bitops next to
ffs32/ffs64 for convenience.
XXX Still missing strcasecmp_l, strncasecmp_l, and locale_t.
PR lib/58802: missing ffsl(), ffsll() functions from POSIX 2024
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/common/lib/libc/string/ffsl.c \
src/common/lib/libc/string/ffsll.c
cvs rdiff -u -r1.18 -r1.19 src/include/strings.h
cvs rdiff -u -r1.90 -r1.91 src/lib/libc/string/Makefile.inc
cvs rdiff -u -r1.16 -r1.17 src/tests/include/sys/Makefile
cvs rdiff -u -r1.21 -r1.22 src/tests/include/sys/t_bitops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58802 CVS commit: src
Date: Fri, 1 Nov 2024 18:42:30 +0000
Module Name: src
Committed By: riastradh
Date: Fri Nov 1 18:42:30 UTC 2024
Modified Files:
src/distrib/sets/lists/comp: mi
src/include: strings.h
src/lib/libc/string: Makefile.inc ffs.3
Log Message:
ffs(3): Fix visibility in strings.h and add MLINKS for ffsl/ffsll.
ffs(3) was added in POSIX 2001 with XSI option (_XOPEN_SOURCE>=600),
not in POSIX 2008 with XSI option (_XOPEN_SOURCE>=700).
Noticed while updating the STANDARDS section of the man page.
PR lib/58802: missing ffsl(), ffsll() functions from POSIX 2024
To generate a diff of this commit:
cvs rdiff -u -r1.2478 -r1.2479 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.19 -r1.20 src/include/strings.h
cvs rdiff -u -r1.91 -r1.92 src/lib/libc/string/Makefile.inc
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/string/ffs.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Fri, 01 Nov 2024 18:54:19 +0000
State-Changed-Why:
fixed in HEAD, needs pullup-9 and pullup-10
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58802 CVS commit: src/include
Date: Fri, 1 Nov 2024 18:52:30 +0000
Module Name: src
Committed By: riastradh
Date: Fri Nov 1 18:52:29 UTC 2024
Modified Files:
src/include: strings.h
Log Message:
strings.h: Fix visibility of bcmp/bcopy/bzero/index/rindex again.
These have always been X/Open / XSI options, and they were nixed in
POSIX 2008, not in POSIX 2024.
POSIX 2001 (marked legacy): https://pubs.opengroup.org/onlinepubs/009695399/basedefs/strings.h.html
POSIX 2008 (removed): https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/strings.h.html
POSIX 2024: https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/strcasecmp_l.html
Cleanup after fix for:
PR lib/58802: missing ffsl(), ffsll() functions from POSIX 2024
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/include/strings.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: needs-pullups->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Fri, 01 Nov 2024 21:20:03 +0000
State-Changed-Why:
never mind, not worth it for 10.1 since we build packages against 10.0
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.