History

Start support of OpenBSD, tcc compiler can be produced from source tree

Christian Jullien committed 10 years ago

Commit 36759dd1 parent 18a5d812 files · +7 −1Browse files

Unified · Split

2 files
  1. tcc.h +3 −1
  2. tccrun.c +4 −0
tcc.h+3−1
@@ -39,7 +39,9 @@ · 38 unmodified lines
3939 #ifndef _WIN32
4040 # include <unistd.h>
4141 # include <sys/time.h>
42−# include <sys/ucontext.h>
42+# ifndef __OpenBSD__
43+# include <sys/ucontext.h>
44+# endif
4345 # include <sys/mman.h>
4446 # ifndef CONFIG_TCC_STATIC
4547 # include <dlfcn.h>
tccrun.c+4−0
@@ -496,6 +496,8 @@ static int rt_get_caller_pc(addr_t *paddr, ucontext_t *uc, int level) · 495 unmodified lines
496496 *paddr = uc->uc_mcontext.eip;
497497 #elif defined(__NetBSD__)
498498 *paddr = uc->uc_mcontext.__gregs[_REG_EIP];
499+#elif defined(__OpenBSD__)
500+ *paddr = uc->sc_eip;
499501 #else
500502 *paddr = uc->uc_mcontext.gregs[REG_EIP];
501503 #endif
@@ -509,6 +511,8 @@ static int rt_get_caller_pc(addr_t *paddr, ucontext_t *uc, int level) · 7 unmodified lines
509511 fp = uc->uc_mcontext.ebp;
510512 #elif defined(__NetBSD__)
511513 fp = uc->uc_mcontext.__gregs[_REG_EBP];
514+#elif defined(__OpenBSD__)
515+ *paddr = uc->sc_ebp;
512516 #else
513517 fp = uc->uc_mcontext.gregs[REG_EBP];
514518 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t