On Wed, Mar 30, 2016 at 10:28:35PM -0400, Jeff Mahoney wrote: > On 3/30/16 9:55 PM, Dmitry V. Levin wrote: > > 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 u= > > se > >> + * 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 =3D=3D 32 > >> +#define PRI__64 "ll" > > > > How portable is BITS_PER_LONG? > > Both asm/int-l64.h and asm/int-ll64.h include asm/bitsperlong.h, so if > __u64 is defined, so will BITS_PER_LONG.
Remember this is defs.h included by virtually every source file. What will happen if __u64 is not defined? In other words, I'd be more comfortable with SIZEOF_LONG prodiced by AC_CHECK_SIZEOF([long]) in configure.ac. -- ldv
pgps3RLoQWriu.pgp
Description: PGP signature
------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
