glibc strerrorname_np
Florian Weimer
fweimer@redhat.com
Mon Nov 8 19:56:27 GMT 2021
* Adhemerval Zanella via Libc-alpha:
> But I do agree with you that at least keeping old buggy behavior for the
> sake of 'compatibility' is not a practice that I think help improve the
> whole ecosystem as whole (although it does help close-source and/or binary
> one system where recompile is an issue).
But the old behavior is arguable not a bug. It was always expected that
the caller would check for NULL. The NULL behavior has already made it
into Solaris:
| The returned string is not translated according to the current locale,
| and strerrordesc_np() returns a NULL result for unknown error codes,
| rather than a generated descriptive string.
<https://docs.oracle.com/cd/E88353_01/html/E37843/strerrorname-np-3c.html>
So I think this ship has sailed.
By the way, I seem to recall that an incompatible version of these
functions (different from strerror_r) has been defined in POSIX and
implemented by one of the other systems. But I can't find the function
name anymore. 8-(
Thanks,
Florian
More information about the Libc-alpha
mailing list