1 #include <preprocess.h>
9 int check_defines_C(void)
12 if (strcmp(FILE_STRING, STRING_VALUE) != 0) {
13 fprintf(stderr, "FILE_STRING has wrong value in C [%s] vs [%s]\n",
14 FILE_STRING, STRING_VALUE);
17 if (strcmp(TARGET_STRING, STRING_VALUE) != 0) {
18 fprintf(stderr, "TARGET_STRING has wrong value in C [%s] vs [%s]\n",
19 TARGET_STRING, STRING_VALUE);
25 if ((FILE_EXPR) != (EXPR)) {
26 fprintf(stderr, "FILE_EXPR did not work in C [%s] vs [%s]\n",
27 TO_STRING(FILE_EXPR), TO_STRING(EXPR));
30 if ((TARGET_EXPR) != (EXPR)) {
31 fprintf(stderr, "TARGET_EXPR did not work in C [%s] vs [%s]\n",
32 TO_STRING(TARGET_EXPR), TO_STRING(EXPR));
37 # ifdef FILE_DEF_DEBUG
39 fprintf(stderr, "FILE_DEF_DEBUG should not be defined in C\n");
43 # ifdef TARGET_DEF_DEBUG
45 fprintf(stderr, "TARGET_DEF_DEBUG should not be defined in C\n");
49 # ifdef DIRECTORY_DEF_DEBUG
51 fprintf(stderr, "DIRECTORY_DEF_DEBUG should not be defined in C\n");
55 # ifndef FILE_DEF_RELEASE
56 # ifndef PREPROCESS_XCODE
58 fprintf(stderr, "FILE_DEF_RELEASE should be defined in C\n");
63 # ifndef TARGET_DEF_RELEASE
65 fprintf(stderr, "TARGET_DEF_RELEASE should be defined in C\n");
69 # ifndef DIRECTORY_DEF_RELEASE
71 fprintf(stderr, "DIRECTORY_DEF_RELEASE should be defined in C\n");
76 #ifdef PREPROCESS_DEBUG
77 # ifndef FILE_DEF_DEBUG
78 # ifndef PREPROCESS_XCODE
80 fprintf(stderr, "FILE_DEF_DEBUG should be defined in C\n");
85 # ifndef TARGET_DEF_DEBUG
87 fprintf(stderr, "TARGET_DEF_DEBUG should be defined in C\n");
91 # ifndef DIRECTORY_DEF_DEBUG
93 fprintf(stderr, "DIRECTORY_DEF_DEBUG should be defined in C\n");
97 # ifdef FILE_DEF_RELEASE
99 fprintf(stderr, "FILE_DEF_RELEASE should not be defined in C\n");
103 # ifdef TARGET_DEF_RELEASE
105 fprintf(stderr, "TARGET_DEF_RELEASE should not be defined in C\n");
109 # ifdef DIRECTORY_DEF_RELEASE
111 fprintf(stderr, "DIRECTORY_DEF_RELEASE should not be defined in C\n");
116 #if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
117 # if !defined(FILE_DEF_DEBUG) || !defined(TARGET_DEF_DEBUG)
118 # ifndef PREPROCESS_XCODE
120 fprintf(stderr, "FILE_DEF_DEBUG and TARGET_DEF_DEBUG inconsistent in C\n");
125 # if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
127 fprintf(stderr, "DEBUG and RELEASE definitions inconsistent in C\n");
132 #if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
133 # if !defined(FILE_DEF_RELEASE) || !defined(TARGET_DEF_RELEASE)
134 # ifndef PREPROCESS_XCODE
137 "FILE_DEF_RELEASE and TARGET_DEF_RELEASE inconsistent in C\n");
142 # if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
144 fprintf(stderr, "RELEASE and DEBUG definitions inconsistent in C\n");
149 #ifndef FILE_PATH_DEF
151 fprintf(stderr, "FILE_PATH_DEF not defined in C\n");
155 #ifndef TARGET_PATH_DEF
157 fprintf(stderr, "TARGET_PATH_DEF not defined in C\n");
163 fprintf(stderr, "FILE_DEF not defined in C\n");
169 fprintf(stderr, "TARGET_DEF not defined in C\n");
173 #ifndef DIRECTORY_DEF
175 fprintf(stderr, "DIRECTORY_DEF not defined in C\n");
181 fprintf(stderr, "OLD_DEF not defined in C\n");
185 #if !defined(OLD_EXPR) || OLD_EXPR != 2
187 fprintf(stderr, "OLD_EXPR id not work in C [%s]\n", TO_STRING(OLD_EXPR));