From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaYc4-0001Ag-Ow for qemu-devel@nongnu.org; Tue, 24 Mar 2015 19:52:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaYc1-0007y6-Iw for qemu-devel@nongnu.org; Tue, 24 Mar 2015 19:52:00 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:23633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaYc1-0007xk-D6 for qemu-devel@nongnu.org; Tue, 24 Mar 2015 19:51:57 -0400 Message-ID: <5511F897.6000004@free.fr> Date: Wed, 25 Mar 2015 00:51:51 +0100 From: =?UTF-8?B?RnJhbsOnb2lzIFJldm9s?= MIME-Version: 1.0 References: <1427153788-2738-1-git-send-email-kallisti5@unixzen.com> <5511E4A7.4050407@suse.de> <5511ED48.7070107@free.fr> <5511F5E5.8000805@suse.de> In-Reply-To: <5511F5E5.8000805@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Haiku: Platform build fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Max Filippov , Alexander von Gluck IV , qemu-devel On 25/03/2015 00:40, Andreas F=C3=A4rber wrote: > Am 25.03.2015 um 00:11 schrieb Max Filippov: >> On Wed, Mar 25, 2015 at 2:03 AM, Fran=C3=A7ois Revol w= rote: >>> On 24/03/2015 23:56, Max Filippov wrote: >>>> On Wed, Mar 25, 2015 at 1:26 AM, Andreas F=C3=A4rber 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 (: >=20 > True, but assumes that error codes are indeed negative. >=20 > 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=C3=A7ois.