mirror of
git://git.sv.gnu.org/autoconf
synced 2024-12-03 02:00:36 +08:00
* acfunctions.m4 (AC_FUNC_STRERROR_R): Update to
fileutils-4.0.42's.
This commit is contained in:
parent
a21d079e63
commit
848752c32f
@ -1,3 +1,8 @@
|
||||
2001-03-19 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* acfunctions.m4 (AC_FUNC_STRERROR_R): Update to
|
||||
fileutils-4.0.42's.
|
||||
|
||||
2001-03-19 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* tests/atgeneral.m4 (AT_INIT): Don't always create `empty', rather
|
||||
|
@ -1283,7 +1283,8 @@ fi
|
||||
# AC_FUNC_STRERROR_R
|
||||
# ------------------
|
||||
AC_DEFUN([AC_FUNC_STRERROR_R],
|
||||
[AC_CHECK_FUNCS([strerror_r])
|
||||
[AC_CHECK_DECLS([strerror_r])
|
||||
AC_CHECK_FUNCS([strerror_r])
|
||||
if test $ac_cv_func_strerror_r = yes; then
|
||||
AC_CHECK_HEADERS(string.h)
|
||||
AC_CACHE_CHECK([for working strerror_r],
|
||||
@ -1297,14 +1298,42 @@ if test $ac_cv_func_strerror_r = yes; then
|
||||
# endif
|
||||
],
|
||||
[
|
||||
char buf;
|
||||
char x = *strerror_r (0, &buf, sizeof buf);
|
||||
char buf[100];
|
||||
char x = *strerror_r (0, buf, sizeof buf);
|
||||
],
|
||||
ac_cv_func_strerror_r_works=yes,
|
||||
ac_cv_func_strerror_r_works=no
|
||||
)])
|
||||
)
|
||||
if test $ac_cv_func_strerror_r_works = no; then
|
||||
# strerror_r seems not to work, but now we have to choose between
|
||||
# systems that have relatively inaccessible declarations for the
|
||||
# function. BeOS and DEC UNIX 4.0 fall in this category, but the
|
||||
# former has a strerror_r that returns char*, while the latter
|
||||
# has a strerror_r that returns `int'.
|
||||
# This test should segfault on the DEC system.
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <ctype.h>
|
||||
|
||||
extern char *strerror_r ();
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
char buf[100];
|
||||
char x = *strerror_r (0, buf, sizeof buf);
|
||||
exit (!isalpha (x));
|
||||
}
|
||||
],
|
||||
ac_cv_func_strerror_r_works=yes,
|
||||
ac_cv_func_strerror_r_works=no,
|
||||
ac_cv_func_strerror_r_works=no)
|
||||
fi
|
||||
])
|
||||
if test $ac_cv_func_strerror_r_works = yes; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_WORKING_STRERROR_R, 1,
|
||||
AC_DEFINE_UNQUOTED([HAVE_WORKING_STRERROR_R], 1,
|
||||
[Define to 1 if `strerror_r' returns a string.])
|
||||
fi
|
||||
fi
|
||||
|
@ -55,8 +55,8 @@ This file documents the GNU Autoconf package for creating scripts to
|
||||
configure source code packages using templates and an @code{m4} macro
|
||||
package.
|
||||
|
||||
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
@ -90,8 +90,8 @@ approved by the Foundation.
|
||||
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1992, 93, 94, 95, 96, 98, 99, 2000 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
|
||||
2001 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
|
@ -1283,7 +1283,8 @@ fi
|
||||
# AC_FUNC_STRERROR_R
|
||||
# ------------------
|
||||
AC_DEFUN([AC_FUNC_STRERROR_R],
|
||||
[AC_CHECK_FUNCS([strerror_r])
|
||||
[AC_CHECK_DECLS([strerror_r])
|
||||
AC_CHECK_FUNCS([strerror_r])
|
||||
if test $ac_cv_func_strerror_r = yes; then
|
||||
AC_CHECK_HEADERS(string.h)
|
||||
AC_CACHE_CHECK([for working strerror_r],
|
||||
@ -1297,14 +1298,42 @@ if test $ac_cv_func_strerror_r = yes; then
|
||||
# endif
|
||||
],
|
||||
[
|
||||
char buf;
|
||||
char x = *strerror_r (0, &buf, sizeof buf);
|
||||
char buf[100];
|
||||
char x = *strerror_r (0, buf, sizeof buf);
|
||||
],
|
||||
ac_cv_func_strerror_r_works=yes,
|
||||
ac_cv_func_strerror_r_works=no
|
||||
)])
|
||||
)
|
||||
if test $ac_cv_func_strerror_r_works = no; then
|
||||
# strerror_r seems not to work, but now we have to choose between
|
||||
# systems that have relatively inaccessible declarations for the
|
||||
# function. BeOS and DEC UNIX 4.0 fall in this category, but the
|
||||
# former has a strerror_r that returns char*, while the latter
|
||||
# has a strerror_r that returns `int'.
|
||||
# This test should segfault on the DEC system.
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <ctype.h>
|
||||
|
||||
extern char *strerror_r ();
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
char buf[100];
|
||||
char x = *strerror_r (0, buf, sizeof buf);
|
||||
exit (!isalpha (x));
|
||||
}
|
||||
],
|
||||
ac_cv_func_strerror_r_works=yes,
|
||||
ac_cv_func_strerror_r_works=no,
|
||||
ac_cv_func_strerror_r_works=no)
|
||||
fi
|
||||
])
|
||||
if test $ac_cv_func_strerror_r_works = yes; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_WORKING_STRERROR_R, 1,
|
||||
AC_DEFINE_UNQUOTED([HAVE_WORKING_STRERROR_R], 1,
|
||||
[Define to 1 if `strerror_r' returns a string.])
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user