reactos/reactos/lib/msvcrt/io/lseek.c
Casper Hornstrup 84385f6e26 2004-08-15 Casper S. Hornstrup <chorns@users.sourceforge.net>
* lib/msvcrt/.cvsignore: Ignore *.gch.
	* lib/msvcrt/precomp.h: New file.
	* lib/msvcrt/Makefile (TARGET_PCH): Set to precomp.h.
	* lib/msvcrt/*/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10555
2004-08-15 18:16:39 +00:00

20 lines
426 B
C

#include "precomp.h"
#include <msvcrt/io.h>
#include <msvcrt/internal/file.h>
/*
* @implemented
*/
long _lseek(int _fildes, long _offset, int _whence)
{
DWORD newpos = SetFilePointer((HANDLE)filehnd(_fildes), _offset, NULL, _whence);
if (newpos == INVALID_SET_FILE_POINTER) {
DWORD oserror = GetLastError();
if (oserror != 0) {
_dosmaperr(oserror);
return -1L;
}
}
return newpos;
}