]> Dogcows Code - chaz/tar/commitdiff
Check for mbstate_t, too.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 17 Feb 2001 00:35:11 +0000 (00:35 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 17 Feb 2001 00:35:11 +0000 (00:35 +0000)
m4/mbrtowc.m4

index 5982f2cc0037a7a8e2406126e492c4f71b616df2..3eb882e662ea7887c05ab2ae16e74a7454be72cf 100644 (file)
@@ -4,16 +4,16 @@ dnl From Paul Eggert
 
 AC_DEFUN(jm_FUNC_MBRTOWC,
 [
-  AC_MSG_CHECKING([for mbrtowc])
+  AC_MSG_CHECKING([whether mbrtowc and mbstate_t are declared])
   AC_CACHE_VAL(jm_cv_func_mbrtowc,
     [AC_TRY_LINK(
        [#include <wchar.h>],
-       [return !mbrtowc;],
+       [mbstate_t state; return ! (sizeof state && mbrtowc);],
        [jm_cv_func_mbrtowc=yes],
        [jm_cv_func_mbrtowc=no])])
   if test $jm_cv_func_mbrtowc = yes; then
     AC_MSG_RESULT(yes)
     AC_DEFINE(HAVE_MBRTOWC, 1,
-      [Define to 1 if mbrtowc exists and is properly declared.])
+      [Define to 1 if mbrtowc and mbstate_t are properly declared.])
   fi
 ])
This page took 0.027184 seconds and 4 git commands to generate.