Added Ben's patches:

* Compilation for FreeBSD.
	* Notes that MT is not cryptographically secure.
	* modified sorting of DHT Window.

Only one change that I didn't commit:

 bitdht {
-       LIBS += ../../libbitdht/src/lib/libbitdht.a
-       PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a
+       LIBS += ../../libbitdht/src/libbitdht.a
+       PRE_TARGETDEPS *= ../../libbitdht/src/libbitdht.a
 }

As this would have broken compilation on the other platforms.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4619 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-09-28 15:16:21 +00:00
parent bb9f362458
commit 5ea8cfb67d
9 changed files with 62 additions and 12 deletions

View file

@ -146,6 +146,15 @@ macx {
}
freebsd-* {
INCLUDEPATH *= /usr/local/include/gpgme
LIBS *= ../../libretroshare/src/libretroshare.a
LIBS *= -lssl
LIBS *= -lgpgme
LIBS *= -lupnp
LIBS *= -lgnome-keyring
}
############################## Common stuff ######################################
# On Linux systems that alredy have libssl and libcrypto it is advisable
@ -156,6 +165,10 @@ macx {
bitdht {
LIBS += ../../libbitdht/src/lib/libbitdht.a
PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a
#For FreeBSD to need to use these ones.
#LIBS += ../../libbitdht/src/libbitdht.a
#PRE_TARGETDEPS *= ../../libbitdht/src/libbitdht.a
}
win32 {

View file

@ -653,8 +653,6 @@ void DhtWindow::updateRelays()
/****************************/
@ -666,6 +664,25 @@ void DhtWindow::updateRelays()
#define DTW_COL_SEND 5
#define DTW_COL_RECV 6
class DhtTreeWidgetItem : public QTreeWidgetItem
{
public:
virtual bool operator<(const QTreeWidgetItem &other) const
{
int column = treeWidget()->sortColumn();
if (column == DTW_COL_RECV || column == DTW_COL_SEND
|| column == DTW_COL_BUCKET)
{
QString t1 = text(column);
QString t2 = other.text(column);
t1 = t1.left(t1.indexOf(' '));
t2 = t2.left(t2.indexOf(' '));
return t1.toLong() < t2.toLong();
}
return text(column) < other.text(column);
}
};
void DhtWindow::updateDhtPeers()
{
@ -698,7 +715,7 @@ void DhtWindow::updateDhtPeers()
QTreeWidgetItem *dht_item = NULL;
/* insert */
dht_item = new QTreeWidgetItem();
dht_item = new DhtTreeWidgetItem();
int dist = it->mBucket;
std::ostringstream buckstr;