From ffb514575f5689a871575847702b6e7a02e1b632 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 7 Apr 2020 08:43:20 -0700 Subject: [PATCH 2/2] x32: Use cast_to_unsigned_integer for syscall arguments --- sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h b/sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h index fd9f14d566..b85c85b713 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h +++ b/sysdeps/unix/sysv/linux/x86_64/x32/syscall_types.h @@ -19,18 +19,12 @@ #ifndef _SYSCALL_TYPES_H #define _SYSCALL_TYPES_H -#include +#include typedef long long int __syscall_arg_t; /* Syscall arguments for x32 follows x86_64 ABI, however pointers are 32 bits should be zero extended. */ -#define __SSC(__x) \ - ({ \ - __syscall_arg_t __arg = sizeof (1 ? (__x) : 0ULL) < 8 \ - ? (unsigned long int) (uintptr_t)(__x) \ - : (__syscall_arg_t) (__typeof__ ((__x) - (__x))) (__x); \ - __arg; \ - }) +#define __SSC(__x) ((__syscall_arg_t) cast_to_unsigned_integer (__x)) #endif -- 2.25.2