From 3691a095c1eb6579d32551b2af02550bc3f6cccc Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 24 Jan 2025 20:38:54 -0800 Subject: [PATCH] strerrorname_np: Work around a bug on Solaris 11 OmniOS. * m4/strerrorname_np.m4 (gl_CHECK_STRERRORNAME_NP): Test if strerrorname_np returns NULL when given ERESTART or ESTRPIPE. * doc/glibc-functions/strerrorname_np.texi: Document the bug. --- ChangeLog | 7 +++++++ doc/glibc-functions/strerrorname_np.texi | 3 ++- m4/strerrorname_np.m4 | 11 ++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd7ce7288c..6f3cd5d7f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-01-24 Collin Funk + + strerrorname_np: Work around a bug on Solaris 11 OmniOS. + * m4/strerrorname_np.m4 (gl_CHECK_STRERRORNAME_NP): Test if + strerrorname_np returns NULL when given ERESTART or ESTRPIPE. + * doc/glibc-functions/strerrorname_np.texi: Document the bug. + 2025-01-24 Bruno Haible package-version: Simplify further. diff --git a/doc/glibc-functions/strerrorname_np.texi b/doc/glibc-functions/strerrorname_np.texi index ddf4d20726..aacfaf12b2 100644 --- a/doc/glibc-functions/strerrorname_np.texi +++ b/doc/glibc-functions/strerrorname_np.texi @@ -23,7 +23,8 @@ This function returns wrong values on some platforms: @c https://sourceware.org/bugzilla/show_bug.cgi?id=26555 @c https://sourceware.org/bugzilla/show_bug.cgi?id=29545 @c https://sourceware.org/bugzilla/show_bug.cgi?id=31080 -glibc 2.37. +@c https://www.illumos.org/issues/17134 +glibc 2.37, Solaris 11 OmniOS. @end itemize Portability problems not fixed by Gnulib: diff --git a/m4/strerrorname_np.m4 b/m4/strerrorname_np.m4 index 083c367e31..61e11f0ec4 100644 --- a/m4/strerrorname_np.m4 +++ b/m4/strerrorname_np.m4 @@ -1,5 +1,5 @@ # strerrorname_np.m4 -# serial 7 +# serial 8 dnl Copyright (C) 2020-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -45,6 +45,9 @@ AC_DEFUN([gl_CHECK_STRERRORNAME_NP], dnl In glibc 2.37, strerrorname_np returns NULL for ENOSYM and dnl EREMOTERELEASE on hppa platforms. dnl See . + dnl In Solaris 11 OmniOS, strerrorname_np returns NULL for ERESTART + dnl and ESTRPIPE. + dnl see . AC_CACHE_CHECK([whether strerrorname_np works], [gl_cv_func_strerrorname_np_works], [AC_RUN_IFELSE( @@ -60,6 +63,12 @@ AC_DEFUN([gl_CHECK_STRERRORNAME_NP], #ifdef ENOSYM || strerrorname_np (ENOSYM) == NULL #endif + #ifdef ERESTART + || strerrorname_np (ERESTART) == NULL + #endif + #ifdef ESTRPIPE + || strerrorname_np (ESTRPIPE) == NULL + #endif ; ]])], [gl_cv_func_strerrorname_np_works=yes], -- 2.39.5