X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=m4%2Fmbrtowc.m4;h=4c9f38861c62cdc2383dc81ffeabd621a2761a3c;hb=931b01b091932a1f796c23379ea32abb68bd5895;hp=c353862973e4feda9a6d9036f39f76c6157fd804;hpb=7be93f2d05131d061bd4790ae33c8d50f50010d7;p=platform%2Fupstream%2Fm4.git diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4 index c353862..4c9f388 100644 --- a/m4/mbrtowc.m4 +++ b/m4/mbrtowc.m4 @@ -1,5 +1,5 @@ -# mbrtowc.m4 serial 22 -dnl Copyright (C) 2001-2002, 2004-2005, 2008-2011 Free Software Foundation, +# mbrtowc.m4 serial 25 +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2013 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, @@ -15,6 +15,22 @@ AC_DEFUN([gl_FUNC_MBRTOWC], AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 + AC_CHECK_DECLS([mbrtowc],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +]]) + if test $ac_cv_have_decl_mbrtowc = yes; then + dnl On Minix 3.1.8, the system's declares mbrtowc() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_MBRTOWC=1 + fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 @@ -53,11 +69,6 @@ AC_DEFUN([gl_FUNC_MBRTOWC], esac fi fi - if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then - gl_REPLACE_WCHAR_H - AC_LIBOBJ([mbrtowc]) - gl_PREREQ_MBRTOWC - fi ]) dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that @@ -88,9 +99,6 @@ AC_DEFUN([gl_MBSTATE_T_BROKEN], else REPLACE_MBSTATE_T=1 fi - if test $REPLACE_MBSTATE_T = 1; then - gl_REPLACE_WCHAR_H - fi ]) dnl Test whether mbrtowc puts the state into non-initial state when parsing an