git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ba3283014e8ac76dba503692c42096eff19e2f53
[reactos.git]
/
lib
/
msvcrt
/
io
/
locking.c
1
#include <windows.h>
2
#include <msvcrt/io.h>
3
4
int _locking(int _fd, int mode, long nbytes)
5
{
6
long offset = _lseek(_fd, 0L, 1);
7
if (!LockFile(_get_osfhandle(_fd),offset,0,nbytes,0))
8
return -1;
9
return 0;
10
}