diff options
author | Jérémie Dimino <jeremie@dimino.org> | 2013-12-24 12:09:09 +0000 |
---|---|---|
committer | Jérémie Dimino <jeremie@dimino.org> | 2013-12-24 12:09:09 +0000 |
commit | 12a909efc70af32d6421bd3b142ace47bf27caa8 (patch) | |
tree | 40a85a92a751f56ac4db4bede42e9ad9f77bb8b1 | |
parent | 33ad3e0a9408a1c326a1ef9d30e59f4120293427 (diff) | |
download | ocaml-12a909efc70af32d6421bd3b142ace47bf27caa8.tar.gz |
fix commit 14384
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14387 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/unix/access.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/truncate.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/otherlibs/unix/access.c b/otherlibs/unix/access.c index 6e91ba66ff..9af8a6f959 100644 --- a/otherlibs/unix/access.c +++ b/otherlibs/unix/access.c @@ -49,7 +49,7 @@ CAMLprim value unix_access(value path, value perms) cv_flags = convert_flag_list(perms, access_permission_table); p = caml_stat_alloc_string(path); caml_enter_blocking_section(); - ret = access(String_val(path), cv_flags); + ret = access(p, cv_flags); caml_leave_blocking_section(); caml_stat_free(p); if (ret == -1) diff --git a/otherlibs/unix/truncate.c b/otherlibs/unix/truncate.c index 5165e21fba..c5b3a11591 100644 --- a/otherlibs/unix/truncate.c +++ b/otherlibs/unix/truncate.c @@ -39,14 +39,15 @@ CAMLprim value unix_truncate(value path, value len) CAMLreturn(Val_unit); } -CAMLprim value unix_truncate_64(value path, value len) +CAMLprim value unix_truncate_64(value path, value vlen) { - CAMLparam2(path, len); + CAMLparam2(path, vlen); char * p; int ret; + file_offset len = File_offset_val(vlen); p = caml_stat_alloc_string(path); caml_enter_blocking_section(); - ret = truncate(p, File_offset_val(len)); + ret = truncate(p, len); caml_leave_blocking_section(); caml_stat_free(p); if (ret == -1) |