]> Savannah Git Hosting - gnulib.git/commitdiff
strerrorname_np: Work around glibc bug on PowerPC, SPARC systems.
authorBruno Haible <bruno@clisp.org>
Sun, 25 Jun 2023 16:19:06 +0000 (18:19 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 25 Jun 2023 16:19:06 +0000 (18:19 +0200)
* m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
strerrorname_np (EDEADLOCK).
* doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.36
still needs a workaround.

ChangeLog
doc/glibc-functions/strerrorname_np.texi
m4/strerrorname_np.m4

index b02d18f3d7ed758f0ce9158000dbeb20fc73db8d..d4a76793be7caa4d6a43027eedaf062a6a9f4270 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-06-25  Bruno Haible  <bruno@clisp.org>
+
+       strerrorname_np: Work around glibc bug on PowerPC, SPARC systems.
+       * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
+       strerrorname_np (EDEADLOCK).
+       * doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.36
+       still needs a workaround.
+
 2023-06-25  Bruno Haible  <bruno@clisp.org>
 
        doc: Mention glibc initstate, initstate_r bug.
index 59a103e3796b72cd9dd2cc56d0cb1980daaae8cc..b9c6252b154133a192b1827e3d9e96d5b148da61 100644 (file)
@@ -20,7 +20,8 @@ glibc 2.31, macOS 11.1, FreeBSD 13.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX
 @item
 This function returns wrong values on some platforms:
 @c https://sourceware.org/bugzilla/show_bug.cgi?id=26555
-glibc 2.32.
+@c https://sourceware.org/bugzilla/show_bug.cgi?id=29545
+glibc 2.36.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 7e68bf7a91bcd0323dbb266af6fcb2c29b9ba734..cb160e102d1ced31b307adc97e0a475122692841 100644 (file)
@@ -1,4 +1,4 @@
-# strerrorname_np.m4 serial 2
+# strerrorname_np.m4 serial 3
 dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,9 @@ AC_DEFUN([gl_FUNC_STRERRORNAME_NP],
     dnl In glibc 2.32, strerrorname_np returns English error descriptions, not
     dnl error names.
     dnl See <https://sourceware.org/bugzilla/show_bug.cgi?id=26555>.
+    dnl In glibc 2.36, strerrorname_np returns NULL for EDEADLOCK on powerpc and
+    dnl sparc platforms.
+    dnl See <https://sourceware.org/bugzilla/show_bug.cgi?id=29545>.
     AC_CACHE_CHECK([whether strerrorname_np works],
       [gl_cv_func_strerrorname_np_works],
       [AC_RUN_IFELSE(
@@ -22,7 +25,12 @@ AC_DEFUN([gl_FUNC_STRERRORNAME_NP],
             [[#include <errno.h>
               #include <string.h>
             ]],
-            [[return strcmp (strerrorname_np (EINVAL), "EINVAL") != 0;
+            [[return
+                strcmp (strerrorname_np (EINVAL), "EINVAL") != 0
+                #ifdef EDEADLOCK
+                || strerrorname_np (EDEADLOCK) == NULL
+                #endif
+                ;
             ]])],
          [gl_cv_func_strerrorname_np_works=yes],
          [gl_cv_func_strerrorname_np_works=no],