git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
update for HEAD-2003021201
[reactos.git]
/
lib
/
crtdll
/
io
/
chsize.c
1
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
2
#include <msvcrt/io.h>
3
4
#define NDEBUG
5
#include <msvcrt/msvcrtdbg.h>
6
7
int _chsize(int _fd, long size)
8
{
9
DPRINT("_chsize(fd %d, size %d)\n", _fd, size);
10
if (lseek(_fd, size, 0) == -1)
11
return -1;
12
if (_write(_fd, 0, 0) < 0)
13
return -1;
14
return 0;
15
}