]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/libsa/types.h
ec12bec91fb4eb533bcd75a52176b06ecf2faf1b
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
28 * Revision 1.1.1.1 1998/09/22 21:05:51 wsanchez
29 * Import of Mac OS X kernel (~semeria)
31 * Revision 1.1.1.1 1998/03/07 02:25:35 wsanchez
32 * Import of OSF Mach kernel (~mburg)
34 * Revision 1.1.2.1 1996/09/17 16:56:21 bruel
35 * created from standalone mach servers.
41 #ifndef _MACH_TYPES_H_
42 #define _MACH_TYPES_H_
44 #include "machine/types.h"
48 typedef unsigned long size_t;
52 * Common type definitions that lots of old files seem to want.
55 typedef unsigned char u_char
; /* unsigned char */
56 typedef unsigned short u_short
; /* unsigned short */
57 typedef unsigned int u_int
; /* unsigned int */
58 typedef unsigned long u_long
; /* unsigned long */
60 typedef struct _quad_
{
61 unsigned int val
[2]; /* 2 32-bit values make... */
62 } quad
; /* an 8-byte item */
64 typedef char * caddr_t
; /* address of a (signed) char */
66 typedef int time_t; /* a signed 32 */
67 typedef unsigned int daddr_t
; /* an unsigned 32 */
68 typedef unsigned int off_t
; /* another unsigned 32 */
71 #define major(i) (((i) >> 8) & 0xFF)
72 #define minor(i) ((i) & 0xFF)
73 #define makedev(i,j) ((((i) & 0xFF) << 8) | ((j) & 0xFF))
76 #define NULL ((void *) 0) /* the null pointer */
80 * Shorthand type definitions for unsigned storage classes
82 typedef unsigned char uchar_t
;
83 typedef unsigned short ushort_t
;
84 typedef unsigned int uint_t
;
85 typedef unsigned long ulong_t
;
86 typedef volatile unsigned char vuchar_t
;
87 typedef volatile unsigned short vushort_t
;
88 typedef volatile unsigned int vuint_t
;
89 typedef volatile unsigned long vulong_t
;
90 #endif /* _MACH_TYPES_H_ */