xref: /original-bsd/lib/libc/sys/ftruncate.c (revision 3705696b)
1 /*
2  * Copyright (c) 1992, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #if defined(LIBC_SCCS) && !defined(lint)
9 static char sccsid[] = "@(#)ftruncate.c	8.1 (Berkeley) 06/17/93";
10 #endif /* LIBC_SCCS and not lint */
11 
12 #include <sys/types.h>
13 #include <sys/syscall.h>
14 
15 /*
16  * This function provides 64-bit offset padding that
17  * is not supplied by GCC 1.X but is supplied by GCC 2.X.
18  */
19 int
20 ftruncate(fd, length)
21 	int	fd;
22 	off_t	length;
23 {
24 
25 	return(__syscall((quad_t)SYS_ftruncate, fd, 0, length));
26 }
27