(this is possibly going to annoy some people, but..)
put all (obvious) MSVC lines in #if defined(_MSC_VER) blocks, primarilly to allow alternative win32 compilers to be used.
This commit is contained in:
@@ -21,7 +21,7 @@ void foo()
|
|||||||
LuaManager *LUA = NULL;
|
LuaManager *LUA = NULL;
|
||||||
static LuaFunctionList *g_LuaFunctions = NULL;
|
static LuaFunctionList *g_LuaFunctions = NULL;
|
||||||
|
|
||||||
#if defined(_WINDOWS)
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "lua-5.0/lib/LibLua.lib")
|
#pragma comment(lib, "lua-5.0/lib/LibLua.lib")
|
||||||
#pragma comment(lib, "lua-5.0/lib/LibLuaLib.lib")
|
#pragma comment(lib, "lua-5.0/lib/LibLuaLib.lib")
|
||||||
#endif
|
#endif
|
||||||
@@ -29,7 +29,7 @@ static LuaFunctionList *g_LuaFunctions = NULL;
|
|||||||
#pragma comment(lib, "lua-5.0/lib/LibLuaXbox.lib")
|
#pragma comment(lib, "lua-5.0/lib/LibLuaXbox.lib")
|
||||||
#pragma comment(lib, "lua-5.0/lib/LibLuaLibXbox.lib")
|
#pragma comment(lib, "lua-5.0/lib/LibLuaLibXbox.lib")
|
||||||
#endif
|
#endif
|
||||||
#if defined(_WINDOWS) || defined (_XBOX)
|
#if defined(_MSC_VER) || defined (_XBOX)
|
||||||
/* "interaction between '_setjmp' and C++ object destruction is non-portable"
|
/* "interaction between '_setjmp' and C++ object destruction is non-portable"
|
||||||
* We don't care; we'll throw a fatal exception immediately anyway. */
|
* We don't care; we'll throw a fatal exception immediately anyway. */
|
||||||
#pragma warning (disable : 4611)
|
#pragma warning (disable : 4611)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const CString COMMON_XSL = "Common.xsl";
|
|||||||
|
|
||||||
#define MAX_DISPLAY_NAME_LENGTH 12
|
#define MAX_DISPLAY_NAME_LENGTH 12
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning (disable : 4706) // assignment within conditional expression
|
#pragma warning (disable : 4706) // assignment within conditional expression
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
// Static libraries
|
// Static libraries
|
||||||
// load Windows D3D8 dynamically
|
// load Windows D3D8 dynamically
|
||||||
#if defined(_WINDOWS)
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "D3dx8.lib")
|
#pragma comment(lib, "D3dx8.lib")
|
||||||
#pragma comment(lib, "Dxerr8.lib")
|
#pragma comment(lib, "Dxerr8.lib")
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
#include "arch/arch.h"
|
#include "arch/arch.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "opengl32.lib")
|
#pragma comment(lib, "opengl32.lib")
|
||||||
#pragma comment(lib, "glu32.lib")
|
#pragma comment(lib, "glu32.lib")
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
|
||||||
#if defined(_WINDOWS) || defined(_XBOX)
|
#if defined(_MSC_VER) || defined(_XBOX)
|
||||||
#include "zlib/zlib.h"
|
#include "zlib/zlib.h"
|
||||||
#pragma comment(lib, "zlib/zdll.lib")
|
#pragma comment(lib, "zlib/zdll.lib")
|
||||||
#elif defined(DARWIN)
|
#elif defined(DARWIN)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _MSC_VER
|
||||||
#include "mad-0.15.1b/mad.h"
|
#include "mad-0.15.1b/mad.h"
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "RageSoundReader_Resample_Good.h"
|
#include "RageSoundReader_Resample_Good.h"
|
||||||
|
|
||||||
#include "libresample/include/libresample.h"
|
#include "libresample/include/libresample.h"
|
||||||
#ifdef _WINDOWS
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "libresample/resample.lib")
|
#pragma comment(lib, "libresample/resample.lib")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#pragma comment(lib, "vorbis/xbox/vorbis_static.lib")
|
#pragma comment(lib, "vorbis/xbox/vorbis_static.lib")
|
||||||
#pragma comment(lib, "vorbis/xbox/vorbisfile_static.lib")
|
#pragma comment(lib, "vorbis/xbox/vorbisfile_static.lib")
|
||||||
#endif
|
#endif
|
||||||
#elif defined(_WINDOWS)
|
#elif defined(_MSC_VER)
|
||||||
#pragma comment(lib, "vorbis/win32/ogg_static.lib")
|
#pragma comment(lib, "vorbis/win32/ogg_static.lib")
|
||||||
#pragma comment(lib, "vorbis/win32/vorbis_static.lib")
|
#pragma comment(lib, "vorbis/win32/vorbis_static.lib")
|
||||||
#pragma comment(lib, "vorbis/win32/vorbisfile_static.lib")
|
#pragma comment(lib, "vorbis/win32/vorbisfile_static.lib")
|
||||||
|
|||||||
@@ -19,11 +19,13 @@
|
|||||||
#include "libjpeg/jpeglib.h"
|
#include "libjpeg/jpeglib.h"
|
||||||
#include "libjpeg/jerror.h"
|
#include "libjpeg/jerror.h"
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#if !defined(XBOX)
|
#if !defined(XBOX)
|
||||||
#pragma comment(lib, "libjpeg/jpeg.lib")
|
#pragma comment(lib, "libjpeg/jpeg.lib")
|
||||||
#else
|
#else
|
||||||
#pragma comment(lib, "libjpeg/xboxjpeg.lib")
|
#pragma comment(lib, "libjpeg/xboxjpeg.lib")
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#pragma warning(disable: 4611) /* interaction between '_setjmp' and C++ object destruction is non-portable */
|
#pragma warning(disable: 4611) /* interaction between '_setjmp' and C++ object destruction is non-portable */
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -5,12 +5,13 @@
|
|||||||
#include "RageFile.h"
|
#include "RageFile.h"
|
||||||
#include "RageSurface.h"
|
#include "RageSurface.h"
|
||||||
|
|
||||||
#if defined(WIN32)
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
# include "libpng/include/png.h"
|
# include "libpng/include/png.h"
|
||||||
# if defined(_WINDOWS)
|
# if defined(XBOX)
|
||||||
|
# pragma comment(lib, "libpng/lib/xboxlibpng.lib")
|
||||||
|
# else
|
||||||
# pragma comment(lib, "libpng/lib/libpng.lib")
|
# pragma comment(lib, "libpng/lib/libpng.lib")
|
||||||
# elif defined(XBOX)
|
|
||||||
# pragma comment(lib, "libpng/lib/xboxlibpng.lib")
|
|
||||||
# endif
|
# endif
|
||||||
# pragma warning(disable: 4611) /* interaction between '_setjmp' and C++ object destruction is non-portable */
|
# pragma warning(disable: 4611) /* interaction between '_setjmp' and C++ object destruction is non-portable */
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace jpeg
|
|||||||
/* Pull in JPEG library here. */
|
/* Pull in JPEG library here. */
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
#pragma comment(lib, "libjpeg/xboxjpeg.lib")
|
#pragma comment(lib, "libjpeg/xboxjpeg.lib")
|
||||||
#elif defined _WINDOWS
|
#elif defined _MSC_VER
|
||||||
#pragma comment(lib, "libjpeg/jpeg.lib")
|
#pragma comment(lib, "libjpeg/jpeg.lib")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -222,12 +222,15 @@ CString vssprintf( const char *fmt, va_list argList)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
#include <D3DX8Core.h>
|
# include <D3DX8Core.h>
|
||||||
#else
|
#else
|
||||||
#include <windows.h>
|
# include <windows.h>
|
||||||
#include <dxerr8.h>
|
# include <dxerr8.h>
|
||||||
#pragma comment(lib, "dxerr8.lib")
|
# if defined(_MSC_VER)
|
||||||
|
# pragma comment(lib, "dxerr8.lib")
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CString hr_ssprintf( int hr, const char *fmt, ...)
|
CString hr_ssprintf( int hr, const char *fmt, ...)
|
||||||
|
|||||||
@@ -15,7 +15,9 @@
|
|||||||
#include "archutils/win32/WindowsResources.h"
|
#include "archutils/win32/WindowsResources.h"
|
||||||
|
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "winmm.lib") // for timeGetTime
|
#pragma comment(lib, "winmm.lib") // for timeGetTime
|
||||||
|
#endif
|
||||||
|
|
||||||
ArchHooks_Win32::ArchHooks_Win32()
|
ArchHooks_Win32::ArchHooks_Win32()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,10 +5,12 @@
|
|||||||
#include "StepMania.h"
|
#include "StepMania.h"
|
||||||
#include "archutils/Win32/GraphicsWindow.h"
|
#include "archutils/Win32/GraphicsWindow.h"
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "dinput.lib")
|
#pragma comment(lib, "dinput.lib")
|
||||||
#if defined(_WINDOWS)
|
#if defined(_WINDOWS)
|
||||||
#pragma comment(lib, "dxguid.lib")
|
#pragma comment(lib, "dxguid.lib")
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
LPDIRECTINPUT dinput = NULL;
|
LPDIRECTINPUT dinput = NULL;
|
||||||
|
|
||||||
static int ConvertScancodeToKey( int scancode );
|
static int ConvertScancodeToKey( int scancode );
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
/* XXX register thread */
|
/* XXX register thread */
|
||||||
#pragma comment(lib, "winmm.lib")
|
#pragma comment(lib, "winmm.lib")
|
||||||
|
|
||||||
@@ -9,6 +10,7 @@
|
|||||||
#else
|
#else
|
||||||
#pragma comment(lib, "baseclasses/release/strmbase.lib")
|
#pragma comment(lib, "baseclasses/release/strmbase.lib")
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "MovieTexture_DShowHelper.h"
|
#include "MovieTexture_DShowHelper.h"
|
||||||
#include "MovieTexture_DShow.h"
|
#include "MovieTexture_DShow.h"
|
||||||
@@ -22,7 +24,9 @@
|
|||||||
#include "arch/Dialog/Dialog.h"
|
#include "arch/Dialog/Dialog.h"
|
||||||
|
|
||||||
#include <vfw.h> /* for GetVideoCodecDebugInfo */
|
#include <vfw.h> /* for GetVideoCodecDebugInfo */
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "vfw32.lib")
|
#pragma comment(lib, "vfw32.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
static CString FourCCToString(int fcc)
|
static CString FourCCToString(int fcc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace avcodec
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "ffmpeg/lib/avcodec.lib")
|
#pragma comment(lib, "ffmpeg/lib/avcodec.lib")
|
||||||
#pragma comment(lib, "ffmpeg/lib/avformat.lib")
|
#pragma comment(lib, "ffmpeg/lib/avformat.lib")
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
#define DIRECTSOUND_VERSION 0x0700
|
#define DIRECTSOUND_VERSION 0x0700
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "dsound.lib")
|
#pragma comment(lib, "dsound.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOL CALLBACK DSound::EnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription, LPCSTR lpcstrModule, LPVOID lpContext )
|
BOOL CALLBACK DSound::EnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription, LPCSTR lpcstrModule, LPVOID lpContext )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "RageSoundDriver_WaveOut.h"
|
#include "RageSoundDriver_WaveOut.h"
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "winmm.lib")
|
#pragma comment(lib, "winmm.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "RageTimer.h"
|
#include "RageTimer.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
|
|||||||
@@ -575,7 +575,9 @@ long VDDebugInfoLookupRVA(VDDebugInfoContext *pctx, unsigned rva, char *buf, int
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
#include "archutils/Win32/ddk/dbghelp.h"
|
#include "archutils/Win32/ddk/dbghelp.h"
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "archutils/Win32/ddk/dbghelp.lib")
|
#pragma comment(lib, "archutils/Win32/ddk/dbghelp.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool InitDbghelp()
|
static bool InitDbghelp()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,9 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <tlhelp32.h>
|
#include <tlhelp32.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "version.lib")
|
#pragma comment(lib, "version.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
bool GetFileVersion( CString fn, CString &out )
|
bool GetFileVersion( CString fn, CString &out )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#pragma comment(lib, "archutils/Win32/ddk/setupapi.lib")
|
#pragma comment(lib, "archutils/Win32/ddk/setupapi.lib")
|
||||||
#pragma comment(lib, "archutils/Win32/ddk/hid.lib")
|
#pragma comment(lib, "archutils/Win32/ddk/hid.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "archutils/Win32/ddk/setupapi.h"
|
#include "archutils/Win32/ddk/setupapi.h"
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ typedef __int64 int64_t;
|
|||||||
typedef unsigned __int64 uint64_t;
|
typedef unsigned __int64 uint64_t;
|
||||||
static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }
|
static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#pragma warning (disable : 4201) // nonstandard extension used : nameless struct/union (Windows headers do this)
|
#pragma warning (disable : 4201) // nonstandard extension used : nameless struct/union (Windows headers do this)
|
||||||
#pragma warning (disable : 4786) // turn off broken debugger warning
|
#pragma warning (disable : 4786) // turn off broken debugger warning
|
||||||
#pragma warning (disable : 4512) // assignment operator could not be generated (so?)
|
#pragma warning (disable : 4512) // assignment operator could not be generated (so?)
|
||||||
@@ -71,6 +72,7 @@ static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }
|
|||||||
#pragma warning (disable : 4063)
|
#pragma warning (disable : 4063)
|
||||||
#pragma warning (disable : 4127)
|
#pragma warning (disable : 4127)
|
||||||
#pragma warning (disable : 4786) /* VC6: identifier was truncated to '255' characters in the debug information */
|
#pragma warning (disable : 4786) /* VC6: identifier was truncated to '255' characters in the debug information */
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#undef max
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "CryptBn.h"
|
#include "CryptBn.h"
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning (disable : 4244) // conversion from 'int' to 'BignumInt', possible loss of data
|
#pragma warning (disable : 4244) // conversion from 'int' to 'BignumInt', possible loss of data
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
// ***************** Important Settings ********************
|
// ***************** Important Settings ********************
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#if defined(WIN32)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning (disable : 4244) // conversion ... possible loss of data
|
#pragma warning (disable : 4244) // conversion ... possible loss of data
|
||||||
#pragma warning (disable : 4516) // access-declarations are deprecated
|
#pragma warning (disable : 4516) // access-declarations are deprecated
|
||||||
#pragma warning (disable : 4511) // copy constructor could not be generated
|
#pragma warning (disable : 4511) // copy constructor could not be generated
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "ezsockets.h"
|
#include "ezsockets.h"
|
||||||
|
|
||||||
#if defined(_XBOX)
|
#if defined(_XBOX)
|
||||||
#elif defined(_WINDOWS) // We need the WinSock32 Library on Windows
|
#elif defined(_MSC_VER) // We need the WinSock32 Library on Windows
|
||||||
#pragma comment(lib,"wsock32.lib")
|
#pragma comment(lib,"wsock32.lib")
|
||||||
#else
|
#else
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ modules, but which are not relevant to the outside. */
|
|||||||
#define POSIX_MALLOC_THRESHOLD 10
|
#define POSIX_MALLOC_THRESHOLD 10
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
|
|
||||||
#if defined(_WINDOWS)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning( disable : 4244 )
|
#pragma warning( disable : 4244 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user