From: Dmitry V. Levin Date: Fri, 21 Nov 2014 20:46:16 +0000 (+0000) Subject: Include unconditionally X-Git-Tag: v4.10~359 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2fa2beedc603a17ed7afaa32b80180e54b901f1;p=strace Include unconditionally Since is standardized by POSIX and is present in all available versions of glibc, it's safe to assume that any usable libc implementation provides this header file. * configure.ac (AC_CHECK_HEADERS): Remove sys/uio.h. * io.c: Include unconditionally. (tprint_iov_upto, tprint_iov, sys_readv, sys_writev, print_llu_from_low_high_val, sys_preadv, sys_pwritev): Define unconditionally. * net.c: Include unconditionally. * util.c: Include unconditionally. (dumpiov): Define unconditionally. --- diff --git a/configure.ac b/configure.ac index f55af46f..f9b056d5 100644 --- a/configure.ac +++ b/configure.ac @@ -250,7 +250,6 @@ AC_CHECK_HEADERS(m4_normalize([ sys/poll.h sys/ptrace.h sys/reg.h - sys/uio.h sys/vfs.h ])) AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h], diff --git a/io.c b/io.c index 7238a8fa..87bdbba8 100644 --- a/io.c +++ b/io.c @@ -30,9 +30,7 @@ #include "defs.h" #include -#if HAVE_SYS_UIO_H -# include -#endif +#include int sys_read(struct tcb *tcp) @@ -62,7 +60,6 @@ sys_write(struct tcb *tcp) return 0; } -#if HAVE_SYS_UIO_H /* * data_size limits the cumulative size of printed data. * Example: recvmsg returing a short read. @@ -174,7 +171,6 @@ sys_writev(struct tcb *tcp) } return 0; } -#endif /* The SH4 ABI does allow long longs in odd-numbered registers, but does not allow them to be split between registers and memory - and @@ -217,8 +213,6 @@ sys_pwrite(struct tcb *tcp) return 0; } -#if HAVE_SYS_UIO_H - static void print_llu_from_low_high_val(struct tcb *tcp, int arg) { @@ -268,7 +262,6 @@ sys_pwritev(struct tcb *tcp) } return 0; } -#endif /* HAVE_SYS_UIO_H */ static void print_off_t(struct tcb *tcp, long addr) diff --git a/net.c b/net.c index f3f102e4..3bf0a9b4 100644 --- a/net.c +++ b/net.c @@ -31,6 +31,7 @@ #include "defs.h" #include #include +#include #include #if defined(HAVE_SIN6_SCOPE_ID_LINUX) # define in6_addr in6_addr_libc @@ -78,9 +79,6 @@ # endif #endif -#if defined(HAVE_SYS_UIO_H) -# include -#endif #if defined(HAVE_LINUX_NETLINK_H) # include #endif diff --git a/util.c b/util.c index b13f3dc6..e05efcd8 100644 --- a/util.c +++ b/util.c @@ -35,9 +35,7 @@ #include #include #include -#if HAVE_SYS_UIO_H -# include -#endif +#include #if defined(IA64) # include @@ -699,7 +697,6 @@ printstr(struct tcb *tcp, long addr, long len) tprints("..."); } -#if HAVE_SYS_UIO_H void dumpiov(struct tcb *tcp, int len, long addr) { @@ -747,7 +744,6 @@ dumpiov(struct tcb *tcp, int len, long addr) #undef iov_iov_len #undef iov } -#endif void dumpstr(struct tcb *tcp, long addr, int len)