public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "stefan dot puiu at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/1890] strerror() unnecessarily non thread-safe Date: Wed, 23 Nov 2005 07:35:00 -0000 [thread overview] Message-ID: <20051123073552.10835.qmail@sourceware.org> (raw) In-Reply-To: <20051119151517.1890.stefan.puiu@gmail.com> ------- Additional Comments From stefan dot puiu at gmail dot com 2005-11-23 07:35 ------- Well, the glibc info file says: "This function `strerror_r' is a GNU extension" So either the documentation is wrong, or the function isn't conforming to POSIX - I don't have a copy of the standard to check. This document: http://www.opengroup.org/rtforum/uploads/40/7319/POSIX_and_Linux_Application_Compatibility_v0.92_released_22_April_05.pdf says that POSIX strerror_r() returns an int, the GNU one returns a char*; OTOH, as I said before, other platforms have thread-safe strerror() (Solaris 8 has it, HP-UX 11i has it), and some (Solaris 8, for example) don't even have strerror_r() *at all*. Thus, using strerror_r() breaks portability anyway. Not to mention that if you google for "strerror_r on linux" you'll find posts by users that were confused by the fact that the function didn't even use the supplied buffer (check out http://lists.gnu.org/archive/html/autoconf/2004-12/msg00079.html or http://www.openldap.org/lists/openldap-bugs/200404/msg00191.html). In my opinion, requiring a buffer argument that you *might* use in some weird circumstances is bad design. The "extra info" you talk about can be provided by simply printing out the errno value. If any applications rely on errnos outside the normal range, they should do this anyway. -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | http://sourceware.org/bugzilla/show_bug.cgi?id=1890 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
next prev parent reply other threads:[~2005-11-23 7:35 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-11-19 15:15 [Bug libc/1890] New: " stefan dot puiu at gmail dot com 2005-11-22 18:13 ` [Bug libc/1890] " drepper at redhat dot com 2005-11-23 7:35 ` stefan dot puiu at gmail dot com [this message] 2005-11-23 8:31 ` drepper at redhat dot com 2005-11-23 9:15 ` stefan dot puiu at gmail dot com 2005-11-23 9:26 ` stefan dot puiu at gmail dot com [not found] <bug-1890-131@http.sourceware.org/bugzilla/> 2020-12-21 2:43 ` jscott at posteo dot net 2023-06-15 9:48 ` fweimer at redhat dot com 2023-06-15 9:50 ` fweimer at redhat dot com 2023-10-26 23:20 ` gabravier at gmail dot com 2023-11-01 1:59 ` bruno at clisp dot org 2023-12-12 11:40 ` fweimer at redhat dot com 2023-12-12 12:21 ` bruno at clisp dot org 2023-12-13 9:39 ` fweimer at redhat dot com
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=20051123073552.10835.qmail@sourceware.org \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /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).