Re: patch-2.7.6.200-be8b on Haiku

2025-02-18 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote on 2025-02-05:
> 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.

On GNU/Hurd, you can't assume much about errno values either:
The smallest one is EMIG_DESTROY_REQUEST = -309, the largest one is
ENOTRECOVERABLE = 1073741945. Again, no problem with -1. We're lucky.

Bruno






Re: patch-2.7.6.200-be8b on Haiku

2025-02-06 Thread Andreas Grünbacher
Paul, Bruno, Eli,

thanks for your help.

Something went wrong installing Bruno's Haiku compatibility check to
'patch', so I've added that now.

Andreas



Re: patch-2.7.6.200-be8b on Haiku

2025-02-05 Thread Paul Eggert
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 
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  
+
+	errno-h: document Haiku errors can’t be -1
+	* doc/posix-headers/errno.texi: Document Haiku errno range.
+
 2025-02-05  Bruno Haible  
 
 	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 + 0x},
+instead of being positive as POSIX requires:
 Haiku.
 @end itemize
-- 
2.48.1