2 * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_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_LICENSE_HEADER_END@
23 #ifndef LIBKERN_VERSION_H
24 #define LIBKERN_VERSION_H
26 #if defined(__cplusplus)
30 /* Kernel versions conform to kext version strings, as described in:
31 * http://developer.apple.com/technotes/tn/tn1132.html
34 /* VERSION_MAJOR, version_major is an integer that represents that major version
37 #define VERSION_MAJOR ###KERNEL_VERSION_MAJOR###
38 extern const int version_major;
40 /* VERSION_MINOR, version_minor is an integer that represents the minor version
43 #define VERSION_MINOR ###KERNEL_VERSION_MINOR###
44 extern const int version_minor;
46 /* VERSION_VARIANT, version_variant is a string that contains the revision,
47 * stage, and prerelease level of the kernel
49 #define VERSION_VARIANT "###KERNEL_VERSION_VARIANT###"
50 extern const char version_variant[];
52 /* VERSION_REVISION, version_revision is an integer that represents the revision
55 #define VERSION_REVISION ###KERNEL_VERSION_REVISION###
56 extern const int version_revision;
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;
66 /* VERSION_PRERELEASE_LEVEL, version_prerelease_level, is an integer sequence
67 * number to distinguish between pre-release builds
69 #define VERSION_PRERELEASE_LEVEL ###KERNEL_VERSION_PRERELEASE_LEVEL###
70 extern const int version_prerelease_level;
72 /* OSTYPE, ostype, is a string as returned by uname -s */
73 #define OSTYPE "Darwin"
74 extern const char ostype[];
76 /* OSRELEASE, osrelease, is a string as returned by uname -r */
77 #define OSRELEASE "###KERNEL_VERSION_LONG###"
78 extern const char osrelease[];
80 /* osbuilder is a string as returned by uname -r */
81 extern const char osbuilder[];
83 /* version is a string of the following form, as returned by uname -v:
84 * "Darwin Kernel Version <osrelease>: <build date>; <osbuilder>:<build root>"
87 extern const char version[];
90 #if defined(__cplusplus)
94 #endif /* LIBKERN_VERSION_H */