]> granicus.if.org Git - strace/commitdiff
2007-08-05 Jan Kratochvil <jan.kratochvil@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 7 Aug 2007 01:05:19 +0000 (01:05 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 7 Aug 2007 01:05:19 +0000 (01:05 +0000)
* file.c (printstat64): Test [HAVE_LONG_LONG] for st_size printing
and cast to widest type available.

file.c

diff --git a/file.c b/file.c
index 22a8260ce70e9cfd4f5b3733cc0a18441cf8e79e..6e6b30670e3d33efbe37ecc009e9837b7cadd5d5 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1061,7 +1061,11 @@ long addr;
 #endif /* !HAVE_STRUCT_STAT_ST_RDEV */
                break;
        default:
-               tprintf("st_size=%llu, ", statbuf.st_size);
+#ifdef HAVE_LONG_LONG
+               tprintf("st_size=%llu, ", (unsigned long long) statbuf.st_size);
+#else
+               tprintf("st_size=%lu, ", (unsigned long) statbuf.st_size);
+#endif
                break;
        }
        if (!abbrev(tcp)) {