summaryrefslogtreecommitdiff
path: root/modules/passfd
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-04-21 11:48:22 -0600
committerEric Blake <eblake@redhat.com>2011-04-21 14:35:52 -0600
commite55355319eb5409871be533d7b9713328a8283db (patch)
treeaffc1bab1253735ca8ddff892b9b7b1ef99db42b /modules/passfd
parent06d76f63c628cb1653f3c27a1f60a46cf44665ba (diff)
downloadgnulib-e55355319eb5409871be533d7b9713328a8283db.tar.gz
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>
Diffstat (limited to 'modules/passfd')
-rw-r--r--modules/passfd6
1 files changed, 2 insertions, 4 deletions
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