Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!bonnie!akgua!mcnc!decvax!wivax!cadmus!harvard!seismo!brl-tgr!tgr!kendall@talcott.uucp
From: kendall@talcott.uucp
Newsgroups: net.unix-wizards
Subject: Re: massive type confusion [in 4.2bsd]
Message-ID: <6554@brl-tgr.ARPA>
Date: Sun, 9-Dec-84 10:45:44 EST
Article-I.D.: brl-tgr.6554
Posted: Sun Dec  9 10:45:44 1984
Date-Received: Thu, 13-Dec-84 02:03:23 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 38

> Description:
> 	These files use int where long is correct and fail to use
> 	the types defined in .
> Repeat-By:
> 	Lint a type-correct program that calls lseek, time and ctime
> 	and which passes lint on v7 (not 4.1BSD, not 2BSD).  Observe
> 	the utterly wrong and copious messages produced by lint.
> Fix:
> 	Edit llib-lc to use off_t instead of long where appropriate

No, don't do it!  This would make llib-lc incompatible with the manual
pages.  That's just as bad.  llib-lc should look like the manual pages
whenever possible.

> 	Edit  to use ino_t (instead of unsigned long)
> 	and off_t where appropriate.  Edit  to typedef
> 	off_t and time_t as long, *not int*.

This is sufficient, no need to touch the lint library--but will it break
anything?  In obscure cases it can change the meaning of an expression,
even on the VAX.

> 	Use the types defined in  in your programs!

No, use the types on the manual pages.

> Flame:
> 	int is not long on all machines.  I realise that the authors
> 	of 4.2BSD are too lazy to write type-correct code, but they
> 	could at least refrain from breaking existing, correct code
> 	such as .

I'm all agreement here (although I think the BSD people were under a
lot of pressure to get 4.2 out the door).  Even the SPECIFICATION of
4.2 is VAX-specific!

	Sam Kendall	  {allegra,ihnp4,ima,amd}!wjh12!kendall
	Delft Consulting Corp.	    decvax!genrad!wjh12!kendall