summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-02-20 11:58:44 -0500
committerOri Bernstein <ori@eigenstate.org>2013-02-20 11:58:44 -0500
commit7bca94e234b70a13a93c77b3e4801368ea173d3d (patch)
tree94f18f1ec1cd91d6914be5b6ba90ecb31f723d18
parent173bb6e6c75b1898527b187c030093bc8832d4fc (diff)
parentfd429ed06586dfee29c14ef563f15caf92737781 (diff)
downloadmc-7bca94e234b70a13a93c77b3e4801368ea173d3d.tar.gz
Merge branch 'master' of git+ssh://mimir.eigenstate.org/git/ori/mc
-rw-r--r--libstd/sys-linux.myr16
-rw-r--r--libstd/sys-osx.myr16
-rwxr-xr-xtest/test.sh2
3 files changed, 17 insertions, 17 deletions
diff --git a/libstd/sys-linux.myr b/libstd/sys-linux.myr
index 06ef45c..e5aef80 100644
--- a/libstd/sys-linux.myr
+++ b/libstd/sys-linux.myr
@@ -52,7 +52,7 @@ pkg std =
const M32bit : mopt = 0x40
/* return value for a failed mapping */
- const Mapbad : byte* = -1 castto(byte*)
+ const Mapbad : byte# = -1 castto(byte#)
/* syscalls */
const Sysread : scno = 0
@@ -369,7 +369,7 @@ pkg std =
const Sysprocess_vm_writev : scno = 311
extern const syscall : (sc:scno, args:... -> int64)
- extern const cstring : (str : byte[:] -> byte*)
+ extern const cstring : (str : byte[:] -> byte#)
const exit : (status:int64 -> void)
const getpid : ( -> int64)
@@ -380,9 +380,9 @@ pkg std =
const read : (fd:int64, buf:byte[:] -> size)
const write : (fd:int64, buf:byte[:] -> size)
const lseek : (fd:int64, off:uint64, whence:int64 -> int64)
- const fstat : (fd:int64, sb:statbuf* -> int64)
- const munmap : (addr:byte*, len:size -> int64)
- const mmap : (addr:byte*, len:size, prot:mprot, flags:mopt, fd:int64, off:off -> byte*)
+ const fstat : (fd:int64, sb:statbuf# -> int64)
+ const munmap : (addr:byte#, len:size -> int64)
+ const mmap : (addr:byte#, len:size, prot:mprot, flags:mopt, fd:int64, off:off -> byte#)
;;
const exit = {status; syscall(Sysexit, 1)}
@@ -391,9 +391,9 @@ const kill = {pid, sig; -> syscall(Syskill, pid, sig)}
const open = {path, opts, mode; -> syscall(Sysopen, cstring(path), opts, mode)}
const close = {fd; -> syscall(Sysclose, fd)}
const creat = {path, mode; -> syscall(Syscreat, cstring(path), mode)}
-const read = {fd, buf; -> syscall(Sysread, fd, buf castto(char*), buf.len castto(size)) castto(size)}
-const write = {fd, buf; -> syscall(Syswrite, fd, buf castto(char*), buf.len castto(size)) castto(size)}
+const read = {fd, buf; -> syscall(Sysread, fd, buf castto(byte#), buf.len castto(size)) castto(size)}
+const write = {fd, buf; -> syscall(Syswrite, fd, buf castto(byte#), buf.len castto(size)) castto(size)}
const lseek = {fd, off, whence; -> syscall(Syslseek, fd, off, whence)}
const fstat = {fd, sb; -> syscall(Sysfstat, fd, sb)}
const munmap = {addr, len; -> syscall(Sysmunmap, addr, len)}
-const mmap = {addr, len, prot, flags, fd, off; -> syscall(Sysmmap, addr, len, prot, flags, fd, off) castto(byte*)}
+const mmap = {addr, len, prot, flags, fd, off; -> syscall(Sysmmap, addr, len, prot, flags, fd, off) castto(byte#)}
diff --git a/libstd/sys-osx.myr b/libstd/sys-osx.myr
index 886ee7c..5ecc4a7 100644
--- a/libstd/sys-osx.myr
+++ b/libstd/sys-osx.myr
@@ -62,7 +62,7 @@ pkg std =
/* return value for a failed mapping */
- const Mapbad : byte* = -1 castto(byte*)
+ const Mapbad : byte# = -1 castto(byte#)
/* syscalls.
note, creat() implemented as open(path, Creat|Trunc|Wronly) */
@@ -415,7 +415,7 @@ pkg std =
const Sysfileport_makefd : scno = 0x20001b1
extern const syscall : (sc:scno, args:... -> int64)
- extern const cstring : (str : byte[:] -> byte*)
+ extern const cstring : (str : byte[:] -> byte#)
const exit : (status:int64 -> void)
const getpid : ( -> int64)
@@ -426,9 +426,9 @@ pkg std =
const read : (fd:int64, buf:byte[:] -> size)
const write : (fd:int64, buf:byte[:] -> size)
const lseek : (fd:int64, off:uint64, whence:int64 -> int64)
- const fstat : (fd:int64, sb:statbuf* -> int64)
- const munmap : (addr:byte*, len:size -> int64)
- const mmap : (addr:byte*, len:size, prot:mprot, flags:mopt, fd:int64, off:off -> byte*)
+ const fstat : (fd:int64, sb:statbuf# -> int64)
+ const munmap : (addr:byte#, len:size -> int64)
+ const mmap : (addr:byte#, len:size, prot:mprot, flags:mopt, fd:int64, off:off -> byte#)
;;
const exit = {status; syscall(Sysexit, 1)}
@@ -437,9 +437,9 @@ const kill = {pid, sig; -> syscall(Syskill, pid, sig)}
const open = {path, opts, mode; -> syscall(Sysopen, cstring(path), opts, mode)}
const close = {fd; -> syscall(Sysclose, fd)}
const creat = {path, mode; -> open(path, Ocreat | Otrunc | Owronly, mode)}
-const read = {fd, buf; -> syscall(Sysread, fd, buf castto(char*), buf.len castto(size)) castto(size)}
-const write = {fd, buf; -> syscall(Syswrite, fd, buf castto(char*), buf.len castto(size)) castto(size)}
+const read = {fd, buf; -> syscall(Sysread, fd, buf castto(char#), buf.len castto(size)) castto(size)}
+const write = {fd, buf; -> syscall(Syswrite, fd, buf castto(char#), buf.len castto(size)) castto(size)}
const lseek = {fd, off, whence; -> syscall(Syslseek, fd, off, whence)}
const fstat = {fd, sb; -> syscall(Sysfstat, fd, sb)}
const munmap = {addr, len; -> syscall(Sysmunmap, addr, len)}
-const mmap = {addr, len, prot, flags, fd, off; -> syscall(Sysmmap, addr, len, prot, flags, fd, off) castto(byte*)}
+const mmap = {addr, len, prot, flags, fd, off; -> syscall(Sysmmap, addr, len, prot, flags, fd, off) castto(byte#)}
diff --git a/test/test.sh b/test/test.sh
index 07757c3..465ea29 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -14,7 +14,7 @@ function use {
function build {
rm -f $1 $1.o $1.s $1.use
- ../myrbuild/myrbuild -b $1 $1.myr -C../6/6m -M../muse/muse -I../libstd
+ ../myrbuild/myrbuild -b $1 -C../6/6m -M../muse/muse -I../libstd $1.myr
}
function prints {