summaryrefslogtreecommitdiff
path: root/net-p2p/linuxdcpp/files/patch-libc++
blob: 97091c88b6d9081ec647054c8c5d8706c0c097e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
--- dcpp/stdinc.h.orig
+++ dcpp/stdinc.h
@@ -123,7 +123,7 @@
 #include <boost/scoped_array.hpp>
 #include <boost/noncopyable.hpp>
 
-#if defined(_MSC_VER) || defined(_STLPORT_VERSION)
+#if defined(_MSC_VER) || defined(_STLPORT_VERSION) || defined(_LIBCPP_VERSION)
 
 #include <unordered_map>
 #include <unordered_set>
@@ -139,5 +139,8 @@
 
+#ifdef _LIBCPP_VERSION
+namespace std { namespace tr1 { using namespace std; }}
+#endif
 namespace dcpp {
 using namespace std;
 using namespace std::tr1;
 }
--- dcpp/CID.h.orig	2011-04-17 21:57:09.000000000 +0400
+++ dcpp/CID.h	2013-09-13 00:50:16.544145469 +0400
@@ -57,7 +57,10 @@
 
 } // namespace dcpp
 
-namespace std { namespace tr1 {
+namespace std {
+#ifndef _LIBCPP_VERSION
+namespace tr1 {
+#endif
 template<>
 struct hash<dcpp::CID> {
 	size_t operator()(const dcpp::CID& rhs) const {
@@ -65,6 +68,8 @@
 	}
 };
+#ifndef _LIBCPP_VERSION
 }
+#endif
 }
 
 #endif // !defined(CID_H)
--- dcpp/HashValue.h.orig	2011-04-17 21:57:09.000000000 +0400
+++ dcpp/HashValue.h	2013-09-13 00:48:18.173057104 +0400
@@ -46,12 +46,17 @@
 
 } // namespace dcpp
 
-namespace std { namespace tr1 {
+namespace std {
+#ifndef _LIBCPP_VERSION
+namespace tr1 {
+#endif
 template<typename T>
 struct hash<dcpp::HashValue<T> > {
 	size_t operator()(const dcpp::HashValue<T>& rhs) const { return *(size_t*)rhs.data; }
 };
+#ifndef _LIBCPP_VERSION
 }
+#endif
 }
 
 #endif // !defined(HASH_VALUE_H)