From: Dmitry V. Levin Date: Sat, 14 Oct 2006 20:20:46 +0000 (+0000) Subject: 2006-10-14 Dmitry V. Levin X-Git-Tag: v4.5.18~265 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f336e59aa4a8afafcaede0580d8aa8572bb8679;p=strace 2006-10-14 Dmitry V. Levin * configure.ac(AC_CHECK_HEADERS): Add inttypes.h. * file.c [_LFS64_LARGEFILE && (LINUX || SVR4)]: Include . (sys_getdents64): Use PRIu64/PRId64 to avoid gcc warnings on 64-bit platforms. --- diff --git a/ChangeLog b/ChangeLog index cf9ee1a5..26f63dfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-10-14 Dmitry V. Levin + * configure.ac(AC_CHECK_HEADERS): Add inttypes.h. + * file.c [_LFS64_LARGEFILE && (LINUX || SVR4)]: + Include . + (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 diff --git a/configure.ac b/configure.ac index 43b71b09..f91e652b 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ]) AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include ]) diff --git a/file.c b/file.c index 62cc536b..cb0c5359 100644 --- a/file.c +++ b/file.c @@ -168,6 +168,15 @@ struct stat_sparc64 { #include #endif +#if _LFS64_LARGEFILE && (defined(LINUX) || defined(SVR4)) +# ifdef HAVE_INTTYPES_H +# include +# 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);