bug-gnulib
[Top][All Lists]
Advanced

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

Re: Let's remove Gnulib's ctime module


From: Bruno Haible
Subject: Re: Let's remove Gnulib's ctime module
Date: Sat, 10 Feb 2024 11:03:01 +0100

Paul Eggert wrote:
> > I agree that the majority of callers will use a time_t -> struct tm
> > conversion first. But if we want to recommend an 'asctime' and 'asctime_r'
> > replacement
> 
> We don't, because asctime is a bug magnet. Pretty much everybody who 
> calls asctime calls localtime (or a relative) first, and almost 
> everybody who does that neglects to check for localtime failure.

That's something we should mention in doc/posix-functions/asctime{,_r}.texi.
I would not have realized that e.g. the groff change [1] introduced a bug in
src/libs/libgroff/curtime.cpp.

Bruno

[1] 
https://git.savannah.gnu.org/gitweb/?p=groff.git;a=commitdiff;h=d7bbfb04ea25a82a8597cdef6ebb391cb78ab47c






reply via email to

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