Le mercredi 22 avril 2009 à 09:59 +0200, Paolo Bonzini a écrit :
> Yoann Vandoorselaere wrote:
> > Hi,
> > 
> > Attached is a patch that fixes btowc.m4, mbrtowc.m4, wcrtomb.m4,
> > wcsrtombs.m4, and wctob.m4, so that they don't error out when cross
> > compiling.
> 
> Why don't you instead use the last argument to AC_TRY_RUN?

I didn't know about it at the time. Attached is an updated patch!

-- 
Yoann Vandoorselaere <[email protected]>
PreludeIDS Technologies
diff --git a/m4/btowc.m4 b/m4/btowc.m4
index 64ff829..45f6846 100644
--- a/m4/btowc.m4
+++ b/m4/btowc.m4
@@ -47,7 +47,7 @@ int main ()
 }],
             [gl_cv_func_btowc_eof=yes],
             [gl_cv_func_btowc_eof=no],
-            [])
+            [gl_cv_func_btowc_eof=yes])
         fi
       ])
     case "$gl_cv_func_btowc_eof" in
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index b6276b2..7e61492 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -127,7 +127,7 @@ int main ()
 }],
           [gl_cv_func_mbrtowc_incomplete_state=yes],
           [gl_cv_func_mbrtowc_incomplete_state=no],
-          [])
+          [gl_cv_func_mbrtowc_incomplete_state=yes])
       fi
     ])
 ])
@@ -178,7 +178,7 @@ int main ()
 }],
           [gl_cv_func_mbrtowc_sanitycheck=yes],
           [gl_cv_func_mbrtowc_sanitycheck=no],
-          [])
+          [gl_cv_func_mbrtowc_sanitycheck=yes])
       fi
     ])
 ])
@@ -225,7 +225,7 @@ int main ()
         return 1;
     }
   return 0;
-}], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [])
+}], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [gl_cv_func_mbrtowc_null_arg=yes])
       fi
     ])
 ])
@@ -295,7 +295,7 @@ int main ()
 }],
           [gl_cv_func_mbrtowc_retval=yes],
           [gl_cv_func_mbrtowc_retval=no],
-          [])
+          [gl_cv_func_mbrtowc_retval=yes])
       fi
     ])
 ])
@@ -342,7 +342,7 @@ int main ()
 }],
           [gl_cv_func_mbrtowc_nul_retval=yes],
           [gl_cv_func_mbrtowc_nul_retval=no],
-          [])
+          [gl_cv_func_mbrtowc_nul_retval=yes])
       fi
     ])
 ])
diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4
index 22d9433..774eaaf 100644
--- a/m4/wcrtomb.m4
+++ b/m4/wcrtomb.m4
@@ -67,7 +67,7 @@ int main ()
 }],
             [gl_cv_func_wcrtomb_retval=yes],
             [gl_cv_func_wcrtomb_retval=no],
-            [])
+            [gl_cv_func_wcrtomb_retval=yes])
         fi
       ])
     case "$gl_cv_func_wcrtomb_retval" in
diff --git a/m4/wcsrtombs.m4 b/m4/wcsrtombs.m4
index 829168e..709418c 100644
--- a/m4/wcsrtombs.m4
+++ b/m4/wcsrtombs.m4
@@ -86,7 +86,7 @@ int main ()
 }],
           [gl_cv_func_wcsrtombs_termination=yes],
           [gl_cv_func_wcsrtombs_termination=no],
-          [])
+          [gl_cv_func_wcsrtombs_termination=yes])
       fi
     ])
 ])
@@ -139,7 +139,7 @@ int main ()
 }],
           [gl_cv_func_wcsrtombs_null=yes],
           [gl_cv_func_wcsrtombs_null=no],
-          [])
+          [gl_cv_func_wcsrtombs_null=yes])
       fi
     ])
 ])
diff --git a/m4/wctob.m4 b/m4/wctob.m4
index 40cb709..e57a497 100644
--- a/m4/wctob.m4
+++ b/m4/wctob.m4
@@ -53,7 +53,7 @@ int main ()
 }],
             [gl_cv_func_wctob_works=yes],
             [gl_cv_func_wctob_works=no],
-            [])
+            [gl_cv_func_wctob_works=yes])
         fi
       ])
     case "$gl_cv_func_wctob_works" in

Reply via email to