Introduce HAVE_STRUCT_TCB_EXT_ARG macro
Check for "if HAVE_STRUCT_TCB_EXT_ARG" instead of
"if defined LINUX_MIPSN32 || defined X32".
* defs.h (HAVE_STRUCT_TCB_EXT_ARG): Define for LINUX_MIPSN32 || X32.
(struct tcb): Check it instead of LINUX_MIPSN32 || X32.
(RVAL_LUDECIMAL): Likewise.
* io.c (print_lld_from_low_high_val): Likewise.
* lseek.c (SYS_FUNC(lseek)): Likewise.
* mem.c (SYS_FUNC(mmap)): Likewise.
* syscall.c (trace_syscall_exiting): Likewise.
* util.c (getllval): Likewise.
diff --git a/util.c b/util.c
index ea2e869..bb23eeb 100644
--- a/util.c
+++ b/util.c
@@ -257,16 +257,16 @@
# endif /* SUPPORTED_PERSONALITIES > 1 */
#elif SIZEOF_LONG > 4
# error Unsupported configuration: SIZEOF_LONG > 4 && SIZEOF_LONG_LONG > SIZEOF_LONG
-#elif defined LINUX_MIPSN32
- *val = tcp->ext_arg[arg_no];
- arg_no++;
-#elif defined X32
- if (current_personality == 0) {
- *val = tcp->ext_arg[arg_no];
- arg_no++;
- } else {
+#elif HAVE_STRUCT_TCB_EXT_ARG
+# if SUPPORTED_PERSONALITIES > 1
+ if (current_personality == 1) {
*val = LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]);
arg_no += 2;
+ } else
+# endif
+ {
+ *val = tcp->ext_arg[arg_no];
+ arg_no++;
}
#else
# if defined __ARM_EABI__ || \