summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglenda@cirno <glenda@cirno>2015-06-25 23:00:02 -0700
committerglenda@cirno <glenda@cirno>2015-06-25 23:00:02 -0700
commit98972288339fd5d5f6466557e704f3737eab3c67 (patch)
tree47137ca93e63b5d0734e2c79e4edaf562df61f4a
parent0fb976c84f8eb424017c6ab6215a8e39cf14f727 (diff)
downloadmc-98972288339fd5d5f6466557e704f3737eab3c67.tar.gz
Export type info correctly on plan9
-rw-r--r--6/genp9.c4
-rw-r--r--libstd/env+plan9.myr2
-rw-r--r--libstd/fmt.myr4
-rw-r--r--libstd/syswrap+plan9.myr2
-rw-r--r--mbld/fsel.myr4
-rw-r--r--mbld/opts.myr2
-rwxr-xr-xmk/bootstrap/bootstrap+Plan9-amd64.sh6
-rwxr-xr-xtest/runtest.rc2
8 files changed, 15 insertions, 11 deletions
diff --git a/6/genp9.c b/6/genp9.c
index 5a9a84d..eff1bc9 100644
--- a/6/genp9.c
+++ b/6/genp9.c
@@ -555,9 +555,9 @@ static size_t gentyblob(FILE *fd, Blob *b, size_t off, char *lbl)
break;
case Btref:
if (b->ref.isextern)
- fprintf(fd, "DATA %s+%zd(SB)/8,$%s<>+0(SB)\n", lbl, off+n, b->ref.str);
- else
fprintf(fd, "DATA %s+%zd(SB)/8,$%s+0(SB)\n", lbl, off+n, b->ref.str);
+ else
+ fprintf(fd, "DATA %s+%zd(SB)/8,$%s<>+0(SB)\n", lbl, off+n, b->ref.str);
n += 8;
break;
case Btbytes:
diff --git a/libstd/env+plan9.myr b/libstd/env+plan9.myr
index cb051d4..4a95ed7 100644
--- a/libstd/env+plan9.myr
+++ b/libstd/env+plan9.myr
@@ -37,7 +37,7 @@ const getenv = {name
match envfind(name)
| `Some val: -> `Some val
| `None:
- s = bfmt(buf[:], "/env/%s", name)
+ s = bfmt(buf[:], "/env/{}", name)
match std.slurp(s)
| `Fail m: -> `None
| `Ok data:
diff --git a/libstd/fmt.myr b/libstd/fmt.myr
index ae7c9ee..2fba705 100644
--- a/libstd/fmt.myr
+++ b/libstd/fmt.myr
@@ -143,9 +143,10 @@ const sbfmt = {sb, fmt, args
}
const sbfmtv = {sb, fmt, ap -> size
- var nfmt, nparams, pl
+ var nfmt, nparams, pl, orig
var c, params, ty
+ orig = fmt
nparams = ap.tc.nelt
nfmt = 0
if !fmtmapinited
@@ -186,6 +187,7 @@ const sbfmtv = {sb, fmt, ap -> size
:fmtdone
;;
if nfmt != nparams
+ write(1, orig)
die("too many params for fmt\n")
;;
-> sb.len
diff --git a/libstd/syswrap+plan9.myr b/libstd/syswrap+plan9.myr
index 030772e..b18b8da 100644
--- a/libstd/syswrap+plan9.myr
+++ b/libstd/syswrap+plan9.myr
@@ -131,7 +131,7 @@ const getsysinfo = {si
si.system = getenvv("osname", "Plan9")
si.release = "4"
si.version = "0"
- si.arch = getenvv("objtype", "unknown")
+ si.arch = getenvv("objtype", "amd64")
}
const close = {fd; -> sys.close(fd castto(sys.fd)) castto(int64)}
diff --git a/mbld/fsel.myr b/mbld/fsel.myr
index 3d10570..a9a1729 100644
--- a/mbld/fsel.myr
+++ b/mbld/fsel.myr
@@ -96,7 +96,7 @@ const addsysattrs = {sa
| "osx": attrs = ["osx", "posixy"][:]
| "linux": attrs = ["linux", "posixy"][:]
| "plan9": attrs = ["plan9"][:]
- | unknown: std.fatal("unknown system \"{}\"\n", unknown)
+ | unknown: std.fatal("unknown systemx \"{}\"\n", unknown)
;;
for a in attrs
std.htput(sa, a, true)
@@ -104,7 +104,7 @@ const addsysattrs = {sa
match opt_arch
| "x64": attrs = ["x64"][:]
- | unknown: std.fatal("unknown arch {}\n", unknown)
+ | unknown: std.fatal("unknown architecture {}\n", unknown)
;;
for a in attrs
std.htput(sa, a, true)
diff --git a/mbld/opts.myr b/mbld/opts.myr
index 0fd4465..41aef91 100644
--- a/mbld/opts.myr
+++ b/mbld/opts.myr
@@ -56,7 +56,7 @@ const initopts = {
| "Darwin": opt_sys = "osx"
| "FreeBSD": opt_sys = "freebsd"
| "Plan9": opt_sys = "plan9"
- | unknown: std.fatal("unknown system \"{}\"\n", unknown)
+ | unknown: std.fatal("unknown systemy \"{}\"\n", unknown)
;;
match si.arch
diff --git a/mk/bootstrap/bootstrap+Plan9-amd64.sh b/mk/bootstrap/bootstrap+Plan9-amd64.sh
index d89a852..ebca2d7 100755
--- a/mk/bootstrap/bootstrap+Plan9-amd64.sh
+++ b/mk/bootstrap/bootstrap+Plan9-amd64.sh
@@ -19,8 +19,10 @@ echo ../6/6.out -I . slfill.myr ; ../6/6.out -I . slfill.myr
echo ../6/6.out -I . clear.myr ; ../6/6.out -I . clear.myr
echo ../6/6.out -I . extremum.myr ; ../6/6.out -I . extremum.myr
echo ../6/6.out -I . units.myr ; ../6/6.out -I . units.myr
-echo ../6/6.out -I . alloc.myr ; ../6/6.out -I . alloc.myr
-echo ../6/6.out -I . utf.myr ; ../6/6.out -I . utf.myr
+echo ../6/6.out -I . alloc.myr ; ../6/6.out -I . alloc.myr
+ echo ../6/6.out -I . intparse.myr ; ../6/6.out -I . intparse.myr
+echo ../6/6.out -I . utf.myr ; ../6/6.out -I . utf.myr
+echo ../6/6.out -I . hasprefix.myr; ../6/6.out -I . hasprefix.myr
echo ../6/6.out -I . `$pwd/sysselect.sh errno`; ../6/6.out -I . `$pwd/sysselect.sh errno`
echo ../6/6.out -I . cstrconv.myr ; ../6/6.out -I . cstrconv.myr
echo ../6/6.out -I . `$pwd/sysselect.sh syswrap-ss`; ../6/6.out -I . `$pwd/sysselect.sh syswrap-ss`
diff --git a/test/runtest.rc b/test/runtest.rc
index 076daae..6723658 100755
--- a/test/runtest.rc
+++ b/test/runtest.rc
@@ -7,7 +7,7 @@ nfailed=0
fn build {
rm -f $1 $1^.6 $1^.use
- ../myrbuild/6.out -b $1 -C../6/6.out -M../muse/6.out -I../libstd -r../rt/_myrrt.6 $1^.myr
+ ../mbld/mbld -b $1 -C../6/6.out -M../muse/6.out -I../libstd -r../rt/_myrrt.6 $1^.myr
}
fn pass {