emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Broken dbusbind.c


From: John Yates
Subject: Re: Broken dbusbind.c
Date: Mon, 28 Dec 2020 21:57:18 -0500

On Mon, Dec 28, 2020 at 7:40 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
> You don't specify the OS this breaks on -- the current Emacs trunk
> builds fine for me on Debian bullseye, for instance.

Here is more context:

/* Check whether TYPE is a basic DBusType.  */
#ifdef HAVE_DBUS_TYPE_IS_VALID
#define XD_BASIC_DBUS_TYPE(type) \
  (dbus_type_is_valid (type) && dbus_type_is_basic (type))
#else
#define XD_BASIC_DBUS_TYPE(type) \
  ((type == DBUS_TYPE_BYTE) \
   || (type == DBUS_TYPE_BOOLEAN) \
   || (type == DBUS_TYPE_INT16) \
   || (type == DBUS_TYPE_UINT16) \
   || (type == DBUS_TYPE_INT32) \
   || (type == DBUS_TYPE_UINT32) \
   || (type == DBUS_TYPE_INT64) \
   || (type == DBUS_TYPE_UINT64) \
   || (type == DBUS_TYPE_DOUBLE) \
   || (type == DBUS_TYPE_STRING) \
   || (type == DBUS_TYPE_OBJECT_PATH) \
   || (type == DBUS_TYPE_SIGNATURE) \
#ifdef DBUS_TYPE_UNIX_FD
   || (type == DBUS_TYPE_UNIX_FD) \
#endif
   )
#endif

Notice that, if HAVE_DBUS_TYPE_IS_VALID is defined
we get the first #define XD_BASIC_DBUS_TYPE and
all will be well.

OTOH, if HAVE_DBUS_TYPE_IS_VALID is undefined
we get the broken #define.  (Imagine what the C lexer
sees when each \<NL> disappears.  The result is a line
with a #ifdef DBUS_TYPE_UNIX_FD tacked onto the
end.)

My sense is that the OS is immaterial.  Is not the
HAVE_DBUS_TYPE_IS_VALID symbol supplied by
the configure script?  Hence it comes down to what
headers and libraries have been installed.

(For what it is worth I am on Ubuntu 20.10.)

/john



reply via email to

[Prev in Thread] Current Thread [Next in Thread]