]> Savannah Git Hosting - gnulib.git/commitdiff
strerrorname_np: Fix compilation error on Haiku.
authorBruno Haible <bruno@clisp.org>
Wed, 5 Apr 2023 15:47:05 +0000 (17:47 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 8 Apr 2023 11:02:56 +0000 (13:02 +0200)
* lib/strerrorname_np.c (strerrorname_np): Avoid conflict between
EDOOFUS and EINVAL.
* tests/test-strerrorname_np.c (main): Likewise.

ChangeLog
lib/strerrorname_np.c
tests/test-strerrorname_np.c

index 091a99913079769ebfa2a9955d27b58eee8bb669..79ef565d19297d863e8ab6684975d7873e44ccf4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-04-05  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        btowc: Fix file lists.
index 08afa61a7230f69bacb489613e838104d1559958..6bbb84f0446a27a7cca4ad4f403d857bfa41c7e8 100644 (file)
@@ -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 */
index d08da239fe1a685ffe426b0b8112b6dffbf425be..49de0c750dfebfd0d71c6ea178a79ed67a960a43 100644 (file)
@@ -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 */