On Tue, Feb 27, 2018 at 11:15:53 +0000, Kamil Rytarowski wrote:

> Module Name:  src
> Committed By: kamil
> Date:         Tue Feb 27 11:15:53 UTC 2018
> 
> Modified Files:
>       src/tests/lib/libc/sys: t_ucontext.c
> 
> Log Message:
> Make the t_ucontext.c test more portable
> 
> Cast _UC_MACHINE_*(&u) to (register_t).
> This allows to print the returned values with PRIxREGISTER.
> 
> This corrects build failures on MIPS and HPPA.
> sizeof(int) == sizeof(long) on these 32-bit systems.

Why does this code use <sys/inttypes.h> instead of <inttypes.h>?

Note, that PRIxREGISTER and other kernel PRIx* macros are, for better
or worse, not coming from inttypes headers, but from
<machine/types.h>.  But they can be deined in terms of standard PRIx*
macros and for the userland code those are officially defined by
<inttypes.h>.

-uwe

Reply via email to