version 1.1.1.1, 2008/06/03 10:38:44 |
version 1.1.1.1.2.1, 2008/08/13 17:12:28 |
|
|
#define _SYS_TYPES_H_ |
#define _SYS_TYPES_H_ |
|
|
/* Machine type dependent parameters. */ |
/* Machine type dependent parameters. */ |
#include <machine/ansi.h> |
|
#include <machine/types.h> |
#include <machine/types.h> |
#include <prex/types.h> |
#include <prex/types.h> |
|
|
|
|
typedef unsigned short u_short; |
typedef unsigned short u_short; |
typedef unsigned int u_int; |
typedef unsigned int u_int; |
typedef unsigned long u_long; |
typedef unsigned long u_long; |
typedef unsigned short ushort; /* Sys V compatibility */ |
|
typedef unsigned int uint; /* Sys V compatibility */ |
|
|
|
typedef uint32_t dev_t; /* device number */ |
typedef uint32_t dev_t; /* device number */ |
typedef uint32_t gid_t; /* group id */ |
typedef uint32_t gid_t; /* group id */ |
|
|
|
|
#include <sys/endian.h> |
#include <sys/endian.h> |
|
|
#ifdef _BSD_CLOCK_T_ |
#if !defined(_CLOCK_T) |
typedef _BSD_CLOCK_T_ clock_t; |
#define _CLOCK_T |
#undef _BSD_CLOCK_T_ |
typedef unsigned long clock_t; /* relative time in a specified resolution */ |
#endif |
#endif |
|
|
#ifdef _BSD_SIZE_T_ |
#if !defined(_SIZE_T) |
typedef _BSD_SIZE_T_ size_t; |
#define _SIZE_T |
#undef _BSD_SIZE_T_ |
typedef unsigned int size_t; /* size of something in bytes */ |
#endif |
#endif |
|
|
#ifdef _BSD_SSIZE_T_ |
#if !defined(_SSIZE_T) |
typedef _BSD_SSIZE_T_ ssize_t; |
#define _SSIZE_T |
#undef _BSD_SSIZE_T_ |
typedef int ssize_t; /* size of something in bytes */ |
#endif |
#endif |
|
|
#ifdef _BSD_TIME_T_ |
#if !defined(_TIME_T) |
typedef _BSD_TIME_T_ time_t; |
#define _TIME_T |
#undef _BSD_TIME_T_ |
typedef long time_t; /* time of day in seconds */ |
#endif |
#endif |
|
|
#ifndef _POSIX_SOURCE |
|
#define NBBY 8 /* number of bits in a byte */ |
#define NBBY 8 /* number of bits in a byte */ |
|
|
|
#ifndef KERNEL |
/* |
/* |
* Select uses bit masks of file descriptors in longs. These macros |
* Select uses bit masks of file descriptors in longs. These macros |
* manipulate such bit fields (the filesystem macros use chars). |
* manipulate such bit fields (the filesystem macros use chars). |
|
|
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) |
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) |
#define FD_COPY(f, t) bcopy(f, t, sizeof(*(f))) |
#define FD_COPY(f, t) bcopy(f, t, sizeof(*(f))) |
#define FD_ZERO(p) bzero(p, sizeof(*(p))) |
#define FD_ZERO(p) bzero(p, sizeof(*(p))) |
|
#endif /* !KERNEL */ |
|
|
#if defined(__STDC__) && defined(KERNEL) |
|
/* |
|
* Forward structure declarations for function prototypes. We include the |
|
* common structures that cross subsystem boundaries here; others are mostly |
|
* used in the same place that the structure is defined. |
|
*/ |
|
struct pgrp; |
|
struct rusage; |
|
struct file; |
|
struct buf; |
|
struct tty; |
|
#endif |
|
|
|
#endif /* !_POSIX_SOURCE */ |
|
#endif /* !_SYS_TYPES_H_ */ |
#endif /* !_SYS_TYPES_H_ */ |