diff options
Diffstat (limited to 'gnulib-m4/strerror.m4')
-rw-r--r-- | gnulib-m4/strerror.m4 | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gnulib-m4/strerror.m4 b/gnulib-m4/strerror.m4 index b886b8d..4716649 100644 --- a/gnulib-m4/strerror.m4 +++ b/gnulib-m4/strerror.m4 @@ -1,19 +1,19 @@ -# strerror.m4 serial 19 -dnl Copyright (C) 2002, 2007-2018 Free Software Foundation, Inc. +# strerror.m4 serial 23 +dnl Copyright (C) 2002, 2007-2022 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. AC_DEFUN([gl_FUNC_STRERROR], [ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_REQUIRE([gl_HEADER_ERRNO_H]) AC_REQUIRE([gl_FUNC_STRERROR_0]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) ]) - if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then AC_CACHE_CHECK([for working strerror function], [gl_cv_func_working_strerror], [AC_RUN_IFELSE( @@ -26,8 +26,10 @@ AC_DEFUN([gl_FUNC_STRERROR], [case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_working_strerror="guessing no" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;; esac ]) ]) @@ -80,10 +82,12 @@ AC_DEFUN([gl_FUNC_STRERROR_0], [case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_strerror_0_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;; esac ]) ]) |