From: John Hughes Date: Thu, 8 Mar 2001 14:40:06 +0000 (+0000) Subject: replace wimpy get64 by powerful LONG_LONG :-) X-Git-Tag: v4.5.18~1080 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c79e01d74a05476f90eb4815882181fecabe3f5;p=strace replace wimpy get64 by powerful LONG_LONG :-) --- diff --git a/ChangeLog b/ChangeLog index abcafa0b..a2320b16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-03-08 John Hughes + + * 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 * acconfig.h: new #defines HAVE_LONG_LONG_OFF_T and HAVE_LONG_LONG_RLIM_T. diff --git a/defs.h b/defs.h index 1b967ccc..d97978ab 100644 --- 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 678b6d9c..e618b036 100644 --- 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 4bb00025..d38d1fe3 100644 --- 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 85f80a12..92526cd9 100644 --- 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; }