tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: strerror(0) POSIX compliance



On Thu, Mar 24, 2016 at 12:49:31PM +0100, Kamil Rytarowski wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> POSIX extension to ISO C says:
> 
> [CX] [Option Start] If the value of errnum is a valid error number,
> the message string shall indicate what error occurred; if the value of
> errnum is zero, the message string shall either be an empty string or
> indicate that no error occurred; otherwise, if these functions
> complete successfully, the message string shall indicate that an
> unknown error occurred. [Option End]
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html
> 
> Currently we hardcode the following text:
>         "Undefined error: 0",                   /*  0 - ENOERROR */

I find the rationale for the change in behavior quite questionable and
any code depending on it is IMO broken. But I don't really care about
changing the string.

Joerg


Home | Main Index | Thread Index | Old Index