]> git.saurik.com Git - apple/xnu.git/blame - osfmk/libsa/types.h
xnu-123.5.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 *
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.
11 *
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
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22/*
23 * @OSF_COPYRIGHT@
24 */
25/*
26 * HISTORY
27 *
28 * Revision 1.1.1.1 1998/09/22 21:05:51 wsanchez
29 * Import of Mac OS X kernel (~semeria)
30 *
31 * Revision 1.1.1.1 1998/03/07 02:25:35 wsanchez
32 * Import of OSF Mach kernel (~mburg)
33 *
34 * Revision 1.1.2.1 1996/09/17 16:56:21 bruel
35 * created from standalone mach servers.
36 * [96/09/17 bruel]
37 *
38 * $EndLog$
39 */
40
41#ifndef _MACH_TYPES_H_
42#define _MACH_TYPES_H_
43
44#include "machine/types.h"
45
46#ifndef _SIZE_T
47#define _SIZE_T
48typedef unsigned long size_t;
49#endif /* _SIZE_T */
50
51/*
52 * Common type definitions that lots of old files seem to want.
53 */
54
55typedef unsigned char u_char; /* unsigned char */
56typedef unsigned short u_short; /* unsigned short */
57typedef unsigned int u_int; /* unsigned int */
58typedef unsigned long u_long; /* unsigned long */
59
60typedef struct _quad_ {
61 unsigned int val[2]; /* 2 32-bit values make... */
62} quad; /* an 8-byte item */
63
64typedef char * caddr_t; /* address of a (signed) char */
65
66typedef int time_t; /* a signed 32 */
67typedef unsigned int daddr_t; /* an unsigned 32 */
68typedef unsigned int off_t; /* another unsigned 32 */
69
70
71#define major(i) (((i) >> 8) & 0xFF)
72#define minor(i) ((i) & 0xFF)
73#define makedev(i,j) ((((i) & 0xFF) << 8) | ((j) & 0xFF))
74
75#ifndef NULL
76#define NULL ((void *) 0) /* the null pointer */
77#endif
78
79/*
80 * Shorthand type definitions for unsigned storage classes
81 */
82typedef unsigned char uchar_t;
83typedef unsigned short ushort_t;
84typedef unsigned int uint_t;
85typedef unsigned long ulong_t;
86typedef volatile unsigned char vuchar_t;
87typedef volatile unsigned short vushort_t;
88typedef volatile unsigned int vuint_t;
89typedef volatile unsigned long vulong_t;
90#endif /* _MACH_TYPES_H_ */