aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure.in
diff options
context:
space:
mode:
authorKrister Walfridsson <cato@df.lth.se>2003-04-24 20:35:45 +0200
committerKrister Walfridsson <kristerw@gcc.gnu.org>2003-04-24 18:35:45 +0000
commit39f6c4c89e4138b391f3e1099d9186b57b859c6f (patch)
tree198911fb1922f9f9eee060bc9c3ca96b58e95957 /gcc/configure.in
parentbcea76b65d860c0eeb74cdef3342b9b921bd11c0 (diff)
downloadgcc-39f6c4c89e4138b391f3e1099d9186b57b859c6f.zip
gcc-39f6c4c89e4138b391f3e1099d9186b57b859c6f.tar.gz
gcc-39f6c4c89e4138b391f3e1099d9186b57b859c6f.tar.bz2
configure.in: Check whether mbstowcs works.
2003-04-24 Krister Walfridsson <cato@df.lth.se> * configure.in: Check whether mbstowcs works. * configure, config.in: Regenerate. * intl.c: Use HAVE_WORKING_MBSTOWCS. From-SVN: r66045
Diffstat (limited to 'gcc/configure.in')
-rw-r--r--gcc/configure.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/configure.in b/gcc/configure.in
index 2589c13..fefc7a1 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -789,6 +789,24 @@ AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \
fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
scandir alphasort gettimeofday mbstowcs wcswidth)
+if test x$ac_cv_func_mbstowcs = xyes; then
+ AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works,
+[ AC_TRY_RUN([#include <stdlib.h>
+int main()
+{
+ mbstowcs(0, "", 0);
+ return 0;
+}],
+ gcc_cv_func_mbstowcs_works=yes,
+ gcc_cv_func_mbstowcs_works=no,
+ gcc_cv_func_mbstowcs_works=yes)])
+ if test x$gcc_cv_func_mbstowcs_works = xyes; then
+ AC_DEFINE(HAVE_WORKING_MBSTOWCS, 1,
+ [Define this macro if mbstowcs does not crash when its
+ first argument is NULL.])
+ fi
+fi
+
AC_CHECK_TYPE(ssize_t, int)
# Try to determine the array type of the second argument of getgroups