[muscle] Patching MUSCLE to compile on AMD64
- From: Lior Okman <lior.okman@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: muscle@xxxxxxxxxxxxx
- Date: Sat, 28 Jan 2006 18:07:21 +0200
Hi,
Attached is a patch for making MUSCLE compile on AMD64.
After applying this patch MUSCLE compiles, but I'm afraid I haven't done
any real testing on the result (other than the most basic - it runs and
MUSCLE clients can connect and send basic messages).
Regards,
Lior
diff -Nur muscle/reflector/AbstractSessionIOPolicy.h
muscle_64/reflector/AbstractSessionIOPolicy.h
--- muscle/reflector/AbstractSessionIOPolicy.h 2005-01-01 03:03:21.000000000
+0200
+++ muscle_64/reflector/AbstractSessionIOPolicy.h 2006-01-28
17:38:17.000000000 +0200
@@ -31,7 +31,7 @@
bool IsAsInput() const {return _asInput;}
/** Returns a decent hash code for this object */
- uint32 HashCode() const {return ((uint32)_session)+(_asInput?1:0);}
+ uint32 HashCode() const {return ((uint64)_session)+(_asInput?1:0);}
/** Equality operator; returns true iff (rhs) has the same two settings as
we do */
bool operator == (const PolicyHolder & rhs) {return ((rhs._session ==
_session)&&(rhs._asInput == _asInput));}
diff -Nur muscle/util/Hashtable.h muscle_64/util/Hashtable.h
--- muscle/util/Hashtable.h 2006-01-08 04:29:44.000000000 +0200
+++ muscle_64/util/Hashtable.h 2006-01-28 17:37:32.000000000 +0200
@@ -27,7 +27,7 @@
{
public:
/** Default implementation just casts the key to a uint32 to get the hash
value. */
- uint32 operator () (const T x) const {return (uint32) x;}
+ uint32 operator () (const T x) const {return (uint64) x;}
};
template <class KeyType, class ValueType, class HashFunctorType> class
Hashtable; // forward declaration
diff -Nur muscle/util/RefCount.h muscle_64/util/RefCount.h
--- muscle/util/RefCount.h 2005-06-18 10:50:34.000000000 +0300
+++ muscle_64/util/RefCount.h 2006-01-28 17:59:55.000000000 +0200
@@ -305,7 +305,7 @@
class HashFunctor<Ref<Item> >
{
public:
- uint32 operator () (const Ref<Item> & ref) const {return (uint32) ref();}
+ uint64 operator () (const Ref<Item> & ref) const {return (uint64) ref();}
};
#endif
- Follow-Ups:
- [muscle] Re: Patching MUSCLE to compile on AMD64
- From: Jeremy Friesner
- [muscle] VS: Patching MUSCLE to compile on AMD64
- From: Mika Lindqvist
Other related posts:
- » [muscle] Patching MUSCLE to compile on AMD64
- » [muscle] Re: Patching MUSCLE to compile on AMD64
- » [muscle] Re: Patching MUSCLE to compile on AMD64
- [muscle] Re: Patching MUSCLE to compile on AMD64
- From: Jeremy Friesner
- [muscle] VS: Patching MUSCLE to compile on AMD64
- From: Mika Lindqvist