1 /***********************************************************************/
5 /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
7 /* Copyright 1996 Institut National de Recherche en Informatique et */
8 /* en Automatique. All rights reserved. This file is distributed */
9 /* under the terms of the GNU Library General Public License, with */
10 /* the special exception on linking described in file ../../LICENSE. */
12 /***********************************************************************/
14 /* $Id: truncate.c 7849 2007-02-09 13:31:15Z doligez $ */
16 #include <sys/types.h>
20 #include "unixsupport.h"
27 CAMLprim value unix_truncate(value path, value len)
29 if (truncate(String_val(path), Long_val(len)) == -1)
30 uerror("truncate", path);
34 CAMLprim value unix_truncate_64(value path, value len)
36 if (truncate(String_val(path), File_offset_val(len)) == -1)
37 uerror("truncate", path);
43 CAMLprim value unix_truncate(value path, value len)
44 { invalid_argument("truncate not implemented"); }
46 CAMLprim value unix_truncate_64(value path, value len)
47 { invalid_argument("truncate not implemented"); }