Solaris 64-bit Developer's Guide

<sys/types.h> File

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:


The type clock_t represents the system times in clock ticks.


The type dev_t is used for device numbers.


The type off_t is used for file sizes and offsets.


The type ptrdiff_t is the signed integral type for the result of subtracting two pointers.


The type size_t is for the size, in bytes, of objects in memory.


The signed size type ssize_t is used by functions that return a count of bytes or an error indication.


The type 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.