bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils 6.6 fails to compile on IRIX 5.3


From: Paul Eggert
Subject: Re: coreutils 6.6 fails to compile on IRIX 5.3
Date: Thu, 04 Jan 2007 00:40:38 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Georg Schwarz <address@hidden> writes:

> configure:43840: cc -c -g  conftest.c >&5
> cfe: Error: conftest.c, line 337: '_P' undefined; reoccurrences will not be 
> reported.
> return ((_ctmp_=(0)) > 255 ? _iswctype(_ctmp_,_P|_U|_L|_N|_B|

Apparently <wctype.h> assumes you have included another include
file that #defines _P.  I assume that file is <ctype.h>; if not,
please let me know.

> configure:43878: cc -c -g  conftest.c >&5
> cfe: Error: conftest.c, line 333: Syntax Error
>                  static wint_t _ctmp_;
>                 ---------------^

It looks like we should be using wchar_t there, not wint_t.

>         source='mbswidth.c' object='mbswidth.o' libtool=no \
>         DEPDIR=.deps depmode=sgi /bin/ksh ../build-aux/depcomp \
>         cc  -I.    -I/usr/local/include   -g -c mbswidth.c
> cfe: Error: ./wctype.h, line 56: Syntax Error
> win_t _ctmp_;
> ------^

This looks like an error in applying the patch; it says "win_t"
not "wint_t".

Could you please try the following patch instead?

If you don't have the Autotools installed, please just try the patch
to lib/wctype_.h.  Then type "make clean", then (cd lib; make wctype.h);
then edit wctype.h to assume that HAVE_WCTYPE_CTMP_BUG is 1; then
type "make".

Thanks.



Index: lib/wctype_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/wctype_.h,v
retrieving revision 1.3
diff -p -u -r1.3 wctype_.h
--- lib/wctype_.h       24 Dec 2006 07:55:08 -0000      1.3
+++ lib/wctype_.h       4 Jan 2007 08:38:13 -0000
@@ -49,10 +49,11 @@ typedef int __wctype_wint_t;
 # 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.
Index: m4/wctype.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/wctype.m4,v
retrieving revision 1.3
diff -p -u -r1.3 wctype.m4
--- m4/wctype.m4        24 Dec 2006 07:55:08 -0000      1.3
+++ m4/wctype.m4        4 Jan 2007 08:38:13 -0000
@@ -44,7 +44,8 @@ AC_DEFUN([gl_WCTYPE_H],
         [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 #(




reply via email to

[Prev in Thread] Current Thread [Next in Thread]