Xref: utzoo comp.unix.ultrix:1470 comp.bugs.misc:258 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!rpi!batcomputer!cornell!rochester!rit!tropix!moscom!ur-valhalla!uhura.cc.rochester.edu!sunybcs!bingvaxu!leah!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!hp4nl!phigate!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.unix.ultrix,comp.bugs.misc Subject: Lint problem with -Y flag (+fix) Message-ID: <1052@philmds.UUCP> Date: 8 Aug 89 11:37:01 GMT Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 33 (this is on Ultrix 2.3) Problem: when using the -Y flag (or having PROG_ENV=sysV in the environment) C sources are not preprocessed correctly (SYSTEM_FIVE is not defined). Example: lint -Y sample.c sample.c: sprintf value declared inconsistently llib-lc(827) :: sample.c(7) The inconsistency is caused by a conflict in the declaration in the lint library and the declaration in stdio.h (the BSD declaration is used). ---------- start of sample.c ----------- #includemain() { char s[20]; (void)sprintf(s,"test %d",1); } ---------- end of sample.c ----------- Fix: modify /usr/lib/lint as indicated by this diff (it causes cpp to have SYSTEM_FIVE defined): 22c22 < -Y) P=sysV O="$O";; --- > -Y) P=sysV O="$O -DSYSTEM_FIVE";; Cheers, Leo.