mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-26 08:00:09 +08:00
Add more OpenBSD support.
This commit is contained in:
parent
70dec93f2b
commit
3e32479594
5
libtcc.c
5
libtcc.c
@ -1143,6 +1143,9 @@ LIBTCCAPI TCCState *tcc_new(void)
|
|||||||
# if defined(__NetBSD__)
|
# if defined(__NetBSD__)
|
||||||
tcc_define_symbol(s, "__NetBSD__", "__NetBSD__");
|
tcc_define_symbol(s, "__NetBSD__", "__NetBSD__");
|
||||||
# endif
|
# endif
|
||||||
|
# if defined(__OpenBSD__)
|
||||||
|
tcc_define_symbol(s, "__OpenBSD__", "__OpenBSD__");
|
||||||
|
# endif
|
||||||
|
|
||||||
/* TinyCC & gcc defines */
|
/* TinyCC & gcc defines */
|
||||||
#if defined(TCC_TARGET_PE) && defined(TCC_TARGET_X86_64)
|
#if defined(TCC_TARGET_PE) && defined(TCC_TARGET_X86_64)
|
||||||
@ -1170,7 +1173,7 @@ LIBTCCAPI TCCState *tcc_new(void)
|
|||||||
/* wint_t is unsigned int by default, but (signed) int on BSDs
|
/* wint_t is unsigned int by default, but (signed) int on BSDs
|
||||||
and unsigned short on windows. Other OSes might have still
|
and unsigned short on windows. Other OSes might have still
|
||||||
other conventions, sigh. */
|
other conventions, sigh. */
|
||||||
#if defined(__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__NetBSD__)
|
#if defined(__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
tcc_define_symbol(s, "__WINT_TYPE__", "int");
|
tcc_define_symbol(s, "__WINT_TYPE__", "int");
|
||||||
#else
|
#else
|
||||||
tcc_define_symbol(s, "__WINT_TYPE__", "unsigned int");
|
tcc_define_symbol(s, "__WINT_TYPE__", "unsigned int");
|
||||||
|
Loading…
Reference in New Issue
Block a user