History

fixes for dietlibc

bellard committed 22 years ago

Commit df36de61 parent c52df4d2 files · +7 −3Browse files

Unified · Split

2 files
  1. stddef.h +1 −1
  2. tcc.c +6 −2
stddef.h+1−1
@@ -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 test10/* 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 define11 presence of 'long long' without __GNUC__, or TCC should define
12 __GNUC__ ? */12 __GNUC__ ? */
13#ifndef __int8_t_defined13#if !defined(__int8_t_defined) && !defined(__dietlibc__)
14#define __int8_t_defined14#define __int8_t_defined
15typedef char int8_t;15typedef char int8_t;
16typedef short int int16_t;16typedef short int int16_t;
tcc.c+6−2
@@ -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#else9083#else
9082 *paddr = uc->uc_mcontext.gregs[REG_EIP];9084 *paddr = uc->uc_mcontext.gregs[REG_EIP];
9083#endif9085#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#else9092#else
9089 fp = uc->uc_mcontext.gregs[REG_EBP];9093 fp = uc->uc_mcontext.gregs[REG_EBP];
9090#endif9094#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