strerror_r questions

Eric Blake eblake@redhat.com
Thu Feb 10 00:43:00 GMT 2011


On 02/09/2011 05:17 PM, Eric Blake wrote:
> Changes in v2: more documentation, fix the signature, change the default
> when no feature macros are defined, don't overwrite buf if n is too
> small, guarantee NUL termination in POSIX variant

Shoot - I missed another POSIX requirement:

"The implementation shall behave as if no function defined in this
volume of POSIX.1-2008 calls strerror( )."

That is, strerror_r() cannot call strerror() (but we _can_ have a helper
method that both strerror() and strerror_r() call).

The POSIX requirement means that someone can replace strerror() with
their own link, but doing so won't affect the behavior of strerror_r().
 Is this something that I should worry about and clean up in a followup
patch?  Or is it too much of a corner case to bother with?

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20110210/a7ad6144/attachment.sig>


More information about the Newlib mailing list