Hi,
when a CC=g++, tests in mbrtowc.m4 fail with

error: 'mbtowc' was not declared in this scope

since 'mbtowc' is declared in stdlib.h,
I think this patch is in order:


2009-06-15  Sam Steingold  <s...@gnu.org>

        * mbrtowc.m4 (gl_MBRTOWC_SANITYCHECK): include <stdlib.h>
        for the mbtowc declaration


--- mbrtowc.m4.~1.2.~   2009-06-15 14:19:48.000000000 -0400
+++ mbrtowc.m4  2009-06-25 15:50:44.002471000 -0400
@@ -155,6 +155,7 @@ changequote(,)dnl
 changequote([,])dnl
       if test $LOCALE_ZH_CN != none; then
         AC_TRY_RUN([
+#include <stdlib.h>
 #include <locale.h>
 #include <string.h>
 #include <wchar.h>



Reply via email to