man(1) Manual page archive


     TYPES(5)                                                 TYPES(5)

     NAME
          types - primitive system data types

     SYNOPSIS
          #include <sys/types.h>

     DESCRIPTION
          The data types defined in the include file are used in the
          operating system.  Some data of these types are useful in
          user code.

          typedef long           daddr_t;     disk block number, see filsys(5)
          typedef char *         caddr_t;     general memory pointer
          typedef unsigned short ino_t;       inode number, filsys(5)
          typedef long           size_t;      file size, stat(2)
          typedef long           time_t;      time, time(2)
          typedef unsigned short dev_t;       device code, stat(2)
          typedef long           off_t;       file offset, lseek(2)

          The following macros analyze and synthesize device numbers;
          see intro(4).

          #define major(x)       ((int)(((unsigned)(x)>>8)&0377))
          #define minor(x)       ((int)((x)&0377))
          #define makedev(x,y)   ((dev_t)(((x)<<8) | (y)))

          The file contains other definitions as well, internal to the
          system or specific to particular system calls.  Pages in
          section 2 tell which calls need <sys/types.h>.

     SEE ALSO
          filsys(5), time(2), intro(4)