[PATCH] sysdeps-unix: use MSG_NOSIGNAL when sending creds

Will Thompson will.thompson at collabora.co.uk
Fri Dec 24 06:54:57 PST 2010

On 24/12/10 11:01, Will Thompson wrote:
> On 24/12/10 10:04, Lennart Poettering wrote:
>> If find this rather unnecessary and just confusing. This complicates the
>> code for no benefit: MSG_NOSIGNAL is a Linuxism, and on Linux it is a
>> macro. Hence checking for it via #ifdef directly is a good thing, and
>> simple and safe.
>> Plead don't unnecessarily clutter the code with autocnf'ism where they
>> aren't really necessary!
> Ah, I committed the patch to use HAVE_DECL_MSG_NOSIGNAL. I don't think
> it *complicates* the code as such.
> I only thought of doing this at all because, while looking at the
> MSG_NOSIGNAL-related patches in the history, I noticed that the commit
> which set _dbus_modify_sigpipe to FALSE conditionally on the presence of
> MSG_NOSIGNAL had already added the autoconf check and used it in
> dbus-connection.c:
> <http://cgit.freedesktop.org/dbus/dbus/commit/?id=03d50fb>. :)

Mike McQuaid discovered that this patch was actually incorrect. 
AC_CHECK_DECLS behaves differently from every other such macro. So my 
change did actually break the build on OS X. I committed his fix 
<http://cgit.freedesktop.org/dbus/dbus/commit/?id=88004d6>, and attached 
is my fix for the original sigpipe-related guard.


More information about the dbus mailing list