-
- int type = sys_seek_type(st);
-#ifdef WIN32
- DWORD ret = SetFilePointer(handle, off, 0, type);
- if(ret==INVALID_SET_FILE_POINTER)
- throw SystemError("Seek failed", GetLastError());
-#else
- int ret = lseek(handle, off, type);
- if(ret==-1)
- throw SystemError("Seek failed", errno);
-#endif
-