summaryrefslogtreecommitdiff
path: root/libstd/syswrap-ss+linux.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-04-16 11:37:32 -0700
committerOri Bernstein <ori@eigenstate.org>2015-04-16 11:37:32 -0700
commitb7747c5a3d36f99514b1945efb05b9f04f7dc74a (patch)
tree231ef68162ebc712d7e469a156279318144ce55d /libstd/syswrap-ss+linux.myr
parentb1c1b98b1c37378ae230705e55cf6abae8906407 (diff)
downloadmc-b7747c5a3d36f99514b1945efb05b9f04f7dc74a.tar.gz
Shuffle around files, remove redundant systags.
Diffstat (limited to 'libstd/syswrap-ss+linux.myr')
-rw-r--r--libstd/syswrap-ss+linux.myr22
1 files changed, 22 insertions, 0 deletions
diff --git a/libstd/syswrap-ss+linux.myr b/libstd/syswrap-ss+linux.myr
new file mode 100644
index 0000000..1982e54
--- /dev/null
+++ b/libstd/syswrap-ss+linux.myr
@@ -0,0 +1,22 @@
+use sys
+use "errno.use"
+
+pkg std =
+ const exit : (status:int -> void)
+ pkglocal const bgetcwd : (buf : byte[:] -> errno)
+;;
+
+const exit = {status; sys.exit_group(status)}
+const bgetcwd = {buf;
+ var err
+ err = sys.getcwd(buf) castto(errno)
+ /*
+ if we got a length back, it includes
+ the nul byte. chop that off.
+ */
+ if err > 0
+ -> err - 1
+ else
+ -> err
+ ;;
+}