public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jscott at posteo dot net" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug time/29396] New: strftime should set errno on failure Date: Sat, 23 Jul 2022 01:52:39 +0000 [thread overview] Message-ID: <bug-29396-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29396 Bug ID: 29396 Summary: strftime should set errno on failure Product: glibc Version: 2.36 Status: UNCONFIRMED Severity: minor Priority: P2 Component: time Assignee: unassigned at sourceware dot org Reporter: jscott at posteo dot net Target Milestone: --- Hi, Right now, there is no way to distinguish the buffer being too small from other causes of error in strftime(), so there's no way for a caller to know whether it should allocate a larger buffer and try again. POSIX Issue 8 is slated to require that errno be set to ERANGE when the output buffer isn't big enough, and also that errno be set in other failure situations. I think glibc should adopt this behavior even if it weren't to be standardized since it's valuable to application developers such as myself. Thanks for your attention to this matter :) -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-07-23 1:52 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-23 1:52 jscott at posteo dot net [this message] 2022-07-23 1:53 ` [Bug time/29396] " jscott at posteo dot net 2022-07-23 2:45 ` [Bug time/29396] strftime should set errno to ERANGE " jscott at posteo dot net
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29396-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).