This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Use better variable names in MIPS syscall macros [committed]
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Wed, 03 Jun 2015 09:05:02 -0400
- Subject: Re: Use better variable names in MIPS syscall macros [committed]
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1506022039200 dot 2704 at digraph dot polyomino dot org dot uk>
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.