Modified libretroshare to compile on Cygwin / MinGW.

* removed exceptions from serialiser (had troubles previously on win32).
 * Modified code in startup (enable CRYPTO structure) and rsdir.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1189 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2009-05-07 21:36:17 +00:00
parent deea89cbd0
commit 20593c9de2
7 changed files with 57 additions and 33 deletions

View file

@ -7,7 +7,7 @@ RS_TOP_DIR = ..
include $(RS_TOP_DIR)/scripts/config.mk
###############################################################
RSOBJ = rsthreads.o rsdir.o rsprint.o rsnet.o rsdebug.o
RSOBJ = rsthreads.o rsprint.o rsnet.o rsdebug.o rsdir.o
TESTOBJ = dirtest.o dir2test.o

View file

@ -391,14 +391,7 @@ bool RsDirUtil::renameFile(const std::string& from, const std::string& to)
int loops = 0;
#if defined(WIN32) || defined(MINGW) || defined(__CYGWIN__)
#if defined(MINGW) || defined(__CYGWIN__)
std::string f(from),t(to) ;
#else
std::wstring f,t ;
for(std::string::const_iterator it = from.begin(); it!=from.end();++it) f += *it;
for(std::string::const_iterator it = to .begin(); it!=to .end();++it) t += *it;
#endif
while (!MoveFileEx(f.c_str(), t.c_str(), MOVEFILE_REPLACE_EXISTING))
#else
while (rename(from.c_str(), to.c_str()) < 0)