X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=m4%2Fmbrlen.m4;h=8d6fb2369cda6bb32f59b7019632ff744f812750;hb=170fb7e17af6f4620e63eadbf8291387a351dda9;hp=8f55e3627dad1820ae666d7eb09db45dc9bd878f;hpb=e5c4538ab6673e3f3f66fd1ad715c201cf34907c;p=gnulib.git diff --git a/m4/mbrlen.m4 b/m4/mbrlen.m4 index 8f55e3627..8d6fb2369 100644 --- a/m4/mbrlen.m4 +++ b/m4/mbrlen.m4 @@ -1,4 +1,4 @@ -# mbrlen.m4 serial 6 +# mbrlen.m4 serial 8 dnl Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -13,6 +13,22 @@ AC_DEFUN([gl_FUNC_MBRLEN], AC_CHECK_FUNCS_ONCE([mbrlen]) if test $ac_cv_func_mbrlen = no; then HAVE_MBRLEN=0 + AC_CHECK_DECLS([mbrlen],,, [[ +/* 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_mbrlen = yes; then + dnl On Minix 3.1.8, the system's declares mbrlen() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_MBRLEN=1 + fi else dnl Most bugs affecting the system's mbrtowc function also affect the dnl mbrlen function. So override mbrlen whenever mbrtowc is overridden. @@ -22,10 +38,6 @@ AC_DEFUN([gl_FUNC_MBRLEN], REPLACE_MBRLEN=1 fi fi - if test $HAVE_MBRLEN = 0 || test $REPLACE_MBRLEN = 1; then - AC_LIBOBJ([mbrlen]) - gl_PREREQ_MBRLEN - fi ]) dnl Test whether mbrlen puts the state into non-initial state when parsing an