svn commit: trunk/uClibc/libc/sysdeps/linux/i386/bits
kraj at uclibc.org
kraj at uclibc.org
Tue Mar 13 00:02:10 UTC 2007
Author: kraj
Date: 2007-03-12 17:02:10 -0700 (Mon, 12 Mar 2007)
New Revision: 18081
Log:
Using local variable 'result' caused problems with lseek64 syscall failing with gcc 4.2. Renaming to make it a bit uncommon name.
Modified:
trunk/uClibc/libc/sysdeps/linux/i386/bits/syscalls.h
Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/i386/bits/syscalls.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/i386/bits/syscalls.h 2007-03-12 23:41:07 UTC (rev 18080)
+++ trunk/uClibc/libc/sysdeps/linux/i386/bits/syscalls.h 2007-03-13 00:02:10 UTC (rev 18081)
@@ -152,29 +152,28 @@
{ \
return (type) (INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6)); \
}
-#define INLINE_SYSCALL(name, nr, args...) \
+ #define INLINE_SYSCALL(name, nr, args...) \
({ \
- unsigned int result = INTERNAL_SYSCALL (name, , nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, ), 0)) \
+ unsigned int _resultvar = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_resultvar, ), 0)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (result, )); \
- result = 0xffffffff; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_resultvar, )); \
+ _resultvar = 0xffffffff; \
} \
- (int) result; })
+ (int) _resultvar; })
#define INTERNAL_SYSCALL(name, err, nr, args...) \
({ \
- unsigned int resultvar; \
- __asm__ __volatile__ ( \
+ register unsigned int resultvar; \
+ asm volatile ( \
LOADARGS_##nr \
"movl %1, %%eax\n\t" \
"int $0x80\n\t" \
RESTOREARGS_##nr \
: "=a" (resultvar) \
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \
- (int) resultvar; })
+ (int) resultvar; })
-
#define LOADARGS_0
#define LOADARGS_1 \
"bpushl .L__X'%k2, %k2\n\t" \
More information about the uClibc-cvs
mailing list