This is similar to widen_to_long, but for unsigned values. * defs.h (widen_to_ulong): New macro. --- defs.h | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/defs.h b/defs.h index 6566488..8f34679 100644 --- a/defs.h +++ b/defs.h @@ -760,6 +760,14 @@ extern unsigned current_wordsize; # define widen_to_long(v) ((long)(v)) #endif +#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 +# define widen_to_ulong(v) \ + (current_wordsize == 4 ? (unsigned long) (uint32_t) (v) : \ + (unsigned long) (v)) +#else +# define widen_to_ulong(v) ((long)(v)) +#endif + /* * Zero-extend a signed integer type to unsigned long long. */ -- 1.7.10.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel