Path: utzoo!attcan!uunet!snorkelwacker!mit-eddie!uw-beaver!ubc-cs!kiwi!bambi!janzen From: janzen@bambi.mpr.ca (Martin Janzen) Newsgroups: comp.windows.x Subject: Re: NEED HELP COMPILING XTROFF Keywords: xtroff, Sun, DIRSIZ Message-ID: <2276@kiwi.mpr.ca> Date: 2 Aug 90 17:59:23 GMT References: <25905@bellcore.bellcore.com> Sender: news@eric.mpr.ca Reply-To: janzen@bambi.mpr.ca (Martin Janzen) Organization: MPR Teltech Ltd. Lines: 47 In article <25905@bellcore.bellcore.com>, lestat@nontech.Berkeley.EDU (David Gonzalez-Nieves) writes: |> I have been trying to compile Xtroff and I always get syntax errors in |> the ask.c module of the XtStuff directory. I get the following message: |> |> nontech>> make |> cc -O -I/usr/local/pkg/X11/include -I. -I./lib/X -I. -I./X1 |> 1 -DXWINDOWS -DDIRENT -DXAW_BC -sun3 -c ask.c |> ask.c: 161: DIRSIZ: argument mismatch |> ask.c: 162: DIRSIZ: argument mismatch |> "ask.c", line 161: syntax error at or near symbol ) |> "ask.c", line 162: syntax error at or near symbol ) |> *** Error code 1 |> make: Fatal error: Command failed for target `ask.o' |> nontech>> |> [...] |> I am trying to compile this on a SUN 3/60 running X11R4 and SunOS 4.01. I ran into this the other day, too, on a SPARCstation SLC with SunOS 4.1. The problem shows up in the file xtroff/XtStuff/ask.c. If the DIRENT symbol is defined, it defines DIRSIZE as follows: # define DIRSIZE(entry) DIRSIZ However, on the Sun, DIRSIZ is a macro (defined in /usr/include/sys/dirent.h), and so the preprocessor complains because there's no argument list. I fixed mine by replacing the above line with: # define DIRSIZE(entry) DIRSIZ(entry) This seems to work correctly, at least with the sample troff.tr file; I haven't used it a lot yet. There should be a portable way to do this; for instance, some kind of #ifdef SUN. The people who maintain this thing may have a better idea... BTW, since you say you're using X11R4, you may also need to add -DR4 to the DEFINES= line in xtroff/Imakefile; otherwise, it will complain about missing header files. ------------------------------------------------------------------------------- Martin Janzen Voice: (604) 293-5309 MPR Teltech Ltd. FAX: (604) 293-5787 8999 Nelson Way Internet: janzen@mprgate.mpr.ca Burnaby, B.C. CANADA V5A 4B5 (134.87.131.13)