This is the mail archive of the
mailing list for the newlib project.
Re: [PATCH] Add missing strerror() strings, clean up
- From: Craig Howland <howland at LGSInnovations dot com>
- To: Nick Withers <nick dot withers at anu dot edu dot au>
- Cc: newlib at sourceware dot org
- Date: Thu, 10 Jul 2014 21:14:14 -0400
- Subject: Re: [PATCH] Add missing strerror() strings, clean up
- Authentication-results: sourceware.org; auth=none
- References: <1405037548 dot 2122 dot 16 dot camel at nuc211 dot anu dot edu dot au>
On 07/10/2014 08:12 PM, Nick Withers wrote:
Yes, I misunderstood the comment, getting it backwards as you point out. What I
should have said: EDOM seems to be a better candidate for changing the
implementation to match the errno.h comment. In the spirit of keeping size
down, using the slightly-abbreviated existing "Math arg out of domain of func"
from the errno.h comment seems to be a readily-understood good candidate for
strerror.c. If there were a strong objection to this size growth of 16 bytes,
perhaps "Math arg domain" (+2) or "Math domain" (-2) could be used, both being
more precise and more easily associated with the EDOM name. Since my
applications are not usually very tight for space, my personal preference would
be for the longer string that essentially matches POSIX.
Thanks for taking the time!
Could you include me on any replies? I'm not subscribed.
On 07/10/2014 06:26 AM, Nick Withers wrote:
The attached patch:
- Adds to strerror()'s strerror.c strings for:
- Changes the following comments in errno.h to match the implementation:
- EDOM, from "Math arg out of domain of func" to "Math
argument" (would "Mathematics argument out of domain of function" or
"Mathematical (...)" be better?)
"Math argument" would be a step backwards. If it were to be changed at
all, use the POSIX "Mathematics argument out of domain of
function." (The existing is POSIX with 3 abbreviations, and really
could be left as-is.)
"Math argument" is the existing message. There's a comment in errno.h
though, that is meant to match the message proper, and currently does
not. That's what's addressed here.
However, if you'd like me to change it to "Mathematics argument out of
domain of function", happy to do so (I certainly like that better...).