pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/smlnj11072 Sync newer patches (mostly the time ha...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/af28f9ec0196
branches:  trunk
changeset: 349307:af28f9ec0196
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun Jul 03 18:52:32 2016 +0000

description:
Sync newer patches (mostly the time handling fixes) from base smlnj package.

diffstat:

 lang/smlnj11072/distinfo                                        |   5 +-
 lang/smlnj11072/patches/patch-base_runtime_gc_gc-stats.h        |  44 ++++++++++
 lang/smlnj11072/patches/patch-base_runtime_gc_init-gc.c         |  27 ++++++
 lang/smlnj11072/patches/patch-base_runtime_kernel_unix-timers.c |  17 +++
 lang/smlnj11072/patches/patch-base_runtime_mach-dep_unix-prof.c |  15 +++
 lang/smlnj11072/patches/patch-base_runtime_objs_mk.x86-netbsd   |  24 +++++
 lang/smlnj11072/patches/patch-src_runtime_gc_gc-stats.h         |  44 ++++++++++
 lang/smlnj11072/patches/patch-src_runtime_gc_init-gc.c          |  27 ++++++
 lang/smlnj11072/patches/patch-src_runtime_kernel_unix-timers.c  |  17 +++
 lang/smlnj11072/patches/patch-src_runtime_mach-dep_unix-prof.c  |  15 +++
 lang/smlnj11072/patches/patch-src_runtime_objs_mk.x86-netbsd    |  24 +++++
 11 files changed, 256 insertions(+), 3 deletions(-)

diffs (truncated from 320 to 300 lines):

diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/distinfo
--- a/lang/smlnj11072/distinfo  Sun Jul 03 18:49:02 2016 +0000
+++ b/lang/smlnj11072/distinfo  Sun Jul 03 18:52:32 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2016/07/03 18:49:02 dholland Exp $
+$NetBSD: distinfo,v 1.3 2016/07/03 18:52:32 dholland Exp $
 
 SHA1 (smlnj-110.72/MLRISC.tgz) = 9bb9eb169337533304c2e0e4eb9af263d38c398a
 RMD160 (smlnj-110.72/MLRISC.tgz) = 484512df036421e216d4afed01beb978d33e16bb
@@ -62,7 +62,6 @@
 Size (smlnj-110.72/trace-debug-profile.tgz) = 3905 bytes
 SHA1 (patch-aa) = f738a6284236158b6b95928768fe1213cc77fc20
 SHA1 (patch-ab) = 2c9a448c8566d87a2d01528cf6e38ed0dfd9328b
-SHA1 (patch-ac) = f6c30285f55a9537a785d363837ecc83cfd384b7
 SHA1 (patch-ad) = 67802bbdf42408c60bbce4087f20d000a3445677
 SHA1 (patch-ae) = 0ba98fb2b012daf75dcc4ac416cbf0fd3182114b
 SHA1 (patch-af) = 3a1c1cadd26eb246adafff823d49b4ab7161793b
@@ -84,7 +83,7 @@
 SHA1 (patch-base_runtime_kernel_unix-timers.c) = 42f1d2964d5de37fdc232139f74fb9a95f21da07
 SHA1 (patch-base_runtime_mach-dep_unix-prof.c) = 1f28a05cfb271c569cfb9778e67076bbfb14d646
 SHA1 (patch-base_runtime_objs_mk.x86-netbsd) = 7d716c17c0f6a29acca7b630a1526df4d58e18cf
-SHA1 (patch-config___arch-n-opsys) = b0c952b0b9ed6312a115761fdbd4c30aaa208b4c
+SHA1 (patch-config___arch-n-opsys) = f6c30285f55a9537a785d363837ecc83cfd384b7
 SHA1 (patch-src_runtime_gc_gc-stats.h) = af61db9d1f04e566d4c5c2bc5dcf4c6958f0ea78
 SHA1 (patch-src_runtime_gc_init-gc.c) = 5d1d5a13a51d732590dd4f375824bbc389a0525d
 SHA1 (patch-src_runtime_kernel_unix-timers.c) = 1c1db5bce0ec1e72adafb9380027884cf746c75c
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-base_runtime_gc_gc-stats.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-base_runtime_gc_gc-stats.h  Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-base_runtime_gc_gc-stats.h,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Use struct timeval instead of blithely assuming that some private
+struct declaration is always bit compatible with it. (Because it
+isn't.) From PR 40954.
+
+--- base/runtime/gc/gc-stats.h.orig    2009-03-03 18:23:38.000000000 -0500
++++ base/runtime/gc/gc-stats.h 2009-03-03 18:25:04.000000000 -0500
+@@ -16,6 +16,7 @@ extern void ReportVM (ml_state_t *msp, i
+ 
+ #define START_GC_PAUSE(HEAP)  {                                       \
+       if (StatsOn) {                                                  \
++          struct timeval tv;                                          \
+           heap_t          *__heap = (HEAP);                           \
+           stat_rec_t      *__p = &(StatsBuf[NStatsRecs]);             \
+           Unsigned32_t    __n = (Addr_t)(msp->ml_allocPtr) -          \
+@@ -23,7 +24,10 @@ extern void ReportVM (ml_state_t *msp, i
+           CNTR_INCR(&(__heap->numAlloc), __n);                        \
+           __p->allocCnt = __heap->numAlloc;                           \
+           __p->numGens = 0;                                           \
+-          gettimeofday(&(__p->startTime), NIL(struct timezone *));    \
++          gettimeofday(&tv, NIL(struct timezone *));                  \
++          /* XXX breaks in 2038 */                                    \
++          __p->startTime.seconds = tv.tv_sec;                         \
++          __p->startTime.uSeconds = tv.tv_usec;                       \
+       }                                                               \
+     }
+ 
+@@ -34,8 +38,11 @@ extern void ReportVM (ml_state_t *msp, i
+ 
+ #define STOP_GC_PAUSE()                       {                               \
+       if (StatsOn) {                                                  \
+-          gettimeofday(&(StatsBuf[NStatsRecs].stopTime),              \
+-              NIL(struct timezone *));                                \
++          struct timeval tv;                                          \
++          gettimeofday(&tv, NIL(struct timezone *));                  \
++          /* XXX breaks in 2038 */                                    \
++          StatsBuf[NStatsRecs].stopTime.seconds = tv.tv_sec;          \
++          StatsBuf[NStatsRecs].stopTime.uSeconds = tv.tv_usec;        \
+           STATS_FINISH();                                             \
+       }                                                               \
+     }
+
+
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-base_runtime_gc_init-gc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-base_runtime_gc_init-gc.c   Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-base_runtime_gc_init-gc.c,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Use struct timeval instead of blithely assuming that some private
+struct declaration is always bit compatible with it. (Because it
+isn't.) From PR 40954.
+
+--- base/runtime/gc/init-gc.c.orig     2009-03-03 18:15:36.000000000 -0500
++++ base/runtime/gc/init-gc.c  2009-03-03 18:17:03.000000000 -0500
+@@ -218,12 +218,16 @@ void InitHeap (ml_state_t *msp, bool_t i
+ #if defined(COLLECT_STATS)
+     if (StatsFD > 0) {
+       stat_hdr_t      hdr;
++      struct timeval  tv;
+       CNTR_ZERO(&(heap->numAlloc));
+       hdr.mask = STATMASK_ALLOC|STATMASK_NGENS|STATMASK_START|STATMASK_STOP;
+       hdr.isNewRuntime = 1;
+       hdr.allocSzB = params->allocSz;
+       hdr.numGens = params->numGens;
+-      gettimeofday (&(hdr.startTime), NIL(struct timezone *));
++      gettimeofday (&tv, NIL(struct timezone *));
++      /* XXX breaks in 2038 */
++      hdr.startTime.seconds = tv.tv_sec;
++      hdr.startTime.uSeconds = tv.tv_usec;
+       write (StatsFD, (char *)&hdr, sizeof(stat_hdr_t));
+     }
+ #endif
+
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-base_runtime_kernel_unix-timers.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-base_runtime_kernel_unix-timers.c   Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-base_runtime_kernel_unix-timers.c,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Don't blithely assume that some internal type has the same layout as a
+system type. It doesn't. Same issue as PR 40954, but a new case that I
+either didn't find at the time or has appeared since.
+
+--- base/runtime/kernel/unix-timers.c~ 2000-06-01 18:34:03.000000000 +0000
++++ base/runtime/kernel/unix-timers.c
+@@ -18,7 +18,7 @@ typedef struct rusage time_struct_t;
+ #define GET_TIME(t)           getrusage(RUSAGE_SELF, &(t))
+ #define SYS_TIME(t)           ((t).ru_stime)
+ #define USR_TIME(t)           ((t).ru_utime)
+-#define SET_TIME(tp, t)               { *((struct timeval *)(tp)) = (t); }
++#define SET_TIME(tp, t)               { (tp)->seconds = (t).tv_sec; (tp)->uSeconds = (t).tv_usec; }
+ 
+ #else /* !HAS_GETRUSAGE */
+ 
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-base_runtime_mach-dep_unix-prof.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-base_runtime_mach-dep_unix-prof.c   Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-base_runtime_mach-dep_unix-prof.c,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Use own abstractions correctly.
+
+--- base/runtime/mach-dep/unix-prof.c~ 2005-01-18 17:58:39.000000000 +0000
++++ base/runtime/mach-dep/unix-prof.c
+@@ -34,7 +34,7 @@ void EnableProfSignals ()
+  */
+ void DisableProfSignals ()
+ {
+-    SIG_SetHandler (SIGVTALRM, SIG_DFL);
++    SIG_SetDefault (SIGVTALRM);
+ 
+ } /* end of DisableProfSignals */
+ 
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-base_runtime_objs_mk.x86-netbsd
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-base_runtime_objs_mk.x86-netbsd     Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-base_runtime_objs_mk.x86-netbsd,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Configure for pkgsrc. Build as 32-bit.
+
+--- base/runtime/objs/mk.x86-netbsd.orig       2015-04-22 07:11:37.000000000 +0000
++++ base/runtime/objs/mk.x86-netbsd
+@@ -7,9 +7,10 @@ SHELL =               /bin/sh
+ 
+ MAKE =                gmake
+ 
++AS =          as --32
+ ARFLAGS =     Trcv
+ CC =          gcc -ansi
+-CFLAGS =      -O2
++CFLAGS =      -O2 -m32
+ CPP =         gcc -x assembler-with-cpp -E -P
+ #CPP =                /usr/bin/cpp -P
+ 
+@@ -23,4 +24,4 @@ VERSION =    v-x86-netbsd
+ RUNTIME =     run.x86-netbsd
+ 
+ all:
+-      ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" 
LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++      ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" 
LD_LIBS="$(LD_LIBS)" $(RUNTIME))
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-src_runtime_gc_gc-stats.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-src_runtime_gc_gc-stats.h   Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-src_runtime_gc_gc-stats.h,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Use struct timeval instead of blithely assuming that some private
+struct declaration is always bit compatible with it. (Because it
+isn't.) From PR 40954.
+
+--- src/runtime/gc/gc-stats.h.orig     2009-03-03 18:23:38.000000000 -0500
++++ src/runtime/gc/gc-stats.h  2009-03-03 18:25:04.000000000 -0500
+@@ -16,6 +16,7 @@ extern void ReportVM (ml_state_t *msp, i
+ 
+ #define START_GC_PAUSE(HEAP)  {                                       \
+       if (StatsOn) {                                                  \
++          struct timeval tv;                                          \
+           heap_t          *__heap = (HEAP);                           \
+           stat_rec_t      *__p = &(StatsBuf[NStatsRecs]);             \
+           Unsigned32_t    __n = (Addr_t)(msp->ml_allocPtr) -          \
+@@ -23,7 +24,10 @@ extern void ReportVM (ml_state_t *msp, i
+           CNTR_INCR(&(__heap->numAlloc), __n);                        \
+           __p->allocCnt = __heap->numAlloc;                           \
+           __p->numGens = 0;                                           \
+-          gettimeofday(&(__p->startTime), NIL(struct timezone *));    \
++          gettimeofday(&tv, NIL(struct timezone *));                  \
++          /* XXX breaks in 2038 */                                    \
++          __p->startTime.seconds = tv.tv_sec;                         \
++          __p->startTime.uSeconds = tv.tv_usec;                       \
+       }                                                               \
+     }
+ 
+@@ -34,8 +38,11 @@ extern void ReportVM (ml_state_t *msp, i
+ 
+ #define STOP_GC_PAUSE()                       {                               \
+       if (StatsOn) {                                                  \
+-          gettimeofday(&(StatsBuf[NStatsRecs].stopTime),              \
+-              NIL(struct timezone *));                                \
++          struct timeval tv;                                          \
++          gettimeofday(&tv, NIL(struct timezone *));                  \
++          /* XXX breaks in 2038 */                                    \
++          StatsBuf[NStatsRecs].stopTime.seconds = tv.tv_sec;          \
++          StatsBuf[NStatsRecs].stopTime.uSeconds = tv.tv_usec;        \
+           STATS_FINISH();                                             \
+       }                                                               \
+     }
+
+
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-src_runtime_gc_init-gc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-src_runtime_gc_init-gc.c    Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_runtime_gc_init-gc.c,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Use struct timeval instead of blithely assuming that some private
+struct declaration is always bit compatible with it. (Because it
+isn't.) From PR 40954.
+
+--- src/runtime/gc/init-gc.c.orig      2009-03-03 18:15:36.000000000 -0500
++++ src/runtime/gc/init-gc.c   2009-03-03 18:17:03.000000000 -0500
+@@ -218,12 +218,16 @@ void InitHeap (ml_state_t *msp, bool_t i
+ #if defined(COLLECT_STATS)
+     if (StatsFD > 0) {
+       stat_hdr_t      hdr;
++      struct timeval  tv;
+       CNTR_ZERO(&(heap->numAlloc));
+       hdr.mask = STATMASK_ALLOC|STATMASK_NGENS|STATMASK_START|STATMASK_STOP;
+       hdr.isNewRuntime = 1;
+       hdr.allocSzB = params->allocSz;
+       hdr.numGens = params->numGens;
+-      gettimeofday (&(hdr.startTime), NIL(struct timezone *));
++      gettimeofday (&tv, NIL(struct timezone *));
++      /* XXX breaks in 2038 */
++      hdr.startTime.seconds = tv.tv_sec;
++      hdr.startTime.uSeconds = tv.tv_usec;
+       write (StatsFD, (char *)&hdr, sizeof(stat_hdr_t));
+     }
+ #endif
+
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-src_runtime_kernel_unix-timers.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-src_runtime_kernel_unix-timers.c    Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_runtime_kernel_unix-timers.c,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Don't blithely assume that some internal type has the same layout as a
+system type. It doesn't. Same issue as PR 40954, but a new case that I
+either didn't find at the time or has appeared since.
+
+--- src/runtime/kernel/unix-timers.c~  2000-06-01 18:34:03.000000000 +0000
++++ src/runtime/kernel/unix-timers.c
+@@ -18,7 +18,7 @@ typedef struct rusage time_struct_t;
+ #define GET_TIME(t)           getrusage(RUSAGE_SELF, &(t))
+ #define SYS_TIME(t)           ((t).ru_stime)
+ #define USR_TIME(t)           ((t).ru_utime)
+-#define SET_TIME(tp, t)               { *((struct timeval *)(tp)) = (t); }
++#define SET_TIME(tp, t)               { (tp)->seconds = (t).tv_sec; (tp)->uSeconds = (t).tv_usec; }
+ 
+ #else /* !HAS_GETRUSAGE */
+ 
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-src_runtime_mach-dep_unix-prof.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-src_runtime_mach-dep_unix-prof.c    Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_runtime_mach-dep_unix-prof.c,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Use own abstractions correctly.
+
+--- src/runtime/mach-dep/unix-prof.c~  2005-01-18 17:58:39.000000000 +0000
++++ src/runtime/mach-dep/unix-prof.c
+@@ -34,7 +34,7 @@ void EnableProfSignals ()
+  */
+ void DisableProfSignals ()
+ {
+-    SIG_SetHandler (SIGVTALRM, SIG_DFL);
++    SIG_SetDefault (SIGVTALRM);
+ 
+ } /* end of DisableProfSignals */
+ 
diff -r 76306126713f -r af28f9ec0196 lang/smlnj11072/patches/patch-src_runtime_objs_mk.x86-netbsd
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/smlnj11072/patches/patch-src_runtime_objs_mk.x86-netbsd      Sun Jul 03 18:52:32 2016 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_runtime_objs_mk.x86-netbsd,v 1.1 2016/07/03 18:52:32 dholland Exp $
+
+Configure for pkgsrc. Build as 32-bit.
+



Home | Main Index | Thread Index | Old Index