]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. | |
7 | * | |
8 | * This file contains Original Code and/or Modifications of Original Code | |
9 | * as defined in and that are subject to the Apple Public Source License | |
10 | * Version 2.0 (the 'License'). You may not use this file except in | |
11 | * compliance with the License. Please obtain a copy of the License at | |
12 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
13 | * file. | |
14 | * | |
15 | * The Original Code and all software distributed under the License are | |
16 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
19 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
20 | * Please see the License for the specific language governing rights and | |
21 | * limitations under the License. | |
22 | * | |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /* | |
26 | * @OSF_COPYRIGHT@ | |
27 | */ | |
28 | /* | |
29 | * HISTORY | |
30 | * | |
31 | * Revision 1.1.1.1 1998/09/22 21:05:51 wsanchez | |
32 | * Import of Mac OS X kernel (~semeria) | |
33 | * | |
34 | * Revision 1.1.1.1 1998/03/07 02:25:35 wsanchez | |
35 | * Import of OSF Mach kernel (~mburg) | |
36 | * | |
37 | * Revision 1.1.2.1 1996/09/17 16:56:21 bruel | |
38 | * created from standalone mach servers. | |
39 | * [96/09/17 bruel] | |
40 | * | |
41 | * $EndLog$ | |
42 | */ | |
43 | ||
44 | #ifndef _MACH_TYPES_H_ | |
45 | #define _MACH_TYPES_H_ | |
46 | ||
47 | #include "machine/types.h" | |
48 | ||
49 | #ifndef _SIZE_T | |
50 | #define _SIZE_T | |
51 | typedef unsigned long size_t; | |
52 | #endif /* _SIZE_T */ | |
53 | ||
54 | /* | |
55 | * Common type definitions that lots of old files seem to want. | |
56 | */ | |
57 | ||
58 | typedef unsigned char u_char; /* unsigned char */ | |
59 | typedef unsigned short u_short; /* unsigned short */ | |
60 | typedef unsigned int u_int; /* unsigned int */ | |
61 | typedef unsigned long u_long; /* unsigned long */ | |
62 | ||
63 | typedef struct _quad_ { | |
64 | unsigned int val[2]; /* 2 32-bit values make... */ | |
65 | } quad; /* an 8-byte item */ | |
66 | ||
67 | typedef char * caddr_t; /* address of a (signed) char */ | |
68 | ||
69 | typedef int time_t; /* a signed 32 */ | |
70 | typedef unsigned int daddr_t; /* an unsigned 32 */ | |
71 | typedef unsigned int off_t; /* another unsigned 32 */ | |
72 | ||
73 | ||
74 | #define major(i) (((i) >> 8) & 0xFF) | |
75 | #define minor(i) ((i) & 0xFF) | |
76 | #define makedev(i,j) ((((i) & 0xFF) << 8) | ((j) & 0xFF)) | |
77 | ||
78 | #ifndef NULL | |
79 | #define NULL ((void *) 0) /* the null pointer */ | |
80 | #endif | |
81 | ||
82 | /* | |
83 | * Shorthand type definitions for unsigned storage classes | |
84 | */ | |
85 | typedef unsigned char uchar_t; | |
86 | typedef unsigned short ushort_t; | |
87 | typedef unsigned int uint_t; | |
88 | typedef unsigned long ulong_t; | |
89 | typedef volatile unsigned char vuchar_t; | |
90 | typedef volatile unsigned short vushort_t; | |
91 | typedef volatile unsigned int vuint_t; | |
92 | typedef volatile unsigned long vulong_t; | |
93 | #endif /* _MACH_TYPES_H_ */ |