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.
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_REQUIRE([gl_HEADER_ERRNO_H])
AC_REQUIRE([gl_FUNC_STRERROR_R])
AC_REQUIRE([gl_FUNC_STRERROR_0])
AC_REQUIRE([gl_HEADER_ERRNO_H])
AC_REQUIRE([gl_FUNC_STRERROR_R])
AC_REQUIRE([gl_FUNC_STRERROR_0])
dnl We intentionally do not check for the broader REPLACE_STRERROR_R,
dnl since on glibc systems, strerror_r is replaced only for signature
dnl issues, and perror is just fine. Rather, we only want to
dnl We intentionally do not check for the broader REPLACE_STRERROR_R,
dnl since on glibc systems, strerror_r is replaced only for signature
dnl issues, and perror is just fine. Rather, we only want to
fi
rm -rf conftest.txt1 conftest.txt2],
[gl_cv_func_perror_works=no],
fi
rm -rf conftest.txt1 conftest.txt2],
[gl_cv_func_perror_works=no],
- [dnl Guess no when cross-compiling.
- gl_cv_func_perror_works="guessing no"
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_perror_works="guessing yes" ;;
+ # Otherwise guess no.
+ *) gl_cv_func_perror_works="guessing no" ;;
+ esac