… | |
… | |
85 | =over 4 |
85 | =over 4 |
86 | |
86 | |
87 | =item ECB_C |
87 | =item ECB_C |
88 | |
88 | |
89 | True if the implementation defines the C<__STDC__> macro to a true value, |
89 | True if the implementation defines the C<__STDC__> macro to a true value, |
90 | while not claiming to be C++. |
90 | while not claiming to be C++, i..e C, but not C++. |
91 | |
91 | |
92 | =item ECB_C99 |
92 | =item ECB_C99 |
93 | |
93 | |
94 | True if the implementation claims to be compliant to C99 (ISO/IEC |
94 | True if the implementation claims to be compliant to C99 (ISO/IEC |
95 | 9899:1999) or any later version, while not claiming to be C++. |
95 | 9899:1999) or any later version, while not claiming to be C++. |
… | |
… | |
109 | |
109 | |
110 | =item ECB_CPP11, ECB_CPP14, ECB_CPP17 |
110 | =item ECB_CPP11, ECB_CPP14, ECB_CPP17 |
111 | |
111 | |
112 | True if the implementation claims to be compliant to C++11/C++14/C++17 |
112 | True if the implementation claims to be compliant to C++11/C++14/C++17 |
113 | (ISO/IEC 14882:2011, :2014, :2017) or any later version. |
113 | (ISO/IEC 14882:2011, :2014, :2017) or any later version. |
|
|
114 | |
|
|
115 | Note that many C++20 features will likely have their own feature test |
|
|
116 | macros (see e.g. L<http://eel.is/c++draft/cpp.predefined#1.8>). |
114 | |
117 | |
115 | =item ECB_OPTIMIZE_SIZE |
118 | =item ECB_OPTIMIZE_SIZE |
116 | |
119 | |
117 | Is C<1> when the compiler optimizes for size, C<0> otherwise. This symbol |
120 | Is C<1> when the compiler optimizes for size, C<0> otherwise. This symbol |
118 | can also be defined before including F<ecb.h>, in which case it will be |
121 | can also be defined before including F<ecb.h>, in which case it will be |
119 | unchanged. |
122 | unchanged. |
120 | |
123 | |
121 | =item ECB_GCC_VERSION (major, minor) |
124 | =item ECB_GCC_VERSION (major, minor) |
122 | |
125 | |
123 | Expands to a true value (suitable for testing in by the preprocessor) |
126 | Expands to a true value (suitable for testing by the preprocessor) if the |
124 | if the compiler used is GNU C and the version is the given version, or |
127 | compiler used is GNU C and the version is the given version, or higher. |
125 | higher. |
|
|
126 | |
128 | |
127 | This macro tries to return false on compilers that claim to be GCC |
129 | This macro tries to return false on compilers that claim to be GCC |
128 | compatible but aren't. |
130 | compatible but aren't. |
129 | |
131 | |
130 | =item ECB_EXTERN_C |
132 | =item ECB_EXTERN_C |
… | |
… | |
149 | |
151 | |
150 | ECB_EXTERN_C_END |
152 | ECB_EXTERN_C_END |
151 | |
153 | |
152 | =item ECB_STDFP |
154 | =item ECB_STDFP |
153 | |
155 | |
154 | If this evaluates to a true value (suitable for testing in by the |
156 | If this evaluates to a true value (suitable for testing by the |
155 | preprocessor), then C<float> and C<double> use IEEE 754 single/binary32 |
157 | preprocessor), then C<float> and C<double> use IEEE 754 single/binary32 |
156 | and double/binary64 representations internally I<and> the endianness of |
158 | and double/binary64 representations internally I<and> the endianness of |
157 | both types match the endianness of C<uint32_t> and C<uint64_t>. |
159 | both types match the endianness of C<uint32_t> and C<uint64_t>. |
158 | |
160 | |
159 | This means you can just copy the bits of a C<float> (or C<double>) to an |
161 | This means you can just copy the bits of a C<float> (or C<double>) to an |