summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/chdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/chdir.c')
-rw-r--r--otherlibs/unix/chdir.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/otherlibs/unix/chdir.c b/otherlibs/unix/chdir.c
new file mode 100644
index 000000000..ec7aeb465
--- /dev/null
+++ b/otherlibs/unix/chdir.c
@@ -0,0 +1,11 @@
+#include <mlvalues.h>
+#include "unix.h"
+
+value unix_chdir(path) /* ML */
+ value path;
+{
+ int ret;
+ ret = chdir(String_val(path));
+ if (ret == -1) uerror("chdir", path);
+ return Val_unit;
+}