qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Haiku: Platform build fixes


From: François Revol
Subject: Re: [Qemu-devel] [PATCH] Haiku: Platform build fixes
Date: Wed, 25 Mar 2015 00:51:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130630 Icedove/17.0.7

On 25/03/2015 00:40, Andreas Färber wrote:
> Am 25.03.2015 um 00:11 schrieb Max Filippov:
>> On Wed, Mar 25, 2015 at 2:03 AM, François Revol <address@hidden> wrote:
>>> On 24/03/2015 23:56, Max Filippov wrote:
>>>> On Wed, Mar 25, 2015 at 1:26 AM, Andreas Färber <address@hidden> wrote:
>>>>> Am 24.03.2015 um 00:36 schrieb Alexander von Gluck IV:
>>>>>>
>>>>>
>>>>> Why convert from array to switch statement? It looks like a very
>>>>> invasive change for no obvious reason.
>>>>
>>>> I'd be interested to know the reason too, but I'm OK with either way.
>>>
>>> Maybe because negative array indices are usually a bad idea in C?
>>
>> Sounds like a good reason (:
> 
> True, but assumes that error codes are indeed negative.
> 
> AFAIU linking with -lposix_error_helper or so (-> configure/Makefile*)
> may be an alternative, keeping errors POSIX-compliant in our code. I
> don't recall the implementation details though...

Indeed, although it doesn't solve everything (some things like nginx
want to use deprecated things like sys_errlist[] (although they dropped
this) or assume the codes are all < some very low positive value), and I
suspect it could have strange side effects on code used as a library by
other things.

As for myself, I consider POSIX to be boggus (they even changed their
mind in some places) and error prone on this (I've ported enough foreign
code to assert this) :p

François.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]