[haiku-development] Re: POSIX error code

"François Revol" <revol@xxxxxxx> wrote:
> They are not "hard" to port, I ported several of them.
> It's just a time-consuming task to replace every "return -EFOO",
> "return -errno", and "ret != -EFOO" to use a RETERR macro... and
> you're
> never sure you didn't forget one.
> Some software sometimes use them in such a nasty way it makes it much
> harder though (thinking about libusb).

That's hard to port in my book. It makes code more clumsy, and I could
understand when a project would not want to import related changes.
The problem is also that you often don't even see those problems - like
the various problems in coreutils "rm" that were caused by this.

> My suggestion would be:
>
> "Error code must be non-zero values.
> Error codes should not be assumed to be positive, but can be assumed
> to
> all have the same sign."

Yeah, that would be sane and fine for us, too :-)

So does anyone have any more suggestions?

Besides mentioning BeOS and Haiku, I cannot do much more. Haiku is not
an important part of the industry, there is no way to deny that.

Bye,
   Axel.


Other related posts: