update for HEAD-2003021201
[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 }