- #else
- char *malloc ();
- #endif
-
-int
-main ()
-{
-return ! malloc (0);
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_malloc_0_nonnull=yes
-else
- ac_cv_func_malloc_0_nonnull=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
- if test $ac_cv_func_malloc_0_nonnull = yes; then :
-
-$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
-
-else
- $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
-
- REPLACE_MALLOC=1
-
-fi
-
-
-if test $REPLACE_MALLOC = 1; then
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
-
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_MALLOC_GNU 1
-_ACEOF
-
-
-
-
-
- if test $gl_cv_func_malloc_posix = yes; then
-
-$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
-
- else
- REPLACE_MALLOC=1
- fi
-
-if test $REPLACE_MALLOC = 1; then
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
-
-fi
-
-
-
-
-
- GNULIB_MALLOC_POSIX=1
-
-
-
-
-
-$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if test $gl_cv_have_include_next = yes; then
- gl_cv_next_math_h='<'math.h'>'
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
-$as_echo_n "checking absolute name of <math.h>... " >&6; }
-if ${gl_cv_next_math_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test $ac_cv_header_math_h = yes; then
-
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <math.h>
-
-_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
-
- case "$host_os" in
- mingw*)
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
- gl_header_literal_regex=`echo 'math.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
- else
- gl_cv_next_math_h='<'math.h'>'
- fi
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
-$as_echo "$gl_cv_next_math_h" >&6; }
- fi
- NEXT_MATH_H=$gl_cv_next_math_h
-
- if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
- gl_next_as_first_directive='<'math.h'>'
- else
- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
- gl_next_as_first_directive=$gl_cv_next_math_h
- fi
- NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
-$as_echo_n "checking whether NAN macro works... " >&6; }
-if ${gl_cv_header_math_nan_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-/* Solaris 10 has a broken definition of NAN. Other platforms
- fail to provide NAN, or provide it only in C99 mode; this
- test only needs to fail when NAN is provided but wrong. */
- float f = 1.0f;
-#ifdef NAN
- f = NAN;
-#endif
- return f == 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_header_math_nan_works=yes
-else
- gl_cv_header_math_nan_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
-$as_echo "$gl_cv_header_math_nan_works" >&6; }
- if test $gl_cv_header_math_nan_works = no; then
- REPLACE_NAN=1
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
-$as_echo_n "checking whether HUGE_VAL works... " >&6; }
-if ${gl_cv_header_math_huge_val_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-/* Solaris 10 has a broken definition of HUGE_VAL. */
- double d = HUGE_VAL;
- return d == 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_header_math_huge_val_works=yes
-else
- gl_cv_header_math_huge_val_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
-$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
- if test $gl_cv_header_math_huge_val_works = no; then
- REPLACE_HUGE_VAL=1
- fi
-
-
- for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-#undef $gl_func
- (void) $gl_func;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_gl_Symbol=yes"
-else
- eval "$as_gl_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
-
- eval ac_cv_have_decl_$gl_func=yes
-fi
- done
-
-
-
-
-
-
-
-
-
-
-
-
- if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- case "$host_os" in
- # Guess no on AIX and OSF/1.
- aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
- esac
- if test $LOCALE_JA != none; then
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
- {
- const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
- mbstate_t state;
- wchar_t wc;
-
- memset (&state, '\0', sizeof (mbstate_t));
- if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
- if (mbsinit (&state))
- return 1;
- }
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_mbrtowc_incomplete_state=yes
-else
- gl_cv_func_mbrtowc_incomplete_state=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- case "$host_os" in
- # Guess no on Solaris 8.
- solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
- esac
- if test $LOCALE_ZH_CN != none; then
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
- /* This fails on Solaris 8:
- mbrtowc returns 2, and sets wc to 0x00F0.
- mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
- {
- char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
- mbstate_t state;
- wchar_t wc;
-
- memset (&state, '\0', sizeof (mbstate_t));
- if (mbrtowc (&wc, input + 3, 6, &state) != 4
- && mbtowc (&wc, input + 3, 6) == 4)
- return 1;
- }
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_mbrtowc_sanitycheck=yes
-else
- gl_cv_func_mbrtowc_sanitycheck=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
-
- REPLACE_MBSTATE_T=0
- case "$gl_cv_func_mbrtowc_incomplete_state" in
- *yes) ;;
- *) REPLACE_MBSTATE_T=1 ;;
- esac
- case "$gl_cv_func_mbrtowc_sanitycheck" in
- *yes) ;;
- *) REPLACE_MBSTATE_T=1 ;;
- esac
- else
- REPLACE_MBSTATE_T=1
- fi
-
-
-
- if test $ac_cv_func_mbrtowc = no; then
- HAVE_MBRTOWC=0
- ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-
-"
-if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MBRTOWC $ac_have_decl
-_ACEOF
-
- if test $ac_cv_have_decl_mbrtowc = yes; then
- REPLACE_MBRTOWC=1
- fi
- else
- if test $REPLACE_MBSTATE_T = 1; then
- REPLACE_MBRTOWC=1
- else
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
-$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
-if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- case "$host_os" in
- # Guess no on Solaris.
- solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
- esac
- if test $LOCALE_FR_UTF8 != none; then
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
- int result = 0;
-
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
- {
- char input[] = "\303\237er";
- mbstate_t state;
- wchar_t wc;
- size_t ret;
-
- memset (&state, '\0', sizeof (mbstate_t));
- wc = (wchar_t) 0xBADFACE;
- ret = mbrtowc (&wc, input, 5, &state);
- if (ret != 2)
- result |= 1;
- if (!mbsinit (&state))
- result |= 2;
-
- memset (&state, '\0', sizeof (mbstate_t));
- ret = mbrtowc (NULL, input, 5, &state);
- if (ret != 2) /* Solaris 7 fails here: ret is -1. */
- result |= 4;
- if (!mbsinit (&state))
- result |= 8;
- }
- return result;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_mbrtowc_null_arg1=yes
-else
- gl_cv_func_mbrtowc_null_arg1=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
-$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
-$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
-if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- case "$host_os" in
- # Guess no on OSF/1.
- osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
- esac
- if test $LOCALE_FR_UTF8 != none; then
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
- {
- mbstate_t state;
- wchar_t wc;
- int ret;
-
- memset (&state, '\0', sizeof (mbstate_t));
- wc = (wchar_t) 0xBADFACE;
- mbrtowc (&wc, NULL, 5, &state);
- /* Check that wc was not modified. */
- if (wc != (wchar_t) 0xBADFACE)
- return 1;
- }
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_mbrtowc_null_arg2=yes
-else
- gl_cv_func_mbrtowc_null_arg2=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
-$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
-$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
-if ${gl_cv_func_mbrtowc_retval+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- case "$host_os" in
- # Guess no on HP-UX, Solaris, native Windows.
- hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
- esac
- if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
- || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
- int result = 0;
- int found_some_locale = 0;
- /* This fails on Solaris. */
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
- {
- char input[] = "B\303\274\303\237er"; /* "Büßer" */
- mbstate_t state;
- wchar_t wc;
-
- memset (&state, '\0', sizeof (mbstate_t));
- if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
- {
- input[1] = '\0';
- if (mbrtowc (&wc, input + 2, 5, &state) != 1)
- result |= 1;
- }
- found_some_locale = 1;
- }
- /* This fails on HP-UX 11.11. */
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
- {
- char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
- mbstate_t state;
- wchar_t wc;
-
- memset (&state, '\0', sizeof (mbstate_t));
- if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
- {
- input[1] = '\0';
- if (mbrtowc (&wc, input + 2, 5, &state) != 2)
- result |= 2;
- }
- found_some_locale = 1;
- }
- /* This fails on native Windows. */
- if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
- {
- char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
- mbstate_t state;
- wchar_t wc;
-
- memset (&state, '\0', sizeof (mbstate_t));
- if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
- {
- input[3] = '\0';
- if (mbrtowc (&wc, input + 4, 4, &state) != 1)
- result |= 4;
- }
- found_some_locale = 1;
- }
- if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
- {
- char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
- mbstate_t state;
- wchar_t wc;
-
- memset (&state, '\0', sizeof (mbstate_t));
- if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
- {
- input[3] = '\0';
- if (mbrtowc (&wc, input + 4, 4, &state) != 1)
- result |= 8;
- }
- found_some_locale = 1;
- }
- if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
- {
- char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
- mbstate_t state;
- wchar_t wc;
-
- memset (&state, '\0', sizeof (mbstate_t));
- if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
- {
- input[3] = '\0';
- if (mbrtowc (&wc, input + 4, 4, &state) != 1)
- result |= 16;
- }
- found_some_locale = 1;
- }
- return (found_some_locale ? result : 77);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_mbrtowc_retval=yes
-else
- if test $? != 77; then
- gl_cv_func_mbrtowc_retval=no
- fi
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
-$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
-$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
-if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- case "$host_os" in
- # Guess no on Solaris 8 and 9.
- solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
- esac
- if test $LOCALE_ZH_CN != none; then
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
- /* This fails on Solaris 8 and 9. */
- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
- {
- mbstate_t state;
- wchar_t wc;
-
- memset (&state, '\0', sizeof (mbstate_t));
- if (mbrtowc (&wc, "", 1, &state) != 0)
- return 1;
- }
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_mbrtowc_nul_retval=yes
-else
- gl_cv_func_mbrtowc_nul_retval=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
-$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
-
- case "$gl_cv_func_mbrtowc_null_arg1" in
- *yes) ;;
- *)
-$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
-
- REPLACE_MBRTOWC=1
- ;;
- esac
- case "$gl_cv_func_mbrtowc_null_arg2" in
- *yes) ;;
- *)
-$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
-
- REPLACE_MBRTOWC=1
- ;;
- esac
- case "$gl_cv_func_mbrtowc_retval" in
- *yes) ;;
- *)
-$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
-
- REPLACE_MBRTOWC=1
- ;;
- esac
- case "$gl_cv_func_mbrtowc_nul_retval" in
- *yes) ;;
- *)
-$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
-
- REPLACE_MBRTOWC=1
- ;;
- esac
- fi
- fi