guy@sun.uucp (Guy Harris) (07/31/86)
Index: sys/h/types.h 4.3BSD Description: In every UNIX system except 4BSD (and maybe 32V), "time_t" and "off_t" are declared as "long". In 4BSD, they are declared as "int". This doesn't affect code on "typical" systems, but it does give "lint" gastric distress. The manual page for "time", for instance, says that it takes a pointer to a "long" as an argument. However, the "lint" library says it takes a pointer to a "time_t". This means that code written to conform to the specifications of the 4BSD (and V7, and S3, and S5, and...) manual doesn't pass "lint". Furthermore, this means that programs that use "int" values where a "time_t" or "off_t" is expected will pass "lint" on a 4BSD system; they won't pass "lint" on other systems, and if "int"s aren't the same size as "long"s they won't *work* there either. Repeat-By: Compare <sys/types.h> with any other UNIX variant's version. Fix: Change them to be "typedef"fed to "long" rather than "int". This will cause some code in the kernel - and probably some user code as well - not to "lint", but that can be fixed, and should be, since the existing code is incorrect. (No, this fix won't cause any incurable "lint" problems, I successfully "lint"ed a version of our kernel with the correct "typedefs".) -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)
guy@sun.uucp (Guy Harris) (08/01/86)
> Index: sys/h/types.h 4.3BSD
s/4.3BSD/4.2BSD/
Donn Seeley points out that this *is* fixed in 4.3BSD. It should still be
fixed in other versions.
--
Guy Harris
{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
guy@sun.com (or guy@sun.arpa)