]> git.saurik.com Git - apple/xnu.git/blob - libkern/libkern/version.h.template
895a4a8d81078844683bcd6b4217f822a822abb1
[apple/xnu.git] / libkern / libkern / version.h.template
1 /*
2 * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
5 *
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
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
14 * agreement.
15 *
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
18 * file.
19 *
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
27 *
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
29 */
30
31 #ifndef LIBKERN_VERSION_H
32 #define LIBKERN_VERSION_H
33
34 #if defined(__cplusplus)
35 extern "C" {
36 #endif
37
38 /* Kernel versions conform to kext version strings, as described in:
39 * http://developer.apple.com/technotes/tn/tn1132.html
40 */
41
42 /* VERSION_MAJOR, version_major is an integer that represents that major version
43 * of the kernel
44 */
45 #define VERSION_MAJOR ###KERNEL_VERSION_MAJOR###
46 extern const int version_major;
47
48 /* VERSION_MINOR, version_minor is an integer that represents the minor version
49 * of the kernel
50 */
51 #define VERSION_MINOR ###KERNEL_VERSION_MINOR###
52 extern const int version_minor;
53
54 /* VERSION_VARIANT, version_variant is a string that contains the revision,
55 * stage, and prerelease level of the kernel
56 */
57 #define VERSION_VARIANT "###KERNEL_VERSION_VARIANT###"
58 extern const char version_variant[];
59
60 /* VERSION_REVISION, version_revision is an integer that represents the revision
61 * of the kernel
62 */
63 #define VERSION_REVISION ###KERNEL_VERSION_REVISION###
64 extern const int version_revision;
65
66 /* VERSION_STAGE, version_stage, is an integer set to one of the following: */
67 #define VERSION_STAGE_DEV 0x20
68 #define VERSION_STAGE_ALPHA 0x40
69 #define VERSION_STAGE_BETA 0x60
70 #define VERSION_STAGE_RELEASE 0x80
71 #define VERSION_STAGE ###KERNEL_VERSION_STAGE###
72 extern const int version_stage;
73
74 /* VERSION_PRERELEASE_LEVEL, version_prerelease_level, is an integer sequence
75 * number to distinguish between pre-release builds
76 */
77 #define VERSION_PRERELEASE_LEVEL ###KERNEL_VERSION_PRERELEASE_LEVEL###
78 extern const int version_prerelease_level;
79
80 /* OSTYPE, ostype, is a string as returned by uname -s */
81 #define OSTYPE "Darwin"
82 extern const char ostype[];
83
84 /* OSRELEASE, osrelease, is a string as returned by uname -r */
85 #define OSRELEASE "###KERNEL_VERSION_LONG###"
86 extern const char osrelease[];
87
88 /* osbuilder is a string as returned by uname -r */
89 extern const char osbuilder[];
90
91 /* version is a string of the following form, as returned by uname -v:
92 * "Darwin Kernel Version <osrelease>: <build date>; <osbuilder>:<build root>"
93 */
94
95 extern const char version[];
96
97
98 #if defined(__cplusplus)
99 }
100 #endif
101
102 #endif /* LIBKERN_VERSION_H */