diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2022-12-21 13:25:39 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-12-21 13:26:13 -0800 |
commit | ee37744d13296e139b99720c1cf3ea5eed25bfbf (patch) | |
tree | 306a6360a60ea385af428e56ffd787027ba181de /doc/posix-functions | |
parent | f162824875e04079dc1fecd6517f9cfe6887069d (diff) | |
download | gnulib-ee37744d13296e139b99720c1cf3ea5eed25bfbf.tar.gz |
asctime, ctime: deprecate
C23 deprecates asctime and ctime, so deprecate them in Gnulib too.
* NEWS, doc/posix-functions/asctime.texi:
* doc/posix-functions/ctime.texi: Mention this.
* lib/time.in.h (ctime): Deprecate any ctime replacement.
* modules/ctime: Now obsolete.
Diffstat (limited to 'doc/posix-functions')
-rw-r--r-- | doc/posix-functions/asctime.texi | 3 | ||||
-rw-r--r-- | doc/posix-functions/ctime.texi | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/doc/posix-functions/asctime.texi b/doc/posix-functions/asctime.texi index c7dce36f6d..5c4654a866 100644 --- a/doc/posix-functions/asctime.texi +++ b/doc/posix-functions/asctime.texi @@ -13,5 +13,8 @@ Portability problems fixed by Gnulib: Portability problems not fixed by Gnulib: @itemize @item +This function is deprecated in C23. +Portable applications can use @code{strftime} (or even @code{sprintf}) instead. +@item This function may overflow its internal buffer if an invalid year is passed. @end itemize diff --git a/doc/posix-functions/ctime.texi b/doc/posix-functions/ctime.texi index d9e194c2b3..bb6abb23a8 100644 --- a/doc/posix-functions/ctime.texi +++ b/doc/posix-functions/ctime.texi @@ -16,6 +16,10 @@ when the environment variable @code{TZ} has been set by Cygwin. Portability problems not fixed by Gnulib: @itemize @item +This function is deprecated in C23. +Portable applications can use @code{localtime_r} and @code{strftime} +(or even @code{sprintf}) instead. +@item This function may overflow its internal buffer if an invalid year is passed. @item The @code{ctime} function need not be reentrant, and consequently is |