message(" 64-bit int: ${DBUS_INT64_TYPE} ")
message(" 32-bit int: ${DBUS_INT32_TYPE} ")
message(" 16-bit int: ${DBUS_INT16_TYPE} ")
+message(" pointer size: ${DBUS_SIZEOF_VOID_P} ")
message(" Doxygen: ${DOXYGEN} ")
message(" Docbook Generator: ${DOCBOOK_GENERATOR_NAME} ")
}
" DBUS_USE_SYNC)
+set(DBUS_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
+
check_type_size("short" SIZEOF_SHORT)
check_type_size("int" SIZEOF_INT)
check_type_size("long" SIZEOF_LONG)
ws2tcpip.h
])
+#### Pointer size
+AC_CHECK_SIZEOF(void *)
+DBUS_SIZEOF_VOID_P=$ac_cv_sizeof_void_p
+AC_SUBST(DBUS_SIZEOF_VOID_P)
+
#### Integer sizes
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(__int64)
64-bit int: ${DBUS_INT64_TYPE}
32-bit int: ${DBUS_INT32_TYPE}
16-bit int: ${DBUS_INT16_TYPE}
+ pointer size: ${DBUS_SIZEOF_VOID_P}
Doxygen: ${DOXYGEN:-not found}
xmlto: ${XMLTO:-not found}
ducktype: ${DUCKTYPE:-not found}
typedef @DBUS_INT16_TYPE@ dbus_int16_t;
typedef unsigned @DBUS_INT16_TYPE@ dbus_uint16_t;
+#define DBUS_SIZEOF_VOID_P @DBUS_SIZEOF_VOID_P@
+
/* This is not really arch-dependent, but it's not worth
* creating an additional generated header just for this
*/
} u; /**< the type writer or reader that does all the work */
};
+#if DBUS_SIZEOF_VOID_P > 8
+/*
+ * Architectures with 128-bit pointers were not supported in DBus 1.10, so we
+ * do no check for DBus 1.10 structure layout compatibility for such
+ * architectures (e.g. Arm Morello).
+ */
+#define CHECK_DBUS_1_10_BINARY_COMPATIBILITY 0
+#else
+#define CHECK_DBUS_1_10_BINARY_COMPATIBILITY 1
/**
* Layout of a DBusMessageIter on the stack in dbus 1.10.0. This is no
* longer used, but for ABI compatibility we need to assert that the
int pad2;
void *pad3;
} DBusMessageIter_1_10_0;
+#endif
static void
get_const_signature (DBusHeader *header,
_DBUS_STATIC_ASSERT (sizeof (DBusMessageRealIter) <= sizeof (DBusMessageIter));
_DBUS_STATIC_ASSERT (_DBUS_ALIGNOF (DBusMessageRealIter) <=
_DBUS_ALIGNOF (DBusMessageIter));
+#if CHECK_DBUS_1_10_BINARY_COMPATIBILITY
/* A failure of these two assertions would indicate that we've broken
* ABI on this platform since 1.10.0. */
_DBUS_STATIC_ASSERT (sizeof (DBusMessageIter_1_10_0) ==
sizeof (DBusMessageIter));
_DBUS_STATIC_ASSERT (_DBUS_ALIGNOF (DBusMessageIter_1_10_0) ==
_DBUS_ALIGNOF (DBusMessageIter));
+#endif
/* If this static assertion fails, it means the DBusMessageIter struct
* is not "packed", which might result in "iter = other_iter" not copying
* every byte. */
endif
endforeach
+arch_config.set('DBUS_SIZEOF_VOID_P', cc.sizeof('void *'))
+
###############################################################################
# Dependencies
'64-bit int': arch_config.get('DBUS_INT64_TYPE'),
'32-bit int': arch_config.get('DBUS_INT32_TYPE'),
'16-bit int': arch_config.get('DBUS_INT16_TYPE'),
+ 'pointer size': arch_config.get('DBUS_SIZEOF_VOID_P'),
'xsltproc': xsltproc.found() ? xsltproc.full_path() : '',
'Doxygen': doxygen.found() ? doxygen.full_path() : '',
'ducktype': ducktype.found() ? ducktype.full_path() : '',