On Fri, Oct 22, 2021 at 12:41:39PM +0200, Vincent Lefevre wrote:
ctime() may be marked obsolescent in the POSIX guide, but it is still
specified by ISO C, and AFAIK, not marked obsolescent there, even in
the latest C2x draft N2176.

I guess POSIX and ISO C should get together and talk then. I had this one on my todo list for a few years now, after noticing in the man page:

   POSIX.1-2008 marks asctime(), asctime_r(), ctime(), and ctime_r() as
   obsolete, recommending the use of strftime(3) instead.

Moreover, ISO C says: "It is equivalent to

 asctime(localtime(timer))"

So, if you want to replace ctime(), why no using just that?

asctime() is obsolete too.

I don't insist on this commit if we're confident it won't be removed. However the latest POSIX still has them marked as such. Since it's an easy (and critical to Mutt) function, it seemed prudent to just roll our own.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to