lint(1) bug

utzoo!decvax!ittvax!swatt utzoo!decvax!ittvax!swatt
Mon Dec 7 17:05:04 AEST 1981


Mon Dec  7 16:34:50 EST 1981 (reported by ittvax!freb)
[ ]	The lint shell driver has a bug in the -p and -n flags:
	they are looked for as "-*p*" and "-*n*", evan after another
	argument type is matched.  If you try to specify alternate
	include directories with -I, or an alternate library with -l,
	and the directory or library name has an 'n' in the name, it
	turns off checking against the standard library.  If the name
	has a 'p' in it, it tries to use the "port" library.  Fix is:

	-------------------------------------------------------------------
	: 'fix to lint'
	cp /usr/src/cmd/lint/SHELL /tmp/upd.$$.tmp ; chmod +w /tmp/upd.$$.tmp
	ed - /tmp/upd.$$.tmp <<\!xxFUNNYxx
	15c
		-*)	X="$X$A"
			case $A in
			-*n*)	P= ;;
			-*p*)	P=port ;;
			esac
			;;
	.
	7,10d
	w
	q
	!xxFUNNYxx
	diff /usr/src/cmd/lint/SHELL /tmp/upd.$$.tmp >/tmp/upd.$$.dif
	if cmp - /tmp/upd.$$.dif <<\!xxFUNNYxx
	7,10d6
	< 	-*n*)	P= ;;
	< 	-*p*)	P=port ;;
	< 	esac
	< 	case $A in
	15c11,16
	< 	-*)	X="$X$A" ;;
	---
	> 	-*)	X="$X$A"
	> 		case $A in
	> 		-*n*)	P= ;;
	> 		-*p*)	P=port ;;
	> 		esac
	> 		;;
	!xxFUNNYxx
	then
		: 'compare equal, ok'
		rm -f SHELL
		cp /tmp/upd.$$.tmp SHELL ; chmod a-w SHELL
	else
		echo "Old source file not same version;" \
			"use diff listings by hand"
	fi
	rm -f /tmp/upd.$$.tmp /tmp/upd.$$.dif
	-------------------------------------------------------------------



More information about the Comp.bugs.4bsd.ucb-fixes mailing list