* struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc)
[not found] <20120226181752.1175.qmail@sourceware.org>
@ 2012-03-15 15:06 ` Thomas Schwinge
2012-03-15 15:57 ` Carlos O'Donell
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Schwinge @ 2012-03-15 15:06 UTC (permalink / raw)
To: libc-alpha, gcc-patches; +Cc: drepper
[-- Attachment #1: Type: text/plain, Size: 3010 bytes --]
Hi!
On 26 Feb 2012 18:17:52 -0000, drepper@sourceware.org wrote:
> http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4efeffc1d583597e4f52985b9747269e47b754e2
>
> commit 4efeffc1d583597e4f52985b9747269e47b754e2
> Author: Ulrich Drepper <drepper@gmail.com>
> Date: Sun Feb 26 13:17:27 2012 -0500
>
> Fix up POSIX testing in conformtest
> [...]
> + * sysdeps/unix/sysv/linux/bits/siginfo.h: Don't name siginfo_t
> + struct. [...]
> [...]
> diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
> index ecef39d..0635e2f 100644
> --- a/sysdeps/unix/sysv/linux/bits/siginfo.h
> +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
> [...]
> @@ -47,7 +47,7 @@ typedef union sigval
> # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
> # endif
>
> -typedef struct siginfo
> +typedef struct
> {
> int si_signo; /* Signal number. */
> int si_errno; /* If non-zero, an errno value associated with
> [...]
This change breaks GCC:
In file included from /scratch/tschwing/FM_sh-linux-gnu-mk2/src/gcc-mainline/libgcc/unwind-dw2.c:377:0:
./md-unwind-support.h: In function 'sh_fallback_frame_state':
./md-unwind-support.h:182:17: error: field 'info' has incomplete type
In my case, this is really libgcc/config/sh/linux-unwind.h:
[...]
181 struct rt_sigframe {
182 struct siginfo info;
183 struct ucontext uc;
184 } *rt_ = context->cfa;
[...]
There are more such cases:
boehm-gc/os_dep.c:# define SIGINFO_T struct siginfo
libgcc/config/alpha/linux-unwind.h: struct siginfo info;
libgcc/config/bfin/linux-unwind.h: struct siginfo *pinfo;
libgcc/config/bfin/linux-unwind.h: struct siginfo info;
libgcc/config/i386/linux-unwind.h: struct siginfo *pinfo;
libgcc/config/i386/linux-unwind.h: struct siginfo info;
libgcc/config/ia64/linux-unwind.h: struct siginfo *info;
libgcc/config/ia64/linux-unwind.h: struct siginfo *info;
libgcc/config/mips/linux-unwind.h: struct siginfo info;
libgcc/config/pa/linux-unwind.h: struct siginfo info;
libgcc/config/sh/linux-unwind.h: struct siginfo *pinfo;
libgcc/config/sh/linux-unwind.h: struct siginfo info;
libgcc/config/sh/linux-unwind.h: struct siginfo info;
libgcc/config/tilepro/linux-unwind.h: struct siginfo info;
libgcc/config/xtensa/linux-unwind.h: struct siginfo info;
(Is there really nobody doing nightly testing of GCC against glibc master
branch on x86, which would have shown this earlier?)
Replacing struct siginfo with siginfo_t in sh/linux-unwind.h makes the
build pass. Is this the desired approach; shall we apply this for all
cases listed above (and submit to Boehm GC upstream)? I wonder -- if GCC
breaks, how much software out in the wild is going to break once this
glibc change ripples through?
Grüße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc)
2012-03-15 15:06 ` struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc) Thomas Schwinge
@ 2012-03-15 15:57 ` Carlos O'Donell
2012-03-15 16:25 ` H.J. Lu
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Carlos O'Donell @ 2012-03-15 15:57 UTC (permalink / raw)
To: Thomas Schwinge; +Cc: libc-alpha, gcc-patches, drepper
On Thu, Mar 15, 2012 at 11:05 AM, Thomas Schwinge
<thomas@codesourcery.com> wrote:
> Hi!
>
> On 26 Feb 2012 18:17:52 -0000, drepper@sourceware.org wrote:
>> http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4efeffc1d583597e4f52985b9747269e47b754e2
>>
>> commit 4efeffc1d583597e4f52985b9747269e47b754e2
>> Author: Ulrich Drepper <drepper@gmail.com>
>> Date: Sun Feb 26 13:17:27 2012 -0500
>>
>> Fix up POSIX testing in conformtest
>
>> [...]
>> + * sysdeps/unix/sysv/linux/bits/siginfo.h: Don't name siginfo_t
>> + struct. [...]
>> [...]
>
>> diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
>> index ecef39d..0635e2f 100644
>> --- a/sysdeps/unix/sysv/linux/bits/siginfo.h
>> +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
>> [...]
>> @@ -47,7 +47,7 @@ typedef union sigval
>> # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
>> # endif
>>
>> -typedef struct siginfo
>> +typedef struct
>> {
>> int si_signo; /* Signal number. */
>> int si_errno; /* If non-zero, an errno value associated with
>> [...]
>
> This change breaks GCC:
>
> In file included from /scratch/tschwing/FM_sh-linux-gnu-mk2/src/gcc-mainline/libgcc/unwind-dw2.c:377:0:
> ./md-unwind-support.h: In function 'sh_fallback_frame_state':
> ./md-unwind-support.h:182:17: error: field 'info' has incomplete type
>
> In my case, this is really libgcc/config/sh/linux-unwind.h:
>
> [...]
> 181 struct rt_sigframe {
> 182 struct siginfo info;
> 183 struct ucontext uc;
> 184 } *rt_ = context->cfa;
> [...]
POSIX says you get "siginto_t" *not* "struct siginfo," please fix the code.
> (Is there really nobody doing nightly testing of GCC against glibc master
> branch on x86, which would have shown this earlier?)
I don't test building GCC against glibc master unless I'm making a
potentially ABI breaking change.
We should be rebuilding *all* of userspace when glibc changes. It
would be nice if we setup an OpenEmbedded system to rebuild as much of
x86-64 userspace as possible against a new glibc and check for
regressions.
> Replacing struct siginfo with siginfo_t in sh/linux-unwind.h makes the
> build pass. Is this the desired approach; shall we apply this for all
> cases listed above (and submit to Boehm GC upstream)? I wonder -- if GCC
> breaks, how much software out in the wild is going to break once this
> glibc change ripples through?
You can't know until you try building a full distribution.
Cheers,
Carlos.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc)
2012-03-15 15:57 ` Carlos O'Donell
@ 2012-03-15 16:25 ` H.J. Lu
2012-03-15 23:23 ` Mike Frysinger
2012-03-21 14:56 ` struct siginfo vs. siginfo_t Thomas Schwinge
2 siblings, 0 replies; 8+ messages in thread
From: H.J. Lu @ 2012-03-15 16:25 UTC (permalink / raw)
To: Carlos O'Donell; +Cc: Thomas Schwinge, libc-alpha, gcc-patches, drepper
On Thu, Mar 15, 2012 at 8:57 AM, Carlos O'Donell
<carlos@systemhalted.org> wrote:
> On Thu, Mar 15, 2012 at 11:05 AM, Thomas Schwinge
> <thomas@codesourcery.com> wrote:
>> Hi!
>>
>> On 26 Feb 2012 18:17:52 -0000, drepper@sourceware.org wrote:
>>> http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4efeffc1d583597e4f52985b9747269e47b754e2
>>>
>>> commit 4efeffc1d583597e4f52985b9747269e47b754e2
>>> Author: Ulrich Drepper <drepper@gmail.com>
>>> Date: Sun Feb 26 13:17:27 2012 -0500
>>>
>>> Fix up POSIX testing in conformtest
>>
>>> [...]
>>> + * sysdeps/unix/sysv/linux/bits/siginfo.h: Don't name siginfo_t
>>> + struct. [...]
>>> [...]
>>
>>> diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
>>> index ecef39d..0635e2f 100644
>>> --- a/sysdeps/unix/sysv/linux/bits/siginfo.h
>>> +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
>>> [...]
>>> @@ -47,7 +47,7 @@ typedef union sigval
>>> # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
>>> # endif
>>>
>>> -typedef struct siginfo
>>> +typedef struct
>>> {
>>> int si_signo; /* Signal number. */
>>> int si_errno; /* If non-zero, an errno value associated with
>>> [...]
>>
>> This change breaks GCC:
>>
>> In file included from /scratch/tschwing/FM_sh-linux-gnu-mk2/src/gcc-mainline/libgcc/unwind-dw2.c:377:0:
>> ./md-unwind-support.h: In function 'sh_fallback_frame_state':
>> ./md-unwind-support.h:182:17: error: field 'info' has incomplete type
>>
>> In my case, this is really libgcc/config/sh/linux-unwind.h:
>>
>> [...]
>> 181 struct rt_sigframe {
>> 182 struct siginfo info;
>> 183 struct ucontext uc;
>> 184 } *rt_ = context->cfa;
>> [...]
>
> POSIX says you get "siginto_t" *not* "struct siginfo," please fix the code.
>
"struct siginfo" may not work correctly for Linux/x32
and siginfo_t does since siginfo_t has an alignment
attribute, which isn't applied to "struct siginfo".
--
H.J.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc)
2012-03-15 15:57 ` Carlos O'Donell
2012-03-15 16:25 ` H.J. Lu
@ 2012-03-15 23:23 ` Mike Frysinger
2012-03-21 14:56 ` struct siginfo vs. siginfo_t Thomas Schwinge
2 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2012-03-15 23:23 UTC (permalink / raw)
To: libc-alpha; +Cc: Carlos O'Donell, Thomas Schwinge, gcc-patches, drepper
[-- Attachment #1: Type: Text/Plain, Size: 302 bytes --]
On Thursday 15 March 2012 11:57:00 Carlos O'Donell wrote:
> We should be rebuilding *all* of userspace when glibc changes. It
> would be nice if we setup an OpenEmbedded system to rebuild as much of
> x86-64 userspace as possible against a new glibc and check for
> regressions.
emerge -e world
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: struct siginfo vs. siginfo_t
2012-03-15 15:57 ` Carlos O'Donell
2012-03-15 16:25 ` H.J. Lu
2012-03-15 23:23 ` Mike Frysinger
@ 2012-03-21 14:56 ` Thomas Schwinge
2012-03-27 8:38 ` Thomas Schwinge
2012-03-27 12:34 ` Ian Lance Taylor
2 siblings, 2 replies; 8+ messages in thread
From: Thomas Schwinge @ 2012-03-21 14:56 UTC (permalink / raw)
To: gcc-patches, ian; +Cc: libc-alpha, drepper, Carlos O'Donell
[-- Attachment #1: Type: text/plain, Size: 8867 bytes --]
Hi!
On Thu, 15 Mar 2012 11:57:00 -0400, Carlos O'Donell <carlos@systemhalted.org> wrote:
> On Thu, Mar 15, 2012 at 11:05 AM, Thomas Schwinge
> <thomas@codesourcery.com> wrote:
> > On 26 Feb 2012 18:17:52 -0000, drepper@sourceware.org wrote:
> >> http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4efeffc1d583597e4f52985b9747269e47b754e2
> >>
> >> commit 4efeffc1d583597e4f52985b9747269e47b754e2
> >> Author: Ulrich Drepper <drepper@gmail.com>
> >> Date: Sun Feb 26 13:17:27 2012 -0500
> >>
> >> Fix up POSIX testing in conformtest
> >
> >> [...]
> >> + * sysdeps/unix/sysv/linux/bits/siginfo.h: Don't name siginfo_t
> >> + struct. [...]
> >> [...]
> >
> >> diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
> >> index ecef39d..0635e2f 100644
> >> --- a/sysdeps/unix/sysv/linux/bits/siginfo.h
> >> +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
> >> [...]
> >> @@ -47,7 +47,7 @@ typedef union sigval
> >> # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
> >> # endif
> >>
> >> -typedef struct siginfo
> >> +typedef struct
> >> {
> >> int si_signo; /* Signal number. */
> >> int si_errno; /* If non-zero, an errno value associated with
> >> [...]
> >
> > This change breaks GCC:
> >
> > In file included from /scratch/tschwing/FM_sh-linux-gnu-mk2/src/gcc-mainline/libgcc/unwind-dw2.c:377:0:
> > ./md-unwind-support.h: In function 'sh_fallback_frame_state':
> > ./md-unwind-support.h:182:17: error: field 'info' has incomplete type
> >
> > In my case, this is really libgcc/config/sh/linux-unwind.h:
> >
> > [...]
> > 181 struct rt_sigframe {
> > 182 struct siginfo info;
> > 183 struct ucontext uc;
> > 184 } *rt_ = context->cfa;
> > [...]
>
> POSIX says you get "siginto_t" *not* "struct siginfo," please fix the code.
There is one usage in boehm-gc/os_dep.c, but it is only used if
SUNOS5SIGS is defined, which it is only if one of SUNOS5, DRSNX, HPUX, or
FREEBSD is defined, which are all not using Linux-based glibc ports.
Likewise, gcc/ada/init.c has a struct __siginfo occurence, but only for
__FreeBSD__.
config/rs6000/linux-unwind.h uses ``char siginfo[128]'', and
config/s390/linux-unwind.h also uses a constant.
I tested the following patch for sh-linux-gnu. This only covers one
configuration, but the change is pretty mechanic anyway and every place
that used to refer to struct siginfo already must have had <signal.h> in
its include path, which is the same file that declares siginfo_t.
OK to commit? This should probably also go into any active release
branches, to keep them buildable once this glibc change ripples through?
libgcc/
* config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
siginfo_t instead of struct siginfo.
* config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
* config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
* config/ia64/linux-unwind.h (ia64_fallback_frame_state)
(ia64_handle_unwabi): Likewise.
* config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
* config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
* config/sh/linux-unwind.h (shmedia_fallback_frame_state)
(sh_fallback_frame_state): Likewise.
* config/tilepro/linux-unwind.h (tile_fallback_frame_state): Likewise.
* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
index 4c811dc..f747053 100644
--- a/libgcc/config/alpha/linux-unwind.h
+++ b/libgcc/config/alpha/linux-unwind.h
@@ -49,7 +49,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
{
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
index 88c8285..6e8f1ad 100644
--- a/libgcc/config/bfin/linux-unwind.h
+++ b/libgcc/config/bfin/linux-unwind.h
@@ -48,10 +48,10 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
int sig;
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
char retcode[8];
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
index f17a46c..33810c5 100644
--- a/libgcc/config/i386/linux-unwind.h
+++ b/libgcc/config/i386/linux-unwind.h
@@ -139,9 +139,9 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
int sig;
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/libgcc/config/ia64/linux-unwind.h b/libgcc/config/ia64/linux-unwind.h
index 93f762d..baf80ee 100644
--- a/libgcc/config/ia64/linux-unwind.h
+++ b/libgcc/config/ia64/linux-unwind.h
@@ -47,7 +47,7 @@ ia64_fallback_frame_state (struct _Unwind_Context *context,
struct sigframe {
char scratch[16];
unsigned long sig_number;
- struct siginfo *info;
+ siginfo_t *info;
struct sigcontext *sc;
} *frame_ = (struct sigframe *)context->psp;
struct sigcontext *sc = frame_->sc;
@@ -137,7 +137,7 @@ ia64_handle_unwabi (struct _Unwind_Context *context, _Unwind_FrameState *fs)
struct sigframe {
char scratch[16];
unsigned long sig_number;
- struct siginfo *info;
+ siginfo_t *info;
struct sigcontext *sc;
} *frame = (struct sigframe *)context->psp;
struct sigcontext *sc = frame->sc;
diff --git a/libgcc/config/mips/linux-unwind.h b/libgcc/config/mips/linux-unwind.h
index 02f7cd5..69d96f1 100644
--- a/libgcc/config/mips/linux-unwind.h
+++ b/libgcc/config/mips/linux-unwind.h
@@ -75,7 +75,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe {
u_int32_t ass[4]; /* Argument save space for o32. */
u_int32_t trampoline[2];
- struct siginfo info;
+ siginfo_t info;
_sig_ucontext_t uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
index a0560e9..dd8f590 100644
--- a/libgcc/config/pa/linux-unwind.h
+++ b/libgcc/config/pa/linux-unwind.h
@@ -63,7 +63,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
int i;
struct sigcontext *sc;
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *frame;
diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
index 94ed95d..c1e1adb 100644
--- a/libgcc/config/sh/linux-unwind.h
+++ b/libgcc/config/sh/linux-unwind.h
@@ -80,9 +80,9 @@ shmedia_fallback_frame_state (struct _Unwind_Context *context,
&& (*(unsigned long *) (pc+11) == 0x6ff0fff0))
{
struct rt_sigframe {
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
@@ -179,7 +179,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
&& (*(unsigned short *) (pc+14) == 0x00ad))))
{
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
index 0ed662c..27a6c43 100644
--- a/libgcc/config/tilepro/linux-unwind.h
+++ b/libgcc/config/tilepro/linux-unwind.h
@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe {
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_;
diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
index 32e9349..dda1f29 100644
--- a/libgcc/config/xtensa/linux-unwind.h
+++ b/libgcc/config/xtensa/linux-unwind.h
@@ -62,7 +62,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
struct sigcontext *sc;
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_;
Grüße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: struct siginfo vs. siginfo_t
2012-03-21 14:56 ` struct siginfo vs. siginfo_t Thomas Schwinge
@ 2012-03-27 8:38 ` Thomas Schwinge
2012-03-27 12:34 ` Ian Lance Taylor
1 sibling, 0 replies; 8+ messages in thread
From: Thomas Schwinge @ 2012-03-27 8:38 UTC (permalink / raw)
To: gcc-patches, ian; +Cc: libc-alpha, drepper, Carlos O'Donell
[-- Attachment #1: Type: text/plain, Size: 9376 bytes --]
Hi!
Ping.
On Wed, 21 Mar 2012 15:56:04 +0100, I wrote:
> On Thu, 15 Mar 2012 11:57:00 -0400, Carlos O'Donell <carlos@systemhalted.org> wrote:
> > On Thu, Mar 15, 2012 at 11:05 AM, Thomas Schwinge
> > <thomas@codesourcery.com> wrote:
> > > On 26 Feb 2012 18:17:52 -0000, drepper@sourceware.org wrote:
> > >> http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4efeffc1d583597e4f52985b9747269e47b754e2
> > >>
> > >> commit 4efeffc1d583597e4f52985b9747269e47b754e2
> > >> Author: Ulrich Drepper <drepper@gmail.com>
> > >> Date: Sun Feb 26 13:17:27 2012 -0500
> > >>
> > >> Fix up POSIX testing in conformtest
> > >
> > >> [...]
> > >> + * sysdeps/unix/sysv/linux/bits/siginfo.h: Don't name siginfo_t
> > >> + struct. [...]
> > >> [...]
> > >
> > >> diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
> > >> index ecef39d..0635e2f 100644
> > >> --- a/sysdeps/unix/sysv/linux/bits/siginfo.h
> > >> +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
> > >> [...]
> > >> @@ -47,7 +47,7 @@ typedef union sigval
> > >> # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
> > >> # endif
> > >>
> > >> -typedef struct siginfo
> > >> +typedef struct
> > >> {
> > >> int si_signo; /* Signal number. */
> > >> int si_errno; /* If non-zero, an errno value associated with
> > >> [...]
> > >
> > > This change breaks GCC:
> > >
> > > In file included from /scratch/tschwing/FM_sh-linux-gnu-mk2/src/gcc-mainline/libgcc/unwind-dw2.c:377:0:
> > > ./md-unwind-support.h: In function 'sh_fallback_frame_state':
> > > ./md-unwind-support.h:182:17: error: field 'info' has incomplete type
> > >
> > > In my case, this is really libgcc/config/sh/linux-unwind.h:
> > >
> > > [...]
> > > 181 struct rt_sigframe {
> > > 182 struct siginfo info;
> > > 183 struct ucontext uc;
> > > 184 } *rt_ = context->cfa;
> > > [...]
> >
> > POSIX says you get "siginto_t" *not* "struct siginfo," please fix the code.
>
> There is one usage in boehm-gc/os_dep.c, but it is only used if
> SUNOS5SIGS is defined, which it is only if one of SUNOS5, DRSNX, HPUX, or
> FREEBSD is defined, which are all not using Linux-based glibc ports.
>
> Likewise, gcc/ada/init.c has a struct __siginfo occurence, but only for
> __FreeBSD__.
>
> config/rs6000/linux-unwind.h uses ``char siginfo[128]'', and
> config/s390/linux-unwind.h also uses a constant.
>
> I tested the following patch for sh-linux-gnu. This only covers one
> configuration, but the change is pretty mechanic anyway and every place
> that used to refer to struct siginfo already must have had <signal.h> in
> its include path, which is the same file that declares siginfo_t.
>
> OK to commit? This should probably also go into any active release
> branches, to keep them buildable once this glibc change ripples through?
>
> libgcc/
> * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
> siginfo_t instead of struct siginfo.
> * config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
> * config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
> * config/ia64/linux-unwind.h (ia64_fallback_frame_state)
> (ia64_handle_unwabi): Likewise.
> * config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
> * config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
> * config/sh/linux-unwind.h (shmedia_fallback_frame_state)
> (sh_fallback_frame_state): Likewise.
> * config/tilepro/linux-unwind.h (tile_fallback_frame_state): Likewise.
> * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
>
> diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
> index 4c811dc..f747053 100644
> --- a/libgcc/config/alpha/linux-unwind.h
> +++ b/libgcc/config/alpha/linux-unwind.h
> @@ -49,7 +49,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
> else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
> {
> struct rt_sigframe {
> - struct siginfo info;
> + siginfo_t info;
> struct ucontext uc;
> } *rt_ = context->cfa;
> sc = &rt_->uc.uc_mcontext;
> diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
> index 88c8285..6e8f1ad 100644
> --- a/libgcc/config/bfin/linux-unwind.h
> +++ b/libgcc/config/bfin/linux-unwind.h
> @@ -48,10 +48,10 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
> {
> struct rt_sigframe {
> int sig;
> - struct siginfo *pinfo;
> + siginfo_t *pinfo;
> void *puc;
> char retcode[8];
> - struct siginfo info;
> + siginfo_t info;
> struct ucontext uc;
> } *rt_ = context->cfa;
>
> diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
> index f17a46c..33810c5 100644
> --- a/libgcc/config/i386/linux-unwind.h
> +++ b/libgcc/config/i386/linux-unwind.h
> @@ -139,9 +139,9 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
> {
> struct rt_sigframe {
> int sig;
> - struct siginfo *pinfo;
> + siginfo_t *pinfo;
> void *puc;
> - struct siginfo info;
> + siginfo_t info;
> struct ucontext uc;
> } *rt_ = context->cfa;
> /* The void * cast is necessary to avoid an aliasing warning.
> diff --git a/libgcc/config/ia64/linux-unwind.h b/libgcc/config/ia64/linux-unwind.h
> index 93f762d..baf80ee 100644
> --- a/libgcc/config/ia64/linux-unwind.h
> +++ b/libgcc/config/ia64/linux-unwind.h
> @@ -47,7 +47,7 @@ ia64_fallback_frame_state (struct _Unwind_Context *context,
> struct sigframe {
> char scratch[16];
> unsigned long sig_number;
> - struct siginfo *info;
> + siginfo_t *info;
> struct sigcontext *sc;
> } *frame_ = (struct sigframe *)context->psp;
> struct sigcontext *sc = frame_->sc;
> @@ -137,7 +137,7 @@ ia64_handle_unwabi (struct _Unwind_Context *context, _Unwind_FrameState *fs)
> struct sigframe {
> char scratch[16];
> unsigned long sig_number;
> - struct siginfo *info;
> + siginfo_t *info;
> struct sigcontext *sc;
> } *frame = (struct sigframe *)context->psp;
> struct sigcontext *sc = frame->sc;
> diff --git a/libgcc/config/mips/linux-unwind.h b/libgcc/config/mips/linux-unwind.h
> index 02f7cd5..69d96f1 100644
> --- a/libgcc/config/mips/linux-unwind.h
> +++ b/libgcc/config/mips/linux-unwind.h
> @@ -75,7 +75,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
> struct rt_sigframe {
> u_int32_t ass[4]; /* Argument save space for o32. */
> u_int32_t trampoline[2];
> - struct siginfo info;
> + siginfo_t info;
> _sig_ucontext_t uc;
> } *rt_ = context->cfa;
> sc = &rt_->uc.uc_mcontext;
> diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
> index a0560e9..dd8f590 100644
> --- a/libgcc/config/pa/linux-unwind.h
> +++ b/libgcc/config/pa/linux-unwind.h
> @@ -63,7 +63,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
> int i;
> struct sigcontext *sc;
> struct rt_sigframe {
> - struct siginfo info;
> + siginfo_t info;
> struct ucontext uc;
> } *frame;
>
> diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
> index 94ed95d..c1e1adb 100644
> --- a/libgcc/config/sh/linux-unwind.h
> +++ b/libgcc/config/sh/linux-unwind.h
> @@ -80,9 +80,9 @@ shmedia_fallback_frame_state (struct _Unwind_Context *context,
> && (*(unsigned long *) (pc+11) == 0x6ff0fff0))
> {
> struct rt_sigframe {
> - struct siginfo *pinfo;
> + siginfo_t *pinfo;
> void *puc;
> - struct siginfo info;
> + siginfo_t info;
> struct ucontext uc;
> } *rt_ = context->cfa;
> /* The void * cast is necessary to avoid an aliasing warning.
> @@ -179,7 +179,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
> && (*(unsigned short *) (pc+14) == 0x00ad))))
> {
> struct rt_sigframe {
> - struct siginfo info;
> + siginfo_t info;
> struct ucontext uc;
> } *rt_ = context->cfa;
> /* The void * cast is necessary to avoid an aliasing warning.
> diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
> index 0ed662c..27a6c43 100644
> --- a/libgcc/config/tilepro/linux-unwind.h
> +++ b/libgcc/config/tilepro/linux-unwind.h
> @@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
>
> struct rt_sigframe {
> unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
> - struct siginfo info;
> + siginfo_t info;
> struct ucontext uc;
> } *rt_;
>
> diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
> index 32e9349..dda1f29 100644
> --- a/libgcc/config/xtensa/linux-unwind.h
> +++ b/libgcc/config/xtensa/linux-unwind.h
> @@ -62,7 +62,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
> struct sigcontext *sc;
>
> struct rt_sigframe {
> - struct siginfo info;
> + siginfo_t info;
> struct ucontext uc;
> } *rt_;
>
Grüße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: struct siginfo vs. siginfo_t
2012-03-21 14:56 ` struct siginfo vs. siginfo_t Thomas Schwinge
2012-03-27 8:38 ` Thomas Schwinge
@ 2012-03-27 12:34 ` Ian Lance Taylor
2012-04-20 8:20 ` Thomas Schwinge
1 sibling, 1 reply; 8+ messages in thread
From: Ian Lance Taylor @ 2012-03-27 12:34 UTC (permalink / raw)
To: Thomas Schwinge; +Cc: gcc-patches, libc-alpha, drepper, Carlos O'Donell
Thomas Schwinge <thomas@codesourcery.com> writes:
> libgcc/
> * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
> siginfo_t instead of struct siginfo.
> * config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
> * config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
> * config/ia64/linux-unwind.h (ia64_fallback_frame_state)
> (ia64_handle_unwabi): Likewise.
> * config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
> * config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
> * config/sh/linux-unwind.h (shmedia_fallback_frame_state)
> (sh_fallback_frame_state): Likewise.
> * config/tilepro/linux-unwind.h (tile_fallback_frame_state): Likewise.
> * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
This is OK for mainline and release branches.
Thanks.
Ian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: struct siginfo vs. siginfo_t
2012-03-27 12:34 ` Ian Lance Taylor
@ 2012-04-20 8:20 ` Thomas Schwinge
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Schwinge @ 2012-04-20 8:20 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-patches, libc-alpha, drepper, Carlos O'Donell
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
Hi!
Sorry for the delay.
On Tue, 27 Mar 2012 05:34:30 -0700, Ian Lance Taylor <ian@airs.com> wrote:
> Thomas Schwinge <thomas@codesourcery.com> writes:
>
> > libgcc/
> > * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
> > siginfo_t instead of struct siginfo.
> > * config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
> > * config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
> > * config/ia64/linux-unwind.h (ia64_fallback_frame_state)
> > (ia64_handle_unwabi): Likewise.
> > * config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
> > * config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
> > * config/sh/linux-unwind.h (shmedia_fallback_frame_state)
> > (sh_fallback_frame_state): Likewise.
> > * config/tilepro/linux-unwind.h (tile_fallback_frame_state): Likewise.
> > * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
>
> This is OK for mainline and release branches.
Now committed to GCC trunk (r186610), gcc-4_7-branch (r186611), and
trivially ported (libgcc/ -> gcc/) to gcc-4_6-branch (r186612), and
gcc-4_5-branch (r186613).
Grüße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-04-20 8:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20120226181752.1175.qmail@sourceware.org>
2012-03-15 15:06 ` struct siginfo vs. siginfo_t (was: GNU C Library master sources branch, master, updated. glibc-2.15-229-g4efeffc) Thomas Schwinge
2012-03-15 15:57 ` Carlos O'Donell
2012-03-15 16:25 ` H.J. Lu
2012-03-15 23:23 ` Mike Frysinger
2012-03-21 14:56 ` struct siginfo vs. siginfo_t Thomas Schwinge
2012-03-27 8:38 ` Thomas Schwinge
2012-03-27 12:34 ` Ian Lance Taylor
2012-04-20 8:20 ` Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).