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
39#ifndef _WIN3239#ifndef _WIN32
40# include <unistd.h>40# include <unistd.h>
41# include <sys/time.h>41# include <sys/time.h>
42# include <sys/ucontext.h>42# ifndef __OpenBSD__
43# include <sys/ucontext.h>
44# endif
43# include <sys/mman.h>45# include <sys/mman.h>
44# ifndef CONFIG_TCC_STATIC46# ifndef CONFIG_TCC_STATIC
45# include <dlfcn.h>47# 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
496 *paddr = uc->uc_mcontext.eip;496 *paddr = uc->uc_mcontext.eip;
497#elif defined(__NetBSD__)497#elif defined(__NetBSD__)
498 *paddr = uc->uc_mcontext.__gregs[_REG_EIP];498 *paddr = uc->uc_mcontext.__gregs[_REG_EIP];
499#elif defined(__OpenBSD__)
500 *paddr = uc->sc_eip;
499#else501#else
500 *paddr = uc->uc_mcontext.gregs[REG_EIP];502 *paddr = uc->uc_mcontext.gregs[REG_EIP];
501#endif503#endif
@@ -509,6 +511,8 @@ static int rt_get_caller_pc(addr_t *paddr, ucontext_t *uc, int level) · 7 unmodified lines
509 fp = uc->uc_mcontext.ebp;511 fp = uc->uc_mcontext.ebp;
510#elif defined(__NetBSD__)512#elif defined(__NetBSD__)
511 fp = uc->uc_mcontext.__gregs[_REG_EBP];513 fp = uc->uc_mcontext.__gregs[_REG_EBP];
514#elif defined(__OpenBSD__)
515 *paddr = uc->sc_ebp;
512#else516#else
513 fp = uc->uc_mcontext.gregs[REG_EBP];517 fp = uc->uc_mcontext.gregs[REG_EBP];
514#endif518#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