diff options
author | Kevin Smith <git@kismith.co.uk> | 2014-07-15 14:45:28 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2014-10-01 12:15:02 (GMT) |
commit | a2296b00c88df201b0eb58e867aeb17a87e6332c (patch) | |
tree | 9fdebba1b5e9202ca669786a41dd94f080ba5807 | |
parent | a24d8c0e93d70312fc90d5fdf6214ade9a475e92 (diff) | |
download | swift-contrib-a2296b00c88df201b0eb58e867aeb17a87e6332c.zip swift-contrib-a2296b00c88df201b0eb58e867aeb17a87e6332c.tar.bz2 |
Port many of Isode's local fixes upstream
Includes fixes to:
Build with new Visual Studio and Boost
Avoid error caused when Avahi is present but Qt is not
Make declaration of XMPPRosterImpl::addContact consistent with implementation
Includes enhancements to:
Allow user-configurable mt.exe
Allow splitting openssl paths
Allow disabling gconf lookup
Make idn support optional
Allow disabling various library detections
Remove use of non-Python2.4 features in sconscripts
Test-Information:
Builds
Change-Id: Iee91ee80291a8bdf87cc169c915e4dad1cc1055b
24 files changed, 892 insertions, 418 deletions
diff --git a/3rdParty/CppUnit/SConscript b/3rdParty/CppUnit/SConscript index ad287f3..addc8ab 100644 --- a/3rdParty/CppUnit/SConscript +++ b/3rdParty/CppUnit/SConscript @@ -6,2 +6,4 @@ if env["TEST"] : cppflags = ["/I" + Dir("src/include").abspath] + elif env["PLATFORM"] == "sunos" : + cppflags = [("-I" + Dir("src/include").abspath)] else : diff --git a/3rdParty/HippoMocks/hippomocks.h b/3rdParty/HippoMocks/hippomocks.h index 802d719..3483dce 100644 --- a/3rdParty/HippoMocks/hippomocks.h +++ b/3rdParty/HippoMocks/hippomocks.h @@ -12,3 +12,3 @@ -#ifndef VIRT_FUNC_LIMIT +#ifndef VIRT_FUNC_LIMIT #define VIRT_FUNC_LIMIT 1024 @@ -32,5 +32,6 @@ #include <cstring> +#include <string> #ifdef _MSC_VER -// these warnings are pointless and huge, and will confuse new users. +// these warnings are pointless and huge, and will confuse new users. #pragma warning(push) @@ -58,3 +59,3 @@ public: virtual ~base_mock() {} - void *rewriteVft(void *newVf) + void *rewriteVft(void *newVf) { @@ -64,3 +65,3 @@ public: } - void unwriteVft() + void unwriteVft() { @@ -70,8 +71,8 @@ public: -class NullType +class NullType { -public: - bool operator==(const NullType &) const +public: + bool operator==(const NullType &) const { - return true; + return true; } @@ -88,3 +89,3 @@ inline std::ostream &operator<<(std::ostream &os, NotPrintable const&) template <typename T> -struct printArg +struct printArg { @@ -105,10 +106,10 @@ struct printArg<NullType> -class base_tuple +class base_tuple { protected: - base_tuple() + base_tuple() { - } -public: - virtual ~base_tuple() + } +public: + virtual ~base_tuple() { @@ -141,5 +142,5 @@ struct comparer -template <typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType, - typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType, - typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType, +template <typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType, + typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType, + typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType, typename M = NullType, typename N = NullType, typename O = NullType, typename P = NullType> @@ -164,9 +165,9 @@ public: typename no_cref<P>::type p; - tuple(typename no_cref<A>::type a = typename no_cref<A>::type(), typename no_cref<B>::type b = typename no_cref<B>::type(), - typename no_cref<C>::type c = typename no_cref<C>::type(), typename no_cref<D>::type d = typename no_cref<D>::type(), - typename no_cref<E>::type e = typename no_cref<E>::type(), typename no_cref<F>::type f = typename no_cref<F>::type(), + tuple(typename no_cref<A>::type a = typename no_cref<A>::type(), typename no_cref<B>::type b = typename no_cref<B>::type(), + typename no_cref<C>::type c = typename no_cref<C>::type(), typename no_cref<D>::type d = typename no_cref<D>::type(), + typename no_cref<E>::type e = typename no_cref<E>::type(), typename no_cref<F>::type f = typename no_cref<F>::type(), typename no_cref<G>::type g = typename no_cref<G>::type(), typename no_cref<H>::type h = typename no_cref<H>::type(), - typename no_cref<I>::type i = typename no_cref<I>::type(), typename no_cref<J>::type j = typename no_cref<J>::type(), - typename no_cref<K>::type k = typename no_cref<K>::type(), typename no_cref<L>::type l = typename no_cref<L>::type(), - typename no_cref<M>::type m = typename no_cref<M>::type(), typename no_cref<N>::type n = typename no_cref<N>::type(), + typename no_cref<I>::type i = typename no_cref<I>::type(), typename no_cref<J>::type j = typename no_cref<J>::type(), + typename no_cref<K>::type k = typename no_cref<K>::type(), typename no_cref<L>::type l = typename no_cref<L>::type(), + typename no_cref<M>::type m = typename no_cref<M>::type(), typename no_cref<N>::type n = typename no_cref<N>::type(), typename no_cref<O>::type o = typename no_cref<O>::type(), typename no_cref<P>::type p = typename no_cref<P>::type()) @@ -572,3 +573,3 @@ int getFunctionIndex(T func) { template <class T> -class mock : public base_mock +class mock : public base_mock { @@ -583,6 +584,6 @@ public: int funcMap[VIRT_FUNC_LIMIT]; - mock(MockRepository *repo) + mock(MockRepository *repo) : repo(repo) { - for (int i = 0; i < VIRT_FUNC_LIMIT; i++) + for (int i = 0; i < VIRT_FUNC_LIMIT; i++) { @@ -594,5 +595,5 @@ public: } - int translateX(int x) + int translateX(int x) { - for (int i = 0; i < VIRT_FUNC_LIMIT; i++) + for (int i = 0; i < VIRT_FUNC_LIMIT; i++) { @@ -609,3 +610,3 @@ class classMock : public mock<T> public: - classMock(MockRepository *repo) + classMock(MockRepository *repo) : mock<T>(repo) @@ -624,7 +625,7 @@ public: //Type-safe exception wrapping -class ExceptionHolder -{ +class ExceptionHolder +{ public: virtual ~ExceptionHolder() {} - virtual void rethrow() = 0; + virtual void rethrow() = 0; }; @@ -643,3 +644,3 @@ class VirtualDestructable { public: virtual ~VirtualDestructable() {} }; template <typename Y> -class TupleInvocable : public VirtualDestructable +class TupleInvocable : public VirtualDestructable { @@ -650,5 +651,5 @@ public: template <typename Y, - typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType, - typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType, - typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType, + typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType, + typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType, + typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType, typename M = NullType, typename N = NullType, typename O = NullType, typename P = NullType> @@ -660,3 +661,3 @@ public: const tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &rTupl = reinterpret_cast<const tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &>(tupl); - return (*this)(rTupl.a, rTupl.b, rTupl.c, rTupl.d, rTupl.e, rTupl.f, rTupl.g, rTupl.h, + return (*this)(rTupl.a, rTupl.b, rTupl.c, rTupl.d, rTupl.e, rTupl.f, rTupl.g, rTupl.h, rTupl.i, rTupl.j, rTupl.k, rTupl.l, rTupl.m, rTupl.n, rTupl.o, rTupl.p); @@ -665,5 +666,5 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, - typename I, typename J, typename K, typename L, + typename A, typename B, typename C, typename D, + typename E, typename F, typename G, typename H, + typename I, typename J, typename K, typename L, typename M, typename N, typename O, typename P> @@ -680,5 +681,5 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, - typename I, typename J, typename K, typename L, + typename A, typename B, typename C, typename D, + typename E, typename F, typename G, typename H, + typename I, typename J, typename K, typename L, typename M, typename N, typename O> @@ -695,5 +696,5 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, - typename I, typename J, typename K, typename L, + typename A, typename B, typename C, typename D, + typename E, typename F, typename G, typename H, + typename I, typename J, typename K, typename L, typename M, typename N> @@ -710,5 +711,5 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, - typename I, typename J, typename K, typename L, + typename A, typename B, typename C, typename D, + typename E, typename F, typename G, typename H, + typename I, typename J, typename K, typename L, typename M> @@ -725,4 +726,4 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, + typename A, typename B, typename C, typename D, + typename E, typename F, typename G, typename H, typename I, typename J, typename K, typename L> @@ -739,4 +740,4 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, + typename A, typename B, typename C, typename D, + typename E, typename F, typename G, typename H, typename I, typename J, typename K> @@ -753,4 +754,4 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, + typename A, typename B, typename C, typename D, + typename E, typename F, typename G, typename H, typename I, typename J> @@ -767,4 +768,4 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, + typename A, typename B, typename C, typename D, + typename E, typename F, typename G, typename H, typename I> @@ -781,3 +782,3 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H> @@ -794,3 +795,3 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, + typename A, typename B, typename C, typename D, typename E, typename F, typename G> @@ -807,3 +808,3 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, + typename A, typename B, typename C, typename D, typename E, typename F> @@ -820,3 +821,3 @@ public: template <typename T, typename Y, - typename A, typename B, typename C, typename D, + typename A, typename B, typename C, typename D, typename E> @@ -918,8 +919,8 @@ public: protected: - Call(RegistrationType expectation, base_mock *mock, int funcIndex, int X, const char *funcName, const char *fileName) - : retVal(0), - eHolder(0), - mock(mock), + Call(RegistrationType expectation, base_mock *mock, int funcIndex, int X, const char *funcName, const char *fileName) + : retVal(0), + eHolder(0), + mock(mock), functor(0), - funcIndex(funcIndex), + funcIndex(funcIndex), expectation(expectation), @@ -933,3 +934,3 @@ public: virtual const base_tuple *getArgs() const = 0; - virtual ~Call() + virtual ~Call() { @@ -943,6 +944,6 @@ std::ostream &operator<<(std::ostream &os, const Call &call); -template <typename Y, - typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType, - typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType, - typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType, +template <typename Y, + typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType, + typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType, + typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType, typename M = NullType, typename N = NullType, typename O = NullType, typename P = NullType> @@ -956,9 +957,9 @@ public: bool matchesArgs(const base_tuple &tupl) { return !args || *args == reinterpret_cast<const tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &>(tupl); } - TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &With(A a = A(), B b = B(), C c = C(), D d = D(), E e = E(), F f = F(), G g = G(), H h = H(), I i = I(), J j = J(), K k = K(), L l = L(), M m = M(), N n = N(), O o = O(), P p = P()) { - args = new tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); - return *this; + TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &With(A a = A(), B b = B(), C c = C(), D d = D(), E e = E(), F f = F(), G g = G(), H h = H(), I i = I(), J j = J(), K k = K(), L l = L(), M m = M(), N n = N(), O o = O(), P p = P()) { + args = new tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); + return *this; } - TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &After(Call &call) { + TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &After(Call &call) { previousCalls.push_back(&call); - return *this; + return *this; } @@ -971,5 +972,5 @@ public: -template <typename A, typename B, typename C, typename D, - typename E, typename F, typename G, typename H, - typename I, typename J, typename K, typename L, +template <typename A, typename B, typename C, typename D, + typename E, typename F, typename G, typename H, + typename I, typename J, typename K, typename L, typename M, typename N, typename O, typename P> @@ -983,9 +984,9 @@ public: bool matchesArgs(const base_tuple &tupl) { return (!args) || (*args == reinterpret_cast<const tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &>(tupl)); } - TCall<void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &With(A a = A(), B b = B(), C c = C(), D d = D(), E e = E(), F f = F(), G g = G(), H h = H(), I i = I(), J j = J(), K k = K(), L l = L(), M m = M(), N n = N(), O o = O(), P p = P()) { - args = new tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); - return *this; + TCall<void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &With(A a = A(), B b = B(), C c = C(), D d = D(), E e = E(), F f = F(), G g = G(), H h = H(), I i = I(), J j = J(), K k = K(), L l = L(), M m = M(), N n = N(), O o = O(), P p = P()) { + args = new tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); + return *this; } - TCall<void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &After(Call &call) { + TCall<void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &After(Call &call) { previousCalls.push_back(&call); - return *this; + return *this; } @@ -1025,29 +1026,29 @@ public: TCall<Y,A> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B> TCall<Y,A,B> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C> TCall<Y,A,B,C> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C, typename D> TCall<Y,A,B,C,D> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E> TCall<Y,A,B,C,D,E> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F> TCall<Y,A,B,C,D,E,F> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G> TCall<Y,A,B,C,D,E,F,G> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H> TCall<Y,A,B,C,D,E,F,G,H> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1055,4 +1056,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1060,4 +1061,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1065,4 +1066,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1070,4 +1071,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1076,4 +1077,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1082,4 +1083,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1088,4 +1089,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O), const char *funcName, const char *fileName, unsigned long lineNo); - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1101,29 +1102,29 @@ public: TCall<Y,A> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B> TCall<Y,A,B> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C> TCall<Y,A,B,C> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C, typename D> TCall<Y,A,B,C,D> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E> TCall<Y,A,B,C,D,E> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F> TCall<Y,A,B,C,D,E,F> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G> TCall<Y,A,B,C,D,E,F,G> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H> TCall<Y,A,B,C,D,E,F,G,H> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1131,4 +1132,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1136,4 +1137,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1141,4 +1142,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1146,4 +1147,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1152,4 +1153,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1158,4 +1159,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1164,4 +1165,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1175,29 +1176,29 @@ public: TCall<Y,A> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B> TCall<Y,A,B> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C> TCall<Y,A,B,C> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C, typename D> TCall<Y,A,B,C,D> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E> TCall<Y,A,B,C,D,E> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F> TCall<Y,A,B,C,D,E,F> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G> TCall<Y,A,B,C,D,E,F,G> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H> TCall<Y,A,B,C,D,E,F,G,H> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1205,4 +1206,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1210,4 +1211,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1215,4 +1216,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1220,4 +1221,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1226,4 +1227,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1232,4 +1233,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1238,4 +1239,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1249,29 +1250,29 @@ public: TCall<Y,A> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B> TCall<Y,A,B> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C> TCall<Y,A,B,C> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C, typename D> TCall<Y,A,B,C,D> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E> TCall<Y,A,B,C,D,E> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F> TCall<Y,A,B,C,D,E,F> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G> TCall<Y,A,B,C,D,E,F,G> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H> TCall<Y,A,B,C,D,E,F,G,H> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1279,4 +1280,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1284,4 +1285,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1289,4 +1290,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1294,4 +1295,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1300,4 +1301,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1306,4 +1307,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1312,4 +1313,4 @@ public: TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O))(func), funcName, fileName, lineNo); } - template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, + template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -1323,5 +1324,5 @@ public: Z DoExpectation(base_mock *mock, int funcno, const base_tuple &tuple); - void DoVoidExpectation(base_mock *mock, int funcno, const base_tuple &tuple) + void DoVoidExpectation(base_mock *mock, int funcno, const base_tuple &tuple) { - for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); ++i) + for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); ++i) { @@ -1345,3 +1346,3 @@ public: call->satisfied = true; - + if (call->eHolder) @@ -1355,3 +1356,3 @@ public: } - for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); ++i) + for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); ++i) { @@ -1378,3 +1379,3 @@ public: } - for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); ++i) + for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); ++i) { @@ -1408,3 +1409,3 @@ public: const char *funcName = NULL; - for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end() && !funcName; ++i) + for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end() && !funcName; ++i) { @@ -1415,3 +1416,3 @@ public: } - for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end() && !funcName; ++i) + for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end() && !funcName; ++i) { @@ -1422,3 +1423,3 @@ public: } - for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end() && !funcName; ++i) + for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end() && !funcName; ++i) { @@ -1431,3 +1432,3 @@ public: } - MockRepository() + MockRepository() : autoExpect(true) @@ -1435,3 +1436,3 @@ public: } - ~MockRepository() + ~MockRepository() { @@ -1440,3 +1441,3 @@ public: reset(); - for (std::list<base_mock *>::iterator i = mocks.begin(); i != mocks.end(); i++) + for (std::list<base_mock *>::iterator i = mocks.begin(); i != mocks.end(); i++) { @@ -1446,5 +1447,5 @@ public: } - void reset() + void reset() { - for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); i++) + for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); i++) { @@ -1453,3 +1454,3 @@ public: expectations.clear(); - for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); i++) + for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); i++) { @@ -1458,3 +1459,3 @@ public: neverCalls.clear(); - for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); i++) + for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); i++) { @@ -1464,5 +1465,5 @@ public: } - void VerifyAll() + void VerifyAll() { - for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); i++) + for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); i++) { @@ -1481,3 +1482,3 @@ template <typename Z, typename Y> class mockFuncs : public mock<Z> { -private: +private: mockFuncs(); @@ -1590,3 +1591,3 @@ template <typename Z> class mockFuncs<Z, void> : public mock<Z> { -private: +private: mockFuncs(); @@ -1709,3 +1710,3 @@ void MockRepository::BasicRegisterExpect(mock<Z> *zMock, int funcIndex, void (ba template <int X, RegistrationType expect, typename Z2, typename Y, typename Z> -TCall<Y> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1714,4 +1715,4 @@ TCall<Y> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *f mfp = &mockFuncs<Z2, Y>::template expectation0<X>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), - funcIndex, + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + funcIndex, reinterpret_cast<void (base_mock::*)()>(mfp),X); @@ -1723,3 +1724,3 @@ TCall<Y> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *f case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1733,3 +1734,3 @@ TCall<Y> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *f template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A> -TCall<Y,A> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1738,3 +1739,3 @@ TCall<Y,A> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char mfp = &mockFuncs<Z2, Y>::template expectation1<X,A>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1747,3 +1748,3 @@ TCall<Y,A> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1756,5 +1757,5 @@ TCall<Y,A> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B> -TCall<Y,A,B> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1763,3 +1764,3 @@ TCall<Y,A,B> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const mfp = &mockFuncs<Z2, Y>::template expectation2<X,A,B>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1772,3 +1773,3 @@ TCall<Y,A,B> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1781,5 +1782,5 @@ TCall<Y,A,B> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C> -TCall<Y,A,B,C> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1788,3 +1789,3 @@ TCall<Y,A,B,C> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), co mfp = &mockFuncs<Z2, Y>::template expectation3<X,A,B,C>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1797,3 +1798,3 @@ TCall<Y,A,B,C> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), co case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1806,5 +1807,5 @@ TCall<Y,A,B,C> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), co } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A, typename B, typename C, typename D> -TCall<Y,A,B,C,D> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1813,3 +1814,3 @@ TCall<Y,A,B,C,D> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D) mfp = &mockFuncs<Z2, Y>::template expectation4<X,A,B,C,D>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1822,3 +1823,3 @@ TCall<Y,A,B,C,D> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D) case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1831,6 +1832,6 @@ TCall<Y,A,B,C,D> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D) } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E> -TCall<Y,A,B,C,D,E> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1839,3 +1840,3 @@ TCall<Y,A,B,C,D,E> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C, mfp = &mockFuncs<Z2, Y>::template expectation5<X,A,B,C,D,E>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1848,3 +1849,3 @@ TCall<Y,A,B,C,D,E> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C, case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1857,6 +1858,6 @@ TCall<Y,A,B,C,D,E> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C, } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F> -TCall<Y,A,B,C,D,E,F> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1865,3 +1866,3 @@ TCall<Y,A,B,C,D,E,F> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B, mfp = &mockFuncs<Z2, Y>::template expectation6<X,A,B,C,D,E,F>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1874,3 +1875,3 @@ TCall<Y,A,B,C,D,E,F> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B, case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1883,6 +1884,6 @@ TCall<Y,A,B,C,D,E,F> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B, } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G> -TCall<Y,A,B,C,D,E,F,G> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1891,3 +1892,3 @@ TCall<Y,A,B,C,D,E,F,G> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A, mfp = &mockFuncs<Z2, Y>::template expectation7<X,A,B,C,D,E,F,G>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1900,3 +1901,3 @@ TCall<Y,A,B,C,D,E,F,G> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A, case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1909,6 +1910,6 @@ TCall<Y,A,B,C,D,E,F,G> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A, } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H> -TCall<Y,A,B,C,D,E,F,G,H> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G,H> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1917,3 +1918,3 @@ TCall<Y,A,B,C,D,E,F,G,H> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)( mfp = &mockFuncs<Z2, Y>::template expectation8<X,A,B,C,D,E,F,G,H>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1926,3 +1927,3 @@ TCall<Y,A,B,C,D,E,F,G,H> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)( case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1935,7 +1936,7 @@ TCall<Y,A,B,C,D,E,F,G,H> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)( } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I> -TCall<Y,A,B,C,D,E,F,G,H,I> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G,H,I> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1944,3 +1945,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func mfp = &mockFuncs<Z2, Y>::template expectation9<X,A,B,C,D,E,F,G,H,I>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1953,3 +1954,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1962,7 +1963,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J> -TCall<Y,A,B,C,D,E,F,G,H,I,J> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G,H,I,J> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1971,3 +1972,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*fu mfp = &mockFuncs<Z2, Y>::template expectation10<X,A,B,C,D,E,F,G,H,I,J>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -1980,3 +1981,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*fu case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -1989,7 +1990,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*fu } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J, typename K> -TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -1998,3 +1999,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::* mfp = &mockFuncs<Z2, Y>::template expectation11<X,A,B,C,D,E,F,G,H,I,J,K>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -2007,3 +2008,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::* case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -2016,7 +2017,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::* } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J, typename K, typename L> -TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -2025,3 +2026,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z: mfp = &mockFuncs<Z2, Y>::template expectation12<X,A,B,C,D,E,F,G,H,I,J,K,L>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -2034,3 +2035,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z: case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -2043,4 +2044,4 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z: } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -2048,3 +2049,3 @@ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename M> -TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -2053,3 +2054,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &MockRepository::RegisterExpect_(Z2 *mck, Y ( mfp = &mockFuncs<Z2, Y>::template expectation13<X,A,B,C,D,E,F,G,H,I,J,K,L,M>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -2062,3 +2063,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &MockRepository::RegisterExpect_(Z2 *mck, Y ( case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -2071,4 +2072,4 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &MockRepository::RegisterExpect_(Z2 *mck, Y ( } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -2076,3 +2077,3 @@ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename M, typename N> -TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -2081,4 +2082,4 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &MockRepository::RegisterExpect_(Z2 *mck, Y mfp = &mockFuncs<Z2, Y>::template expectation14<X,A,B,C,D,E,F,G,H,I,J,K,L,M,N>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), - funcIndex, + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + funcIndex, reinterpret_cast<void (base_mock::*)()>(mfp),X); @@ -2090,3 +2091,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &MockRepository::RegisterExpect_(Z2 *mck, Y case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -2099,4 +2100,4 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &MockRepository::RegisterExpect_(Z2 *mck, Y } -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -2104,3 +2105,3 @@ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename M, typename N, typename O> -TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -2109,4 +2110,4 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &MockRepository::RegisterExpect_(Z2 *mck, mfp = &mockFuncs<Z2, Y>::template expectation15<X,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), - funcIndex, + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + funcIndex, reinterpret_cast<void (base_mock::*)()>(mfp),X); @@ -2118,3 +2119,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &MockRepository::RegisterExpect_(Z2 *mck, case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -2128,4 +2129,4 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &MockRepository::RegisterExpect_(Z2 *mck, -template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, - typename A, typename B, typename C, typename D, +template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, + typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, @@ -2133,3 +2134,3 @@ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename M, typename N, typename O, typename P> -TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), const char *funcName, const char *fileName, unsigned long lineNo) +TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), const char *funcName, const char *fileName, unsigned long lineNo) { @@ -2138,3 +2139,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &MockRepository::RegisterExpect_(Z2 *mc mfp = &mockFuncs<Z2, Y>::template expectation16<X,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>; - BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), + BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck), funcIndex, @@ -2147,3 +2148,3 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &MockRepository::RegisterExpect_(Z2 *mc case Once: - if (autoExpect && expectations.size() > 0) + if (autoExpect && expectations.size() > 0) { @@ -2158,5 +2159,5 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &MockRepository::RegisterExpect_(Z2 *mc template <typename Z> -Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &tuple) +Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &tuple) { - for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); ++i) + for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); ++i) { @@ -2193,3 +2194,3 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t } - for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); ++i) + for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); ++i) { @@ -2216,3 +2217,3 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t } - for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); ++i) + for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); ++i) { @@ -2235,3 +2236,3 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t call->satisfied = true; - + if (call->eHolder) @@ -2241,6 +2242,6 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t return ((ReturnValueWrapper<Z> *)call->retVal)->rv; - + if (call->functor != NULL) return (*(TupleInvocable<Z> *)(call->functor))(tuple); - + throw NoResultSetUpException(call->getArgs(), call->funcName); @@ -2249,3 +2250,3 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t const char *funcName = NULL; - for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end() && !funcName; ++i) + for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end() && !funcName; ++i) { @@ -2256,3 +2257,3 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t } - for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end() && !funcName; ++i) + for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end() && !funcName; ++i) { @@ -2263,3 +2264,3 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t } - for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end() && !funcName; ++i) + for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end() && !funcName; ++i) { @@ -2342,3 +2343,3 @@ inline std::ostream &operator<<(std::ostream &os, const MockRepository &repo) -inline void BaseException::setException(const char *description, MockRepository *repo) +inline void BaseException::setException(const char *description, MockRepository *repo) { @@ -2357,2 +2358 @@ inline void BaseException::setException(const char *description, MockRepository #endif - diff --git a/3rdParty/SCons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py b/3rdParty/SCons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py index bbdac1d..56af18a 100644 --- a/3rdParty/SCons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py +++ b/3rdParty/SCons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py @@ -106,3 +106,3 @@ def get_host_target(env): host_platform = os.environ.get('PROCESSOR_ARCHITECTURE', '') - + # Retain user requested TARGET_ARCH @@ -116,3 +116,3 @@ def get_host_target(env): target_platform = host_platform - + try: @@ -130,5 +130,9 @@ def get_host_target(env): -_VCVER = ["10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"] +_VCVER = ["12.0", "11.0", "10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"] _VCVER_TO_PRODUCT_DIR = { + '12.0': [ + r'Microsoft\VisualStudio\12.0\Setup\VC\ProductDir'], + '11.0': [ + r'Microsoft\VisualStudio\11.0\Setup\VC\ProductDir'], '10.0': [ @@ -150,3 +154,3 @@ _VCVER_TO_PRODUCT_DIR = { } - + def msvc_version_to_maj_min(msvc_version): @@ -230,3 +234,3 @@ def find_batch_file(env,msvc_version,host_arch,target_arch): raise NoVersionFound("No version of Visual Studio found") - + debug('vc.py: find_batch_file() pdir:%s'%pdir) @@ -248,3 +252,3 @@ def find_batch_file(env,msvc_version,host_arch,target_arch): batfilename = None - + installed_sdks=get_installed_sdks() @@ -305,3 +309,3 @@ def get_default_version(env): msvs_version = env.get('MSVS_VERSION') - + debug('get_default_version(): msvc_version:%s msvs_version:%s'%(msvc_version,msvs_version)) @@ -362,3 +366,3 @@ def msvc_find_valid_batch_script(env,version): env['TARGET_ARCH']=tp - + debug("vc.py:msvc_find_valid_batch_script() trying target_platform:%s"%tp) @@ -370,3 +374,3 @@ def msvc_find_valid_batch_script(env,version): arg = _HOST_TARGET_ARCH_TO_BAT_ARCH[host_target] - + # Try to locate a batch file for this host/target platform combo @@ -384,3 +388,3 @@ def msvc_find_valid_batch_script(env,version): continue - + # Try to use the located batch file for this host/target platform combo @@ -403,3 +407,3 @@ def msvc_find_valid_batch_script(env,version): continue - + # If we cannot find a viable installed compiler, reset the TARGET_ARCH @@ -408,5 +412,5 @@ def msvc_find_valid_batch_script(env,version): env['TARGET_ARCH']=req_target_platform - + return d - + @@ -429,3 +433,3 @@ def msvc_setup_env(env): - + use_script = env.get('MSVC_USE_SCRIPT', True) @@ -434,3 +438,3 @@ def msvc_setup_env(env): d = script_env(use_script) - elif use_script: + elif use_script: d = msvc_find_valid_batch_script(env,version) @@ -455,2 +459 @@ def msvc_exists(version=None): return version in vcs - diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index 767c326..51be9ab 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -14,2 +14,5 @@ vars.Add('link', "Linker") vars.Add('linkflags', "Extra linker flags") +vars.Add('ar', "Archiver (ar or lib)") +if os.name == "nt": + vars.Add('mt', "manifest tool") vars.Add(BoolVariable("ccache", "Use CCache", "no")) @@ -41,3 +44,6 @@ if os.name == "nt" : vars.Add(PackageVariable("openssl", "OpenSSL location", "yes")) +vars.Add("openssl_libnames", "Comma-separated openssl library names to override defaults", None) vars.Add(BoolVariable("openssl_force_bundled", "Force use of the bundled OpenSSL", "no")) +vars.Add("openssl_include", "Location of OpenSSL include files (if not under (openssl)/include)", None) +vars.Add("openssl_libdir", "Location of OpenSSL library files (if not under (openssl)/lib)", None) vars.Add(PackageVariable("hunspell", "Hunspell location", False)) @@ -45,9 +51,19 @@ vars.Add(PathVariable("boost_includedir", "Boost headers location", None, PathVa vars.Add(PathVariable("boost_libdir", "Boost library location", None, PathVariable.PathAccept)) +vars.Add(BoolVariable("boost_bundled_enable", "Allow use of bundled Boost as last resort", "true")) +vars.Add(PathVariable("zlib_includedir", "Zlib headers location", None, PathVariable.PathAccept)) +vars.Add(PathVariable("zlib_libdir", "Zlib library location", None, PathVariable.PathAccept)) +vars.Add(PathVariable("zlib_libfile", "Zlib library file (full path to file)", None, PathVariable.PathAccept)) +vars.Add(BoolVariable("zlib_bundled_enable", "Allow use of bundled Zlib as last resort", "true")) +vars.Add(BoolVariable("try_gconf", "Try configuring for GConf?", "true")) +vars.Add(BoolVariable("try_libxml", "Try configuring for libXML?", "true")) +vars.Add(BoolVariable("try_expat", "Try configuring for expat?", "true")) vars.Add(PathVariable("expat_includedir", "Expat headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("expat_libdir", "Expat library location", None, PathVariable.PathAccept)) -vars.Add("expat_libname", "Expat library name", "libexpat" if os.name == "nt" else "expat") +vars.Add("expat_libname", "Expat library name", os.name == "nt" and "libexpat" or "expat") vars.Add(PackageVariable("icu", "ICU library location", "no")) +vars.Add(BoolVariable("libidn_bundled_enable", "Allow use of bunded Expat", "true")) +vars.Add(BoolVariable("try_libidn", "Try configuring for LibIDN?", "true")) vars.Add(PathVariable("libidn_includedir", "LibIDN headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("libidn_libdir", "LibIDN library location", None, PathVariable.PathAccept)) -vars.Add("libidn_libname", "LibIDN library name", "libidn" if os.name == "nt" else "idn") +vars.Add("libidn_libname", "LibIDN library name", os.name == "nt" and "libidn" or "idn") vars.Add(PathVariable("libminiupnpc_includedir", "LibMiniUPNPC headers location", None, PathVariable.PathAccept)) @@ -60,3 +76,3 @@ vars.Add(PathVariable("sqlite_includedir", "SQLite headers location", None, Path vars.Add(PathVariable("sqlite_libdir", "SQLite library location", None, PathVariable.PathAccept)) -vars.Add("sqlite_libname", "SQLite library name", "libsqlite3" if os.name == "nt" else "sqlite3") +vars.Add("sqlite_libname", "SQLite library name", os.name == "nt" and "libsqlite3" or "sqlite3") vars.Add("sqlite_force_bundled", "Force use of the bundled SQLite", None) @@ -71,2 +87,3 @@ vars.Add("editline_libname", "Readline library name", "libedit" if os.name == "n +vars.Add(BoolVariable("try_avahi", "Try configuring for avahi?", "true")) vars.Add(PathVariable("avahi_includedir", "Avahi headers location", None, PathVariable.PathAccept)) @@ -84,2 +101,4 @@ vars.Add(BoolVariable("unbound", "Build bundled ldns and unbound. Use them for D +vars.Add(BoolVariable("install_git_hooks", "Install git hooks", "true")) + ################################################################################ @@ -88,5 +107,4 @@ vars.Add(BoolVariable("unbound", "Build bundled ldns and unbound. Use them for D - env_ENV = { - 'PATH' : os.environ['PATH'], + 'PATH' : os.environ['PATH'], 'LD_LIBRARY_PATH' : os.environ.get("LD_LIBRARY_PATH", ""), @@ -94,6 +112,7 @@ env_ENV = { } + if "MSVC_VERSION" in ARGUMENTS : - env = Environment(ENV = env_ENV, variables = vars, MSVC_VERSION = ARGUMENTS["MSVC_VERSION"]) + env = Environment(ENV = env_ENV, variables = vars, MSVC_VERSION = ARGUMENTS["MSVC_VERSION"], platform = ARGUMENTS.get("PLATFORM", None)) else : - env = Environment(ENV = env_ENV, variables = vars) + env = Environment(ENV = env_ENV, variables = vars, platform = ARGUMENTS.get("PLATFORM", None)) @@ -126,3 +145,3 @@ if env["PLATFORM"] == "win32" : if "TMP" in os.environ.keys() : - env['ENV']['TMP'] = os.environ['TMP'] + env['ENV']['TMP'] = os.environ['TMP'] env.Tool("SLOCCount", toolpath = ["#/BuildTools/SCons/Tools"]) @@ -173,2 +192,5 @@ if "cxx" in env : env["CXX"] = env["cxx"] +if "ar" in env : + env["AR"] = env["ar"] + if "link" in env : @@ -215,9 +237,9 @@ if env.get("universal", 0) : env.Append(CCFLAGS = [ - "-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk", - "-arch", "i386", + "-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk", + "-arch", "i386", "-arch", "ppc"]) env.Append(LINKFLAGS = [ - "-mmacosx-version-min=10.4", - "-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk", - "-arch", "i386", + "-mmacosx-version-min=10.4", + "-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk", + "-arch", "i386", "-arch", "ppc"]) @@ -230,7 +252,7 @@ if env.get("mac105", 0) : env.Append(CCFLAGS = [ - "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk", + "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk", "-arch", "i386"]) env.Append(LINKFLAGS = [ - "-mmacosx-version-min=10.5", - "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk", + "-mmacosx-version-min=10.5", + "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk", "-arch", "i386"]) @@ -239,7 +261,7 @@ if env.get("mac106", 0) : env.Append(CCFLAGS = [ - "-isysroot", "/Developer/SDKs/MacOSX10.6.sdk", + "-isysroot", "/Developer/SDKs/MacOSX10.6.sdk", "-arch", "i386"]) env.Append(LINKFLAGS = [ - "-mmacosx-version-min=10.6", - "-isysroot", "/Developer/SDKs/MacOSX10.6.sdk", + "-mmacosx-version-min=10.6", + "-isysroot", "/Developer/SDKs/MacOSX10.6.sdk", "-arch", "i386"]) @@ -263,2 +285,9 @@ if env["PLATFORM"] == "win32" : env.Append(CXXFLAGS = ["/wd4068"]) +elif env["PLATFORM"] == "hpux" : + # HP-UX gives a flood of minor warnings if this is enabled + #env.Append(CXXFLAGS = ["+w"]) + pass +elif env["PLATFORM"] == "sunos" : + #env.Append(CXXFLAGS = ["-z verbose"]) + pass else : @@ -300,4 +329,7 @@ if env["PLATFORM"] == "win32" : if int(env["MSVS_VERSION"].split(".")[0]) < 10 : - env["LINKCOM"] = [env["LINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1'] - env["SHLINKCOM"] = [env["SHLINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2'] + mt = env.get('mt') + if not mt: + mt = 'mt.exe' + env["LINKCOM"] = [env["LINKCOM"], '%s -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1' % mt] + env["SHLINKCOM"] = [env["SHLINKCOM"], '%s -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2' % mt] @@ -306,2 +338,9 @@ if env["PLATFORM"] == "darwin" and not env["target"] in ["iphone-device", "iphon +# Required by boost headers on HP-UX +if env["PLATFORM"] == "hpux" : + env.Append(CXXFLAGS = ["+hpxstd98", "-mt", "-AA"]) + # FIXME: Need -AA for linking C++ but not C + #env.Append(LINKFLAGS = ["-AA"]) + + # Testing @@ -369,3 +408,3 @@ if target in ["iphone-device", "iphone-simulator", "xcode"] : # Bit of a hack, because BOOST doesn't know the endianness for ARM - env.Append(CPPDEFINES = ["_LITTLE_ENDIAN"]) + env.Append(CPPDEFINES = ["_LITTLE_ENDIAN"]) diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 25a1ad3..7bda9c1 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -13,3 +13,3 @@ def SConscript(*arguments, **keywords) : env.SConscript = SConscript - + ################################################################################ @@ -113,4 +113,23 @@ if not conf.CheckCXX() or not conf.CheckCC() : env["HAVE_ZLIB"] = True -if conf.CheckLib("z") : - env["ZLIB_FLAGS"] = {"LIBS": ["z"]} +zlib_flags = {} +zlib_okay = False +if env.get("zlib_libdir", None) : + zlib_flags["LIBPATH"] = [env["zlib_libdir"]] + zlib_okay = True +if env.get("zlib_includedir", None) : + zlib_flags["CPPPATH"] = [env["zlib_includedir"]] + zlib_okay = True +if env.get("zlib_libfile", None) : + zlib_flags["LIBS"] = [File(env["zlib_libfile"])] + zlib_okay = True +elif zlib_okay : + zlib_flags["LIBS"] = ["z"] +if (not zlib_okay) and conf.CheckLib("z") : + zlib_flags["LIBS"] = ["z"] + zlib_okay = True +if zlib_okay : + env["ZLIB_FLAGS"] = zlib_flags +elif not env.get("zlib_bundled_enable", True) : + print "Error: Zlib not found and zlib_bundled_enable is false" + Exit(1) else : @@ -134,5 +153,6 @@ if conf.CheckLib("c") : -if conf.CheckLib("stdc++") : - env["PLATFORM_FLAGS"]["LIBS"] = env["PLATFORM_FLAGS"].get("LIBS", []) + ["stdc++"] - +# Even if you find stdc++ on HP-UX, it is the wrong one for aCC +if env["PLATFORM"] != "hpux" : + if conf.CheckLib("stdc++", language='CXX') : + env["PLATFORM_FLAGS"]["LIBS"] = env["PLATFORM_FLAGS"].get("LIBS", []) + ["stdc++"] conf.Finish() @@ -145,3 +165,3 @@ if env.get("boost_libdir", None) : if env.get("boost_includedir", None) : - if env["PLATFORM"] == "win32" : + if env["PLATFORM"] == "win32" or env["PLATFORM"] == "hpux" or env["PLATFORM"] == "sunos" : boost_flags["CPPPATH"] = [env["boost_includedir"]] @@ -153,3 +173,3 @@ boost_conf_env.MergeFlags(boost_flags) conf = Configure(boost_conf_env) -boostLibs = [("signals", None), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("serialization", "archive/text_oarchive.hpp"), ("system", "system/system_error.hpp"), ("date_time", "date_time/date.hpp")] +boostLibs = [("signals", None), ("system", "system/system_error.hpp"), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("serialization", "archive/text_oarchive.hpp"), ("date_time", "date_time/date.hpp")] allLibsPresent = True @@ -166,5 +186,5 @@ for (lib, header) in boostLibs : libName = "boost_" + lib - if not conf.CheckLib(libName) : + if not conf.CheckLib(libName, language='CXX') : libName += "-mt" - if not conf.CheckLib(libName) : + if not conf.CheckLib(libName, language='CXX') : allLibsPresent = False @@ -179,3 +199,6 @@ if allLibsPresent : env["BOOST_BUNDLED_UUID_ONLY"] = True - env["BOOST_FLAGS"]["CPPDEFINES"] = ["BOOST_SIGNALS_NO_DEPRECATION_WARNING"] + env["BOOST_FLAGS"]["CPPDEFINES"] = ["BOOST_SIGNALS_NO_DEPRECATION_WARNING"] +elif not env.get("boost_bundled_enable", True) : + print "Error: Boost not found and boost_bundled_enable is false" + Exit(1) else : @@ -202,3 +225,3 @@ if env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" : env["HAVE_GCONF"] = 0 -if env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" : +if env.get("try_gconf", True) and env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" : gconf_env = conf_env.Clone() @@ -263,3 +286,3 @@ if env["PLATFORM"] == "win32" : conf = Configure(conf_env, custom_tests = {"CheckVersion": CheckVersion}) -if conf.CheckCHeader("libxml/parser.h") and conf.CheckLib("xml2") : +if env.get("try_libxml", True) and conf.CheckCHeader("libxml/parser.h") and conf.CheckLib("xml2") : #and conf.CheckVersion("LibXML", "2.6.23", "LIBXML_VERSION", "libxml/xmlversion.h", 20623) : @@ -269,3 +292,3 @@ conf.Finish() -if not env.get("HAVE_LIBXML", 0) : +if env.get("try_libxml", True) and not env.get("HAVE_LIBXML", 0) : libxml_env = conf_env.Clone() @@ -280,3 +303,3 @@ if not env.get("HAVE_LIBXML", 0) : # Expat -if not env.get("HAVE_LIBXML",0) : +if env.get("try_expat", True) and not env.get("HAVE_LIBXML",0) : expat_conf_env = conf_env.Clone() @@ -310,3 +333,5 @@ icu_env = conf_env.Clone() use_icu = bool(env["icu"]) -icu_prefix = env["icu"] if isinstance(env["icu"], str) else "" +icu_prefix = "" +if isinstance(env["icu"], str) : + icu_prefix = env["icu"] icu_flags = {} @@ -333,3 +358,3 @@ libidn_conf_env.MergeFlags(libidn_flags) conf = Configure(libidn_conf_env) -if not env.get("HAVE_ICU") and conf.CheckCHeader("idna.h") and conf.CheckLib(env["libidn_libname"]) : +if env.get("try_libidn", True) and not env.get("HAVE_ICU") and conf.CheckCHeader("idna.h") and conf.CheckLib(env["libidn_libname"]) : env["HAVE_LIBIDN"] = 1 @@ -341,4 +366,8 @@ conf.Finish() if not env.get("HAVE_ICU", False) and not env.get("HAVE_LIBIDN", False) : - env["HAVE_LIBIDN"] = 1 - env["LIBIDN_BUNDLED"] = 1 + if env.get("libidn_bundled_enable", True) : + env["HAVE_LIBIDN"] = 1 + env["LIBIDN_BUNDLED"] = 1 + else : + print "Error: ICU and LIBIDN not found, and libidn_bundled_enable is false" + Exit(1) @@ -461,3 +490,3 @@ avahi_conf_env.MergeFlags(avahi_flags) conf = Configure(avahi_conf_env) -if conf.CheckCHeader("avahi-client/client.h") and conf.CheckLib("avahi-client") and conf.CheckLib("avahi-common") : +if env.get("try_avahi", True) and conf.CheckCHeader("avahi-client/client.h") and conf.CheckLib("avahi-client") and conf.CheckLib("avahi-common") : env["HAVE_AVAHI"] = True @@ -478,7 +507,17 @@ else : use_openssl = bool(env["openssl"]) - openssl_prefix = env["openssl"] if isinstance(env["openssl"], str) else "" + openssl_prefix = "" + if isinstance(env["openssl"], str) : + openssl_prefix = env["openssl"] openssl_flags = {} if openssl_prefix : - openssl_flags = { "CPPPATH": [os.path.join(openssl_prefix, "include")] } - if env["PLATFORM"] == "win32" : + openssl_include = env.get("openssl_include", None) + openssl_libdir = env.get("openssl_libdir", None) + if openssl_include: + openssl_flags = {"CPPPATH":[openssl_include]} + else: + openssl_flags = { "CPPPATH": [os.path.join(openssl_prefix, "include")] } + if openssl_libdir: + openssl_flags["LIBPATH"] = [openssl_libdir] + env["OPENSSL_DIR"] = openssl_prefix + elif env["PLATFORM"] == "win32" : openssl_flags["LIBPATH"] = [os.path.join(openssl_prefix, "lib", "VC")] @@ -493,3 +532,6 @@ else : env["OPENSSL_FLAGS"] = openssl_flags - if env["PLATFORM"] == "win32" : + openssl_libnames = env.get("openssl_libnames", None) + if openssl_libnames: + env["OPENSSL_FLAGS"]["LIBS"] = openssl_libnames.split(',') + elif env["PLATFORM"] == "win32" : env["OPENSSL_FLAGS"]["LIBS"] = ["libeay32MD", "ssleay32MD"] @@ -502,3 +544,3 @@ else : env["OPENSSL_FLAGS"] = {} - if env["PLATFORM"] == "win32" : + if env["PLATFORM"] == "win32" : env["HAVE_SCHANNEL"] = True @@ -532,3 +574,3 @@ elif env.get("bonjour", False) : bonjour_flags = {} - if env.get("bonjour") != True : + if env.get("bonjour") != True : bonjour_prefix = env["bonjour"] @@ -574,3 +616,3 @@ try: if env.Dir("#/.git").exists() : - if not env.GetOption("clean") : + if not env.GetOption("clean") and env.get("install_git_hooks", True) : env.Install("#/.git/hooks", Glob("#/BuildTools/Git/Hooks/*")) @@ -668,4 +710,4 @@ print " XML Parsers: " + ' '.join(parsers) -print " TLS Support: " + ("OpenSSL" if env.get("HAVE_OPENSSL",0) else ("Schannel" if env.get("HAVE_SCHANNEL", 0) else "Disabled")) -print " DNSSD Support: " + ("Bonjour" if env.get("HAVE_BONJOUR") else ("Avahi" if env.get("HAVE_AVAHI") else "Disabled")) +print " TLS Support: " + (env.get("HAVE_OPENSSL",0) and "OpenSSL" or env.get("HAVE_SCHANNEL", 0) and "Schannel" or "Disabled") +print " DNSSD Support: " + (env.get("HAVE_BONJOUR") and "Bonjour" or (env.get("HAVE_AVAHI") and "Avahi" or "Disabled")) print diff --git a/BuildTools/SCons/Tools/Test.py b/BuildTools/SCons/Tools/Test.py index 95fcce9..7e4609d 100644 --- a/BuildTools/SCons/Tools/Test.py +++ b/BuildTools/SCons/Tools/Test.py @@ -5,3 +5,6 @@ def generate(env) : if env["TEST_TYPE"] == "all" or env["TEST_TYPE"] == type : - cmd = target[0].abspath if SCons.Util.is_List(target) else target.abspath + if SCons.Util.is_List(target) : + cmd = target[0].abspath + else : + cmd = target.abspath params = "" @@ -11,3 +14,3 @@ def generate(env) : params = " --xml > " + os.path.join(target[0].dir.path, "checker-report.xml") - + ignore_prefix = "" @@ -35,6 +38,6 @@ def generate(env) : ["adb shell mount -o rw,remount /system", - "adb push " + cmd + " /system/bin/" + exec_name, + "adb push " + cmd + " /system/bin/" + exec_name, "adb shell SWIFT_CLIENTTEST_JID=\"" + os.getenv("SWIFT_CLIENTTEST_JID") + "\" SWIFT_CLIENTTEST_PASS=\"" + os.getenv("SWIFT_CLIENTTEST_PASS") + "\" " + env.get("TEST_RUNNER", "") + "/system/bin/" + exec_name], cmdstr = "$TESTCOMSTR")) else : - test_env.Command("**dummy**", target, + test_env.Command("**dummy**", target, SCons.Action.Action(ignore_prefix + env.get("TEST_RUNNER", "") + cmd + " " + params, cmdstr = "$TESTCOMSTR")) diff --git a/BuildTools/SCons/Version.py b/BuildTools/SCons/Version.py index f98a8b9..2f3b5a5 100644 --- a/BuildTools/SCons/Version.py +++ b/BuildTools/SCons/Version.py @@ -12,3 +12,3 @@ def getGitBuildVersion(root, project) : return None - + def git(cmd, root) : @@ -21,3 +21,5 @@ def git(cmd, root) : p.stdin.close() - return gitVersion if p.wait() == 0 else None + if p.wait() == 0 : + return gitVersion + return None @@ -31,3 +33,3 @@ def getBuildVersion(root, project) : - gitVersion = getGitBuildVersion(root, project) + gitVersion = getGitBuildVersion(root, project) if gitVersion : @@ -61,3 +63,3 @@ def convertToWindowsVersion(version) : if len(build_string) > 0 : - build_match = re.match("^-dev(\d+)", build_string) + build_match = re.match("^-dev(\d+)", build_string) if build_match : @@ -66,2 +68 @@ def convertToWindowsVersion(version) : return (major, minor, patch) - diff --git a/COPYING.thirdparty b/COPYING.thirdparty index a4b505c..c2c01f7 100644 --- a/COPYING.thirdparty +++ b/COPYING.thirdparty @@ -130,2 +130,35 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +Solaris builds compile Swiften/Network/SolarisNetworkEnvironment.cpp +which incorporates getifaddrs() code under the following license: + +--- START OF SOLARIS getifaddrs() LICENSE + +Copyright (c) 2006 WIDE Project. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +--- END OF SOLARIS getifaddrs() LICENSE + @@ -405,3 +438,3 @@ writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's diff --git a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript index 24ebd60..5d27b70 100644 --- a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript +++ b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript @@ -23,2 +23,6 @@ if env["PLATFORM"] == "win32" : cpp0x = True +elif env["PLATFORM"] == "hpux" : + pass +elif env["PLATFORM"] == "sunos" : + pass else : diff --git a/Documentation/SwiftenDevelopersGuide/SConscript b/Documentation/SwiftenDevelopersGuide/SConscript index c50641f..ba0eb0b 100644 --- a/Documentation/SwiftenDevelopersGuide/SConscript +++ b/Documentation/SwiftenDevelopersGuide/SConscript @@ -36,5 +36,7 @@ def generateDocBookCode(env, target, source) : newProgramLines.append(line) - callouts = "<calloutlist>" + "\n".join(calloutLines) + "</calloutlist>" if len(calloutLines) > 0 else "" + callouts = "" + if len(calloutLines) > 0 : + callouts = "<calloutlist>" + "\n".join(calloutLines) + "</calloutlist>" return ("\n".join(newProgramLines), callouts) - + # Parse program diff --git a/QA/Checker/SConscript b/QA/Checker/SConscript index d180af2..b0863da 100644 --- a/QA/Checker/SConscript +++ b/QA/Checker/SConscript @@ -4,3 +4,3 @@ if env["TEST"] : if env["SCONS_STAGE"] == "flags" : - env["CHECKER_FLAGS"] = { + env["CHECKER_FLAGS"] = { "CPPPATH" : ["#/3rdParty/HippoMocks"], @@ -8,3 +8,3 @@ if env["TEST"] : "LIBPATH": [Dir(".")], - "LINKFLAGS": ["/SUBSYSTEM:CONSOLE"] if env["PLATFORM"] == "win32" else [] + "LINKFLAGS": env["PLATFORM"] == "win32" and ["/SUBSYSTEM:CONSOLE"] or [] } diff --git a/Slimber/SConscript b/Slimber/SConscript index 2298b0a..ff4f57d 100644 --- a/Slimber/SConscript +++ b/Slimber/SConscript @@ -1,2 +1,2 @@ -import datetime +import datetime @@ -15,2 +15,6 @@ if not "Slimber" in env["PROJECTS"] and env["SCONS_STAGE"] == "flags" : +if not env.get("HAVE_QT", False) and "Slimber" in env["PROJECTS"] : + print "Qt missing. Not building Slimber." + env["PROJECTS"].remove("Slimber") + if "Slimber" in env["PROJECTS"] : @@ -47,3 +51,3 @@ if "Slimber" in env["PROJECTS"] : - + env["SLIMBER_VERSION"] = "0.9.9." + datetime.date.today().strftime("%Y%m%d") diff --git a/SwifTools/Application/UnixApplicationPathProvider.cpp b/SwifTools/Application/UnixApplicationPathProvider.cpp index 784256f..6af9b24 100644 --- a/SwifTools/Application/UnixApplicationPathProvider.cpp +++ b/SwifTools/Application/UnixApplicationPathProvider.cpp @@ -8,2 +8,3 @@ +#include <stdlib.h> #include <unistd.h> @@ -46,4 +47,4 @@ boost::filesystem::path UnixApplicationPathProvider::getDataDir() const { - boost::filesystem::path dataPath = (dataDir.empty() ? - getHomeDir() / ".local" / "share" + boost::filesystem::path dataPath = (dataDir.empty() ? + getHomeDir() / ".local" / "share" : boost::filesystem::path(dataDir)) / boost::to_lower_copy(getApplicationName()); diff --git a/Swiften/Client/XMLBeautifier.h b/Swiften/Client/XMLBeautifier.h index 44dfd20..25ecd18 100644 --- a/Swiften/Client/XMLBeautifier.h +++ b/Swiften/Client/XMLBeautifier.h @@ -6,4 +6,11 @@ +/* +* Copyright (c) 2014 Remko Tronçon and Kevin Smith +* Licensed under the GNU General Public License v3. +* See Documentation/Licenses/GPLv3.txt for more information. +*/ + #pragma once +#include <sstream> #include <string> diff --git a/Swiften/EventLoop/EventLoop.h b/Swiften/EventLoop/EventLoop.h index 587ba22..79ade49 100644 --- a/Swiften/EventLoop/EventLoop.h +++ b/Swiften/EventLoop/EventLoop.h @@ -9,3 +9,3 @@ #include <boost/function.hpp> -#include <boost/thread/mutex.hpp> +#include <boost/thread.hpp> #include <list> @@ -23,3 +23,3 @@ namespace Swift { virtual ~EventLoop(); - + void postEvent(boost::function<void ()> event, boost::shared_ptr<EventOwner> owner = boost::shared_ptr<EventOwner>()); @@ -33,3 +33,3 @@ namespace Swift { virtual void post(const Event& event) = 0; - + void handleEvent(const Event& event); diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h index 1bec5f7..45628e2 100644 --- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h +++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h @@ -1,3 +1,3 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2014 Remko Tronçon * Licensed under the GNU General Public License v3. @@ -8,7 +8,9 @@ -#include <Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.h> -#include <Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h> +#include <boost/numeric/conversion/cast.hpp> +#include <boost/thread.hpp> + #include <Swiften/Base/ByteArray.h> #include <Swiften/EventLoop/EventLoop.h> -#include <boost/numeric/conversion/cast.hpp> +#include <Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.h> +#include <Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h> @@ -18,7 +20,7 @@ namespace Swift { class BonjourRegisterQuery : public DNSSDRegisterQuery, public BonjourQuery { - public: + public: BonjourRegisterQuery(const std::string& name, int port, const ByteArray& txtRecord, boost::shared_ptr<BonjourQuerier> querier, EventLoop* eventLoop) : BonjourQuery(querier, eventLoop) { DNSServiceErrorType result = DNSServiceRegister( - &sdRef, 0, 0, name.c_str(), "_presence._tcp", NULL, NULL, boost::numeric_cast<unsigned short>(port), - boost::numeric_cast<unsigned short>(txtRecord.size()), vecptr(txtRecord), + &sdRef, 0, 0, name.c_str(), "_presence._tcp", NULL, NULL, boost::numeric_cast<unsigned short>(port), + boost::numeric_cast<unsigned short>(txtRecord.size()), vecptr(txtRecord), &BonjourRegisterQuery::handleServiceRegisteredStatic, this); diff --git a/Swiften/Network/PlatformNetworkEnvironment.h b/Swiften/Network/PlatformNetworkEnvironment.h index c6b945e..2092bfd 100644 --- a/Swiften/Network/PlatformNetworkEnvironment.h +++ b/Swiften/Network/PlatformNetworkEnvironment.h @@ -20,2 +20,8 @@ namespace Swift { } +#elif defined(SWIFTEN_PLATFORM_SOLARIS) +#include <Swiften/Network/SolarisNetworkEnvironment.h> +namespace Swift { + typedef SolarisNetworkEnvironment PlatformNetworkEnvironment; +} + #else diff --git a/Swiften/Network/SConscript b/Swiften/Network/SConscript index fcc66b4..284c1f4 100644 --- a/Swiften/Network/SConscript +++ b/Swiften/Network/SConscript @@ -72,2 +72,6 @@ elif myenv["PLATFORM"] == "win32" : sourceList += [ "WindowsNetworkEnvironment.cpp" ] +elif myenv["PLATFORM"] == "sunos" : + sourceList += [ "UnixProxyProvider.cpp" ] + sourceList += [ "SolarisNetworkEnvironment.cpp" ] + sourceList += [ "EnvironmentProxyProvider.cpp" ] else : @@ -83,6 +87,6 @@ objects = myenv.SwiftenObject(sourceList) -if myenv["experimental_ft"] : +if myenv["experimental_ft"] : # LibNATPMP classes if myenv.get("HAVE_LIBNATPMP", False) : - natpmp_env = myenv.Clone() + natpmp_env = myenv.Clone() natpmp_env.Append(CPPDEFINES = natpmp_env["LIBNATPMP_FLAGS"].get("INTERNAL_CPPDEFINES", [])) diff --git a/Swiften/Network/SolarisNetworkEnvironment.cpp b/Swiften/Network/SolarisNetworkEnvironment.cpp new file mode 100644 index 0000000..93eec32 --- /dev/null +++ b/Swiften/Network/SolarisNetworkEnvironment.cpp @@ -0,0 +1,292 @@ +/* + * Copyright (c) 2011 Tobias Markmann + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +/* +* Copyright (c) 2013-2014 Remko Tronçon and Kevin Smith +* Licensed under the GNU General Public License v3. +* See Documentation/Licenses/GPLv3.txt for more information. +*/ + +#include <Swiften/Network/SolarisNetworkEnvironment.h> + +#include <string> +#include <vector> +#include <map> +#include <boost/optional.hpp> + +#include <unistd.h> +#include <stdlib.h> +#include <errno.h> +#include <string.h> +#include <sys/sockio.h> +#include <sys/socket.h> +#include <sys/types.h> +#include <net/if.h> + +#include <Swiften/Base/boost_bsignals.h> +#include <Swiften/Network/HostAddress.h> +#include <Swiften/Network/NetworkInterface.h> + +/* + * Copyright (c) 2006 WIDE Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#undef ifa_broadaddr +#undef ifa_dstaddr +struct ifaddrs { + struct ifaddrs *ifa_next; /* Pointer to next struct */ + char *ifa_name; /* Interface name */ + uint64_t ifa_flags; /* Interface flags */ + struct sockaddr *ifa_addr; /* Interface address */ + struct sockaddr *ifa_netmask; /* Interface netmask */ + struct sockaddr *ifa_dstaddr; /* P2P interface destination */ +}; +#define ifa_broadaddr ifa_dstaddr + +static int +get_lifreq(int fd, struct lifreq **ifr_ret) +{ + struct lifnum lifn; + struct lifconf lifc; + struct lifreq *lifrp; + + lifn.lifn_family = AF_UNSPEC; + lifn.lifn_flags = 0; + if (ioctl(fd, SIOCGLIFNUM, &lifn) == -1) + lifn.lifn_count = 16; + else + lifn.lifn_count += 16; + + for (;;) { + lifc.lifc_len = lifn.lifn_count * sizeof (*lifrp); + lifrp = (struct lifreq *) malloc(lifc.lifc_len); + if (lifrp == NULL) + return (-1); + + lifc.lifc_family = AF_UNSPEC; + lifc.lifc_flags = 0; + lifc.lifc_buf = (char *)lifrp; + if (ioctl(fd, SIOCGLIFCONF, &lifc) == -1) { + free(lifrp); + if (errno == EINVAL) { + lifn.lifn_count <<= 1; + continue; + } + (void) close(fd); + return (-1); + } + if (lifc.lifc_len < (lifn.lifn_count - 1) * sizeof (*lifrp)) + break; + free(lifrp); + lifn.lifn_count <<= 1; + } + (void) close(fd); + + *ifr_ret = lifrp; + + return (lifc.lifc_len / sizeof (*lifrp)); +} + +static size_t +nbytes(const struct lifreq *lifrp, int nlif, size_t socklen) +{ + size_t len = 0; + size_t slen; + + while (nlif > 0) { + slen = strlen(lifrp->lifr_name) + 1; + len += sizeof (struct ifaddrs) + ((slen + 3) & ~3); + len += 3 * socklen; + lifrp++; + nlif--; + } + return (len); +} + +static struct sockaddr * +addrcpy(struct sockaddr_storage *addr, char **bufp) +{ + char *buf = *bufp; + size_t len; + + len = addr->ss_family == AF_INET ? sizeof (struct sockaddr_in) : + sizeof (struct sockaddr_in6); + (void) memcpy(buf, addr, len); + *bufp = buf + len; + return ((struct sockaddr *)buf); +} + +static int +populate(struct ifaddrs *ifa, int fd, struct lifreq *lifrp, int nlif, int af, + char **bufp) +{ + char *buf = *bufp; + size_t slen; + + while (nlif > 0) { + ifa->ifa_next = (nlif > 1) ? ifa + 1 : NULL; + (void) strcpy(ifa->ifa_name = buf, lifrp->lifr_name); + slen = strlen(lifrp->lifr_name) + 1; + buf += (slen + 3) & ~3; + if (ioctl(fd, SIOCGLIFFLAGS, lifrp) == -1) + ifa->ifa_flags = 0; + else + ifa->ifa_flags = lifrp->lifr_flags; + if (ioctl(fd, SIOCGLIFADDR, lifrp) == -1) + ifa->ifa_addr = NULL; + else + ifa->ifa_addr = addrcpy(&lifrp->lifr_addr, &buf); + if (ioctl(fd, SIOCGLIFNETMASK, lifrp) == -1) + ifa->ifa_netmask = NULL; + else + ifa->ifa_netmask = addrcpy(&lifrp->lifr_addr, &buf); + if (ifa->ifa_flags & IFF_POINTOPOINT) { + if (ioctl(fd, SIOCGLIFDSTADDR, lifrp) == -1) + ifa->ifa_dstaddr = NULL; + else + ifa->ifa_dstaddr = + addrcpy(&lifrp->lifr_dstaddr, &buf); + } else if (ifa->ifa_flags & IFF_BROADCAST) { + if (ioctl(fd, SIOCGLIFBRDADDR, lifrp) == -1) + ifa->ifa_broadaddr = NULL; + else + ifa->ifa_broadaddr = + addrcpy(&lifrp->lifr_broadaddr, &buf); + } else { + ifa->ifa_dstaddr = NULL; + } + + ifa++; + nlif--; + lifrp++; + } + *bufp = buf; + return (0); +} + +static int +getifaddrs(struct ifaddrs **ifap) +{ + int fd4, fd6; + int nif4, nif6 = 0; + struct lifreq *ifr4 = NULL; + struct lifreq *ifr6 = NULL; + struct ifaddrs *ifa = NULL; + char *buf; + + if ((fd4 = socket(AF_INET, SOCK_DGRAM, 0)) == -1) + return (-1); + if ((fd6 = socket(AF_INET6, SOCK_DGRAM, 0)) == -1 && + errno != EAFNOSUPPORT) { + (void) close(fd4); + return (-1); + } + + if ((nif4 = get_lifreq(fd4, &ifr4)) == -1 || + (fd6 != -1 && (nif6 = get_lifreq(fd6, &ifr6)) == -1)) + goto failure; + + if (nif4 == 0 && nif6 == 0) { + *ifap = NULL; + return (0); + } + + ifa = (struct ifaddrs *) malloc(nbytes(ifr4, nif4, sizeof (struct sockaddr_in)) + + nbytes(ifr6, nif6, sizeof (struct sockaddr_in6))); + if (ifa == NULL) + goto failure; + + buf = (char *)(ifa + nif4 + nif6); + + if (populate(ifa, fd4, ifr4, nif4, AF_INET, &buf) == -1) + goto failure; + if (nif4 > 0 && nif6 > 0) + ifa[nif4 - 1].ifa_next = ifa + nif4; + if (populate(ifa + nif4, fd6, ifr6, nif6, AF_INET6, &buf) == -1) + goto failure; + + return (0); + +failure: + free(ifa); + (void) close(fd4); + if (fd6 != -1) + (void) close(fd6); + free(ifr4); + free(ifr6); + return (-1); +} + +static void +freeifaddrs(struct ifaddrs *ifa) +{ + free(ifa); +} + +/* End WIDE Project code */ + +namespace Swift { + +std::vector<NetworkInterface> SolarisNetworkEnvironment::getNetworkInterfaces() const { + std::map<std::string, NetworkInterface> interfaces; + + ifaddrs* addrs = 0; + int ret = getifaddrs(&addrs); + if (ret != 0) { + return std::vector<NetworkInterface>(); + } + + for (ifaddrs* a = addrs; a != 0; a = a->ifa_next) { + std::string name(a->ifa_name); + boost::optional<HostAddress> address; + if (a->ifa_addr->sa_family == PF_INET) { + sockaddr_in* sa = reinterpret_cast<sockaddr_in*>(a->ifa_addr); + address = HostAddress(reinterpret_cast<const unsigned char*>(&(sa->sin_addr)), 4); + } + else if (a->ifa_addr->sa_family == PF_INET6) { + sockaddr_in6* sa = reinterpret_cast<sockaddr_in6*>(a->ifa_addr); + address = HostAddress(reinterpret_cast<const unsigned char*>(&(sa->sin6_addr)), 16); + } + if (address) { + std::map<std::string, NetworkInterface>::iterator i = interfaces.insert(std::make_pair(name, NetworkInterface(name, a->ifa_flags & IFF_LOOPBACK))).first; + i->second.addAddress(*address); + } + } + + freeifaddrs(addrs); + + std::vector<NetworkInterface> result; + for (std::map<std::string,NetworkInterface>::const_iterator i = interfaces.begin(); i != interfaces.end(); ++i) { + result.push_back(i->second); + } + return result; +} + +} diff --git a/Swiften/Network/SolarisNetworkEnvironment.h b/Swiften/Network/SolarisNetworkEnvironment.h new file mode 100644 index 0000000..7481ff4 --- /dev/null +++ b/Swiften/Network/SolarisNetworkEnvironment.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2011 Tobias Markmann + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +/* +* Copyright (c) 2013-2014 Remko Tronçon and Kevin Smith +* Licensed under the GNU General Public License v3. +* See Documentation/Licenses/GPLv3.txt for more information. +*/ + +#pragma once + +#include <vector> + +#include <Swiften/Base/boost_bsignals.h> + +#include <Swiften/Network/NetworkEnvironment.h> +#include <Swiften/Network/NetworkInterface.h> + +namespace Swift { + + class SolarisNetworkEnvironment : public NetworkEnvironment { + public: + std::vector<NetworkInterface> getNetworkInterfaces() const; + }; + +} diff --git a/Swiften/Parser/PayloadParserFactoryCollection.cpp b/Swiften/Parser/PayloadParserFactoryCollection.cpp index e3efc3d..269ac3d 100644 --- a/Swiften/Parser/PayloadParserFactoryCollection.cpp +++ b/Swiften/Parser/PayloadParserFactoryCollection.cpp @@ -1,3 +1,3 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2014 Remko Tronçon * Licensed under the GNU General Public License v3. @@ -22,3 +22,3 @@ void PayloadParserFactoryCollection::addFactory(PayloadParserFactory* factory) { void PayloadParserFactoryCollection::removeFactory(PayloadParserFactory* factory) { - factories_.erase(remove(factories_.begin(), factories_.end(), factory), factories_.end()); + factories_.erase(std::remove(factories_.begin(), factories_.end(), factory), factories_.end()); } @@ -31,3 +31,3 @@ PayloadParserFactory* PayloadParserFactoryCollection::getPayloadParserFactory(co std::vector<PayloadParserFactory*>::reverse_iterator i = std::find_if( - factories_.rbegin(), factories_.rend(), + factories_.rbegin(), factories_.rend(), boost::bind(&PayloadParserFactory::canParse, _1, element, ns, attributes)); diff --git a/Swiften/Roster/XMPPRosterImpl.h b/Swiften/Roster/XMPPRosterImpl.h index 8c8cf3e..96da1f3 100644 --- a/Swiften/Roster/XMPPRosterImpl.h +++ b/Swiften/Roster/XMPPRosterImpl.h @@ -19,3 +19,3 @@ namespace Swift { - void addContact(const JID& jid, const std::string& name, const std::vector<std::string>& groups, const RosterItemPayload::Subscription subscription); + void addContact(const JID& jid, const std::string& name, const std::vector<std::string>& groups, RosterItemPayload::Subscription subscription); void removeContact(const JID& jid); diff --git a/Swiften/Serializer/PayloadSerializerCollection.cpp b/Swiften/Serializer/PayloadSerializerCollection.cpp index ab2b4f4..0db89a9 100644 --- a/Swiften/Serializer/PayloadSerializerCollection.cpp +++ b/Swiften/Serializer/PayloadSerializerCollection.cpp @@ -1,3 +1,3 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2014 Remko Tronçon * Licensed under the GNU General Public License v3. @@ -22,3 +22,3 @@ void PayloadSerializerCollection::addSerializer(PayloadSerializer* serializer) { void PayloadSerializerCollection::removeSerializer(PayloadSerializer* serializer) { - serializers_.erase(remove(serializers_.begin(), serializers_.end(), serializer), serializers_.end()); + serializers_.erase(std::remove(serializers_.begin(), serializers_.end(), serializer), serializers_.end()); } @@ -27,3 +27,3 @@ PayloadSerializer* PayloadSerializerCollection::getPayloadSerializer(boost::shar std::vector<PayloadSerializer*>::const_iterator i = std::find_if( - serializers_.begin(), serializers_.end(), + serializers_.begin(), serializers_.end(), boost::bind(&PayloadSerializer::canSerialize, _1, payload)); diff --git a/Swiften/Session/BasicSessionStream.cpp b/Swiften/Session/BasicSessionStream.cpp index 7aaa5c2..5b4b7d5 100644 --- a/Swiften/Session/BasicSessionStream.cpp +++ b/Swiften/Session/BasicSessionStream.cpp @@ -23,13 +23,13 @@ namespace Swift { BasicSessionStream::BasicSessionStream( - StreamType streamType, - boost::shared_ptr<Connection> connection, - PayloadParserFactoryCollection* payloadParserFactories, - PayloadSerializerCollection* payloadSerializers, - TLSContextFactory* tlsContextFactory, + StreamType streamType, + boost::shared_ptr<Connection> connection, + PayloadParserFactoryCollection* payloadParserFactories, + PayloadSerializerCollection* payloadSerializers, + TLSContextFactory* tlsContextFactory, TimerFactory* timerFactory, XMLParserFactory* xmlParserFactory) : - available(false), - connection(connection), - tlsContextFactory(tlsContextFactory), - timerFactory(timerFactory), + available(false), + connection(connection), + tlsContextFactory(tlsContextFactory), + timerFactory(timerFactory), compressionLayer(NULL), @@ -56,3 +56,3 @@ BasicSessionStream::~BasicSessionStream() { if (tlsLayer) { - tlsLayer->onError.disconnect(boost::bind(&BasicSessionStream::handleTLSError, this)); + tlsLayer->onError.disconnect(boost::bind(&BasicSessionStream::handleTLSError, this, _1)); tlsLayer->onConnected.disconnect(boost::bind(&BasicSessionStream::handleTLSConnected, this)); |