From 454beca4a2d0a4225e492955cef849ce1a85b0fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 14 Nov 2016 22:34:19 +0100 Subject: [PATCH] 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 --- Dependencies/libjpeg/jconfig.h | 2 ++ Source/OpenGL_Windows.cpp | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) 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 -- 2.39.5