13.5.1-gc74.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. diff -r -U1 ecl-13.5.1.orig/src/aclocal.m4 ecl-13.5.1/src/aclocal.m4
  2. --- ecl-13.5.1.orig/src/aclocal.m4 2013-05-28 03:37:36.000000000 +0700
  3. +++ ecl-13.5.1/src/aclocal.m4 2014-01-12 00:34:36.663129950 +0700
  4. @@ -942,2 +942,6 @@
  5. fi
  6. + if test "${system_boehm}" = "yes"; then
  7. + AC_CHECK_LIB( [gc], [GC_set_start_callback],
  8. + [AC_DEFINE(HAVE_GC_SET_START_CALLBACK)], [] )
  9. + fi
  10. AC_MSG_CHECKING( [whether we can use the existing Boehm-Weiser library] )
  11. diff -r -U1 ecl-13.5.1.orig/src/c/alloc_2.d ecl-13.5.1/src/c/alloc_2.d
  12. --- ecl-13.5.1.orig/src/c/alloc_2.d 2013-05-28 03:37:36.000000000 +0700
  13. +++ ecl-13.5.1/src/c/alloc_2.d 2014-01-12 00:43:44.177106924 +0700
  14. @@ -33,2 +33,9 @@
  15. +static void (*GC_old_start_callback)(void) = NULL;
  16. +#ifdef HAVE_GC_START_CALLBACK
  17. +extern void GC_set_start_callback(void *);
  18. +extern void *GC_get_start_callback(void *);
  19. +#else
  20. +extern void *GC_start_call_back(void);
  21. +#endif
  22. static void gather_statistics();
  23. @@ -752,3 +759,2 @@
  24. extern void (*GC_push_other_roots)();
  25. -extern void (*GC_start_call_back)();
  26. static void (*old_GC_push_other_roots)();
  27. @@ -1092,3 +1098,9 @@
  28. GC_push_other_roots = stacks_scanner;
  29. +#ifdef HAVE_GC_SET_START_CALLBACK
  30. + GC_old_start_callback = GC_get_start_callback();
  31. + GC_set_start_callback(gather_statistics);
  32. +#else
  33. + GC_old_start_callback = GC_start_call_back;
  34. GC_start_call_back = (void (*)())gather_statistics;
  35. +#endif
  36. GC_java_finalization = 1;
  37. @@ -1200,3 +1212,3 @@
  38. */
  39. -#if 1 /*GBC_BOEHM == 0*/
  40. +#if GBC_BOEHM == 0
  41. extern int GC_print_stats;
  42. @@ -1279,2 +1291,4 @@
  43. }
  44. + if (GC_old_start_callback)
  45. + GC_old_start_callback();
  46. }
  47. Только в ecl-13.5.1/src/c: alloc_2.d.orig
  48. diff -r -U1 ecl-13.5.1.orig/src/h/config.h.in ecl-13.5.1/src/h/config.h.in
  49. --- ecl-13.5.1.orig/src/h/config.h.in 2013-05-28 03:37:36.000000000 +0700
  50. +++ ecl-13.5.1/src/h/config.h.in 2014-01-12 00:34:36.663129950 +0700
  51. @@ -310,2 +310,5 @@
  52. +/* GC_set_start_callback */
  53. +#define HAVE_GC_SET_START_CALLBACK
  54. +
  55. /*