summaryrefslogtreecommitdiff
path: root/gnulib-m4/mbrtowc.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-02 10:30:25 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-02 10:30:25 +0100
commit44a3eaeba04ef78835ca741592c376428ada5f71 (patch)
tree29cc935fd475678dcbe38972bfa77fdc68ffb10d /gnulib-m4/mbrtowc.m4
parent6b73edd95d603e27d55d4905134ac1327d426534 (diff)
New upstream version 0.9.8upstream/0.9.8
Diffstat (limited to 'gnulib-m4/mbrtowc.m4')
-rw-r--r--gnulib-m4/mbrtowc.m422
1 files changed, 15 insertions, 7 deletions
diff --git a/gnulib-m4/mbrtowc.m4 b/gnulib-m4/mbrtowc.m4
index 5edf08be..216594eb 100644
--- a/gnulib-m4/mbrtowc.m4
+++ b/gnulib-m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 27 -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2016 Free Software Foundation,
+# mbrtowc.m4 serial 29 -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2017 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -563,9 +563,11 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on AIX and glibc systems.
+ # Guess no on AIX and glibc systems.
aix* | *-gnu*)
gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
esac
changequote([,])dnl
@@ -592,6 +594,7 @@ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
AC_DEFUN([gl_MBRTOWC_C_LOCALE],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether the C locale is free of encoding errors],
[gl_cv_C_locale_sans_EILSEQ],
[
@@ -622,7 +625,12 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
]])],
[gl_cv_C_locale_sans_EILSEQ=yes],
[gl_cv_C_locale_sans_EILSEQ=no],
- [:])])
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
+ esac
+ ])
+ ])
])
# Prerequisites of lib/mbrtowc.c.
@@ -639,7 +647,7 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
[
dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
- gl_cv_func_mbrtowc,
+ [gl_cv_func_mbrtowc],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
@@ -655,8 +663,8 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
size_t n = 1;
mbstate_t state;
return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
- gl_cv_func_mbrtowc=yes,
- gl_cv_func_mbrtowc=no)])
+ [gl_cv_func_mbrtowc=yes],
+ [gl_cv_func_mbrtowc=no])])
if test $gl_cv_func_mbrtowc = yes; then
AC_DEFINE([HAVE_MBRTOWC], [1],
[Define to 1 if mbrtowc and mbstate_t are properly declared.])