IEEE Standards Interpretation for IEEE Std 1003.1™-2001 IEEE Standard Standard for Information Technology -- Portable Operating System Interface (POSIX®)
Copyright © 2006 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.
Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.
IEEE Standards Department Copyrights and Permissions 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA
Interpretation Request #72
Topic: strerror return value Relevant Sections: XSH strerror Page: 1441 Line: 44901-44902
The RETURN VALUE section for strerror() says: "Upon successful completion, strerror() shall return a pointer to the generated message string. On error errno may be set, but no return value is reserved to indicate an error."
This is misleading since strerror() always returns a pointer to a message string, it doesn't only do that for successful calls. Also, there is some missing CX shading in this section and in the ERRORS section.
Change "Upon successful completion ..." to "Upon completion, whether successful or not, ..." Add CX shading to "On error errno may be set, but no return value is reserved to indicate an error."
In the ERRORS section add CX shading to line 44907, "[EINVAL] The value of errnum is not a valid error number."
Interpretation Response #72
The standards states the requirements for the return value for strerror(), and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.
Rationale for Interpretation