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