]> git.saurik.com Git - apple/xnu.git/blame - osfmk/libsa/types.h
xnu-792.6.56.tar.gz
[apple/xnu.git] / osfmk / libsa / types.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
ff6e181a
A
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. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
1c79356b 12 *
ff6e181a
A
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1c79356b
A
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
ff6e181a
A
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
1c79356b
A
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/*
24 * @OSF_COPYRIGHT@
25 */
26/*
27 * HISTORY
28 *
29 * Revision 1.1.1.1 1998/09/22 21:05:51 wsanchez
30 * Import of Mac OS X kernel (~semeria)
31 *
32 * Revision 1.1.1.1 1998/03/07 02:25:35 wsanchez
33 * Import of OSF Mach kernel (~mburg)
34 *
35 * Revision 1.1.2.1 1996/09/17 16:56:21 bruel
36 * created from standalone mach servers.
37 * [96/09/17 bruel]
38 *
39 * $EndLog$
40 */
41
42#ifndef _MACH_TYPES_H_
43#define _MACH_TYPES_H_
44
45#include "machine/types.h"
46
47#ifndef _SIZE_T
48#define _SIZE_T
49typedef unsigned long size_t;
50#endif /* _SIZE_T */
51
52/*
53 * Common type definitions that lots of old files seem to want.
54 */
55
56typedef unsigned char u_char; /* unsigned char */
57typedef unsigned short u_short; /* unsigned short */
58typedef unsigned int u_int; /* unsigned int */
59typedef unsigned long u_long; /* unsigned long */
60
61typedef struct _quad_ {
62 unsigned int val[2]; /* 2 32-bit values make... */
63} quad; /* an 8-byte item */
64
65typedef char * caddr_t; /* address of a (signed) char */
66
67typedef int time_t; /* a signed 32 */
68typedef unsigned int daddr_t; /* an unsigned 32 */
91447636 69#if 0 /* off_t should be 64-bit ! */
1c79356b 70typedef unsigned int off_t; /* another unsigned 32 */
91447636 71#endif
1c79356b
A
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 */
85typedef unsigned char uchar_t;
86typedef unsigned short ushort_t;
87typedef unsigned int uint_t;
88typedef unsigned long ulong_t;
89typedef volatile unsigned char vuchar_t;
90typedef volatile unsigned short vushort_t;
91typedef volatile unsigned int vuint_t;
92typedef volatile unsigned long vulong_t;
93#endif /* _MACH_TYPES_H_ */