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