Unified · Split
| @@ -171,6 +171,8 @@ static const char version[] = · 170 unmodified lines | |||
| 171 | " Darwin" | 171 | " Darwin" |
| 172 | #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) | 172 | #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) |
| 173 | " FreeBSD" | 173 | " FreeBSD" |
| 174 | #elif defined(__OpenBSD__) | ||
| 175 | " OpenBSD" | ||
| 174 | #else | 176 | #else |
| 175 | " Linux" | 177 | " Linux" |
| 176 | #endif | 178 | #endif |
| @@ -45,6 +45,9 @@ · 44 unmodified lines | |||
| 45 | /* XXX: need to define this to use them in non ISOC99 context */ | 45 | /* XXX: need to define this to use them in non ISOC99 context */ |
| 46 | extern float strtof (const char *__nptr, char **__endptr); | 46 | extern float strtof (const char *__nptr, char **__endptr); |
| 47 | extern long double strtold (const char *__nptr, char **__endptr); | 47 | extern long double strtold (const char *__nptr, char **__endptr); |
| 48 | # if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) | ||
| 49 | extern char **environ; | ||
| 50 | # endif | ||
| 48 | #endif | 51 | #endif |
| 49 | 52 | ||
| 50 | #ifdef _WIN32 | 53 | #ifdef _WIN32 |
| @@ -648,6 +648,9 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc) · 647 unmodified lines | |||
| 648 | # elif defined(__NetBSD__) | 648 | # elif defined(__NetBSD__) |
| 649 | rc->ip = uc->uc_mcontext.__gregs[_REG_RIP]; | 649 | rc->ip = uc->uc_mcontext.__gregs[_REG_RIP]; |
| 650 | rc->fp = uc->uc_mcontext.__gregs[_REG_RBP]; | 650 | rc->fp = uc->uc_mcontext.__gregs[_REG_RBP]; |
| 651 | # elif defined(__OpenBSD__) | ||
| 652 | rc->ip = uc->sc_rip; | ||
| 653 | rc->fp = uc->sc_rbp; | ||
| 651 | # else | 654 | # else |
| 652 | rc->ip = uc->uc_mcontext.gregs[REG_RIP]; | 655 | rc->ip = uc->uc_mcontext.gregs[REG_RIP]; |
| 653 | rc->fp = uc->uc_mcontext.gregs[REG_RBP]; | 656 | rc->fp = uc->uc_mcontext.gregs[REG_RBP]; |