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 <re...@free.fr> wrote:
>>> On 24/03/2015 23:56, Max Filippov wrote:
>>>> On Wed, Mar 25, 2015 at 1:26 AM, Andreas Färber <afaer...@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 via email to