diff options
Diffstat (limited to 'gl/m4/strerror.m4')
-rw-r--r-- | gl/m4/strerror.m4 | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4 index 3989844b..8879eb08 100644 --- a/gl/m4/strerror.m4 +++ b/gl/m4/strerror.m4 | |||
@@ -1,19 +1,19 @@ | |||
1 | # strerror.m4 serial 17 | 1 | # strerror.m4 serial 23 |
2 | dnl Copyright (C) 2002, 2007-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002, 2007-2023 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
6 | 6 | ||
7 | AC_DEFUN([gl_FUNC_STRERROR], | 7 | AC_DEFUN([gl_FUNC_STRERROR], |
8 | [ | 8 | [ |
9 | AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) | 9 | AC_REQUIRE([gl_STRING_H_DEFAULTS]) |
10 | AC_REQUIRE([gl_HEADER_ERRNO_H]) | 10 | AC_REQUIRE([gl_HEADER_ERRNO_H]) |
11 | AC_REQUIRE([gl_FUNC_STRERROR_0]) | 11 | AC_REQUIRE([gl_FUNC_STRERROR_0]) |
12 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | 12 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles |
13 | m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ | 13 | m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ |
14 | AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) | 14 | AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) |
15 | ]) | 15 | ]) |
16 | if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then | 16 | if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then |
17 | AC_CACHE_CHECK([for working strerror function], | 17 | AC_CACHE_CHECK([for working strerror function], |
18 | [gl_cv_func_working_strerror], | 18 | [gl_cv_func_working_strerror], |
19 | [AC_RUN_IFELSE( | 19 | [AC_RUN_IFELSE( |
@@ -24,10 +24,12 @@ AC_DEFUN([gl_FUNC_STRERROR], | |||
24 | [gl_cv_func_working_strerror=yes], | 24 | [gl_cv_func_working_strerror=yes], |
25 | [gl_cv_func_working_strerror=no], | 25 | [gl_cv_func_working_strerror=no], |
26 | [case "$host_os" in | 26 | [case "$host_os" in |
27 | # Guess yes on glibc systems. | 27 | # Guess yes on glibc systems. |
28 | *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; | 28 | *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; |
29 | # If we don't know, assume the worst. | 29 | # Guess yes on musl systems. |
30 | *) gl_cv_func_working_strerror="guessing no" ;; | 30 | *-musl*) gl_cv_func_working_strerror="guessing yes" ;; |
31 | # If we don't know, obey --enable-cross-guesses. | ||
32 | *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;; | ||
31 | esac | 33 | esac |
32 | ]) | 34 | ]) |
33 | ]) | 35 | ]) |
@@ -78,10 +80,14 @@ AC_DEFUN([gl_FUNC_STRERROR_0], | |||
78 | [gl_cv_func_strerror_0_works=yes], | 80 | [gl_cv_func_strerror_0_works=yes], |
79 | [gl_cv_func_strerror_0_works=no], | 81 | [gl_cv_func_strerror_0_works=no], |
80 | [case "$host_os" in | 82 | [case "$host_os" in |
81 | # Guess yes on glibc systems. | 83 | # Guess yes on glibc systems. |
82 | *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; | 84 | *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; |
83 | # If we don't know, assume the worst. | 85 | # Guess yes on musl systems. |
84 | *) gl_cv_func_strerror_0_works="guessing no" ;; | 86 | *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;; |
87 | # Guess yes on native Windows. | ||
88 | mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; | ||
89 | # If we don't know, obey --enable-cross-guesses. | ||
90 | *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;; | ||
85 | esac | 91 | esac |
86 | ]) | 92 | ]) |
87 | ]) | 93 | ]) |