bionic
Revision | a56cd49594d4a8a873008bd3173a5b426db5e491 (tree) |
---|---|
Time | 2009-10-08 12:35:43 |
Author | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Fix bluetooth compiling error on x86
* termios.h: add missed definitions
* sigsetjmp.S: add sigsetjmp, siglongjmp
@@ -326,6 +326,7 @@ libc_common_src_files += \ | ||
326 | 326 | arch-x86/bionic/_exit_with_stack_teardown.S \ |
327 | 327 | arch-x86/bionic/setjmp.S \ |
328 | 328 | arch-x86/bionic/_setjmp.S \ |
329 | + arch-x86/bionic/sigsetjmp.S \ | |
329 | 330 | arch-x86/bionic/vfork.S \ |
330 | 331 | arch-x86/string/bzero.S \ |
331 | 332 | arch-x86/string/memset.S \ |
@@ -0,0 +1,55 @@ | ||
1 | +#include <machine/asm.h> | |
2 | +#include <machine/setjmp.h> | |
3 | + | |
4 | +ENTRY(sigsetjmp) | |
5 | + movl 4(%esp),%ecx | |
6 | + movl 8(%esp),%eax | |
7 | + movl %eax,28(%ecx) | |
8 | + jz 1f | |
9 | + PIC_PROLOGUE | |
10 | + pushl $0 | |
11 | +#ifdef PIC | |
12 | + call PIC_PLT(_C_LABEL(sigblock)) | |
13 | +#else | |
14 | + call _C_LABEL(sigblock) | |
15 | +#endif | |
16 | + addl $4,%esp | |
17 | + PIC_EPILOGUE | |
18 | + movl 4(%esp),%ecx | |
19 | + movl %eax,24(%ecx) | |
20 | + 1: movl 0(%esp),%edx | |
21 | + movl %edx, 0(%ecx) | |
22 | + movl %ebx, 4(%ecx) | |
23 | + movl %esp, 8(%ecx) | |
24 | + movl %ebp,12(%ecx) | |
25 | + movl %esi,16(%ecx) | |
26 | + movl %edi,20(%ecx) | |
27 | + xorl %eax,%eax | |
28 | + ret | |
29 | + | |
30 | +ENTRY(siglongjmp) | |
31 | + movl 4(%esp),%edx | |
32 | + cmpl $0,28(%edx) | |
33 | + jz 1f | |
34 | + PIC_PROLOGUE | |
35 | + pushl 24(%edx) | |
36 | +#ifdef PIC | |
37 | + call PIC_PLT(_C_LABEL(sigsetmask)) | |
38 | +#else | |
39 | + call _C_LABEL(sigsetmask) | |
40 | +#endif | |
41 | + addl $4,%esp | |
42 | + PIC_EPILOGUE | |
43 | + 1: movl 4(%esp),%edx | |
44 | + movl 8(%esp),%eax | |
45 | + movl 0(%edx),%ecx | |
46 | + movl 4(%edx),%ebx | |
47 | + movl 8(%edx),%esp | |
48 | + movl 12(%edx),%ebp | |
49 | + movl 16(%edx),%esi | |
50 | + movl 20(%edx),%edi | |
51 | + testl %eax,%eax | |
52 | + jnz 2f | |
53 | + incl %eax | |
54 | + 2: movl %ecx,0(%esp) | |
55 | + ret |
@@ -47,4 +47,21 @@ struct termio { | ||
47 | 47 | #define TIOCM_OUT2 0x4000 |
48 | 48 | #define TIOCM_LOOP 0x8000 |
49 | 49 | |
50 | +#define N_TTY 0 | |
51 | +#define N_SLIP 1 | |
52 | +#define N_MOUSE 2 | |
53 | +#define N_PPP 3 | |
54 | +#define N_STRIP 4 | |
55 | +#define N_AX25 5 | |
56 | +#define N_X25 6 | |
57 | +#define N_6PACK 7 | |
58 | +#define N_MASC 8 | |
59 | +#define N_R3964 9 | |
60 | +#define N_PROFIBUS_FDL 10 | |
61 | +#define N_IRDA 11 | |
62 | +#define N_SMSBLOCK 12 | |
63 | +#define N_HDLC 13 | |
64 | +#define N_SYNC_PPP 14 | |
65 | +#define N_HCI 15 | |
66 | + | |
50 | 67 | #endif |