question about s390/bits/siginfo.h

Carlos O'Donell carlos@systemhalted.org
Thu Mar 21 01:02:00 GMT 2013


On Wed, Mar 20, 2013 at 5:29 PM, Edjunior Barbosa Machado
<emachado@linux.vnet.ibm.com> wrote:
> Hi all,
>
> working on a patch that updates siginfo.h files from glibc, we've
> noticed something in sysdeps/unix/sysv/linux/s390/bits/siginfo.h that
> seems to be inconsistent with the kernel source.
>
> In the generic kernel header <asm-generic/siginfo.h> included by
> arch/s390/include/uapi/asm/siginfo.h, _sigfault has an optional field
> int _trapno that is included #ifdef __ARCH_SI_TRAPNO. On kernel 3.8,
> __ARCH_SI_TRAPNO is defined for sparc, tile and alpha.
>
> However, glibc doesn't use __ARCH_SI_TRAPNO and siginfo.h for s390 has
> int _trapno hardcoded on _sigfault. Is that struct correct for s390?

Probably, otherwise we'd know since these fields are all used heavily.
We don't have a specific need to use macros in this case like Linux
does. Though the more we common-ize our headers the closer our headers
start to look to the UAPI ones.

When resolving these kinds of questions you have to track down the
final type used by the compiler. You can use -save-temps to see the
intermediate source file after pre-processing. There you can see if
all the types are resolved to int.

Cheers,
Carlos.



More information about the Libc-help mailing list