printfd(tcp, tcp->u_arg[0]);
long long offset;
-# if SUPPORTED_PERSONALITIES > 1
+# ifndef current_klongsize
/* tcp->ext_arg is not initialized for compat personality */
- if (current_personality == 1) {
- offset = tcp->u_arg[1];
+ if (current_klongsize < sizeof(*tcp->ext_arg)) {
+ offset = (long) tcp->u_arg[1];
} else
-# endif
+# endif /* !current_klongsize */
{
offset = tcp->ext_arg[1];
}
printfd(tcp, tcp->u_arg[0]);
long offset =
-# if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
-# ifdef X86_64
- current_personality == 1 ?
- (long)(int) tcp->u_arg[1] : tcp->u_arg[1];
-# else
- current_wordsize == 4 ?
- (long)(int) tcp->u_arg[1] : tcp->u_arg[1];
-# endif
+# ifndef current_klongsize
+ current_klongsize < sizeof(long) ?
+ (long) (int) tcp->u_arg[1] : (long) tcp->u_arg[1];
# else
tcp->u_arg[1];
# endif
#endif
/* llseek syscall takes explicitly two ulong arguments hi, lo,
- * rather than one 64-bit argument for which LONG_LONG works
+ * rather than one 64-bit argument for which ULONG_LONG works
* appropriate for the native byte order.
*
* See kernel's fs/read_write.c::SYSCALL_DEFINE5(llseek, ...)
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", %lld, ",
- (widen_to_ull(tcp->u_arg[1]) << 32)
- | widen_to_ull(tcp->u_arg[2]));
+ (zero_extend_signed_to_ull(tcp->u_arg[1]) << 32)
+ | zero_extend_signed_to_ull(tcp->u_arg[2]));
} else {
printnum_int64(tcp, tcp->u_arg[3], "%" PRIu64);
tprints(", ");