andigamesandmusic/belle

Error with UUID constructor for i386 arch

Opened this issue · 1 comments

Building with "-arch i386" (Mac OS X 10.6.8 / gcc 4.2.1) i get a bunch of errors like:

error: integer constant is too large for ‘long’ type

It can be fixed by adding ULL suffix such:

const UUID Node::Types::Generic(0x0123456789abcdefULL, 0x0123456789abcdefULL);
const UUID Crotchet = {0x3db18f8d2f7f3b79ULL, 0xaf034ac0daec6641ULL};

Instead of:

const UUID Node::Types::Generic(0x0123456789abcdef, 0x0123456789abcdef);
const UUID Crotchet = {0x3db18f8d2f7f3b79U, 0xaf034ac0daec6641U};

I guess that changing "Port.h / line 61" in MICA may avoid to manually edit them?

Good idea. Probably best would be to detect 32-bit vs. 64-bit and use the least long type that is 64-bit. long long technically isn't a type until C++11, so I was avoiding using it, but on i386 there is not much of a choice.