Use better variable names in MIPS syscall macros [committed]
Carlos O'Donell
carlos@redhat.com
Wed Jun 3 13:21:00 GMT 2015
On 06/02/2015 04:39 PM, Joseph Myers wrote:
> Carlos noted in
> <https://sourceware.org/ml/libc-alpha/2015-05/msg00680.html> that
> various ports use potentially problematic short variables names in
> their syscall macros, which could shadow variables with the same name
> from containing scopes.
>
> This patch fixes variables called err and ret in MIPS macros. (I left
> result_var and _sys_result - separate variables in different macros,
> which need separate names - alone.)
>
> Tested for mips64 (all three ABIs) that installed stripped shared
> libraries are unchanged by this patch. Committed.
>
> 2015-06-02 Joseph Myers <joseph@codesourcery.com>
>
> * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (INLINE_SYSCALL):
> Use variable name _sc_err instead of err.
> [__mips16] (INTERNAL_SYSCALL_NCS): Use variable name _sc_ret
> instead of ret.
> * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
> (INLINE_SYSCALL): Use variable name _sc_err instead of err.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
> (INLINE_SYSCALL): Likewise.
Thanks for this, I actually have a blanket change to make all sysdeps
use _sc_ret and _sc_err for consistency. I'll post that shortly today.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list