The change history of POSIX errno states for issue 6:
"Values for errno are now required to be distinct positive values
rather than non-zero values. This change is for alignment with the ISO/
IEC 9899:1999 standard."
I'm writing on behalf of the Haiku project (http://www.haiku-os.org/)
which is an open source implementation of BeOS.
In BeOS, the values for errno were actually defined as negative values,
and software written for BeOS may rely on that. BeOS is older than the
ISO 1999 standard, and hence, it does not comply to it. Since Haiku is
compatible with BeOS, we're bound to the same restriction.
Not surprisingly, there are already applications out there that assume
positive error codes, and those are unnecessary hard to port to our
otherwise (mostly) POSIX compliant system - you need to check all error
checks explicitly if they assume positive error codes.
Correcting return codes via macros makes the code more clumsy and might
not be accepted by the project's maintainers for this reason.
Is there any way this change can be reverted, or limited in a way that
allows Haiku to be POSIX compliant in the future without breaking
compatibility with previous versions of BeOS?
Kind Regards,
Axel Dörfler.
|