From: Marc Mutz Date: Thu, 16 Feb 2012 07:43:40 +0000 (+0100) Subject: dbus-protocol.h: compile under C++11 X-Git-Tag: dbus-1.4.20~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51b88b4c7919487290c0862b013cd8e7cd2de34b;p=thirdparty%2Fdbus.git dbus-protocol.h: compile under C++11 C++11 compilers have a feature called 'user-defined string literals' which allow arbitrary string suffixes to have user-defined meaning. This makes code that concatenates macros with string literals without intervening whitespace illegal under C++11. Fortunately, string literal concatenation has allowed intervening whitespace since the dawn of time, so the solution is to simply pad with spaces. Tested (header) with GCC 4.7 (trunk). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46147 Reviewed-by: Simon McVittie --- diff --git a/dbus/dbus-protocol.h b/dbus/dbus-protocol.h index 8aa15e539..60605ab29 100644 --- a/dbus/dbus-protocol.h +++ b/dbus/dbus-protocol.h @@ -456,7 +456,7 @@ extern "C" { /** XML system identifier of the introspection format version 1.0 */ #define DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" /** XML document type declaration of the introspection format version 1.0 */ -#define DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "\n" +#define DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "\n" /** @} */