NetBSD Problem Report #58042

From www@netbsd.org  Fri Mar 15 23:17:26 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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D328E1A924E
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 15 Mar 2024 23:17:25 +0000 (UTC)
Message-Id: <20240315231724.A2D181A924F@mollari.NetBSD.org>
Date: Fri, 15 Mar 2024 23:17:24 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: tm(3) man page has wrong type for struct tm::tm_gmtoff member
X-Send-Pr-Version: www-1.0

>Number:         58042
>Category:       lib
>Synopsis:       tm(3) man page has wrong type for struct tm::tm_gmtoff member
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 15 23:20:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, 8, ...
>Organization:
The NetBSD Foundatime
>Environment:
>Description:
   NetBSD Extensions
     In addition, the following NetBSD-specific fields are available:

           Type             Field      Represents
           int              tm_gmtoff  Offset from UTC in seconds
           __aconst char    tm_zone    Timezone abbreviation

But time.h actually declares:

        long    tm_gmtoff;      /* offset from UTC in seconds */
        __aconst char *tm_zone; /* timezone abbreviation */

Also: documenting __aconst here is confusing.  This appears to be intended for builds with __AUDIT__ defined to catch abuse of what should properly be const, but I don't know if that is wired up anywhere so it might be dead code.  In any case, it's a confusing way to document the interface.
>How-To-Repeat:
man tm
>Fix:
Yes, please!

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.