These changes are the raw update to qemu-2.6.
[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  * You can also choose to distribute this program under the terms of
20  * the Unmodified Binary Distribution Licence (as given in the file
21  * COPYING.UBDL), provided that you have satisfied its requirements.
22  */
23
24 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
25
26 /** @file
27  *
28  * Version number
29  *
30  */
31
32 #include <wchar.h>
33 #include <ipxe/features.h>
34 #include <ipxe/version.h>
35 #include <config/general.h>
36 #include <config/branding.h>
37
38 /**
39  * Create wide-character version of string
40  *
41  * @v string            String
42  * @ret wstring         Wide-character version of string
43  */
44 #define WSTRING( string ) _WSTRING ( string )
45 #define _WSTRING( string ) L ## string
46
47 /** Version number feature */
48 FEATURE_VERSION ( VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH );
49
50 /** Build timestamp (generated by linker) */
51 extern char _build_timestamp[];
52
53 /** Build ID (generated by linker) */
54 extern char _build_id[];
55
56 /** Build timestamp */
57 unsigned long build_timestamp = ( ( unsigned long ) _build_timestamp );
58
59 /** Build ID */
60 unsigned long build_id = ( ( unsigned long ) _build_id );
61
62 /** Product major version */
63 const int product_major_version = VERSION_MAJOR;
64
65 /** Product minor version */
66 const int product_minor_version = VERSION_MINOR;
67
68 /** Product version string */
69 const char product_version[] = VERSION;
70
71 /** Product name string */
72 const char product_name[] = PRODUCT_NAME;
73
74 /** Product short name string */
75 const char product_short_name[] = PRODUCT_SHORT_NAME;
76
77 /** Build name string */
78 const char build_name[] = BUILD_NAME;
79
80 /** Wide-character product version string */
81 const wchar_t product_wversion[] = WSTRING ( VERSION );
82
83 /** Wide-character product name string */
84 const wchar_t product_wname[] = WSTRING ( PRODUCT_NAME );
85
86 /** Wide-character product short name string */
87 const wchar_t product_short_wname[] = WSTRING ( PRODUCT_SHORT_NAME );
88
89 /** Wide-character build name string */
90 const wchar_t build_wname[] = WSTRING ( BUILD_NAME );
91
92 /** Copy of build name string within ".prefix" */
93 const char build_name_prefix[] __attribute__ (( section ( ".prefix.name" ) ))
94         = BUILD_NAME;