| 6 | // |
| 7 | // https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 |
| 15 | #include <openssl/ssl.h> |
| 16 |
| 17 | int BORINGSSL_enum_c_type_test(void); |
| 18 |
| 19 | int BORINGSSL_enum_c_type_test(void) { |
| 20 | #if defined(__cplusplus) |
| 21 | #error "This is testing the behaviour of the C compiler." |
| 22 | #error "It's pointless to build it in C++ mode." |
| 23 | #endif |
| 24 |
| 25 | // In C++, the enums in ssl.h are explicitly typed as ints to allow them to |
| 26 | // be predeclared. This function confirms that the C compiler believes them |
| 27 | // to be the same size as ints. They may differ in signedness, however. |
| 28 | return sizeof(enum ssl_private_key_result_t) == sizeof(int); |
| 29 | } |
| 30 |