summaryrefslogtreecommitdiff
path: root/tools/dbus-print-message.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-03-22 14:39:56 -0400
committerColin Walters <walters@verbum.org>2010-03-22 14:39:56 -0400
commitdf89cfeb3808acc213c9620db6988611a34207c5 (patch)
tree5b8ab333a0af4a22898bf06560d72fec6c8b97a8 /tools/dbus-print-message.c
parenta96fc838b963831240f1971e55bf5d2f141429f9 (diff)
parent3861cb42f437a9eb2b13c5c2aa4081268c45c32c (diff)
downloaddbus-df89cfeb3808acc213c9620db6988611a34207c5.tar.gz
Merge branch 'dbus-1.2'
Conflicts: bus/dispatch.c configure.in test/name-test/test-names.c
Diffstat (limited to 'tools/dbus-print-message.c')
-rw-r--r--tools/dbus-print-message.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c
index b7c3f098..0b8ca267 100644
--- a/tools/dbus-print-message.c
+++ b/tools/dbus-print-message.c
@@ -24,6 +24,7 @@
#include "dbus-print-message.h"
#include <stdlib.h>
+#include "config.h"
static const char*
type_to_name (int message_type)
@@ -227,7 +228,11 @@ print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth)
{
dbus_int64_t val;
dbus_message_iter_get_basic (iter, &val);
- printf ("int64 %lld\n", val);
+#ifdef DBUS_INT64_PRINTF_MODIFIER
+ printf ("int64 %" DBUS_INT64_PRINTF_MODIFIER "d\n", val);
+#else
+ printf ("int64 (omitted)\n");
+#endif
break;
}
@@ -235,7 +240,11 @@ print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth)
{
dbus_uint64_t val;
dbus_message_iter_get_basic (iter, &val);
- printf ("uint64 %llu\n", val);
+#ifdef DBUS_INT64_PRINTF_MODIFIER
+ printf ("uint64 %" DBUS_INT64_PRINTF_MODIFIER "u\n", val);
+#else
+ printf ("uint64 (omitted)\n");
+#endif
break;
}