2 * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_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
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
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
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.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
31 #ifndef LIBKERN_VERSION_H
32 #define LIBKERN_VERSION_H
34 #if defined(__cplusplus)
38 /* Kernel versions conform to kext version strings, as described in:
39 * http://developer.apple.com/technotes/tn/tn1132.html
42 /* VERSION_MAJOR, version_major is an integer that represents that major version
45 #define VERSION_MAJOR ###KERNEL_VERSION_MAJOR###
46 extern const int version_major;
48 /* VERSION_MINOR, version_minor is an integer that represents the minor version
51 #define VERSION_MINOR ###KERNEL_VERSION_MINOR###
52 extern const int version_minor;
54 /* VERSION_VARIANT, version_variant is a string that contains the revision,
55 * stage, and prerelease level of the kernel
57 #define VERSION_VARIANT "###KERNEL_VERSION_VARIANT###"
58 extern const char version_variant[];
60 /* VERSION_REVISION, version_revision is an integer that represents the revision
63 #define VERSION_REVISION ###KERNEL_VERSION_REVISION###
64 extern const int version_revision;
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;
74 /* VERSION_PRERELEASE_LEVEL, version_prerelease_level, is an integer sequence
75 * number to distinguish between pre-release builds
77 #define VERSION_PRERELEASE_LEVEL ###KERNEL_VERSION_PRERELEASE_LEVEL###
78 extern const int version_prerelease_level;
80 /* OSTYPE, ostype, is a string as returned by uname -s */
81 #define OSTYPE "Darwin"
82 extern const char ostype[];
84 /* OSRELEASE, osrelease, is a string as returned by uname -r */
85 #define OSRELEASE "###KERNEL_VERSION_LONG###"
86 extern const char osrelease[];
88 /* osbuilder is a string as returned by uname -r */
89 extern const char osbuilder[];
91 /* version is a string of the following form, as returned by uname -v:
92 * "Darwin Kernel Version <osrelease>: <build date>; <osbuilder>:<build root>"
95 extern const char version[];
98 #if defined(__cplusplus)
102 #endif /* LIBKERN_VERSION_H */