]>
Commit | Line | Data |
---|---|---|
591b0ad2 JB |
1 | --- qpidc-0.16/src/Makefile.am.orig 2012-02-24 21:05:47.000000000 +0100 |
2 | +++ qpidc-0.16/src/Makefile.am 2012-07-29 13:30:13.075820560 +0200 | |
3 | @@ -137,7 +137,7 @@ | |
4 | tmoduleexecdir = $(libdir)/qpid/tests | |
5 | tmoduleexec_LTLIBRARIES= | |
6 | ||
7 | -AM_CXXFLAGS += -DBOOST_FILESYSTEM_VERSION=2 | |
8 | +AM_CXXFLAGS += -DBOOST_FILESYSTEM_VERSION=3 | |
9 | ||
10 | ## Automake macros to build libraries and executables. | |
11 | qpidd_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDD_MODULE_DIR=\"$(dmoduleexecdir)\" -DQPIDD_CONF_FILE=\"$(sysconfdir)/qpidd.conf\" | |
12 | --- qpidc-0.16/src/qpid/Modules.cpp.orig 2011-03-14 21:29:02.000000000 +0100 | |
13 | +++ qpidc-0.16/src/qpid/Modules.cpp 2012-07-29 21:31:10.801276183 +0200 | |
14 | @@ -73,7 +73,7 @@ | |
15 | ||
16 | void loadModuleDir (std::string dirname, bool isDefault) | |
17 | { | |
18 | - fs::path dirPath (dirname, fs::native); | |
19 | + fs::path dirPath (dirname); | |
20 | ||
21 | if (!fs::exists (dirPath)) | |
22 | { | |
23 | @@ -89,8 +89,8 @@ | |
24 | fs::directory_iterator endItr; | |
25 | for (fs::directory_iterator itr (dirPath); itr != endItr; ++itr) | |
26 | { | |
27 | - if (!fs::is_directory(*itr) && isShlibName(itr->string())) | |
28 | - tryShlib (itr->string().data(), true); | |
29 | + if (!fs::is_directory(*itr) && isShlibName(itr->path().string())) | |
30 | + tryShlib (itr->path().string().data(), true); | |
31 | } | |
32 | } | |
33 | ||
34 | --- qpidc-0.16/src/qpid/cluster/StoreStatus.cpp.orig 2010-04-01 19:51:04.000000000 +0200 | |
35 | +++ qpidc-0.16/src/qpid/cluster/StoreStatus.cpp 2012-07-29 21:53:14.617887294 +0200 | |
36 | @@ -77,7 +77,7 @@ | |
37 | throw Exception(QPID_MSG("No data-dir: When a store is loaded together with clustering, --data-dir must be specified.")); | |
38 | } | |
39 | try { | |
40 | - fs::path dir = fs::path(dataDir, fs::native)/SUBDIR; | |
41 | + fs::path dir = fs::path(dataDir)/SUBDIR; | |
42 | create_directory(dir); | |
43 | fs::path file = dir/STORE_STATUS; | |
44 | if (fs::exists(file)) { | |
45 | @@ -106,7 +106,7 @@ | |
46 | try { | |
47 | ostringstream os; | |
48 | os << clusterId << endl << shutdownId << endl; | |
49 | - fs::path file = fs::path(dataDir, fs::native)/SUBDIR/STORE_STATUS; | |
50 | + fs::path file = fs::path(dataDir)/SUBDIR/STORE_STATUS; | |
51 | writeFile(file, os.str()); | |
52 | } | |
53 | catch (const std::exception& e) { | |
1ea345ac JB |
54 | --- qpidc-0.16/src/qpid/sys/rdma/RdmaServer.cpp.orig 2010-12-23 18:11:57.000000000 +0100 |
55 | +++ qpidc-0.16/src/qpid/sys/rdma/RdmaServer.cpp 2020-12-12 20:59:07.797183372 +0100 | |
56 | @@ -119,7 +119,7 @@ | |
57 | cout << "Drained:\n"; | |
58 | } | |
59 | ||
60 | -void disconnected(Rdma::Connection::intrusive_ptr& ci) { | |
61 | +void disconnected(Rdma::Connection::intrusive_ptr ci) { | |
62 | ConRec* cr = ci->getContext<ConRec>(); | |
63 | cr->connection->disconnect(); | |
64 | cr->data->drainWriteQueue(drained); | |
65 | @@ -127,7 +127,7 @@ | |
66 | cout << "Disconnected: " << cr << "\n"; | |
67 | } | |
68 | ||
69 | -void connectionError(Rdma::Connection::intrusive_ptr& ci, Rdma::ErrorType) { | |
70 | +void connectionError(Rdma::Connection::intrusive_ptr ci, Rdma::ErrorType) { | |
71 | ConRec* cr = ci->getContext<ConRec>(); | |
72 | cr->connection->disconnect(); | |
73 | if (cr) { | |
74 | @@ -137,7 +137,7 @@ | |
75 | cout << "Connection error: " << cr << "\n"; | |
76 | } | |
77 | ||
78 | -bool connectionRequest(Rdma::Connection::intrusive_ptr& ci, const Rdma::ConnectionParams& cp) { | |
79 | +bool connectionRequest(Rdma::Connection::intrusive_ptr ci, const Rdma::ConnectionParams& cp) { | |
80 | cout << "Incoming connection: "; | |
81 | ||
82 | // For fun reject alternate connection attempts | |
83 | @@ -165,7 +165,7 @@ | |
84 | return x; | |
85 | } | |
86 | ||
87 | -void connected(Poller::shared_ptr poller, Rdma::Connection::intrusive_ptr& ci) { | |
88 | +void connected(Poller::shared_ptr poller, Rdma::Connection::intrusive_ptr ci) { | |
89 | static int cnt = 0; | |
90 | ConRec* cr = ci->getContext<ConRec>(); | |
91 | cout << "Connected: " << cr << "(" << ++cnt << ")\n"; | |
92 | --- qpidc-0.16/src/qpid/sys/rdma/rdma_wrap.cpp.orig 2011-04-27 14:51:26.000000000 +0200 | |
93 | +++ qpidc-0.16/src/qpid/sys/rdma/rdma_wrap.cpp 2020-12-12 21:01:58.282926438 +0100 | |
94 | @@ -325,7 +325,7 @@ | |
95 | {} | |
96 | ||
97 | ConnectionEvent::operator bool() const { | |
98 | - return event; | |
99 | + return !!event; | |
100 | } | |
101 | ||
102 | ::rdma_cm_event_type ConnectionEvent::getEventType() const { | |
103 | --- qpidc-0.16/src/qpid/sys/posix/Thread.cpp.orig 2011-05-09 21:55:29.000000000 +0200 | |
104 | +++ qpidc-0.16/src/qpid/sys/posix/Thread.cpp 2020-12-12 21:24:04.449075313 +0100 | |
105 | @@ -55,7 +55,7 @@ | |
106 | Thread::Thread(Runnable& runnable) : impl(new ThreadPrivate(&runnable)) {} | |
107 | ||
108 | Thread::operator bool() { | |
109 | - return impl; | |
110 | + return !!impl; | |
111 | } | |
112 | ||
113 | bool Thread::operator==(const Thread& t) const { | |
114 | --- qpidc-0.16/src/qpid/sys/rdma/RdmaClient.cpp.orig 2010-12-23 18:11:57.000000000 +0100 | |
115 | +++ qpidc-0.16/src/qpid/sys/rdma/RdmaClient.cpp 2020-12-12 21:52:39.243118810 +0100 | |
116 | @@ -160,7 +160,7 @@ | |
117 | cout << "Drained:\n"; | |
118 | } | |
119 | ||
120 | -void connected(Poller::shared_ptr poller, Rdma::Connection::intrusive_ptr& ci, const Rdma::ConnectionParams& cp) { | |
121 | +void connected(Poller::shared_ptr poller, Rdma::Connection::intrusive_ptr ci, const Rdma::ConnectionParams& cp) { | |
122 | cout << "Connected\n"; | |
123 | Rdma::QueuePair::intrusive_ptr q = ci->getQueuePair(); | |
124 | ||
125 | @@ -178,17 +178,17 @@ | |
126 | aio->start(poller); | |
127 | } | |
128 | ||
129 | -void disconnected(boost::shared_ptr<Poller> p, Rdma::Connection::intrusive_ptr&) { | |
130 | +void disconnected(boost::shared_ptr<Poller> p, Rdma::Connection::intrusive_ptr) { | |
131 | cout << "Disconnected\n"; | |
132 | p->shutdown(); | |
133 | } | |
134 | ||
135 | -void connectionError(boost::shared_ptr<Poller> p, Rdma::Connection::intrusive_ptr&, const Rdma::ErrorType) { | |
136 | +void connectionError(boost::shared_ptr<Poller> p, Rdma::Connection::intrusive_ptr, const Rdma::ErrorType) { | |
137 | cout << "Connection error\n"; | |
138 | p->shutdown(); | |
139 | } | |
140 | ||
141 | -void rejected(boost::shared_ptr<Poller> p, Rdma::Connection::intrusive_ptr&, const Rdma::ConnectionParams&) { | |
142 | +void rejected(boost::shared_ptr<Poller> p, Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams&) { | |
143 | cout << "Connection rejected\n"; | |
144 | p->shutdown(); | |
145 | } | |
146 | --- qpidc-0.16/src/qpid/broker/ConnectionHandler.cpp.orig 2012-02-17 15:54:46.000000000 +0100 | |
147 | +++ qpidc-0.16/src/qpid/broker/ConnectionHandler.cpp 2020-12-12 22:11:17.543727122 +0100 | |
148 | @@ -160,7 +160,7 @@ | |
149 | const framing::FieldTable& clientProperties = body.getClientProperties(); | |
150 | connection.setClientProperties(clientProperties); | |
151 | ||
152 | - connection.setFederationLink(clientProperties.get(QPID_FED_LINK)); | |
153 | + connection.setFederationLink(!!clientProperties.get(QPID_FED_LINK)); | |
154 | if (clientProperties.isSet(QPID_FED_TAG)) { | |
155 | connection.setFederationPeerTag(clientProperties.getAsString(QPID_FED_TAG)); | |
156 | } | |
157 | --- qpidc-0.16/src/qpid/broker/DirectExchange.cpp.orig 2012-03-05 20:12:32.000000000 +0100 | |
158 | +++ qpidc-0.16/src/qpid/broker/DirectExchange.cpp 2020-12-12 22:14:20.136071267 +0100 | |
159 | @@ -60,7 +60,7 @@ | |
160 | fedOp = args->getAsString(qpidFedOp); | |
161 | fedTags = args->getAsString(qpidFedTags); | |
162 | fedOrigin = args->getAsString(qpidFedOrigin); | |
163 | - exclusiveBinding = args->get(qpidExclusiveBinding); // only direct exchanges take exclusive bindings | |
164 | + exclusiveBinding = !!args->get(qpidExclusiveBinding); // only direct exchanges take exclusive bindings | |
165 | } | |
166 | ||
167 | bool propagate = false; | |
168 | --- qpidc-0.16/src/qpid/broker/Exchange.cpp.orig 2012-03-05 20:12:32.000000000 +0100 | |
169 | +++ qpidc-0.16/src/qpid/broker/Exchange.cpp 2020-12-12 22:19:45.880973223 +0100 | |
170 | @@ -203,13 +203,13 @@ | |
171 | } | |
172 | } | |
173 | ||
174 | - sequence = _args.get(qpidMsgSequence); | |
175 | + sequence = !!_args.get(qpidMsgSequence); | |
176 | if (sequence) { | |
177 | QPID_LOG(debug, "Configured exchange " << _name << " with Msg sequencing"); | |
178 | args.setInt64(std::string(qpidSequenceCounter), sequenceNo); | |
179 | } | |
180 | ||
181 | - ive = _args.get(qpidIVE); | |
182 | + ive = !!_args.get(qpidIVE); | |
183 | if (ive) { | |
184 | if (broker && broker->isInCluster()) | |
185 | throw framing::NotImplementedException("Cannot use Initial Value Exchanges in a cluster"); | |
186 | --- qpidc-0.16/src/qpid/client/SessionBase_0_10.cpp.orig 2010-04-09 17:08:47.000000000 +0200 | |
187 | +++ qpidc-0.16/src/qpid/client/SessionBase_0_10.cpp 2020-12-13 06:32:59.740649521 +0100 | |
188 | @@ -73,7 +73,7 @@ | |
189 | ||
190 | SessionId SessionBase_0_10::getId() const { return impl->getId(); } | |
191 | ||
192 | -bool SessionBase_0_10::isValid() const { return impl; } | |
193 | +bool SessionBase_0_10::isValid() const { return !!impl; } | |
194 | ||
195 | Connection SessionBase_0_10::getConnection() | |
196 | { | |
197 | --- qpidc-0.16/src/qpid/cluster/ClusterMap.cpp.orig 2012-03-22 19:51:28.000000000 +0100 | |
198 | +++ qpidc-0.16/src/qpid/cluster/ClusterMap.cpp 2020-12-13 07:07:40.639376325 +0100 | |
199 | @@ -28,10 +28,6 @@ | |
200 | #include <iterator> | |
201 | #include <ostream> | |
202 | ||
203 | -using namespace std; | |
204 | -using boost::ref; | |
205 | -using boost::optional; | |
206 | - | |
207 | namespace qpid { | |
208 | using namespace framing; | |
209 | ||
210 | @@ -42,7 +38,7 @@ | |
211 | void addFieldTableValue(FieldTable::ValueMap::value_type vt, ClusterMap::Map& map, ClusterMap::Set& set) { | |
212 | MemberId id(vt.first); | |
213 | set.insert(id); | |
214 | - string url = vt.second->get<string>(); | |
215 | + std::string url = vt.second->get<string>(); | |
216 | if (!url.empty()) | |
217 | map.insert(ClusterMap::Map::value_type(id, Url(url))); | |
218 | } | |
219 | @@ -56,7 +52,7 @@ | |
220 | ClusterMap::ClusterMap() : frameSeq(0) {} | |
221 | ||
222 | ClusterMap::ClusterMap(const Map& map) : frameSeq(0) { | |
223 | - transform(map.begin(), map.end(), inserter(alive, alive.begin()), bind(&Map::value_type::first, _1)); | |
224 | + std::transform(map.begin(), map.end(), std::inserter(alive, alive.begin()), boost::bind(&Map::value_type::first, _1)); | |
225 | members = map; | |
226 | } | |
227 | ||
228 | @@ -64,19 +60,19 @@ | |
229 | framing::SequenceNumber frameSeq_) | |
230 | : frameSeq(frameSeq_) | |
231 | { | |
232 | - for_each(joinersFt.begin(), joinersFt.end(), bind(&addFieldTableValue, _1, ref(joiners), ref(alive))); | |
233 | - for_each(membersFt.begin(), membersFt.end(), bind(&addFieldTableValue, _1, ref(members), ref(alive))); | |
234 | + for_each(joinersFt.begin(), joinersFt.end(), boost::bind(&addFieldTableValue, _1, boost::ref(joiners), boost::ref(alive))); | |
235 | + for_each(membersFt.begin(), membersFt.end(), boost::bind(&addFieldTableValue, _1, boost::ref(members), boost::ref(alive))); | |
236 | } | |
237 | ||
238 | void ClusterMap::toMethodBody(framing::ClusterConnectionMembershipBody& b) const { | |
239 | b.getJoiners().clear(); | |
240 | - for_each(joiners.begin(), joiners.end(), bind(&insertFieldTableFromMapValue, ref(b.getJoiners()), _1)); | |
241 | + for_each(joiners.begin(), joiners.end(), boost::bind(&insertFieldTableFromMapValue, boost::ref(b.getJoiners()), _1)); | |
242 | for(Set::const_iterator i = alive.begin(); i != alive.end(); ++i) { | |
243 | if (!isMember(*i) && !isJoiner(*i)) | |
244 | b.getJoiners().setString(i->str(), string()); | |
245 | } | |
246 | b.getMembers().clear(); | |
247 | - for_each(members.begin(), members.end(), bind(&insertFieldTableFromMapValue, ref(b.getMembers()), _1)); | |
248 | + for_each(members.begin(), members.end(), boost::bind(&insertFieldTableFromMapValue, boost::ref(b.getMembers()), _1)); | |
249 | b.setFrameSeq(frameSeq); | |
250 | } | |
251 | ||
252 | @@ -89,21 +85,21 @@ | |
253 | return joiners.empty() ? MemberId() : joiners.begin()->first; | |
254 | } | |
255 | ||
256 | -vector<string> ClusterMap::memberIds() const { | |
257 | - vector<string> ids; | |
258 | +std::vector<string> ClusterMap::memberIds() const { | |
259 | + std::vector<string> ids; | |
260 | for (Map::const_iterator iter = members.begin(); | |
261 | iter != members.end(); iter++) { | |
262 | - stringstream stream; | |
263 | + std::stringstream stream; | |
264 | stream << iter->first; | |
265 | ids.push_back(stream.str()); | |
266 | } | |
267 | return ids; | |
268 | } | |
269 | ||
270 | -vector<Url> ClusterMap::memberUrls() const { | |
271 | - vector<Url> urls(members.size()); | |
272 | - transform(members.begin(), members.end(), urls.begin(), | |
273 | - bind(&Map::value_type::second, _1)); | |
274 | +std::vector<Url> ClusterMap::memberUrls() const { | |
275 | + std::vector<Url> urls(members.size()); | |
276 | + std::transform(members.begin(), members.end(), urls.begin(), | |
277 | + boost::bind(&Map::value_type::second, _1)); | |
278 | return urls; | |
279 | } | |
280 | ||
281 | @@ -111,18 +107,18 @@ | |
282 | ||
283 | ClusterMap::Set ClusterMap::getMembers() const { | |
284 | Set s; | |
285 | - transform(members.begin(), members.end(), inserter(s, s.begin()), | |
286 | - bind(&Map::value_type::first, _1)); | |
287 | + std::transform(members.begin(), members.end(), std::inserter(s, s.begin()), | |
288 | + boost::bind(&Map::value_type::first, _1)); | |
289 | return s; | |
290 | } | |
291 | ||
292 | -ostream& operator<<(ostream& o, const ClusterMap::Map& m) { | |
293 | - ostream_iterator<MemberId> oi(o); | |
294 | - transform(m.begin(), m.end(), oi, bind(&ClusterMap::Map::value_type::first, _1)); | |
295 | +std::ostream& operator<<(std::ostream& o, const ClusterMap::Map& m) { | |
296 | + std::ostream_iterator<MemberId> oi(o); | |
297 | + std::transform(m.begin(), m.end(), oi, boost::bind(&ClusterMap::Map::value_type::first, _1)); | |
298 | return o; | |
299 | } | |
300 | ||
301 | -ostream& operator<<(ostream& o, const ClusterMap& m) { | |
302 | +std::ostream& operator<<(std::ostream& o, const ClusterMap& m) { | |
303 | for (ClusterMap::Set::const_iterator i = m.alive.begin(); i != m.alive.end(); ++i) { | |
304 | o << *i; | |
305 | if (m.isMember(*i)) o << "(member)"; | |
306 | @@ -134,7 +130,7 @@ | |
307 | return o; | |
308 | } | |
309 | ||
310 | -bool ClusterMap::updateRequest(const MemberId& id, const string& url) { | |
311 | +bool ClusterMap::updateRequest(const MemberId& id, const std::string& url) { | |
312 | try { | |
313 | if (isAlive(id)) { | |
314 | joiners[id] = Url(url); | |
315 | @@ -153,9 +149,9 @@ | |
316 | bool ClusterMap::configChange(const Set& update) { | |
317 | bool memberChange = false; | |
318 | Set removed; | |
319 | - set_difference(alive.begin(), alive.end(), | |
320 | + std::set_difference(alive.begin(), alive.end(), | |
321 | update.begin(), update.end(), | |
322 | - inserter(removed, removed.begin())); | |
323 | + std::inserter(removed, removed.begin())); | |
324 | alive = update; | |
325 | for (Set::const_iterator i = removed.begin(); i != removed.end(); ++i) { | |
326 | memberChange = memberChange || members.erase(*i); | |
327 | @@ -164,14 +160,14 @@ | |
328 | return memberChange; | |
329 | } | |
330 | ||
331 | -optional<Url> ClusterMap::updateOffer(const MemberId& from, const MemberId& to) { | |
332 | +boost::optional<Url> ClusterMap::updateOffer(const MemberId& from, const MemberId& to) { | |
333 | Map::iterator i = joiners.find(to); | |
334 | if (isAlive(from) && i != joiners.end()) { | |
335 | Url url= i->second; | |
336 | joiners.erase(i); // No longer a potential updatee. | |
337 | return url; | |
338 | } | |
339 | - return optional<Url>(); | |
340 | + return boost::optional<Url>(); | |
341 | } | |
342 | ||
343 | }} // namespace qpid::cluster | |
344 | --- qpidc-0.16/src/tests/cluster_test.cpp.orig 2011-02-10 11:12:41.000000000 +0100 | |
345 | +++ qpidc-0.16/src/tests/cluster_test.cpp 2020-12-13 07:51:00.611957732 +0100 | |
346 | @@ -667,7 +667,7 @@ | |
347 | c0.connection.close(); | |
348 | // Verify all brokers get wiring update. | |
349 | for (size_t i = 0; i < cluster.size(); ++i) { | |
350 | - BOOST_MESSAGE("i == "<< i); | |
351 | + BOOST_TEST_MESSAGE("i == "<< i); | |
352 | Client c(cluster[i]); | |
353 | BOOST_CHECK_EQUAL("q", c.session.queueQuery("q").getQueue()); | |
354 | BOOST_CHECK_EQUAL("direct", c.session.exchangeQuery("ex").getType()); | |
355 | @@ -826,7 +826,7 @@ | |
356 | mgr.execute(*this); | |
357 | } | |
358 | catch (const std::exception& e) { | |
359 | - BOOST_MESSAGE("Exception in mgr.execute: " << e.what()); | |
360 | + BOOST_TEST_MESSAGE("Exception in mgr.execute: " << e.what()); | |
361 | failed = true; | |
362 | } | |
363 | } | |
364 | --- qpidc-0.16/src/tests/ClusterFixture.h.orig 2010-08-03 17:33:12.000000000 +0200 | |
365 | +++ qpidc-0.16/src/tests/ClusterFixture.h 2020-12-13 11:22:38.086502946 +0100 | |
366 | @@ -99,7 +99,7 @@ | |
367 | string name; | |
368 | std::auto_ptr<BrokerFixture> localBroker; | |
369 | int localIndex; | |
370 | - std::vector<shared_ptr<ForkedBroker> > forkedBrokers; | |
371 | + std::vector<boost::shared_ptr<ForkedBroker> > forkedBrokers; | |
372 | Args userArgs; | |
373 | boost::function<void (Args&, size_t)> updateArgs; | |
374 | }; | |
375 | --- qpidc-0.16/src/tests/ClusterFixture.cpp.orig 2010-07-01 21:19:48.000000000 +0200 | |
376 | +++ qpidc-0.16/src/tests/ClusterFixture.cpp 2020-12-13 11:27:02.765069059 +0100 | |
377 | @@ -54,7 +54,6 @@ | |
378 | using namespace qpid::client; | |
379 | using qpid::sys::TIME_SEC; | |
380 | using qpid::broker::Broker; | |
381 | -using boost::shared_ptr; | |
382 | using qpid::cluster::Cluster; | |
383 | using boost::assign::list_of; | |
384 | ||
385 | @@ -89,7 +88,7 @@ | |
386 | if (size() != size_t(localIndex)) { // fork a broker process. | |
387 | std::ostringstream os; os << "fork" << size(); | |
388 | std::string prefix = os.str(); | |
389 | - forkedBrokers.push_back(shared_ptr<ForkedBroker>(new ForkedBroker(makeArgs(prefix, size())))); | |
390 | + forkedBrokers.push_back(boost::shared_ptr<ForkedBroker>(new ForkedBroker(makeArgs(prefix, size())))); | |
391 | push_back(forkedBrokers.back()->getPort()); | |
392 | } | |
393 | else { // Run in this process | |
394 | @@ -117,7 +116,7 @@ | |
395 | qpid::log::Logger::instance().setPrefix(prefix); | |
396 | localBroker.reset(new BrokerFixture(parseOpts(argv.size(), &argv[0]))); | |
397 | push_back(localBroker->getPort()); | |
398 | - forkedBrokers.push_back(shared_ptr<ForkedBroker>()); | |
399 | + forkedBrokers.push_back(boost::shared_ptr<ForkedBroker>()); | |
400 | } | |
401 | ||
402 | bool ClusterFixture::hasLocal() const { return localIndex >= 0 && size_t(localIndex) < size(); } |