public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Jonny Grant <jg@jguk.org>
To: GNU C Library <libc-alpha@sourceware.org>
Subject: strerror_r GNU flavor
Date: Tue, 9 Nov 2021 10:33:43 +0000	[thread overview]
Message-ID: <e3e7eaa2-9f32-ea93-677a-8178b1d8b43b@jguk.org> (raw)

Hello

Is it better to depreciate the GNU flavor of strerror_r now that there is a POSIX version?

I was reading "string.h" and the man page:

https://man7.org/linux/man-pages/man3/strerror.3.html

The man page does state :-

"The XSI-compliant strerror_r() is preferred for portable
applications.  It returns the error string in the user-supplied
buffer buf of length buflen."

Keeping the GNU version sounds reasonable, but at least marking it depreciated?

Some other queries :-
I noticed this page does not include the POSIX version of strerror_r

https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html

Also, this page function definition says "size_t n" instead of the expected "size_t buflen", should that be changed? 

char * strerror_r (int errnum, char *buf, size_t n)

Cheers
Jonny

             reply	other threads:[~2021-11-09 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09 10:33 Jonny Grant [this message]
2021-11-09 12:35 ` Adhemerval Zanella
2021-11-09 22:53   ` Jonny Grant

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=e3e7eaa2-9f32-ea93-677a-8178b1d8b43b@jguk.org \
    --to=jg@jguk.org \
    --cc=libc-alpha@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: link
Be 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).