diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2008-01-15 16:43:46 -0500 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2008-01-15 16:43:46 -0500 |
commit | c0910a0bda980888f3261486fc873f5510de48a9 (patch) | |
tree | 3cb9109a0a75ada9161c586d4aaeb0121df5c045 | |
parent | 94bc113117ea967c3c77d6a19ab3971ac6455765 (diff) |
support for AIX poll implementation (FDO Bug #11666)
2008-01-15 John (J5) Palmieri <johnp@redhat.com>
* patch by Peter O'Gorman <pogma at thewrittenword dot com>
* dbus/dbus-sysdeps.h: support for AIX poll implementation (FDO Bug
#11666)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | dbus/dbus-sysdeps.h | 27 |
2 files changed, 34 insertions, 0 deletions
@@ -1,5 +1,12 @@ 2008-01-15 John (J5) Palmieri <johnp@redhat.com> + * patch by Peter O'Gorman <pogma at thewrittenword dot com> + + * dbus/dbus-sysdeps.h: support for AIX poll implementation (FDO Bug + #11666) + +2008-01-15 John (J5) Palmieri <johnp@redhat.com> + * tests/name-test/run-test.sh: make more portable (FDO Bug #11667) 2008-01-15 John (J5) Palmieri <johnp@redhat.com> diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 1a52e7fb..5ff13884 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -35,6 +35,15 @@ #include <string.h> #include <stdarg.h> + +/* 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 + DBUS_BEGIN_DECLS #ifdef DBUS_WIN @@ -212,6 +221,23 @@ struct DBusAtomic dbus_int32_t _dbus_atomic_inc (DBusAtomic *atomic); dbus_int32_t _dbus_atomic_dec (DBusAtomic *atomic); + +/* AIX uses different values for poll */ + +#ifdef _AIX +/** There is data to read */ +#define _DBUS_POLLIN 0x0001 +/** There is urgent data to read */ +#define _DBUS_POLLPRI 0x0004 +/** Writing now will not block */ +#define _DBUS_POLLOUT 0x0002 +/** Error condition */ +#define _DBUS_POLLERR 0x4000 +/** Hung up */ +#define _DBUS_POLLHUP 0x2000 +/** Invalid request: fd not open */ +#define _DBUS_POLLNVAL 0x8000 +#else /** There is data to read */ #define _DBUS_POLLIN 0x0001 /** There is urgent data to read */ @@ -224,6 +250,7 @@ dbus_int32_t _dbus_atomic_dec (DBusAtomic *atomic); #define _DBUS_POLLHUP 0x0010 /** Invalid request: fd not open */ #define _DBUS_POLLNVAL 0x0020 +#endif /** * A portable struct pollfd wrapper. |