summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-02-21 16:14:08 +0100
committerVolker Lendecke <vl@samba.org>2008-02-29 09:47:53 +0100
commit18206a4cb52fba13253339c1b166d3df27345380 (patch)
tree2356f3ab606b12b4b7d40b890c8b0a69f612a9d1 /source3/configure.in
parentbab27a2ff2600ebfba244cc18a07658ded1ef312 (diff)
downloadsamba-18206a4cb52fba13253339c1b166d3df27345380.tar.gz
samba-18206a4cb52fba13253339c1b166d3df27345380.tar.bz2
samba-18206a4cb52fba13253339c1b166d3df27345380.zip
Add vfs_aio_fork
This is used for two purposes: First, I'm using it to test the async I/O code. In the forked process it is pretty easy to delay a reply for a random amount of time. See the BUILD_FARM_HACKS snippet. Second, there are systems around that claim to have Posix AIO but which is broken. This might be some help for those systems. Also add tests how to pass file descriptors (This used to be commit b0e52cecf2009d4c7f29412dadf17910e54e4327)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in51
1 files changed, 51 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 5de8a289db..495da90c33 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -809,6 +809,56 @@ if test x"$samba_cv_unixsocket" = x"yes"; then
AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixsocket support])
fi
+#############################################
+# check for fd passing struct via msg_control
+AC_CACHE_CHECK([for fd passing via msg_control],samba_cv_msghdr_msg_control, [
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <sys/socket.h>
+#include <sys/un.h>],
+[
+ struct msghdr msg;
+ union {
+ struct cmsghdr cm;
+ char control[CMSG_SPACE(sizeof(int))];
+ } control_un;
+ msg.msg_control = control_un.control;
+ msg.msg_controllen = sizeof(control_un.control);
+],
+ samba_cv_msghdr_msg_control=yes,samba_cv_msghdr_msg_control=no)])
+if test x"$samba_cv_msghdr_msg_control" = x"yes"; then
+ AC_DEFINE(HAVE_MSGHDR_MSG_CONTROL,1,
+ [If we can use msg_control for passing file descriptors])
+fi
+
+#############################################
+# check for fd passing struct via msg_acctrights
+AC_CACHE_CHECK([for fd passing via msg_acctrights],
+ samba_cv_msghdr_msg_acctrights, [
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <sys/socket.h>
+#include <sys/un.h>],
+[
+ struct msghdr msg;
+ int fd;
+ msg.msg_acctrights = (caddr_t) &fd;
+ msg.msg_acctrightslen = sizeof(fd);
+],
+ samba_cv_msghdr_msg_acctrights=yes,samba_cv_msghdr_msg_acctrights=no)])
+if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then
+ AC_DEFINE(HAVE_MSGHDR_MSG_ACCTRIGHTS,1,
+ [If we can use msg_acctrights for passing file descriptors])
+fi
+
+if test x"$samba_cv_msghdr_msg_control" = x"yes" -o \
+ x"$samba_cv_msghdr_msg_acctright" = x"yes"; then
+ default_shared_modules="$default_shared_modules vfs_aio_fork"
+fi
AC_CACHE_CHECK([for sig_atomic_t type],samba_cv_sig_atomic_t, [
AC_TRY_COMPILE([
@@ -6038,6 +6088,7 @@ SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), "bin/gpfs.$SHLIBEXT", VFS)
SMB_MODULE(vfs_readahead, \$(VFS_READAHEAD_OBJ), "bin/readahead.$SHLIBEXT", VFS)
SMB_MODULE(vfs_tsmsm, \$(VFS_TSMSM_OBJ), "bin/tsmsm.$SHLIBEXT", VFS)
SMB_MODULE(vfs_fileid, \$(VFS_FILEID_OBJ), "bin/fileid.$SHLIBEXT", VFS)
+SMB_MODULE(vfs_aio_fork, \$(VFS_AIO_FORK_OBJ), "bin/aio_fork.$SHLIBEXT", VFS)
SMB_MODULE(vfs_syncops, \$(VFS_SYNCOPS_OBJ), "bin/syncops.$SHLIBEXT", VFS)
SMB_MODULE(vfs_zfsacl, \$(VFS_ZFSACL_OBJ), "bin/zfsacl.$SHLIBEXT", VFS)
SMB_MODULE(vfs_notify_fam, \$(VFS_NOTIFY_FAM_OBJ), "bin/notify_fam.$SHLIBEXT", VFS)