Debian Codegraph @

.cargo/vendor/cbindgen/tests/expectations/cfg_2.compat.c

raw
1 #if 0
2 DEF DEFINED = 1
3 DEF NOT_DEFINED = 0
4 #endif
5
6
7 #include <stdarg.h>
8 #include <stdbool.h>
9 #include <stdint.h>
10 #include <stdlib.h>
11
12 #if defined(NOT_DEFINED)
13 #define DEFAULT_X 8
14 #endif
15
16 #if defined(DEFINED)
17 #define DEFAULT_X 42
18 #endif
19
20 #if (defined(NOT_DEFINED) || defined(DEFINED))
21 typedef struct {
22 int32_t x;
23 } Foo;
24 #endif
25
26 #if defined(NOT_DEFINED)
27 typedef struct {
28 Foo y;
29 } Bar;
30 #endif
31
32 #if defined(DEFINED)
33 typedef struct {
34 Foo z;
35 } Bar;
36 #endif
37
38 typedef struct {
39 Bar w;
40 } Root;
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif // __cplusplus
45
46 void root(Root a);
47
48 #ifdef __cplusplus
49 } // extern "C"
50 #endif // __cplusplus