2 * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
23 #ifndef LIBKERN_VERSION_H
24 #define LIBKERN_VERSION_H
26 /* Kernel versions conform to kext version strings, as described in:
27 * http://developer.apple.com/technotes/tn/tn1132.html
30 /* VERSION_MAJOR, version_major is an integer that represents that major version
33 #define VERSION_MAJOR ###KERNEL_VERSION_MAJOR###
35 /* VERSION_MINOR, version_minor is an integer that represents the minor version
38 #define VERSION_MINOR ###KERNEL_VERSION_MINOR###
40 /* VERSION_VARIANT, version_variant is a string that contains the revision,
41 * stage, and prerelease level of the kernel
43 #define VERSION_VARIANT "###KERNEL_VERSION_VARIANT###"
45 /* VERSION_REVISION, version_revision is an integer that represents the revision
48 #define VERSION_REVISION ###KERNEL_VERSION_REVISION###
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###
57 /* VERSION_PRERELEASE_LEVEL, version_prerelease_level, is an integer sequence
58 * number to distinguish between pre-release builds
60 #define VERSION_PRERELEASE_LEVEL ###KERNEL_VERSION_PRERELEASE_LEVEL###
62 /* OSTYPE, ostype, is a string as returned by uname -s */
63 #define OSTYPE "Darwin"
65 /* OSRELEASE, osrelease, is a string as returned by uname -r */
66 #define OSRELEASE "###KERNEL_VERSION_LONG###"
70 #if defined(__cplusplus)
74 /* Build-time value of VERSION_MAJOR */
75 extern const int version_major;
77 /* Build-time value of VERSION_MINOR */
78 extern const int version_minor;
80 /* Build-time value of VERSION_VARIANT */
81 extern const char version_variant[];
83 /* Build-time value of VERSION_REVISION */
84 extern const int version_revision;
86 /* Build-time value of VERSION_STAGE */
87 extern const int version_stage;
89 /* Build-time value of VERSION_PRERELEASE_LEVEL */
90 extern const int version_prerelease_level;
92 /* Build-time value of OSTYPE */
93 extern const char ostype[];
95 /* Build-time value of OSRELEASE */
96 extern const char osrelease[];
98 /* osbuilder is a string as returned by uname -r */
99 extern const char osbuilder[];
101 /* version is a string of the following form, as returned by uname -v:
102 * "Darwin Kernel Version <osrelease>: <build date>; <osbuilder>:<build root>"
105 extern const char version[];
107 #define OSVERSIZE 256
108 extern char osversion[];
111 #if defined(__cplusplus)
115 #endif /* !ASSEMBLER */
117 #endif /* LIBKERN_VERSION_H */