The <sys/types.h> header contains a number of basic derived types that should be used whenever appropriate. In particular, the following are of special interest:
clock_t represents the system times in clock
dev_t is used for device numbers.
off_t is used for file sizes and offsets.
ptrdiff_t is the signed integral type for the
result of subtracting two pointers.
size_t is for the size, in bytes, of objects
The signed size type
ssize_t is used by functions that
return a count of bytes or an error indication.
time_t is used for time in seconds.
All of these types remain 32-bit quantities in the ILP32 compilation environment and grow to 64-bit quantities in the LP64 compilation environment.
The use of some of these types is explained in more detail later in this chapter under Guidelines for Converting to LP64.