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
1010 /* need to do that because of glibc 2.1 bug (should have a way to test
1111 presence of 'long long' without __GNUC__, or TCC should define
1212 __GNUC__ ? */
13−#ifndef __int8_t_defined
13+#if !defined(__int8_t_defined) && !defined(__dietlibc__)
1414 #define __int8_t_defined
1515 typedef char int8_t;
1616 typedef short int int16_t;
tcc.c+6−2
@@ -9076,15 +9076,19 @@ static int rt_get_caller_pc(unsigned long *paddr, · 9075 unmodified lines
90769076 int i;
90779077
90789078 if (level == 0) {
9079−#ifdef __FreeBSD__
9079+#if defined(__FreeBSD__)
90809080 *paddr = uc->uc_mcontext.mc_eip;
9081+#elif defined(__dietlibc__)
9082+ *paddr = uc->uc_mcontext.eip;
90819083 #else
90829084 *paddr = uc->uc_mcontext.gregs[REG_EIP];
90839085 #endif
90849086 return 0;
90859087 } else {
9086−#ifdef __FreeBSD__
9088+#if defined(__FreeBSD__)
90879089 fp = uc->uc_mcontext.mc_ebp;
9090+#elif defined(__dietlibc__)
9091+ fp = uc->uc_mcontext.ebp;
90889092 #else
90899093 fp = uc->uc_mcontext.gregs[REG_EBP];
90909094 #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