Unified · Split
| @@ -10,7 +10,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; · 9 unmodified lines | |||
| 10 | /* need to do that because of glibc 2.1 bug (should have a way to test | 10 | /* need to do that because of glibc 2.1 bug (should have a way to test |
| 11 | presence of 'long long' without __GNUC__, or TCC should define | 11 | presence of 'long long' without __GNUC__, or TCC should define |
| 12 | __GNUC__ ? */ | 12 | __GNUC__ ? */ |
| 13 | #ifndef __int8_t_defined | 13 | #if !defined(__int8_t_defined) && !defined(__dietlibc__) |
| 14 | #define __int8_t_defined | 14 | #define __int8_t_defined |
| 15 | typedef char int8_t; | 15 | typedef char int8_t; |
| 16 | typedef short int int16_t; | 16 | typedef short int int16_t; |
| @@ -9076,15 +9076,19 @@ static int rt_get_caller_pc(unsigned long *paddr, · 9075 unmodified lines | |||
| 9076 | int i; | 9076 | int i; |
| 9077 | 9077 | ||
| 9078 | if (level == 0) { | 9078 | if (level == 0) { |
| 9079 | #ifdef __FreeBSD__ | 9079 | #if defined(__FreeBSD__) |
| 9080 | *paddr = uc->uc_mcontext.mc_eip; | 9080 | *paddr = uc->uc_mcontext.mc_eip; |
| 9081 | #elif defined(__dietlibc__) | ||
| 9082 | *paddr = uc->uc_mcontext.eip; | ||
| 9081 | #else | 9083 | #else |
| 9082 | *paddr = uc->uc_mcontext.gregs[REG_EIP]; | 9084 | *paddr = uc->uc_mcontext.gregs[REG_EIP]; |
| 9083 | #endif | 9085 | #endif |
| 9084 | return 0; | 9086 | return 0; |
| 9085 | } else { | 9087 | } else { |
| 9086 | #ifdef __FreeBSD__ | 9088 | #if defined(__FreeBSD__) |
| 9087 | fp = uc->uc_mcontext.mc_ebp; | 9089 | fp = uc->uc_mcontext.mc_ebp; |
| 9090 | #elif defined(__dietlibc__) | ||
| 9091 | fp = uc->uc_mcontext.ebp; | ||
| 9088 | #else | 9092 | #else |
| 9089 | fp = uc->uc_mcontext.gregs[REG_EBP]; | 9093 | fp = uc->uc_mcontext.gregs[REG_EBP]; |
| 9090 | #endif | 9094 | #endif |