This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: question about s390/bits/siginfo.h
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>
- Cc: libc-help at sourceware dot org, "Naveen N. Rao" <naveen dot n dot rao at linux dot vnet dot ibm dot com>
- Date: Wed, 20 Mar 2013 21:01:48 -0400
- Subject: Re: question about s390/bits/siginfo.h
- References: <514A2A1D dot 9090103 at linux dot vnet dot ibm dot com>
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.