On Wed, 2008-06-04 at 19:25 +0200, Axel Dörfler wrote:
> 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?
Hmmm...we are in a similar situation ... just as you are bound to the
restrictions of BeOS, POSIX is bound to the restrictions of the C
language (which is what is meant by "ISO/IEC 9899:1999"). Currently C
says that errno must be positive (in 7.5. para 2).
POSIX has just completed its revision (Issue 7 is about to be
published), and is unlikely to change for a while. C, however, is just
starting a revision. Since POSIX cannot change unless C does, what you
need to do is submit a paper to the C committee that describes the
change you want, together with the motivation, and the editorial
instructions to get that into the standard. Without editorial
instructions, the paper will not be well received (and I suspect that
even a complete paper will be difficult to push through)!
However, I suspect that this will be an uphill battle. You should also
be prepared to attend a C meeting to make your case.
>
> Kind Regards,
> Axel Dörfler.
--
Nick Stoughton Cell: 510 388 1413
USENIX Standards Liaison Fax: 510 548 5738
|