Pages

POSIX Datatypes

POSIX Datatypes

  • the following are datatypes required by the POSIX specification
DatatypeDescriptionHeader
int8_tSigned 8-bit integer (char)<sys/types.h>
uint8_tUnsigned 8-bit integer (unsigned char)<sys/types.h>
int16_tSigned 16-bit integer (short)<sys/types.h>
uint16_tUnsigned 16-bit integer (unsigned short)<sys/types.h>
int32_tSigned 32-bit integer (int)<sys/types.h>
uint32_tUnsigned 32-bit integer (unsigned int)<sys/types.h>
sa_family_tAddress family of socket address struct<sys/types.h>
socklen_tLength of socket address struct (unint32_t)<sys/types.h>
in_addr_tIPv4 address (uint32_t)<netinet/in.h>
in_port_tTCP or UDP port (uint16_t)<netinet/in.h>
u_charUnsigned char - OBSOLETE
u_shortUnsigned short - OBSOLETE
u_intUnsigned int - OBSOLETE
u_longUnsigned long - OBSOLETE
struct timevallong tv_sec (secs), long tv_usec (microsecs)<sys/time.h>