MacOSX buildfix

This commit is contained in:
Henrik Rydgård 2013-02-04 20:36:43 +01:00
parent 349f1bd56b
commit d60f685ae8
4 changed files with 8 additions and 2 deletions

View File

@ -122,6 +122,10 @@ if(NOT MSVC)
add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64)
endif()
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
if(BLACKBERRY)
add_definitions(-D_QNX_SOURCE=1 -D_C99=1)
endif()

View File

@ -40,10 +40,12 @@
#include "../ext/snappy/snappy-c.h"
#ifndef _MSC_VER
#ifndef __APPLE__
namespace std {
using tr1::is_pointer;
}
#endif
#endif
template <class T>
struct LinkedListItem : public T

View File

@ -47,7 +47,7 @@ public:
void Log(LogTypes::LOG_LEVELS, const char *msg);
bool IsValid() { return (m_logfile != NULL); }
bool IsValid() { if (!m_logfile) return false; else return true; }
bool IsEnabled() const { return m_enable; }
void SetEnable(bool enable) { m_enable = enable; }

View File

@ -5,7 +5,7 @@
#define GCC_VER(x,y,z) ((x) * 10000 + (y) * 100 + (z))
#define GCC_VERSION GCC_VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__ && !defined(ANDROID) && !defined(__SYMBIAN32__)
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__ && !defined(ANDROID) && !defined(__SYMBIAN32__) || defined(__APPLE__)
// GCC 4.4 provides <mutex>
#include <mutex>
#else