Defining _DBUS_POLL* in dbus-sysdeps.h

Havoc Pennington hp at pobox.com
Fri Nov 7 13:39:47 PST 2008


Hi,

On Fri, Nov 7, 2008 at 4:01 PM, Schmottlach, Glenn
<GSchmott at harmanbecker.com> wrote:
> I'm not sure I follow you here. Looking at the top of dbus-sysdeps.h I
> see the following:
>
> /* AIX sys/poll.h does #define events reqevents, and other
>  * wonderousness, so must include sys/poll before declaring
>  * DBusPollFD
>  */
> #ifdef HAVE_POLL
> #include <sys/poll.h>
> #endif
>
> So, if HAVE_POLL is indeed defined (as determined by 'configure'), you
> will indeed be pulling in a system header file. Since poll.h is already
> being included, what does it hurt to use the definitions for POLL* found
> there?

I believe (without doing the version control archaeology) that this
include was added to fix AIX later on, but before that wasn't there,
and it's kind of "against the rules" still (I have a vague memory of
the discussion which is probably in bugzilla about the AIX port)

Given this, it does not explicitly break anything new to use the poll
#defines, afaik, but it is a bit odd perhaps to do something "against
the rules" just because we happened to be forced to include this
header for unrelated reasons.

Havoc


More information about the dbus mailing list