[PATCH 2/3] defs: define PRI__[uxs]64 to print __[su]64 values
Dmitry V. Levin
ldv at altlinux.org
Thu Mar 31 01:55:39 UTC 2016
On Wed, Mar 30, 2016 at 09:19:26PM -0400, Jeff Mahoney wrote:
[...]
> +/*
> + * The kernel used to define 64-bit types on 64-bit systems on a per-arch
> + * basis. Some architectures would use unsigned long and others would use
> + * unsigned long long. These types were exported as part of the
> + * kernel-userspace ABI and now must be maintained forever. This matches
> + * what the kernel exports for each architecture so we don't need to cast
> + * every printing of __u64 or __s64 to stdint types.
> + */
> +#if BITS_PER_LONG == 32
> +#define PRI__64 "ll"
How portable is BITS_PER_LONG?
> +#elif defined(__mips__) || defined(__powerpc__) || defined(__alpha__) || defined(__ia64__)
> +#define PRI__64 "l"
Is there any simple way to verify this?
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160331/2ae489f5/attachment.bin>
More information about the Strace-devel
mailing list