Lint problem with -Y flag (+fix)
Leo de Wit
leo at philmds.UUCP
Tue Aug 8 21:37:01 AEST 1989
(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 -----------
#include <stdio.h>
main()
{
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.
More information about the Comp.unix.ultrix
mailing list