.TH "data types" "" "" "Definition"
.PC
.PP
\*(CO's implementation of C recognizes the following data types:
.nf
.ta .5i 1.75i
.B
	char
	double
	float
	int
	long
	long float
	long int
	short
	short int
	signed char
	signed int
	signed long
	signed long int
	signed short
	signed short int
	unsigned int
	unsigned long
	unsigned long int
	unsigned char
	unsigned short
	unsigned short int
.R
.PP
The following types are synonymous:
.DS
.ta 0.5i 1.75i 3.0i 4.25i
.B
	char	signed char
	short	short int	signed short	signed short int
	unsigned short	unsigned short int
	int	signed int
	long	signed long	long int	signed lont int
	unsigned long	unsigned long int
	long float	double	long double
.DE
.PP
The \*(AS
states that
.BR int ,
.BR short ,
and
.B long
are signed by default.
It also sates that the implementation determines whether a
.B char
is signed or unsigned by default;
but it does state that a printable character must be positive.
\*(CO uses signed
.BR char s
by default; therefore, if you wish to use a character value greater than
0x7F, you must explicitly declare the character to have type
.BR "unsigned char" .
If you use this type in an arithmetic expression, \*(CO's C compiler
automatically casts it to
.BR "unsigned int" .
.PP
Finally, \*(CO's header files define these commonly used data types:
.IP \fB<acct.h>\fR 0.75i
.II comp_t
.B "typedef unsigned short comp_t;"
.IS \fB<fcntl.h>\fR
.II flock_t
.B "typedef struct flock flock_t;\fR
.IS \fB<signal.h>\fR
.II sig_atomic_t
.B "typedef long sig_atomic_t;"
.IS \fB<stddef.h>\fR
.II ptrdiff_t
.B "typedef int ptrdiff_t;"
.IS \fB<stdio.h>\fR
.II fpos_t
.B "typedef long fpos_t;"
.IS \fB<stdlib.h>\fR
.II div_t
.II ldiv_t
.nf
.B "typedef struct { int quot; int rem; } div_t;"
.B "typedef struct { long quot; long rem; } ldiv_t;"
.fi
.IS \fB<sys/acct.h>\fR
.II comp_t
.B "typedef unsigned short comp_t;"
.IS \fB<sys/clist.h>\fR
.II cmap_t
.B "typedef unsigned int cmap_t;"
.IS \fB<sys/confinfo.h>\fR
.II ddi_init_t
.II ddi_start_t
.II ddi_exit_t
.II ddi_halt_t
.nf
.B "typedef ddi_init_t init_t;"
.B "typedef ddi_start_t start_t;"
.B "typedef ddi_exit_t exit_t;"
.B "typedef ddi_halt_t halt_t;"
.fi
.IS \fB<sys/fd.h>\fR
.II fd_t
.B "typedef unsigned fd_t;"
.IS \fB<sys/ksynch.h>\fR
.II lkinfo_t
.II sleep_t
.II rwlock_t
.nf
.B "typedef struct lock_info lkinfo_t;"
.B "typedef struct sleep_lock sleep_t;"
.B "typedef struct readwrite_lock rwlock_t;"
.fi
.IS \fB<sys/mmu.h>\fR
.II cseg_t
.B "typedef long  cseg_t;"
.IS \fB<sys/mzioctl.h>\fR
.II mzattr_t
.B "typedef long mzattr_t;"
.IS \fB<sys/poll.h>\fR
.II event_t
.B "typedef struct event event_t;"
.IS \fB<sys/resource.h>\fR
.II rlim_t
.B "typedef unsigned long rlim_t;"
.IS \fB<sys/scsiwork.h>\fR
.II scsi_work_t
.II scsi_cmd_t
.nf
.B "typedef struct scsi_work scsi_work_t;"
.B "typedef struct scsi_cmd scsi_cmd_t;"
.fi
.IS \fB<sys/seg.h>\fR
.II cseg_t
.B "typedef long  cseg_t;"
.IS \fB<sys/signal.h>\fR
.II n_sigset_t
.II o_sigset_t
.nf
.B "typedef n_sigset_t sigset_t;"
.B "typedef o_sigset_t sigset_t;"
.fi
.IS \fB<sys/stream.h>\fR
.II frtn_t
.B "typedef struct free_rtn frtn_t;"
.IS \fB<sys/types.h>\fR
.II vaddr_t
.II minor_t
.II major_t
.nf
.B "typedef char *vaddr_t;"
.B "typedef unsigned short minor_t;"
.B "typedef unsigned short major_t;"
.fi
.IS \fB<sys/uio.h>\fR
.II uio_t
.B "typedef struct uio uio_t;"
.SH "See Also"
.Xr "C language," c_languag
.Xr "char," char
.Xr "data formats," data_form
.Xr "double," double
.Xr "float," float
.Xr "int," int
.Xr "long," long
.Xr "pointer," pointer
.Xr "Programming COHERENT," programmi
.Xr "short," short
.Xr "unsigned" unsigned
