]> granicus.if.org Git - strace/commitdiff
Assume that libc provides sendmsg
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 18 Nov 2015 23:18:17 +0000 (23:18 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 18 Nov 2015 23:18:17 +0000 (23:18 +0000)
Starting with commit v4.6-281-g7af9f35, we implicitly assume that
HAVE_SENDMSG is always defined.  Therefore, the check for sendmsg
availability is redundant and could be safely removed.

* configure.ac (AC_CHECK_FUNCS): Remove sendmsg.
* linux/dummy.h [!HAVE_SENDMSG] (sys_recvmsg, sys_sendmsg): Remove
stub aliases.
* net.c [HAVE_SENDMSG]: Define unconditionally.
* syscall.c (dumpio) [HAVE_SENDMSG]: Likewise.

configure.ac
linux/dummy.h
net.c
syscall.c

index 334dd6f3e6e00cda1470f444e18672a2f09455c5..9a1134e96d197dd5044575a7e08e2763131a47f8 100644 (file)
@@ -249,7 +249,6 @@ AC_CHECK_FUNCS(m4_normalize([
        preadv
        process_vm_readv
        pwritev
-       sendmsg
        sendmmsg
        sigaction
        signalfd
index ca76d0af03ead5b079f3db549645becb10111b26..356ece2e0c60fb8ebef89d9bdd8dee47bec1de9c 100644 (file)
 #define        sys_oldolduname         printargs
 #define        sys_olduname            printargs
 
-/* no library support */
-#ifndef HAVE_SENDMSG
-#define        sys_recvmsg             printargs
-#define        sys_sendmsg             printargs
-#endif
-
 /* Who has STREAMS syscalls?
  * Linux hasn't. Solaris has (had?).
  * Just in case I miss something, retain in for Sparc.
diff --git a/net.c b/net.c
index 59cbe93eb47e6f94e4d1120ac597d4ab9d8b39b4..74ea37f3552245d77860102460bd83771617f2e6 100644 (file)
--- a/net.c
+++ b/net.c
@@ -289,8 +289,7 @@ printsock(struct tcb *tcp, long addr, int addrlen)
        tprints("}");
 }
 
-#ifdef HAVE_SENDMSG
-# include "xlat/scmvals.h"
+#include "xlat/scmvals.h"
 
 #if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
 struct cmsghdr32 {
@@ -617,7 +616,6 @@ dumpiov_in_mmsghdr(struct tcb *tcp, long addr)
                }
        }
 }
-#endif /* HAVE_SENDMSG */
 
 /*
  * low bits of the socket type define real socket type,
@@ -765,8 +763,6 @@ SYS_FUNC(sendto)
        return RVAL_DECODED;
 }
 
-#ifdef HAVE_SENDMSG
-
 SYS_FUNC(sendmsg)
 {
        printfd(tcp, tcp->u_arg[0]);
@@ -797,8 +793,6 @@ SYS_FUNC(sendmmsg)
        return 0;
 }
 
-#endif /* HAVE_SENDMSG */
-
 SYS_FUNC(recv)
 {
        if (entering(tcp)) {
@@ -851,8 +845,6 @@ SYS_FUNC(recvfrom)
        return 0;
 }
 
-#ifdef HAVE_SENDMSG
-
 SYS_FUNC(recvmsg)
 {
        if (entering(tcp)) {
@@ -913,8 +905,6 @@ SYS_FUNC(recvmmsg)
        }
 }
 
-#endif /* HAVE_SENDMSG */
-
 #include "xlat/shutdown_modes.h"
 
 SYS_FUNC(shutdown)
index d4599e40e965784985725042c5dda96f60e5a739..bff00c918c63412cd7b953f35d8336a06f1dde69 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -695,14 +695,12 @@ dumpio(struct tcb *tcp)
                case SEN_readv:
                        dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
                        return;
-#ifdef HAVE_SENDMSG
                case SEN_recvmsg:
                        dumpiov_in_msghdr(tcp, tcp->u_arg[1]);
                        return;
                case SEN_recvmmsg:
                        dumpiov_in_mmsghdr(tcp, tcp->u_arg[1]);
                        return;
-#endif
                }
        }
        if (qual_flags[tcp->u_arg[0]] & QUAL_WRITE) {
@@ -716,14 +714,12 @@ dumpio(struct tcb *tcp)
                case SEN_writev:
                        dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
                        break;
-#ifdef HAVE_SENDMSG
                case SEN_sendmsg:
                        dumpiov_in_msghdr(tcp, tcp->u_arg[1]);
                        break;
                case SEN_sendmmsg:
                        dumpiov_in_mmsghdr(tcp, tcp->u_arg[1]);
                        break;
-#endif
                }
        }
 }