Unified · Split
| @@ -1143,6 +1143,9 @@ LIBTCCAPI TCCState *tcc_new(void) · 1142 unmodified lines | |||
| 1143 | # if defined(__NetBSD__) | 1143 | # if defined(__NetBSD__) |
| 1144 | tcc_define_symbol(s, "__NetBSD__", "__NetBSD__"); | 1144 | tcc_define_symbol(s, "__NetBSD__", "__NetBSD__"); |
| 1145 | # endif | 1145 | # endif |
| 1146 | # if defined(__OpenBSD__) | ||
| 1147 | tcc_define_symbol(s, "__OpenBSD__", "__OpenBSD__"); | ||
| 1148 | # endif | ||
| 1146 | 1149 | ||
| 1147 | /* TinyCC & gcc defines */ | 1150 | /* TinyCC & gcc defines */ |
| 1148 | #if defined(TCC_TARGET_PE) && defined(TCC_TARGET_X86_64) | 1151 | #if defined(TCC_TARGET_PE) && defined(TCC_TARGET_X86_64) |
| @@ -1170,7 +1173,7 @@ LIBTCCAPI TCCState *tcc_new(void) · 21 unmodified lines | |||
| 1170 | /* wint_t is unsigned int by default, but (signed) int on BSDs | 1173 | /* wint_t is unsigned int by default, but (signed) int on BSDs |
| 1171 | and unsigned short on windows. Other OSes might have still | 1174 | and unsigned short on windows. Other OSes might have still |
| 1172 | other conventions, sigh. */ | 1175 | other conventions, sigh. */ |
| 1173 | #if defined(__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__NetBSD__) | 1176 | #if defined(__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) |
| 1174 | tcc_define_symbol(s, "__WINT_TYPE__", "int"); | 1177 | tcc_define_symbol(s, "__WINT_TYPE__", "int"); |
| 1175 | #else | 1178 | #else |
| 1176 | tcc_define_symbol(s, "__WINT_TYPE__", "unsigned int"); | 1179 | tcc_define_symbol(s, "__WINT_TYPE__", "unsigned int"); |