NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/58651: tm(3): wrong type in man page for tm_gmtoff



The following reply was made to PR lib/58651; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: lib/58651: tm(3): wrong type in man page for tm_gmtoff
Date: Thu, 29 Aug 2024 08:52:15 +0700

     Date:        Wed, 28 Aug 2024 14:35:00 +0000 (UTC)
     From:        campbell+netbsd%mumble.net@localhost
     Message-ID:  <20240828143500.8DDBF1A9249%mollari.NetBSD.org@localhost>
 
   | (I would see if it went back any further, but I can't because the
   | earlier history was scrubbed
 
 It was always long, since it was added in sccs version 1.2, 1987-03-04
 
 jacaranda$ sccs sccsdiff -r1.1 -r1.2 time.h
 
 ------- time.h -------
 1c1,7
 < /*    %M%     %I%     %E%     */
 ---
 > /*
 >  * Copyright (c) 1983, 1987 Regents of the University of California.
 >  * All rights reserved.  The Berkeley software License Agreement
 >  * specifies the terms and conditions for redistribution.
 >  *
 >  *    %W% (Berkeley) %G%
 >  */
 15a22,23
 >       long    tm_gmtoff;
 >       char    *tm_zone;
 
 The end of line comments (which spelled "UTC" as "CUT" on the tm_gmtoff line)
 were added in the next revision (5.1), 1989-03-08 (to those two lines, and
 all the others, and also put in a more modern style copyright notice).
 The CUT error wasn't fixed in the NetBSD tree until rev 1.25, 2000-07-06.
 
 It is long in POSIX as well.
 
 However:
 
 campbell+netbsd%mumble.net@localhost said:
    | Also, the __aconst is superfluous here.
 
 ["here" is the tm_zone field definition.]
 
 Probably, though in this case it should be turned into const
 instead of just deleted.   tm_zone should also (obviously really) be
 a char *, not char.   If anything in our code, anywhere, cannot handle it
 being a const char *, that should be fixed (but the __aconst probably
 already provided assurance that there is nowhere that will be needed.)
 
 And since those two fields are now specified in POSIX, the:
 
    "In addition, the following NetBSD-specific fields are available"
 
 should be deleted now, along with the nonsense about "only if arrangements
 were made ... and no guarantee these fields will continue to exist",
 and the STANDARDS section updated to indicate it conforms with
 IEEE Std 1003.1-2024 (still POSIX.1).
 
 kre
 


Home | Main Index | Thread Index | Old Index