X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fwctype_h.m4;h=f7c46df62f7aabd0e7f67e22f16b85017647491d;hb=60e3ab133c3ffe0bae411a44829498faf8816b34;hp=ef9fb049ce69013c8e4dbf5f3f303bead075d0fa;hpb=d3042e83ace41dcd72fdf8d5173ddf55ac645459;p=gnulib.git diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4 index ef9fb049c..f7c46df62 100644 --- a/m4/wctype_h.m4 +++ b/m4/wctype_h.m4 @@ -1,4 +1,4 @@ -# wctype_h.m4 serial 14 +# wctype_h.m4 serial 16 dnl A placeholder for ISO C99 , for platforms that lack it. @@ -75,7 +75,44 @@ AC_DEFUN([gl_WCTYPE_H], AC_SUBST([REPLACE_ISWCNTRL]) if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then - dnl Redefine all of iswcntrl, ..., towupper in . + dnl Redefine all of iswcntrl, ..., iswxdigit in . + : + fi + + if test $REPLACE_ISWCNTRL = 1; then + REPLACE_TOWLOWER=1 + else + AC_CHECK_FUNCS([towlower]) + if test $ac_cv_func_towlower = yes; then + REPLACE_TOWLOWER=0 + else + AC_CHECK_DECLS([towlower],,, + [[/* 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 HAVE_WCTYPE_H + # include + #endif + ]]) + if test $ac_cv_have_decl_towlower = yes; then + dnl On Minix 3.1.8, the system's declares towlower() and + dnl towupper() although it does not have the functions. Avoid a + dnl collision with gnulib's replacement. + REPLACE_TOWLOWER=1 + else + REPLACE_TOWLOWER=0 + fi + fi + fi + AC_SUBST([REPLACE_TOWLOWER]) + + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then + dnl Redefine towlower, towupper in . : fi