lint on Altos 2000 is BROKE BROKE BROKE!

Jim Rosenberg jr at oglvee.UUCP
Fri Jul 29 02:25:27 AEST 1988


In article <1004 at fig.bbn.com> rsalz at bbn.com (Rich Salz) writes:
>In essence, then, you'll have to do something like this (split over
>multiple lines for readability):
>	/lib/cpp -Dlint ${other -D -I -U options from the command line}
>	    YOURLINTFILE.c
>	| $(LINTLIB)/lint1 ${lint flags from command line}
>	>$(LINTLIB)/llib-lYOURLINTFILE.ln
>The LINTLIB variable will typically be /usr/lib or /usr/lib/lint.

*** THANK YOU ***!!!

For this particular C compiler I had to include the same options as in
/usr/bin/lint.  Here's a little script I used:

:
H=/usr/tmp/hlint$$				#header buffer file
L=/usr/lib	LL=/usr/lib			#directories
PATH=/bin:/usr/bin 
O="-E -C -Dlint"  X=  P=xenix			#default parameters
/bin/cc $O $1.c | $L/lint1 $X -H$H >$1.ln

(Most of the above was just excised from /usr/bin/lint.)

However, THERE WAS A CATCH!  cc was blowing up completely on /usr/lib/llibc!
It kind of spoils your whole day when you get syntax errors on the lint
library, for crying out loud.  To make matters worse, the line number in the
syntax error was completely bogus.  I finally managed to run the thing down,
and it turned out to be a failure in llibc to give an #undef for clearerr.
Evidently at some point in the past clearerr was a function; Microsoft or
Altos or somebody changed it to a macro, and forgot to tweak the lint library
accordingly.  I've added the following line to /usr/lib/llibc:

195a196
> #undef	clearerr	/* oglvee!jr 7/28/88 */

Well, this is progress.  Now to try to figure out how to get this creaking
lint to shut up about perfectly reasonable casts.  Many thanks again to all
who helped.


        With apologies to the ghost of Louis Zukofsky:  "Hear her clearerr ..."
-- 
Jim Rosenberg                        pitt
Oglevee Computer Systems                 >--!amanue!oglvee!jr
151 Oglevee Lane                      cgh
Connellsville, PA 15425                                #include <disclaimer.h>



More information about the Comp.unix.xenix mailing list