summaryrefslogtreecommitdiffstats
path: root/gl/m4/wcrtomb.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/wcrtomb.m4')
-rw-r--r--gl/m4/wcrtomb.m424
1 files changed, 14 insertions, 10 deletions
diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4
index 22d9433..cb7d926 100644
--- a/gl/m4/wcrtomb.m4
+++ b/gl/m4/wcrtomb.m4
@@ -1,5 +1,5 @@
1# wcrtomb.m4 serial 2 1# wcrtomb.m4 serial 4
2dnl Copyright (C) 2008 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -9,12 +9,16 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
9 AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) 9 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
10 10
11 AC_REQUIRE([AC_TYPE_MBSTATE_T]) 11 AC_REQUIRE([AC_TYPE_MBSTATE_T])
12 gl_MBSTATE_T_BROKEN
13 if test $REPLACE_MBSTATE_T = 1; then
14 REPLACE_WCRTOMB=1
15 fi
12 AC_CHECK_FUNCS_ONCE([wcrtomb]) 16 AC_CHECK_FUNCS_ONCE([wcrtomb])
13 if test $ac_cv_func_wcrtomb = no; then 17 if test $ac_cv_func_wcrtomb = no; then
14 HAVE_WCRTOMB=0 18 HAVE_WCRTOMB=0
15 else 19 fi
16 20 if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then
17 dnl On OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes 21 dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes
18 dnl returns 0 instead of 1. 22 dnl returns 0 instead of 1.
19 AC_REQUIRE([AC_PROG_CC]) 23 AC_REQUIRE([AC_PROG_CC])
20 AC_REQUIRE([gt_LOCALE_FR]) 24 AC_REQUIRE([gt_LOCALE_FR])
@@ -29,10 +33,10 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
29 dnl is present. 33 dnl is present.
30changequote(,)dnl 34changequote(,)dnl
31 case "$host_os" in 35 case "$host_os" in
32 # Guess no on OSF/1 and Solaris. 36 # Guess no on AIX 4, OSF/1 and Solaris.
33 osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; 37 aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
34 # Guess yes otherwise. 38 # Guess yes otherwise.
35 *) gl_cv_func_wcrtomb_retval="guessing yes" ;; 39 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
36 esac 40 esac
37changequote([,])dnl 41changequote([,])dnl
38 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then 42 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
@@ -67,7 +71,7 @@ int main ()
67}], 71}],
68 [gl_cv_func_wcrtomb_retval=yes], 72 [gl_cv_func_wcrtomb_retval=yes],
69 [gl_cv_func_wcrtomb_retval=no], 73 [gl_cv_func_wcrtomb_retval=no],
70 []) 74 [:])
71 fi 75 fi
72 ]) 76 ])
73 case "$gl_cv_func_wcrtomb_retval" in 77 case "$gl_cv_func_wcrtomb_retval" in