aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbusbind.c
diff options
context:
space:
mode:
authorStephen Berman2013-06-14 22:07:55 +0200
committerStephen Berman2013-06-14 22:07:55 +0200
commitbd358779861f265a7acff31ead40172735af693e (patch)
tree345217a9889dbd29b09bdc80a94265c17719d41f /src/dbusbind.c
parent2a97b47f0878cbda86cb6ba0e7e744924810b70e (diff)
parentf7394b12358ae453a0c8b85fc307afc1b740010d (diff)
downloademacs-bd358779861f265a7acff31ead40172735af693e.tar.gz
emacs-bd358779861f265a7acff31ead40172735af693e.zip
Merge from trunk.
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r--src/dbusbind.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 901820648cb..3ec3c28431b 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -1,5 +1,5 @@
1/* Elisp bindings for D-Bus. 1/* Elisp bindings for D-Bus.
2 Copyright (C) 2007-2012 Free Software Foundation, Inc. 2 Copyright (C) 2007-2013 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#ifdef HAVE_DBUS 21#ifdef HAVE_DBUS
22#include <stdio.h> 22#include <stdio.h>
23#include <dbus/dbus.h> 23#include <dbus/dbus.h>
24#include <setjmp.h> 24
25#include "lisp.h" 25#include "lisp.h"
26#include "frame.h" 26#include "frame.h"
27#include "termhooks.h" 27#include "termhooks.h"
@@ -32,6 +32,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32#define DBUS_NUM_MESSAGE_TYPES 5 32#define DBUS_NUM_MESSAGE_TYPES 5
33#endif 33#endif
34 34
35
36/* Some platforms define the symbol "interface", but we want to use it
37 * as a variable name below. */
38
39#ifdef interface
40#undef interface
41#endif
42
35 43
36/* Subroutines. */ 44/* Subroutines. */
37static Lisp_Object Qdbus_init_bus; 45static Lisp_Object Qdbus_init_bus;
@@ -291,8 +299,8 @@ xd_symbol_to_dbus_type (Lisp_Object object)
291 } \ 299 } \
292 } while (0) 300 } while (0)
293 301
294#if (HAVE_DBUS_VALIDATE_BUS_NAME || HAVE_DBUS_VALIDATE_PATH \ 302#if (HAVE_DBUS_VALIDATE_BUS_NAME || HAVE_DBUS_VALIDATE_PATH \
295 || XD_DBUS_VALIDATE_OBJECT || HAVE_DBUS_VALIDATE_MEMBER) 303 || HAVE_DBUS_VALIDATE_INTERFACE || HAVE_DBUS_VALIDATE_MEMBER)
296#define XD_DBUS_VALIDATE_OBJECT(object, func) \ 304#define XD_DBUS_VALIDATE_OBJECT(object, func) \
297 do { \ 305 do { \
298 if (!NILP (object)) \ 306 if (!NILP (object)) \
@@ -874,7 +882,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter)
874#endif 882#endif
875 { 883 {
876 dbus_uint32_t val; 884 dbus_uint32_t val;
877 unsigned int pval = val; 885 unsigned int pval;
878 dbus_message_iter_get_basic (iter, &val); 886 dbus_message_iter_get_basic (iter, &val);
879 pval = val; 887 pval = val;
880 XD_DEBUG_MESSAGE ("%c %u", dtype, pval); 888 XD_DEBUG_MESSAGE ("%c %u", dtype, pval);
@@ -1195,7 +1203,7 @@ this connection to those buses. */)
1195 xd_registered_buses = Fcons (Fcons (bus, val), xd_registered_buses); 1203 xd_registered_buses = Fcons (Fcons (bus, val), xd_registered_buses);
1196 1204
1197 /* We do not want to abort. */ 1205 /* We do not want to abort. */
1198 putenv ((char *) "DBUS_FATAL_WARNINGS=0"); 1206 xputenv ("DBUS_FATAL_WARNINGS=0");
1199 1207
1200 /* Cleanup. */ 1208 /* Cleanup. */
1201 dbus_error_free (&derror); 1209 dbus_error_free (&derror);