Fix includes for Windows wxWidgets 3.0 build

wxWidgets 3.0 and w32pthreads both define mode_t on Windows, causing a
redefinition error. The w32pthreads mode_t doesn't get used, so I've
chosen the wxWidgets definition.

Also add <algorithm> (required by min and max) which is no longer
implicitly included on Windows, and wx/crt.h, required by wxVsnprintf in
wxWidgets 3.0
This commit is contained in:
Jonathan Li 2015-06-09 11:40:54 +01:00
parent b6375686ff
commit 5cab4f8b35
1 changed files with 10 additions and 0 deletions

View File

@ -183,12 +183,22 @@ public:
#include <wx/intl.h>
#include <wx/log.h>
#if defined(_WIN32) && wxMAJOR_VERSION >= 3
#include <wx/crt.h>
// This deals with a mode_t redefinition conflict. The mode_t doesn't seem to be
// used anywhere in w32pthreads, so I've chosen to use the wxWidgets mode_t
// (I think it's unsigned int vs signed int)
#include <wx/filefn.h>
#define HAVE_MODE_T
#endif
#include <stdexcept>
#include <cstring> // string.h under c++
#include <cstdio> // stdio.h under c++
#include <cstdlib>
#include <vector>
#include <list>
#include <algorithm>
#include "Pcsx2Defs.h"