dnl Copyright (C) 2002, 2007-2011 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 Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# Prerequisites of lib/strerror_r.c.
AC_DEFUN([gl_PREREQ_STRERROR_R], [
# Prerequisites of lib/strerror_r.c.
AC_DEFUN([gl_PREREQ_STRERROR_R], [
])
# Detect if strerror_r works, but without affecting whether a replacement
# strerror_r will be used.
AC_DEFUN([gl_FUNC_STRERROR_R_WORKS],
[
])
# Detect if strerror_r works, but without affecting whether a replacement
# strerror_r will be used.
AC_DEFUN([gl_FUNC_STRERROR_R_WORKS],
[
dnl HP-UX 11.31 strerror_r always fails when the buffer length argument
dnl is less than 80.
dnl FreeBSD 8.s strerror_r claims failure on 0
dnl HP-UX 11.31 strerror_r always fails when the buffer length argument
dnl is less than 80.
dnl FreeBSD 8.s strerror_r claims failure on 0
dnl Solaris 10 strerror_r corrupts errno on failure
AC_CACHE_CHECK([whether strerror_r works],
[gl_cv_func_strerror_r_works],
dnl Solaris 10 strerror_r corrupts errno on failure
AC_CACHE_CHECK([whether strerror_r works],
[gl_cv_func_strerror_r_works],
dnl The system's strerror() has a wrong signature.
dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r.
AC_CHECK_FUNCS([__xpg_strerror_r])
dnl The system's strerror() has a wrong signature.
dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r.
AC_CHECK_FUNCS([__xpg_strerror_r])
- dnl glibc < 2.14 does not populate buf on failure
- dnl cygwin < 1.7.10 clobbers strerror
+ dnl In glibc < 2.14, __xpg_strerror_r does not populate buf on failure.
+ dnl In cygwin < 1.7.10, __xpg_strerror_r clobbers strerror's buffer.
]])],
[gl_cv_func_strerror_r_works=yes],
[gl_cv_func_strerror_r_works=no],
]])],
[gl_cv_func_strerror_r_works=yes],
[gl_cv_func_strerror_r_works=no],
- [dnl guess no on all platforms that have __xpg_strerror_r,
- dnl at least until fixed glibc and cygwin are more common
+ [dnl Guess no on all platforms that have __xpg_strerror_r,
+ dnl at least until fixed glibc and cygwin are more common.