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:
> 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 */
>
> - -- src/lib/libc/compat/gen/compat_errlist.c
>
> gnulib check for strerror(0) POSIX compliance and it prohibits
> "ndefined" string.
>
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=tests/test-str
> error.c#l63
>
> Can we change this string to "No error" indicating that there is no
> error? GNU returns "Success".
I don't see how "ndefined" is wrong. It's certainly not blatantly
incorrect.
Jonathan Kollasch
Home |
Main Index |
Thread Index |
Old Index