NetBSD Problem Report #59140
From www@netbsd.org Thu Mar 6 13:38:33 2025
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 7A6451A9239
for <gnats-bugs@gnats.NetBSD.org>; Thu, 6 Mar 2025 13:38:33 +0000 (UTC)
Message-Id: <20250306133832.1ECC21A923C@mollari.NetBSD.org>
Date: Thu, 6 Mar 2025 13:38:32 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: POSIX.1-2024: timespec_get
X-Send-Pr-Version: www-1.0
>Number: 59140
>Category: lib
>Synopsis: POSIX.1-2024: timespec_get
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 06 13:40:00 +0000 2025
>Last-Modified: Mon Apr 21 13:25:02 +0000 2025
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetBSD_get Timespec
>Environment:
>Description:
<time.h> unconditionally declares struct timespec and timespec_get.
Since it is new in C11 and POSIX.1-2024, it should be limited to any of the following conditions:
- _NETBSD_SOURCE
- __STDC_VERSION__ - 0 >= 201101L
- _POSIX_C_SOURCE -0 >= 202405L
>How-To-Repeat:
standards inspection
>Fix:
Yes, please!
>Audit-Trail:
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59140 CVS commit: src
Date: Mon, 21 Apr 2025 13:21:34 +0000
Module Name: src
Committed By: nia
Date: Mon Apr 21 13:21:33 UTC 2025
Modified Files:
src/include: time.h
src/lib/libc/gen: Makefile.inc timespec_get.3
Added Files:
src/lib/libc/gen: timespec_getres.3 timespec_getres.c
Log Message:
libc: C23: add timespec_getres(3) function
timespec_getres is to timespec_get as clock_getres is to clock_gettime.
PR standards/58608
PR lib/59140
To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/include/time.h
cvs rdiff -u -r1.223 -r1.224 src/lib/libc/gen/Makefile.inc
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/gen/timespec_get.3
cvs rdiff -u -r0 -r1.1 src/lib/libc/gen/timespec_getres.3 \
src/lib/libc/gen/timespec_getres.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(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-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.