OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d49ea36
)
the errno settings was fixed but the return value was still being clobbered ... fix...
author
Mike Frysinger
<vapier@gentoo.org>
Thu, 28 Jul 2005 03:58:43 +0000
(
03:58
-0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Thu, 28 Jul 2005 03:58:43 +0000
(
03:58
-0000)
libc/sysdeps/linux/i386/__syscall_error.c
patch
|
blob
|
history
diff --git
a/libc/sysdeps/linux/i386/__syscall_error.c
b/libc/sysdeps/linux/i386/__syscall_error.c
index
507cf2a
..
133500c
100644
(file)
--- a/
libc/sysdeps/linux/i386/__syscall_error.c
+++ b/
libc/sysdeps/linux/i386/__syscall_error.c
@@
-36,10
+36,11
@@
* We have to stash the errno from %eax in a local stack var because
* __set_errno will prob call a function thus clobbering %eax on us.
*/
-
void
attribute_hidden __syscall_error(void)
+
int
attribute_hidden __syscall_error(void)
{
- register int eax asm("%eax");
- int stack = -eax;
- __set_errno(stack);
- eax = -1;
+ register int edx asm("%edx");
+ asm("mov %eax, %edx");
+ asm("negl %edx");
+ __set_errno(edx);
+ return -1;
}