Bug 35114 - consider making 64-bit support unconditional
Summary: consider making 64-bit support unconditional
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.5
Hardware: Other All
: medium enhancement
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL: http://git.collabora.co.uk/?p=user/sm...
Keywords: patch
Depends on:
Reported: 2011-03-08 05:34 UTC by Simon McVittie
Modified: 2011-03-14 05:09 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Require specific user action to compile without 64-bit support (3.25 KB, patch)
2011-03-08 05:34 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2011-03-08 05:34:11 UTC
The D-Bus type system isn't implementable without 64-bit support, although for historical reasons (?) we have some sort of semi-working support for platforms with no 64-bit integers.

Let's find out whether any practically relevant platform still lacks these types... the patch I'm about to attach (which is definitely for 1.5, not 1.4) makes configure fail if none of int, long, long long or __int64 is a 64-bit type, unless the user explicitly passes --without-64-bit, which is documented as "file a bug if you need to use this option".

For background information: GLib appears to have required 64-bit integer types since 2001. ISO C99 requires that int_least64_t and int_fast64_t exist, i.e. that there are types with *at least* 64 bits, so support for int64_t is essentially "free" unless CHAR_BIT is greater than the minimum of 8. In practice, D-Bus (and many other libraries) will already behave very strangely on architectures where CHAR_BIT is more than 8 (9 and 36 are the only obscure values I'm aware of).
Comment 1 Simon McVittie 2011-03-08 05:34:46 UTC
Created attachment 44227 [details] [review]
Require specific user action to compile without 64-bit support
Comment 2 Lennart Poettering 2011-03-09 19:27:24 UTC
Looks good to me.
Comment 3 Simon McVittie 2011-03-14 05:09:01 UTC
In master for 1.5.0, thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.