From owner-man-jp-reviewer@jp.freebsd.org  Wed May  6 20:13:23 1998
Received: by jaz.jp.freebsd.org (8.8.8+3.0Wbeta7/8.7.3) id UAA23173
	Wed, 6 May 1998 20:13:23 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.8+3.0Wbeta7/8.7.3) with ESMTP id UAA23166
	for <man-jp-reviewer@jp.freebsd.org>; Wed, 6 May 1998 20:13:21 +0900 (JST)
Received: from localhost (g92k0323@muse09.mse.waseda.ac.jp [133.9.5.41])
	by pandora.mse.waseda.ac.jp (8.8.8+2.7Wbeta7/3.6W) with ESMTP id UAA24290;
	Wed, 6 May 1998 20:13:19 +0900 (JST)
Message-Id: <199805061113.UAA24290@pandora.mse.waseda.ac.jp>
To: man-jp-reviewer@jp.freebsd.org
cc: g92k0323@mse.waseda.ac.jp
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: text/plain; charset=ISO-2022-JP
Date: Wed, 06 May 1998 20:13:18 +0900
From: KANOU Hiroki <g92k0323@mse.waseda.ac.jp>
Reply-To: man-jp-reviewer@jp.freebsd.org
Precedence: list
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=24]
X-Sequence: man-jp-reviewer 104
Subject: [man-jp-reviewer 104] types.5
Errors-To: owner-man-jp-reviewer@jp.freebsd.org
Sender: owner-man-jp-reviewer@jp.freebsd.org

$B%P%$%H?t$N3d$KLu$9$H$3$m$,>/$J$/$F:Q$_$^$7$?!#(B

.\" Copyright (c) 1980, 1991, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)types.5	8.1 (Berkeley) 6/5/93
.\" jpman %Id: types.5,v 0.0 1998/04/24 15:56:45 horikawa Stab %
.\"	$Id: types.5,v 1.3.2.2 1997/02/28 05:53:25 mpp Exp $
.\"
.Dd June 5, 1993
.Dt TYPES 5
.Os BSD 4
.Sh $BL>>N(B
.Nm types
.Nd $B%7%9%F%`$N%G!<%?7?(B
.Sh $B=q<0(B
.Fd #include <sys/types.h>
.Sh $B2r@b(B
$B%U%!%$%k(B
.Pa sys/types.h
$B$O%+!<%M%kFbIt$G(B ($B$[$H$s$I$NJ*$O%7%9%F%`A4BN$rDL$8$F(B) $BMQ$$$i$l$k!"(B
$BDj5A:Q$_$N%G!<%?7?$r4^$_$^$9!#(B
.Bd -literal
#ifndef _SYS_TYPES_H_
#define	_SYS_TYPES_H_

/* $B5!<o$K0MB8$9$k%Q%i%a!<%?!#(B */
#include <machine/ansi.h>
#include <machine/types.h>

#ifndef _POSIX_SOURCE
typedef	unsigned char	u_char;
typedef	unsigned short	u_short;
typedef	unsigned int	u_int;
typedef	unsigned long	u_long;
typedef	unsigned short	ushort;		/* Sys V $B$H$N8_49@-(B */
typedef	unsigned int	uint;		/* Sys V $B$H$N8_49@-(B */
#endif

typedef	u_int64_t	u_quad_t;	/* quads */
typedef	int64_t		quad_t;
typedef	quad_t *	qaddr_t;

typedef	char *		caddr_t;	/* $B%3%"%"%I%l%9(B */
typedef	int32_t		daddr_t;	/* $B%G%#%9%/%"%I%l%9(B */
typedef	u_int32_t	dev_t;		/* $B%G%P%$%9HV9f(B */
typedef u_int32_t	fixpt_t;	/* $B8GDj>.?tE@?t(B */
typedef	u_int32_t	gid_t;		/* $B%0%k!<%W(B ID */
typedef	u_int32_t	ino_t;		/* inode $BHV9f(B */
typedef	long		key_t;		/* IPC $B%-!<(B (Sys V $B%W%m%;%94VDL?.MQ(B) */
typedef	u_int16_t	mode_t;		/* $B%Q!<%_%C%7%g%s(B */
typedef	u_int16_t	nlink_t;	/* $B%j%s%/%+%&%s%H(B */
typedef	_BSD_OFF_T_	off_t;		/* $B%U%!%$%k%*%U%;%C%H(B */
typedef	_BSD_PID_T_	pid_t;		/* $B%W%m%;%9(B ID */
typedef	int32_t		segsz_t;	/* $B%;%0%a%s%H%5%$%:(B */
typedef	int32_t		swblk_t;	/* $B%9%o%C%W%*%U%;%C%H(B */
typedef	u_int32_t	uid_t;		/* $B%f!<%6(B id */

typedef	quad_t		rlim_t; 	/* $B%j%=!<%9%j%_%C%H(B */

#ifdef KERNEL
typedef	int		boolean_t;
typedef	struct vm_page	*vm_page_t;
#endif

/*
 * $B$3$l$O(B unistd.h $B$K$"$k$Y$-$G$9$,!"(Blseek $B$NBh(B 2 $B0z?t$r(B off_t $B$K%-%c%9%H(B
 * $B$7$F$$$k%W%m%0%i%`$,@5$7$$HG$N(B lseek $B$rMQ$$$k$3$H$r3N<B$K$9$k$?$a$K(B
 * $B$3$3$KCV$+$l$F$$$^$9!#(B
 */
#ifndef KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
off_t	 lseek __P((int, off_t, int));
__END_DECLS
#endif

#ifndef _POSIX_SOURCE
/*
 * minor() $B$O%$%s%G%C%/%9$NBe$o$j$K%/%C%-!<$rM?$($^$9!#$3$l$O!"%S%C%H(B0-15
 * $B$N0UL#$rJQ99$7$?$j!"%S%C%H(B 16-31 $B$r%7%U%H$7$F!"$=$l$r;H$o$J$$%G%P%$%9(B
 * $B$K$H$C$F;~4V$H%9%Z!<%9$NL5BL8/$$$K$J$k$3$H$r$7$?$/$J$$$+$i$G$9!#(B
 */
#define	major(x)	((int)(((u_int)(x) >> 8)&0xff))	/* $B%a%8%c!<HV9f(B */
#define	minor(x)	((int)((x)&0xffff00ff))		/* $B%^%$%J!<HV9f(B */
#define	makedev(x,y)	((dev_t)(((x) << 8) | (y)))	/* dev_t $B$r:n$k(B */
#endif

#include <machine/endian.h>

#ifdef	_BSD_CLOCK_T_
typedef	_BSD_CLOCK_T_	clock_t;
#undef	_BSD_CLOCK_T_
#endif

#ifdef	_BSD_SIZE_T_
typedef	_BSD_SIZE_T_	size_t;
#undef	_BSD_SIZE_T_
#endif

#ifdef	_BSD_SSIZE_T_
typedef	_BSD_SSIZE_T_	ssize_t;
#undef	_BSD_SSIZE_T_
#endif

#ifdef	_BSD_TIME_T_
typedef	_BSD_TIME_T_	time_t;
#undef	_BSD_TIME_T_
#endif

#ifndef _POSIX_SOURCE
#define	NBBY	8		/* 1 $B%P%$%H$K4^$^$l$k%S%C%H?t(B */

/*
 * select $B$O(B long $B7?$N%U%!%$%k5-=R;R%S%C%H%^%9%/$rMQ$$$^$9!#$3$l$i$N(B
 * $B%^%/%m$O$3$N7?$N%S%C%H%U%#!<%k%I$rA`:n$7$^$9(B ($B%U%!%$%k%7%9%F%`$N(B
 * $B%^%/%m$O(B char $B7?$rMQ$$$^$9(B)$B!#(B
 * FD_SETSIZE $B$O%f!<%6$K$h$C$FDj5A$9$k$3$H$b$G$-$^$9$,!"$[$H$s$I$N(B
 * $B%f!<%6$K$H$C$F$O!"$3$3$K<($9%G%U%)%k%H$G==J,$G$7$g$&!#(B
 */
#ifndef	FD_SETSIZE
#define	FD_SETSIZE	256
#endif

typedef long	fd_mask;
#define NFDBITS	(sizeof(fd_mask) * NBBY)	/* $B%^%9%/$4$H$N%S%C%H(B */

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

typedef	struct fd_set {
	fd_mask	fds_bits[howmany(FD_SETSIZE, NFDBITS)];
} fd_set;

#define	FD_SET(n, p)	((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define	FD_CLR(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_ZERO(p)	bzero(p, sizeof(*(p)))

#if defined(__STDC__) && defined(KERNEL)
/*
 * $B4X?t%W%m%H%?%$%W$N$?$a$N@h9T4X?tDj5A!#%5%V%7%9%F%`$N6-3&$rD6$($F(B
 * $BMQ$$$i$l$k6&DL$N9=B$BN$r$3$3$K4^$a$^$9!#$=$NB>$N$[$H$s$I$O!"9=B$BN(B
 * $B$,Dj5A$5$l$?$N$HF1$8>l=j$G;HMQ$5$l$^$9!#(B
 */
struct	proc;
struct	pgrp;
struct	ucred;
struct	rusage;
struct	file;
struct	buf;
struct	tty;
struct	uio;
#endif

#endif /* !_POSIX_SOURCE */
#endif /* !_SYS_TYPES_H_ */
.Ed
.Sh $B4XO"9`L\(B
.Xr gdb 1 ,
.Xr lseek 2 ,
.Xr time 3 ,
.Xr fs 5
.Sh $BNr;K(B
.Nm
$B%U%!%$%k$O(B
.At v7
$B$+$iEP>l$7$^$7$?!#(B
