Manual Pages for UNIX Darwin command on man types
MyWebUniversity

Manual Pages for UNIX Darwin command on man types

TYPES(5) BSD File Formats Manual TYPES(5)

NAME

ttyyppeess - system data types

SYNOPSIS

##iinncclluuddee <>

DESCRIPTION

The file sys/types.h contains the defined data types used in the kernel

(most are used through out the system).

#ifndef TYPESH

#define TYPESH

typedef short devt;

#ifndef POSIXSOURCE

/* major part of a device */

#define major(x) ((int)(((unsigned)(x)>>8)&0377))

/* minor part of a device */

#define minor(x) ((int)((x)&0377))

/* make a device number */

#define makedev(x,y) ((devt)(((x)<<8) | (y)))

#endif

typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; typedef unsigned short ushort; /* Sys V compatibility */

#if !defined(ANSISOURCE) && !defined(POSIXCSOURCE)

#include

#endif

#ifdef CLOCKT

typedef CLOCKT clockt;

#undef CLOCKT

#endif

#ifdef SIZET

typedef SIZET sizet;

#undef SIZET

#endif

#ifdef TIMET

typedef TIMET timet;

#undef TIMET

#endif

#ifndef POSIXSOURCE

typedef struct uquad { unsigned long val[2]; } uquad; typedef struct quad { long val[2]; } quad;

#endif

typedef long * qaddrt; /* should be typedef quad * qaddrt; */ typedef long daddrt; typedef char * caddrt; typedef ulong inot; typedef long swblkt; typedef long segszt; typedef long offt; typedef ushort uidt; typedef ushort gidt; typedef short pidt; typedef ushort nlinkt; typedef ushort modet; typedef ulong fixptt;

#ifndef POSIXSOURCE

#define NBBY 8 /* number of bits in a byte */

/* * Select uses bit masks of file descriptors in longs. These macros * manipulate such bit fields (the filesystem macros use chars). * FDSETSIZE may be defined by the user, but the default here should * be >= NOFILE (param.h). */

#ifndef FDSETSIZE

#define FDSETSIZE 1024

#endif

typedef long fdmask;

#define NFDBITS (sizeof(fdmask) * NBBY) /* bits per mask */

#ifndef howmany

#define howmany(x, y) (((x)+((y)-1))/(y))

#endif

typedef struct fdset { fdmask fdsbits[howmany(FDSETSIZE, NFDBITS)]; } fdset;

#define FDSET(n, p) ((p)->fdsbits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))

#define FDCLR(n, p) ((p)->fdsbits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))

#define FDISSET(n, p) ((p)->fdsbits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))

#define FDCOPY(f, t) bcopy(f, t, sizeof(*(f)))

#define FDZERO(p) bzero((char *)(p), sizeof(*(p)))

#endif /* !POSIXSOURCE */

#endif /* !TYPESH */

SEE ALSO

fs(5), time(3), lseek(2), adb(1) HISTORY A ttyyppeess file appeared in Version 7 AT&T UNIX. Darwin AUGUST 2, 2001 Darwin




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™