154859Smckusick /* 2*63513Sbostic * Copyright (c) 1992, 1993 3*63513Sbostic * The Regents of the University of California. All rights reserved. 454859Smckusick * 554859Smckusick * %sccs.include.redist.c% 654859Smckusick */ 754859Smckusick 854859Smckusick #if defined(LIBC_SCCS) && !defined(lint) 9*63513Sbostic static char sccsid[] = "@(#)truncate.c 8.1 (Berkeley) 06/17/93"; 1054859Smckusick #endif /* LIBC_SCCS and not lint */ 1154859Smckusick 1254859Smckusick #include <sys/types.h> 1354859Smckusick #include <sys/syscall.h> 1454859Smckusick 1554859Smckusick /* 1654859Smckusick * This function provides 64-bit offset padding that 1754859Smckusick * is not supplied by GCC 1.X but is supplied by GCC 2.X. 1854859Smckusick */ 1954859Smckusick int truncate(path,length)2060369Smckusicktruncate(path, length) 2154859Smckusick char *path; 2254859Smckusick off_t length; 2354859Smckusick { 2454859Smckusick 2563465Smckusick return(__syscall((quad_t)SYS_truncate, path, 0, length)); 2654859Smckusick } 27