[libc-commits] [libc] [libc] Add `ctime_s` (PR #110676)
Victor Campos via libc-commits
libc-commits at lists.llvm.org
Mon Jul 13 05:43:13 PDT 2026
================
----------------
vhscampos wrote:
The C standard says this about the return: "The ctime_s function returns zero if the time was successfully converted and stored into the array pointed to by s. Otherwise, it returns a nonzero value."
Hence I believe that returning error codes is overspecific. It might come back to bite us if we ever decided to backtrack. Instead, I believe we should decide on one default errno_t value that ought to be returned every time on failure. I plan to add a macro for this default errno_t value that we can use here.
https://github.com/llvm/llvm-project/pull/110676
More information about the libc-commits
mailing list