1 #include <preprocess.h>
9 extern "C" int check_defines_C(void);
11 int check_defines_CXX()
14 if(strcmp(FILE_STRING
, STRING_VALUE
) != 0)
17 "FILE_STRING has wrong value in CXX [%s]\n", FILE_STRING
);
20 if(strcmp(TARGET_STRING
, STRING_VALUE
) != 0)
23 "TARGET_STRING has wrong value in CXX [%s]\n", TARGET_STRING
);
29 if((FILE_EXPR
) != (EXPR
))
31 fprintf(stderr
, "FILE_EXPR did not work in CXX [%s]\n",
32 TO_STRING(FILE_EXPR
));
35 if((TARGET_EXPR
) != (EXPR
))
37 fprintf(stderr
, "TARGET_EXPR did not work in CXX [%s]\n",
38 TO_STRING(FILE_EXPR
));
43 # ifdef FILE_DEF_DEBUG
45 fprintf(stderr
, "FILE_DEF_DEBUG should not be defined in CXX\n");
49 # ifdef TARGET_DEF_DEBUG
51 fprintf(stderr
, "TARGET_DEF_DEBUG should not be defined in CXX\n");
55 # ifdef DIRECTORY_DEF_DEBUG
57 fprintf(stderr
, "DIRECTORY_DEF_DEBUG should not be defined in CXX\n");
61 # ifndef FILE_DEF_RELEASE
62 # ifndef PREPROCESS_XCODE
64 fprintf(stderr
, "FILE_DEF_RELEASE should be defined in CXX\n");
69 # ifndef TARGET_DEF_RELEASE
71 fprintf(stderr
, "TARGET_DEF_RELEASE should be defined in CXX\n");
75 # ifndef DIRECTORY_DEF_RELEASE
77 fprintf(stderr
, "DIRECTORY_DEF_RELEASE should be defined in CXX\n");
82 #ifdef PREPROCESS_DEBUG
83 # ifndef FILE_DEF_DEBUG
84 # ifndef PREPROCESS_XCODE
86 fprintf(stderr
, "FILE_DEF_DEBUG should be defined in CXX\n");
91 # ifndef TARGET_DEF_DEBUG
93 fprintf(stderr
, "TARGET_DEF_DEBUG should be defined in CXX\n");
97 # ifndef DIRECTORY_DEF_DEBUG
99 fprintf(stderr
, "DIRECTORY_DEF_DEBUG should be defined in CXX\n");
103 # ifdef FILE_DEF_RELEASE
105 fprintf(stderr
, "FILE_DEF_RELEASE should not be defined in CXX\n");
109 # ifdef TARGET_DEF_RELEASE
111 fprintf(stderr
, "TARGET_DEF_RELEASE should not be defined in CXX\n");
115 # ifdef DIRECTORY_DEF_RELEASE
117 fprintf(stderr
, "DIRECTORY_DEF_RELEASE should not be defined in CXX\n");
122 #if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
123 # if !defined(FILE_DEF_DEBUG) || !defined(TARGET_DEF_DEBUG)
124 # ifndef PREPROCESS_XCODE
127 "FILE_DEF_DEBUG and TARGET_DEF_DEBUG inconsistent in CXX\n");
132 # if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
134 fprintf(stderr
, "DEBUG and RELEASE definitions inconsistent in CXX\n");
139 #if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
140 # if !defined(FILE_DEF_RELEASE) || !defined(TARGET_DEF_RELEASE)
141 # ifndef PREPROCESS_XCODE
144 "FILE_DEF_RELEASE and TARGET_DEF_RELEASE inconsistent in CXX\n");
149 # if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
151 fprintf(stderr
, "RELEASE and DEBUG definitions inconsistent in CXX\n");
156 #ifndef FILE_PATH_DEF
158 fprintf(stderr
, "FILE_PATH_DEF not defined in CXX\n");
162 #ifndef TARGET_PATH_DEF
164 fprintf(stderr
, "TARGET_PATH_DEF not defined in CXX\n");
170 fprintf(stderr
, "FILE_DEF not defined in CXX\n");
176 fprintf(stderr
, "TARGET_DEF not defined in CXX\n");
180 #ifndef DIRECTORY_DEF
182 fprintf(stderr
, "DIRECTORY_DEF not defined in CXX\n");
188 fprintf(stderr
, "OLD_DEF not defined in CXX\n");
192 #if !defined(OLD_EXPR) || OLD_EXPR != 2
194 fprintf(stderr
, "OLD_EXPR id not work in C [%s]\n",
195 TO_STRING(OLD_EXPR
));
206 if(!check_defines_C())
211 if(!check_defines_CXX())
218 printf("All preprocessor definitions are correct.\n");