i386: store errno value before using __set_errno()
commit38265c7af552c1874b75c76818a082d2841c717b
authorIngo van Lil <inguin@gmx.de>
Thu, 4 Jun 2009 12:33:34 +0000 (4 14:33 +0200)
committerMike Frysinger <vapier@gentoo.org>
Fri, 3 Jul 2009 19:16:17 +0000 (3 15:16 -0400)
treec62bf55e46404d74ed352e5a53927f0820c95efd
parenteed594d648dbd42235d8e63bfbd868c49712a90f
i386: store errno value before using __set_errno()

The __syscall_error() function stores the errno value in the edx register
before invoking the __set_errno() macro.  When using the pthread library
this macro calls thread_self() to determine the errno location, which might
clobber the edx register.  The errno value must be stored in a "real"
variable so the compiler can take care of saving/restoring it if necessary.

Signed-off-by: Ingo van Lil <inguin@gmx.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
libc/sysdeps/linux/i386/__syscall_error.c