]> 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>
Sat, 1 Jul 2023 08:40:48 +0000 (10:40 +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 e9cb20c330f3cdf26783518dbfaeb402cb2dbfe1..4134d895c8350b990517eb83d59ecbfe616f034d 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-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        largefile: port to GNU/Linux s390x and alpha
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 461c6559c32b54b47e60291bbb50371d159dc522..cb160e102d1ced31b307adc97e0a475122692841 100644 (file)
@@ -1,5 +1,5 @@
-# strerrorname_np.m4 serial 2
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+# 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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -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],