From c3631123354a030261b19e206205bbfb973af38b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 1 Aug 2011 21:58:36 +0200 Subject: [PATCH] wctype-h: Fix last change. * m4/wctype_h.m4 (gl_WCTYPE_H): If towlower is defined, set REPLACE_TOWLOWER to 0. Reported by Sam Steingold . --- ChangeLog | 7 +++++++ m4/wctype_h.m4 | 45 +++++++++++++++++++++++++-------------------- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index a3937cce4..f86a0fa70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-08-01 Bruno Haible + + wctype-h: Fix last change. + * m4/wctype_h.m4 (gl_WCTYPE_H): If towlower is defined, set + REPLACE_TOWLOWER to 0. + Reported by Sam Steingold . + 2011-07-31 Bruno Haible frexpl: Update autoconf test. diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4 index 6df403b3a..f7c46df62 100644 --- a/m4/wctype_h.m4 +++ b/m4/wctype_h.m4 @@ -1,4 +1,4 @@ -# wctype_h.m4 serial 15 +# wctype_h.m4 serial 16 dnl A placeholder for ISO C99 , for platforms that lack it. @@ -82,26 +82,31 @@ AC_DEFUN([gl_WCTYPE_H], if test $REPLACE_ISWCNTRL = 1; then REPLACE_TOWLOWER=1 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 collision - dnl with gnulib's replacement. - 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]) -- 2.11.0