Ticket #40875: patch-mavericks.diff

File patch-mavericks.diff, 3.1 KB (added by slava@…, 11 years ago)

patch for mavericks

  • mongo/platform/unordered_map.h

    diff -ur ./src_orig/mongo/platform/unordered_map.h ./src/mongo/platform/unordered_map.h
    old new  
    1515
    1616#pragma once
    1717
     18//  Need for _LIBCPP_VERSION
     19#include <ciso646>
     20
    1821// NOTE(acm): Before gcc-4.7, __cplusplus is always defined to be 1,
    1922// so we can't reliably detect C++11 support by exclusively checking
    2023// the value of __cplusplus.
    21 #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
     24#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_LIBCPP_VERSION)
    2225
    2326#include <unordered_map>
    2427
  • mongo/platform/unordered_set.h

    diff -ur ./src_orig/mongo/platform/unordered_set.h ./src/mongo/platform/unordered_set.h
    old new  
    1515
    1616#pragma once
    1717
     18//  Need for _LIBCPP_VERSION
     19#include <ciso646>
     20
    1821// NOTE(acm): Before gcc-4.7, __cplusplus is always defined to be 1,
    1922// so we can't reliably detect C++11 support by exclusively checking
    2023// the value of __cplusplus.
    21 #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
     24#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_LIBCPP_VERSION)
    2225
    2326#include <unordered_set>
    2427
  • third_party/s2/hash.h

    diff -ur ./src_orig/third_party/s2/hash.h ./src/third_party/s2/hash.h
    old new  
    77#include "mongo/platform/unordered_set.h"
    88#define hash_set mongo::unordered_set
    99
    10 #if defined OS_LINUX || defined OS_MACOSX || defined __sunos__ || defined __freebsd__
    11 #define HASH_NAMESPACE_START namespace std { namespace tr1 {
    12 #define HASH_NAMESPACE_END }}
    13 #elif defined OS_WINDOWS
     10#if (defined(OS_MACOSX) && defined(_LIBCPP_VERSION)) || defined(OS_WINDOWS)
    1411#define HASH_NAMESPACE_START namespace std {
    1512#define HASH_NAMESPACE_END }
     13#elif defined OS_LINUX || defined OS_MACOSX || defined __sunos__ || defined __freebsd__
     14#define HASH_NAMESPACE_START namespace std { namespace tr1 {
     15#define HASH_NAMESPACE_END }}
    1616#endif
    1717
    1818// Places that hash-related functions are defined:
  • mongo/db/fts/stemmer.cpp

    diff -ur ./src_orig/mongo/db/fts/stemmer.cpp ./src/mongo/db/fts/stemmer.cpp
    old new  
    1717*/
    1818
    1919#include <string>
     20#include <cstdlib>
    2021
    2122#include "mongo/db/fts/stemmer.h"
    2223
  • mongo/dbtests/documentsourcetests.cpp

    diff -ur ./src_orig/mongo/dbtests/documentsourcetests.cpp ./src/mongo/dbtests/documentsourcetests.cpp
    old new  
    583583        };
    584584
    585585        struct ValueCmp {
    586             bool operator()(const Value& a, const Value& b) {
     586            bool operator()(const Value& a, const Value& b) const {
    587587                return Value::compare( a, b ) < 0;
    588588            }
    589589        };