1 #include <preprocess.h>
9 int check_defines_C(void)
12 if(strcmp(FILE_STRING
, STRING_VALUE
) != 0)
15 "FILE_STRING has wrong value in C [%s]\n", FILE_STRING
);
18 if(strcmp(TARGET_STRING
, STRING_VALUE
) != 0)
21 "TARGET_STRING has wrong value in C [%s]\n", TARGET_STRING
);
27 if((FILE_EXPR
) != (EXPR
))
29 fprintf(stderr
, "FILE_EXPR did not work in C [%s]\n",
30 TO_STRING(FILE_EXPR
));
33 if((TARGET_EXPR
) != (EXPR
))
35 fprintf(stderr
, "TARGET_EXPR did not work in C [%s]\n",
36 TO_STRING(FILE_EXPR
));
41 # ifdef FILE_DEF_DEBUG
43 fprintf(stderr
, "FILE_DEF_DEBUG should not be defined in C\n");
47 # ifdef TARGET_DEF_DEBUG
49 fprintf(stderr
, "TARGET_DEF_DEBUG should not be defined in C\n");
53 # ifdef DIRECTORY_DEF_DEBUG
55 fprintf(stderr
, "DIRECTORY_DEF_DEBUG should not be defined in C\n");
59 # ifndef FILE_DEF_RELEASE
60 # ifndef PREPROCESS_XCODE
62 fprintf(stderr
, "FILE_DEF_RELEASE should be defined in C\n");
67 # ifndef TARGET_DEF_RELEASE
69 fprintf(stderr
, "TARGET_DEF_RELEASE should be defined in C\n");
73 # ifndef DIRECTORY_DEF_RELEASE
75 fprintf(stderr
, "DIRECTORY_DEF_RELEASE should be defined in C\n");
80 #ifdef PREPROCESS_DEBUG
81 # ifndef FILE_DEF_DEBUG
82 # ifndef PREPROCESS_XCODE
84 fprintf(stderr
, "FILE_DEF_DEBUG should be defined in C\n");
89 # ifndef TARGET_DEF_DEBUG
91 fprintf(stderr
, "TARGET_DEF_DEBUG should be defined in C\n");
95 # ifndef DIRECTORY_DEF_DEBUG
97 fprintf(stderr
, "DIRECTORY_DEF_DEBUG should be defined in C\n");
101 # ifdef FILE_DEF_RELEASE
103 fprintf(stderr
, "FILE_DEF_RELEASE should not be defined in C\n");
107 # ifdef TARGET_DEF_RELEASE
109 fprintf(stderr
, "TARGET_DEF_RELEASE should not be defined in C\n");
113 # ifdef DIRECTORY_DEF_RELEASE
115 fprintf(stderr
, "DIRECTORY_DEF_RELEASE should not be defined in C\n");
120 #if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
121 # if !defined(FILE_DEF_DEBUG) || !defined(TARGET_DEF_DEBUG)
122 # ifndef PREPROCESS_XCODE
125 "FILE_DEF_DEBUG and TARGET_DEF_DEBUG inconsistent in C\n");
130 # if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
132 fprintf(stderr
, "DEBUG and RELEASE definitions inconsistent in C\n");
137 #if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
138 # if !defined(FILE_DEF_RELEASE) || !defined(TARGET_DEF_RELEASE)
139 # ifndef PREPROCESS_XCODE
142 "FILE_DEF_RELEASE and TARGET_DEF_RELEASE inconsistent in C\n");
147 # if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
149 fprintf(stderr
, "RELEASE and DEBUG definitions inconsistent in C\n");
154 #ifndef FILE_PATH_DEF
156 fprintf(stderr
, "FILE_PATH_DEF not defined in C\n");
160 #ifndef TARGET_PATH_DEF
162 fprintf(stderr
, "TARGET_PATH_DEF not defined in C\n");
168 fprintf(stderr
, "FILE_DEF not defined in C\n");
174 fprintf(stderr
, "TARGET_DEF not defined in C\n");
178 #ifndef DIRECTORY_DEF
180 fprintf(stderr
, "DIRECTORY_DEF not defined in C\n");
186 fprintf(stderr
, "OLD_DEF not defined in C\n");
190 #if !defined(OLD_EXPR) || OLD_EXPR != 2
192 fprintf(stderr
, "OLD_EXPR id not work in C [%s]\n",
193 TO_STRING(OLD_EXPR
));