Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/predef/make.h @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 /* | |
2 Copyright Redshift Software, Inc. 2008-2013 | |
3 Distributed under the Boost Software License, Version 1.0. | |
4 (See accompanying file LICENSE_1_0.txt or copy at | |
5 http://www.boost.org/LICENSE_1_0.txt) | |
6 */ | |
7 #include <boost/predef/detail/test.h> | |
8 | |
9 #ifndef BOOST_PREDEF_MAKE_H | |
10 #define BOOST_PREDEF_MAKE_H | |
11 | |
12 /* | |
13 Shorthands for the common version number formats used by vendors... | |
14 */ | |
15 | |
16 /*` | |
17 [heading `BOOST_PREDEF_MAKE_..` macros] | |
18 | |
19 These set of macros decompose common vendor version number | |
20 macros which are composed version, revision, and patch digits. | |
21 The naming convention indicates: | |
22 | |
23 * The base of the specified version number. "`BOOST_PREDEF_MAKE_0X`" for | |
24 hexadecimal digits, and "`BOOST_PREDEF_MAKE_10`" for decimal digits. | |
25 * The format of the vendor version number. Where "`V`" indicates the version digits, | |
26 "`R`" indicates the revision digits, "`P`" indicates the patch digits, and "`0`" | |
27 indicates an ignored digit. | |
28 | |
29 Macros are: | |
30 */ | |
31 /*` `BOOST_PREDEF_MAKE_0X_VRP(V)` */ | |
32 #define BOOST_PREDEF_MAKE_0X_VRP(V) BOOST_VERSION_NUMBER((V&0xF00)>>8,(V&0xF0)>>4,(V&0xF)) | |
33 /*` `BOOST_PREDEF_MAKE_0X_VVRP(V)` */ | |
34 #define BOOST_PREDEF_MAKE_0X_VVRP(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xF0)>>4,(V&0xF)) | |
35 /*` `BOOST_PREDEF_MAKE_0X_VRPP(V)` */ | |
36 #define BOOST_PREDEF_MAKE_0X_VRPP(V) BOOST_VERSION_NUMBER((V&0xF000)>>12,(V&0xF00)>>8,(V&0xFF)) | |
37 /*` `BOOST_PREDEF_MAKE_0X_VVRR(V)` */ | |
38 #define BOOST_PREDEF_MAKE_0X_VVRR(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xFF),0) | |
39 /*` `BOOST_PREDEF_MAKE_0X_VRRPPPP(V)` */ | |
40 #define BOOST_PREDEF_MAKE_0X_VRRPPPP(V) BOOST_VERSION_NUMBER((V&0xF000000)>>24,(V&0xFF0000)>>16,(V&0xFFFF)) | |
41 /*` `BOOST_PREDEF_MAKE_0X_VVRRP(V)` */ | |
42 #define BOOST_PREDEF_MAKE_0X_VVRRP(V) BOOST_VERSION_NUMBER((V&0xFF000)>>12,(V&0xFF0)>>4,(V&0xF)) | |
43 /*` `BOOST_PREDEF_MAKE_0X_VRRPP000(V)` */ | |
44 #define BOOST_PREDEF_MAKE_0X_VRRPP000(V) BOOST_VERSION_NUMBER((V&0xF0000000)>>28,(V&0xFF00000)>>20,(V&0xFF000)>>12) | |
45 /*` `BOOST_PREDEF_MAKE_10_VPPP(V)` */ | |
46 #define BOOST_PREDEF_MAKE_10_VPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000) | |
47 /*` `BOOST_PREDEF_MAKE_10_VRP(V)` */ | |
48 #define BOOST_PREDEF_MAKE_10_VRP(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,(V)%10) | |
49 /*` `BOOST_PREDEF_MAKE_10_VRP000(V)` */ | |
50 #define BOOST_PREDEF_MAKE_10_VRP000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,((V)/1000)%10) | |
51 /*` `BOOST_PREDEF_MAKE_10_VRPP(V)` */ | |
52 #define BOOST_PREDEF_MAKE_10_VRPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,((V)/100)%10,(V)%100) | |
53 /*` `BOOST_PREDEF_MAKE_10_VRR(V)` */ | |
54 #define BOOST_PREDEF_MAKE_10_VRR(V) BOOST_VERSION_NUMBER(((V)/100)%10,(V)%100,0) | |
55 /*` `BOOST_PREDEF_MAKE_10_VRRPP(V)` */ | |
56 #define BOOST_PREDEF_MAKE_10_VRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%10,((V)/100)%100,(V)%100) | |
57 /*` `BOOST_PREDEF_MAKE_10_VRR000(V)` */ | |
58 #define BOOST_PREDEF_MAKE_10_VRR000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/1000)%100,0) | |
59 /*` `BOOST_PREDEF_MAKE_10_VV00(V)` */ | |
60 #define BOOST_PREDEF_MAKE_10_VV00(V) BOOST_VERSION_NUMBER(((V)/100)%100,0,0) | |
61 /*` `BOOST_PREDEF_MAKE_10_VVRR(V)` */ | |
62 #define BOOST_PREDEF_MAKE_10_VVRR(V) BOOST_VERSION_NUMBER(((V)/100)%100,(V)%100,0) | |
63 /*` `BOOST_PREDEF_MAKE_10_VVRRPP(V)` */ | |
64 #define BOOST_PREDEF_MAKE_10_VVRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%100,((V)/100)%100,(V)%100) | |
65 /*` `BOOST_PREDEF_MAKE_10_VVRR0PP00(V)` */ | |
66 #define BOOST_PREDEF_MAKE_10_VVRR0PP00(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,((V)/100)%100) | |
67 /*` `BOOST_PREDEF_MAKE_10_VVRR0PPPP(V)` */ | |
68 #define BOOST_PREDEF_MAKE_10_VVRR0PPPP(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,(V)%10000) | |
69 /*` `BOOST_PREDEF_MAKE_10_VVRR00PP00(V)` */ | |
70 #define BOOST_PREDEF_MAKE_10_VVRR00PP00(V) BOOST_VERSION_NUMBER(((V)/100000000)%100,((V)/1000000)%100,((V)/100)%100) | |
71 /*` | |
72 [heading `BOOST_PREDEF_MAKE_*..` date macros] | |
73 | |
74 Date decomposition macros return a date in the relative to the 1970 | |
75 Epoch date. If the month is not available, January 1st is used as the month and day. | |
76 If the day is not available, but the month is, the 1st of the month is used as the day. | |
77 */ | |
78 /*` `BOOST_PREDEF_MAKE_DATE(Y,M,D)` */ | |
79 #define BOOST_PREDEF_MAKE_DATE(Y,M,D) BOOST_VERSION_NUMBER((Y)%10000-1970,(M)%100,(D)%100) | |
80 /*` `BOOST_PREDEF_MAKE_YYYYMMDD(V)` */ | |
81 #define BOOST_PREDEF_MAKE_YYYYMMDD(V) BOOST_PREDEF_MAKE_DATE(((V)/10000)%10000,((V)/100)%100,(V)%100) | |
82 /*` `BOOST_PREDEF_MAKE_YYYY(V)` */ | |
83 #define BOOST_PREDEF_MAKE_YYYY(V) BOOST_PREDEF_MAKE_DATE(V,1,1) | |
84 /*` `BOOST_PREDEF_MAKE_YYYYMM(V)` */ | |
85 #define BOOST_PREDEF_MAKE_YYYYMM(V) BOOST_PREDEF_MAKE_DATE((V)/100,(V),1) | |
86 | |
87 #endif |