summaryrefslogtreecommitdiff
path: root/lib/std/syswrap+plan9.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-09-11 08:33:07 -0700
committerOri Bernstein <ori@eigenstate.org>2016-09-11 08:33:07 -0700
commit60d61b474fe36484cce4bb844d48faff8d9d1fd6 (patch)
treea7087536a23124b5e95abbc96a0d814af4618c71 /lib/std/syswrap+plan9.myr
parent38fb09f0003bad6ce33fd0af769c68d0dd88bc36 (diff)
downloadmc-60d61b474fe36484cce4bb844d48faff8d9d1fd6.tar.gz
Update the 9front build.
There were a few bugs. Oops.
Diffstat (limited to 'lib/std/syswrap+plan9.myr')
-rw-r--r--lib/std/syswrap+plan9.myr25
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/std/syswrap+plan9.myr b/lib/std/syswrap+plan9.myr
index 54d9091..724ee61 100644
--- a/lib/std/syswrap+plan9.myr
+++ b/lib/std/syswrap+plan9.myr
@@ -7,6 +7,7 @@ use "result"
use "cstrconv"
use "strfind"
use "getint"
+use "syswrap-ss"
pkg std =
type fd = sys.fd
@@ -251,27 +252,3 @@ generic check = {e : @a::(integral, numeric) -> result(@b, errno)
-> `Ok (e : @b)
;;
}
-
-const lasterr = {
- var errbuf : byte[sys.Maxerr]
- var err
-
- sys.errstr(errbuf[:])
- err = cstrconv(errbuf[:])
- if strhas(err, "no error")
- -> Enone
- elif strhas(err, "already exists")
- -> Eexist
- elif strhas(err, "read or write too large")
- -> Erange
- elif strhas(err, "read or write too small")
- -> Erange
- elif strhas(err, "i/o error")
- -> Eio
- elif strhas(err, "fd out of range or not open")
- -> Ebadf
- else
- -> Emisc
- ;;
-}
-