added generic function to return the correct string for scanf for unsigned ints depending on the size of the actual variable that is scanned. Shoudl fix the rehash bug and bugs corrupting timestamps on 32bits systems

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6987 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-01-04 20:05:08 +00:00
parent 50ebd781e5
commit 7bb561d9e0
3 changed files with 27 additions and 13 deletions

View file

@ -79,6 +79,12 @@ uint32_t rs_CRC32(const unsigned char *data,uint32_t len) ;
//
bool crc32File(FILE *f,uint64_t file_size,uint32_t chunk_size,CRC32Map& map) ;
// Returns %u, %lu, or %llu, depending on the size of unsigned int, unsigned long and unsigned long long on the current system.
// Use as;
// sscanf(string, RsDirUtil::scanf_string_for_uint( sizeof(X) ), &X) ;
//
const char *scanf_string_for_uint(int bytes) ;
int breakupDirList(const std::string& path, std::list<std::string> &subdirs);
bool copyFile(const std::string& source,const std::string& dest);