]> git.saurik.com Git - apple/xnu.git/blame - osfmk/libsa/types.h
xnu-792.25.20.tar.gz
[apple/xnu.git] / osfmk / libsa / types.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
6601e61a 4 * @APPLE_LICENSE_HEADER_START@
1c79356b 5 *
6601e61a
A
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.
8f6c56a5 11 *
6601e61a
A
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
8f6c56a5
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
6601e61a
A
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.
8f6c56a5 19 *
6601e61a 20 * @APPLE_LICENSE_HEADER_END@
1c79356b
A
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 */
91447636 68#if 0 /* off_t should be 64-bit ! */
1c79356b 69typedef unsigned int off_t; /* another unsigned 32 */
91447636 70#endif
1c79356b
A
71
72
73#define major(i) (((i) >> 8) & 0xFF)
74#define minor(i) ((i) & 0xFF)
75#define makedev(i,j) ((((i) & 0xFF) << 8) | ((j) & 0xFF))
76
77#ifndef NULL
78#define NULL ((void *) 0) /* the null pointer */
79#endif
80
81/*
82 * Shorthand type definitions for unsigned storage classes
83 */
84typedef unsigned char uchar_t;
85typedef unsigned short ushort_t;
86typedef unsigned int uint_t;
87typedef unsigned long ulong_t;
88typedef volatile unsigned char vuchar_t;
89typedef volatile unsigned short vushort_t;
90typedef volatile unsigned int vuint_t;
91typedef volatile unsigned long vulong_t;
92#endif /* _MACH_TYPES_H_ */