Hash :
e5535531
Author :
Date :
2011-04-21T11:48:22
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 <sys/un.h>. (sendfd, recvfd): Update preprocessor checks. * modules/passfd (Files): Reflect rename, and drop unused file. (Depends-on): Drop unused dependency. Signed-off-by: Eric Blake <eblake@redhat.com>
Description:
Pass file descriptors along Unix domain sockets
Files:
lib/passfd.h
lib/passfd.c
m4/passfd.m4
Depends-on:
cloexec
sys_socket
socketlib
configure.ac:
gl_PASSFD
Makefile.am:
lib_SOURCES += passfd.c
Include:
"passfd.h"
Link:
$(LIBSOCKET)
License:
LGPLv2+
Maintainer:
Bastien ROUCARIÈS