All of lore.kernel.org
 help / color / mirror / Atom feed
From: "François Revol" <revol@free.fr>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Max Filippov <jcmvbkbc@gmail.com>,
	Alexander von Gluck IV <kallisti5@unixzen.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Haiku: Platform build fixes
Date: Wed, 25 Mar 2015 00:51:51 +0100	[thread overview]
Message-ID: <5511F897.6000004@free.fr> (raw)
In-Reply-To: <5511F5E5.8000805@suse.de>

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 <revol@free.fr> wrote:
>>> On 24/03/2015 23:56, Max Filippov wrote:
>>>> On Wed, Mar 25, 2015 at 1:26 AM, Andreas Färber <afaerber@suse.de> 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	other threads:[~2015-03-24 23:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 23:36 [Qemu-devel] [PATCH] Haiku: Platform build fixes Alexander von Gluck IV
2015-03-24 22:26 ` Andreas Färber
2015-03-24 22:56   ` Max Filippov
2015-03-24 23:03     ` François Revol
2015-03-24 23:11       ` Max Filippov
2015-03-24 23:40         ` Andreas Färber
2015-03-24 23:51           ` François Revol [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5511F897.6000004@free.fr \
    --to=revol@free.fr \
    --cc=afaerber@suse.de \
    --cc=jcmvbkbc@gmail.com \
    --cc=kallisti5@unixzen.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.