github.com/searKing/golang/go@v1.2.117/os/signal/cgo/include/boost/predef/make.h (about) 1 /* 2 Copyright Rene Rivera 2008-2015 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 /* tag::reference[] 17 = `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 */ // end::reference[] 32 /* tag::reference[] 33 * `BOOST_PREDEF_MAKE_0X_VRP(V)` 34 */ // end::reference[] 35 #define BOOST_PREDEF_MAKE_0X_VRP(V) BOOST_VERSION_NUMBER((V&0xF00)>>8,(V&0xF0)>>4,(V&0xF)) 36 /* tag::reference[] 37 * `BOOST_PREDEF_MAKE_0X_VVRP(V)` 38 */ // end::reference[] 39 #define BOOST_PREDEF_MAKE_0X_VVRP(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xF0)>>4,(V&0xF)) 40 /* tag::reference[] 41 * `BOOST_PREDEF_MAKE_0X_VRPP(V)` 42 */ // end::reference[] 43 #define BOOST_PREDEF_MAKE_0X_VRPP(V) BOOST_VERSION_NUMBER((V&0xF000)>>12,(V&0xF00)>>8,(V&0xFF)) 44 /* tag::reference[] 45 * `BOOST_PREDEF_MAKE_0X_VVRR(V)` 46 */ // end::reference[] 47 #define BOOST_PREDEF_MAKE_0X_VVRR(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xFF),0) 48 /* tag::reference[] 49 * `BOOST_PREDEF_MAKE_0X_VRRPPPP(V)` 50 */ // end::reference[] 51 #define BOOST_PREDEF_MAKE_0X_VRRPPPP(V) BOOST_VERSION_NUMBER((V&0xF000000)>>24,(V&0xFF0000)>>16,(V&0xFFFF)) 52 /* tag::reference[] 53 * `BOOST_PREDEF_MAKE_0X_VVRRP(V)` 54 */ // end::reference[] 55 #define BOOST_PREDEF_MAKE_0X_VVRRP(V) BOOST_VERSION_NUMBER((V&0xFF000)>>12,(V&0xFF0)>>4,(V&0xF)) 56 /* tag::reference[] 57 * `BOOST_PREDEF_MAKE_0X_VRRPP000(V)` 58 */ // end::reference[] 59 #define BOOST_PREDEF_MAKE_0X_VRRPP000(V) BOOST_VERSION_NUMBER((V&0xF0000000)>>28,(V&0xFF00000)>>20,(V&0xFF000)>>12) 60 /* tag::reference[] 61 * `BOOST_PREDEF_MAKE_0X_VVRRPP(V)` 62 */ // end::reference[] 63 #define BOOST_PREDEF_MAKE_0X_VVRRPP(V) BOOST_VERSION_NUMBER((V&0xFF0000)>>16,(V&0xFF00)>>8,(V&0xFF)) 64 /* tag::reference[] 65 * `BOOST_PREDEF_MAKE_10_VPPP(V)` 66 */ // end::reference[] 67 #define BOOST_PREDEF_MAKE_10_VPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000) 68 /* tag::reference[] 69 * `BOOST_PREDEF_MAKE_10_VVPPP(V)` 70 */ // end::reference[] 71 #define BOOST_PREDEF_MAKE_10_VVPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%100,0,(V)%1000) 72 /* tag::reference[] 73 * `BOOST_PREDEF_MAKE_10_VR0(V)` 74 */ // end::reference[] 75 #define BOOST_PREDEF_MAKE_10_VR0(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,0) 76 /* tag::reference[] 77 * `BOOST_PREDEF_MAKE_10_VRP(V)` 78 */ // end::reference[] 79 #define BOOST_PREDEF_MAKE_10_VRP(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,(V)%10) 80 /* tag::reference[] 81 * `BOOST_PREDEF_MAKE_10_VRP000(V)` 82 */ // end::reference[] 83 #define BOOST_PREDEF_MAKE_10_VRP000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,((V)/1000)%10) 84 /* tag::reference[] 85 * `BOOST_PREDEF_MAKE_10_VRPPPP(V)` 86 */ // end::reference[] 87 #define BOOST_PREDEF_MAKE_10_VRPPPP(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,(V)%10000) 88 /* tag::reference[] 89 * `BOOST_PREDEF_MAKE_10_VRPP(V)` 90 */ // end::reference[] 91 #define BOOST_PREDEF_MAKE_10_VRPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,((V)/100)%10,(V)%100) 92 /* tag::reference[] 93 * `BOOST_PREDEF_MAKE_10_VRR(V)` 94 */ // end::reference[] 95 #define BOOST_PREDEF_MAKE_10_VRR(V) BOOST_VERSION_NUMBER(((V)/100)%10,(V)%100,0) 96 /* tag::reference[] 97 * `BOOST_PREDEF_MAKE_10_VRRPP(V)` 98 */ // end::reference[] 99 #define BOOST_PREDEF_MAKE_10_VRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%10,((V)/100)%100,(V)%100) 100 /* tag::reference[] 101 * `BOOST_PREDEF_MAKE_10_VRR000(V)` 102 */ // end::reference[] 103 #define BOOST_PREDEF_MAKE_10_VRR000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/1000)%100,0) 104 /* tag::reference[] 105 * `BOOST_PREDEF_MAKE_10_VV00(V)` 106 */ // end::reference[] 107 #define BOOST_PREDEF_MAKE_10_VV00(V) BOOST_VERSION_NUMBER(((V)/100)%100,0,0) 108 /* tag::reference[] 109 * `BOOST_PREDEF_MAKE_10_VVR_0PPPPP(V, P)`, the second parameter specifies a year-month patch level with the first digit discarded 110 */ // end::reference[] 111 #define BOOST_PREDEF_MAKE_10_VVR_0PPPPP(V, P) BOOST_VERSION_NUMBER(((V)/10)%100,(V)%10,(P)%100000) 112 /* tag::reference[] 113 * `BOOST_PREDEF_MAKE_10_VVRR(V)` 114 */ // end::reference[] 115 #define BOOST_PREDEF_MAKE_10_VVRR(V) BOOST_VERSION_NUMBER(((V)/100)%100,(V)%100,0) 116 /* tag::reference[] 117 * `BOOST_PREDEF_MAKE_10_VVRRP(V)` 118 */ // end::reference[] 119 #define BOOST_PREDEF_MAKE_10_VVRRP(V) BOOST_VERSION_NUMBER(((V)/1000)%100,((V)/10)%100,(V)%10) 120 /* tag::reference[] 121 * `BOOST_PREDEF_MAKE_10_VVRRPP(V)` 122 */ // end::reference[] 123 #define BOOST_PREDEF_MAKE_10_VVRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%100,((V)/100)%100,(V)%100) 124 /* tag::reference[] 125 * `BOOST_PREDEF_MAKE_10_VVRRPPP(V)` 126 */ // end::reference[] 127 #define BOOST_PREDEF_MAKE_10_VVRRPPP(V) BOOST_VERSION_NUMBER(((V)/100000)%100,((V)/1000)%100,(V)%1000) 128 /* tag::reference[] 129 * `BOOST_PREDEF_MAKE_10_VVRR0PP00(V)` 130 */ // end::reference[] 131 #define BOOST_PREDEF_MAKE_10_VVRR0PP00(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,((V)/100)%100) 132 /* tag::reference[] 133 * `BOOST_PREDEF_MAKE_10_VVRR0PPPP(V)` 134 */ // end::reference[] 135 #define BOOST_PREDEF_MAKE_10_VVRR0PPPP(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,(V)%10000) 136 /* tag::reference[] 137 * `BOOST_PREDEF_MAKE_10_VVRR00PP00(V)` 138 */ // end::reference[] 139 #define BOOST_PREDEF_MAKE_10_VVRR00PP00(V) BOOST_VERSION_NUMBER(((V)/100000000)%100,((V)/1000000)%100,((V)/100)%100) 140 141 /* tag::reference[] 142 143 = `BOOST_PREDEF_MAKE_*..` date macros 144 145 Date decomposition macros return a date in the relative to the 1970 146 Epoch date. If the month is not available, January 1st is used as the month and day. 147 If the day is not available, but the month is, the 1st of the month is used as the day. 148 149 */ // end::reference[] 150 /* tag::reference[] 151 * `BOOST_PREDEF_MAKE_DATE(Y,M,D)` 152 */ // end::reference[] 153 #define BOOST_PREDEF_MAKE_DATE(Y,M,D) BOOST_VERSION_NUMBER((Y)%10000-1970,(M)%100,(D)%100) 154 /* tag::reference[] 155 * `BOOST_PREDEF_MAKE_YYYYMMDD(V)` 156 */ // end::reference[] 157 #define BOOST_PREDEF_MAKE_YYYYMMDD(V) BOOST_PREDEF_MAKE_DATE(((V)/10000)%10000,((V)/100)%100,(V)%100) 158 /* tag::reference[] 159 * `BOOST_PREDEF_MAKE_YYYY(V)` 160 */ // end::reference[] 161 #define BOOST_PREDEF_MAKE_YYYY(V) BOOST_PREDEF_MAKE_DATE(V,1,1) 162 /* tag::reference[] 163 * `BOOST_PREDEF_MAKE_YYYYMM(V)` 164 */ // end::reference[] 165 #define BOOST_PREDEF_MAKE_YYYYMM(V) BOOST_PREDEF_MAKE_DATE((V)/100,(V)%100,1) 166 167 #endif