jazzyb / libforchess

A chess engine for the "ultimate social game".
GNU General Public License v3.0
0 stars 0 forks source link

Cannot Build with --std=c89 on 32-bit Systems #9

Closed jazzyb closed 12 years ago

jazzyb commented 12 years ago

"gcc --std=c89" does not allow the ULL syntax to declare an unsigned long long constant. This feature was added with the C99 standard. I got around this originally by converting the UINT64_C(x) macro to "((uint64_t)x)". However, I only tested this on my 64-bit Mac OS X where longs (the default constant type) are 64 bits. When "make check" was run on a 32-bit Ubuntu box, the source files utilizing UINT64_C() failed to build.

I suggest that either we remove the C89 flag requirement for compilation or we convert all UINT64_C(x) to ((uint64_t) << 32) | ((uint64_t)) or some equivalent.

jazzyb commented 12 years ago

I elected to go with keeping the C89 flag requirement for portability. All UINT64_C() macros were converted to bitshifted versions as described above.