Sun Jul 3 19:35:13 2016 UTC ()
Patch up some compiler warnings in the hope of fixing the crashy build.
No such luck though...
(dholland)
diff -r1.32 -r1.33 pkgsrc/lang/smlnj/Makefile
diff -r1.23 -r1.24 pkgsrc/lang/smlnj/distinfo
diff -r1.2 -r1.3 pkgsrc/lang/smlnj/patches/patch-ao
diff -r0 -r1.1 pkgsrc/lang/smlnj/patches/patch-src_runtime_c-libs_posix-filesys_stat.c
diff -r0 -r1.1 pkgsrc/lang/smlnj/patches/patch-src_runtime_c-libs_posix-filesys_stat__64.c
diff -r0 -r1.1 pkgsrc/lang/smlnj/patches/patch-src_runtime_c-libs_posix-procenv_time.c
diff -r0 -r1.1 pkgsrc/lang/smlnj/patches/patch-src_runtime_c-libs_smlnj-date_mktime.c
diff -r0 -r1.1 pkgsrc/lang/smlnj/patches/patch-src_runtime_c-libs_smlnj-runtime_gc-ctl.c
diff -r0 -r1.1 pkgsrc/lang/smlnj/patches/patch-src_runtime_gc_c-globals-tbl.c
diff -r0 -r1.1 pkgsrc/lang/smlnj/patches/patch-src_runtime_gc_heap-out-util.c
diff -r0 -r1.1 pkgsrc/lang/smlnj/patches/patch-src_runtime_gc_mem-writer.c
diff -r0 -r1.1 pkgsrc/lang/smlnj/patches/patch-src_runtime_kernel_main.c
--- pkgsrc/lang/smlnj/Makefile 2016/07/03 19:26:35 1.32
+++ pkgsrc/lang/smlnj/Makefile 2016/07/03 19:35:13 1.33
| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.32 2016/07/03 19:26:35 dholland Exp $ | | 1 | # $NetBSD: Makefile,v 1.33 2016/07/03 19:35:13 dholland Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | DISTNAME= boot.${BOX}-unix | | 4 | DISTNAME= boot.${BOX}-unix |
5 | PKGNAME= smlnj-${SML_VERSION} | | 5 | PKGNAME= smlnj-${SML_VERSION} |
6 | CATEGORIES= lang | | 6 | CATEGORIES= lang |
7 | MASTER_SITES= http://smlnj.cs.uchicago.edu/dist/working/${SML_VERSION}/ | | 7 | MASTER_SITES= http://smlnj.cs.uchicago.edu/dist/working/${SML_VERSION}/ |
8 | DISTFILES= MLRISC.tgz \ | | 8 | DISTFILES= MLRISC.tgz \ |
9 | boot.${BOX}-unix.tgz \ | | 9 | boot.${BOX}-unix.tgz \ |
10 | ckit.tgz \ | | 10 | ckit.tgz \ |
11 | cm.tgz \ | | 11 | cm.tgz \ |
12 | cml.tgz \ | | 12 | cml.tgz \ |
13 | compiler.tgz \ | | 13 | compiler.tgz \ |
14 | config.tgz \ | | 14 | config.tgz \ |
| @@ -41,26 +41,29 @@ USE_TOOLS+= gmake pax | | | @@ -41,26 +41,29 @@ USE_TOOLS+= gmake pax |
41 | CONFLICTS= sml-nj-[0-9]* | | 41 | CONFLICTS= sml-nj-[0-9]* |
42 | | | 42 | |
43 | SML_BASE= ${PREFIX}/lib/smlnj | | 43 | SML_BASE= ${PREFIX}/lib/smlnj |
44 | SML_LIBDIR= ${SML_BASE}/lib | | 44 | SML_LIBDIR= ${SML_BASE}/lib |
45 | SML_BINDIR= ${SML_BASE}/bin | | 45 | SML_BINDIR= ${SML_BASE}/bin |
46 | SML_SCRIPTS= _link-sml _run-sml _ml-build _ml-makedepend | | 46 | SML_SCRIPTS= _link-sml _run-sml _ml-build _ml-makedepend |
47 | | | 47 | |
48 | # while building, the work directory is the "installation" | | 48 | # while building, the work directory is the "installation" |
49 | BUILD_ENV+= SMLNJ_HOME="${WRKDIR}" | | 49 | BUILD_ENV+= SMLNJ_HOME="${WRKDIR}" |
50 | | | 50 | |
51 | # the build uses patch directly (yuk) | | 51 | # the build uses patch directly (yuk) |
52 | BUILD_ENV+= PATCH=${PATCH:Q} PATCH_ARGS=${PATCH_ARGS:Q} | | 52 | BUILD_ENV+= PATCH=${PATCH:Q} PATCH_ARGS=${PATCH_ARGS:Q} |
53 | | | 53 | |
| | | 54 | # useful for debugging |
| | | 55 | #CFLAGS+= -Wall |
| | | 56 | |
54 | # note that this includes bsd.prefs.mk | | 57 | # note that this includes bsd.prefs.mk |
55 | .include "../../lang/smlnj/Makefile.common" | | 58 | .include "../../lang/smlnj/Makefile.common" |
56 | | | 59 | |
57 | # | | 60 | # |
58 | # For smlnj reasons the runtime system needs to be unpacked twice, once | | 61 | # For smlnj reasons the runtime system needs to be unpacked twice, once |
59 | # in work/src and once in work/base. | | 62 | # in work/src and once in work/base. |
60 | # | | 63 | # |
61 | # As of 20160624, instead of inconsistently patching one copy or the | | 64 | # As of 20160624, instead of inconsistently patching one copy or the |
62 | # other and hoping, or patching both and duplicating all the patches, | | 65 | # other and hoping, or patching both and duplicating all the patches, |
63 | # we'll patch only work/src, and then *after* patching clone work/src | | 66 | # we'll patch only work/src, and then *after* patching clone work/src |
64 | # into work/base. | | 67 | # into work/base. |
65 | # | | 68 | # |
66 | | | 69 | |
--- pkgsrc/lang/smlnj/distinfo 2016/07/03 19:29:27 1.23
+++ pkgsrc/lang/smlnj/distinfo 2016/07/03 19:35:13 1.24
| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | $NetBSD: distinfo,v 1.23 2016/07/03 19:29:27 dholland Exp $ | | 1 | $NetBSD: distinfo,v 1.24 2016/07/03 19:35:13 dholland Exp $ |
2 | | | 2 | |
3 | SHA1 (smlnj-110.73/MLRISC.tgz) = 59a38a4a1c63cecf97764a99577b3f929b5ccbc9 | | 3 | SHA1 (smlnj-110.73/MLRISC.tgz) = 59a38a4a1c63cecf97764a99577b3f929b5ccbc9 |
4 | RMD160 (smlnj-110.73/MLRISC.tgz) = dd951776482f37421a17701d67c051741691c6cb | | 4 | RMD160 (smlnj-110.73/MLRISC.tgz) = dd951776482f37421a17701d67c051741691c6cb |
5 | SHA512 (smlnj-110.73/MLRISC.tgz) = e16a213face6dbc128fc117a6ea30042ee49aa3aa985b3b6a9ea4f3ebd8392e2fc9db96451f49eddeab8f35a36665c1dc3dc77b6c615eae1b277192f16805d6b | | 5 | SHA512 (smlnj-110.73/MLRISC.tgz) = e16a213face6dbc128fc117a6ea30042ee49aa3aa985b3b6a9ea4f3ebd8392e2fc9db96451f49eddeab8f35a36665c1dc3dc77b6c615eae1b277192f16805d6b |
6 | Size (smlnj-110.73/MLRISC.tgz) = 1422538 bytes | | 6 | Size (smlnj-110.73/MLRISC.tgz) = 1422538 bytes |
7 | SHA1 (smlnj-110.73/boot.x86-unix.tgz) = f2a6b89708d41d5968bf6f2e2ee713704f3664fd | | 7 | SHA1 (smlnj-110.73/boot.x86-unix.tgz) = f2a6b89708d41d5968bf6f2e2ee713704f3664fd |
8 | RMD160 (smlnj-110.73/boot.x86-unix.tgz) = c6fa71d7a14e79d095159ebd877b7562e88eeeb5 | | 8 | RMD160 (smlnj-110.73/boot.x86-unix.tgz) = c6fa71d7a14e79d095159ebd877b7562e88eeeb5 |
9 | SHA512 (smlnj-110.73/boot.x86-unix.tgz) = 389f18bf989ff70aa4b4e174547bfc1ac00e5b3d0a57d60c96fc105252b94c8233fce0bdc868670386853bad9cc2a8643e9a1d3881bed1e0367d62a6451d6b78 | | 9 | SHA512 (smlnj-110.73/boot.x86-unix.tgz) = 389f18bf989ff70aa4b4e174547bfc1ac00e5b3d0a57d60c96fc105252b94c8233fce0bdc868670386853bad9cc2a8643e9a1d3881bed1e0367d62a6451d6b78 |
10 | Size (smlnj-110.73/boot.x86-unix.tgz) = 5838645 bytes | | 10 | Size (smlnj-110.73/boot.x86-unix.tgz) = 5838645 bytes |
11 | SHA1 (smlnj-110.73/ckit.tgz) = afbb7c03aa3aac813f4ce6686a68998b2612bea9 | | 11 | SHA1 (smlnj-110.73/ckit.tgz) = afbb7c03aa3aac813f4ce6686a68998b2612bea9 |
12 | RMD160 (smlnj-110.73/ckit.tgz) = 56586583bbc8eff89e560e692705a7adc8f9c8e9 | | 12 | RMD160 (smlnj-110.73/ckit.tgz) = 56586583bbc8eff89e560e692705a7adc8f9c8e9 |
13 | SHA512 (smlnj-110.73/ckit.tgz) = 555f5b3e7efaa73a9e30da03f664054f68dfe43072f4d380581cd77c5c75a6eb0f6ec296aa304d88d16f796227c45c0a1200c8f03bd6fc6f4160879edcd84299 | | 13 | SHA512 (smlnj-110.73/ckit.tgz) = 555f5b3e7efaa73a9e30da03f664054f68dfe43072f4d380581cd77c5c75a6eb0f6ec296aa304d88d16f796227c45c0a1200c8f03bd6fc6f4160879edcd84299 |
14 | Size (smlnj-110.73/ckit.tgz) = 196369 bytes | | 14 | Size (smlnj-110.73/ckit.tgz) = 196369 bytes |
| @@ -80,33 +80,42 @@ SHA1 (smlnj-110.73/trace-debug-profile.t | | | @@ -80,33 +80,42 @@ SHA1 (smlnj-110.73/trace-debug-profile.t |
80 | RMD160 (smlnj-110.73/trace-debug-profile.tgz) = e6cdae53b060c85782424d792bdf4673c5ddbf1e | | 80 | RMD160 (smlnj-110.73/trace-debug-profile.tgz) = e6cdae53b060c85782424d792bdf4673c5ddbf1e |
81 | SHA512 (smlnj-110.73/trace-debug-profile.tgz) = f806a36a2d9d500af0975f8d2ebb38b8189fc9732f3163ad3bc3c7b7fd13cba965ab41754b4e37ef576005b2733b41cf291fb2d4ae5c47ec2a51a751507b911f | | 81 | SHA512 (smlnj-110.73/trace-debug-profile.tgz) = f806a36a2d9d500af0975f8d2ebb38b8189fc9732f3163ad3bc3c7b7fd13cba965ab41754b4e37ef576005b2733b41cf291fb2d4ae5c47ec2a51a751507b911f |
82 | Size (smlnj-110.73/trace-debug-profile.tgz) = 3899 bytes | | 82 | Size (smlnj-110.73/trace-debug-profile.tgz) = 3899 bytes |
83 | SHA1 (patch-aa) = f738a6284236158b6b95928768fe1213cc77fc20 | | 83 | SHA1 (patch-aa) = f738a6284236158b6b95928768fe1213cc77fc20 |
84 | SHA1 (patch-ad) = 67802bbdf42408c60bbce4087f20d000a3445677 | | 84 | SHA1 (patch-ad) = 67802bbdf42408c60bbce4087f20d000a3445677 |
85 | SHA1 (patch-ae) = 0ba98fb2b012daf75dcc4ac416cbf0fd3182114b | | 85 | SHA1 (patch-ae) = 0ba98fb2b012daf75dcc4ac416cbf0fd3182114b |
86 | SHA1 (patch-af) = 3a1c1cadd26eb246adafff823d49b4ab7161793b | | 86 | SHA1 (patch-af) = 3a1c1cadd26eb246adafff823d49b4ab7161793b |
87 | SHA1 (patch-ah) = 93d7453dc82d91d29662cc02dd8ab9e8b8987393 | | 87 | SHA1 (patch-ah) = 93d7453dc82d91d29662cc02dd8ab9e8b8987393 |
88 | SHA1 (patch-ai) = 6a15a5415bd73e6618bc45b9a7eb021543e9cecd | | 88 | SHA1 (patch-ai) = 6a15a5415bd73e6618bc45b9a7eb021543e9cecd |
89 | SHA1 (patch-aj) = 6318548da4c943c60fe63d41529803ea3fa2c96e | | 89 | SHA1 (patch-aj) = 6318548da4c943c60fe63d41529803ea3fa2c96e |
90 | SHA1 (patch-ak) = 6fb3d4444c75123dc8c5fa7bb6cea835c78ef6e3 | | 90 | SHA1 (patch-ak) = 6fb3d4444c75123dc8c5fa7bb6cea835c78ef6e3 |
91 | SHA1 (patch-am) = 95f3e5a041163279f68e782469a30f6f765b7511 | | 91 | SHA1 (patch-am) = 95f3e5a041163279f68e782469a30f6f765b7511 |
92 | SHA1 (patch-an) = 3d750d5d20b2d3ab69b492eb60e27aded45ec3f7 | | 92 | SHA1 (patch-an) = 3d750d5d20b2d3ab69b492eb60e27aded45ec3f7 |
93 | SHA1 (patch-ao) = 1c66024c5949269291cbf6f815baf6162db47d31 | | 93 | SHA1 (patch-ao) = 1cf3dfb01314556bcb0cd61e2d0d1577e1cebc04 |
94 | SHA1 (patch-ap) = af8b50c0f21e969e036064f5c808eaccc79d5c4b | | 94 | SHA1 (patch-ap) = af8b50c0f21e969e036064f5c808eaccc79d5c4b |
95 | SHA1 (patch-aq) = 32d96ad2552d5ac914581686904e94a96e5ca059 | | 95 | SHA1 (patch-aq) = 32d96ad2552d5ac914581686904e94a96e5ca059 |
96 | SHA1 (patch-at) = cd7d23adaf8882e9b431d6581283fdb58044e05c | | 96 | SHA1 (patch-at) = cd7d23adaf8882e9b431d6581283fdb58044e05c |
97 | SHA1 (patch-config___arch-n-opsys) = b0c952b0b9ed6312a115761fdbd4c30aaa208b4c | | 97 | SHA1 (patch-config___arch-n-opsys) = b0c952b0b9ed6312a115761fdbd4c30aaa208b4c |
| | | 98 | SHA1 (patch-src_runtime_c-libs_posix-filesys_stat.c) = d5a315ac342a8a59099ae9eb131c899250a2404f |
| | | 99 | SHA1 (patch-src_runtime_c-libs_posix-filesys_stat__64.c) = 2a3e1f6ffc8f688e3c2ebf8b5913481093feb0fa |
| | | 100 | SHA1 (patch-src_runtime_c-libs_posix-procenv_time.c) = 4c38da9110687b179237deef7fee389e0bbece4c |
| | | 101 | SHA1 (patch-src_runtime_c-libs_smlnj-date_mktime.c) = a3bcb173a99972ab65208f65083bb30a7e09ab67 |
| | | 102 | SHA1 (patch-src_runtime_c-libs_smlnj-runtime_gc-ctl.c) = 673d04282ef95093012a2c1e2b66d867357ee4ef |
| | | 103 | SHA1 (patch-src_runtime_gc_c-globals-tbl.c) = 19ac4ccc3ed0e784c1aeab0fe3ed781417540561 |
98 | SHA1 (patch-src_runtime_gc_gc-stats.h) = af61db9d1f04e566d4c5c2bc5dcf4c6958f0ea78 | | 104 | SHA1 (patch-src_runtime_gc_gc-stats.h) = af61db9d1f04e566d4c5c2bc5dcf4c6958f0ea78 |
| | | 105 | SHA1 (patch-src_runtime_gc_heap-out-util.c) = 214c673e57efda9346b200509a1beb48af2aa443 |
99 | SHA1 (patch-src_runtime_gc_init-gc.c) = 5d1d5a13a51d732590dd4f375824bbc389a0525d | | 106 | SHA1 (patch-src_runtime_gc_init-gc.c) = 5d1d5a13a51d732590dd4f375824bbc389a0525d |
| | | 107 | SHA1 (patch-src_runtime_gc_mem-writer.c) = d43974ff5e8e576490656f9d24daf66fecab4849 |
| | | 108 | SHA1 (patch-src_runtime_kernel_main.c) = db26470b16f56e93ebecc62f34aa6b7a474089ec |
100 | SHA1 (patch-src_runtime_kernel_unix-timers.c) = 1c1db5bce0ec1e72adafb9380027884cf746c75c | | 109 | SHA1 (patch-src_runtime_kernel_unix-timers.c) = 1c1db5bce0ec1e72adafb9380027884cf746c75c |
101 | SHA1 (patch-src_runtime_mach-dep_unix-prof.c) = 90a4b81e2a8532e4e06f29bfe42c55423a0f4154 | | 110 | SHA1 (patch-src_runtime_mach-dep_unix-prof.c) = 90a4b81e2a8532e4e06f29bfe42c55423a0f4154 |
102 | SHA1 (patch-src_runtime_objs_mk.alpha32-dunix) = 9e3a36f4663cd685459f2fbde41b8c5f154bd9c2 | | 111 | SHA1 (patch-src_runtime_objs_mk.alpha32-dunix) = 9e3a36f4663cd685459f2fbde41b8c5f154bd9c2 |
103 | SHA1 (patch-src_runtime_objs_mk.alpha32x-osf1) = 6e91f672aadb77bd1d1ab65bfa66e3d7f745846c | | 112 | SHA1 (patch-src_runtime_objs_mk.alpha32x-osf1) = 6e91f672aadb77bd1d1ab65bfa66e3d7f745846c |
104 | SHA1 (patch-src_runtime_objs_mk.hppa-hpux) = 40ca27d05490983e734b4d20eecd268935ad2461 | | 113 | SHA1 (patch-src_runtime_objs_mk.hppa-hpux) = 40ca27d05490983e734b4d20eecd268935ad2461 |
105 | SHA1 (patch-src_runtime_objs_mk.hppa-hpux11) = c7ad7769ba05b4fe609a6396d2c8dadb80256e06 | | 114 | SHA1 (patch-src_runtime_objs_mk.hppa-hpux11) = c7ad7769ba05b4fe609a6396d2c8dadb80256e06 |
106 | SHA1 (patch-src_runtime_objs_mk.hppa-hpux9) = 6adacac502cd12576ea65882984979ce3aa78b41 | | 115 | SHA1 (patch-src_runtime_objs_mk.hppa-hpux9) = 6adacac502cd12576ea65882984979ce3aa78b41 |
107 | SHA1 (patch-src_runtime_objs_mk.ppc-aix) = 509ffc0152b2cdfa4e0f6621bed026fe0f1edc99 | | 116 | SHA1 (patch-src_runtime_objs_mk.ppc-aix) = 509ffc0152b2cdfa4e0f6621bed026fe0f1edc99 |
108 | SHA1 (patch-src_runtime_objs_mk.ppc-darwin) = 6ae822c7b39255b5204e358e3c21aa23b93883ec | | 117 | SHA1 (patch-src_runtime_objs_mk.ppc-darwin) = 6ae822c7b39255b5204e358e3c21aa23b93883ec |
109 | SHA1 (patch-src_runtime_objs_mk.ppc-darwin5) = 35ddd1f10a907ebbe6b4a3310c3bded83bda8ca0 | | 118 | SHA1 (patch-src_runtime_objs_mk.ppc-darwin5) = 35ddd1f10a907ebbe6b4a3310c3bded83bda8ca0 |
110 | SHA1 (patch-src_runtime_objs_mk.ppc-linux) = 171ec491a536aa782880d3b3392cf0d728fd9c03 | | 119 | SHA1 (patch-src_runtime_objs_mk.ppc-linux) = 171ec491a536aa782880d3b3392cf0d728fd9c03 |
111 | SHA1 (patch-src_runtime_objs_mk.x86-cygwin) = b9e1174a956a63b1023eaf70322776fe93717782 | | 120 | SHA1 (patch-src_runtime_objs_mk.x86-cygwin) = b9e1174a956a63b1023eaf70322776fe93717782 |
112 | SHA1 (patch-src_runtime_objs_mk.x86-darwin) = 7770986d2805f66f1c4d4faff2fb66b2fb4b7b8d | | 121 | SHA1 (patch-src_runtime_objs_mk.x86-darwin) = 7770986d2805f66f1c4d4faff2fb66b2fb4b7b8d |
--- pkgsrc/lang/smlnj/patches/patch-ao 2003/07/01 23:19:14 1.2
+++ pkgsrc/lang/smlnj/patches/patch-ao 2016/07/03 19:35:13 1.3
| @@ -1,13 +1,26 @@ | | | @@ -1,13 +1,26 @@ |
1 | $NetBSD: patch-ao,v 1.2 2003/07/01 23:19:14 jtb Exp $ | | 1 | $NetBSD: patch-ao,v 1.3 2016/07/03 19:35:13 dholland Exp $ |
2 | | | 2 | |
3 | --- src/runtime/kernel/boot.c.orig | | 3 | - use fgetc correctly |
| | | 4 | - fix uninitialized variable detected by gcc5 |
| | | 5 | |
| | | 6 | --- src/runtime/kernel/boot.c.orig 2005-11-02 22:24:39.000000000 +0000 |
4 | +++ src/runtime/kernel/boot.c | | 7 | +++ src/runtime/kernel/boot.c |
5 | @@ -124,7 +124,7 @@ | | 8 | @@ -130,7 +130,7 @@ PVT ml_val_t BuildFileList (ml_state_t * |
6 | ml_val_t fileList; | | 9 | ml_val_t fileList; |
7 | # define SIZE_BUF_LEN 128 /* this should be plenty for two numbers */ | | 10 | # define SIZE_BUF_LEN 128 /* this should be plenty for two numbers */ |
8 | char sizeBuf[SIZE_BUF_LEN]; | | 11 | char sizeBuf[SIZE_BUF_LEN]; |
9 | - char c; | | 12 | - char c; |
10 | + int c; | | 13 | + int c; |
11 | | | 14 | |
12 | numFiles = 0; | | 15 | numFiles = 0; |
13 | | | 16 | |
| | | 17 | @@ -175,6 +175,9 @@ PVT ml_val_t BuildFileList (ml_state_t * |
| | | 18 | } |
| | | 19 | fclose (listF); |
| | | 20 | } |
| | | 21 | + else { |
| | | 22 | + *mbplp = 0; |
| | | 23 | + } |
| | | 24 | |
| | | 25 | /* create the in-heap list */ |
| | | 26 | for (fileList = LIST_nil, i = numFiles; --i >= 0; ) { |
$NetBSD: patch-src_runtime_c-libs_posix-filesys_stat.c,v 1.1 2016/07/03 19:35:13 dholland Exp $
Be explicit about truncating times, and avoid compiler warning.
--- src/runtime/c-libs/posix-filesys/stat.c~ 2000-06-01 18:34:03.000000000 +0000
+++ src/runtime/c-libs/posix-filesys/stat.c
@@ -3,6 +3,7 @@
* COPYRIGHT (c) 1995 by AT&T Bell Laboratories.
*/
+#include <stdint.h>
#include "ml-unixdep.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -34,6 +35,7 @@
PVT ml_val_t mkStatRep (ml_state_t *msp, struct stat *buf)
{
int ftype;
+ int32_t tmp;
ml_val_t mode, ino, dev, uid, gid, nlink, sr, atime, mtime, ctime;
#if ((S_IFDIR != 0x4000) || (S_IFCHR != 0x2000) || (S_IFBLK != 0x6000) || (S_IFREG != 0x8000) || (S_IFIFO != 0x1000) || (S_IFLNK != 0xA000) || (S_IFSOCK != 0xC000))
@@ -59,9 +61,14 @@ PVT ml_val_t mkStatRep (ml_state_t *msp,
WORD_ALLOC (msp, nlink, (Word_t)(buf->st_nlink));
WORD_ALLOC (msp, uid, (Word_t)(buf->st_uid));
WORD_ALLOC (msp, gid, (Word_t)(buf->st_gid));
- INT32_ALLOC (msp, atime, buf->st_atime);
- INT32_ALLOC (msp, mtime, buf->st_mtime);
- INT32_ALLOC (msp, ctime, buf->st_ctime);
+
+ /* XXX y2038 */
+ tmp = buf->st_atime;
+ INT32_ALLOC (msp, atime, tmp);
+ tmp = buf->st_mtime;
+ INT32_ALLOC (msp, mtime, tmp);
+ tmp = buf->st_ctime;
+ INT32_ALLOC (msp, ctime, tmp);
/* allocate the stat record */
ML_AllocWrite(msp, 0, MAKE_DESC(11, DTAG_record));
$NetBSD: patch-src_runtime_c-libs_posix-filesys_stat__64.c,v 1.1 2016/07/03 19:35:13 dholland Exp $
Be explicit about truncating times, and avoid compiler warning.
--- src/runtime/c-libs/posix-filesys/stat_64.c.orig 2004-11-24 20:27:30.000000000 +0000
+++ src/runtime/c-libs/posix-filesys/stat_64.c
@@ -4,6 +4,8 @@
*
* Copyright (c) 2004 by The Fellowship of SML/NJ
*/
+
+#include <stdint.h>
#include "ml-unixdep.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -36,6 +38,7 @@
PVT ml_val_t mkStatRep (ml_state_t *msp, struct stat *buf)
{
int ftype;
+ int32_t tmp;
ml_val_t mode, ino, dev, uid, gid, nlink, sr, atime, mtime, ctime,
szhi, szlo;
@@ -68,9 +71,14 @@ PVT ml_val_t mkStatRep (ml_state_t *msp,
WORD_ALLOC (msp, szhi, (Word_t)0);
}
WORD_ALLOC (msp, szlo, (Word_t)(buf->st_size));
- INT32_ALLOC (msp, atime, buf->st_atime);
- INT32_ALLOC (msp, mtime, buf->st_mtime);
- INT32_ALLOC (msp, ctime, buf->st_ctime);
+
+ /* XXX y2038 */
+ tmp = buf->st_atime;
+ INT32_ALLOC (msp, atime, tmp);
+ tmp = buf->st_mtime;
+ INT32_ALLOC (msp, mtime, tmp);
+ tmp = buf->st_ctime;
+ INT32_ALLOC (msp, ctime, tmp);
/* allocate the stat record */
ML_AllocWrite(msp, 0, MAKE_DESC(12, DTAG_record));
$NetBSD: patch-src_runtime_c-libs_posix-procenv_time.c,v 1.1 2016/07/03 19:35:13 dholland Exp $
Be explicit about truncating times, and avoid compiler warning.
--- src/runtime/c-libs/posix-procenv/time.c~ 2000-06-01 18:34:03.000000000 +0000
+++ src/runtime/c-libs/posix-procenv/time.c
@@ -3,6 +3,7 @@
* COPYRIGHT (c) 1995 by AT&T Bell Laboratories.
*/
+#include <stdint.h>
#include "ml-base.h"
#include "ml-values.h"
#include "ml-objects.h"
@@ -17,11 +18,14 @@
ml_val_t _ml_P_ProcEnv_time (ml_state_t *msp, ml_val_t arg)
{
time_t t;
+ int32_t tt;
ml_val_t res;
t = time (NIL(time_t*));
- INT32_ALLOC(msp, res, t);
+ /* XXX y2038 */
+ tt = t;
+ INT32_ALLOC(msp, res, tt);
return res;
} /* end of _ml_P_ProcEnv_time */
$NetBSD: patch-src_runtime_c-libs_smlnj-date_mktime.c,v 1.1 2016/07/03 19:35:13 dholland Exp $
Use standard headers.
Be explicit about truncating times, and avoid compiler warning.
--- src/runtime/c-libs/smlnj-date/mktime.c~ 2007-06-01 16:19:33.000000000 +0000
+++ src/runtime/c-libs/smlnj-date/mktime.c
@@ -3,6 +3,8 @@
* COPYRIGHT (c) 1995 AT&T Bell Laboratories.
*/
+#include <string.h>
+#include <stdint.h>
#include <time.h>
#include "ml-base.h"
#include "ml-c.h"
@@ -40,8 +41,11 @@ ml_val_t _ml_Date_mktime (ml_state_t *ms
}
else {
ml_val_t res;
+ /* XXX y2038 */
+ int32_t tt;
- INT32_ALLOC(msp, res, t);
+ tt = t;
+ INT32_ALLOC(msp, res, tt);
return res;
}
$NetBSD: patch-src_runtime_c-libs_smlnj-runtime_gc-ctl.c,v 1.1 2016/07/03 19:35:13 dholland Exp $
Use standard headers.
--- src/runtime/c-libs/smlnj-runtime/gc-ctl.c~ 2005-05-05 16:25:12.000000000 +0000
+++ src/runtime/c-libs/smlnj-runtime/gc-ctl.c
@@ -5,6 +5,7 @@
* General interface for GC control functions.
*/
+#include <string.h>
#include "ml-base.h"
#include "ml-values.h"
#include "ml-state.h"
$NetBSD: patch-src_runtime_gc_c-globals-tbl.c,v 1.1 2016/07/03 19:35:13 dholland Exp $
Use standard headers.
--- src/runtime/gc/c-globals-tbl.c~ 2000-06-01 18:34:03.000000000 +0000
+++ src/runtime/gc/c-globals-tbl.c
@@ -6,6 +6,7 @@
* in the ML heap (e.g., references to C functions).
*/
+#include <string.h>
#include "ml-base.h"
#include "tags.h"
#include "ml-values.h"
$NetBSD: patch-src_runtime_gc_heap-out-util.c,v 1.1 2016/07/03 19:35:13 dholland Exp $
Use standard headers.
--- src/runtime/gc/heap-out-util.c~ 2000-06-01 18:34:03.000000000 +0000
+++ src/runtime/gc/heap-out-util.c
@@ -5,6 +5,7 @@
* Utility routines to export (or blast) an ML heap image.
*/
+#include <string.h>
#include "ml-base.h"
#include "heap.h"
#include "ml-values.h"
$NetBSD: patch-src_runtime_gc_mem-writer.c,v 1.1 2016/07/03 19:35:13 dholland Exp $
Use standard headers.
--- src/runtime/gc/mem-writer.c~ 2000-06-01 18:34:03.000000000 +0000
+++ src/runtime/gc/mem-writer.c
@@ -5,6 +5,7 @@
* An implementation of the abstract writers on top of memory regions.
*/
+#include <string.h>
#include "ml-base.h"
#include "writer.h"
$NetBSD: patch-src_runtime_kernel_main.c,v 1.1 2016/07/03 19:35:13 dholland Exp $
Use standard headers.
--- src/runtime/kernel/main.c~ 2005-05-05 16:25:12.000000000 +0000
+++ src/runtime/kernel/main.c
@@ -6,6 +6,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include <ctype.h>
#include "ml-base.h"
#include "ml-options.h"