1 #include <preprocess.h>
9 extern "C" int check_defines_C(void);
11 int check_defines_CXX()
14 #ifndef PREPROCESS_VS6
15 if(strcmp(FILE_STRING
, STRING_VALUE
) != 0)
18 "FILE_STRING has wrong value in CXX [%s]\n", FILE_STRING
);
21 if(strcmp(TARGET_STRING
, STRING_VALUE
) != 0)
24 "TARGET_STRING has wrong value in CXX [%s]\n", TARGET_STRING
);
30 if((FILE_EXPR
) != (EXPR
))
32 fprintf(stderr
, "FILE_EXPR did not work in CXX [%s]\n",
33 TO_STRING(FILE_EXPR
));
36 if((TARGET_EXPR
) != (EXPR
))
38 fprintf(stderr
, "TARGET_EXPR did not work in CXX [%s]\n",
39 TO_STRING(FILE_EXPR
));
45 # ifdef FILE_DEF_DEBUG
47 fprintf(stderr
, "FILE_DEF_DEBUG should not be defined in CXX\n");
51 # ifdef TARGET_DEF_DEBUG
53 fprintf(stderr
, "TARGET_DEF_DEBUG should not be defined in CXX\n");
57 # ifdef DIRECTORY_DEF_DEBUG
59 fprintf(stderr
, "DIRECTORY_DEF_DEBUG should not be defined in CXX\n");
63 # ifndef FILE_DEF_RELEASE
64 # ifndef PREPROCESS_XCODE
66 fprintf(stderr
, "FILE_DEF_RELEASE should be defined in CXX\n");
71 # ifndef TARGET_DEF_RELEASE
73 fprintf(stderr
, "TARGET_DEF_RELEASE should be defined in CXX\n");
77 # ifndef DIRECTORY_DEF_RELEASE
79 fprintf(stderr
, "DIRECTORY_DEF_RELEASE should be defined in CXX\n");
84 #ifdef PREPROCESS_DEBUG
85 # ifndef FILE_DEF_DEBUG
86 # ifndef PREPROCESS_XCODE
88 fprintf(stderr
, "FILE_DEF_DEBUG should be defined in CXX\n");
93 # ifndef TARGET_DEF_DEBUG
95 fprintf(stderr
, "TARGET_DEF_DEBUG should be defined in CXX\n");
99 # ifndef DIRECTORY_DEF_DEBUG
101 fprintf(stderr
, "DIRECTORY_DEF_DEBUG should be defined in CXX\n");
105 # ifdef FILE_DEF_RELEASE
107 fprintf(stderr
, "FILE_DEF_RELEASE should not be defined in CXX\n");
111 # ifdef TARGET_DEF_RELEASE
113 fprintf(stderr
, "TARGET_DEF_RELEASE should not be defined in CXX\n");
117 # ifdef DIRECTORY_DEF_RELEASE
119 fprintf(stderr
, "DIRECTORY_DEF_RELEASE should not be defined in CXX\n");
124 #if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
125 # if !defined(FILE_DEF_DEBUG) || !defined(TARGET_DEF_DEBUG)
126 # ifndef PREPROCESS_XCODE
129 "FILE_DEF_DEBUG and TARGET_DEF_DEBUG inconsistent in CXX\n");
134 # if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
136 fprintf(stderr
, "DEBUG and RELEASE definitions inconsistent in CXX\n");
141 #if defined(FILE_DEF_RELEASE) || defined(TARGET_DEF_RELEASE)
142 # if !defined(FILE_DEF_RELEASE) || !defined(TARGET_DEF_RELEASE)
143 # ifndef PREPROCESS_XCODE
146 "FILE_DEF_RELEASE and TARGET_DEF_RELEASE inconsistent in CXX\n");
151 # if defined(FILE_DEF_DEBUG) || defined(TARGET_DEF_DEBUG)
153 fprintf(stderr
, "RELEASE and DEBUG definitions inconsistent in CXX\n");
158 #ifndef FILE_PATH_DEF
160 fprintf(stderr
, "FILE_PATH_DEF not defined in CXX\n");
164 #ifndef TARGET_PATH_DEF
166 fprintf(stderr
, "TARGET_PATH_DEF not defined in CXX\n");
172 fprintf(stderr
, "FILE_DEF not defined in CXX\n");
178 fprintf(stderr
, "TARGET_DEF not defined in CXX\n");
182 #ifndef DIRECTORY_DEF
184 fprintf(stderr
, "DIRECTORY_DEF not defined in CXX\n");
190 fprintf(stderr
, "OLD_DEF not defined in CXX\n");
194 #if !defined(OLD_EXPR) || OLD_EXPR != 2
196 fprintf(stderr
, "OLD_EXPR id not work in C [%s]\n",
197 TO_STRING(OLD_EXPR
));
208 if(!check_defines_C())
213 if(!check_defines_CXX())
220 printf("All preprocessor definitions are correct.\n");