last fix to missing ftello64 calls (hopefully)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4057 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-02-24 22:44:41 +00:00
parent ea84a81886
commit e39a04ee7f
3 changed files with 5 additions and 5 deletions

View file

@ -432,7 +432,7 @@ bool ftExtraList::loadList(std::list<RsItem *>& load)
librs::util::ConvertUtf8ToUtf16(fi->file.path, filepathW); librs::util::ConvertUtf8ToUtf16(fi->file.path, filepathW);
FILE *fd = _wfopen(filepathW.c_str(), L"rb"); FILE *fd = _wfopen(filepathW.c_str(), L"rb");
#else #else
FILE *fd = fopen(fi->file.path.c_str(), "rb"); FILE *fd = fopen64(fi->file.path.c_str(), "rb");
#endif #endif
if (fd == NULL) if (fd == NULL)
{ {

View file

@ -539,7 +539,7 @@ bool ftFileCreator::crossCheckChunkMap(const CRC32Map& ref,uint32_t& bad_chunks,
printf(" Chunk %05d/%05d:",i,nb_chunks) ; printf(" Chunk %05d/%05d:",i,nb_chunks) ;
if(map[i]) if(map[i])
{ {
if(fseek(fd,(uint64_t)i * (uint64_t)chunk_size,SEEK_SET)==0 && (len = fread(buff,1,chunk_size,fd)) > 0) if(fseeko64(fd,(uint64_t)i * (uint64_t)chunk_size,SEEK_SET)==0 && (len = fread(buff,1,chunk_size,fd)) > 0)
{ {
uint32_t crc = RsDirUtil::rs_CRC32(buff,len) ; uint32_t crc = RsDirUtil::rs_CRC32(buff,len) ;

View file

@ -303,14 +303,14 @@ bool RsDirUtil::copyFile(const std::string& source,const std::string& dest)
return (CopyFileW(sourceW.c_str(), destW.c_str(), FALSE) != 0); return (CopyFileW(sourceW.c_str(), destW.c_str(), FALSE) != 0);
#else #else
FILE *in = fopen(source.c_str(),"rb") ; FILE *in = fopen64(source.c_str(),"rb") ;
if(in == NULL) if(in == NULL)
{ {
return false ; return false ;
} }
FILE *out = fopen(dest.c_str(),"wb") ; FILE *out = fopen64(dest.c_str(),"wb") ;
if(out == NULL) if(out == NULL)
{ {
@ -994,7 +994,7 @@ bool RsDirUtil::getWideFileHash(std::wstring filepath,
/***** XXX TO MAKE WIDE SYSTEM CALL ******************************************************/ /***** XXX TO MAKE WIDE SYSTEM CALL ******************************************************/
std::string fp(filepath.begin(), filepath.end()); std::string fp(filepath.begin(), filepath.end());
if (NULL == (fd = fopen(fp.c_str(), "rb"))) if (NULL == (fd = fopen64(fp.c_str(), "rb")))
return false; return false;
/***** XXX TO MAKE WIDE SYSTEM CALL ******************************************************/ /***** XXX TO MAKE WIDE SYSTEM CALL ******************************************************/