002-siginfo_t.patch 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. There is one usage in boehm-gc/os_dep.c, but it is only used if
  2. SUNOS5SIGS is defined, which it is only if one of SUNOS5, DRSNX, HPUX, or
  3. FREEBSD is defined, which are all not using Linux-based glibc ports.
  4. Likewise, gcc/ada/init.c has a struct __siginfo occurence, but only for
  5. __FreeBSD__.
  6. config/rs6000/linux-unwind.h uses ``char siginfo[128]'', and
  7. config/s390/linux-unwind.h also uses a constant.
  8. I tested the following patch for sh-linux-gnu. This only covers one
  9. configuration, but the change is pretty mechanic anyway and every place
  10. that used to refer to struct siginfo already must have had <signal.h> in
  11. its include path, which is the same file that declares siginfo_t.
  12. OK to commit? This should probably also go into any active release
  13. branches, to keep them buildable once this glibc change ripples through?
  14. gcc/
  15. * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
  16. siginfo_t instead of struct siginfo.
  17. * config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
  18. * config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
  19. * config/ia64/linux-unwind.h (ia64_fallback_frame_state)
  20. (ia64_handle_unwabi): Likewise.
  21. * config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
  22. * config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
  23. * config/sh/linux-unwind.h (shmedia_fallback_frame_state)
  24. (sh_fallback_frame_state): Likewise.
  25. * config/tilepro/linux-unwind.h (tile_fallback_frame_state): Likewise.
  26. * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
  27. ---
  28. diff -urN gcc-linaro-4.6-2012.02/gcc/config/alpha/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/alpha/linux-unwind.h
  29. --- gcc-linaro-4.6-2012.02/gcc/config/alpha/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
  30. +++ gcc-linaro-4.6-2012.02.new/gcc/config/alpha/linux-unwind.h 2012-09-13 10:25:52.919072751 +0200
  31. @@ -49,7 +49,7 @@
  32. else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
  33. {
  34. struct rt_sigframe {
  35. - struct siginfo info;
  36. + siginfo_t info;
  37. struct ucontext uc;
  38. } *rt_ = context->cfa;
  39. sc = &rt_->uc.uc_mcontext;
  40. diff -urN gcc-linaro-4.6-2012.02/gcc/config/bfin/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/bfin/linux-unwind.h
  41. --- gcc-linaro-4.6-2012.02/gcc/config/bfin/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
  42. +++ gcc-linaro-4.6-2012.02.new/gcc/config/bfin/linux-unwind.h 2012-09-13 10:26:14.819073313 +0200
  43. @@ -48,10 +48,10 @@
  44. {
  45. struct rt_sigframe {
  46. int sig;
  47. - struct siginfo *pinfo;
  48. + siginfo_t *pinfo;
  49. void *puc;
  50. char retcode[8];
  51. - struct siginfo info;
  52. + siginfo_t info;
  53. struct ucontext uc;
  54. } *rt_ = context->cfa;
  55. diff -urN gcc-linaro-4.6-2012.02/gcc/config/i386/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/i386/linux-unwind.h
  56. --- gcc-linaro-4.6-2012.02/gcc/config/i386/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
  57. +++ gcc-linaro-4.6-2012.02.new/gcc/config/i386/linux-unwind.h 2012-09-13 10:26:41.891074005 +0200
  58. @@ -133,9 +133,9 @@
  59. {
  60. struct rt_sigframe {
  61. int sig;
  62. - struct siginfo *pinfo;
  63. + siginfo_t *pinfo;
  64. void *puc;
  65. - struct siginfo info;
  66. + siginfo_t info;
  67. struct ucontext uc;
  68. } *rt_ = context->cfa;
  69. /* The void * cast is necessary to avoid an aliasing warning.
  70. diff -urN gcc-linaro-4.6-2012.02/gcc/config/ia64/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/ia64/linux-unwind.h
  71. --- gcc-linaro-4.6-2012.02/gcc/config/ia64/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
  72. +++ gcc-linaro-4.6-2012.02.new/gcc/config/ia64/linux-unwind.h 2012-09-13 10:26:59.251074450 +0200
  73. @@ -47,7 +47,7 @@
  74. struct sigframe {
  75. char scratch[16];
  76. unsigned long sig_number;
  77. - struct siginfo *info;
  78. + siginfo_t *info;
  79. struct sigcontext *sc;
  80. } *frame_ = (struct sigframe *)context->psp;
  81. struct sigcontext *sc = frame_->sc;
  82. @@ -137,7 +137,7 @@
  83. struct sigframe {
  84. char scratch[16];
  85. unsigned long sig_number;
  86. - struct siginfo *info;
  87. + siginfo_t *info;
  88. struct sigcontext *sc;
  89. } *frame = (struct sigframe *)context->psp;
  90. struct sigcontext *sc = frame->sc;
  91. diff -urN gcc-linaro-4.6-2012.02/gcc/config/mips/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/mips/linux-unwind.h
  92. --- gcc-linaro-4.6-2012.02/gcc/config/mips/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
  93. +++ gcc-linaro-4.6-2012.02.new/gcc/config/mips/linux-unwind.h 2012-09-13 10:27:17.947074929 +0200
  94. @@ -75,7 +75,7 @@
  95. struct rt_sigframe {
  96. u_int32_t ass[4]; /* Argument save space for o32. */
  97. u_int32_t trampoline[2];
  98. - struct siginfo info;
  99. + siginfo_t info;
  100. _sig_ucontext_t uc;
  101. } *rt_ = context->cfa;
  102. sc = &rt_->uc.uc_mcontext;
  103. diff -urN gcc-linaro-4.6-2012.02/gcc/config/pa/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/pa/linux-unwind.h
  104. --- gcc-linaro-4.6-2012.02/gcc/config/pa/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
  105. +++ gcc-linaro-4.6-2012.02.new/gcc/config/pa/linux-unwind.h 2012-09-13 10:27:27.491075173 +0200
  106. @@ -63,7 +63,7 @@
  107. int i;
  108. struct sigcontext *sc;
  109. struct rt_sigframe {
  110. - struct siginfo info;
  111. + siginfo_t info;
  112. struct ucontext uc;
  113. } *frame;
  114. diff -urN gcc-linaro-4.6-2012.02/gcc/config/sh/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/sh/linux-unwind.h
  115. --- gcc-linaro-4.6-2012.02/gcc/config/sh/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
  116. +++ gcc-linaro-4.6-2012.02.new/gcc/config/sh/linux-unwind.h 2012-09-13 10:27:58.551075969 +0200
  117. @@ -80,9 +80,9 @@
  118. && (*(unsigned long *) (pc+11) == 0x6ff0fff0))
  119. {
  120. struct rt_sigframe {
  121. - struct siginfo *pinfo;
  122. + siginfo_t *pinfo;
  123. void *puc;
  124. - struct siginfo info;
  125. + siginfo_t info;
  126. struct ucontext uc;
  127. } *rt_ = context->cfa;
  128. /* The void * cast is necessary to avoid an aliasing warning.
  129. @@ -179,7 +179,7 @@
  130. && (*(unsigned short *) (pc+14) == 0x00ad))))
  131. {
  132. struct rt_sigframe {
  133. - struct siginfo info;
  134. + siginfo_t info;
  135. struct ucontext uc;
  136. } *rt_ = context->cfa;
  137. /* The void * cast is necessary to avoid an aliasing warning.
  138. diff -urN gcc-linaro-4.6-2012.02/gcc/config/xtensa/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/xtensa/linux-unwind.h
  139. --- gcc-linaro-4.6-2012.02/gcc/config/xtensa/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
  140. +++ gcc-linaro-4.6-2012.02.new/gcc/config/xtensa/linux-unwind.h 2012-09-13 10:28:13.827076359 +0200
  141. @@ -62,7 +62,7 @@
  142. struct sigcontext *sc;
  143. struct rt_sigframe {
  144. - struct siginfo info;
  145. + siginfo_t info;
  146. struct ucontext uc;
  147. } *rt_;