4.2BSD ctime() arguments

ebk at iedl02.UUCP ebk at iedl02.UUCP
Sat Apr 21 14:07:48 AEST 1984


On any Unix system I've ever seen, time_t exists and is 32 bits.
<sys/types.h> goes back to v7, and probably further, and defines the necessary
bit widths for certain types, such as time_t, daddr_t (disk address),
caddr_t (core address), etc.  types.h could be made a bit clearer by doing
something like:
#define BIT16 int
#define BIT32 long

typedef time_t BIT32
typedef ino_t BIT16
...
...

For portability, never use int, long, etc., when referring to a system
type - use the entry from sys/types.h

John Owens



More information about the Comp.unix.wizards mailing list