]> granicus.if.org Git - strace/commitdiff
2006-10-14 Dmitry V. Levin <ldv@altlinux.org>
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 14 Oct 2006 20:20:46 +0000 (20:20 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 14 Oct 2006 20:20:46 +0000 (20:20 +0000)
* configure.ac(AC_CHECK_HEADERS): Add inttypes.h.
* file.c [_LFS64_LARGEFILE && (LINUX || SVR4)]:
Include <inttypes.h>.
(sys_getdents64): Use PRIu64/PRId64 to avoid gcc warnings on
64-bit platforms.

ChangeLog
configure.ac
file.c

index cf9ee1a5612bcfd91037a23afe940a70cd2ca7fe..26f63dfc9bd5503b7098d99540903d5fde926185 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-10-14  Dmitry V. Levin  <ldv@altlinux.org>
 
+       * configure.ac(AC_CHECK_HEADERS): Add inttypes.h.
+       * file.c [_LFS64_LARGEFILE && (LINUX || SVR4)]:
+       Include <inttypes.h>.
+       (sys_getdents64): Use PRIu64/PRId64 to avoid gcc warnings on
+       64-bit platforms.
+
        * strace.c (main): Check getcwd() return code.
 
 2006-10-13  Ulrich Drepper  <drepper@redhat.com>
index 43b71b09d45d6b36ebc01e29ed9282462214f8aa..f91e652b6797065ce36545348d4d7f65434d6ec5 100644 (file)
@@ -192,7 +192,7 @@ AC_CHECK_LIB(nsl, main)
 fi
 
 AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname)
-AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h  poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h libaio.h], [], [])
+AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h libaio.h inttypes.h], [], [])
 AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
                  [], [], [#include <linux/socket.h>])
 AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
diff --git a/file.c b/file.c
index 62cc536b035af4f52421356c3c1be785ff64ccdf..cb0c53595525538d81d5ea78c1ec1ad84ed4a9e6 100644 (file)
--- a/file.c
+++ b/file.c
@@ -168,6 +168,15 @@ struct stat_sparc64 {
 #include <sys/stat.h>
 #endif
 
+#if _LFS64_LARGEFILE && (defined(LINUX) || defined(SVR4))
+# ifdef HAVE_INTTYPES_H
+#  include <inttypes.h>
+# else
+#  define PRId64 "lld"
+#  define PRIu64 "llu"
+# endif
+#endif
+
 #if HAVE_LONG_LONG_OFF_T
 /*
  * Ugly hacks for systems that have typedef long long off_t
@@ -2351,7 +2360,7 @@ struct tcb *tcp;
                struct dirent64 *d = (struct dirent64 *) &buf[i];
 #if defined(LINUX) || defined(SVR4)
                if (!abbrev(tcp)) {
-                       tprintf("%s{d_ino=%llu, d_off=%llu, ",
+                       tprintf("%s{d_ino=%" PRIu64 ", d_off=%" PRId64 ", ",
                                i ? " " : "",
                                d->d_ino,
                                d->d_off);