From: RĂ©mi Verschelde Date: Mon, 14 Nov 2016 21:34:19 +0000 (+0100) Subject: mingw32: Fix a couple build issues X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=commitdiff_plain;h=454beca4a2d0a4225e492955cef849ce1a85b0fd mingw32: Fix a couple build issues - in libjpeg/jmorecfg.h: error: conflicting declaration 'typedef short int UINT8' error: conflicting declaration 'typedef unsigned int UINT16' The fix used might break on MSVC, should be improved if need be. - in OpenGL_Windows.cpp: error: '_argc' was not declared in this scope error: '_argv' was not declared in this scope --- diff --git a/Dependencies/libjpeg/jconfig.h b/Dependencies/libjpeg/jconfig.h index 3700728..0dc5ad6 100644 --- a/Dependencies/libjpeg/jconfig.h +++ b/Dependencies/libjpeg/jconfig.h @@ -12,3 +12,5 @@ #define TARGA_SUPPORTED /* Targa image file format */ #endif /* JPEG_CJPEG_DJPEG */ +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 2f92938..09081c4 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -163,10 +163,8 @@ int kContextHeight; Boolean gDone = false; -#ifndef __MINGW32__ static int _argc = 0; static char **_argv = NULL; -#endif bool cmdline(const char *cmd) { @@ -681,10 +679,8 @@ static inline void chdirToAppPath(const char *argv0) 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