changeset 7782:a063c38d002a

* lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t, not wint_t. Also, include <ctype.h>, to fix another IRIX bug. * m4/wctype.m4 (gl_WCTYPE_H): Likewise. Problems reported by Georg Schwarz for IRIX 5.3.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 04 Jan 2007 19:21:42 +0000
parents b13928e41580
children 446458ff5d66
files ChangeLog lib/wctype_.h m4/wctype.m4
diffstat 3 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
 
+	* lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
+	not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
+	* m4/wctype.m4 (gl_WCTYPE_H): Likewise.
+	Problems reported by Georg Schwarz for IRIX 5.3.
+
 	* gnulib-tool (autoconf_minversion): Take the maximum version number
 	found, not the minimum.  Problem reported by James Youngman.
 
--- a/lib/wctype_.h
+++ b/lib/wctype_.h
@@ -49,10 +49,11 @@
 # include @ABSOLUTE_WCTYPE_H@
 #endif
 
-/* IRIX 5.3 has a bug: its isw* macros reference an undefined variable
-   _ctmp_.  */
+/* IRIX 5.3 has bugs: its isw* macros refer to an undefined variable
+   _ctmp_ and to <ctype.h> macros like _P.  */
 #if @HAVE_WCTYPE_CTMP_BUG@
-static wint_t _ctmp_;
+# include <ctype.h>
+wchar_t _ctmp_;
 #endif
 
 /* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
--- a/m4/wctype.m4
+++ b/m4/wctype.m4
@@ -44,7 +44,8 @@
 	 [AC_COMPILE_IFELSE(
 	    [AC_LANG_PROGRAM(
 	       [[#include <wctype.h>
-		 static wint_t _ctmp_;]],
+		 #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 #(