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

From:
"Todd C. Miller" <millert@openbsd.org>
Subject:
Re: -portable: add a wrapper for open() on FreeBSD
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 26 Sep 2021 08:10:53 -0600

Download raw body.

Thread
On Sun, 26 Sep 2021 15:48:19 +0200, Christian Weisgerber wrote:

> This is in itself a portability problem.  I don't think Linux even
> has EFTYPE.
>
> We'll need to do something like this in -portable:
>
>         return (errno == ELOOP
> #if   defined(__FreeBSD__)
>             || errno == EMLINK
> #elif defined(__NetBSD__)
>             || errno == EFTYPE
> #endif
>             );

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.

 - todd