This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use better variable names in MIPS syscall macros [committed]


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]