[PATCH] Wrong usage of HAVE_DECL_MSG_NOSIGNAL macros so build fails on Solaris
pavel.strashkin at gmail.com
Thu Dec 30 06:57:10 PST 2010
Solaris doesn't support MSG_NOSIGNAL so configure script puts the
following lines into config.h:
151 /* Define to 1 if you have the declaration of `MSG_NOSIGNAL', and
to 0 if you
152 don't. */
153 #define HAVE_DECL_MSG_NOSIGNAL 0
As you can see, HAVE_DECL_MSG_NOSIGNAL macros is defined and it's
value is 0. In code you check not value, but defined/notdefined
situation that's wrong.
For an example:
236 #ifdef HAVE_DECL_MSG_NOSIGNAL
237 static dbus_bool_t _dbus_modify_sigpipe = FALSE;
239 static dbus_bool_t _dbus_modify_sigpipe = TRUE;
As you understand now, the check will always true (even if
MSG_NOSIGNAL is not supported) because macros always defined. You have
to use "if" instead of "ifdef" in case of HAVE_* macroses to check for
0 or 1 i think.
The attached patch fixes this case.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1865 bytes
Desc: not available
More information about the dbus