Use int64_t instead of signed long int for 64-bit integer typedef On 32-bit architectures, longs are only 32 bits. The resulting overflow was causing an infinite loop in the 0602ResultantFanProjection test.
force LC_ALL=C when sorting output of test 0008 Order used by sort is locale-dependent. Also, remove 1st and last lines. It removes the lines containing `{` and `Q[a,b,c]` - monomials are still all present. Otherwise getting the orders to agree is a tough call.