This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Use "_" prefix for macro variables, and harmonize variable names for sysdep syscall macros.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 11 Jun 2015 22:57:14 -0400
- Subject: [PATCH] Use "_" prefix for macro variables, and harmonize variable names for sysdep syscall macros.
- Authentication-results: sourceware.org; auth=none
The following patch refactors all sysdep syscall code
to use _sc_ret and _sc_err, and names with leading underscores,
to avoid the general problem with macro argument expansion
and variable shadowing. In some cases it isn't needed, but
I renamed the variables for consistency across the implementations,
and added a leading underscore to ensure future use of does not
result in shadowed variables.
The changes are thoroughly mechanical and I tested on x86_64,
i686, AArch64 and ppc64le. If other arches should only fail if
I made a cut-and-paste mistake which we can fix quickly.
I will check this in next week if nobody objects.
Cheers,
Carlos.
---
2015-06-11 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/aarch64/sysdep.h (INLINE_SYSCALL): Use
_sc_ret and _sc_err where appropriate.
(INTERNAL_SYSCALL_RAW): Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.h (INLINE_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.h (INLINE_SYSCALL): Likewise.
(INTERNAL_SYSCALL): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INLINE_SYSCALL): Likewise.
(INTERNAL_SYSCALL_MAIN_6): Likewise.
(INTERNAL_SYSCALL): Likewise.
[I386_USE_SYSENTER && SHARED] (INTERNAL_SYSCALL_MAIN_INLINE):
Likewise.
[I386_USE_SYSENTER && SHARED] (INTERNAL_SYSCALL_MAIN_NCS): Likewise.
[I386_USE_SYSENTER && !SHARED] (INTERNAL_SYSCALL_MAIN_INLINE):
Likewise.
[I386_USE_SYSENTER && !SHARED] (INTERNAL_SYSCALL_MAIN_NCS): Likewise.
[!I386_USE_SYSENTER] (INTERNAL_SYSCALL_MAIN_INLINE): Likewise.
[!I386_USE_SYSENTER] (INTERNAL_SYSCALL_MAIN_NCS): Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.h [IA64_USE_NEW_STUB]
(DO_INLINE_SYSCALL_NCS): Likewise.
[!IA64_USE_NEW_STUB] (DO_INLINE_SSYCALL_NCS): Likewise.
(INLINE_SYSCALL): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
* sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
* sysdeps/unix/sysv/linux/microblaze/sysdep.h (INLINE_SYSCALL):
Likewise.
(inline_syscall0): Likewise.
(inline_syscall1): Likewise.
(inline_Syscall2): Likewise.
(inline_Syscall3): Likewise.
(inline_Syscall4): Likewise.
(inline_Syscall5): Likewise.
(inline_Syscall6): Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (INLINE_SYSCALL):
Likewise.
(internal_syscall0): Likewise.
(internal_syscall1): Likewise.
(internal_syscall2): Likewise.
(internal_syscall3): Likewise.
(internal_syscall4): Likewise.
(internal_syscall5): Likewise.
(internal_syscall6): Likewise.
(internal_syscall7): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (INLINE_SYSCALL):
Likewise.
(internal_syscall0): Likewise.
(internal_syscall1): Likewise.
(internal_syscall2): Likewise.
(internal_syscall3): Likewise.
(internal_syscall4): Likewise.
(internal_syscall5): Likewise.
(internal_syscall6): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (INLINE_SYSCALL):
Likewise.
(internal_syscall0): Likewise.
(internal_syscall1): Likewise.
(internal_syscall2): Likewise.
(internal_syscall3): Likewise.
(internal_syscall4): Likewise.
(internal_syscall5): Likewise.
(internal_syscall6): Likewise.
* sysdeps/unix/sysv/linux/nios2/sysdep.h (INLINE_SYSCALL): Likewise.
(INTERNAL_SYSCALL_RAW): Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
(INTERNAL_VSYSCALL_CALL_TYPE): Register variables use "_" prefix. Use
_sc_ret and _sc_err where appropriate.
(INTERNAL_SYSCALL_NCS): Likewise.
(INLINE_SYSCALL): Use _sc_ret and _sc_err where appropriate.
(INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Likewise.
(LOADARGS_0): Register variables use "_" prefix.
(LOADARGS_1): Likewise.
(LOADARGS_2): Likewise.
(LOADARGS_3): Likewise.
(LOADARGS_4): Likewise.
(LOADARGS_5): Likewise.
(LOADARGS_6): Likewise.
(ASM_INPUT_0): Likewise.
(ASM_INPUT_1): Likewise.
(ASM_INPUT_2): Likewise.
(ASM_INPUT_3): Likewise.
(ASM_INPUT_4): Likewise.
(ASM_INPUT_5): Likewise.
(ASM_INPUT_6): Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
(INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Use _sc_ret.
(INLINE_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (INLINE_SYSCALL):
Likewise.
(INTERNAL_SYSCALL_DIRECT): Likewise.
(INTERNAL_SYSCALL_SVC0): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
(DECLARE_1): Register variables use "_" prefix.
(DECLARE_2): Likewise.
(DECLARE_3): Likewise.
(DECLARE_4): Likewise.
(DECLARE_5): Likewise.
(DECLARE_6): Likewise.
(ASMFMT_1): Likewise.
(ASMFMT_2): Likewise.
(ASMFMT_3): Likewise.
(ASMFMT_4): Likewise.
(ASMFMT_5): Likewise.
(ASMFMT_6): Likewise.
(INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Use _sc_ret.
(INTERNAL_VSYSCALL_CALL): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (INLINE_SYSCALL):
Likewise.
(INTERNAL_SYSCALL_DIRECT): Likewise.
(INTERNAL_SYSCALL_SVC0): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
(DECLARE_1): Register variables use "_" prefix.
(DECLARE_2): Likewise.
(DECLARE_3): Likewise.
(DECLARE_4): Likewise.
(DECLARE_5): Likewise.
(DECLARE_6): Likewise.
(ASMFMT_1): Likewise.
(ASMFMT_2): Likewise.
(ASMFMT_3): Likewise.
(ASMFMT_4): Likewise.
(ASMFMT_5): Likewise.
(ASMFMT_6): Likewise.
(INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Use _sc_ret.
(INTERNAL_VSYSCALL_CALL): Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.h (ASMFMT_1): Register variables
use "_" prefix.
(ASMFMT_2): Likewise.
(ASMFMT_3): Likewise.
(ASMFMT_4): Likewise.
(ASMFMT_5): Likewise.
(ASMFMT_6): Likewise.
(ASMFMT_7): Likewise.
(SUBSTITUTE_ARGS_1): Likewise.
(SUBSTITUTE_ARGS_2): Likewise.
(SUBSTITUTE_ARGS_3): Likewise.
(SUBSTITUTE_ARGS_4): Likewise.
(SUBSTITUTE_ARGS_5): Likewise.
(SUBSTITUTE_ARGS_6): Likewise.
(SUBSTITUTE_ARGS_7): Likewise.
(INLINE_SYSCALL): Use _sc_ret.
(INTERNAL_SYSCALL): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.h (INLINE_SYSCALL): Use _sc_ret
and _sc_err.
* sysdeps/unix/sysv/linux/sysdep-vdso.h [SHARED && HAVE_VSYSCALL]
(INLINE_VSYSCALL): Use _sc_ret, _sc_err, _vdsop.
(INTERNAL_VSYSCALL): Use _v_ret and _vdsop.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h (INLINE_SYSCALL): Use
_sc_ret.
(INLINE_SYSCALL_TYPES): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
(INTERNAL_SYSCALL_NCS_TYPES): Likewise.
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index fe94a50..264b7b2 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
@@ -161,28 +161,28 @@
call. */
# undef INLINE_SYSCALL
# define INLINE_SYSCALL(name, nr, args...) \
- ({ unsigned long _sys_result = INTERNAL_SYSCALL (name, , nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\
+ ({ unsigned long _sc_ret = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sc_ret, ), 0)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \
- _sys_result = (unsigned long) -1; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, )); \
+ _sc_ret = (unsigned long) -1; \
} \
- (long) _sys_result; })
+ (long) _sc_ret; })
# undef INTERNAL_SYSCALL_DECL
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
# undef INTERNAL_SYSCALL_RAW
-# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
- ({ long _sys_result; \
- { \
- LOAD_ARGS_##nr (args) \
- register long _x8 asm ("x8") = (name); \
- asm volatile ("svc 0 // syscall " # name \
+# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
+ ({ long _sc_ret; \
+ { \
+ LOAD_ARGS_##nr (args) \
+ register long _x8 asm ("x8") = (name); \
+ asm volatile ("svc 0 // syscall " # name \
: "=r" (_x0) : "r"(_x8) ASM_ARGS_##nr : "memory"); \
- _sys_result = _x0; \
- } \
- _sys_result; })
+ _sc_ret = _x0; \
+ } \
+ _sc_ret; })
# undef INTERNAL_SYSCALL
# define INTERNAL_SYSCALL(name, err, nr, args...) \
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 200f77a..07c9579 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -320,13 +320,13 @@ __local_syscall_error: \
call. */
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
- ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0)) \
+ ({ unsigned int _sc_ret = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sc_ret, ), 0)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \
- _sys_result = (unsigned int) -1; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, )); \
+ _sc_ret = (unsigned int) -1; \
} \
- (int) _sys_result; })
+ (int) _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index ac47814..0c9005a 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -360,30 +360,26 @@ L(pre_end): ASM_LINE_SEP \
"%r20", "%r29", "%r31"
#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
+#define INLINE_SYSCALL(name, nr, args...) \
({ \
- long __sys_res; \
- { \
- register unsigned long __res asm("r28"); \
- PIC_REG_DEF \
- LOAD_ARGS_##nr(args) \
- /* FIXME: HACK save/load r19 around syscall */ \
- asm volatile( \
- SAVE_ASM_PIC \
- " ble 0x100(%%sr2, %%r0)\n" \
- " ldi %1, %%r20\n" \
- LOAD_ASM_PIC \
- : "=r" (__res) \
- : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \
- : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
- ); \
- __sys_res = (long)__res; \
+ register unsigned long _sc_ret asm("r28"); \
+ PIC_REG_DEF \
+ LOAD_ARGS_##nr(args) \
+ /* FIXME: HACK save/load r19 around syscall */ \
+ asm volatile( \
+ SAVE_ASM_PIC \
+ " ble 0x100(%%sr2, %%r0)\n" \
+ " ldi %1, %%r20\n" \
+ LOAD_ASM_PIC \
+ : "=r" (_sc_ret) \
+ : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \
+ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
+ ); \
+ if ( (unsigned long)_sc_ret >= (unsigned long)-4095 ){ \
+ __set_errno(-_sc_ret); \
+ _sc_ret = -1; \
} \
- if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){ \
- __set_errno(-__sys_res); \
- __sys_res = -1; \
- } \
- __sys_res; \
+ (long) _sc_ret; \
})
/* INTERNAL_SYSCALL_DECL - Allows us to setup some function static
@@ -406,51 +402,43 @@ L(pre_end): ASM_LINE_SEP \
/* Similar to INLINE_SYSCALL but we don't set errno */
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
-({ \
- long __sys_res; \
- { \
- register unsigned long __res asm("r28"); \
- PIC_REG_DEF \
- LOAD_ARGS_##nr(args) \
- /* FIXME: HACK save/load r19 around syscall */ \
- asm volatile( \
- SAVE_ASM_PIC \
- " ble 0x100(%%sr2, %%r0)\n" \
- " ldi %1, %%r20\n" \
- LOAD_ASM_PIC \
- : "=r" (__res) \
- : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \
- : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
- ); \
- __sys_res = (long)__res; \
- } \
- __sys_res; \
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
+({ \
+ register unsigned long _sc_ret asm("r28"); \
+ PIC_REG_DEF \
+ LOAD_ARGS_##nr(args) \
+ /* FIXME: HACK save/load r19 around syscall */ \
+ asm volatile( \
+ SAVE_ASM_PIC \
+ " ble 0x100(%%sr2, %%r0)\n" \
+ " ldi %1, %%r20\n" \
+ LOAD_ASM_PIC \
+ : "=r" (_sc_ret) \
+ : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \
+ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
+ ); \
+ (long) _sc_ret; \
})
/* The _NCS variant allows non-constant syscall numbers. */
#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
-({ \
- long __sys_res; \
- { \
- register unsigned long __res asm("r28"); \
- PIC_REG_DEF \
- LOAD_ARGS_##nr(args) \
- /* FIXME: HACK save/load r19 around syscall */ \
- asm volatile( \
- SAVE_ASM_PIC \
- " ble 0x100(%%sr2, %%r0)\n" \
- " copy %1, %%r20\n" \
- LOAD_ASM_PIC \
- : "=r" (__res) \
- : "r" (name) PIC_REG_USE ASM_ARGS_##nr \
- : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
- ); \
- __sys_res = (long)__res; \
- } \
- __sys_res; \
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+({ \
+ register unsigned long _sc_ret asm("r28"); \
+ PIC_REG_DEF \
+ LOAD_ARGS_##nr(args) \
+ /* FIXME: HACK save/load r19 around syscall */ \
+ asm volatile( \
+ SAVE_ASM_PIC \
+ " ble 0x100(%%sr2, %%r0)\n" \
+ " copy %1, %%r20\n" \
+ LOAD_ASM_PIC \
+ : "=r" (_sc_ret) \
+ : "r" (name) PIC_REG_USE ASM_ARGS_##nr \
+ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
+ ); \
+ (long) _sc_ret; \
})
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index d76aca5..ce11ca8 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -320,13 +320,13 @@ struct libc_do_syscall_args
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ \
- unsigned int resultvar = INTERNAL_SYSCALL (name, , nr, args); \
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (resultvar, ))) \
+ unsigned int _sc_ret = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (_sc_ret, ))) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, )); \
- resultvar = 0xffffffff; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, )); \
+ _sc_ret = 0xffffffff; \
} \
- (int) resultvar; })
+ (int) _sc_ret; })
/* List of system calls which are supported as vsyscalls. */
# define HAVE_CLOCK_GETTIME_VSYSCALL 1
@@ -365,14 +365,14 @@ struct libc_do_syscall_args
asm volatile ( \
"movl %1, %%eax\n\t" \
"call __libc_do_syscall" \
- : "=a" (resultvar) \
+ : "=a" (_sc_ret) \
: "i" (__NR_##name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \
: "memory", "cc")
#define INTERNAL_SYSCALL(name, err, nr, args...) \
({ \
- register unsigned int resultvar; \
+ register unsigned int _sc_ret; \
INTERNAL_SYSCALL_MAIN_##nr (name, err, args); \
- (int) resultvar; })
+ (int) _sc_ret; })
#ifdef I386_USE_SYSENTER
# ifdef SHARED
# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
@@ -382,21 +382,21 @@ struct libc_do_syscall_args
"movl %1, %%eax\n\t" \
"call *%%gs:%P2\n\t" \
RESTOREARGS_##nr \
- : "=a" (resultvar) \
+ : "=a" (_sc_ret) \
: "i" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \
ASMFMT_##nr(args) : "memory", "cc")
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ \
- register unsigned int resultvar; \
+ register unsigned int _sc_ret; \
EXTRAVAR_##nr \
asm volatile ( \
LOADARGS_##nr \
"call *%%gs:%P2\n\t" \
RESTOREARGS_##nr \
- : "=a" (resultvar) \
+ : "=a" (_sc_ret) \
: "0" (name), "i" (offsetof (tcbhead_t, sysinfo)) \
ASMFMT_##nr(args) : "memory", "cc"); \
- (int) resultvar; })
+ (int) _sc_ret; })
# else
# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
EXTRAVAR_##nr \
@@ -405,19 +405,19 @@ struct libc_do_syscall_args
"movl %1, %%eax\n\t" \
"call *_dl_sysinfo\n\t" \
RESTOREARGS_##nr \
- : "=a" (resultvar) \
+ : "=a" (_sc_ret) \
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc")
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ \
- register unsigned int resultvar; \
+ register unsigned int _sc_ret; \
EXTRAVAR_##nr \
asm volatile ( \
LOADARGS_##nr \
"call *_dl_sysinfo\n\t" \
RESTOREARGS_##nr \
- : "=a" (resultvar) \
+ : "=a" (_sc_ret) \
: "0" (name) ASMFMT_##nr(args) : "memory", "cc"); \
- (int) resultvar; })
+ (int) _sc_ret; })
# endif
#else
# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
@@ -427,19 +427,19 @@ struct libc_do_syscall_args
"movl %1, %%eax\n\t" \
"int $0x80\n\t" \
RESTOREARGS_##nr \
- : "=a" (resultvar) \
+ : "=a" (_sc_ret) \
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc")
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ \
- register unsigned int resultvar; \
+ register unsigned int _sc_ret; \
EXTRAVAR_##nr \
asm volatile ( \
LOADARGS_##nr \
"int $0x80\n\t" \
RESTOREARGS_##nr \
- : "=a" (resultvar) \
+ : "=a" (_sc_ret) \
: "0" (name) ASMFMT_##nr(args) : "memory", "cc"); \
- (int) resultvar; })
+ (int) _sc_ret; })
#endif
#undef INTERNAL_SYSCALL_DECL
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 03efae9..67b1bda 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -205,7 +205,7 @@
register long _r10 __asm ("r10"); \
register long _r15 __asm ("r15") = name; \
register void *_b7 __asm ("b7") = ((tcbhead_t *)__thread_self)->__private;\
- long _retval; \
+ long _sc_ret; \
LOAD_REGS_##nr \
/* \
* Don't specify any unwind info here. We mark ar.pfs as \
@@ -217,7 +217,7 @@
ASM_OUTARGS_##nr \
: "0" (_b7), "3" (_r15) ASM_ARGS_##nr \
: "memory", "ar.pfs" ASM_CLOBBERS_##nr); \
- _retval = _r8;
+ _sc_ret = _r8;
#else /* !IA64_USE_NEW_STUB */
@@ -226,14 +226,14 @@
register long _r8 asm ("r8"); \
register long _r10 asm ("r10"); \
register long _r15 asm ("r15") = name; \
- long _retval; \
+ long _sc_ret; \
LOAD_REGS_##nr \
__asm __volatile (BREAK_INSN (__BREAK_SYSCALL) \
: "=r" (_r8), "=r" (_r10), "=r" (_r15) \
ASM_OUTARGS_##nr \
: "2" (_r15) ASM_ARGS_##nr \
: "memory" ASM_CLOBBERS_##nr); \
- _retval = _r8;
+ _sc_ret = _r8;
#endif /* !IA64_USE_NEW_STUB */
@@ -246,10 +246,10 @@
DO_INLINE_SYSCALL_NCS (__NR_##name, nr, args) \
if (_r10 == -1) \
{ \
- __set_errno (_retval); \
- _retval = -1; \
+ __set_errno (_sc_ret); \
+ _sc_ret = -1; \
} \
- _retval; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused))
@@ -259,7 +259,7 @@
({ \
DO_INLINE_SYSCALL_NCS (name, nr, args) \
err = _r10; \
- _retval; })
+ _sc_ret; })
#define INTERNAL_SYSCALL(name, err, nr, args...) \
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 2b88add..de459ac 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -224,13 +224,13 @@ SYSCALL_ERROR_LABEL: \
call. */
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
- ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\
+ ({ unsigned int _sc_ret = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sc_ret, ), 0)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \
- _sys_result = (unsigned int) -1; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, )); \
+ _sc_ret = (unsigned int) -1; \
} \
- (int) _sys_result; })
+ (int) _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
@@ -241,7 +241,7 @@ SYSCALL_ERROR_LABEL: \
gave back. */
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
- ({ unsigned int _sys_result; \
+ ({ unsigned int _sc_ret; \
{ \
/* Load argument values in temporary variables
to perform side effects like function calls
@@ -253,9 +253,9 @@ SYSCALL_ERROR_LABEL: \
: "=d" (_d0) \
: "0" (_d0) ASM_ARGS_##nr \
: "memory"); \
- _sys_result = _d0; \
+ _sc_ret = _d0; \
} \
- (int) _sys_result; })
+ (int) _sc_ret; })
#define INTERNAL_SYSCALL(name, err, nr, args...) \
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep.h b/sysdeps/unix/sysv/linux/microblaze/sysdep.h
index 83c0340..0a8e43f 100644
--- a/sysdeps/unix/sysv/linux/microblaze/sysdep.h
+++ b/sysdeps/unix/sysv/linux/microblaze/sysdep.h
@@ -164,13 +164,13 @@ SYSCALL_ERROR_LABEL_DCL: \
# undef INLINE_SYSCALL
# define INLINE_SYSCALL(name, nr, args...) \
({ INTERNAL_SYSCALL_DECL(err); \
- unsigned long resultvar = INTERNAL_SYSCALL(name, err, nr, args); \
- if (INTERNAL_SYSCALL_ERROR_P (resultvar, err)) \
+ unsigned long _sc_ret = INTERNAL_SYSCALL(name, err, nr, args); \
+ if (INTERNAL_SYSCALL_ERROR_P (_sc_ret, err)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, err)); \
- resultvar = (unsigned long) -1; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, err)); \
+ _sc_ret = (unsigned long) -1; \
} \
- (long) resultvar; \
+ (long) _sc_ret; \
})
# undef INTERNAL_SYSCALL_DECL
@@ -205,70 +205,70 @@ SYSCALL_ERROR_LABEL_DCL: \
# define inline_syscall0(name,dummy) \
({ \
- register long ret __asm__("r3"); \
+ register long _sc_ret __asm__("r3"); \
register long __r12 __asm__("r12") = name; \
__asm__ __volatile__( "brki r14,8; nop;" \
- : "=r"(ret) \
+ : "=r"(_sc_ret) \
: "r"(__r12) \
- : SYSCALL_CLOBBERS_0 ); ret; \
+ : SYSCALL_CLOBBERS_0 ); _sc_ret; \
})
# define inline_syscall1(name,arg1) \
({ \
- register long ret __asm__("r3"); \
+ register long _sc_ret __asm__("r3"); \
register long __r12 __asm__("r12") = name; \
register long __r5 __asm__("r5") = (long)(arg1); \
__asm__ __volatile__( "brki r14,8; nop;" \
- : "=r"(ret) \
+ : "=r"(_sc_ret) \
: "r"(__r5), "r"(__r12) \
- : SYSCALL_CLOBBERS_1 ); ret; \
+ : SYSCALL_CLOBBERS_1 ); _sc_ret; \
})
# define inline_syscall2(name,arg1,arg2) \
({ \
- register long ret __asm__("r3"); \
+ register long _sc_ret __asm__("r3"); \
register long __r12 __asm__("r12") = name; \
register long __r5 __asm__("r5") = (long)(arg1); \
register long __r6 __asm__("r6") = (long)(arg2); \
__asm__ __volatile__( "brki r14,8; nop;" \
- : "=r"(ret) \
+ : "=r"(_sc_ret) \
: "r"(__r5), "r"(__r6), "r"(__r12) \
- : SYSCALL_CLOBBERS_2 ); ret; \
+ : SYSCALL_CLOBBERS_2 ); _sc_ret; \
})
# define inline_syscall3(name,arg1,arg2,arg3) \
({ \
- register long ret __asm__("r3"); \
+ register long _sc_ret __asm__("r3"); \
register long __r12 __asm__("r12") = name; \
register long __r5 __asm__("r5") = (long)(arg1); \
register long __r6 __asm__("r6") = (long)(arg2); \
register long __r7 __asm__("r7") = (long)(arg3); \
__asm__ __volatile__( "brki r14,8; nop;" \
- : "=r"(ret) \
+ : "=r"(_sc_ret) \
: "r"(__r5), "r"(__r6), "r"(__r7), "r"(__r12) \
- : SYSCALL_CLOBBERS_3 ); ret; \
+ : SYSCALL_CLOBBERS_3 ); _sc_ret; \
})
# define inline_syscall4(name,arg1,arg2,arg3,arg4) \
({ \
- register long ret __asm__("r3"); \
+ register long _sc_ret __asm__("r3"); \
register long __r12 __asm__("r12") = name; \
register long __r5 __asm__("r5") = (long)(arg1); \
register long __r6 __asm__("r6") = (long)(arg2); \
register long __r7 __asm__("r7") = (long)(arg3); \
register long __r8 __asm__("r8") = (long)(arg4); \
__asm__ __volatile__( "brki r14,8; nop;" \
- : "=r"(ret) \
+ : "=r"(_sc_ret) \
: "r"(__r5), "r"(__r6), "r"(__r7), "r"(__r8),"r"(__r12) \
- : SYSCALL_CLOBBERS_4 ); ret; \
+ : SYSCALL_CLOBBERS_4 ); _sc_ret; \
})
# define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
({ \
- register long ret __asm__("r3"); \
+ register long _sc_ret __asm__("r3"); \
register long __r12 __asm__("r12") = name; \
register long __r5 __asm__("r5") = (long)(arg1); \
register long __r6 __asm__("r6") = (long)(arg2); \
@@ -276,15 +276,15 @@ SYSCALL_ERROR_LABEL_DCL: \
register long __r8 __asm__("r8") = (long)(arg4); \
register long __r9 __asm__("r9") = (long)(arg5); \
__asm__ __volatile__( "brki r14,8; nop;" \
- : "=r"(ret) \
+ : "=r"(_sc_ret) \
: "r"(__r5), "r"(__r6), "r"(__r7), "r"(__r8),"r"(__r9), "r"(__r12) \
- : SYSCALL_CLOBBERS_5 ); ret; \
+ : SYSCALL_CLOBBERS_5 ); _sc_ret; \
})
# define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
({ \
- register long ret __asm__("r3"); \
+ register long _sc_ret __asm__("r3"); \
register long __r12 __asm__("r12") = name; \
register long __r5 __asm__("r5") = (long)(arg1); \
register long __r6 __asm__("r6") = (long)(arg2); \
@@ -293,10 +293,10 @@ SYSCALL_ERROR_LABEL_DCL: \
register long __r9 __asm__("r9") = (long)(arg5); \
register long __r10 __asm__("r10") = (long)(arg6); \
__asm__ __volatile__( "brki r14,8; nop;" \
- : "=r"(ret) \
+ : "=r"(_sc_ret) \
: "r"(__r5), "r"(__r6), "r"(__r7), "r"(__r8),"r"(__r9), "r"(__r10), \
"r"(__r12) \
- : SYSCALL_CLOBBERS_6 ); ret; \
+ : SYSCALL_CLOBBERS_6 ); _sc_ret; \
})
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index a2aa38d..231c80a 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -50,13 +50,13 @@
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ INTERNAL_SYSCALL_DECL (_sc_err); \
- long result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
- if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \
+ long _sc_ret = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
+ if ( INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err) ) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \
- result_var = -1L; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err)); \
+ _sc_ret = -1L; \
} \
- result_var; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused))
@@ -137,7 +137,7 @@
#define internal_syscall0(v0_init, input, number, err, dummy...) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -153,14 +153,14 @@
: input \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall1(v0_init, input, number, err, arg1) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -177,14 +177,14 @@
: input, "r" (__a0) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -202,15 +202,15 @@
: input, "r" (__a0), "r" (__a1) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall3(v0_init, input, number, err, \
arg1, arg2, arg3) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -229,15 +229,15 @@
: input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall4(v0_init, input, number, err, \
arg1, arg2, arg3, arg4) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -256,9 +256,9 @@
: input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
/* We need to use a frame pointer for the functions in which we
@@ -271,7 +271,7 @@
#define internal_syscall5(v0_init, input, number, err, \
arg1, arg2, arg3, arg4, arg5) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
FORCE_FRAME_POINTER; \
{ \
@@ -295,15 +295,15 @@
"r" ((long) (arg5)) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall6(v0_init, input, number, err, \
arg1, arg2, arg3, arg4, arg5, arg6) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
FORCE_FRAME_POINTER; \
{ \
@@ -328,15 +328,15 @@
"r" ((long) (arg5)), "r" ((long) (arg6)) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall7(v0_init, input, number, err, \
arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
FORCE_FRAME_POINTER; \
{ \
@@ -362,9 +362,9 @@
"r" ((long) (arg5)), "r" ((long) (arg6)), "r" ((long) (arg7)) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index 4c28af6..eea7205 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -52,13 +52,13 @@
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ INTERNAL_SYSCALL_DECL (_sc_err); \
- long result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
- if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \
+ long _sc_ret = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
+ if ( INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err) ) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \
- result_var = -1L; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err)); \
+ _sc_ret = -1L; \
} \
- result_var; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused))
@@ -110,7 +110,7 @@
#define internal_syscall0(v0_init, input, number, err, dummy...) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -126,14 +126,14 @@
: input \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall1(v0_init, input, number, err, arg1) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -150,14 +150,14 @@
: input, "r" (__a0) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -175,15 +175,15 @@
: input, "r" (__a0), "r" (__a1) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall3(v0_init, input, number, err, \
arg1, arg2, arg3) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -202,15 +202,15 @@
: input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall4(v0_init, input, number, err, \
arg1, arg2, arg3, arg4) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -229,15 +229,15 @@
: input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall5(v0_init, input, number, err, \
arg1, arg2, arg3, arg4, arg5) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -257,15 +257,15 @@
: input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall6(v0_init, input, number, err, \
arg1, arg2, arg3, arg4, arg5, arg6) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -287,9 +287,9 @@
"r" (__a5) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index 1fc038c..ba0ef43 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -48,13 +48,13 @@
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ INTERNAL_SYSCALL_DECL (_sc_err); \
- long result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
- if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \
+ long _sc_ret = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
+ if ( INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err) ) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \
- result_var = -1L; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err)); \
+ _sc_ret = -1L; \
} \
- result_var; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused))
@@ -106,7 +106,7 @@
#define internal_syscall0(v0_init, input, number, err, dummy...) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -122,14 +122,14 @@
: input \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall1(v0_init, input, number, err, arg1) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -146,14 +146,14 @@
: input, "r" (__a0) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -171,15 +171,15 @@
: input, "r" (__a0), "r" (__a1) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall3(v0_init, input, number, err, \
arg1, arg2, arg3) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -198,15 +198,15 @@
: input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall4(v0_init, input, number, err, \
arg1, arg2, arg3, arg4) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -225,15 +225,15 @@
: input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall5(v0_init, input, number, err, \
arg1, arg2, arg3, arg4, arg5) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -253,15 +253,15 @@
: input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define internal_syscall6(v0_init, input, number, err, \
arg1, arg2, arg3, arg4, arg5, arg6) \
({ \
- long _sys_result; \
+ long _sc_ret; \
\
{ \
register long __s0 asm ("$16") __attribute__ ((unused)) \
@@ -283,9 +283,9 @@
"r" (__a5) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
- _sys_result = __v0; \
+ _sc_ret = __v0; \
} \
- _sys_result; \
+ _sc_ret; \
})
#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
diff --git a/sysdeps/unix/sysv/linux/nios2/sysdep.h b/sysdeps/unix/sysv/linux/nios2/sysdep.h
index 66a77f4..3d9c7e4 100644
--- a/sysdeps/unix/sysv/linux/nios2/sysdep.h
+++ b/sysdeps/unix/sysv/linux/nios2/sysdep.h
@@ -144,14 +144,14 @@
call. */
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
- ({ INTERNAL_SYSCALL_DECL(err); \
- unsigned int result_var = INTERNAL_SYSCALL (name, err, nr, args); \
- if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \
+ ({ INTERNAL_SYSCALL_DECL(_sc_err); \
+ unsigned int _sc_ret = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
+ if ( INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err) ) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \
- result_var = -1L; \
+ __set__sc_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err)); \
+ _sc_ret = -1L; \
} \
- (int) result_var; })
+ (int) _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) unsigned int err __attribute__((unused))
@@ -164,7 +164,7 @@
#undef INTERNAL_SYSCALL_RAW
#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
- ({ unsigned int _sys_result; \
+ ({ unsigned int _sc_ret; \
{ \
/* Load argument values in temporary variables
to perform side effects like function calls
@@ -172,15 +172,15 @@
LOAD_ARGS_##nr (args) \
LOAD_REGS_##nr \
register int _r2 asm ("r2") = (int)(name); \
- register int _err asm ("r7"); \
+ register int _sc_err asm ("r7"); \
asm volatile ("trap" \
- : "+r" (_r2), "=r" (_err) \
+ : "+r" (_r2), "=r" (_sc_err) \
: ASM_ARGS_##nr \
: __SYSCALL_CLOBBERS); \
- _sys_result = _r2; \
- err = _err; \
+ _sc_ret = _r2; \
+ err = _sc_err; \
} \
- (int) _sys_result; })
+ (int) _sc_ret; })
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err, nr, args...) \
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
index dc56bea..0ff3add 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
@@ -59,29 +59,30 @@
an error return status). */
# define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, nr, type, args...) \
({ \
- register void *r0 __asm__ ("r0"); \
- register long int r3 __asm__ ("r3"); \
- register long int r4 __asm__ ("r4"); \
- register long int r5 __asm__ ("r5"); \
- register long int r6 __asm__ ("r6"); \
- register long int r7 __asm__ ("r7"); \
- register long int r8 __asm__ ("r8"); \
- register long int r9 __asm__ ("r9"); \
- register long int r10 __asm__ ("r10"); \
- register long int r11 __asm__ ("r11"); \
- register long int r12 __asm__ ("r12"); \
- register type rval __asm__ ("r3"); \
+ register void *_r0 __asm__ ("r0"); \
+ register long int _r3 __asm__ ("r3"); \
+ register long int _r4 __asm__ ("r4"); \
+ register long int _r5 __asm__ ("r5"); \
+ register long int _r6 __asm__ ("r6"); \
+ register long int _r7 __asm__ ("r7"); \
+ register long int _r8 __asm__ ("r8"); \
+ register long int _r9 __asm__ ("r9"); \
+ register long int _r10 __asm__ ("r10"); \
+ register long int _r11 __asm__ ("r11"); \
+ register long int _r12 __asm__ ("r12"); \
+ register type _sc_ret __asm__ ("r3"); \
LOADARGS_##nr (funcptr, args); \
__asm__ __volatile__ \
("mtctr %0\n\t" \
"bctrl\n\t" \
"mfcr %0" \
- : "+r" (r0), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), \
- "+r" (r8), "+r" (r9), "+r" (r10), "+r" (r11), "+r" (r12) \
+ : "+r" (_r0), "+r" (_r3), "+r" (_r4), "+r" (_r5), "+r" (_r6), \
+ "+r" (_r7), "+r" (_r8), "+r" (_r9), "+r" (_r10), "+r" (_r11), \
+ "+r" (_r12) \
: : "cr0", "ctr", "lr", "memory"); \
err = (long int) r0; \
- __asm__ __volatile__ ("" : "=r" (rval) : "r" (r3), "r" (r4)); \
- rval; \
+ __asm__ __volatile__ ("" : "=r" (_sc_ret) : "r" (_r3), "r" (_r4)); \
+ _sc_ret; \
})
#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
@@ -90,14 +91,14 @@
# undef INLINE_SYSCALL
# define INLINE_SYSCALL(name, nr, args...) \
({ \
- INTERNAL_SYSCALL_DECL (sc_err); \
- long int sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, args); \
- if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
+ INTERNAL_SYSCALL_DECL (_sc_err); \
+ long int _sc_ret = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
+ if (INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \
- sc_ret = -1L; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err)); \
+ _sc_ret = -1L; \
} \
- sc_ret; \
+ _sc_ret; \
})
/* Define a macro which expands inline into the wrapper code for a system
@@ -114,29 +115,30 @@
# undef INTERNAL_SYSCALL
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ \
- register long int r0 __asm__ ("r0"); \
- register long int r3 __asm__ ("r3"); \
- register long int r4 __asm__ ("r4"); \
- register long int r5 __asm__ ("r5"); \
- register long int r6 __asm__ ("r6"); \
- register long int r7 __asm__ ("r7"); \
- register long int r8 __asm__ ("r8"); \
- register long int r9 __asm__ ("r9"); \
- register long int r10 __asm__ ("r10"); \
- register long int r11 __asm__ ("r11"); \
- register long int r12 __asm__ ("r12"); \
+ register long int _r0 __asm__ ("r0"); \
+ register long int _r3 __asm__ ("r3"); \
+ register long int _r4 __asm__ ("r4"); \
+ register long int _r5 __asm__ ("r5"); \
+ register long int _r6 __asm__ ("r6"); \
+ register long int _r7 __asm__ ("r7"); \
+ register long int _r8 __asm__ ("r8"); \
+ register long int _r9 __asm__ ("r9"); \
+ register long int _r10 __asm__ ("r10"); \
+ register long int _r11 __asm__ ("r11"); \
+ register long int _r12 __asm__ ("r12"); \
LOADARGS_##nr(name, args); \
ABORT_TRANSACTION; \
__asm__ __volatile__ \
("sc \n\t" \
"mfcr %0" \
- : "=&r" (r0), \
- "=&r" (r3), "=&r" (r4), "=&r" (r5), "=&r" (r6), "=&r" (r7), \
- "=&r" (r8), "=&r" (r9), "=&r" (r10), "=&r" (r11), "=&r" (r12) \
+ : "=&r" (_r0), \
+ "=&r" (_r3), "=&r" (_r4), "=&r" (_r5), "=&r" (_r6), \
+ "=&r" (_r7), "=&r" (_r8), "=&r" (_r9), "=&r" (_r10), \
+ "=&r" (_r11), "=&r" (_r12) \
: ASM_INPUT_##nr \
: "cr0", "ctr", "memory"); \
- err = r0; \
- (int) r3; \
+ err = _r0; \
+ (int) _r3; \
})
# define INTERNAL_SYSCALL(name, err, nr, args...) \
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
@@ -150,16 +152,16 @@
# define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \
({ \
- type sc_ret = ENOSYS; \
+ type _sc_ret = ENOSYS; \
\
__typeof (__vdso_##name) vdsop = __vdso_##name; \
PTR_DEMANGLE (vdsop); \
if (vdsop != NULL) \
- sc_ret = \
+ _sc_ret = \
INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, nr, type, ##args); \
else \
err = 1 << 28; \
- sc_ret; \
+ _sc_ret; \
})
/* List of system calls which are supported as vsyscalls. */
@@ -169,57 +171,57 @@
# define LOADARGS_0(name, dummy) \
- r0 = name
+ _r0 = name
# define LOADARGS_1(name, __arg1) \
- long int arg1 = (long int) (__arg1); \
- LOADARGS_0(name, 0); \
+ long int _arg1 = (long int) (__arg1); \
+ LOADARGS_0(name, 0); \
extern void __illegally_sized_syscall_arg1 (void); \
if (__builtin_classify_type (__arg1) != 5 && sizeof (__arg1) > 4) \
__illegally_sized_syscall_arg1 (); \
- r3 = arg1
+ _r3 = _arg1
# define LOADARGS_2(name, __arg1, __arg2) \
- long int arg2 = (long int) (__arg2); \
+ long int _arg2 = (long int) (__arg2); \
LOADARGS_1(name, __arg1); \
extern void __illegally_sized_syscall_arg2 (void); \
if (__builtin_classify_type (__arg2) != 5 && sizeof (__arg2) > 4) \
__illegally_sized_syscall_arg2 (); \
- r4 = arg2
+ _r4 = _arg2
# define LOADARGS_3(name, __arg1, __arg2, __arg3) \
- long int arg3 = (long int) (__arg3); \
+ long int _arg3 = (long int) (__arg3); \
LOADARGS_2(name, __arg1, __arg2); \
extern void __illegally_sized_syscall_arg3 (void); \
if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 4) \
__illegally_sized_syscall_arg3 (); \
- r5 = arg3
+ _r5 = _arg3
# define LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4) \
- long int arg4 = (long int) (__arg4); \
+ long int _arg4 = (long int) (__arg4); \
LOADARGS_3(name, __arg1, __arg2, __arg3); \
extern void __illegally_sized_syscall_arg4 (void); \
if (__builtin_classify_type (__arg4) != 5 && sizeof (__arg4) > 4) \
__illegally_sized_syscall_arg4 (); \
- r6 = arg4
+ _r6 = _arg4
# define LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5) \
- long int arg5 = (long int) (__arg5); \
+ long int _arg5 = (long int) (__arg5); \
LOADARGS_4(name, __arg1, __arg2, __arg3, __arg4); \
extern void __illegally_sized_syscall_arg5 (void); \
if (__builtin_classify_type (__arg5) != 5 && sizeof (__arg5) > 4) \
__illegally_sized_syscall_arg5 (); \
- r7 = arg5
+ _r7 = _arg5
# define LOADARGS_6(name, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \
- long int arg6 = (long int) (__arg6); \
+ long int _arg6 = (long int) (__arg6); \
LOADARGS_5(name, __arg1, __arg2, __arg3, __arg4, __arg5); \
extern void __illegally_sized_syscall_arg6 (void); \
if (__builtin_classify_type (__arg6) != 5 && sizeof (__arg6) > 4) \
__illegally_sized_syscall_arg6 (); \
- r8 = arg6
-
-# define ASM_INPUT_0 "0" (r0)
-# define ASM_INPUT_1 ASM_INPUT_0, "1" (r3)
-# define ASM_INPUT_2 ASM_INPUT_1, "2" (r4)
-# define ASM_INPUT_3 ASM_INPUT_2, "3" (r5)
-# define ASM_INPUT_4 ASM_INPUT_3, "4" (r6)
-# define ASM_INPUT_5 ASM_INPUT_4, "5" (r7)
-# define ASM_INPUT_6 ASM_INPUT_5, "6" (r8)
+ _r8 = _arg6
+
+# define ASM_INPUT_0 "0" (_r0)
+# define ASM_INPUT_1 ASM_INPUT_0, "1" (_r3)
+# define ASM_INPUT_2 ASM_INPUT_1, "2" (_r4)
+# define ASM_INPUT_3 ASM_INPUT_2, "3" (_r5)
+# define ASM_INPUT_4 ASM_INPUT_3, "4" (_r6)
+# define ASM_INPUT_5 ASM_INPUT_4, "5" (_r7)
+# define ASM_INPUT_6 ASM_INPUT_5, "6" (_r8)
#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
index e2014cc..d2e1a5a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
@@ -65,16 +65,16 @@
to set errno */
#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \
({ \
- type sc_ret = ENOSYS; \
+ type _sc_ret = ENOSYS; \
\
__typeof (__vdso_##name) vdsop = __vdso_##name; \
PTR_DEMANGLE (vdsop); \
if (vdsop != NULL) \
- sc_ret = \
+ _sc_ret = \
INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, type, nr, ##args); \
else \
err = 1 << 28; \
- sc_ret; \
+ _sc_ret; \
})
/* List of system calls which are supported as vsyscalls. */
@@ -121,14 +121,14 @@
behave like function calls as far as register saving. */
#define INLINE_SYSCALL(name, nr, args...) \
({ \
- INTERNAL_SYSCALL_DECL (sc_err); \
- long int sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, args); \
- if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
+ INTERNAL_SYSCALL_DECL (_sc_err); \
+ long int _sc_ret = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
+ if (INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \
- sc_ret = -1L; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err)); \
+ _sc_ret = -1L; \
} \
- sc_ret; \
+ _sc_ret; \
})
/* Define a macro which expands inline into the wrapper code for a system
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
index c768df1..86342fd 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
@@ -181,13 +181,13 @@
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ \
- unsigned int _ret = INTERNAL_SYSCALL (name, , nr, args); \
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (_ret, ))) \
+ unsigned int _sc_ret = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (_sc_ret, ))) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_ret, )); \
- _ret = 0xffffffff; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, )); \
+ _sc_ret = 0xffffffff; \
} \
- (int) _ret; })
+ (int) _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
@@ -196,39 +196,39 @@
#define INTERNAL_SYSCALL_DIRECT(name, err, nr, args...) \
({ \
DECLARGS_##nr(args) \
- register int _ret asm("2"); \
+ register int _sc_ret asm("2"); \
asm volatile ( \
"svc %b1\n\t" \
- : "=d" (_ret) \
+ : "=d" (_sc_ret) \
: "i" (__NR_##name) ASMFMT_##nr \
: "memory" ); \
- _ret; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL_SVC0
#define INTERNAL_SYSCALL_SVC0(name, err, nr, args...) \
({ \
DECLARGS_##nr(args) \
register unsigned long _nr asm("1") = (unsigned long)(__NR_##name); \
- register int _ret asm("2"); \
+ register int _sc_ret asm("2"); \
asm volatile ( \
"svc 0\n\t" \
- : "=d" (_ret) \
+ : "=d" (_sc_ret) \
: "d" (_nr) ASMFMT_##nr \
: "memory" ); \
- _ret; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL_NCS
#define INTERNAL_SYSCALL_NCS(no, err, nr, args...) \
({ \
DECLARGS_##nr(args) \
register unsigned long _nr asm("1") = (unsigned long)(no); \
- register int _ret asm("2"); \
+ register int _sc_ret asm("2"); \
asm volatile ( \
"svc 0\n\t" \
- : "=d" (_ret) \
+ : "=d" (_sc_ret) \
: "d" (_nr) ASMFMT_##nr \
: "memory" ); \
- _ret; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err, nr, args...) \
@@ -245,30 +245,30 @@
#define DECLARGS_0()
#define DECLARGS_1(arg1) \
- register unsigned long gpr2 asm ("2") = (unsigned long)(arg1);
+ register unsigned long _gpr2 asm ("2") = (unsigned long)(arg1);
#define DECLARGS_2(arg1, arg2) \
DECLARGS_1(arg1) \
- register unsigned long gpr3 asm ("3") = (unsigned long)(arg2);
+ register unsigned long _gpr3 asm ("3") = (unsigned long)(arg2);
#define DECLARGS_3(arg1, arg2, arg3) \
DECLARGS_2(arg1, arg2) \
- register unsigned long gpr4 asm ("4") = (unsigned long)(arg3);
+ register unsigned long _gpr4 asm ("4") = (unsigned long)(arg3);
#define DECLARGS_4(arg1, arg2, arg3, arg4) \
DECLARGS_3(arg1, arg2, arg3) \
- register unsigned long gpr5 asm ("5") = (unsigned long)(arg4);
+ register unsigned long _gpr5 asm ("5") = (unsigned long)(arg4);
#define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
DECLARGS_4(arg1, arg2, arg3, arg4) \
- register unsigned long gpr6 asm ("6") = (unsigned long)(arg5);
+ register unsigned long _gpr6 asm ("6") = (unsigned long)(arg5);
#define DECLARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
- register unsigned long gpr7 asm ("7") = (unsigned long)(arg6);
+ register unsigned long _gpr7 asm ("7") = (unsigned long)(arg6);
#define ASMFMT_0
-#define ASMFMT_1 , "0" (gpr2)
-#define ASMFMT_2 , "0" (gpr2), "d" (gpr3)
-#define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
-#define ASMFMT_4 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
-#define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)
-#define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)
+#define ASMFMT_1 , "0" (_gpr2)
+#define ASMFMT_2 , "0" (_gpr2), "d" (_gpr3)
+#define ASMFMT_3 , "0" (_gpr2), "d" (_gpr3), "d" (_gpr4)
+#define ASMFMT_4 , "0" (_gpr2), "d" (_gpr3), "d" (_gpr4), "d" (_gpr5)
+#define ASMFMT_5 , "0" (_gpr2), "d" (_gpr3), "d" (_gpr4), "d" (_gpr5), "d" (_gpr6)
+#define ASMFMT_6 , "0" (_gpr2), "d" (_gpr3), "d" (_gpr4), "d" (_gpr5), "d" (_gpr6), "d" (_gpr7)
#define CLOBBER_0 , "3", "4", "5"
#define CLOBBER_1 , "3", "4", "5"
@@ -287,29 +287,29 @@
to set errno */
#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, nr, args...) \
({ \
- long int _ret = ENOSYS; \
+ long int _sc_ret = ENOSYS; \
\
- __typeof (__vdso_##name) vdsop = __vdso_##name; \
- PTR_DEMANGLE (vdsop); \
+ __typeof (__vdso_##name) _vdsop = __vdso_##name; \
+ PTR_DEMANGLE (_vdsop); \
if (vdsop != NULL) \
- _ret = INTERNAL_VSYSCALL_CALL (vdsop, err, nr, ##args); \
+ _sc_ret = INTERNAL_VSYSCALL_CALL (_vdsop, err, nr, ##args); \
else \
err = 1 << 28; \
- _ret; \
+ _sc_ret; \
})
#define INTERNAL_VSYSCALL_CALL(fn, err, nr, args...) \
({ \
DECLARGS_##nr(args) \
- register long _ret asm("2"); \
+ register long _sc_ret asm("2"); \
asm volatile ( \
- "lr 10,14\n\t" \
+ "lr 10,14\n\t" \
"basr 14,%1\n\t" \
- "lr 14,10\n\t" \
- : "=d" (_ret) \
+ "lr 14,10\n\t" \
+ : "=d" (_sc_ret) \
: "d" (fn) ASMFMT_##nr \
- : "cc", "memory", "0", "1", "10" CLOBBER_##nr); \
- _ret; })
+ : "cc", "memory", "0", "1", "10" CLOBBER_##nr); \
+ _sc_ret; })
/* Pointer mangling support. */
#if IS_IN (rtld)
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index c041153..e0d6540 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -187,13 +187,13 @@
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ \
- long _ret = INTERNAL_SYSCALL (name, , nr, args); \
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (_ret, ))) \
+ long _sc_ret = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (_sc_ret, ))) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_ret, )); \
- _ret = -1; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, )); \
+ _sc_ret = -1; \
} \
- _ret; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
@@ -202,39 +202,39 @@
#define INTERNAL_SYSCALL_DIRECT(name, err, nr, args...) \
({ \
DECLARGS_##nr(args) \
- register long _ret asm("2"); \
+ register long _sc_ret asm("2"); \
asm volatile ( \
"svc %b1\n\t" \
- : "=d" (_ret) \
+ : "=d" (_sc_ret) \
: "i" (__NR_##name) ASMFMT_##nr \
: "memory" ); \
- _ret; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL_SVC0
#define INTERNAL_SYSCALL_SVC0(name, err, nr, args...) \
({ \
DECLARGS_##nr(args) \
register unsigned long _nr asm("1") = (unsigned long)(__NR_##name); \
- register long _ret asm("2"); \
+ register long _sc_ret asm("2"); \
asm volatile ( \
"svc 0\n\t" \
- : "=d" (_ret) \
+ : "=d" (_sc_ret) \
: "d" (_nr) ASMFMT_##nr \
: "memory" ); \
- _ret; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL_NCS
#define INTERNAL_SYSCALL_NCS(no, err, nr, args...) \
({ \
DECLARGS_##nr(args) \
register unsigned long _nr asm("1") = (unsigned long)(no); \
- register long _ret asm("2"); \
+ register long _sc_ret asm("2"); \
asm volatile ( \
"svc 0\n\t" \
- : "=d" (_ret) \
+ : "=d" (_sc_ret) \
: "d" (_nr) ASMFMT_##nr \
: "memory" ); \
- _ret; })
+ _sc_ret; })
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err, nr, args...) \
@@ -251,30 +251,30 @@
#define DECLARGS_0()
#define DECLARGS_1(arg1) \
- register unsigned long gpr2 asm ("2") = (unsigned long)(arg1);
+ register unsigned long _gpr2 asm ("2") = (unsigned long)(arg1);
#define DECLARGS_2(arg1, arg2) \
DECLARGS_1(arg1) \
- register unsigned long gpr3 asm ("3") = (unsigned long)(arg2);
+ register unsigned long _gpr3 asm ("3") = (unsigned long)(arg2);
#define DECLARGS_3(arg1, arg2, arg3) \
DECLARGS_2(arg1, arg2) \
- register unsigned long gpr4 asm ("4") = (unsigned long)(arg3);
+ register unsigned long _gpr4 asm ("4") = (unsigned long)(arg3);
#define DECLARGS_4(arg1, arg2, arg3, arg4) \
DECLARGS_3(arg1, arg2, arg3) \
- register unsigned long gpr5 asm ("5") = (unsigned long)(arg4);
+ register unsigned long _gpr5 asm ("5") = (unsigned long)(arg4);
#define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
DECLARGS_4(arg1, arg2, arg3, arg4) \
- register unsigned long gpr6 asm ("6") = (unsigned long)(arg5);
+ register unsigned long _gpr6 asm ("6") = (unsigned long)(arg5);
#define DECLARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
- register unsigned long gpr7 asm ("7") = (unsigned long)(arg6);
+ register unsigned long _gpr7 asm ("7") = (unsigned long)(arg6);
#define ASMFMT_0
-#define ASMFMT_1 , "0" (gpr2)
-#define ASMFMT_2 , "0" (gpr2), "d" (gpr3)
-#define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
-#define ASMFMT_4 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
-#define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)
-#define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)
+#define ASMFMT_1 , "0" (_gpr2)
+#define ASMFMT_2 , "0" (_gpr2), "d" (_gpr3)
+#define ASMFMT_3 , "0" (_gpr2), "d" (_gpr3), "d" (_gpr4)
+#define ASMFMT_4 , "0" (_gpr2), "d" (_gpr3), "d" (_gpr4), "d" (_gpr5)
+#define ASMFMT_5 , "0" (_gpr2), "d" (_gpr3), "d" (_gpr4), "d" (_gpr5), "d" (_gpr6)
+#define ASMFMT_6 , "0" (_gpr2), "d" (_gpr3), "d" (_gpr4), "d" (_gpr5), "d" (_gpr6), "d" (_gpr7)
#define CLOBBER_0 , "3", "4", "5"
#define CLOBBER_1 , "3", "4", "5"
@@ -293,29 +293,29 @@
to set errno */
#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, nr, args...) \
({ \
- long int _ret = ENOSYS; \
+ long int _sc_ret = ENOSYS; \
\
- __typeof (__vdso_##name) vdsop = __vdso_##name; \
- PTR_DEMANGLE (vdsop); \
+ __typeof (__vdso_##name) _vdsop = __vdso_##name; \
+ PTR_DEMANGLE (_vdsop); \
if (vdsop != NULL) \
- _ret = INTERNAL_VSYSCALL_CALL (vdsop, err, nr, ##args); \
+ _sc_ret = INTERNAL_VSYSCALL_CALL (_vdsop, err, nr, ##args); \
else \
err = 1 << 28; \
- _ret; \
+ _sc_ret; \
})
#define INTERNAL_VSYSCALL_CALL(fn, err, nr, args...) \
({ \
DECLARGS_##nr(args) \
- register long _ret asm("2"); \
+ register long _sc_ret asm("2"); \
asm volatile ( \
- "lgr 10,14\n\t" \
+ "lgr 10,14\n\t" \
"basr 14,%1\n\t" \
- "lgr 14,10\n\t" \
- : "=d" (_ret) \
+ "lgr 14,10\n\t" \
+ : "=d" (_sc_ret) \
: "a" (fn) ASMFMT_##nr \
- : "cc", "memory", "0", "1", "10" CLOBBER_##nr); \
- _ret; })
+ : "cc", "memory", "0", "1", "10" CLOBBER_##nr); \
+ _sc_ret; })
/* Pointer mangling support. */
#if IS_IN (rtld)
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.h b/sysdeps/unix/sysv/linux/sh/sysdep.h
index 5226ff6..30aec75 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.h
@@ -207,56 +207,56 @@
#define ASMFMT_0
#define ASMFMT_1 \
- , "r" (r4)
+ , "r" (_r4)
#define ASMFMT_2 \
- , "r" (r4), "r" (r5)
+ , "r" (_r4), "r" (_r5)
#define ASMFMT_3 \
- , "r" (r4), "r" (r5), "r" (r6)
+ , "r" (_r4), "r" (_r5), "r" (_r6)
#define ASMFMT_4 \
- , "r" (r4), "r" (r5), "r" (r6), "r" (r7)
+ , "r" (_r4), "r" (_r5), "r" (_r6), "r" (_r7)
#define ASMFMT_5 \
- , "r" (r4), "r" (r5), "r" (r6), "r" (r7), "0" (r0)
+ , "r" (_r4), "r" (_r5), "r" (_r6), "r" (_r7), "0" (_r0)
#define ASMFMT_6 \
- , "r" (r4), "r" (r5), "r" (r6), "r" (r7), "0" (r0), "r" (r1)
+ , "r" (_r4), "r" (_r5), "r" (_r6), "r" (_r7), "0" (_r0), "r" (_r1)
#define ASMFMT_7 \
- , "r" (r4), "r" (r5), "r" (r6), "r" (r7), "0" (r0), "r" (r1), "r" (r2)
+ , "r" (_r4), "r" (_r5), "r" (_r6), "r" (_r7), "0" (_r0), "r" (_r1), "r" (_r2)
#define SUBSTITUTE_ARGS_0()
#define SUBSTITUTE_ARGS_1(arg1) \
long int _arg1 = (long int) (arg1); \
- register long int r4 asm ("%r4") = (long int) (_arg1)
+ register long int _r4 asm ("%r4") = (long int) (_arg1)
#define SUBSTITUTE_ARGS_2(arg1, arg2) \
long int _arg1 = (long int) (arg1); \
long int _arg2 = (long int) (arg2); \
- register long int r4 asm ("%r4") = (long int) (_arg1); \
- register long int r5 asm ("%r5") = (long int) (_arg2)
+ register long int _r4 asm ("%r4") = (long int) (_arg1); \
+ register long int _r5 asm ("%r5") = (long int) (_arg2)
#define SUBSTITUTE_ARGS_3(arg1, arg2, arg3) \
long int _arg1 = (long int) (arg1); \
long int _arg2 = (long int) (arg2); \
long int _arg3 = (long int) (arg3); \
- register long int r4 asm ("%r4") = (long int) (_arg1); \
- register long int r5 asm ("%r5") = (long int) (_arg2); \
- register long int r6 asm ("%r6") = (long int) (_arg3)
+ register long int _r4 asm ("%r4") = (long int) (_arg1); \
+ register long int _r5 asm ("%r5") = (long int) (_arg2); \
+ register long int _r6 asm ("%r6") = (long int) (_arg3)
#define SUBSTITUTE_ARGS_4(arg1, arg2, arg3, arg4) \
long int _arg1 = (long int) (arg1); \
long int _arg2 = (long int) (arg2); \
long int _arg3 = (long int) (arg3); \
long int _arg4 = (long int) (arg4); \
- register long int r4 asm ("%r4") = (long int) (_arg1); \
- register long int r5 asm ("%r5") = (long int) (_arg2); \
- register long int r6 asm ("%r6") = (long int) (_arg3); \
- register long int r7 asm ("%r7") = (long int) (_arg4)
+ register long int _r4 asm ("%r4") = (long int) (_arg1); \
+ register long int _r5 asm ("%r5") = (long int) (_arg2); \
+ register long int _r6 asm ("%r6") = (long int) (_arg3); \
+ register long int _r7 asm ("%r7") = (long int) (_arg4)
#define SUBSTITUTE_ARGS_5(arg1, arg2, arg3, arg4, arg5) \
long int _arg1 = (long int) (arg1); \
long int _arg2 = (long int) (arg2); \
long int _arg3 = (long int) (arg3); \
long int _arg4 = (long int) (arg4); \
long int _arg5 = (long int) (arg5); \
- register long int r4 asm ("%r4") = (long int) (_arg1); \
- register long int r5 asm ("%r5") = (long int) (_arg2); \
- register long int r6 asm ("%r6") = (long int) (_arg3); \
- register long int r7 asm ("%r7") = (long int) (_arg4); \
- register long int r0 asm ("%r0") = (long int) (_arg5)
+ register long int _r4 asm ("%r4") = (long int) (_arg1); \
+ register long int _r5 asm ("%r5") = (long int) (_arg2); \
+ register long int _r6 asm ("%r6") = (long int) (_arg3); \
+ register long int _r7 asm ("%r7") = (long int) (_arg4); \
+ register long int _r0 asm ("%r0") = (long int) (_arg5)
#define SUBSTITUTE_ARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
long int _arg1 = (long int) (arg1); \
long int _arg2 = (long int) (arg2); \
@@ -264,12 +264,12 @@
long int _arg4 = (long int) (arg4); \
long int _arg5 = (long int) (arg5); \
long int _arg6 = (long int) (arg6); \
- register long int r4 asm ("%r4") = (long int)(_arg1); \
- register long int r5 asm ("%r5") = (long int) (_arg2); \
- register long int r6 asm ("%r6") = (long int) (_arg3); \
- register long int r7 asm ("%r7") = (long int) (_arg4); \
- register long int r0 asm ("%r0") = (long int) (_arg5); \
- register long int r1 asm ("%r1") = (long int) (_arg6)
+ register long int _r4 asm ("%r4") = (long int)(_arg1); \
+ register long int _r5 asm ("%r5") = (long int) (_arg2); \
+ register long int _r6 asm ("%r6") = (long int) (_arg3); \
+ register long int _r7 asm ("%r7") = (long int) (_arg4); \
+ register long int _r0 asm ("%r0") = (long int) (_arg5); \
+ register long int _r1 asm ("%r1") = (long int) (_arg6)
#define SUBSTITUTE_ARGS_7(arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
long int _arg1 = (long int) (arg1); \
long int _arg2 = (long int) (arg2); \
@@ -278,52 +278,52 @@
long int _arg5 = (long int) (arg5); \
long int _arg6 = (long int) (arg6); \
long int _arg7 = (long int) (arg7); \
- register long int r4 asm ("%r4") = (long int) (_arg1); \
- register long int r5 asm ("%r5") = (long int) (_arg2); \
- register long int r6 asm ("%r6") = (long int) (_arg3); \
- register long int r7 asm ("%r7") = (long int) (_arg4); \
- register long int r0 asm ("%r0") = (long int) (_arg5); \
- register long int r1 asm ("%r1") = (long int) (_arg6); \
- register long int r2 asm ("%r2") = (long int) (_arg7)
+ register long int _r4 asm ("%r4") = (long int) (_arg1); \
+ register long int _r5 asm ("%r5") = (long int) (_arg2); \
+ register long int _r6 asm ("%r6") = (long int) (_arg3); \
+ register long int _r7 asm ("%r7") = (long int) (_arg4); \
+ register long int _r0 asm ("%r0") = (long int) (_arg5); \
+ register long int _r1 asm ("%r1") = (long int) (_arg6); \
+ register long int _r2 asm ("%r2") = (long int) (_arg7)
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ \
- unsigned int resultvar = INTERNAL_SYSCALL (name, , nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (resultvar, ), 0)) \
+ unsigned int _sc_ret = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sc_ret, ), 0)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, )); \
- resultvar = 0xffffffff; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, )); \
+ _sc_ret = 0xffffffff; \
} \
- (int) resultvar; })
+ (int) _sc_ret; })
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err, nr, args...) \
({ \
- unsigned long int resultvar; \
- register long int r3 asm ("%r3") = SYS_ify (name); \
+ unsigned long int _sc_ret; \
+ register long int _r3 asm ("%_r3") = SYS_ify (name); \
SUBSTITUTE_ARGS_##nr(args); \
\
asm volatile (SYSCALL_INST_STR##nr SYSCALL_INST_PAD \
- : "=z" (resultvar) \
- : "r" (r3) ASMFMT_##nr \
+ : "=z" (_sc_ret) \
+ : "r" (_r3) ASMFMT_##nr \
: "memory", "t"); \
\
- (int) resultvar; })
+ (int) _sc_ret; })
/* The _NCS variant allows non-constant syscall numbers. */
#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ \
- unsigned long int resultvar; \
- register long int r3 asm ("%r3") = (name); \
+ unsigned long int _sc_ret; \
+ register long int _r3 asm ("%_r3") = (name); \
SUBSTITUTE_ARGS_##nr(args); \
\
asm volatile (SYSCALL_INST_STR##nr SYSCALL_INST_PAD \
- : "=z" (resultvar) \
- : "r" (r3) ASMFMT_##nr \
+ : "=z" (_sc_ret) \
+ : "r" (_r3) ASMFMT_##nr \
: "memory", "t"); \
\
- (int) resultvar; })
+ (int) _sc_ret; })
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sysdep.h
index e215dbb..ffadc3b 100644
--- a/sysdeps/unix/sysv/linux/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sysdep.h
@@ -34,15 +34,15 @@
#else /* __ASSEMBLER__ */
#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
-({ INTERNAL_SYSCALL_DECL(err); \
- unsigned long resultvar = INTERNAL_SYSCALL(name, err, nr, args);\
- if (INTERNAL_SYSCALL_ERROR_P (resultvar, err)) \
- { \
- __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, err)); \
- resultvar = (unsigned long) -1; \
- } \
- (long) resultvar; \
+#define INLINE_SYSCALL(name, nr, args...) \
+({ INTERNAL_SYSCALL_DECL(_sc_err); \
+ unsigned long _sc_ret = INTERNAL_SYSCALL(name, _sc_err, nr, args); \
+ if (INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err)) \
+ { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err)); \
+ _sc_ret = (unsigned long) -1; \
+ } \
+ (long) _sc_ret; \
})
#undef INTERNAL_SYSCALL_DECL
diff --git a/sysdeps/unix/sysv/linux/sysdep-vdso.h b/sysdeps/unix/sysv/linux/sysdep-vdso.h
index 43e74b9..65e0d13 100644
--- a/sysdeps/unix/sysv/linux/sysdep-vdso.h
+++ b/sysdeps/unix/sysv/linux/sysdep-vdso.h
@@ -36,48 +36,48 @@
({ \
__label__ out; \
__label__ iserr; \
- INTERNAL_SYSCALL_DECL (sc_err); \
- long int sc_ret; \
+ INTERNAL_SYSCALL_DECL (_sc_err); \
+ long int _sc_ret; \
\
- __typeof (__vdso_##name) vdsop = __vdso_##name; \
- PTR_DEMANGLE (vdsop); \
- if (vdsop != NULL) \
+ __typeof (__vdso_##name) _vdsop = __vdso_##name; \
+ PTR_DEMANGLE (_vdsop); \
+ if (_vdsop != NULL) \
{ \
- sc_ret = INTERNAL_VSYSCALL_CALL (vdsop, sc_err, nr, ##args); \
- if (!INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
+ _sc_ret = INTERNAL_VSYSCALL_CALL (_vdsop, _sc_err, nr, ##args); \
+ if (!INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err)) \
goto out; \
- if (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err) != ENOSYS) \
+ if (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err) != ENOSYS) \
goto iserr; \
} \
\
- sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, ##args); \
- if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
+ _sc_ret = INTERNAL_SYSCALL (name, _sc_err, nr, ##args); \
+ if (INTERNAL_SYSCALL_ERROR_P (_sc_ret, _sc_err)) \
{ \
iserr: \
- __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \
- sc_ret = -1L; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, _sc_err)); \
+ _sc_ret = -1L; \
} \
out: \
- sc_ret; \
+ _sc_ret; \
})
# define INTERNAL_VSYSCALL(name, err, nr, args...) \
({ \
__label__ out; \
- long v_ret; \
+ long _v_ret; \
\
- __typeof (__vdso_##name) vdsop = __vdso_##name; \
- PTR_DEMANGLE (vdsop); \
- if (vdsop != NULL) \
+ __typeof (__vdso_##name) _vdsop = __vdso_##name; \
+ PTR_DEMANGLE (_vdsop); \
+ if (_vdsop != NULL) \
{ \
- v_ret = INTERNAL_VSYSCALL_CALL (vdsop, err, nr, ##args); \
- if (!INTERNAL_SYSCALL_ERROR_P (v_ret, err) \
- || INTERNAL_SYSCALL_ERRNO (v_ret, err) != ENOSYS) \
+ _v_ret = INTERNAL_VSYSCALL_CALL (_vdsop, err, nr, ##args); \
+ if (!INTERNAL_SYSCALL_ERROR_P (_v_ret, err) \
+ || INTERNAL_SYSCALL_ERRNO (_v_ret, err) != ENOSYS) \
goto out; \
} \
- v_ret = INTERNAL_SYSCALL (name, err, nr, ##args); \
+ _v_ret = INTERNAL_SYSCALL (name, err, nr, ##args); \
out: \
- v_ret; \
+ _v_ret; \
})
# else
# define INLINE_VSYSCALL(name, nr, args...) \
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 5a62cce..51a7820 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -192,13 +192,13 @@
# undef INLINE_SYSCALL
# define INLINE_SYSCALL(name, nr, args...) \
({ \
- unsigned long int resultvar = INTERNAL_SYSCALL (name, , nr, args); \
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (resultvar, ))) \
+ unsigned long int _sc_ret = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (_sc_ret, ))) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, )); \
- resultvar = (unsigned long int) -1; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, )); \
+ _sc_ret = (unsigned long int) -1; \
} \
- (long int) resultvar; })
+ (long int) _sc_ret; })
/* Define a macro with explicit types for arguments, which expands inline
into the wrapper code for a system call. It should be used when size
@@ -206,41 +206,41 @@
# undef INLINE_SYSCALL_TYPES
# define INLINE_SYSCALL_TYPES(name, nr, args...) \
({ \
- unsigned long int resultvar = INTERNAL_SYSCALL_TYPES (name, , nr, args); \
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (resultvar, ))) \
+ unsigned long int _sc_ret = INTERNAL_SYSCALL_TYPES (name, , nr, args); \
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (_sc_ret, ))) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, )); \
- resultvar = (unsigned long int) -1; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sc_ret, )); \
+ _sc_ret = (unsigned long int) -1; \
} \
- (long int) resultvar; })
+ (long int) _sc_ret; })
# undef INTERNAL_SYSCALL_DECL
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ \
- unsigned long int resultvar; \
+ unsigned long int _sc_ret; \
LOAD_ARGS_##nr (args) \
LOAD_REGS_##nr \
asm volatile ( \
"syscall\n\t" \
- : "=a" (resultvar) \
+ : "=a" (_sc_ret) \
: "0" (name) ASM_ARGS_##nr : "memory", "cc", "r11", "cx"); \
- (long int) resultvar; })
+ (long int) _sc_ret; })
# undef INTERNAL_SYSCALL
# define INTERNAL_SYSCALL(name, err, nr, args...) \
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
# define INTERNAL_SYSCALL_NCS_TYPES(name, err, nr, args...) \
({ \
- unsigned long int resultvar; \
+ unsigned long int _sc_ret; \
LOAD_ARGS_TYPES_##nr (args) \
LOAD_REGS_TYPES_##nr (args) \
asm volatile ( \
"syscall\n\t" \
- : "=a" (resultvar) \
+ : "=a" (_sc_ret) \
: "0" (name) ASM_ARGS_##nr : "memory", "cc", "r11", "cx"); \
- (long int) resultvar; })
+ (long int) _sc_ret; })
# undef INTERNAL_SYSCALL_TYPES
# define INTERNAL_SYSCALL_TYPES(name, err, nr, args...) \
INTERNAL_SYSCALL_NCS_TYPES (__NR_##name, err, nr, ##args)
---