Reverted latest changes.
[reactos.git] / reactos / lib / msvcrt / io / lseek.c
1 #include <windows.h>
2 #include <msvcrt/io.h>
3 #include <msvcrt/internal/file.h>
4
5
6 long _lseek(int _fildes, long _offset, int _whence)
7 {
8 return (SetFilePointer((HANDLE)filehnd(_fildes), _offset, NULL, _whence));
9 }
10
11 __int64 _lseeki64(int _fildes, __int64 _offset, int _whence)
12 {
13 ULONG lo_pos, hi_pos;
14
15 lo_pos = SetFilePointer((HANDLE)filehnd(_fildes), _offset, &hi_pos, _whence);
16 return((((__int64)hi_pos) << 32) + lo_pos);
17 }