author | jurikm |
Sun, 12 Feb 2012 14:04:10 +0000 | |
changeset 8245 | 383896da4129 |
parent 1402 | 4b8e841da99c |
permissions | -rw-r--r-- |
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
1 |
--- deluge-torrent-0.5.9.1-orig/setup.py 2008-05-19 01:44:59.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
2 |
+++ deluge-torrent-0.5.9.1/setup.py 2008-06-19 16:36:05.997302854 +0000 |
751 | 3 |
@@ -98,12 +98,12 @@ |
435 | 4 |
# it has been removed to prevent confusion. |
5 |
||
6 |
if not OS == "win": |
|
7 |
- EXTRA_COMPILE_ARGS = ["-Wno-missing-braces", |
|
8 |
+ EXTRA_COMPILE_ARGS = [ |
|
9 |
"-DHAVE_INCLUDE_LIBTORRENT_ASIO____ASIO_HPP=1", |
|
10 |
"-DHAVE_INCLUDE_LIBTORRENT_ASIO_SSL_STREAM_HPP=1", |
|
11 |
"-DHAVE_INCLUDE_LIBTORRENT_ASIO_IP_TCP_HPP=1", |
|
12 |
"-DHAVE_PTHREAD=1", "-DTORRENT_USE_OPENSSL=1", "-DHAVE_SSL=1", |
|
13 |
- "-DNDEBUG=1", "-O2"] |
|
14 |
+ "-DNDEBUG=1"] |
|
15 |
if ARCH == "x64": |
|
16 |
EXTRA_COMPILE_ARGS.append("-DAMD64") |
|
17 |
||
1011 | 18 |
@@ -150,10 +150,10 @@ |
751 | 19 |
librariestype = [boost_filesystem, boost_date_time, |
1011 | 20 |
boost_thread, 'z', 'pthread', 'ssl', 'crypto'] |
21 |
||
22 |
- if os == "linux": |
|
23 |
+ if OS == "nix" or OS == "linux": |
|
24 |
librariestype += ['rt'] |
|
751 | 25 |
|
26 |
- removals = ['-g', '-Wstrict-prototypes'] |
|
27 |
+ removals = ['-g', '-Wstrict-prototypes', '-OPT:Olimit=0'] |
|
28 |
||
29 |
if python_version == '2.5': |
|
30 |
cv_opt = sysconfig.get_config_vars()["CFLAGS"] |
|
1011 | 31 |
@@ -165,6 +165,10 @@ |
751 | 32 |
for removal in removals: |
33 |
cv_opt = cv_opt.replace(removal, " ") |
|
34 |
sysconfig.get_config_vars()["OPT"] = ' '.join(cv_opt.split()) |
|
35 |
+ cv_opt = sysconfig.get_config_vars()["BASECFLAGS"] |
|
36 |
+ for removal in removals: |
|
37 |
+ cv_opt = cv_opt.replace(removal, " ") |
|
38 |
+ sysconfig.get_config_vars()["BASECFLAGS"] = ' '.join(cv_opt.split()) |
|
39 |
else: |
|
40 |
EXTRA_COMPILE_ARGS = [ '-O2', '-DBOOST_WINDOWS', |
|
937 | 41 |
'-fno-strict-aliasing', |
1011 | 42 |
@@ -215,7 +219,8 @@ |
751 | 43 |
libraries = librariestype, |
435 | 44 |
extra_compile_args = EXTRA_COMPILE_ARGS, |
751 | 45 |
extra_link_args = EXTRA_LINK_ARGS, |
435 | 46 |
- sources = sources) |
47 |
+ sources = sources, |
|
48 |
+ language = 'c++') |
|
751 | 49 |
|
435 | 50 |
# Thanks to Iain Nicol for code to save the location for installed prefix |
51 |
# At runtime, we need to know where we installed the data to. |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
52 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/include/libtorrent/xml_parse.hpp 2008-05-11 23:55:17.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
53 |
+++ deluge-torrent-0.5.9.1/libtorrent/include/libtorrent/xml_parse.hpp 2008-06-19 16:36:05.997593489 +0000 |
483 | 54 |
@@ -128,7 +128,7 @@ |
55 |
*(p-1) = '?'; |
|
56 |
tag_end = p - 1; |
|
57 |
} |
|
58 |
- else if (start + 5 < p && memcmp(start, "!--", 3) == 0 && memcmp(p-2, "--", 2) == 0) |
|
59 |
+ else if (start + 5 < p && std::memcmp(start, "!--", 3) == 0 && std::memcmp(p-2, "--", 2) == 0) |
|
60 |
{ |
|
61 |
start += 3; |
|
62 |
*(p-2) = 0; |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
63 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/include/libtorrent/asio/detail/socket_ops.hpp 2008-05-11 23:55:17.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
64 |
+++ deluge-torrent-0.5.9.1/libtorrent/include/libtorrent/asio/detail/socket_ops.hpp 2008-06-19 16:36:05.998558743 +0000 |
751 | 65 |
@@ -197,7 +197,10 @@ |
435 | 66 |
#if defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
67 |
b.buf = static_cast<char*>(data); |
|
68 |
b.len = static_cast<u_long>(size); |
|
69 |
-#else // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
|
70 |
+#elif defined(__SUNPRO_CC) |
|
71 |
+ b.iov_base = static_cast<char*>(data); |
|
72 |
+ b.iov_len = size; |
|
73 |
+#else // defined(__SUNPRO_CC) |
|
74 |
b.iov_base = data; |
|
75 |
b.iov_len = size; |
|
76 |
#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
|
751 | 77 |
@@ -208,7 +211,10 @@ |
435 | 78 |
#if defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
79 |
b.buf = static_cast<char*>(const_cast<void*>(data)); |
|
80 |
b.len = static_cast<u_long>(size); |
|
81 |
-#else // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
|
82 |
+#elif defined(__SUNPRO_CC) |
|
83 |
+ b.iov_base = static_cast<char*>(const_cast<void*>(data)); |
|
84 |
+ b.iov_len = size; |
|
85 |
+#else // defined(__SUNPRO_CC) |
|
86 |
b.iov_base = const_cast<void*>(data); |
|
87 |
b.iov_len = size; |
|
88 |
#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
89 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/include/libtorrent/asio/impl/error_code.ipp 2008-05-11 23:55:16.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
90 |
+++ deluge-torrent-0.5.9.1/libtorrent/include/libtorrent/asio/impl/error_code.ipp 2008-06-19 16:36:05.998828118 +0000 |
937 | 91 |
@@ -83,16 +83,16 @@ |
751 | 92 |
if (category() != error::get_system_category()) |
93 |
return "asio error"; |
|
435 | 94 |
#if defined(__sun) || defined(__QNX__) |
95 |
- return strerror(value_); |
|
96 |
+ return std::strerror(value_); |
|
97 |
#elif defined(__MACH__) && defined(__APPLE__) \ |
|
98 |
|| defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) \ |
|
751 | 99 |
|| defined(_AIX) || defined(__hpux) || defined(__osf__) |
435 | 100 |
char buf[256] = ""; |
101 |
- strerror_r(value_, buf, sizeof(buf)); |
|
102 |
+ std::strerror_r(value_, buf, sizeof(buf)); |
|
103 |
return buf; |
|
104 |
#else |
|
105 |
char buf[256] = ""; |
|
106 |
- return strerror_r(value_, buf, sizeof(buf)); |
|
751 | 107 |
+ std::return strerror_r(value_, buf, sizeof(buf)); |
435 | 108 |
#endif |
109 |
#endif // defined(BOOST_WINDOWS) |
|
110 |
} |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
111 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/http_stream.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
112 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/http_stream.cpp 2008-06-19 16:36:05.999064910 +0000 |
483 | 113 |
@@ -130,7 +130,7 @@ |
114 |
if (found_end) |
|
115 |
{ |
|
116 |
m_buffer.push_back(0); |
|
117 |
- char* status = strchr(&m_buffer[0], ' '); |
|
118 |
+ char* status = std::strchr(&m_buffer[0], ' '); |
|
119 |
if (status == 0) |
|
120 |
{ |
|
121 |
(*h)(asio::error::operation_not_supported); |
|
122 |
@@ -139,7 +139,7 @@ |
|
123 |
} |
|
124 |
||
125 |
status++; |
|
126 |
- int code = atoi(status); |
|
127 |
+ int code = std::atoi(status); |
|
128 |
if (code != 200) |
|
129 |
{ |
|
130 |
(*h)(asio::error::operation_not_supported); |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
131 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/piece_picker.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
132 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/piece_picker.cpp 2008-06-19 16:36:05.999930124 +0000 |
937 | 133 |
@@ -536,7 +536,7 @@ |
483 | 134 |
{ |
135 |
// find a random position in the destination vector where we will place |
|
136 |
// this entry. |
|
137 |
- int dst_index = rand() % m_piece_info[priority].size(); |
|
138 |
+ int dst_index = std::rand() % m_piece_info[priority].size(); |
|
139 |
||
140 |
// copy the entry at that position to the back |
|
141 |
m_piece_map[m_piece_info[priority][dst_index]].index |
|
937 | 142 |
@@ -608,7 +608,7 @@ |
483 | 143 |
{ |
144 |
// find a random position in the destination vector where we will place |
|
145 |
// this entry. |
|
146 |
- int dst_index = rand() % m_piece_info[new_priority].size(); |
|
147 |
+ int dst_index = std::rand() % m_piece_info[new_priority].size(); |
|
148 |
||
149 |
// copy the entry at that position to the back |
|
150 |
m_piece_map[m_piece_info[new_priority][dst_index]].index |
|
937 | 151 |
@@ -1189,7 +1189,7 @@ |
483 | 152 |
// we're not using rarest first (only for the first |
153 |
// bucket, since that's where the currently downloading |
|
154 |
// pieces are) |
|
155 |
- int start_piece = rand() % m_piece_map.size(); |
|
156 |
+ int start_piece = std::rand() % m_piece_map.size(); |
|
751 | 157 |
|
158 |
// if we have suggested pieces, try to find one of those instead |
|
159 |
for (std::vector<int>::const_iterator i = suggested_pieces.begin() |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
160 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/session.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
161 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/session.cpp 2008-06-19 16:36:06.004093093 +0000 |
483 | 162 |
@@ -77,7 +77,6 @@ |
163 |
using boost::shared_ptr; |
|
164 |
using boost::weak_ptr; |
|
165 |
using boost::bind; |
|
166 |
-using boost::mutex; |
|
167 |
using libtorrent::aux::session_impl; |
|
168 |
||
169 |
namespace libtorrent |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
170 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/session_impl.cpp 2008-05-18 22:37:11.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
171 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/session_impl.cpp 2008-06-19 16:36:06.005696187 +0000 |
751 | 172 |
@@ -98,7 +98,6 @@ |
483 | 173 |
using boost::shared_ptr; |
174 |
using boost::weak_ptr; |
|
175 |
using boost::bind; |
|
176 |
-using boost::mutex; |
|
177 |
using libtorrent::aux::session_impl; |
|
178 |
||
179 |
namespace libtorrent { |
|
751 | 180 |
@@ -208,7 +207,7 @@ |
181 |
#endif |
|
182 |
} |
|
483 | 183 |
|
184 |
- mutex::scoped_lock l2(m_mutex); |
|
751 | 185 |
+ boost::mutex::scoped_lock l2(m_mutex); |
186 |
||
187 |
if (m_torrents.empty() || m_torrents.front() != t) |
|
188 |
{ |
|
189 |
@@ -296,7 +295,7 @@ |
|
483 | 190 |
// This will happen if the storage fails to initialize |
191 |
// for example if one of the files has an invalid filename. |
|
192 |
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex); |
|
193 |
- mutex::scoped_lock l2(m_mutex); |
|
751 | 194 |
+ boost::mutex::scoped_lock l2(m_mutex); |
483 | 195 |
|
196 |
if (m_ses.m_alerts.should_post(alert::fatal)) |
|
197 |
{ |
|
751 | 198 |
@@ -315,7 +314,7 @@ |
483 | 199 |
#ifndef NDEBUG |
200 |
std::cerr << "error while checking resume data\n"; |
|
201 |
#endif |
|
202 |
- mutex::scoped_lock l(m_mutex); |
|
751 | 203 |
+ boost::mutex::scoped_lock l(m_mutex); |
204 |
TORRENT_ASSERT(!m_torrents.empty()); |
|
483 | 205 |
m_torrents.pop_front(); |
751 | 206 |
TORRENT_ASSERT(false); |
207 |
@@ -332,7 +331,7 @@ |
|
483 | 208 |
boost::tie(finished, progress) = processing->torrent_ptr->check_files(); |
209 |
||
210 |
{ |
|
211 |
- mutex::scoped_lock l2(m_mutex); |
|
212 |
+ boost::mutex::scoped_lock l2(m_mutex); |
|
213 |
||
214 |
INVARIANT_CHECK; |
|
215 |
||
751 | 216 |
@@ -362,7 +361,7 @@ |
217 |
{ |
|
218 |
// lock the session to add the new torrent |
|
219 |
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex); |
|
220 |
- mutex::scoped_lock l2(m_mutex); |
|
221 |
+ boost::mutex::scoped_lock l2(m_mutex); |
|
222 |
||
223 |
INVARIANT_CHECK; |
|
224 |
||
225 |
@@ -425,7 +424,7 @@ |
|
483 | 226 |
{ |
227 |
// This will happen if the storage fails to initialize |
|
228 |
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex); |
|
229 |
- mutex::scoped_lock l2(m_mutex); |
|
751 | 230 |
+ boost::mutex::scoped_lock l2(m_mutex); |
483 | 231 |
|
232 |
if (m_ses.m_alerts.should_post(alert::fatal)) |
|
233 |
{ |
|
751 | 234 |
@@ -452,7 +451,7 @@ |
483 | 235 |
#ifndef NDEBUG |
236 |
std::cerr << "error while checking files\n"; |
|
237 |
#endif |
|
238 |
- mutex::scoped_lock l(m_mutex); |
|
751 | 239 |
+ boost::mutex::scoped_lock l(m_mutex); |
240 |
TORRENT_ASSERT(!m_processing.empty()); |
|
483 | 241 |
|
242 |
processing.reset(); |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
243 |
@@ -764,7 +763,7 @@ |
751 | 244 |
m_download_channel.close(); |
245 |
m_upload_channel.close(); |
|
483 | 246 |
|
247 |
- mutex::scoped_lock l2(m_checker_impl.m_mutex); |
|
248 |
+ boost::mutex::scoped_lock l2(m_checker_impl.m_mutex); |
|
249 |
// abort the checker thread |
|
250 |
m_checker_impl.m_abort = true; |
|
751 | 251 |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
252 |
@@ -1669,7 +1668,7 @@ |
483 | 253 |
std::vector<torrent_handle> session_impl::get_torrents() |
254 |
{ |
|
255 |
mutex_t::scoped_lock l(m_mutex); |
|
256 |
- mutex::scoped_lock l2(m_checker_impl.m_mutex); |
|
751 | 257 |
+ boost::mutex::scoped_lock l2(m_checker_impl.m_mutex); |
483 | 258 |
std::vector<torrent_handle> ret; |
259 |
for (std::deque<boost::shared_ptr<aux::piece_checker_data> >::iterator i |
|
260 |
= m_checker_impl.m_torrents.begin() |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
261 |
@@ -1721,7 +1720,7 @@ |
483 | 262 |
|
263 |
// lock the session and the checker thread (the order is important!) |
|
264 |
mutex_t::scoped_lock l(m_mutex); |
|
265 |
- mutex::scoped_lock l2(m_checker_impl.m_mutex); |
|
751 | 266 |
+ boost::mutex::scoped_lock l2(m_checker_impl.m_mutex); |
483 | 267 |
|
751 | 268 |
// INVARIANT_CHECK; |
483 | 269 |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
270 |
@@ -1797,7 +1796,7 @@ |
751 | 271 |
TORRENT_ASSERT(!save_path.empty()); |
483 | 272 |
{ |
273 |
// lock the checker_thread |
|
274 |
- mutex::scoped_lock l(m_checker_impl.m_mutex); |
|
275 |
+ boost::mutex::scoped_lock l(m_checker_impl.m_mutex); |
|
276 |
||
277 |
// is the torrent currently being checked? |
|
278 |
if (m_checker_impl.find_torrent(info_hash)) |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
279 |
@@ -1896,7 +1895,7 @@ |
483 | 280 |
|
281 |
if (h.m_chk) |
|
282 |
{ |
|
283 |
- mutex::scoped_lock l(m_checker_impl.m_mutex); |
|
284 |
+ boost::mutex::scoped_lock l(m_checker_impl.m_mutex); |
|
285 |
||
286 |
aux::piece_checker_data* d = m_checker_impl.find_torrent(h.m_info_hash); |
|
287 |
if (d != 0) |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
288 |
@@ -2208,7 +2207,7 @@ |
483 | 289 |
// destructed and then the invariant will be broken). |
290 |
||
291 |
{ |
|
292 |
- mutex::scoped_lock l(m_checker_impl.m_mutex); |
|
293 |
+ boost::mutex::scoped_lock l(m_checker_impl.m_mutex); |
|
294 |
// abort the checker thread |
|
295 |
m_checker_impl.m_abort = true; |
|
296 |
||
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
297 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/sha1.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
298 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/sha1.cpp 2008-06-19 16:36:06.006271345 +0000 |
751 | 299 |
@@ -20,20 +20,19 @@ |
435 | 300 |
// #include <stdint.h> |
301 |
||
302 |
#include <boost/cstdint.hpp> |
|
303 |
-using boost::uint32_t; |
|
304 |
using boost::uint8_t; |
|
305 |
||
306 |
#include "libtorrent/config.hpp" |
|
442 | 307 |
|
308 |
struct TORRENT_EXPORT SHA_CTX |
|
309 |
{ |
|
310 |
- uint32_t state[5]; |
|
311 |
- uint32_t count[2]; |
|
312 |
+ boost::uint32_t state[5]; |
|
313 |
+ boost::uint32_t count[2]; |
|
314 |
uint8_t buffer[64]; |
|
315 |
}; |
|
316 |
||
317 |
TORRENT_EXPORT void SHA1_Init(SHA_CTX* context); |
|
318 |
-TORRENT_EXPORT void SHA1_Update(SHA_CTX* context, uint8_t const* data, uint32_t len); |
|
319 |
+TORRENT_EXPORT void SHA1_Update(SHA_CTX* context, uint8_t const* data, boost::uint32_t len); |
|
320 |
TORRENT_EXPORT void SHA1_Final(uint8_t* digest, SHA_CTX* context); |
|
321 |
||
322 |
namespace |
|
323 |
@@ -41,7 +40,7 @@ |
|
324 |
union CHAR64LONG16 |
|
325 |
{ |
|
326 |
uint8_t c[64]; |
|
327 |
- uint32_t l[16]; |
|
328 |
+ boost::uint32_t l[16]; |
|
329 |
}; |
|
330 |
||
331 |
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) |
|
332 |
@@ -50,7 +49,7 @@ |
|
333 |
// I got the idea of expanding during the round function from SSLeay |
|
334 |
struct little_endian_blk0 |
|
335 |
{ |
|
336 |
- static uint32_t apply(CHAR64LONG16* block, int i) |
|
337 |
+ static boost::uint32_t apply(CHAR64LONG16* block, int i) |
|
338 |
{ |
|
339 |
return block->l[i] = (rol(block->l[i],24)&0xFF00FF00) |
|
340 |
| (rol(block->l[i],8)&0x00FF00FF); |
|
341 |
@@ -59,7 +58,7 @@ |
|
342 |
||
343 |
struct big_endian_blk0 |
|
344 |
{ |
|
345 |
- static uint32_t apply(CHAR64LONG16* block, int i) |
|
346 |
+ static boost::uint32_t apply(CHAR64LONG16* block, int i) |
|
347 |
{ |
|
348 |
return block->l[i]; |
|
349 |
} |
|
350 |
@@ -78,10 +77,10 @@ |
|
351 |
||
352 |
// Hash a single 512-bit block. This is the core of the algorithm. |
|
353 |
template <class BlkFun> |
|
354 |
- void SHA1Transform(uint32_t state[5], uint8_t const buffer[64]) |
|
355 |
+ void SHA1Transform(boost::uint32_t state[5], uint8_t const buffer[64]) |
|
356 |
{ |
|
357 |
using namespace std; |
|
358 |
- uint32_t a, b, c, d, e; |
|
359 |
+ boost::uint32_t a, b, c, d, e; |
|
360 |
||
361 |
CHAR64LONG16* block; |
|
362 |
uint8_t workspace[64]; |
|
363 |
@@ -136,10 +135,10 @@ |
|
364 |
} |
|
365 |
||
366 |
template <class BlkFun> |
|
367 |
- void internal_update(SHA_CTX* context, uint8_t const* data, uint32_t len) |
|
368 |
+ void internal_update(SHA_CTX* context, uint8_t const* data, boost::uint32_t len) |
|
369 |
{ |
|
370 |
using namespace std; |
|
371 |
- uint32_t i, j; // JHB |
|
372 |
+ boost::uint32_t i, j; // JHB |
|
373 |
||
374 |
#ifdef VERBOSE |
|
375 |
SHAPrintContext(context, "before"); |
|
376 |
@@ -169,7 +168,7 @@ |
|
377 |
||
378 |
bool is_big_endian() |
|
379 |
{ |
|
380 |
- uint32_t test = 1; |
|
381 |
+ boost::uint32_t test = 1; |
|
382 |
return *reinterpret_cast<uint8_t*>(&test) == 0; |
|
383 |
} |
|
384 |
} |
|
385 |
@@ -190,7 +189,7 @@ |
|
386 |
||
387 |
// Run your data through this. |
|
388 |
||
389 |
-void SHA1_Update(SHA_CTX* context, uint8_t const* data, uint32_t len) |
|
390 |
+void SHA1_Update(SHA_CTX* context, uint8_t const* data, boost::uint32_t len) |
|
391 |
{ |
|
392 |
#if defined __BIG_ENDIAN__ |
|
393 |
internal_update<big_endian_blk0>(context, data, len); |
|
394 |
@@ -213,7 +212,7 @@ |
|
395 |
{ |
|
396 |
uint8_t finalcount[8]; |
|
397 |
||
398 |
- for (uint32_t i = 0; i < 8; ++i) |
|
399 |
+ for (boost::uint32_t i = 0; i < 8; ++i) |
|
400 |
{ |
|
401 |
// Endian independent |
|
402 |
finalcount[i] = static_cast<uint8_t>( |
|
403 |
@@ -226,7 +225,7 @@ |
|
404 |
SHA1_Update(context, (uint8_t const*)"\0", 1); |
|
405 |
SHA1_Update(context, finalcount, 8); // Should cause a SHA1Transform() |
|
406 |
||
407 |
- for (uint32_t i = 0; i < 20; ++i) |
|
408 |
+ for (boost::uint32_t i = 0; i < 20; ++i) |
|
409 |
{ |
|
410 |
digest[i] = static_cast<unsigned char>( |
|
411 |
(context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
412 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/torrent.cpp 2008-05-18 22:37:11.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
413 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/torrent.cpp 2008-06-19 16:36:06.007867564 +0000 |
751 | 414 |
@@ -79,7 +79,6 @@ |
483 | 415 |
using boost::tuples::get; |
416 |
using boost::tuples::make_tuple; |
|
417 |
using boost::bind; |
|
418 |
-using boost::mutex; |
|
419 |
using libtorrent::aux::session_impl; |
|
420 |
||
421 |
namespace |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
422 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/torrent_handle.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
423 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/torrent_handle.cpp 2008-06-19 16:39:15.955003859 +0000 |
435 | 424 |
@@ -75,7 +75,6 @@ |
425 |
#endif |
|
426 |
||
427 |
using boost::bind; |
|
428 |
-using boost::mutex; |
|
429 |
using libtorrent::aux::session_impl; |
|
430 |
||
751 | 431 |
#ifdef BOOST_NO_EXCEPTIONS |
432 |
@@ -84,7 +83,7 @@ |
|
433 |
if (m_ses == 0) return; \ |
|
434 |
TORRENT_ASSERT(m_chk); \ |
|
435 |
session_impl::mutex_t::scoped_lock l1(m_ses->m_mutex); \ |
|
436 |
- mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
437 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
438 |
torrent* t = find_torrent(m_ses, m_chk, m_info_hash); \ |
|
439 |
if (t == 0) return; \ |
|
440 |
t->call |
|
441 |
@@ -93,7 +92,7 @@ |
|
442 |
if (m_ses == 0) return def; \ |
|
443 |
TORRENT_ASSERT(m_chk); \ |
|
444 |
session_impl::mutex_t::scoped_lock l1(m_ses->m_mutex); \ |
|
445 |
- mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
446 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
447 |
torrent* t = find_torrent(m_ses, m_chk, m_info_hash); \ |
|
448 |
if (t == 0) return def; \ |
|
449 |
return t->call |
|
450 |
@@ -102,7 +101,7 @@ |
|
451 |
if (m_ses == 0) return def; \ |
|
452 |
TORRENT_ASSERT(m_chk); \ |
|
453 |
session_impl::mutex_t::scoped_lock l1(m_ses->m_mutex); \ |
|
454 |
- mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
455 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
456 |
torrent* t = find_torrent(m_ses, m_chk, m_info_hash); \ |
|
457 |
if (t == 0) return def; \ |
|
458 |
t->call |
|
459 |
@@ -113,7 +112,7 @@ |
|
460 |
if (m_ses == 0) throw_invalid_handle(); \ |
|
461 |
TORRENT_ASSERT(m_chk); \ |
|
462 |
session_impl::mutex_t::scoped_lock l1(m_ses->m_mutex); \ |
|
463 |
- mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
464 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
465 |
torrent* t = find_torrent(m_ses, m_chk, m_info_hash); \ |
|
466 |
if (t == 0) throw_invalid_handle(); \ |
|
467 |
t->call |
|
468 |
@@ -122,7 +121,7 @@ |
|
469 |
if (m_ses == 0) throw_invalid_handle(); \ |
|
470 |
TORRENT_ASSERT(m_chk); \ |
|
471 |
session_impl::mutex_t::scoped_lock l1(m_ses->m_mutex); \ |
|
472 |
- mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
473 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
474 |
torrent* t = find_torrent(m_ses, m_chk, m_info_hash); \ |
|
475 |
if (t == 0) return def; \ |
|
476 |
return t->call |
|
477 |
@@ -131,7 +130,7 @@ |
|
478 |
if (m_ses == 0) throw_invalid_handle(); \ |
|
479 |
TORRENT_ASSERT(m_chk); \ |
|
480 |
session_impl::mutex_t::scoped_lock l1(m_ses->m_mutex); \ |
|
481 |
- mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
482 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); \ |
|
483 |
torrent* t = find_torrent(m_ses, m_chk, m_info_hash); \ |
|
484 |
if (t == 0) return def; \ |
|
485 |
t->call |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
486 |
@@ -311,7 +310,7 @@ |
751 | 487 |
TORRENT_ASSERT(m_chk); |
488 |
||
489 |
session_impl::mutex_t::scoped_lock l(m_ses->m_mutex); |
|
483 | 490 |
- mutex::scoped_lock l2(m_chk->m_mutex); |
491 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); |
|
492 |
||
751 | 493 |
aux::piece_checker_data* d = m_chk->find_torrent(m_info_hash); |
494 |
if (d != 0) |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
495 |
@@ -472,7 +471,7 @@ |
751 | 496 |
#endif |
497 |
TORRENT_ASSERT(m_chk); |
|
483 | 498 |
session_impl::mutex_t::scoped_lock l1(m_ses->m_mutex); |
499 |
- mutex::scoped_lock l2(m_chk->m_mutex); |
|
500 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); |
|
751 | 501 |
torrent* t = find_torrent(m_ses, m_chk, m_info_hash); |
502 |
if (t == 0 || !t->valid_metadata()) |
|
503 |
#ifdef BOOST_NO_EXCEPTIONS |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
504 |
@@ -489,7 +488,7 @@ |
751 | 505 |
if (m_ses == 0) return false; |
506 |
TORRENT_ASSERT(m_chk); |
|
483 | 507 |
session_impl::mutex_t::scoped_lock l1(m_ses->m_mutex); |
508 |
- mutex::scoped_lock l2(m_chk->m_mutex); |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
509 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); |
751 | 510 |
torrent* t = find_torrent(m_ses, m_chk, m_info_hash); |
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
511 |
return t != 0; |
483 | 512 |
} |
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
513 |
@@ -507,7 +506,7 @@ |
751 | 514 |
TORRENT_ASSERT(m_chk); |
483 | 515 |
|
751 | 516 |
session_impl::mutex_t::scoped_lock l(m_ses->m_mutex); |
483 | 517 |
- mutex::scoped_lock l2(m_chk->m_mutex); |
518 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); |
|
519 |
||
937 | 520 |
torrent* t = find_torrent(m_ses, m_chk, m_info_hash); |
751 | 521 |
if (!t || !t->valid_metadata()) |
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
522 |
@@ -670,7 +669,7 @@ |
435 | 523 |
// the torrent is being checked. Add the peer to its |
524 |
// peer list. The entries in there will be connected |
|
525 |
// once the checking is complete. |
|
526 |
- mutex::scoped_lock l2(m_chk->m_mutex); |
|
527 |
+ boost::mutex::scoped_lock l2(m_chk->m_mutex); |
|
528 |
||
529 |
aux::piece_checker_data* d = m_chk->find_torrent(m_info_hash); |
|
751 | 530 |
if (d == 0) |
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
531 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/udp_tracker_connection.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
532 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/udp_tracker_connection.cpp 2008-06-19 16:36:06.009208730 +0000 |
937 | 533 |
@@ -187,7 +187,7 @@ |
483 | 534 |
char* ptr = send_buf; |
535 |
||
536 |
if (m_transaction_id == 0) |
|
537 |
- m_transaction_id = rand() ^ (rand() << 16); |
|
538 |
+ m_transaction_id = std::rand() ^ (std::rand() << 16); |
|
539 |
||
540 |
// connection_id |
|
541 |
detail::write_uint32(0x417, ptr); |
|
937 | 542 |
@@ -292,7 +292,7 @@ |
483 | 543 |
void udp_tracker_connection::send_udp_announce() |
544 |
{ |
|
545 |
if (m_transaction_id == 0) |
|
546 |
- m_transaction_id = rand() ^ (rand() << 16); |
|
547 |
+ m_transaction_id = std::rand() ^ (std::rand() << 16); |
|
548 |
||
751 | 549 |
if (!m_socket.is_open()) return; // the operation was aborted |
483 | 550 |
|
937 | 551 |
@@ -352,7 +352,7 @@ |
483 | 552 |
void udp_tracker_connection::send_udp_scrape() |
553 |
{ |
|
554 |
if (m_transaction_id == 0) |
|
555 |
- m_transaction_id = rand() ^ (rand() << 16); |
|
556 |
+ m_transaction_id = std::rand() ^ (std::rand() << 16); |
|
557 |
||
751 | 558 |
if (!m_socket.is_open()) return; // the operation was aborted |
483 | 559 |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
560 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/upnp.cpp 2008-05-18 22:36:37.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
561 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/upnp.cpp 2008-06-19 16:36:06.009774227 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
562 |
@@ -642,14 +642,14 @@ |
435 | 563 |
if (type == xml_start_tag) |
564 |
{ |
|
565 |
if ((!state.top_tag.empty() && state.top_tag == "service") |
|
566 |
- || !strcmp(string, "service")) |
|
567 |
+ || !std::strcmp(string, "service")) |
|
568 |
{ |
|
569 |
state.top_tag = string; |
|
570 |
} |
|
571 |
} |
|
572 |
else if (type == xml_end_tag) |
|
573 |
{ |
|
574 |
- if (!strcmp(string, "service")) |
|
575 |
+ if (!std::strcmp(string, "service")) |
|
576 |
{ |
|
577 |
state.top_tag.clear(); |
|
578 |
if (state.found_service) state.exit = true; |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
579 |
@@ -661,7 +661,7 @@ |
435 | 580 |
{ |
581 |
if (state.top_tag == "serviceType") |
|
582 |
{ |
|
583 |
- if (!strcmp(string, state.service_type)) |
|
584 |
+ if (!std::strcmp(string, state.service_type)) |
|
585 |
state.found_service = true; |
|
586 |
} |
|
587 |
else if (state.top_tag == "controlURL") |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
588 |
@@ -783,7 +783,7 @@ |
435 | 589 |
void find_error_code(int type, char const* string, error_code_parse_state& state) |
590 |
{ |
|
591 |
if (state.exit) return; |
|
592 |
- if (type == xml_start_tag && !strcmp("errorCode", string)) |
|
593 |
+ if (type == xml_start_tag && !std::strcmp("errorCode", string)) |
|
594 |
{ |
|
595 |
state.in_error_code = true; |
|
596 |
} |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
597 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/kademlia/node.cpp 2008-05-18 22:12:22.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
598 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/kademlia/node.cpp 2008-06-19 16:36:06.010181163 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
599 |
@@ -428,7 +428,7 @@ |
483 | 600 |
int num = (std::min)((int)v.peers.size(), m_settings.max_peers_reply); |
601 |
peers.clear(); |
|
602 |
peers.reserve(num); |
|
603 |
- random_sample_n(boost::make_transform_iterator(v.peers.begin(), &get_endpoint) |
|
604 |
+ std::random_sample_n(boost::make_transform_iterator(v.peers.begin(), &get_endpoint) |
|
605 |
, boost::make_transform_iterator(v.peers.end(), &get_endpoint) |
|
606 |
, std::back_inserter(peers), num); |
|
435 | 607 |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
608 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/kademlia/rpc_manager.cpp 2008-05-18 22:12:22.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
609 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/kademlia/rpc_manager.cpp 2008-06-19 16:36:06.010485270 +0000 |
435 | 610 |
@@ -82,7 +82,7 @@ |
611 |
if (--o->m_refs == 0) |
|
612 |
{ |
|
613 |
boost::pool<>& p = o->pool_allocator; |
|
614 |
- o->~observer(); |
|
615 |
+ (const_cast<observer*>(o))->~observer(); |
|
751 | 616 |
p.free(const_cast<observer*>(o)); |
435 | 617 |
} |
618 |
} |
|
619 |
@@ -106,7 +106,7 @@ |
|
620 |
rpc_manager::rpc_manager(fun const& f, node_id const& our_id |
|
621 |
, routing_table& table, send_fun const& sf) |
|
622 |
: m_pool_allocator(sizeof(mpl::deref<max_observer_type_iter::base>::type)) |
|
623 |
- , m_next_transaction_id(rand() % max_transactions) |
|
624 |
+ , m_next_transaction_id(std::rand() % max_transactions) |
|
625 |
, m_oldest_transaction_id(m_next_transaction_id) |
|
626 |
, m_incoming(f) |
|
627 |
, m_send(sf) |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
628 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/web_peer_connection.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
629 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/web_peer_connection.cpp 2008-06-19 16:36:06.010826061 +0000 |
751 | 630 |
@@ -467,7 +467,7 @@ |
631 |
else |
|
632 |
{ |
|
633 |
range_start = 0; |
|
634 |
- range_end = atol(m_parser.header("content-length").c_str()); |
|
635 |
+ range_end = std::atol(m_parser.header("content-length").c_str()); |
|
636 |
if (range_end == -1) |
|
637 |
{ |
|
638 |
// we should not try this server again. |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
639 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/include/libtorrent/asio/detail/resolver_service.hpp 2008-05-11 23:55:17.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
640 |
+++ deluge-torrent-0.5.9.1/libtorrent/include/libtorrent/asio/detail/resolver_service.hpp 2008-06-19 16:36:06.011108335 +0000 |
751 | 641 |
@@ -329,7 +329,7 @@ |
642 |
void start_work_thread() |
|
643 |
{ |
|
644 |
asio::detail::mutex::scoped_lock lock(mutex_); |
|
645 |
- if (work_thread_ == 0) |
|
646 |
+ if (work_thread_.get() == 0) |
|
647 |
{ |
|
648 |
work_thread_.reset(new asio::detail::thread( |
|
649 |
work_io_service_runner(*work_io_service_))); |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
650 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/lsd.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
651 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/lsd.cpp 2008-06-19 16:36:06.011324195 +0000 |
751 | 652 |
@@ -166,7 +166,7 @@ |
653 |
sha1_hash ih(0); |
|
654 |
std::istringstream ih_sstr(ih_str); |
|
655 |
ih_sstr >> ih; |
|
656 |
- int port = atoi(port_str.c_str()); |
|
657 |
+ int port = std::atoi(port_str.c_str()); |
|
658 |
||
659 |
if (!ih.is_all_zeros() && port != 0) |
|
660 |
{ |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
661 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/http_tracker_connection.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
662 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/http_tracker_connection.cpp 2008-06-19 16:36:06.011841503 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
663 |
@@ -705,7 +705,7 @@ |
751 | 664 |
|
665 |
if (m_parser.header_finished()) |
|
666 |
{ |
|
667 |
- int cl = atoi(m_parser.header("content-length").c_str()); |
|
668 |
+ int cl = std::atoi(m_parser.header("content-length").c_str()); |
|
669 |
if (cl > m_settings.tracker_maximum_response_length) |
|
670 |
{ |
|
671 |
fail(-1, "content-length is greater than maximum response length"); |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
672 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/enum_net.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
673 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/enum_net.cpp 2008-06-19 16:36:06.012071925 +0000 |
1011 | 674 |
@@ -31,6 +31,7 @@ |
675 |
*/ |
|
751 | 676 |
|
1011 | 677 |
#include "libtorrent/config.hpp" |
751 | 678 |
+#include "asio/ip/host_name.hpp" |
679 |
||
1011 | 680 |
#if defined TORRENT_BSD || defined TORRENT_LINUX |
681 |
#include <sys/ioctl.h> |
|
1402
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
682 |
--- deluge-torrent-0.5.9.1-orig/libtorrent/src/identify_client.cpp 2008-05-18 22:12:25.000000000 +0000 |
4b8e841da99c
* SFEdeluge.spec, patches/deluge-01-sunpro.diff: Bump to 0.5.9.1, bump patch1
markwright
parents:
1011
diff
changeset
|
683 |
+++ deluge-torrent-0.5.9.1/libtorrent/src/identify_client.cpp 2008-06-19 16:36:06.012336233 +0000 |
937 | 684 |
@@ -34,6 +34,7 @@ |
685 |
||
686 |
#include <cctype> |
|
687 |
#include <algorithm> |
|
688 |
+#include <stdio.h> |
|
689 |
||
690 |
#ifdef _MSC_VER |
|
691 |
#pragma warning(push, 1) |