Re: [PATCH 10/12] tzset: update more POSIX citations and quotes

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

 



Hi Paul,

On Tue, Jun 11, 2024 at 08:29:13AM GMT, Paul Eggert wrote:
> ---
>  man/man3/ctime.3 | 29 +++++++++++++----------------
>  man/man3/tzset.3 |  4 ++--
>  2 files changed, 15 insertions(+), 18 deletions(-)
> 
> diff --git a/man/man3/ctime.3 b/man/man3/ctime.3
> index e863f0572..a0dacfeda 100644
> --- a/man/man3/ctime.3
> +++ b/man/man3/ctime.3
> @@ -320,7 +320,7 @@ In many implementations, including glibc, a 0 in
>  .I tm_mday
>  is interpreted as meaning the last day of the preceding month.
>  .P
> -According to POSIX.1-2001,
> +According to POSIX.1-2024,

I would remove the version here, and just say POSIX.  That removes a
place where we need to update the version.  If the version is relevant,
we can specify that in HISTORY.

>  .BR localtime ()
>  is required to behave as though
>  .BR tzset (3)
> @@ -343,16 +343,12 @@ should be called before
>  .BR localtime ()
>  .TQ
>  .BR mktime ()
> -C11, POSIX.1-2008.
> +C23, POSIX.1-2024.
>  .TP
> -.BR asctime_r ()
> -.TQ
> -.BR ctime_r ()
> -.TQ

We should add an entry for these that says "None.".  Otherwise, it may
look like we forgot to document the standard for those functions.

>  .BR gmtime_r ()
>  .TQ
>  .BR localtime_r ()
> -POSIX.1-2008.
> +POSIX.1-2024.
>  .SH HISTORY
>  .TP
>  .BR gmtime ()
> @@ -360,25 +356,25 @@ POSIX.1-2008.
>  .BR localtime ()
>  .TQ
>  .BR mktime ()
> -C89, POSIX.1-2001.
> +C89, POSIX.1-1988.
>  .TP
>  .BR asctime ()
>  .TQ
>  .BR ctime ()
> -C89, POSIX.1-2001.
> -Marked obsolete in POSIX.1-2008 (recommending
> +C89, POSIX.1-1988.
> +Marked obsolescent in C23 and in POSIX.1-2008 (recommending
>  .BR strftime (3)).
>  .TP
>  .BR gmtime_r ()
>  .TQ
>  .BR localtime_r ()
> -POSIX.1-2001.
> +POSIX.1-1996.
>  .TP
>  .BR asctime_r ()
>  .TQ
>  .BR ctime_r ()
> -POSIX.1-2001.
> -Marked obsolete in POSIX.1-2008 (recommending
> +POSIX.1-1996.
> +Removed in POSIX.1-2024 (recommending

I would keep documenting that POSIX.1-2008 marked them as obsolescent.
That might be useful to some.

>  .BR strftime (3)).
>  .SH NOTES
>  The four functions
> @@ -396,7 +392,7 @@ and
>  .BR localtime_r (),
>  are specified by SUSv2.
>  .P
> -POSIX.1-2001 says:
> +POSIX.1-2024 says:

Same about the version here.  I'd remove it.

>  "The
>  .BR asctime (),
>  .BR ctime (),
> @@ -406,8 +402,9 @@ and
>  functions shall return values in one of two static objects:
>  a broken-down time structure and an array of type
>  .IR char .
> -Execution of any of the functions may overwrite the information returned
> -in either of these objects by any of the other functions."
> +Execution of any of the functions that return a pointer to one of these
> +object types may overwrite the information in any object of the same type
> +pointed to by the value returned from any previous call to any of them."
>  This can occur in the glibc implementation.
>  .SH SEE ALSO
>  .BR date (1),
> diff --git a/man/man3/tzset.3 b/man/man3/tzset.3
> index 4c7e286fe..7d57dc9a1 100644
> --- a/man/man3/tzset.3
> +++ b/man/man3/tzset.3
> @@ -235,9 +235,9 @@ T{
>  T}	Thread safety	MT-Safe env locale
>  .TE
>  .SH STANDARDS
> -POSIX.1-2008.
> +POSIX.1-2024.
>  .SH HISTORY
> -POSIX.1-2001, SVr4, 4.3BSD.
> +POSIX.1-1988, SVr4, 4.3BSD.
>  .P
>  4.3BSD had a function
>  .BI "char *timezone(" zone ", " dst )
> -- 
> 2.45.2

Thanks for the investigation!

Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux