]> granicus.if.org Git - strace/commitdiff
replace wimpy get64 by powerful LONG_LONG :-)
authorJohn Hughes <john@Calva.COM>
Thu, 8 Mar 2001 14:40:06 +0000 (14:40 +0000)
committerJohn Hughes <john@Calva.COM>
Thu, 8 Mar 2001 14:40:06 +0000 (14:40 +0000)
ChangeLog
defs.h
file.c
io.c
mem.c

index abcafa0b068c6f43440509db5f43edbb4cdf800d..a2320b16a9e6351f8f6be8d6fce4bedfd53f57d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-03-08  John Hughes <john@Calva.COM>
+
+  * defs.h: rename wimpy get64 as powerful new LONG_LONG
+  * file.c: use LONG_LONG
+  * io.c: use LONG_LONG
+  * mem.c use LONG_LONG
+
 2001-03-08  John Hughes <john@Calva.COM>
 
   * acconfig.h: new #defines HAVE_LONG_LONG_OFF_T and HAVE_LONG_LONG_RLIM_T.
diff --git a/defs.h b/defs.h
index 1b967ccc83b6ea7d42e62b1684bb4b899d284a8f..d97978ab006dcd1ffd838711d535c969bbea4e07 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -509,7 +509,7 @@ do {                                                                        \
 #define ALIGN64(tcp,arg) do { } while (0)
 #endif
 
-#if _LFS64_LARGEFILE || FREEBSD
+#if HAVE_LONG_LONG
 
 /* _l refers to the lower numbered u_arg,
  * _h refers to the higher numbered u_arg
@@ -520,15 +520,16 @@ do {                                                                      \
  * if not we'll have to figure out how which of the other versions to use.
  */
 
-#define get64(_l,_h) (*(long long *) &(_l))
+#define LONG_LONG(_l,_h) (*(long long *) &(_l))
 
 #else
 
 #if _LITTLE_ENDIAN
-#define get64(_l,_h) ((long long)((unsigned long long)(_l) | ((unsigned long long)(_h)<<32)))
+#define LONG_LONG(_l,_h) \
+    ((long long)((unsigned long long)(_l) | ((unsigned long long)(_h)<<32)))
 #else
-#define get64(_l,_h) ((long long)((unsigned long long)(_h) | ((unsigned long long)(_l)<<32)))
+#define LONG_LONG(_l,_h) \
+    ((long long)((unsigned long long)(_h) | ((unsigned long long)(_l)<<32)))
 #endif
 #endif
 #endif
-
diff --git a/file.c b/file.c
index 678b6d9c112e1006f37a2b08dd1a3d09c0c067e5..e618b0360cf8061beb5740d29127a0204df6a078 100644 (file)
--- a/file.c
+++ b/file.c
@@ -424,7 +424,7 @@ struct tcb *tcp;
        if (entering(tcp)) {
                long long offset;
                ALIGN64 (tcp, 1);       /* FreeBSD aligns off_t args */
-               offset = get64(tcp->u_arg [1], tcp->u_arg[2]);
+               offset = LONG_LONG(tcp->u_arg [1], tcp->u_arg[2]);
                if (tcp->u_arg[3] == SEEK_SET)
                        tprintf("%ld, %llu, ", tcp->u_arg[0], offset);
                else
@@ -456,7 +456,7 @@ struct tcb *tcp;
        if (entering(tcp)) {
                ALIGN64 (tcp, 1);
                printpath(tcp, tcp->u_arg[0]);
-               tprintf(", %llu", get64(tcp->u_arg[1],tcp->u_arg[2]));
+               tprintf(", %llu", LONG_LONG(tcp->u_arg[1],tcp->u_arg[2]));
        }
        return 0;
 }
@@ -482,7 +482,7 @@ struct tcb *tcp;
        if (entering(tcp)) {
                ALIGN64 (tcp, 1);
                tprintf("%ld, %llu", tcp->u_arg[0],
-                       get64(tcp->u_arg[1] ,tcp->u_arg[2]));
+                       LONG_LONG(tcp->u_arg[1] ,tcp->u_arg[2]));
        }
        return 0;
 }
diff --git a/io.c b/io.c
index 4bb0002530b5647bbb5b71633be5a41689b37695..d38d1fe3fb5f62eeadc5e6bdac052adf65dbea80 100644 (file)
--- a/io.c
+++ b/io.c
@@ -292,7 +292,7 @@ struct tcb *tcp;
                else
                        printstr(tcp, tcp->u_arg[1], tcp->u_rval);
                tprintf(", %lu, %#llx", tcp->u_arg[2],
-                       get64(tcp->u_arg[3], tcp->u_arg[4]));
+                       LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
        }
        return 0;
 }
@@ -306,7 +306,7 @@ struct tcb *tcp;
                tprintf("%ld, ", tcp->u_arg[0]);
                printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
                tprintf(", %lu, %#llx", tcp->u_arg[2],
-                       get64(tcp->u_arg[3], tcp->u_arg[4]));
+                       LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
        }
        return 0;
 }
diff --git a/mem.c b/mem.c
index 85f80a12af6851b2c2e2d215414d89eb243e429f..92526cd901d9fd5f9caeb058a9ea3b5ec247e4ae 100644 (file)
--- a/mem.c
+++ b/mem.c
@@ -275,7 +275,7 @@ struct tcb *tcp;
                /* fd */
                tprintf(", %ld, ", u_arg[4]);
                /* offset */
-               tprintf("%#llx", get64(u_arg[5], u_arg[6]));
+               tprintf("%#llx", LONG_LONG(u_arg[5], u_arg[6]));
        }
        return RVAL_HEX;
 }