From e55355319eb5409871be533d7b9713328a8283db Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 21 Apr 2011 11:48:22 -0600 Subject: passfd: speed up configure and drop unused code Ultimately, it would be nice to provide a sendmsg and recvmsg module, and have those provide a replacement struct msghdr and silently convert msg_accrights into the replacement struct's msg_control, when targeting older BSD. But until that point in time, this is a nice cleanup. SCM_RIGHTS really only works on Unix sockets; however, there is nothing in passfd.c that needs to be hard-coded to this (rather, the hard-coding of the address family is done externally when the socket or socketpair is created). * m4/afunix.m4 (gl_SOCKET_AFUNIX): Rename... * m4/passfd.m4 (gl_PASSFD): ...to something more fitting of its use. Drop test for setting unused HAVE_UNIXSOCKET_SCM_RIGHTS. Instead of probing at configure for unix_scm_rights_bsd44_way, instead probe for CMSG_FIRSTHDR at compile time. Simplify BSD 4.3 check to a struct member probe. * lib/passfd.c (includes): Nothing here requires . (sendfd, recvfd): Update preprocessor checks. * modules/passfd (Files): Reflect rename, and drop unused file. (Depends-on): Drop unused dependency. Signed-off-by: Eric Blake --- modules/passfd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/passfd') diff --git a/modules/passfd b/modules/passfd index 74ef4102c4..b3d8a3c022 100644 --- a/modules/passfd +++ b/modules/passfd @@ -4,17 +4,15 @@ Pass file descriptors along Unix domain sockets Files: lib/passfd.h lib/passfd.c -m4/afunix.m4 -m4/sockpfaf.m4 +m4/passfd.m4 Depends-on: cloexec sys_socket socketlib -extensions configure.ac: -gl_SOCKET_AFUNIX +gl_PASSFD Makefile.am: lib_SOURCES += passfd.c -- cgit v1.2.1