0002-Do-not-include-sigcontext.h-and-asm-sigcontext.h.patch 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From c887470e0e3310c81ecdb7e736bc5d2ead45db2a Mon Sep 17 00:00:00 2001
  2. From: Ivan Maidanski <ivmai@mail.ru>
  3. Date: Mon, 6 Apr 2015 20:06:47 +0300
  4. Subject: [PATCH 1/1] Do not include sigcontext.h and asm/sigcontext.h (these
  5. Linux headers define sigcontext which is no longer used as replaced with
  6. ucontext_t in GC 7.0alpha1)
  7. * os_dep.c: Do not include linux/version.h (do not test
  8. LINUX_VERSION_CODE), asm/signal.h, sigcontext.h, asm/sigcontext.h
  9. since struct sigcontext not used in GC v7+.
  10. Signed-off-by: Brendan Heading <brendanheading@gmail.com>
  11. Upstream-status: backport
  12. ---
  13. os_dep.c | 30 ------------------------------
  14. 1 file changed, 30 deletions(-)
  15. diff --git a/os_dep.c b/os_dep.c
  16. index f62d4ed..a1bafbd 100644
  17. --- a/os_dep.c
  18. +++ b/os_dep.c
  19. @@ -16,36 +16,6 @@
  20. #include "private/gc_priv.h"
  21. -#if defined(LINUX) && !defined(POWERPC) && !defined(NO_SIGCONTEXT_H)
  22. -# include <linux/version.h>
  23. -# if (LINUX_VERSION_CODE <= 0x10400)
  24. - /* Ugly hack to get struct sigcontext_struct definition. Required */
  25. - /* for some early 1.3.X releases. Will hopefully go away soon. */
  26. - /* in some later Linux releases, asm/sigcontext.h may have to */
  27. - /* be included instead. */
  28. -# define __KERNEL__
  29. -# include <asm/signal.h>
  30. -# undef __KERNEL__
  31. -# else
  32. - /* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */
  33. - /* struct sigcontext. libc6 (glibc2) uses "struct sigcontext" in */
  34. - /* prototypes, so we have to include the top-level sigcontext.h to */
  35. - /* make sure the former gets defined to be the latter if appropriate. */
  36. -# include <features.h>
  37. -# if 2 <= __GLIBC__
  38. -# if 2 == __GLIBC__ && 0 == __GLIBC_MINOR__
  39. - /* glibc 2.1 no longer has sigcontext.h. But signal.h */
  40. - /* has the right declaration for glibc 2.1. */
  41. -# include <sigcontext.h>
  42. -# endif /* 0 == __GLIBC_MINOR__ */
  43. -# else /* __GLIBC__ < 2 */
  44. - /* libc5 doesn't have <sigcontext.h>: go directly with the kernel */
  45. - /* one. Check LINUX_VERSION_CODE to see which we should reference. */
  46. -# include <asm/sigcontext.h>
  47. -# endif /* __GLIBC__ < 2 */
  48. -# endif
  49. -#endif /* LINUX && !POWERPC */
  50. -
  51. #if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MACOS) \
  52. && !defined(MSWINCE) && !defined(__CC_ARM)
  53. # include <sys/types.h>
  54. --
  55. 2.4.3