summaryrefslogtreecommitdiff
path: root/libstd/syswrap-ss+osx.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
committerOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
commit2bc852bda98762d3bc01548bf972e3f1b137fbfb (patch)
tree74831deed3c9057c5fe0cbb8790d220e855bc792 /libstd/syswrap-ss+osx.myr
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
Diffstat (limited to 'libstd/syswrap-ss+osx.myr')
-rw-r--r--libstd/syswrap-ss+osx.myr35
1 files changed, 0 insertions, 35 deletions
diff --git a/libstd/syswrap-ss+osx.myr b/libstd/syswrap-ss+osx.myr
deleted file mode 100644
index 5e7f001..0000000
--- a/libstd/syswrap-ss+osx.myr
+++ /dev/null
@@ -1,35 +0,0 @@
-use sys
-use "errno.use"
-use "cstrconv.use"
-use "slcp.use"
-use "die.use"
-
-pkg std =
- const exit : (status:int -> void)
- pkglocal const bgetcwd : (buf : byte[:] -> errno)
-;;
-
-const exit = {status; sys.exit(status)}
-const bgetcwd = {buf
- var path : byte[sys.Maxpathlen]
- var fd, len, err
-
- fd = sys.open(".", sys.Ordonly)
- if fd < 0
- -> fd castto(errno)
- ;;
- /*
- FIXME: if the path is longer than sys.Pathmax, we should fall back to
- the ugly method of finding the path.
- */
- err = sys.fcntl(fd, sys.Fgetpath, path[:] castto(byte#)) castto(errno)
- if err < 0
- -> err
- ;;
- len = cstrlen(path[:])
- if len >= buf.len
- -> Erange
- ;;
- slcp(buf[:len], path[:len])
- -> len castto(errno)
-}