summaryrefslogtreecommitdiff
path: root/m4/wctype.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-01-06 00:27:48 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2007-01-06 00:27:48 +0000
commit58e95e4ccdedb2d3aa24424d412167580346bb70 (patch)
tree322492a4db864235aff0372dd2663b860183c071 /m4/wctype.m4
parent95f61bb16911285e889bbfca5670eb3104244991 (diff)
downloadgnulib-58e95e4ccdedb2d3aa24424d412167580346bb70.tar.gz
Don't worry about using IRIX 5.3's wctype.h broken definitions;
simply work around them. * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG. (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower): (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring. Don't bother to define as macros, since the standard doesn't require it. * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no longer worry about IRIX 5.3. (HAVE_WCTYPE_CTMP_BUG): Remove.
Diffstat (limited to 'm4/wctype.m4')
-rw-r--r--m4/wctype.m440
1 files changed, 8 insertions, 32 deletions
diff --git a/m4/wctype.m4 b/m4/wctype.m4
index 05cd83a83d..d8aa554b16 100644
--- a/m4/wctype.m4
+++ b/m4/wctype.m4
@@ -16,9 +16,15 @@ AC_DEFUN([gl_WCTYPE_H],
AC_REQUIRE([gt_TYPE_WINT_T])
AC_SUBST([HAVE_WINT_T])
+ WCTYPE_H=wctype.h
if test $ac_cv_header_wctype_h = yes; then
- gl_ABSOLUTE_HEADER([wctype.h])
- ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\"
+ if test "$ac_cv_func_iswcntrl" = yes; then
+ WCTYPE_H=
+ ABSOLUTE_WCTYPE_H=\"does/not/matter.h\"
+ else
+ gl_ABSOLUTE_HEADER([wctype.h])
+ ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\"
+ fi
HAVE_WCTYPE_H=1
else
ABSOLUTE_WCTYPE_H=\"no/such/file/wctype.h\"
@@ -26,35 +32,5 @@ AC_DEFUN([gl_WCTYPE_H],
fi
AC_SUBST([ABSOLUTE_WCTYPE_H])
AC_SUBST([HAVE_WCTYPE_H])
-
- WCTYPE_H=wctype.h
- HAVE_WCTYPE_CTMP_BUG=0
- if test $ac_cv_header_wctype_h = yes; then
- dnl IRIX 5.3 has a bug: its isw* macros reference an undefined variable
- dnl _ctmp_. Test against this bug.
- AC_CACHE_CHECK([whether wctype macros need _ctmp_ declared],
- [gl_cv_wctype_ctmp_bug],
- [gl_cv_wctype_ctmp_bug=no
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <wctype.h>
- ]],
- [[return iswprint (0);]])],
- [gl_cv_wctype_ctmp_bug='no, but bare wctype.h does not work'],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <wctype.h>
- #include <ctype.h>
- wchar_t _ctmp_;]],
- [[return iswprint (0);]])],
- [gl_cv_wctype_ctmp_bug=yes])])])
- case $gl_cv_wctype_ctmp_bug,$ac_cv_func_iswcntrl in #(
- yes,*)
- HAVE_WCTYPE_CTMP_BUG=1;; #(
- no,yes)
- WCTYPE_H=;;
- esac
- fi
AC_SUBST([WCTYPE_H])
- AC_SUBST([HAVE_WCTYPE_CTMP_BUG])
])