From bb21bd7c3fca3de45442cdaec9ae98bc49dc593b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 5 Apr 2023 17:47:05 +0200 Subject: [PATCH] strerrorname_np: Fix compilation error on Haiku. * lib/strerrorname_np.c (strerrorname_np): Avoid conflict between EDOOFUS and EINVAL. * tests/test-strerrorname_np.c (main): Likewise. --- ChangeLog | 7 +++++++ lib/strerrorname_np.c | 4 ++-- tests/test-strerrorname_np.c | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 091a999130..79ef565d19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-04-05 Bruno Haible + + strerrorname_np: Fix compilation error on Haiku. + * lib/strerrorname_np.c (strerrorname_np): Avoid conflict between + EDOOFUS and EINVAL. + * tests/test-strerrorname_np.c (main): Likewise. + 2023-04-05 Bruno Haible btowc: Fix file lists. diff --git a/lib/strerrorname_np.c b/lib/strerrorname_np.c index 08afa61a72..6bbb84f044 100644 --- a/lib/strerrorname_np.c +++ b/lib/strerrorname_np.c @@ -1,5 +1,5 @@ /* Name of system error code. - Copyright (C) 2020-2022 Free Software Foundation, Inc. + Copyright (C) 2020-2023 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -488,7 +488,7 @@ strerrorname_np (int errnum) case EDONTREPLY: return "EDONTREPLY"; #endif /* FreeBSD */ - #if defined EDOOFUS + #if defined EDOOFUS && EDOOFUS != EINVAL case EDOOFUS: return "EDOOFUS"; #endif /* Linux, HP-UX, Cygwin */ diff --git a/tests/test-strerrorname_np.c b/tests/test-strerrorname_np.c index d08da239fe..49de0c750d 100644 --- a/tests/test-strerrorname_np.c +++ b/tests/test-strerrorname_np.c @@ -1,6 +1,6 @@ /* Test of strerrorname_np() function. - Copyright (C) 2020-2022 Free Software Foundation, Inc. + Copyright (C) 2020-2023 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -490,7 +490,7 @@ main (void) ASSERT (strcmp (strerrorname_np (EDONTREPLY), "EDONTREPLY") == 0); #endif /* FreeBSD */ - #if defined EDOOFUS + #if defined EDOOFUS && EDOOFUS != EINVAL ASSERT (strcmp (strerrorname_np (EDOOFUS), "EDOOFUS") == 0); #endif /* Linux, HP-UX, Cygwin */ -- 2.39.5