Not sure if that is the proper fix, but it does the trick for my toolchain.
An alternative might be to do s/WIN32/_WIN32/g, but I lack experience here.
Also fixed abs() redefinitions that conflicted with mingw's cmath.
if(WIN32)
add_definitions(-DUSE_OPENAL=1 -DUSE_SDL=1 -DBinIO_STDINT_HEADER=<stdint.h>)
+ if(MINGW)
+ add_definitions(-DWIN32)
+ endif(MINGW)
else(WIN32)
add_definitions(-DPLATFORM_LINUX=1 -DPLATFORM_UNIX=1 -DUSE_OPENAL=1 -DUSE_SDL=1 -DBinIO_STDINT_HEADER=<stdint.h>)
endif(WIN32)
#define fopen(a, b) fopen(ConvertFileName(a), b);
+#ifndef __MINGW32__
inline float abs(float f)
{
if (f < 0)
return -f;
return f;
}
+#endif // __MINGW32__
#endif