]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use ucontext_t not struct ucontext in linux-unwind.h files.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 4 Jul 2017 10:25:10 +0000 (11:25 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 4 Jul 2017 10:25:10 +0000 (11:25 +0100)
Current glibc no longer gives the ucontext_t type the tag struct
ucontext, to conform with POSIX namespace rules.  This requires
various linux-unwind.h files in libgcc, that were previously using
struct ucontext, to be fixed to use ucontext_t instead.  This is
similar to the removal of the struct siginfo tag from siginfo_t some
years ago.

This patch changes those files to use ucontext_t instead.  As the
standard name that should be unconditionally safe, so this is not
restricted to architectures supported by glibc, or conditioned on the
glibc version.

Tested compilation together with current glibc with glibc's
build-many-glibcs.py.

* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
config/alpha/linux-unwind.h (alpha_fallback_frame_state),
config/bfin/linux-unwind.h (bfin_fallback_frame_state),
config/i386/linux-unwind.h (x86_64_fallback_frame_state,
x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
config/pa/linux-unwind.h (pa32_fallback_frame_state),
config/sh/linux-unwind.h (sh_fallback_frame_state),
config/tilepro/linux-unwind.h (tile_fallback_frame_state),
config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
ucontext_t instead of struct ucontext.

From-SVN: r249958

libgcc/ChangeLog
libgcc/config/aarch64/linux-unwind.h
libgcc/config/alpha/linux-unwind.h
libgcc/config/bfin/linux-unwind.h
libgcc/config/i386/linux-unwind.h
libgcc/config/m68k/linux-unwind.h
libgcc/config/nios2/linux-unwind.h
libgcc/config/pa/linux-unwind.h
libgcc/config/sh/linux-unwind.h
libgcc/config/tilepro/linux-unwind.h
libgcc/config/xtensa/linux-unwind.h

index 8d43ecadf80cddbb37d49dbd6272db9ed075d8e2..10cfbad50b2eb1cc625c89303157798b99ca6888 100644 (file)
@@ -1,3 +1,17 @@
+2017-07-04  Joseph Myers  <joseph@codesourcery.com>
+
+       * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+       config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+       config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+       config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+       x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+       uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+       config/pa/linux-unwind.h (pa32_fallback_frame_state),
+       config/sh/linux-unwind.h (sh_fallback_frame_state),
+       config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+       config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+       ucontext_t instead of struct ucontext.
+
 2017-05-30  Max Filippov  <jcmvbkbc@gmail.com>
 
        Backport from mainline
index 86d17b1c7981d17947e1f70793d290219af618f1..909f68f73110ec2f7c287c55a0716d2369aea261 100644 (file)
@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
   struct rt_sigframe
   {
     siginfo_t info;
-    struct ucontext uc;
+    ucontext_t uc;
   };
 
   struct rt_sigframe *rt_;
index d65474fec12f84b4dc65a5874dba99f2fc2be4e1..9a226b195b569190b03e1b0ef7efa3b6204c474e 100644 (file)
@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
     {
       struct rt_sigframe {
        siginfo_t info;
-       struct ucontext uc;
+       ucontext_t uc;
       } *rt_ = context->cfa;
       sc = &rt_->uc.uc_mcontext;
     }
index 0c270e435c7e82bc7b613d9bfc122be2ffb30d7a..7fa95d2dc96fb2ca2def62a224de546a675309a3 100644 (file)
@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
        void *puc;
        char retcode[8];
        siginfo_t info;
-       struct ucontext uc;
+       ucontext_t uc;
       } *rt_ = context->cfa;
 
       /* The void * cast is necessary to avoid an aliasing warning.
index e54bf73b1fd29b943d631f30c49acc97bdad1a4d..d35fc4566ce1ed37f5cd428ab63f424b1fbcf6e5 100644 (file)
@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
   if (*(unsigned char *)(pc+0) == 0x48
       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
     {
-      struct ucontext *uc_ = context->cfa;
+      ucontext_t *uc_ = context->cfa;
       /* The void * cast is necessary to avoid an aliasing warning.
          The aliasing warning is correct, but should not be a problem
          because it does not alias anything.  */
@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
        siginfo_t *pinfo;
        void *puc;
        siginfo_t info;
-       struct ucontext uc;
+       ucontext_t uc;
       } *rt_ = context->cfa;
       /* The void * cast is necessary to avoid an aliasing warning.
          The aliasing warning is correct, but should not be a problem
index fb79a4d63cd562b1c8f040317bdfd72f03763168..b2f5ea4cd7c12842b54a57c911273e442c574af6 100644 (file)
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 /* <sys/ucontext.h> is unfortunately broken right now.  */
 struct uw_ucontext {
        unsigned long     uc_flags;
-       struct ucontext  *uc_link;
+       ucontext_t       *uc_link;
        stack_t           uc_stack;
        mcontext_t        uc_mcontext;
        unsigned long     uc_filler[80];
index dff1c20076ee947592b30ecb6e37dc60c8e6dbc0..1d88afecb12188d25a73405751c3e7fbf4440803 100644 (file)
@@ -38,7 +38,7 @@ struct nios2_mcontext {
 
 struct nios2_ucontext {
   unsigned long uc_flags;
-  struct ucontext *uc_link;
+  ucontext_t *uc_link;
   stack_t uc_stack;
   struct nios2_mcontext uc_mcontext;
   sigset_t uc_sigmask; /* mask last for extensibility */
index 01494685ea44b269224b36d15444abb936aa1457..91575356803ab7231f296dc8417a582ed1190fb2 100644 (file)
@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
   struct sigcontext *sc;
   struct rt_sigframe {
     siginfo_t info;
-    struct ucontext uc;
+    ucontext_t uc;
   } *frame;
 
   /* rt_sigreturn trampoline:
index e63091f287c3f90e228eca31bc001d56dcc1d3df..67033f06b4b3d7bb67ea9c94d8f5e5377f18e5f9 100644 (file)
@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
     {
       struct rt_sigframe {
        siginfo_t info;
-       struct ucontext uc;
+       ucontext_t uc;
       } *rt_ = context->cfa;
       /* The void * cast is necessary to avoid an aliasing warning.
          The aliasing warning is correct, but should not be a problem
index fd83ba7c2759c483cc84885a85132fb975388743..e3c9ef0840d07e732018b12ed3ba46800c08e271 100644 (file)
@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
   struct rt_sigframe {
     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
     siginfo_t info;
-    struct ucontext uc;
+    ucontext_t uc;
   } *rt_;
 
   /* Return if this is not a signal handler.  */
index 9a67b5d2b4614e9a09d4802f4111a2c148d59d20..98b7ea60e81dc631cf6e638b03f2a0a0ec384668 100644 (file)
@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
 
   struct rt_sigframe {
     siginfo_t info;
-    struct ucontext uc;
+    ucontext_t uc;
   } *rt_;
 
   /* movi a2, __NR_rt_sigreturn; syscall */