reactos/reactos/lib/crtdll/io/chsize.c
Boudewijn Dekker 9f95b317f2 Fixed bug in modfl and in fread and fwrite and added
some permission checks in stdio.

svn path=/trunk/; revision=413
1999-04-27 06:15:27 +00:00

11 lines
228 B
C

/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/io.h>
int _chsize(int _fd, long size)
{
if (lseek(_fd, size, 0) == -1)
return -1;
if (_write(_fd, 0, 0) < 0)
return -1;
return 0;
}