| 1 | /* |
| 2 | * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. |
| 3 | * |
| 4 | * @APPLE_OSREFERENCE_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_OSREFERENCE_LICENSE_HEADER_END@ |
| 21 | */ |
| 22 | |
| 23 | #ifndef LIBKERN_VERSION_H |
| 24 | #define LIBKERN_VERSION_H |
| 25 | |
| 26 | /* Kernel versions conform to kext version strings, as described in: |
| 27 | * http://developer.apple.com/technotes/tn/tn1132.html |
| 28 | */ |
| 29 | |
| 30 | /* VERSION_MAJOR, version_major is an integer that represents that major version |
| 31 | * of the kernel |
| 32 | */ |
| 33 | #define VERSION_MAJOR 23 |
| 34 | |
| 35 | /* VERSION_MINOR, version_minor is an integer that represents the minor version |
| 36 | * of the kernel |
| 37 | */ |
| 38 | #define VERSION_MINOR 5 |
| 39 | |
| 40 | /* VERSION_VARIANT, version_variant is a string that contains the revision, |
| 41 | * stage, and prerelease level of the kernel |
| 42 | */ |
| 43 | #define VERSION_VARIANT "0" |
| 44 | |
| 45 | /* VERSION_REVISION, version_revision is an integer that represents the revision |
| 46 | * of the kernel |
| 47 | */ |
| 48 | #define VERSION_REVISION 0 |
| 49 | |
| 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 VERSION_STAGE_RELEASE |
| 56 | |
| 57 | /* VERSION_PRERELEASE_LEVEL, version_prerelease_level, is an integer sequence |
| 58 | * number to distinguish between pre-release builds |
| 59 | */ |
| 60 | #define VERSION_PRERELEASE_LEVEL 0 |
| 61 | |
| 62 | /* OSBUILD_CONFIG, osbuild_config is a one-word string describing the build |
| 63 | * configuration of the kernel, e.g., development or release */ |
| 64 | #define OSBUILD_CONFIG "release" |
| 65 | |
| 66 | /* OSTYPE, ostype, is a string as returned by uname -s */ |
| 67 | #define OSTYPE "Darwin" |
| 68 | |
| 69 | /* OSRELEASE, osrelease, is a string as returned by uname -r */ |
| 70 | #define OSRELEASE "23.5.0" |
| 71 | |
| 72 | #ifndef ASSEMBLER |
| 73 | |
| 74 | #if defined(__cplusplus) |
| 75 | extern "C" { |
| 76 | #endif |
| 77 | |
| 78 | /* Build-time value of VERSION_MAJOR */ |
| 79 | extern const int version_major; |
| 80 | |
| 81 | /* Build-time value of VERSION_MINOR */ |
| 82 | extern const int version_minor; |
| 83 | |
| 84 | /* Build-time value of VERSION_VARIANT */ |
| 85 | extern const char version_variant[]; |
| 86 | |
| 87 | /* Build-time value of VERSION_REVISION */ |
| 88 | extern const int version_revision; |
| 89 | |
| 90 | /* Build-time value of VERSION_STAGE */ |
| 91 | extern const int version_stage; |
| 92 | |
| 93 | /* Build-time value of VERSION_PRERELEASE_LEVEL */ |
| 94 | extern const int version_prerelease_level; |
| 95 | |
| 96 | /* Build-time value of CURRENT_KERNEL_CONFIG */ |
| 97 | extern const char osbuild_config[]; |
| 98 | |
| 99 | /* Build-time value of OSTYPE */ |
| 100 | extern const char ostype[]; |
| 101 | |
| 102 | /* Build-time value of OSRELEASE */ |
| 103 | extern const char osrelease[]; |
| 104 | |
| 105 | /* osbuilder is a string as returned by uname -r */ |
| 106 | extern const char osbuilder[]; |
| 107 | |
| 108 | /* version is a string of the following form, as returned by uname -v: |
| 109 | * "Darwin Kernel Version <osrelease>: <build date>; <osbuilder>:<build root>" |
| 110 | */ |
| 111 | |
| 112 | extern const char version[]; |
| 113 | |
| 114 | #define OSVERSIZE 256 |
| 115 | extern char osversion[]; |
| 116 | |
| 117 | |
| 118 | #if defined(__cplusplus) |
| 119 | } |
| 120 | #endif |
| 121 | |
| 122 | #endif /* !ASSEMBLER */ |
| 123 | |
| 124 | #endif /* LIBKERN_VERSION_H */ |
| 125 | |