]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/libsa/types.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
36 * Revision 1.1.1.1 1998/09/22 21:05:51 wsanchez
37 * Import of Mac OS X kernel (~semeria)
39 * Revision 1.1.1.1 1998/03/07 02:25:35 wsanchez
40 * Import of OSF Mach kernel (~mburg)
42 * Revision 1.1.2.1 1996/09/17 16:56:21 bruel
43 * created from standalone mach servers.
49 #ifndef _MACH_TYPES_H_
50 #define _MACH_TYPES_H_
52 #include "machine/types.h"
56 typedef unsigned long size_t;
60 * Common type definitions that lots of old files seem to want.
63 typedef unsigned char u_char
; /* unsigned char */
64 typedef unsigned short u_short
; /* unsigned short */
65 typedef unsigned int u_int
; /* unsigned int */
66 typedef unsigned long u_long
; /* unsigned long */
68 typedef struct _quad_
{
69 unsigned int val
[2]; /* 2 32-bit values make... */
70 } quad
; /* an 8-byte item */
72 typedef char * caddr_t
; /* address of a (signed) char */
74 typedef int time_t; /* a signed 32 */
75 typedef unsigned int daddr_t
; /* an unsigned 32 */
76 #if 0 /* off_t should be 64-bit ! */
77 typedef unsigned int off_t
; /* another unsigned 32 */
81 #define major(i) (((i) >> 8) & 0xFF)
82 #define minor(i) ((i) & 0xFF)
83 #define makedev(i,j) ((((i) & 0xFF) << 8) | ((j) & 0xFF))
86 #define NULL ((void *) 0) /* the null pointer */
90 * Shorthand type definitions for unsigned storage classes
92 typedef unsigned char uchar_t
;
93 typedef unsigned short ushort_t
;
94 typedef unsigned int uint_t
;
95 typedef unsigned long ulong_t
;
96 typedef volatile unsigned char vuchar_t
;
97 typedef volatile unsigned short vushort_t
;
98 typedef volatile unsigned int vuint_t
;
99 typedef volatile unsigned long vulong_t
;
100 #endif /* _MACH_TYPES_H_ */