Debian Codegraph @

debian/rust-vendor/aws-lc-sys/aws-lc/ssl/ssl_c_test.c

raw
1 // Copyright (c) 2019 Google Inc.
2 // SPDX-License-Identifier: ISC
3
4 #include <openssl/ssl.h>
5
6 int BORINGSSL_enum_c_type_test(void);
7
8 int BORINGSSL_enum_c_type_test(void) {
9 #if defined(__cplusplus)
10 #error "This is testing the behaviour of the C compiler."
11 #error "It's pointless to build it in C++ mode."
12 #endif
13
14 // In C++, the enums in ssl.h are explicitly typed as ints to allow them to
15 // be predeclared. This function confirms that the C compiler believes them
16 // to be the same size as ints. They may differ in signedness, however.
17 return sizeof(enum ssl_private_key_result_t) == sizeof(int);
18 }