bug-textutils
[Top][All Lists]
Advanced

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

Re: Make failure on textutils-2.0.8 on SunOS-5.5.1


From: Jim Meyering
Subject: Re: Make failure on textutils-2.0.8 on SunOS-5.5.1
Date: 30 Oct 2000 18:16:37 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

Vin Shelton <address@hidden> wrote:

| Jim,
|     I ran into trouble building textutils-2.0.8 using gcc 2.95.2
| on this Sun box at work:
|
|     SunOS ise4 5.5.1 Generic_103640-34 sun4m sparc
|
| Here's the error:
|
| gcc -DLOCALEDIR=\"/u/shelton/new/SunOS-5.5/share/locale\" -DHAVE_CONFIG_H 
-I.. -I../../../../src/textutils-2.0.8/src 
-I../../../../src/textutils-2.0.8/lib -I../intl    -g -O2 -c -o wc.o `test -f 
../../../../src/textutils-2.0.8/src/wc.c || echo 
'../../../../src/textutils-2.0.8/src/'`../../../../src/textutils-2.0.8/src/wc.c
| In file included from /usr/include/euc.h:13,
|                  from /usr/include/widec.h:22,
|                  from /usr/include/wctype.h:15,
|                  from ../../../../src/textutils-2.0.8/src/wc.c:42:
| /usr/include/sys/euc.h:26: warning: `ISPRINT' redefined
| ../../../../src/textutils-2.0.8/src/sys2.h:211: warning: this is the location 
of the previous definition
| ../../../../src/textutils-2.0.8/src/wc.c:445: macro `ISPRINT' used with just 
one arg
| make[2]: *** [wc.o] Error 1
| make[2]: Leaving directory 
`/u/shelton/new/build/SunOS-5.5/textutils-2.0.8/src'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/u/shelton/new/build/SunOS-5.5/textutils-2.0.8'
| make: *** [all-recursive-am] Error 2

Thanks!
This patch should do the job.

        * src/wc.c: Include "system.h" after wctype.h (not before)
        to avoid a compilation error on Solaris 5.5.1 systems.

Index: wc.c
===================================================================
RCS file: /fetish/textutils/src/wc.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- wc.c        2000/08/11 09:20:31     1.68
+++ wc.c        2000/10/30 15:58:59     1.69
@@ -26,11 +26,6 @@
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
-#include "system.h"
-#include "closeout.h"
-#include "error.h"
-#include "human.h"
-#include "safe-read.h"
 
 /* Get mbstate_t, mbrtowc(), wcwidth().  */
 #if HAVE_WCHAR_H
@@ -44,6 +39,16 @@
 #if !defined iswprint && !HAVE_ISWPRINT
 # define iswprint(wc) 1
 #endif
+
+/* Include this after wctype.h so that we `#undef' ISPRINT
+   (from Solaris's euc.h, from widec.h, from wctype.h) before
+   redefining and using it. */
+#include "system.h"
+
+#include "closeout.h"
+#include "error.h"
+#include "human.h"
+#include "safe-read.h"
 
 /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */
 #if HAVE_MBRTOWC && defined mbstate_t



reply via email to

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