NetBSD Problem Report #58595

From wiz@exadelic.gatalith.at  Wed Aug 14 10:18:52 2024
Return-Path: <wiz@exadelic.gatalith.at>
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 101261A9243
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 14 Aug 2024 10:18:52 +0000 (UTC)
Message-Id: <20240814101845.EEF9E2EBBAD7@exadelic.gatalith.at>
Date: Wed, 14 Aug 2024 12:18:45 +0200 (CEST)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Subject: C11: no uchar.h
X-Send-Pr-Version: 3.95

>Number:         58595
>Category:       standards
>Synopsis:       C11: no uchar.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    standards-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 14 10:20:00 +0000 2024
>Closed-Date:    Wed Aug 14 10:25:57 +0000 2024
>Last-Modified:  Wed Aug 14 10:25:57 +0000 2024
>Originator:     Thomas Klausner
>Release:        NetBSD 10.99.11
>Organization:

>Environment:


Architecture: x86_64
Machine: amd64
>Description:
NetBSD does not provide a uchar.h header.

I didn't find a proper link for this, but
https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/basedefs/uchar.h.html
says it's "aligned" with the "ISO C standard" and
https://en.cppreference.com/w/c/header mentions C11.
>How-To-Repeat:
Compile a file including:

#include <uchar.h>

>Fix:
Provide uchar.h

According to opengroup, this needs to provide:
mbstate_t
size_t
char16_t
char32_t
size_t  c16rtomb(char *restrict, char16_t, mbstate_t *restrict);
size_t  c32rtomb(char *restrict, char32_t, mbstate_t *restrict);
size_t  mbrtoc16(char16_t *restrict, const char *restrict, size_t, mbstate_t *restrict);
size_t  mbrtoc32(char32_t *restrict, const char *restrict, size_t, mbstate_t *restrict);

and may make symbols visible from stddef.h, stdint.h, and wchar.h.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 14 Aug 2024 10:25:57 +0000
State-Changed-Why:
Already reported in PR 52374.


>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.