Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!rochester!pt.cs.cmu.edu!cadre!pitt!amanue!oglvee!jr From: jr@oglvee.UUCP (Jim Rosenberg) Newsgroups: comp.unix.xenix Subject: Re: lint on Altos 2000 is BROKE BROKE BROKE! Summary: Oh bother, they forgot to #undef clearerr Message-ID: <266@oglvee.UUCP> Date: 28 Jul 88 16:25:27 GMT References: <326@ateng.UUCP> <264@oglvee.UUCP> <1004@fig.bbn.com> Reply-To: jr@.UUCP (Jim Rosenberg) Organization: Oglevee Computer Systems, Connellsville, Pa Lines: 46 In article <1004@fig.bbn.com> rsalz@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