diff options
Diffstat (limited to 'gnulib/import/m4/strerror_r.m4')
-rw-r--r-- | gnulib/import/m4/strerror_r.m4 | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gnulib/import/m4/strerror_r.m4 b/gnulib/import/m4/strerror_r.m4 index b0b2ed05347..23c3b423ba6 100644 --- a/gnulib/import/m4/strerror_r.m4 +++ b/gnulib/import/m4/strerror_r.m4 @@ -1,17 +1,14 @@ -# strerror_r.m4 serial 20 -dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc. +# strerror_r.m4 serial 24 +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_R], [ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) - dnl Persuade Solaris <string.h> to declare strerror_r(). - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - dnl Some systems don't declare strerror_r() if _THREAD_SAFE and _REENTRANT dnl are not defined. AC_CHECK_DECLS_ONCE([strerror_r]) @@ -20,7 +17,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R], fi if test $ac_cv_func_strerror_r = yes; then - if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then if test $gl_cv_func_strerror_r_posix_signature = yes; then case "$gl_cv_func_strerror_r_works" in dnl The system's strerror_r has bugs. Replace it. @@ -40,6 +37,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R], # Prerequisites of lib/strerror_r.c. AC_DEFUN([gl_PREREQ_STRERROR_R], [ + AC_REQUIRE([AC_FUNC_STRERROR_R]) dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r. AC_CHECK_FUNCS_ONCE([__xpg_strerror_r]) AC_CHECK_FUNCS_ONCE([catgets]) @@ -52,11 +50,16 @@ AC_DEFUN([gl_FUNC_STRERROR_R_WORKS], [ AC_REQUIRE([gl_HEADER_ERRNO_H]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade Android <string.h> to use the GNU strerror_r API, + dnl and Solaris <string.h> to declare strerror_r. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_FUNC_STRERROR_0]) AC_CHECK_FUNCS_ONCE([strerror_r]) if test $ac_cv_func_strerror_r = yes; then - if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then dnl The POSIX prototype is: int strerror_r (int, char *, size_t); dnl glibc, Cygwin: char *strerror_r (int, char *, size_t); dnl AIX 5.1, OSF/1 5.1: int strerror_r (int, char *, int); |