From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ED15A3858C50; Sat, 23 Jul 2022 01:52:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED15A3858C50 From: "jscott at posteo dot net" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: time X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: jscott at posteo dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2022 01:52:40 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29396 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 o= ther causes of error in strftime(), so there's no way for a caller to know wheth= er 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 valuab= le to application developers such as myself. Thanks for your attention to this matter :) --=20 You are receiving this mail because: You are on the CC list for the bug.=