mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-29 06:10:09 +08:00
OpenBSD: improve partial support for x86_64 - WIP
This commit is contained in:
parent
cf8d9cf072
commit
4e12c2a6dc
2
tcc.c
2
tcc.c
@ -171,6 +171,8 @@ static const char version[] =
|
||||
" Darwin"
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
" FreeBSD"
|
||||
#elif defined(__OpenBSD__)
|
||||
" OpenBSD"
|
||||
#else
|
||||
" Linux"
|
||||
#endif
|
||||
|
3
tcc.h
3
tcc.h
@ -45,6 +45,9 @@
|
||||
/* XXX: need to define this to use them in non ISOC99 context */
|
||||
extern float strtof (const char *__nptr, char **__endptr);
|
||||
extern long double strtold (const char *__nptr, char **__endptr);
|
||||
# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
extern char **environ;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
3
tccrun.c
3
tccrun.c
@ -648,6 +648,9 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc)
|
||||
# elif defined(__NetBSD__)
|
||||
rc->ip = uc->uc_mcontext.__gregs[_REG_RIP];
|
||||
rc->fp = uc->uc_mcontext.__gregs[_REG_RBP];
|
||||
# elif defined(__OpenBSD__)
|
||||
rc->ip = uc->sc_rip;
|
||||
rc->fp = uc->sc_rbp;
|
||||
# else
|
||||
rc->ip = uc->uc_mcontext.gregs[REG_RIP];
|
||||
rc->fp = uc->uc_mcontext.gregs[REG_RBP];
|
||||
|
Loading…
Reference in New Issue
Block a user