Fix MacOSX 10.10 Yosemite Compilation

by using retroshare.pri file like linux or windows,
 fixing namespace for unordered_set,
 fixing c++11 for ostream& operator<<,
 checking if ntohll and htonll already defined.
This commit is contained in:
Phenom 2015-12-21 17:25:02 +01:00
parent 8e9fe6d800
commit 86b559191e
11 changed files with 127 additions and 13 deletions

View file

@ -33,7 +33,11 @@
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#ifdef __MAC_10_10
#include <unordered_set>
#else
#include <tr1/unordered_set>
#endif
#include <iomanip>
#include <fstream>
#include <sys/stat.h>
@ -54,8 +58,11 @@ static const char FILE_CACHE_SEPARATOR_CHAR = '|' ;
****/
static RsMutex FIndexPtrMtx("FIndexPtrMtx") ;
#ifdef __MAC_10_10
std::unordered_set<void*> FileIndex::_pointers ;
#else
std::tr1::unordered_set<void*> FileIndex::_pointers ;
#endif
void FileIndex::registerEntry(void*p)
{
RsStackMutex m(FIndexPtrMtx) ;

View file

@ -27,7 +27,11 @@
#include <string>
#include <map>
#include <set>
#if __MAC_10_10
#include <unordered_set>
#else
#include <tr1/unordered_set>
#endif
#include <list>
#include <vector>
#include <stdint.h>
@ -246,7 +250,11 @@ class FileIndex
PersonEntry *root;
#ifdef __MAC_10_10
static std::unordered_set<void*> _pointers ;
#else
static std::tr1::unordered_set<void*> _pointers ;
#endif
static void registerEntry(void*p) ;
static void unregisterEntry(void*p) ;
static bool isValid(void*p) ;