"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Thomas Adam <thomas@xteddy.org>
Subject:
Re: -portable: add a wrapper for open() on FreeBSD
To:
Christian Weisgerber <naddy@mips.inka.de>, gameoftrees@openbsd.org
Date:
Sun, 26 Sep 2021 20:22:15 +0100

Download raw body.

Thread
Hi,

On Sun, 26 Sep 2021, 18:42 Stefan Sperling, <stsp@stsp.name> wrote:

> On Sun, Sep 26, 2021 at 07:08:38PM +0200, Christian Weisgerber wrote:
> > Todd C. Miller:
> >
> > > Everything is terrible.  I still think we are better off with #ifdefs
> > > testing for the existence of the errno define and not a specific OS.
> >
> > So like this, as an alternative to stsp's proposal:
> >
> >         return (errno == ELOOP
> > #ifdef EMLINK
> >             || errno == EMLINK
> > #endif
> > #ifdef EFTYPE
> >             || errno == EFTYPE
> > #endif
> >             );
> >
> > *shrug*
>
> Fine. I will commit a version that uses this pattern, and then
> we can put this awkward matter to rest :
>

Looks good to me!

Kindly,
Thomas

>