]> granicus.if.org Git - strace/commitdiff
2004-10-19 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 19 Oct 2004 22:59:55 +0000 (22:59 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 19 Oct 2004 22:59:55 +0000 (22:59 +0000)
* file.c (sys_llseek): Revert last change.

file.c

diff --git a/file.c b/file.c
index 2f1275a47094e7bc92042232c592b86a2e684e14..8496ab0435e834550d8a7dfc58829368418195ef 100644 (file)
--- a/file.c
+++ b/file.c
@@ -431,12 +431,19 @@ sys_llseek (tcp)
 struct tcb *tcp;
 {
     if (entering(tcp)) {
+       /*
+        * This one call takes explicitly two 32-bit arguments hi, lo,
+        * rather than one 64-bit argument for which LONG_LONG works
+        * appropriate for the native byte order.
+        */
        if (tcp->u_arg[4] == SEEK_SET)
            tprintf("%ld, %llu, ", tcp->u_arg[0],
-                   LONG_LONG(tcp->u_arg[1], tcp->u_arg[2]));
+                   (((long long int) tcp->u_arg[1]) << 32
+                    | (unsigned long long) (unsigned) tcp->u_arg[2]));
        else
            tprintf("%ld, %lld, ", tcp->u_arg[0],
-                   LONG_LONG(tcp->u_arg[1], tcp->u_arg[2]));
+                   (((long long int) tcp->u_arg[1]) << 32
+                    | (unsigned long long) (unsigned) tcp->u_arg[2]));
     }
     else {
        long long int off;