twinaphex/genesis-next — comment on commit bce300cfdc1d18154544905d2f8fd934de1a55f4
File:  line 0
By ekeeke:

Ok, I think I know where the incompatibility comes from:

- stdlib.h includes sys/types.h which is declaring some typedef and especially uint as unsigned int

- uint is defined (using define, not typedef) as unsigned int in m68kcpu.h

- m68kcpu.c includes m68kcpu.h THEN m68kops.h, which itself includes stdlib.h

This causes an error as stdlib.h is included AFTER uint being defined as "unsigned int" since "typedef unsigned int unsigned int" is encountered out of precompiler processing.

In that case, moving include to stdlib.h at the start of m68kcpu.h should fix everything. Please tell me if this simple fix still work for all your compilers, it does for me with devkitppc and mingw