mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-23 22:49:37 -05:00
fixed win32-x-g++ compilation
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1595 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4ea523306b
commit
57ba727b6a
@ -21,6 +21,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <util/rswin.h>
|
||||
#include "dbase/fimonitor.h"
|
||||
#include "util/rsdir.h"
|
||||
#include "serialiser/rsserviceids.h"
|
||||
|
@ -7,16 +7,14 @@ DEFINES *= MINIUPNPC_VERSION=13
|
||||
DEFINES -= PQI_USE_XPGP
|
||||
DEFINES += RS_USE_PGPSSL
|
||||
|
||||
UPNPC_DIR = ../../../../miniupnpc-1.3
|
||||
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||
GPGME_DIR = ../../../../gpgme-1.1.8
|
||||
|
||||
|
||||
profiling {
|
||||
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
||||
QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer
|
||||
}
|
||||
|
||||
DEFINES -= PQI_USE_XPGP
|
||||
DEFINES *= RS_USE_PGPSSL
|
||||
|
||||
################################# Linux ##########################################
|
||||
|
||||
@ -60,8 +58,14 @@ win32-x-g++ {
|
||||
QMAKE_CXXFLAGS *= -Wmissing-include-dirs
|
||||
QMAKE_CC = i586-mingw32msvc-g++
|
||||
QMAKE_LIB = i586-mingw32msvc-ar
|
||||
QMAKE_AR = i586-mingw32msvc-ar
|
||||
DEFINES *= STATICLIB WIN32
|
||||
|
||||
SSL_DIR=../../../../openssl
|
||||
UPNPC_DIR = ../../../../miniupnpc-1.3
|
||||
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||
GPGME_DIR = ../../../../gpgme-1.1.8
|
||||
|
||||
INCLUDEPATH *= /usr/i586-mingw32msvc/include ${HOME}/.wine/drive_c/pthreads/include/
|
||||
}
|
||||
################################# Windows ##########################################
|
||||
@ -73,6 +77,10 @@ win32 {
|
||||
DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW
|
||||
DESTDIR = lib
|
||||
|
||||
UPNPC_DIR = ../../../../miniupnpc-1.3
|
||||
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||
GPGME_DIR = ../../../../gpgme-1.1.8
|
||||
|
||||
PTHREADS_DIR = ../../../../pthreads-w32-2-8-0-release
|
||||
ZLIB_DIR = ../../../../zlib-1.2.3
|
||||
SSL_DIR = ../../../../OpenSSL
|
||||
@ -81,7 +89,7 @@ win32 {
|
||||
}
|
||||
################################### COMMON stuff ##################################
|
||||
|
||||
INCLUDEPATH += . $${SSL_DIR}/include $${UPNPC_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src
|
||||
INCLUDEPATH += . $${SSL_DIR} $${UPNPC_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src
|
||||
|
||||
#DEPENDPATH += . \
|
||||
# util \
|
||||
|
@ -1469,12 +1469,12 @@ bool p3turtle::performLocalHashSearch(const TurtleFileHash& hash,FileInfo& info)
|
||||
return rsFiles->FileDetails(hash, RS_FILE_HINTS_LOCAL | RS_FILE_HINTS_SPEC_ONLY, info);
|
||||
}
|
||||
|
||||
static std::string printNumber(uint num,bool hex=false)
|
||||
static std::string printNumber(uint64_t num,bool hex=false)
|
||||
{
|
||||
if(hex)
|
||||
{
|
||||
char tmp[100] ;
|
||||
sprintf(tmp,"0x%08x",num) ;
|
||||
sprintf(tmp,"0x%08lx",num) ;
|
||||
return std::string(tmp) ;
|
||||
}
|
||||
else
|
||||
|
@ -35,7 +35,7 @@ uint32_t RsTurtleRegExpSearchRequestItem::serial_size()
|
||||
|
||||
s += 4 ; // number of strings
|
||||
|
||||
for(uint i=0;i<expr._strings.size();++i)
|
||||
for(unsigned int i=0;i<expr._strings.size();++i)
|
||||
s += GetTlvStringSize(expr._strings[i]) ;
|
||||
|
||||
s += 4 ; // number of ints
|
||||
@ -224,15 +224,15 @@ bool RsTurtleRegExpSearchRequestItem::serialize(void *data,uint32_t& pktsize)
|
||||
// now serialize the regexp
|
||||
ok &= setRawUInt32(data,tlvsize,&offset,expr._tokens.size()) ;
|
||||
|
||||
for(uint i=0;i<expr._tokens.size();++i) ok &= setRawUInt8(data,tlvsize,&offset,expr._tokens[i]) ;
|
||||
for(unsigned int i=0;i<expr._tokens.size();++i) ok &= setRawUInt8(data,tlvsize,&offset,expr._tokens[i]) ;
|
||||
|
||||
ok &= setRawUInt32(data,tlvsize,&offset,expr._ints.size()) ;
|
||||
|
||||
for(uint i=0;i<expr._ints.size();++i) ok &= setRawUInt32(data,tlvsize,&offset,expr._ints[i]) ;
|
||||
for(unsigned int i=0;i<expr._ints.size();++i) ok &= setRawUInt32(data,tlvsize,&offset,expr._ints[i]) ;
|
||||
|
||||
ok &= setRawUInt32(data,tlvsize,&offset,expr._strings.size()) ;
|
||||
|
||||
for(uint i=0;i<expr._strings.size();++i) ok &= SetTlvString(data, tlvsize, &offset, TLV_TYPE_STR_VALUE, expr._strings[i]);
|
||||
for(unsigned int i=0;i<expr._strings.size();++i) ok &= SetTlvString(data, tlvsize, &offset, TLV_TYPE_STR_VALUE, expr._strings[i]);
|
||||
|
||||
|
||||
if (offset != tlvsize)
|
||||
@ -288,17 +288,17 @@ RsTurtleRegExpSearchRequestItem::RsTurtleRegExpSearchRequestItem(void *data,uint
|
||||
|
||||
expr._tokens.resize(n) ;
|
||||
|
||||
for(uint i=0;i<n;++i) ok &= getRawUInt8(data,pktsize,&offset,&expr._tokens[i]) ;
|
||||
for(uint32_t i=0;i<n;++i) ok &= getRawUInt8(data,pktsize,&offset,&expr._tokens[i]) ;
|
||||
|
||||
ok &= getRawUInt32(data,pktsize,&offset,&n) ;
|
||||
expr._ints.resize(n) ;
|
||||
|
||||
for(uint i=0;i<n;++i) ok &= getRawUInt32(data,pktsize,&offset,&expr._ints[i]) ;
|
||||
for(uint32_t i=0;i<n;++i) ok &= getRawUInt32(data,pktsize,&offset,&expr._ints[i]) ;
|
||||
|
||||
ok &= getRawUInt32(data,pktsize,&offset,&n) ;
|
||||
expr._strings.resize(n) ;
|
||||
|
||||
for(uint i=0;i<n;++i) ok &= GetTlvString(data, pktsize, &offset, TLV_TYPE_STR_VALUE, expr._strings[i]);
|
||||
for(uint32_t i=0;i<n;++i) ok &= GetTlvString(data, pktsize, &offset, TLV_TYPE_STR_VALUE, expr._strings[i]);
|
||||
|
||||
#ifdef WINDOWS_SYS // No Exceptions in Windows compile. (drbobs).
|
||||
#else
|
||||
@ -673,9 +673,9 @@ std::ostream& RsTurtleRegExpSearchRequestItem::print(std::ostream& o, uint16_t)
|
||||
o << " Req. Id: " << (void *)request_id << std::endl ;
|
||||
o << " Depth : " << depth << std::endl ;
|
||||
o << " RegExp: " << std::endl ;
|
||||
o << " Toks: " ; for(uint i=0;i<expr._tokens.size();++i) std::cout << (int)expr._tokens[i] << " " ; std::cout << std::endl ;
|
||||
o << " Ints: " ; for(uint i=0;i<expr._ints.size();++i) std::cout << (int)expr._ints[i] << " " ; std::cout << std::endl ;
|
||||
o << " Strs: " ; for(uint i=0;i<expr._strings.size();++i) std::cout << expr._strings[i] << " " ; std::cout << std::endl ;
|
||||
o << " Toks: " ; for(unsigned int i=0;i<expr._tokens.size();++i) std::cout << (int)expr._tokens[i] << " " ; std::cout << std::endl ;
|
||||
o << " Ints: " ; for(unsigned int i=0;i<expr._ints.size();++i) std::cout << (int)expr._ints[i] << " " ; std::cout << std::endl ;
|
||||
o << " Strs: " ; for(unsigned int i=0;i<expr._strings.size();++i) std::cout << expr._strings[i] << " " ; std::cout << std::endl ;
|
||||
|
||||
return o ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user