Thanks for catching my portability error. I installed that into 'patch'
master.
At first I was worried that the patch relied on Haiku errno values not
being -1, since the Gnulib documentation said only that they can be
negative. However, I discovered that Haiku errno values are all close to
INT_MIN, so this isn't an issue. I installed the attached Gnulib patch
to document this.From 9829f0a93c40492875f67ee738e000611bdcf0e7 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Wed, 5 Feb 2025 13:24:41 -0800
Subject: [PATCH] =?UTF-8?q?errno-h:=20document=20Haiku=20errors=20can?=
=?UTF-8?q?=E2=80=99t=20be=20-1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* doc/posix-headers/errno.texi: Document Haiku errno range.
---
ChangeLog | 5 +++++
doc/posix-headers/errno.texi | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index ce8cc93125..610560efa3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-02-05 Paul Eggert <egg...@cs.ucla.edu>
+
+ errno-h: document Haiku errors can’t be -1
+ * doc/posix-headers/errno.texi: Document Haiku errno range.
+
2025-02-05 Bruno Haible <br...@clisp.org>
test-xfail: Define a condition for Haiku.
diff --git a/doc/posix-headers/errno.texi b/doc/posix-headers/errno.texi
index b25de0ad9e..44cde3e299 100644
--- a/doc/posix-headers/errno.texi
+++ b/doc/posix-headers/errno.texi
@@ -67,6 +67,7 @@ errno.h
Portability problems not fixed by Gnulib:
@itemize
@item
-All error numbers are negative on some platforms:
+Error numbers are in the range @code{INT_MIN} through @code{INT_MIN + 0xffff},
+instead of being positive as POSIX requires:
Haiku.
@end itemize
--
2.48.1