Re: [PATCH v2] wrapper: NetBSD gives EFTYPE and FreeBSD gives EMFILE where POSIX uses ELOOP
- From
Collin Funk <collin.funk1@gmail.com>
- Date
- May 3, 2025, 18:44 UTC
- Message-ID
- <87tt61mt4q.fsf@gmail.com>
- In-Reply-To
- <aBY6BPnuSfslYlYt@tapette.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 6 quoted lines
> I'll just add one resource for people who might like to look into these > kinds of things more. https://man.freebsd.org/cgi/man.cgi is the > FreeBSD man page viewer, which lets you view manual pages from the BSDs, > Linux, and some proprietary Unix systems. It can be quite helpful for > finding and fixing portability issues like this or just seeing what > command-line options or arguments a certain Unix supports.
Gnulib documents most portability quirks too [1]. For example, it had the FreeBSD EMLINK and NetBSD EFTYPE with 'open("symlink", O_NOFOLLOW ...) documented, but for some very old versions released around 2014. Now that I have confirmed it still exists from this git test I have updated the documentation there [2].
Thanks, Collin
[1] https://www.gnu.org/software/gnulib/manual/ [2] https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=c0c646e29fbda0a6eadd6012d8ed1eb33b6c3968