summaryrefslogtreecommitdiff
path: root/src/dbusbind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r--src/dbusbind.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 8ebc56c72c4..4852739d8e4 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -142,10 +142,7 @@ static bool xd_in_read_queued_messages = 0;
} while (0)
#else /* !DBUS_DEBUG */
-# if __STDC_VERSION__ < 199901
-# define XD_DEBUG_MESSAGE (void) /* Pre-C99 compilers cannot debug. */
-# else
-# define XD_DEBUG_MESSAGE(...) \
+# define XD_DEBUG_MESSAGE(...) \
do { \
if (!NILP (Vdbus_debug)) \
{ \
@@ -154,7 +151,6 @@ static bool xd_in_read_queued_messages = 0;
message ("%s: %s", __func__, s); \
} \
} while (0)
-# endif
# define XD_DEBUG_VALID_LISP_OBJECT_P(object)
#endif
@@ -765,7 +761,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter)
&& STRINGP (CAR_SAFE (XD_NEXT_VALUE (object)))
&& NILP (CDR_SAFE (XD_NEXT_VALUE (object))))
{
- strcpy (signature, SSDATA (CAR_SAFE (XD_NEXT_VALUE (object))));
+ lispstpcpy (signature, CAR_SAFE (XD_NEXT_VALUE (object)));
object = CDR_SAFE (XD_NEXT_VALUE (object));
}
@@ -1058,6 +1054,7 @@ xd_remove_watch (DBusWatch *watch, void *data)
/* Unset session environment. */
#if 0
+ /* This is buggy, since unsetenv is not thread-safe. */
if (XSYMBOL (QCdbus_session_bus) == data)
{
XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
@@ -1223,9 +1220,6 @@ this connection to those buses. */)
XSETFASTINT (val, (intptr_t) connection);
xd_registered_buses = Fcons (Fcons (bus, val), xd_registered_buses);
- /* We do not want to abort. */
- xputenv ("DBUS_FATAL_WARNINGS=0");
-
/* Cleanup. */
dbus_error_free (&derror);
}
@@ -1742,6 +1736,13 @@ xd_read_queued_messages (int fd, void *data)
void
+init_dbusbind (void)
+{
+ /* We do not want to abort. */
+ xputenv ("DBUS_FATAL_WARNINGS=0");
+}
+
+void
syms_of_dbusbind (void)
{