[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HaikuPorts-devs] [Qemu-devel] Re: [PATCH] [RFC] Haiku host support
From: |
François Revol |
Subject: |
Re: [HaikuPorts-devs] [Qemu-devel] Re: [PATCH] [RFC] Haiku host support and general configure issues |
Date: |
Mon, 09 Mar 2009 15:14:12 +0100 CET |
> Anthony Liguori wrote:
> >>
> >>> Another big issue that I mentionned earlier here is the widely
> > > > used
> >>> assumption that error codes are positive, which is not the case
> > > > for
> >>> BeOS and Haiku.
> >>> Not fixing this will result in a dangerous binary.
> >>
> >> Thanks for the reminder. But that also reminds me, you wanted to
> >> supply a patch for that! :)
> >
> > Such a patch may be something ya'll have to maintain on your own.
> > This has been discussed a lot in the past and I'm concerned that
> > it's
> > going to be too invasive.
>
> We could define a qemu_errno() which returns errno converted to
> positive
> numbers. While it will touch a lot of places, I don't think it can
> be
> considered invasive.
I'm used to using the opposite, RETERR() returning always negative
codes from either errno or E*, and it works quite well.
I don't see the point in making stuff positive to return them negated.
Besides, one of the error codes in BeOS & Haiku will certainly overflow
on 32bit (B_NO_MEMORY = B_GENERAL_ERROR_BASE = LONG_MIN).
François.