blob: 02f8655dc5e676be0405cdf35045aff5b21c60b3 [file] [log] [blame]
Pete Bentley0c61efe2019-08-13 09:32:23 +01001#include <openssl/ssl.h>
2
3int BORINGSSL_enum_c_type_test(void);
4
5int BORINGSSL_enum_c_type_test(void) {
6#if defined(__cplusplus)
7#error "This is testing the behaviour of the C compiler."
8#error "It's pointless to build it in C++ mode."
9#endif
10
11 // In C++, the enums in ssl.h are explicitly typed as ints to allow them to
12 // be predeclared. This function confirms that the C compiler believes them
13 // to be the same size as ints. They may differ in signedness, however.
14 return sizeof(enum ssl_private_key_result_t) == sizeof(int);
15}