FreeBSD/Linux Kernel Cross Reference
sys/sys/types.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: types.h,v $
29 * Revision 2.9 93/03/11 13:46:33 danner
30 * Removed u_long definition.
31 * Removed definition of size_t.
32 * This file is EXCLUSIVELY here for compat reasons, nothing
33 * should be added to it at this point.
34 * [93/03/06 14:46:00 af]
35 *
36 * Revision 2.8 93/02/01 09:50:33 danner
37 * Updated copyright.
38 * [93/01/12 berman]
39 * Added label_t for sparc compilers.
40 * [92/12/24 berman]
41 *
42 * Revision 2.7 93/01/14 18:00:11 danner
43 * Added definition of size_t.
44 * Added void * cast to the definition of NULL.
45 * [92/12/15 pds]
46 *
47 * Revision 2.6 91/05/14 17:40:39 mrt
48 * Correcting copyright
49 *
50 * Revision 2.5 91/02/05 17:57:07 mrt
51 * Changed to new Mach copyright
52 * [91/02/01 17:49:41 mrt]
53 *
54 * Revision 2.4 90/08/27 22:13:03 dbg
55 * Created.
56 * [90/07/16 dbg]
57 *
58 */
59 #ifndef _SYS_TYPES_H_
60 #define _SYS_TYPES_H_
61
62 /*
63 * Common type definitions that lots of old files seem to want.
64 */
65
66 typedef unsigned char u_char; /* unsigned char */
67 typedef unsigned short u_short; /* unsigned short */
68 typedef unsigned int u_int; /* unsigned int */
69
70 typedef struct _quad_ {
71 unsigned int val[2]; /* 2 long values make... */
72 } quad; /* an 8-byte item */
73
74 typedef char * caddr_t; /* address of a (signed) char */
75
76 #if !defined(_TIME_T_)
77 #define _TIME_T_ 1
78 typedef unsigned int time_t; /* a 32bit integer */
79 #endif /* not defined(_TIME_T_) */
80
81 typedef unsigned int daddr_t; /* a 32bit integer */
82 typedef unsigned int off_t; /* another 32bit integer */
83
84 typedef unsigned short dev_t; /* another unsigned short */
85 #define NODEV ((dev_t)-1) /* and a null value for it */
86
87 #define major(i) ((i) >> 8)
88 #define minor(i) ((i) & 0xFF)
89 #define makedev(i,j) (((i) << 8) | (j))
90
91 #ifndef NULL
92 #define NULL ((void *) 0) /* the null pointer */
93 #endif
94
95 #ifdef sparc
96 typedef struct _physadr { int r[1]; } *physadr;
97 typedef struct label_t {
98 int val[2];
99 } label_t;
100 #endif
101
102 #endif /* _SYS_TYPES_H_ */
Cache object: 00c7ce87e09aadaa72c9858b4f38a580
|