assert(!ms_singleton);\r
//use a cunning trick to get the singleton pointing to the start of the whole, rather than\r
//the start of the Singleton part of the object\r
- int offset = (int)(T*)1 - (int)(Singleton <T>*)(T*)1;\r
- ms_singleton = (T*)((int)this + offset);\r
+ // This used to say "int" instead of long, but that breaks\r
+ // on 64 bit linux at least\r
+ long offset = (long)(T*)1 - (long)(Singleton <T>*)(T*)1;\r
+ ms_singleton = (T*)((long)this + offset);\r
}\r
~Singleton()\r
{\r