xref: /xnu-10002.81.5/libkern/libkern/version.h.template (revision 5e3eaea39dcf651e66cb99ba7d70e32cc4a99587)
1*5e3eaea3SApple OSS Distributions/*
2*5e3eaea3SApple OSS Distributions * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
3*5e3eaea3SApple OSS Distributions *
4*5e3eaea3SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5*5e3eaea3SApple OSS Distributions *
6*5e3eaea3SApple OSS Distributions * The contents of this file constitute Original Code as defined in and
7*5e3eaea3SApple OSS Distributions * are subject to the Apple Public Source License Version 1.1 (the
8*5e3eaea3SApple OSS Distributions * "License").  You may not use this file except in compliance with the
9*5e3eaea3SApple OSS Distributions * License.  Please obtain a copy of the License at
10*5e3eaea3SApple OSS Distributions * http://www.apple.com/publicsource and read it before using this file.
11*5e3eaea3SApple OSS Distributions *
12*5e3eaea3SApple OSS Distributions * This Original Code and all software distributed under the License are
13*5e3eaea3SApple OSS Distributions * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14*5e3eaea3SApple OSS Distributions * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15*5e3eaea3SApple OSS Distributions * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16*5e3eaea3SApple OSS Distributions * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
17*5e3eaea3SApple OSS Distributions * License for the specific language governing rights and limitations
18*5e3eaea3SApple OSS Distributions * under the License.
19*5e3eaea3SApple OSS Distributions *
20*5e3eaea3SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
21*5e3eaea3SApple OSS Distributions */
22*5e3eaea3SApple OSS Distributions
23*5e3eaea3SApple OSS Distributions#ifndef	LIBKERN_VERSION_H
24*5e3eaea3SApple OSS Distributions#define LIBKERN_VERSION_H
25*5e3eaea3SApple OSS Distributions
26*5e3eaea3SApple OSS Distributions/* Kernel versions conform to kext version strings, as described in:
27*5e3eaea3SApple OSS Distributions * http://developer.apple.com/technotes/tn/tn1132.html
28*5e3eaea3SApple OSS Distributions */
29*5e3eaea3SApple OSS Distributions
30*5e3eaea3SApple OSS Distributions/* VERSION_MAJOR, version_major is an integer that represents that major version
31*5e3eaea3SApple OSS Distributions * of the kernel
32*5e3eaea3SApple OSS Distributions */
33*5e3eaea3SApple OSS Distributions#define VERSION_MAJOR		###KERNEL_VERSION_MAJOR###
34*5e3eaea3SApple OSS Distributions
35*5e3eaea3SApple OSS Distributions/* VERSION_MINOR, version_minor is an integer that represents the minor version
36*5e3eaea3SApple OSS Distributions * of the kernel
37*5e3eaea3SApple OSS Distributions */
38*5e3eaea3SApple OSS Distributions#define VERSION_MINOR		###KERNEL_VERSION_MINOR###
39*5e3eaea3SApple OSS Distributions
40*5e3eaea3SApple OSS Distributions/* VERSION_VARIANT, version_variant is a string that contains the revision,
41*5e3eaea3SApple OSS Distributions * stage, and prerelease level of the kernel
42*5e3eaea3SApple OSS Distributions */
43*5e3eaea3SApple OSS Distributions#define VERSION_VARIANT		"###KERNEL_VERSION_VARIANT###"
44*5e3eaea3SApple OSS Distributions
45*5e3eaea3SApple OSS Distributions/* VERSION_REVISION, version_revision is an integer that represents the revision
46*5e3eaea3SApple OSS Distributions * of the kernel
47*5e3eaea3SApple OSS Distributions */
48*5e3eaea3SApple OSS Distributions#define VERSION_REVISION	###KERNEL_VERSION_REVISION###
49*5e3eaea3SApple OSS Distributions
50*5e3eaea3SApple OSS Distributions/* VERSION_STAGE, version_stage, is an integer set to one of the following: */
51*5e3eaea3SApple OSS Distributions#define VERSION_STAGE_DEV	0x20
52*5e3eaea3SApple OSS Distributions#define VERSION_STAGE_ALPHA	0x40
53*5e3eaea3SApple OSS Distributions#define VERSION_STAGE_BETA	0x60
54*5e3eaea3SApple OSS Distributions#define VERSION_STAGE_RELEASE	0x80
55*5e3eaea3SApple OSS Distributions#define VERSION_STAGE		###KERNEL_VERSION_STAGE###
56*5e3eaea3SApple OSS Distributions
57*5e3eaea3SApple OSS Distributions/* VERSION_PRERELEASE_LEVEL, version_prerelease_level, is an integer sequence
58*5e3eaea3SApple OSS Distributions * number to distinguish between pre-release builds
59*5e3eaea3SApple OSS Distributions */
60*5e3eaea3SApple OSS Distributions#define VERSION_PRERELEASE_LEVEL	###KERNEL_VERSION_PRERELEASE_LEVEL###
61*5e3eaea3SApple OSS Distributions
62*5e3eaea3SApple OSS Distributions/* OSBUILD_CONFIG, osbuild_config is a one-word string describing the build
63*5e3eaea3SApple OSS Distributions * configuration of the kernel, e.g., development or release */
64*5e3eaea3SApple OSS Distributions#define OSBUILD_CONFIG  "###KERNEL_BUILD_CONFIG###"
65*5e3eaea3SApple OSS Distributions
66*5e3eaea3SApple OSS Distributions/* OSTYPE, ostype, is a string as returned by uname -s */
67*5e3eaea3SApple OSS Distributions#define	OSTYPE		"Darwin"
68*5e3eaea3SApple OSS Distributions
69*5e3eaea3SApple OSS Distributions/* OSRELEASE, osrelease, is a string as returned by uname -r */
70*5e3eaea3SApple OSS Distributions#define OSRELEASE	"###KERNEL_VERSION_LONG###"
71*5e3eaea3SApple OSS Distributions
72*5e3eaea3SApple OSS Distributions#ifndef ASSEMBLER
73*5e3eaea3SApple OSS Distributions
74*5e3eaea3SApple OSS Distributions#if defined(__cplusplus)
75*5e3eaea3SApple OSS Distributionsextern "C" {
76*5e3eaea3SApple OSS Distributions#endif
77*5e3eaea3SApple OSS Distributions
78*5e3eaea3SApple OSS Distributions/* Build-time value of VERSION_MAJOR */
79*5e3eaea3SApple OSS Distributionsextern const int version_major;
80*5e3eaea3SApple OSS Distributions
81*5e3eaea3SApple OSS Distributions/* Build-time value of VERSION_MINOR */
82*5e3eaea3SApple OSS Distributionsextern const int version_minor;
83*5e3eaea3SApple OSS Distributions
84*5e3eaea3SApple OSS Distributions/* Build-time value of VERSION_VARIANT */
85*5e3eaea3SApple OSS Distributionsextern const char version_variant[];
86*5e3eaea3SApple OSS Distributions
87*5e3eaea3SApple OSS Distributions/* Build-time value of VERSION_REVISION */
88*5e3eaea3SApple OSS Distributionsextern const int version_revision;
89*5e3eaea3SApple OSS Distributions
90*5e3eaea3SApple OSS Distributions/* Build-time value of VERSION_STAGE */
91*5e3eaea3SApple OSS Distributionsextern const int version_stage;
92*5e3eaea3SApple OSS Distributions
93*5e3eaea3SApple OSS Distributions/* Build-time value of VERSION_PRERELEASE_LEVEL */
94*5e3eaea3SApple OSS Distributionsextern const int version_prerelease_level;
95*5e3eaea3SApple OSS Distributions
96*5e3eaea3SApple OSS Distributions/* Build-time value of CURRENT_KERNEL_CONFIG */
97*5e3eaea3SApple OSS Distributionsextern const char osbuild_config[];
98*5e3eaea3SApple OSS Distributions
99*5e3eaea3SApple OSS Distributions/* Build-time value of OSTYPE */
100*5e3eaea3SApple OSS Distributionsextern const char ostype[];
101*5e3eaea3SApple OSS Distributions
102*5e3eaea3SApple OSS Distributions/* Build-time value of OSRELEASE */
103*5e3eaea3SApple OSS Distributionsextern const char osrelease[];
104*5e3eaea3SApple OSS Distributions
105*5e3eaea3SApple OSS Distributions/* osbuilder is a string as returned by uname -r */
106*5e3eaea3SApple OSS Distributionsextern const char osbuilder[];
107*5e3eaea3SApple OSS Distributions
108*5e3eaea3SApple OSS Distributions/* version is a string of the following form, as returned by uname -v:
109*5e3eaea3SApple OSS Distributions * "Darwin Kernel Version <osrelease>: <build date>; <osbuilder>:<build root>"
110*5e3eaea3SApple OSS Distributions */
111*5e3eaea3SApple OSS Distributions
112*5e3eaea3SApple OSS Distributionsextern const char version[];
113*5e3eaea3SApple OSS Distributions
114*5e3eaea3SApple OSS Distributions#define OSVERSIZE 256
115*5e3eaea3SApple OSS Distributionsextern char osversion[];
116*5e3eaea3SApple OSS Distributions
117*5e3eaea3SApple OSS Distributions
118*5e3eaea3SApple OSS Distributions#if defined(__cplusplus)
119*5e3eaea3SApple OSS Distributions}
120*5e3eaea3SApple OSS Distributions#endif
121*5e3eaea3SApple OSS Distributions
122*5e3eaea3SApple OSS Distributions#endif /* !ASSEMBLER */
123*5e3eaea3SApple OSS Distributions
124*5e3eaea3SApple OSS Distributions#endif	/* LIBKERN_VERSION_H */
125