bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] asctime, ctime: deprecate


From: Bruno Haible
Subject: Re: [PATCH] asctime, ctime: deprecate
Date: Mon, 26 Dec 2022 18:26:24 +0100

Paul Eggert wrote:
> * modules/ctime: Now obsolete.

This part is not right. The notion of an "obsolete" Gnulib module means [1]
that it is omitted when used as a dependency. But since we document that this
module really fixes a portability issue

  Portability problems fixed by Gnulib:
  @itemize
  @item
  On native Windows platforms (mingw, MSVC), this function works incorrectly
  when the environment variable @code{TZ} has been set by Cygwin.
  @end itemize

it shouldn't be marked 'obsolete'. If a customer package has defined a module
that depends on 'ctime', suddenly this dependency is now silently dropped;
this is not good.

[1] https://www.gnu.org/software/gnulib/manual/html_node/Module-description.html

This patch fixes it.


2022-12-26  Bruno Haible  <bruno@clisp.org>

        ctime: Mark as deprecated, not obsolete. (Regression 2022-12-21.)
        * modules/ctime (Status): Remove.
        (Notice): Say that it is deprecated, not obsolete.

diff --git a/modules/ctime b/modules/ctime
index 2a602dc2c3..08cc532986 100644
--- a/modules/ctime
+++ b/modules/ctime
@@ -1,11 +1,9 @@
 Description:
 ctime() function: convert time to string.
 
-Status:
-obsolete
-
 Notice:
-This module is obsolete.
+The function 'ctime' is deprecated.
+New code should use 'localtime_r' and 'strftime' (or even 'sprintf') instead.
 
 Files:
 lib/ctime.c






reply via email to

[Prev in Thread] Current Thread [Next in Thread]