From: Lennart Poettering Date: Wed, 22 Apr 2009 01:05:39 +0000 (+0200) Subject: sysdeps-unix: if MSG_NOSIGNAL is available don't touch SIGPIPE by default X-Git-Tag: dbus-1.3.0~4^2~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03d50fbd77481568bb2127d8b92e22d2cdc61ab8;p=thirdparty%2Fdbus.git sysdeps-unix: if MSG_NOSIGNAL is available don't touch SIGPIPE by default If we can use MSG_NOSIGNAL we don't have to play games with SIGPIPE --- diff --git a/configure.in b/configure.in index 9e047eaee..88d2164c6 100644 --- a/configure.in +++ b/configure.in @@ -769,6 +769,9 @@ AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)]) dnl needed on darwin for NAME_MAX AC_CHECK_HEADERS(sys/syslimits.h) +dnl Make it easy to check if we have MSG_NOSIGNAL without actually having to include sys/socket.h +AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [[ #include ]]) + dnl check for flavours of varargs macros (test from GLib) AC_MSG_CHECKING(for ISO C99 varargs macros in C) AC_TRY_COMPILE([],[ diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index 947c0afee..afa0ca6ac 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -223,7 +223,11 @@ struct DBusPreallocatedSend DBusList *counter_link; /**< Preallocated link in the resource counter */ }; +#ifdef HAVE_DECL_MSG_NOSIGNAL +static dbus_bool_t _dbus_modify_sigpipe = FALSE; +#else static dbus_bool_t _dbus_modify_sigpipe = TRUE; +#endif /** * Implementation details of DBusConnection. All fields are private.