Bug 35114

Summary: consider making 64-bit support unconditional
Product: dbus Reporter: Simon McVittie <smcv>
Component: coreAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: enhancement    
Priority: medium CC: hp
Version: 1.5Keywords: patch
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/smcv/dbus-smcv.git;a=shortlog;h=refs/heads/need-more-bits-35114
Whiteboard:
i915 platform: i915 features:
Attachments: Require specific user action to compile without 64-bit support

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.