1 From 3bf59648721e8b63ccc76cb47a77d45ab4924484 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= <hguemar@fedoraproject.org>
3 Date: Tue, 29 May 2012 16:39:46 +0200
4 Subject: [PATCH 9/9] gcc47 fix
7 cpp/allTests.py | 7 ++---
8 cpp/include/Freeze/Map.h | 2 +-
9 cpp/include/Ice/Buffer.h | 1 +
10 cpp/include/Ice/ConnectionIF.h | 2 +-
11 cpp/include/Ice/IconvStringConverter.h | 10 +++++--
12 cpp/include/Ice/IncomingAsyncF.h | 6 -----
13 cpp/include/Ice/LocalObjectF.h | 6 -----
14 cpp/include/Ice/ObjectF.h | 11 --------
15 cpp/include/Ice/OutgoingAsyncF.h | 2 +-
16 cpp/include/Ice/Proxy.h | 12 ++++-----
17 cpp/include/Ice/ProxyF.h | 40 ++++++++++++----------------
18 cpp/include/Ice/Stream.h | 21 ++++++++-------
19 cpp/include/Ice/StreamF.h | 6 -----
20 cpp/include/IceUtil/Mutex.h | 5 +++-
21 cpp/src/Freeze/MapDb.cpp | 6 ++++-
22 cpp/src/Freeze/MapI.cpp | 16 +++++++++---
23 cpp/src/Freeze/SharedDbEnv.cpp | 5 +++-
24 cpp/src/Ice/ConnectionI.cpp | 4 ++-
25 cpp/src/Ice/IncomingAsync.cpp | 2 +-
26 cpp/src/Ice/LocalObject.cpp | 2 +-
27 cpp/src/Ice/Object.cpp | 2 +-
28 cpp/src/Ice/OutgoingAsync.cpp | 2 +-
29 cpp/src/Ice/ProxyFactory.cpp | 1 +
30 cpp/src/Ice/Service.cpp | 15 ++++++++---
31 cpp/src/Ice/Stream.cpp | 13 ++++++++--
32 cpp/src/IceGrid/AdminCallbackRouter.cpp | 7 ++++-
33 cpp/src/IceGrid/DescriptorHelper.cpp | 19 +++++++-------
34 cpp/src/IceGrid/ReplicaCache.cpp | 2 +-
35 cpp/src/IceGrid/SessionI.h | 2 +-
36 cpp/src/IceSSL/Instance.cpp | 2 +-
37 cpp/src/IceSSL/InstanceF.h | 2 +-
38 cpp/src/IceSSL/TrustManager.cpp | 2 +-
39 cpp/src/IceSSL/TrustManagerF.h | 2 +-
40 cpp/src/IceSSL/Util.cpp | 2 +-
41 cpp/src/IceSSL/UtilF.h | 2 +-
42 cpp/src/IceStorm/NodeI.cpp | 5 ----
43 cpp/src/IceUtil/Cond.cpp | 5 +++-
44 cpp/src/IceUtil/CountDownLatch.cpp | 10 +++++--
45 cpp/src/IceUtil/CtrlCHandler.cpp | 20 +++++++++++---
46 cpp/src/IceUtil/FileUtil.cpp | 4 +++
47 cpp/src/IceUtil/RecMutex.cpp | 10 +++++--
48 cpp/src/Slice/CPlusPlusUtil.cpp | 4 +--
49 cpp/src/Slice/FileTracker.cpp | 4 +++
50 cpp/src/slice2cpp/Gen.cpp | 43 +++++++++++++++++--------------
51 cpp/src/slice2cs/Gen.cpp | 12 +--------
52 cpp/src/slice2java/Gen.cpp | 4 +--
53 cpp/test/Glacier2/ssl/Server.cpp | 19 ++++++++++----
54 cpp/test/Ice/background/EndpointI.h | 2 +-
55 cpp/test/Ice/custom/AllTests.cpp | 9 ++++---
56 cpp/test/Ice/info/AllTests.cpp | 15 +++++++----
57 cpp/test/Ice/properties/run.py | 2 +-
58 cpp/test/IceUtil/unicode/Client.cpp | 4 +++
59 cpp/test/Slice/keyword/Client.cpp | 4 +++
60 cpp/test/include/TestCommon.h | 16 ++++++++++++
61 scripts/TestUtil.py | 27 +++++++++++++++++++
62 55 files changed, 287 insertions(+), 173 deletions(-)
64 diff --git a/cpp/allTests.py b/cpp/allTests.py
65 index 33b7d88..8a5effd 100755
68 @@ -25,6 +25,7 @@ from scripts import *
69 # List of all basic tests.
73 ("IceUtil/condvar", ["once", "win32only"]),
74 ("IceUtil/thread", ["once"]),
75 ("IceUtil/unicode", ["once"]),
76 @@ -62,7 +63,7 @@ tests = [
77 ("Ice/servantLocator", ["core"]),
78 ("Ice/interceptor", ["core"]),
79 ("Ice/stringConverter", ["core"]),
80 - ("Ice/udp", ["core"]),
81 + ("Ice/udp", ["core", "nofreebsdjail"]),
82 ("Ice/defaultServant", ["core"]),
83 ("Ice/defaultValue", ["core"]),
84 ("Ice/invoke", ["core", "novc6"]),
85 @@ -106,8 +107,8 @@ tests = [
87 if TestUtil.isWin32() or os.getuid() == 0:
89 - ("IceUtil/priority", ["core", "nodarwin"]),
90 - ("Ice/threadPoolPriority", ["core", "nodarwin"])
91 + ("IceUtil/priority", ["core", "nodarwin", "nofreebsd"]),
92 + ("Ice/threadPoolPriority", ["core", "nodarwin", "nofreebsd"])
95 if __name__ == "__main__":
96 diff --git a/cpp/include/Freeze/Map.h b/cpp/include/Freeze/Map.h
97 index d8ef692..901b3bc 100644
98 --- a/cpp/include/Freeze/Map.h
99 +++ b/cpp/include/Freeze/Map.h
100 @@ -426,7 +426,7 @@ public:
102 ConstIterator(MapHelper& mapHelper, const Ice::CommunicatorPtr& communicator) :
103 _helper(IteratorHelper::create(mapHelper, true)),
104 - _communicator(_communicator),
105 + _communicator(communicator),
109 diff --git a/cpp/include/Ice/Buffer.h b/cpp/include/Ice/Buffer.h
110 index 9501f08..8679d03 100644
111 --- a/cpp/include/Ice/Buffer.h
112 +++ b/cpp/include/Ice/Buffer.h
114 #ifndef ICEE_BUFFER_H
115 #define ICEE_BUFFER_H
118 #include <Ice/Config.h>
121 diff --git a/cpp/include/Ice/ConnectionIF.h b/cpp/include/Ice/ConnectionIF.h
122 index ca954c0..81ceb01 100644
123 --- a/cpp/include/Ice/ConnectionIF.h
124 +++ b/cpp/include/Ice/ConnectionIF.h
125 @@ -17,13 +17,13 @@ namespace Ice
129 +ICE_API Ice::LocalObject* upCast(Ice::ConnectionI*);
133 namespace IceInternal
136 -ICE_API Ice::LocalObject* upCast(Ice::ConnectionI*);
140 diff --git a/cpp/include/Ice/IconvStringConverter.h b/cpp/include/Ice/IconvStringConverter.h
141 index 017fb1e..68aa54b 100644
142 --- a/cpp/include/Ice/IconvStringConverter.h
143 +++ b/cpp/include/Ice/IconvStringConverter.h
144 @@ -225,10 +225,16 @@ IconvStringConverter<charT>::cleanupKey(void* val)
145 template<typename charT> /*static*/ void
146 IconvStringConverter<charT>::close(std::pair<iconv_t, iconv_t> cdp)
148 - int rs = iconv_close(cdp.first);
152 + iconv_close(cdp.first);
155 - rs = iconv_close(cdp.second);
159 + iconv_close(cdp.second);
163 diff --git a/cpp/include/Ice/IncomingAsyncF.h b/cpp/include/Ice/IncomingAsyncF.h
164 index 7d9228a..d861180 100644
165 --- a/cpp/include/Ice/IncomingAsyncF.h
166 +++ b/cpp/include/Ice/IncomingAsyncF.h
167 @@ -28,12 +28,6 @@ namespace Ice
169 class AMD_Object_ice_invoke;
170 class AMD_Array_Object_ice_invoke;
174 -namespace IceInternal
177 ICE_API IceUtil::Shared* upCast(::Ice::AMD_Object_ice_invoke*);
178 ICE_API IceUtil::Shared* upCast(::Ice::AMD_Array_Object_ice_invoke*);
180 diff --git a/cpp/include/Ice/LocalObjectF.h b/cpp/include/Ice/LocalObjectF.h
181 index 69a28d3..6e613b7 100644
182 --- a/cpp/include/Ice/LocalObjectF.h
183 +++ b/cpp/include/Ice/LocalObjectF.h
184 @@ -18,12 +18,6 @@ namespace Ice
191 -namespace IceInternal
194 ICE_API IceUtil::Shared* upCast(::Ice::LocalObject*);
197 diff --git a/cpp/include/Ice/ObjectF.h b/cpp/include/Ice/ObjectF.h
198 index eaabadd..2baff11 100644
199 --- a/cpp/include/Ice/ObjectF.h
200 +++ b/cpp/include/Ice/ObjectF.h
201 @@ -17,19 +17,8 @@ namespace Ice
208 -namespace IceInternal
211 ICE_API IceUtil::Shared* upCast(::Ice::Object*);
218 typedef IceInternal::Handle< Object > ObjectPtr;
220 void ICE_API __patch__ObjectPtr(void*, ObjectPtr&);
221 diff --git a/cpp/include/Ice/OutgoingAsyncF.h b/cpp/include/Ice/OutgoingAsyncF.h
222 index 0e9398c..334ca7a 100644
223 --- a/cpp/include/Ice/OutgoingAsyncF.h
224 +++ b/cpp/include/Ice/OutgoingAsyncF.h
225 @@ -19,13 +19,13 @@ namespace Ice
228 typedef IceInternal::Handle<AsyncResult> AsyncResultPtr;
229 +ICE_API IceUtil::Shared* upCast(::Ice::AsyncResult*);
233 namespace IceInternal
236 -ICE_API IceUtil::Shared* upCast(::Ice::AsyncResult*);
239 ICE_API IceUtil::Shared* upCast(OutgoingAsync*);
240 diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h
241 index 250c700..0ae9e72 100644
242 --- a/cpp/include/Ice/Proxy.h
243 +++ b/cpp/include/Ice/Proxy.h
244 @@ -38,6 +38,8 @@ namespace Ice
248 +ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Locator*);
249 +ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Router*);
253 @@ -46,8 +48,6 @@ class Router;
254 namespace IceInternal
257 -ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Locator*);
258 -ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Router*);
260 class LocalExceptionWrapper;
262 @@ -1172,7 +1172,7 @@ public:
264 TwowayCallbackNC(const TPtr& instance, bool cb, Exception excb, Sent sentcb) : CallbackNC<T>(instance, excb, sentcb)
266 - checkCallback(instance, cb || excb != 0);
267 + this->checkCallback(instance, cb || excb != 0);
271 @@ -1188,7 +1188,7 @@ public:
273 TwowayCallback(const TPtr& instance, bool cb, Exception excb, Sent sentcb) : Callback<T, CT>(instance, excb, sentcb)
275 - checkCallback(instance, cb || excb != 0);
276 + this->checkCallback(instance, cb || excb != 0);
280 @@ -1209,7 +1209,7 @@ public:
281 OnewayCallbackNC(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
282 CallbackNC<T>(instance, excb, sentcb), response(cb)
284 - checkCallback(instance, cb != 0 || excb != 0);
285 + this->checkCallback(instance, cb != 0 || excb != 0);
288 virtual void __completed(const ::Ice::AsyncResultPtr& result) const
289 @@ -1254,7 +1254,7 @@ public:
290 OnewayCallback(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
291 Callback<T, CT>(instance, excb, sentcb), response(cb)
293 - checkCallback(instance, cb != 0 || excb != 0);
294 + this->checkCallback(instance, cb != 0 || excb != 0);
297 virtual void __completed(const ::Ice::AsyncResultPtr& result) const
298 diff --git a/cpp/include/Ice/ProxyF.h b/cpp/include/Ice/ProxyF.h
299 index 27b7ec6..67b2b05 100644
300 --- a/cpp/include/Ice/ProxyF.h
301 +++ b/cpp/include/Ice/ProxyF.h
302 @@ -22,6 +22,11 @@ namespace Ice
306 +inline ::IceProxy::Ice::Object*
307 +upCast(::IceProxy::Ice::Object* o)
314 @@ -34,6 +39,11 @@ namespace Ice
318 +inline ::IceDelegate::Ice::Object*
319 +upCast(::IceDelegate::Ice::Object* o)
326 @@ -47,6 +57,12 @@ namespace Ice
330 +inline ::IceDelegateM::Ice::Object*
331 +upCast(::IceDelegateM::Ice::Object* o)
339 @@ -58,36 +74,12 @@ namespace Ice
348 -namespace IceInternal
351 -inline ::IceProxy::Ice::Object*
352 -upCast(::IceProxy::Ice::Object* o)
357 -inline ::IceDelegate::Ice::Object*
358 -upCast(::IceDelegate::Ice::Object* o)
363 inline ::IceDelegateD::Ice::Object*
364 upCast(::IceDelegateD::Ice::Object* o)
369 -inline ::IceDelegateM::Ice::Object*
370 -upCast(::IceDelegateM::Ice::Object* o)
376 diff --git a/cpp/include/Ice/Stream.h b/cpp/include/Ice/Stream.h
377 index 40cd611..36ab56b 100644
378 --- a/cpp/include/Ice/Stream.h
379 +++ b/cpp/include/Ice/Stream.h
381 #include <Ice/Proxy.h>
382 #include <IceUtil/Shared.h>
384 +namespace IceInternal
386 + // Forward declaration required for writer specializations.
387 + void delegateThrowMarshalException(const char*, int, const ::std::string&);
393 @@ -45,9 +51,6 @@ enum StreamTraitType
394 StreamTraitTypeUnknown
397 -// Forward declaration required for writer specializations.
398 -class MarshalException;
401 // Base trait template. This doesn't actually do anything -- we just
402 // use it as a template that we can specialize.
403 @@ -542,7 +545,7 @@ struct StreamWriter<StreamTraitTypeByteEnum>
405 if(static_cast<int>(v) < 0 || static_cast<int>(v) >= StreamTrait<T>::enumLimit)
407 - throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
408 + IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
410 outS->write(static_cast<Byte>(v));
412 @@ -558,7 +561,7 @@ struct StreamReader<StreamTraitTypeByteEnum>
414 if(val > StreamTrait<T>::enumLimit)
416 - throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
417 + IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
419 v = static_cast<T>(val);
421 @@ -573,7 +576,7 @@ struct StreamWriter<StreamTraitTypeShortEnum>
423 if(static_cast<int>(v) < 0 || static_cast<int>(v) >= StreamTrait<T>::enumLimit)
425 - throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
426 + IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
428 outS->write(static_cast<Short>(v));
430 @@ -589,7 +592,7 @@ struct StreamReader<StreamTraitTypeShortEnum>
432 if(val < 0 || val > StreamTrait<T>::enumLimit)
434 - throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
435 + IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
437 v = static_cast<T>(val);
439 @@ -603,7 +606,7 @@ struct StreamWriter<StreamTraitTypeIntEnum>
441 if(static_cast<int>(v) < 0 || static_cast<int>(v) >= StreamTrait<T>::enumLimit)
443 - throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
444 + IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
446 outS->write(static_cast<Int>(v));
448 @@ -619,7 +622,7 @@ struct StreamReader<StreamTraitTypeIntEnum>
450 if(val < 0 || val > StreamTrait<T>::enumLimit)
452 - throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
453 + IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
455 v = static_cast<T>(val);
457 diff --git a/cpp/include/Ice/StreamF.h b/cpp/include/Ice/StreamF.h
458 index d94ba2b..f114206 100644
459 --- a/cpp/include/Ice/StreamF.h
460 +++ b/cpp/include/Ice/StreamF.h
461 @@ -19,12 +19,6 @@ namespace Ice
468 -namespace IceInternal
471 ICE_API IceUtil::Shared* upCast(::Ice::InputStream*);
472 ICE_API IceUtil::Shared* upCast(::Ice::OutputStream*);
474 diff --git a/cpp/include/IceUtil/Mutex.h b/cpp/include/IceUtil/Mutex.h
475 index 2726c74..5d72113 100644
476 --- a/cpp/include/IceUtil/Mutex.h
477 +++ b/cpp/include/IceUtil/Mutex.h
478 @@ -251,8 +251,11 @@ Mutex::init(MutexProtocol protocol)
484 - rc = pthread_mutex_destroy(&_mutex);
487 + pthread_mutex_destroy(&_mutex);
491 diff --git a/cpp/src/Freeze/MapDb.cpp b/cpp/src/Freeze/MapDb.cpp
492 index ad573cf..397151e 100644
493 --- a/cpp/src/Freeze/MapDb.cpp
494 +++ b/cpp/src/Freeze/MapDb.cpp
495 @@ -229,7 +229,11 @@ Freeze::MapDb::MapDb(const ConnectionIPtr& connection,
499 - _indices.insert(IndexMap::value_type(indexBase->name(), indexI.get())).second;
500 + _indices.insert(IndexMap::value_type(indexBase->name(), indexI.get()))
507 indexBase->_impl = indexI.release();
508 diff --git a/cpp/src/Freeze/MapI.cpp b/cpp/src/Freeze/MapI.cpp
509 index c7f0719..820cef8 100644
510 --- a/cpp/src/Freeze/MapI.cpp
511 +++ b/cpp/src/Freeze/MapI.cpp
512 @@ -749,8 +749,11 @@ Freeze::IteratorHelperI::set(const Value& value)
518 - err = _dbc->put(&dbKey, &dbValue, DB_CURRENT);
521 + _dbc->put(&dbKey, &dbValue, DB_CURRENT);
524 catch(const ::DbDeadlockException& dx)
525 @@ -1023,7 +1026,11 @@ Freeze::MapHelperI::MapHelperI(const ConnectionIPtr& connection,
529 - _indices.insert(IndexMap::value_type(indexBase->name(), indexBase)).second;
530 + _indices.insert(IndexMap::value_type(indexBase->name(), indexBase))
536 indexBase->_map = this;
538 @@ -1360,8 +1367,11 @@ Freeze::MapHelperI::clear()
544 - err = _db->truncate(txn, &count, txn != 0 ? 0 : DB_AUTO_COMMIT);
547 + _db->truncate(txn, &count, txn != 0 ? 0 : DB_AUTO_COMMIT);
551 diff --git a/cpp/src/Freeze/SharedDbEnv.cpp b/cpp/src/Freeze/SharedDbEnv.cpp
552 index 1365e7f..8cadc0c 100644
553 --- a/cpp/src/Freeze/SharedDbEnv.cpp
554 +++ b/cpp/src/Freeze/SharedDbEnv.cpp
555 @@ -336,8 +336,11 @@ void Freeze::SharedDbEnv::__decRef()
561 - one = sharedDbEnvMap->erase(key);
564 + sharedDbEnvMap->erase(key);
567 if(sharedDbEnvMap->size() == 0)
568 diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
569 index a864509..2577a56 100644
570 --- a/cpp/src/Ice/ConnectionI.cpp
571 +++ b/cpp/src/Ice/ConnectionI.cpp
572 @@ -32,7 +32,7 @@ using namespace std;
574 using namespace IceInternal;
576 -Ice::LocalObject* IceInternal::upCast(ConnectionI* p) { return p; }
577 +Ice::LocalObject* Ice::upCast(ConnectionI* p) { return p; }
581 @@ -601,6 +601,7 @@ Ice::ConnectionI::sendAsyncRequest(const OutgoingAsyncPtr& out, bool compress, b
583 catch(const LocalException& ex)
585 + status = IceInternal::AsyncStatusQueued; // this is only to apeace the compiler
586 setState(StateClosed, ex);
587 assert(_exception.get());
588 _exception->ice_throw();
589 @@ -972,6 +973,7 @@ Ice::ConnectionI::flushAsyncBatchRequests(const BatchOutgoingAsyncPtr& outAsync)
591 catch(const Ice::LocalException& ex)
593 + status = IceInternal::AsyncStatusQueued; // this is only to apeace the compiler
594 setState(StateClosed, ex);
595 assert(_exception.get());
596 _exception->ice_throw();
597 diff --git a/cpp/src/Ice/IncomingAsync.cpp b/cpp/src/Ice/IncomingAsync.cpp
598 index ca108ee..91c0580 100644
599 --- a/cpp/src/Ice/IncomingAsync.cpp
600 +++ b/cpp/src/Ice/IncomingAsync.cpp
601 @@ -24,7 +24,7 @@ using namespace Ice;
602 using namespace IceInternal;
604 IceUtil::Shared* IceInternal::upCast(IncomingAsync* p) { return p; }
605 -IceUtil::Shared* IceInternal::upCast(AMD_Object_ice_invoke* p) { return p; }
606 +IceUtil::Shared* Ice::upCast(AMD_Object_ice_invoke* p) { return p; }
610 diff --git a/cpp/src/Ice/LocalObject.cpp b/cpp/src/Ice/LocalObject.cpp
611 index 77bee3d..ee74c0b 100644
612 --- a/cpp/src/Ice/LocalObject.cpp
613 +++ b/cpp/src/Ice/LocalObject.cpp
614 @@ -13,7 +13,7 @@ using namespace std;
616 using namespace IceInternal;
618 -IceUtil::Shared* IceInternal::upCast(LocalObject* obj) { return obj; }
619 +IceUtil::Shared* Ice::upCast(LocalObject* obj) { return obj; }
622 Ice::LocalObject::operator==(const LocalObject& r) const
623 diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp
624 index fa7793a..9705ce9 100644
625 --- a/cpp/src/Ice/Object.cpp
626 +++ b/cpp/src/Ice/Object.cpp
627 @@ -19,7 +19,7 @@ using namespace std;
629 using namespace IceInternal;
631 -IceUtil::Shared* IceInternal::upCast(Object* p) { return p; }
632 +IceUtil::Shared* Ice::upCast(Object* p) { return p; }
635 Ice::Object::operator==(const Object& r) const
636 diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
637 index 527d29c..d707321 100644
638 --- a/cpp/src/Ice/OutgoingAsync.cpp
639 +++ b/cpp/src/Ice/OutgoingAsync.cpp
640 @@ -30,7 +30,7 @@ using namespace std;
642 using namespace IceInternal;
644 -IceUtil::Shared* IceInternal::upCast(AsyncResult* p) { return p; }
645 +IceUtil::Shared* Ice::upCast(AsyncResult* p) { return p; }
647 IceUtil::Shared* IceInternal::upCast(OutgoingAsyncMessageCallback* p) { return p; }
648 IceUtil::Shared* IceInternal::upCast(OutgoingAsync* p) { return p; }
649 diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp
650 index c68b3e3..db0fe72 100644
651 --- a/cpp/src/Ice/ProxyFactory.cpp
652 +++ b/cpp/src/Ice/ProxyFactory.cpp
653 @@ -229,6 +229,7 @@ IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex,
655 else if(cnt > static_cast<int>(_retryIntervals.size()))
657 + interval = 0; // apeace compiler
658 if(traceLevels->retry >= 1)
660 Trace out(logger, traceLevels->retryCat);
661 diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp
662 index dd28221..cc95541 100644
663 --- a/cpp/src/Ice/Service.cpp
664 +++ b/cpp/src/Ice/Service.cpp
665 @@ -2136,17 +2136,26 @@ Ice::Service::runDaemon(int argc, char* argv[], const InitializationData& initDa
667 // Associate stdin, stdout and stderr with /dev/null.
671 - fd = open("/dev/null", O_RDWR);
674 + open("/dev/null", O_RDWR);
695 diff --git a/cpp/src/Ice/Stream.cpp b/cpp/src/Ice/Stream.cpp
696 index 9924da0..2ecdc08 100644
697 --- a/cpp/src/Ice/Stream.cpp
698 +++ b/cpp/src/Ice/Stream.cpp
700 // **********************************************************************
702 #include <Ice/Stream.h>
703 +#include <Ice/LocalException.h>
707 using namespace IceInternal;
709 -IceUtil::Shared* IceInternal::upCast(InputStream* p) { return p; }
710 -IceUtil::Shared* IceInternal::upCast(OutputStream* p) { return p; }
711 +IceUtil::Shared* Ice::upCast(InputStream* p) { return p; }
712 +IceUtil::Shared* Ice::upCast(OutputStream* p) { return p; }
714 +namespace IceInternal
716 + void delegateThrowMarshalException(const char* file, int line , const ::std::string& message)
718 + throw Ice::MarshalException(file, line, message);
721 diff --git a/cpp/src/IceGrid/AdminCallbackRouter.cpp b/cpp/src/IceGrid/AdminCallbackRouter.cpp
722 index e4d21ef..ce63c9f 100644
723 --- a/cpp/src/IceGrid/AdminCallbackRouter.cpp
724 +++ b/cpp/src/IceGrid/AdminCallbackRouter.cpp
725 @@ -49,7 +49,12 @@ IceGrid::AdminCallbackRouter::addMapping(const string& category, const Connectio
729 - _categoryToConnection.insert(map<string, ConnectionPtr>::value_type(category, con)).second;
730 + _categoryToConnection.insert(map<string, ConnectionPtr>::value_type(category, con))
737 assert(inserted == true);
739 diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp
740 index 9126c2f..0bc0111 100644
741 --- a/cpp/src/IceGrid/DescriptorHelper.cpp
742 +++ b/cpp/src/IceGrid/DescriptorHelper.cpp
743 @@ -198,15 +198,6 @@ updateSeqElts(const Seq& seq, const Seq& update, const Ice::StringSeq& remove, G
747 -template<typename Dict> Dict
748 -getDictUpdatedElts(const Dict& ldict, const Dict& rdict)
750 -#if defined(_MSC_VER) && (_MSC_VER < 1300)
751 - return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<Dict::mapped_type>());
753 - return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<typename Dict::mapped_type>());
757 template<typename EqFunc, typename Dict> Dict
758 getDictUpdatedEltsWithEq(const Dict& ldict, const Dict& rdict, EqFunc eq)
759 @@ -223,6 +214,16 @@ getDictUpdatedEltsWithEq(const Dict& ldict, const Dict& rdict, EqFunc eq)
763 +template<typename Dict> Dict
764 +getDictUpdatedElts(const Dict& ldict, const Dict& rdict)
766 +#if defined(_MSC_VER) && (_MSC_VER < 1300)
767 + return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<Dict::mapped_type>());
769 + return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<typename Dict::mapped_type>());
773 template <typename Dict> Ice::StringSeq
774 getDictRemovedElts(const Dict& ldict, const Dict& rdict)
776 diff --git a/cpp/src/IceGrid/ReplicaCache.cpp b/cpp/src/IceGrid/ReplicaCache.cpp
777 index 53ad03e..154853d 100644
778 --- a/cpp/src/IceGrid/ReplicaCache.cpp
779 +++ b/cpp/src/IceGrid/ReplicaCache.cpp
780 @@ -40,7 +40,7 @@ ReplicaCache::add(const string& name, const ReplicaSessionIPtr& session)
783 ReplicaEntryPtr entry;
784 - while(entry = getImpl(name))
785 + while((entry = getImpl(name)))
787 ReplicaSessionIPtr session = entry->getSession();
788 if(session->isDestroyed())
789 diff --git a/cpp/src/IceGrid/SessionI.h b/cpp/src/IceGrid/SessionI.h
790 index 3c67e20..f5c1b2e 100644
791 --- a/cpp/src/IceGrid/SessionI.h
792 +++ b/cpp/src/IceGrid/SessionI.h
793 @@ -35,7 +35,7 @@ typedef IceUtil::Handle<Allocatable> AllocatablePtr;
795 typedef IceUtil::Handle<SessionI> SessionIPtr;
797 -class BaseSessionI : virtual Ice::Object, public IceUtil::Mutex
798 +class BaseSessionI : virtual public Ice::Object, public IceUtil::Mutex
802 diff --git a/cpp/src/IceSSL/Instance.cpp b/cpp/src/IceSSL/Instance.cpp
803 index 5eb4c58..585620c 100644
804 --- a/cpp/src/IceSSL/Instance.cpp
805 +++ b/cpp/src/IceSSL/Instance.cpp
806 @@ -38,7 +38,7 @@ using namespace std;
808 using namespace IceSSL;
810 -IceUtil::Shared* IceInternal::upCast(IceSSL::Instance* p) { return p; }
811 +IceUtil::Shared* IceSSL::upCast(IceSSL::Instance* p) { return p; }
815 diff --git a/cpp/src/IceSSL/InstanceF.h b/cpp/src/IceSSL/InstanceF.h
816 index d08a3a9..b03d995 100644
817 --- a/cpp/src/IceSSL/InstanceF.h
818 +++ b/cpp/src/IceSSL/InstanceF.h
819 @@ -18,13 +18,13 @@ namespace IceSSL
823 +IceUtil::Shared* upCast(IceSSL::Instance*);
827 namespace IceInternal
830 -IceUtil::Shared* upCast(IceSSL::Instance*);
834 diff --git a/cpp/src/IceSSL/TrustManager.cpp b/cpp/src/IceSSL/TrustManager.cpp
835 index 0ec6e28..c4549b9 100644
836 --- a/cpp/src/IceSSL/TrustManager.cpp
837 +++ b/cpp/src/IceSSL/TrustManager.cpp
840 using namespace IceSSL;
842 -IceUtil::Shared* IceInternal::upCast(IceSSL::TrustManager* p) { return p; }
843 +IceUtil::Shared* IceSSL::upCast(IceSSL::TrustManager* p) { return p; }
845 TrustManager::TrustManager(const Ice::CommunicatorPtr& communicator) :
846 _communicator(communicator)
847 diff --git a/cpp/src/IceSSL/TrustManagerF.h b/cpp/src/IceSSL/TrustManagerF.h
848 index 346775c..e1af0d1 100644
849 --- a/cpp/src/IceSSL/TrustManagerF.h
850 +++ b/cpp/src/IceSSL/TrustManagerF.h
851 @@ -18,13 +18,13 @@ namespace IceSSL
855 +IceUtil::Shared* upCast(IceSSL::TrustManager*);
859 namespace IceInternal
862 -IceUtil::Shared* upCast(IceSSL::TrustManager*);
866 diff --git a/cpp/src/IceSSL/Util.cpp b/cpp/src/IceSSL/Util.cpp
867 index fc7e19c..63f6b44 100644
868 --- a/cpp/src/IceSSL/Util.cpp
869 +++ b/cpp/src/IceSSL/Util.cpp
870 @@ -175,7 +175,7 @@ convertDH(unsigned char* p, int plen, unsigned char* g, int glen)
874 -IceUtil::Shared* IceInternal::upCast(IceSSL::DHParams* p) { return p; }
875 +IceUtil::Shared* IceSSL::upCast(IceSSL::DHParams* p) { return p; }
877 IceSSL::DHParams::DHParams() :
878 _dh512(0), _dh1024(0), _dh2048(0), _dh4096(0)
879 diff --git a/cpp/src/IceSSL/UtilF.h b/cpp/src/IceSSL/UtilF.h
880 index 4c06e1f..5bad4c8 100644
881 --- a/cpp/src/IceSSL/UtilF.h
882 +++ b/cpp/src/IceSSL/UtilF.h
883 @@ -21,13 +21,13 @@ namespace IceSSL
887 +IceUtil::Shared* upCast(IceSSL::DHParams*);
891 namespace IceInternal
894 -IceUtil::Shared* upCast(IceSSL::DHParams*);
898 diff --git a/cpp/src/IceStorm/NodeI.cpp b/cpp/src/IceStorm/NodeI.cpp
899 index 0c9511e..b9788f4 100644
900 --- a/cpp/src/IceStorm/NodeI.cpp
901 +++ b/cpp/src/IceStorm/NodeI.cpp
902 @@ -18,11 +18,6 @@ using namespace std;
906 -bool operator==(const GroupNodeInfo& info, int id)
908 - return info.id == id;
911 class CheckTask : public IceUtil::TimerTask
913 const NodeIPtr _node;
914 diff --git a/cpp/src/IceUtil/Cond.cpp b/cpp/src/IceUtil/Cond.cpp
915 index 6a8bd3d..a18fd61 100644
916 --- a/cpp/src/IceUtil/Cond.cpp
917 +++ b/cpp/src/IceUtil/Cond.cpp
918 @@ -330,8 +330,11 @@ IceUtil::Cond::Cond()
920 IceUtil::Cond::~Cond()
924 - rc = pthread_cond_destroy(&_cond);
927 + pthread_cond_destroy(&_cond);
931 diff --git a/cpp/src/IceUtil/CountDownLatch.cpp b/cpp/src/IceUtil/CountDownLatch.cpp
932 index bd60766..86e8d2c 100644
933 --- a/cpp/src/IceUtil/CountDownLatch.cpp
934 +++ b/cpp/src/IceUtil/CountDownLatch.cpp
935 @@ -44,10 +44,16 @@ IceUtilInternal::CountDownLatch::~CountDownLatch()
941 - rc = pthread_mutex_destroy(&_mutex);
944 + pthread_mutex_destroy(&_mutex);
946 - rc = pthread_cond_destroy(&_cond);
950 + pthread_cond_destroy(&_cond);
954 diff --git a/cpp/src/IceUtil/CtrlCHandler.cpp b/cpp/src/IceUtil/CtrlCHandler.cpp
955 index f4d150c..575537a 100644
956 --- a/cpp/src/IceUtil/CtrlCHandler.cpp
957 +++ b/cpp/src/IceUtil/CtrlCHandler.cpp
958 @@ -219,18 +219,27 @@ CtrlCHandler::CtrlCHandler(CtrlCHandlerCallback callback)
959 sigaddset(&ctrlCLikeSignals, SIGHUP);
960 sigaddset(&ctrlCLikeSignals, SIGINT);
961 sigaddset(&ctrlCLikeSignals, SIGTERM);
962 - int rc = pthread_sigmask(SIG_BLOCK, &ctrlCLikeSignals, 0);
966 + pthread_sigmask(SIG_BLOCK, &ctrlCLikeSignals, 0);
970 - rc = pthread_create(&_tid, 0, sigwaitThread, 0);
974 + pthread_create(&_tid, 0, sigwaitThread, 0);
979 CtrlCHandler::~CtrlCHandler()
981 - int rc = pthread_cancel(_tid);
985 + pthread_cancel(_tid);
987 #if defined(__APPLE__)
989 @@ -241,7 +250,10 @@ CtrlCHandler::~CtrlCHandler()
990 //assert(rc == 0); For some reaosns, this assert is sometime triggered
993 - rc = pthread_join(_tid, &status);
997 + pthread_join(_tid, &status);
999 #if !defined(__APPLE__)
1000 assert(status == PTHREAD_CANCELED);
1001 diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp
1002 index 1c1b974..b861e19 100644
1003 --- a/cpp/src/IceUtil/FileUtil.cpp
1004 +++ b/cpp/src/IceUtil/FileUtil.cpp
1009 +#if defined(__FreeBSD__) || defined(__linux)
1010 +# include <unistd.h>
1013 using namespace std;
1016 diff --git a/cpp/src/IceUtil/RecMutex.cpp b/cpp/src/IceUtil/RecMutex.cpp
1017 index f3b1376..ce719ad 100644
1018 --- a/cpp/src/IceUtil/RecMutex.cpp
1019 +++ b/cpp/src/IceUtil/RecMutex.cpp
1020 @@ -148,8 +148,11 @@ IceUtil::RecMutex::init(const MutexProtocol protocol)
1021 IceUtil::RecMutex::~RecMutex()
1023 assert(_count == 0);
1026 - rc = pthread_mutex_destroy(&_mutex);
1029 + pthread_mutex_destroy(&_mutex);
1033 @@ -196,8 +199,11 @@ IceUtil::RecMutex::unlock() const
1038 int rc = 0; // Prevent warnings when NDEBUG is defined.
1039 - rc = pthread_mutex_unlock(&_mutex);
1042 + pthread_mutex_unlock(&_mutex);
1046 diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
1047 index f0d6a51..0d5024d 100644
1048 --- a/cpp/src/Slice/CPlusPlusUtil.cpp
1049 +++ b/cpp/src/Slice/CPlusPlusUtil.cpp
1050 @@ -631,7 +631,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
1051 string scope = fixKwd(cl->scope());
1054 - out << nl << stream << deref << "write(::Ice::ObjectPtr(::IceInternal::upCast(" << fixedParam
1055 + out << nl << stream << deref << "write(::Ice::ObjectPtr(" << scope << "upCast(" << fixedParam
1059 @@ -649,7 +649,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
1060 string scope = fixKwd(px->_class()->scope());
1063 - out << nl << stream << deref << "write(::Ice::ObjectPrx(::IceInternal::upCast(" << fixedParam
1064 + out << nl << stream << deref << "write(::Ice::ObjectPrx(::IceProxy" << scope << "upCast(" << fixedParam
1068 diff --git a/cpp/src/Slice/FileTracker.cpp b/cpp/src/Slice/FileTracker.cpp
1069 index af009fe..3966934 100644
1070 --- a/cpp/src/Slice/FileTracker.cpp
1071 +++ b/cpp/src/Slice/FileTracker.cpp
1073 # include <direct.h>
1076 +#if defined(__FreeBSD__) || defined(__linux)
1077 +# include <unistd.h>
1080 using namespace std;
1082 Slice::FileException::FileException(const char* file, int line, const string& r) :
1083 diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
1084 index 8ec5aa5..63d6c83 100644
1085 --- a/cpp/src/slice2cpp/Gen.cpp
1086 +++ b/cpp/src/slice2cpp/Gen.cpp
1087 @@ -1952,8 +1952,10 @@ Slice::Gen::ProxyDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
1090 string name = fixKwd(p->name());
1091 + string scoped = fixKwd(p->scoped());
1093 H << sp << nl << "class " << name << ';';
1094 + H << nl << _dllExport << "::IceProxy::Ice::Object* upCast(::IceProxy" << scoped << "*);";
1097 Slice::Gen::ProxyVisitor::ProxyVisitor(Output& h, Output& c, const string& dllExport) :
1098 @@ -3699,10 +3701,22 @@ void
1099 Slice::Gen::ObjectDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
1101 string name = fixKwd(p->name());
1102 + string scoped = fixKwd(p->scoped());
1104 H << sp << nl << "class " << name << ';';
1105 H << nl << "bool operator==(const " << name << "&, const " << name << "&);";
1106 H << nl << "bool operator<(const " << name << "&, const " << name << "&);";
1112 + H << nl << _dllExport << "::Ice::Object* upCast(" << scoped << "*);";
1116 + H << nl << _dllExport << "::Ice::LocalObject* upCast(" << scoped << "*);";
1121 @@ -4930,13 +4944,13 @@ Slice::Gen::ObjectVisitor::emitGCInsertCode(const TypePtr& p, const string& pref
1123 if((BuiltinPtr::dynamicCast(p) && BuiltinPtr::dynamicCast(p)->kind() == Builtin::KindObject)
1124 || ClassDeclPtr::dynamicCast(p))
1126 - C << nl << "if(" << prefix << name << ')';
1127 + { C << nl << "if(" << prefix << name << ')';
1129 ClassDeclPtr decl = ClassDeclPtr::dynamicCast(p);
1132 - C << nl << "::IceInternal::upCast(" << prefix << name << ".get())->__addObject(_c);";
1133 + string scope = fixKwd(decl->scope());
1134 + C << nl << scope << "upCast(" << prefix << name << ".get())->__addObject(_c);";
1138 @@ -4999,9 +5013,10 @@ Slice::Gen::ObjectVisitor::emitGCClearCode(const TypePtr& p, const string& prefi
1139 ClassDeclPtr decl = ClassDeclPtr::dynamicCast(p);
1142 - C << nl << "if(" << "::IceInternal::upCast(" << prefix << name << ".get())->__usesClasses())";
1143 + string scope = fixKwd(decl->scope());
1144 + C << nl << "if(" << scope << "upCast(" << prefix << name << ".get())->__usesClasses())";
1146 - C << nl << "::IceInternal::upCast(" << prefix << name << ".get())->__decRefUnsafe();";
1147 + C << nl << scope << "upCast(" << prefix << name << ".get())->__decRefUnsafe();";
1148 C << nl << prefix << name << ".__clearHandleUnsafe();";
1151 @@ -5637,40 +5652,30 @@ Slice::Gen::IceInternalVisitor::visitClassDecl(const ClassDeclPtr& p)
1153 string scoped = fixKwd(p->scoped());
1159 - H << nl << _dllExport << "::Ice::Object* upCast(" << scoped << "*);";
1160 - H << nl << _dllExport << "::IceProxy::Ice::Object* upCast(::IceProxy" << scoped << "*);";
1164 - H << nl << _dllExport << "::Ice::LocalObject* upCast(" << scoped << "*);";
1169 Slice::Gen::IceInternalVisitor::visitClassDefStart(const ClassDefPtr& p)
1171 string scoped = fixKwd(p->scoped());
1172 + string scope = fixKwd(p->scope());
1178 << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ")
1179 - << "::Ice::Object* IceInternal::upCast(" << scoped << "* p) { return p; }";
1180 + << "::Ice::Object* " << scope << "upCast(" << scoped << "* p) { return p; }";
1182 << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ")
1183 - << "::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy" << scoped
1184 + << "::IceProxy::Ice::Object* IceProxy" << scope << "upCast(::IceProxy" << scoped
1185 << "* p) { return p; }";
1190 << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ")
1191 - << "::Ice::LocalObject* IceInternal::upCast(" << scoped << "* p) { return p; }";
1192 + << "::Ice::LocalObject* " << scope << "upCast(" << scoped << "* p) { return p; }";
1196 diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
1197 index 90d3136..dd5cf4f 100644
1198 --- a/cpp/src/slice2cs/Gen.cpp
1199 +++ b/cpp/src/slice2cs/Gen.cpp
1200 @@ -1281,7 +1281,7 @@ Slice::CsVisitor::writeConstantValue(const TypePtr& type, const SyntaxTreeBasePt
1202 _out << value << "F";
1204 - else if(ep = EnumPtr::dynamicCast(type))
1205 + else if((ep = EnumPtr::dynamicCast(type)))
1207 string enumName = fixId(ep->scoped());
1208 string::size_type colon = value.rfind(':');
1209 @@ -3914,16 +3914,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
1210 ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container());
1211 string name = fixId(p->name(), DotNet::ICloneable, true);
1212 vector<string> params = getParams(p);
1213 - bool hasOutParams = false;
1214 - ParamDeclList paramList = p->parameters();
1215 - for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli)
1217 - if((*pli)->isOutParam())
1219 - hasOutParams = true;
1226 diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
1227 index e0ac391..5dd7226 100644
1228 --- a/cpp/src/slice2java/Gen.cpp
1229 +++ b/cpp/src/slice2java/Gen.cpp
1230 @@ -1246,7 +1246,7 @@ Slice::JavaVisitor::writeConstantValue(Output& out, const TypePtr& type, const S
1234 - if(bp = BuiltinPtr::dynamicCast(type))
1235 + if((bp = BuiltinPtr::dynamicCast(type)))
1239 @@ -1349,7 +1349,7 @@ Slice::JavaVisitor::writeConstantValue(Output& out, const TypePtr& type, const S
1243 - else if(ep = EnumPtr::dynamicCast(type))
1244 + else if((ep = EnumPtr::dynamicCast(type)))
1247 string::size_type pos = val.rfind(':');
1248 diff --git a/cpp/test/Glacier2/ssl/Server.cpp b/cpp/test/Glacier2/ssl/Server.cpp
1249 index 4fb14f5..1b0c6a5 100644
1250 --- a/cpp/test/Glacier2/ssl/Server.cpp
1251 +++ b/cpp/test/Glacier2/ssl/Server.cpp
1252 @@ -31,9 +31,15 @@ void testContext(bool ssl, const Ice::Context& context)
1253 test(ctx["_con.type"] == "ssl");
1254 test(ctx["_con.localPort"] == "12348");
1256 - test(ctx["_con.localAddress"] == "127.0.0.1");
1257 + if (!inFreeBSDJail())
1259 + test(ctx["_con.localAddress"] == "127.0.0.1");
1261 test(ctx["_con.remotePort"] != "");
1262 - test(ctx["_con.remoteAddress"] == "127.0.0.1");
1263 + if (!inFreeBSDJail())
1265 + test(ctx["_con.remoteAddress"] == "127.0.0.1");
1270 @@ -99,7 +105,7 @@ public:
1274 - ice_ping(const Ice::Current& current)
1275 + ice_ping(const Ice::Current& current) const
1277 testContext(_ssl, current.ctx);
1279 @@ -133,8 +139,11 @@ public:
1281 testContext(true, current.ctx);
1283 - test(info.remoteHost == "127.0.0.1");
1284 - test(info.localHost == "127.0.0.1");
1285 + if (!inFreeBSDJail())
1287 + test(info.remoteHost == "127.0.0.1");
1288 + test(info.localHost == "127.0.0.1");
1290 test(info.localPort == 12348);
1293 diff --git a/cpp/test/Ice/background/EndpointI.h b/cpp/test/Ice/background/EndpointI.h
1294 index f38a280..4d35f7d 100644
1295 --- a/cpp/test/Ice/background/EndpointI.h
1296 +++ b/cpp/test/Ice/background/EndpointI.h
1297 @@ -48,7 +48,7 @@ protected:
1299 virtual Ice::Int hashInit() const;
1300 #if !defined(_MSC_VER) || _MSC_VER > 1300
1301 - using IceInternal::EndpointI::connectors;
1302 + using ::IceInternal::EndpointI::connectors;
1306 diff --git a/cpp/test/Ice/custom/AllTests.cpp b/cpp/test/Ice/custom/AllTests.cpp
1307 index bf66fa9..9907e6b 100644
1308 --- a/cpp/test/Ice/custom/AllTests.cpp
1309 +++ b/cpp/test/Ice/custom/AllTests.cpp
1310 @@ -1384,7 +1384,8 @@ public:
1311 const ::Test::ClassStructSeq& seq,
1312 const InParamPtr& cookie)
1314 - pair< ::Test::ClassStructPtr, ::Test::ClassStructSeq> in = getIn(in, cookie);
1315 + pair< ::Test::ClassStructPtr, ::Test::ClassStructSeq> in;
1316 + in = getIn(in, cookie);
1317 test(ret == in.first);
1318 test(cs1 == in.first);
1319 test(seq == in.second);
1320 @@ -1432,7 +1433,8 @@ public:
1322 void throwExcept1(const Ice::AsyncResultPtr& result)
1324 - wstring in = getIn(in, InParamPtr::dynamicCast(result->getCookie()));
1326 + in = getIn(in, InParamPtr::dynamicCast(result->getCookie()));
1329 Test1::WstringClassPrx t = Test1::WstringClassPrx::uncheckedCast(result->getProxy());
1330 @@ -1451,7 +1453,8 @@ public:
1332 void throwExcept2(const Ice::AsyncResultPtr& result)
1334 - wstring in = getIn(in, InParamPtr::dynamicCast(result->getCookie()));
1336 + in = getIn(in, InParamPtr::dynamicCast(result->getCookie()));
1339 Test2::WstringClassPrx t = Test2::WstringClassPrx::uncheckedCast(result->getProxy());
1340 diff --git a/cpp/test/Ice/info/AllTests.cpp b/cpp/test/Ice/info/AllTests.cpp
1341 index 3e9c229..7f92b7f 100644
1342 --- a/cpp/test/Ice/info/AllTests.cpp
1343 +++ b/cpp/test/Ice/info/AllTests.cpp
1344 @@ -141,9 +141,11 @@ allTests(const Ice::CommunicatorPtr& communicator)
1345 test(info->adapterName.empty());
1346 test(info->localPort > 0);
1347 test(info->remotePort == 12010);
1348 - test(info->remoteAddress == defaultHost);
1349 - test(info->localAddress == defaultHost);
1351 + if (!inFreeBSDJail())
1353 + test(info->remoteAddress == defaultHost);
1354 + test(info->localAddress == defaultHost);
1358 Ice::Context ctx = testIntf->getConnectionInfoAsContext();
1359 @@ -163,8 +165,11 @@ allTests(const Ice::CommunicatorPtr& communicator)
1360 test(info->adapterName.empty());
1361 test(info->localPort > 0);
1362 test(info->remotePort == 12010);
1363 - test(info->remoteAddress ==defaultHost);
1364 - test(info->localAddress == defaultHost);
1365 + if (!inFreeBSDJail())
1367 + test(info->remoteAddress == defaultHost);
1368 + test(info->localAddress == defaultHost);
1371 cout << "ok" << endl;
1373 diff --git a/cpp/test/Ice/properties/run.py b/cpp/test/Ice/properties/run.py
1374 index 18f78f0..955295e 100755
1375 --- a/cpp/test/Ice/properties/run.py
1376 +++ b/cpp/test/Ice/properties/run.py
1377 @@ -26,7 +26,7 @@ client = os.path.join(os.getcwd(), "client")
1381 -configPath = u"./config/中国_client.config"
1382 +configPath = u"./config/中国_client.config".encode("utf-8")
1384 TestUtil.createConfig(configPath,
1385 ["# Automatically generated by Ice test driver.",
1386 diff --git a/cpp/test/IceUtil/unicode/Client.cpp b/cpp/test/IceUtil/unicode/Client.cpp
1387 index 6370c9e..c5b73fb 100644
1388 --- a/cpp/test/IceUtil/unicode/Client.cpp
1389 +++ b/cpp/test/IceUtil/unicode/Client.cpp
1394 +#if defined(__FreeBSD__) || defined(__linux)
1395 +# include <unistd.h>
1398 using namespace IceUtil;
1399 using namespace std;
1401 diff --git a/cpp/test/Slice/keyword/Client.cpp b/cpp/test/Slice/keyword/Client.cpp
1402 index 0714a17..edcfe00 100644
1403 --- a/cpp/test/Slice/keyword/Client.cpp
1404 +++ b/cpp/test/Slice/keyword/Client.cpp
1405 @@ -73,6 +73,9 @@ public:
1406 virtual void ice_response(Ice::Int) {}
1407 virtual void ice_exception(const ::Ice::Exception&) {}
1410 +template<typename T>
1411 +void unused(T const &) { }
1414 // This section of the test is present to ensure that the C++ types
1415 @@ -86,6 +89,7 @@ testtypes()
1417 _cpp_and::_cpp_auto b;
1421 _cpp_and::deletePtr c = new _cpp_and::_cpp_delete();
1423 diff --git a/cpp/test/include/TestCommon.h b/cpp/test/include/TestCommon.h
1424 index 651a885..ca603d4 100644
1425 --- a/cpp/test/include/TestCommon.h
1426 +++ b/cpp/test/include/TestCommon.h
1431 +#if defined(__FreeBSD__)
1432 +# include <sys/types.h>
1433 +# include <sys/sysctl.h>
1434 +inline bool inFreeBSDJail()
1437 + size_t size = sizeof(jailed);
1438 + return (sysctlbyname("security.jail.jailed", &jailed, &size, NULL, 0) != -1 || jailed);
1441 +inline bool inFreeBSDJail()
1448 inline testFailed(const char* expr, const char* file, unsigned int line)
1450 diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
1451 index e02da06..9b5f497 100755
1452 --- a/scripts/TestUtil.py
1453 +++ b/scripts/TestUtil.py
1454 @@ -74,6 +74,25 @@ def isDarwin():
1456 return sys.platform.startswith("linux")
1459 + return sys.platform.startswith("freebsd")
1462 + p = subprocess.Popen("sysctl "+key, shell=1, stdout=subprocess.PIPE)
1464 + result = p.communicate()[0].strip().split()[1]
1465 + except IndexError:
1467 + if sys.version_info >= (3,):
1468 + result = str(result, sys.stdout.encoding)
1470 + return int(result)
1471 + except ValueError:
1474 +def isFreeBSDJail():
1475 + return isFreeBSD() and sysctl("security.jail.jailed")
1477 def getCppCompiler():
1479 if os.environ.get("CPP_COMPILER", "") != "":
1480 @@ -1590,7 +1609,15 @@ def runTests(start, expanded, num = 0, script = False):
1481 if isDarwin() and "nodarwin" in config:
1482 print "%s*** test not supported under Darwin%s" % (prefix, suffix)
1485 + if isFreeBSD() and "nofreebsd" in config:
1486 + print "%s*** test not supported under FreeBSD%s" % (prefix, suffix)
1489 + if isFreeBSDJail() and "nofreebsdjail" in config:
1490 + print "%s*** test not supported within a FreeBSD Jail%s" % (prefix, suffix)
1493 if not isWin32() and "win32only" in config:
1494 print "%s*** test only supported under Win32%s" % (prefix, suffix)