summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorJoe Shaw <joeshaw@novell.com>2003-03-01 20:50:18 +0000
committerJoe Shaw <joeshaw@novell.com>2003-03-01 20:50:18 +0000
commite0db9aa1f9521d8115d95bc17690337e25b95ab2 (patch)
tree3aead73451efe526b37cc39827bfeae892c71ba8 /configure.in
parent83087f783bb067e0809a6648a8bdb14e8e49efbf (diff)
2003-03-01 Joe Shaw <joe@ximian.com>
* configure.in: Check for "struct cmsgcred" and try to access its members for BSD-like unices. * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into _dbus_read_credentials_unix_socket(). (_dbus_read_credentials_unix_socket): Use recvmsg() instead of read() for reading the credential byte off the unix socket. Use struct cmsgcred on systems that support it.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 9b969bad..86db3cfc 100644
--- a/configure.in
+++ b/configure.in
@@ -200,6 +200,21 @@ if test x$dbus_have_gnuc_varargs = xyes; then
AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
fi
+dnl Check for various credentials.
+AC_MSG_CHECKING(for struct cmsgcred)
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+],[
+struct cmsgcred cred;
+
+cred.cmcred_pid = 0;
+],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
+AC_MSG_RESULT($dbus_have_struct_cmsgcred)
+
+if test x$dbus_have_struct_cmsgcred = xyes; then
+ AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
+fi
DBUS_CLIENT_CFLAGS=
DBUS_CLIENT_LIBS=