]>
git.saurik.com Git - apple/xnu.git/blob - libkern/libkern/OSTypes.h
1119f73038bdaf936c79ef8eda364fa059937933
2 * Copyright (c) 1999-2012 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_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 License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
36 #define OSTYPES_K64_REV 2
38 typedef unsigned int UInt
;
39 typedef signed int SInt
;
43 typedef unsigned char UInt8
;
44 typedef unsigned short UInt16
;
46 typedef unsigned int UInt32
;
48 typedef unsigned long UInt32
;
50 typedef unsigned long long UInt64
;
51 #if defined(__BIG_ENDIAN__)
52 typedef struct UnsignedWide
{
55 } UnsignedWide
__attribute__((deprecated
));
56 #elif defined(__LITTLE_ENDIAN__)
57 typedef struct UnsignedWide
{
60 } UnsignedWide
__attribute__((deprecated
));
62 #error Unknown endianess.
65 typedef signed char SInt8
;
66 typedef signed short SInt16
;
68 typedef signed int SInt32
;
70 typedef signed long SInt32
;
72 typedef signed long long SInt64
;
74 typedef SInt32 OSStatus
;
76 #ifndef ABSOLUTETIME_SCALAR_TYPE
77 #define ABSOLUTETIME_SCALAR_TYPE 1
79 typedef UInt64 AbsoluteTime
;
81 typedef UInt32 OptionBits
__attribute__((deprecated
));
85 * Use intrinsic boolean types for the LP64 kernel, otherwise maintain
86 * source and binary backward compatibility. This attempts to resolve
87 * the "(x == true)" vs. "(x)" conditional issue.
91 #else /* !__cplusplus */
92 #if defined(__STDC_VERSION__) && ((__STDC_VERSION__ - 199901L) > 0L)
93 /* only use this if we are sure we are using a c99 compiler */
94 typedef _Bool Boolean
;
96 /* Fall back to previous definition unless c99 */
97 typedef unsigned char Boolean
;
99 #endif /* !__cplusplus */
100 #else /* !__LP64__ */
101 typedef unsigned char Boolean
;
102 #endif /* !__LP64__ */
106 #include <sys/_types/_os_inline.h>
108 #endif /* _OS_OSTYPES_H */