Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / core / version.c
1 /*
2  * Copyright (C) 2012 Michael Brown <mbrown@fensystems.co.uk>.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of the
7  * License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  * 02110-1301, USA.
18  */
19
20 FILE_LICENCE ( GPL2_OR_LATER );
21
22 /** @file
23  *
24  * Version number
25  *
26  */
27
28 #include <wchar.h>
29 #include <ipxe/features.h>
30 #include <ipxe/version.h>
31 #include <config/general.h>
32
33 /**
34  * Create wide-character version of string
35  *
36  * @v string            String
37  * @ret wstring         Wide-character version of string
38  */
39 #define WSTRING( string ) _WSTRING ( string )
40 #define _WSTRING( string ) L ## string
41
42 /** Version number feature */
43 FEATURE_VERSION ( VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH );
44
45 /** Build timestamp (generated by linker) */
46 extern char _build_timestamp[];
47
48 /** Build ID (generated by linker) */
49 extern char _build_id[];
50
51 /** Build timestamp */
52 unsigned long build_timestamp = ( ( unsigned long ) _build_timestamp );
53
54 /** Build ID */
55 unsigned long build_id = ( ( unsigned long ) _build_id );
56
57 /** Product major version */
58 const int product_major_version = VERSION_MAJOR;
59
60 /** Product minor version */
61 const int product_minor_version = VERSION_MINOR;
62
63 /** Product version string */
64 const char product_version[] = VERSION;
65
66 /** Product name string */
67 const char product_name[] = PRODUCT_NAME;
68
69 /** Product short name string */
70 const char product_short_name[] = PRODUCT_SHORT_NAME;
71
72 /** Build name string */
73 const char build_name[] = BUILD_NAME;
74
75 /** Wide-character product version string */
76 const wchar_t product_wversion[] = WSTRING ( VERSION );
77
78 /** Wide-character product name string */
79 const wchar_t product_wname[] = WSTRING ( PRODUCT_NAME );
80
81 /** Wide-character product short name string */
82 const wchar_t product_short_wname[] = WSTRING ( PRODUCT_SHORT_NAME );
83
84 /** Wide-character build name string */
85 const wchar_t build_wname[] = WSTRING ( BUILD_NAME );
86
87 /** Copy of build name string within ".prefix" */
88 const char build_name_prefix[] __attribute__ (( section ( ".prefix.name" ) ))
89         = BUILD_NAME;