Fix a first batch of mingw32 (gcc 6) compilation issues
Those fixes are mostly trial and error from someone with little experience with Windows compilers (especially getting things to work for both MinGW32 and MSVC), so there is likely room for improvement.
Part of #6.
Fixes #7.
See merge request !2
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 TARGA_SUPPORTED /* Targa image file format */
#endif /* JPEG_CJPEG_DJPEG */
+#define HAVE_UNSIGNED_CHAR
+#define HAVE_UNSIGNED_SHORT
Boolean gDone = false;
-#ifndef __MINGW32__
static int _argc = 0;
static char **_argv = NULL;
-#endif
bool cmdline(const char *cmd)
{
int main(int argc, char **argv)
{
-#ifndef __MINGW32__
_argc = argc;
_argv = argv;
-#endif
// !!! FIXME: we could use a Win32 API for this. --ryan.
#ifndef 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