mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 23:45:49 -04:00
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:
parent
8e9fe6d800
commit
86b559191e
11 changed files with 127 additions and 13 deletions
|
@ -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) ;
|
||||
|
|
|
@ -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) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue