Linux Manual Pages development
 help / color / mirror / Atom feed
From: Eric Blake <eblake-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Stefan Puiu <stefan.puiu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] strerror: improve strerror_r description
Date: Thu, 24 Mar 2011 14:51:09 -0600	[thread overview]
Message-ID: <4D8BAEBD.4080202@redhat.com> (raw)
In-Reply-To: <AANLkTim_cCxXXGE_BgSV5ewEQziru=gH0LpeFAWRWdkb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]

On 03/18/2011 03:35 AM, Stefan Puiu wrote:
>> Signed-off-by: Eric Blake <eblake-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> [...]
>>
>> http://sourceware.org/bugzilla/show_bug.cgi?id=12204
>> documents glibc's change to come into compliance with POSIX
>> regarding strerror_r return value.  The GNU strerror_r use
>> of buf was confusing - I ended up writing a test program that
>> proves that buf is unused for valid errnum, but contains
>> truncated "unknown message" for out-of-range errnum.
> 

>> +on error, glibc 2.13 returns a positive error number, while
>> +older versions returned \-1 and set
>>  .I errno
>> -is set to indicate the error.
>> +indicate the error instead.
> 
> to indicate the error instead?

Yes.

> 
>>  .SH ERRORS
>>  .TP
>>  .B EINVAL
>> @@ -165,6 +168,7 @@ On some systems,
>>  .\" e.g., Solaris 8, HP-UX 11
>>  .BR strerror ()
>>  returns NULL if the error number is unknown.
>> +POSIX.1-2008 requires the result to be non-NULL for all inputs.
> 
> Maybe you could mention C99 as well, since you were saying it also
> mandates this behavior?

Would make sense.  Do you need me to resubmit with those corrections, or
can you squash it in yourself when applying?

> Otherwise, the patch looks ok to me.

-- 
Eric Blake   eblake-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  parent reply	other threads:[~2011-03-24 20:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 22:26 [PATCH] strerror: improve strerror_r description Eric Blake
     [not found] ` <1300400795-9123-1-git-send-email-eblake-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-03-18  9:35   ` Stefan Puiu
     [not found]     ` <AANLkTim_cCxXXGE_BgSV5ewEQziru=gH0LpeFAWRWdkb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-24 20:51       ` Eric Blake [this message]
     [not found]         ` <4D8BAEBD.4080202-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-03-24 21:35           ` Stefan Puiu
2012-04-22  0:19           ` Michael Kerrisk (man-pages)
     [not found]             ` <CAKgNAkhJDrjrTJJKxubkJ2CMmoB0HBPHWmG2PWJpg7DKMcKWnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-22  2:18               ` Eric Blake
     [not found]                 ` <4F936A92.4050004-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-04-22  2:47                   ` Michael Kerrisk (man-pages)

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=4D8BAEBD.4080202@redhat.com \
    --to=eblake-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=stefan.puiu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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