[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strerrorname_np: Fix compilation error on IRIX
From: |
Bruno Haible |
Subject: |
strerrorname_np: Fix compilation error on IRIX |
Date: |
Fri, 24 Dec 2021 18:51:09 +0100 |
On IRIX 6.5, I see a compilation error:
strerrorname_np.c: In function `strerrorname_np':
strerrorname_np.c:572: error: duplicate case value
strerrorname_np.c:468: error: previously used here
This patch fixes it.
2021-12-24 Bruno Haible <bruno@clisp.org>
strerrorname_np: Fix compilation error on IRIX.
* lib/strerrorname_np.c (strerrorname_np): Handle conflict between
EDIRCORRUPTED and EFSCORRUPTED.
* tests/test-strerrorname_np.c (main): Likewise.
diff --git a/lib/strerrorname_np.c b/lib/strerrorname_np.c
index a39270060..8b602e741 100644
--- a/lib/strerrorname_np.c
+++ b/lib/strerrorname_np.c
@@ -464,7 +464,7 @@ strerrorname_np (int errnum)
case EDIED: return "EDIED";
#endif
/* IRIX */
- #if defined EDIRCORRUPTED
+ #if defined EDIRCORRUPTED && EDIRCORRUPTED != EFSCORRUPTED
case EDIRCORRUPTED: return "EDIRCORRUPTED";
#endif
/* FreeBSD */
diff --git a/tests/test-strerrorname_np.c b/tests/test-strerrorname_np.c
index e6f57c558..b76584913 100644
--- a/tests/test-strerrorname_np.c
+++ b/tests/test-strerrorname_np.c
@@ -466,7 +466,7 @@ main (void)
ASSERT (strcmp (strerrorname_np (EDIED), "EDIED") == 0);
#endif
/* IRIX */
- #if defined EDIRCORRUPTED
+ #if defined EDIRCORRUPTED && EDIRCORRUPTED != EFSCORRUPTED
ASSERT (strcmp (strerrorname_np (EDIRCORRUPTED), "EDIRCORRUPTED") == 0);
#endif
/* FreeBSD */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- strerrorname_np: Fix compilation error on IRIX,
Bruno Haible <=