mirror of https://github.com/PCSX2/pcsx2.git
Make PCSX2 compile with Visual Studio 2012 (1/3): Workaround compiler differences that result in compile-time errors.
NOTE: The 'glew' project does NOT build yet, but it will have to be decided how to approach the problem (String literal too long in glew.rc) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5382 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e650a1d8a0
commit
72372c2219
|
@ -56,7 +56,7 @@
|
|||
#include "pa_win_wdmks_utils.h"
|
||||
|
||||
#if !defined(PA_WDMKS_NO_KSGUID_LIB) && !defined(PAWIN_WDMKS_NO_KSGUID_LIB)
|
||||
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
|
||||
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200) && (_MSC_VER < 1600))) /* MSC version 6 up to 2008 */
|
||||
#pragma comment( lib, "ksguid.lib" )
|
||||
#endif
|
||||
#define pa_KSDATAFORMAT_TYPE_AUDIO KSDATAFORMAT_TYPE_AUDIO
|
||||
|
|
|
@ -649,7 +649,6 @@ extern "C"
|
|||
# include <process.h>
|
||||
#endif
|
||||
|
||||
|
||||
static INLINE void* _InterlockedExchangePointer( void* volatile* target, void* value )
|
||||
{
|
||||
#ifdef _M_AMD64 // high-level atomic ops, please leave these 64 bit checks in place.
|
||||
|
@ -659,6 +658,7 @@ static INLINE void* _InterlockedExchangePointer( void* volatile* target, void* v
|
|||
#endif
|
||||
}
|
||||
|
||||
#if _MSC_VER < 1700
|
||||
static INLINE void* _InterlockedCompareExchangePointer( void* volatile* target, void* value, void* comparand )
|
||||
{
|
||||
#ifdef _M_AMD64 // high-level atomic ops, please leave these 64 bit checks in place.
|
||||
|
@ -667,6 +667,7 @@ static INLINE void* _InterlockedCompareExchangePointer( void* volatile* target,
|
|||
return (void*)_InterlockedCompareExchange( (LONG_PTR*)target, (LONG_PTR)value, (LONG_PTR)comparand );
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static INLINE void* _InterlockedExchangeAddPointer( void* volatile* target, void* value )
|
||||
{
|
||||
|
|
|
@ -93,7 +93,7 @@ enum wxKeyType
|
|||
#define WX_DECLARE_LIST_WITH_DECL(elT, liT, decl) \
|
||||
WX_DECLARE_LIST_XO(elT*, liT, decl)
|
||||
|
||||
#if !defined( __VISUALC__ )
|
||||
#if (defined(_MSC_VER) && _MSC_VER >= 1300) || !defined( __VISUALC__ )
|
||||
|
||||
template<class T>
|
||||
class WXDLLIMPEXP_BASE wxList_SortFunction
|
||||
|
@ -109,8 +109,17 @@ private:
|
|||
#define WX_LIST_SORTFUNCTION( elT, f ) wxList_SortFunction<elT>(f)
|
||||
#define VC6_WORKAROUND(elT, liT, decl)
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1700
|
||||
#define WXObjectAllocator(x) std::_Wrap_alloc< wxObjectAllocator< x > >
|
||||
#else
|
||||
#define WXObjectAllocator(x) wxObjectAllocator< x >
|
||||
#endif
|
||||
|
||||
|
||||
#else // if defined( __VISUALC__ )
|
||||
|
||||
#define WXObjectAllocator(x) wxObjectAllocator< x >
|
||||
|
||||
#define WX_LIST_SORTFUNCTION( elT, f ) std::greater<elT>( f )
|
||||
#define VC6_WORKAROUND(elT, liT, decl) \
|
||||
decl liT; \
|
||||
|
@ -174,10 +183,10 @@ private:
|
|||
}; \
|
||||
\
|
||||
VC6_WORKAROUND(elT, liT, decl) \
|
||||
decl liT : public std::list< elT, wxObjectAllocator< elT > > \
|
||||
decl liT : public std::list< elT, WXObjectAllocator( elT ) > \
|
||||
{ \
|
||||
private: \
|
||||
typedef std::list< elT, wxObjectAllocator< elT > > BaseListType; \
|
||||
typedef std::list< elT, WXObjectAllocator( elT ) > BaseListType; \
|
||||
static BaseListType EmptyList; \
|
||||
\
|
||||
bool m_destroy; \
|
||||
|
@ -187,7 +196,7 @@ private:
|
|||
{ \
|
||||
private: \
|
||||
/* Workaround for broken VC6 nested class name resolution */ \
|
||||
typedef std::list<elT, wxObjectAllocator< elT > >::iterator iterator; \
|
||||
typedef std::list<elT, WXObjectAllocator( elT ) >::iterator iterator; \
|
||||
friend class liT; \
|
||||
\
|
||||
iterator m_iter; \
|
||||
|
|
|
@ -107,8 +107,10 @@
|
|||
#endif
|
||||
|
||||
#if !defined __WXWINCE__ && !defined NEED_PBT_H
|
||||
#if !defined(_MSC_VER) || _MSC_VER < 1600
|
||||
#include <pbt.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__WXWINCE__)
|
||||
#include "wx/msw/wince/missing.h"
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef std::list< wxEvent*, wxObjectAllocator<wxEvent*> > wxEventList;
|
||||
typedef std::list< wxEvent*, WXObjectAllocator(wxEvent*) > wxEventList;
|
||||
#else
|
||||
typedef std::list< wxEvent* > wxEventList;
|
||||
#endif
|
||||
|
|
|
@ -172,7 +172,7 @@ protected:
|
|||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef std::list< SysExecEvent*, wxObjectAllocator<SysExecEvent*> > pxEvtList;
|
||||
typedef std::list< SysExecEvent*, WXObjectAllocator(SysExecEvent*) > pxEvtList;
|
||||
#else
|
||||
typedef std::list<SysExecEvent*> pxEvtList;
|
||||
#endif
|
||||
|
|
|
@ -103,12 +103,16 @@ typedef signed long long int64;
|
|||
|
||||
using namespace std;
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1500 && _MSC_VER < 1600
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#if _MSC_VER >= 1500
|
||||
#include <memory>
|
||||
|
||||
#if _MSC_VER < 1600
|
||||
using namespace std::tr1;
|
||||
|
||||
#else
|
||||
using namespace std;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
|
Loading…
Reference in New Issue