X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Ffile.cpp;fp=source%2Fio%2Ffile.cpp;h=74930baaf497286f32925ee395641147813daf58;hp=727542fe1d15baa3fbdcdc6678be9914e82d0ade;hb=86e0004bd195bc7f7478cf736871339bddf38127;hpb=8f2711fba7a2817840038630d9cf9a2060ecbe8e diff --git a/source/io/file.cpp b/source/io/file.cpp index 727542f..74930ba 100644 --- a/source/io/file.cpp +++ b/source/io/file.cpp @@ -189,7 +189,7 @@ void File::sync() #endif } -int File::seek(int off, SeekType st) +unsigned File::seek(int off, SeekType st) { check_access(M_NONE); @@ -201,8 +201,8 @@ int File::seek(int off, SeekType st) if(ret==INVALID_SET_FILE_POINTER) throw system_error("SetFilePointer"); #else - int ret = lseek(handle, off, type); - if(ret==-1) + off_t ret = lseek(handle, off, type); + if(ret==(off_t)-1) throw system_error("lseek"); #endif @@ -211,7 +211,7 @@ int File::seek(int off, SeekType st) return ret; } -int File::tell() const +unsigned File::tell() const { check_access(M_NONE); @@ -220,8 +220,8 @@ int File::tell() const if(ret==INVALID_SET_FILE_POINTER) throw system_error("SetFilePointer"); #else - int ret = lseek(handle, 0, SEEK_CUR); - if(ret==-1) + off_t ret = lseek(handle, 0, SEEK_CUR); + if(ret==(off_t)-1) throw system_error("lseek"); #endif