[haiku-development] Re: POSIX error code

  • From: Bruno Albuquerque <bga@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 19 May 2008 12:32:51 -0300

The only problem I see with this email is that you are restricting the scope to much to haiku itself and you are addressing a standards body that may dismiss this based on the current relevancy of Haiku (as much as we like it, it is probably not relevant from their point of view). of course programs that refer to error codes as defines would only need to be recompiled (in other platforms, I mean), but although it is a really bad practice, can we completely rule out the possibility of programs checking error codes directly by number?


Axel Dörfler wrote:
Hi there,

The latest and current POSIX standard demands that error codes have to be positive numbers. Since this would cause a great deal of changes and possible compatibility problems for Haiku, I would like to get our POV to the people responsible for revising those standards. It looks like the OpenGroup Austin Group maintains the POSIX standard, and I just subscribed to a public mailing list where we can actually make our voice heard.

I would like to submit the following mail there:
Subject: Positive error codes since Issue 6

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 hard to port to our otherwise POSIX compliant system.

Is there any way this change can be reverted, or limited in a way that allows Haiku to be POSIX compliant without breaking compatibility with previous versions of BeOS?


Any comments, or suggestions for improvements?


Other related posts: