use platformed macros
gcc compilation fixes