]> git.saurik.com Git - apple/xnu.git/blob - libkern/libkern/version.h.template
xnu-2422.90.20.tar.gz
[apple/xnu.git] / libkern / libkern / version.h.template
1 /*
2 * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_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_OSREFERENCE_LICENSE_HEADER_END@
21 */
22
23 #ifndef LIBKERN_VERSION_H
24 #define LIBKERN_VERSION_H
25
26 /* Kernel versions conform to kext version strings, as described in:
27 * http://developer.apple.com/technotes/tn/tn1132.html
28 */
29
30 /* VERSION_MAJOR, version_major is an integer that represents that major version
31 * of the kernel
32 */
33 #define VERSION_MAJOR ###KERNEL_VERSION_MAJOR###
34
35 /* VERSION_MINOR, version_minor is an integer that represents the minor version
36 * of the kernel
37 */
38 #define VERSION_MINOR ###KERNEL_VERSION_MINOR###
39
40 /* VERSION_VARIANT, version_variant is a string that contains the revision,
41 * stage, and prerelease level of the kernel
42 */
43 #define VERSION_VARIANT "###KERNEL_VERSION_VARIANT###"
44
45 /* VERSION_REVISION, version_revision is an integer that represents the revision
46 * of the kernel
47 */
48 #define VERSION_REVISION ###KERNEL_VERSION_REVISION###
49
50 /* VERSION_STAGE, version_stage, is an integer set to one of the following: */
51 #define VERSION_STAGE_DEV 0x20
52 #define VERSION_STAGE_ALPHA 0x40
53 #define VERSION_STAGE_BETA 0x60
54 #define VERSION_STAGE_RELEASE 0x80
55 #define VERSION_STAGE ###KERNEL_VERSION_STAGE###
56
57 /* VERSION_PRERELEASE_LEVEL, version_prerelease_level, is an integer sequence
58 * number to distinguish between pre-release builds
59 */
60 #define VERSION_PRERELEASE_LEVEL ###KERNEL_VERSION_PRERELEASE_LEVEL###
61
62 /* OSTYPE, ostype, is a string as returned by uname -s */
63 #define OSTYPE "Darwin"
64
65 /* OSRELEASE, osrelease, is a string as returned by uname -r */
66 #define OSRELEASE "###KERNEL_VERSION_LONG###"
67
68 #ifndef ASSEMBLER
69
70 #if defined(__cplusplus)
71 extern "C" {
72 #endif
73
74 /* Build-time value of VERSION_MAJOR */
75 extern const int version_major;
76
77 /* Build-time value of VERSION_MINOR */
78 extern const int version_minor;
79
80 /* Build-time value of VERSION_VARIANT */
81 extern const char version_variant[];
82
83 /* Build-time value of VERSION_REVISION */
84 extern const int version_revision;
85
86 /* Build-time value of VERSION_STAGE */
87 extern const int version_stage;
88
89 /* Build-time value of VERSION_PRERELEASE_LEVEL */
90 extern const int version_prerelease_level;
91
92 /* Build-time value of OSTYPE */
93 extern const char ostype[];
94
95 /* Build-time value of OSRELEASE */
96 extern const char osrelease[];
97
98 /* osbuilder is a string as returned by uname -r */
99 extern const char osbuilder[];
100
101 /* version is a string of the following form, as returned by uname -v:
102 * "Darwin Kernel Version <osrelease>: <build date>; <osbuilder>:<build root>"
103 */
104
105 extern const char version[];
106
107 #define OSVERSIZE 256
108 extern char osversion[];
109
110
111 #if defined(__cplusplus)
112 }
113 #endif
114
115 #endif /* !ASSEMBLER */
116
117 #endif /* LIBKERN_VERSION_H */