diff options
| author | Michael Albinus | 2009-08-22 08:57:34 +0000 |
|---|---|---|
| committer | Michael Albinus | 2009-08-22 08:57:34 +0000 |
| commit | eb4c6ace23a7feb9f3bea2897caddf3636b67f24 (patch) | |
| tree | ad21bd78bb811a8a07df195051c27a8465b2094b /src | |
| parent | 244f96fcc4d510eca9f12f2459b715de5d1fa6cd (diff) | |
| download | emacs-eb4c6ace23a7feb9f3bea2897caddf3636b67f24.tar.gz emacs-eb4c6ace23a7feb9f3bea2897caddf3636b67f24.zip | |
* dbusbind.c (XD_WITH_DBUS_WATCH_GET_UNIX_FD): Remove. It was
intended as hotfix only.
(xd_add_watch, xd_remove_watch): Use HAVE_DBUS_WATCH_GET_UNIX_FD.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/dbusbind.c | 14 |
2 files changed, 10 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0966e189239..48105ecc78e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2009-08-22 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * config.in (HAVE_DBUS_WATCH_GET_UNIX_FD): Add. | ||
| 4 | |||
| 5 | * dbusbind.c (XD_WITH_DBUS_WATCH_GET_UNIX_FD): Remove. It was | ||
| 6 | intended as hotfix only. | ||
| 7 | (xd_add_watch, xd_remove_watch): Use HAVE_DBUS_WATCH_GET_UNIX_FD. | ||
| 8 | |||
| 1 | 2009-08-21 Adrian Robert <Adrian.B.Robert@gmail.com> | 9 | 2009-08-21 Adrian Robert <Adrian.B.Robert@gmail.com> |
| 2 | 10 | ||
| 3 | * nsterm.m (ns_get_color): Update documentation properly for last | 11 | * nsterm.m (ns_get_color): Update documentation properly for last |
diff --git a/src/dbusbind.c b/src/dbusbind.c index 38912e5f51b..9542cd2401d 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -71,16 +71,6 @@ int xd_in_read_queued_messages = 0; | |||
| 71 | /* We use "xd_" and "XD_" as prefix for all internal symbols, because | 71 | /* We use "xd_" and "XD_" as prefix for all internal symbols, because |
| 72 | we don't want to poison other namespaces with "dbus_". */ | 72 | we don't want to poison other namespaces with "dbus_". */ |
| 73 | 73 | ||
| 74 | /* Since D-Bus 1.1.1, dbus_watch_get_fd() was replaced by | ||
| 75 | dbus_watch_get_unix_fd and dbus_watch_get_socket. We must check | ||
| 76 | this. */ | ||
| 77 | #ifdef DBUS_VERSION | ||
| 78 | #define XD_WITH_DBUS_WATCH_GET_UNIX_FD \ | ||
| 79 | ((1 << 16) | (1 << 8) | (1)) <= DBUS_VERSION | ||
| 80 | #else | ||
| 81 | #define XD_WITH_DBUS_WATCH_GET_UNIX_FD 0 | ||
| 82 | #endif | ||
| 83 | |||
| 84 | /* Raise a signal. If we are reading events, we cannot signal; we | 74 | /* Raise a signal. If we are reading events, we cannot signal; we |
| 85 | throw to xd_read_queued_messages then. */ | 75 | throw to xd_read_queued_messages then. */ |
| 86 | #define XD_SIGNAL1(arg) \ | 76 | #define XD_SIGNAL1(arg) \ |
| @@ -752,7 +742,7 @@ xd_add_watch (watch, data) | |||
| 752 | /* We check only for incoming data. */ | 742 | /* We check only for incoming data. */ |
| 753 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) | 743 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) |
| 754 | { | 744 | { |
| 755 | #if XD_WITH_DBUS_WATCH_GET_UNIX_FD | 745 | #if HAVE_DBUS_WATCH_GET_UNIX_FD |
| 756 | /* TODO: Reverse these on Win32, which prefers the opposite. */ | 746 | /* TODO: Reverse these on Win32, which prefers the opposite. */ |
| 757 | int fd = dbus_watch_get_unix_fd(watch); | 747 | int fd = dbus_watch_get_unix_fd(watch); |
| 758 | if (fd == -1) | 748 | if (fd == -1) |
| @@ -782,7 +772,7 @@ xd_remove_watch (watch, data) | |||
| 782 | /* We check only for incoming data. */ | 772 | /* We check only for incoming data. */ |
| 783 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) | 773 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) |
| 784 | { | 774 | { |
| 785 | #if XD_WITH_DBUS_WATCH_GET_UNIX_FD | 775 | #if HAVE_DBUS_WATCH_GET_UNIX_FD |
| 786 | /* TODO: Reverse these on Win32, which prefers the opposite. */ | 776 | /* TODO: Reverse these on Win32, which prefers the opposite. */ |
| 787 | int fd = dbus_watch_get_unix_fd(watch); | 777 | int fd = dbus_watch_get_unix_fd(watch); |
| 788 | if (fd == -1) | 778 | if (fd == -1) |