Previous 199869 Revisions Next

r34830 Wednesday 4th February, 2015 at 07:03:32 UTC by Peter Ferrie
fix compile on MSVC 2012 (nw)
[src/lib]lib.mak
[src/osd/windows]vconv.c winprefix.h

trunk/src/lib/lib.mak
r243341r243342
646646
647647BGFXINC = -I$(3RDPARTY)/bgfx/include -I$(3RDPARTY)/bgfx/3rdparty -I$(3RDPARTY)/bx/include -I$(3RDPARTY)/bgfx/3rdparty/khronos
648648ifdef MSVC_BUILD
649   BGFXINC += -I$(3RDPARTY)/bx/include/compat/msvc
649   BGFXINC += -I$(3RDPARTY)/bx/include/compat/msvc /EHsc
650650else
651651   ifeq ($(TARGETOS),win32)
652652      BGFXINC += -I$(3RDPARTY)/bx/include/compat/mingw
trunk/src/osd/windows/vconv.c
r243341r243342
7878   // warning C4146: unary minus operator applied to unsigned type, result still unsigned
7979   // warning C4150: deletion of pointer to incomplete type 'xxx'; no destructor called
8080   // warning C4189: 'xxx' : local variable is initialized but not referenced
81   // warning C4191: 'type cast' : unsafe conversion from 'xxx' to 'xxx' // 64-bit only
8182   // warning C4201: nonstandard extension used : nameless struct/union
8283   // warning C4242: 'x' : conversion from 'xxx' to 'xxx', possible loss of data
8384   // warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
8485   // warning C4250: 'xxx' : inherits 'xxx' via dominance
8586   // warning C4255: 'xxx' : no function prototype given: converting '()' to '(void)'
8687   // warning C4296: 'x' : expression is always false
88   // warning C4306: 'xxx': conversion from 'type1' to 'type2' of greater size // 64-bit only
8789   // warning C4310: cast truncates constant value
8890   // warning C4324: 'xxx' : structure was padded due to __declspec(align())
8991   // warning C4347: behavior change: 'xxx' is called instead of 'xxx' // obsolete VS2005 - VS2010 only
r243341r243342
9193   // warning C4510: 'xxx' : default constructor could not be generated
9294   // warning C4512: 'xxx' : assignment operator could not be generated
9395   // warning C4514: 'xxx' : unreferenced inline function has been removed
96   // warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable
9497   // warning C4619: #pragma warning : there is no warning number 'xxx'
9598   // warning C4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught
9699   // warning C4610: struct 'xxx' can never be instantiated - user defined constructor required
97100   // warning C4625: 'xxx' : copy constructor could not be generated because a base class copy constructor is inaccessible or deleted
98101   // warning C4626: 'xxx' : assignment operator could not be generated because a base class assignment operator is inaccessible or deleted
102   // warning C4640: 'xxx' : construction of local static object is not thread-safe
99103   // warning C4668: 'xxx' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
100104   // warning C4702: unreachable code
101105   // warning C4706: assignment within conditional expression
r243341r243342
104108   // warning C4805: 'x' : unsafe mix of type 'xxx' and type 'xxx' in operation
105109   // warning C4820: 'xxx' : 'x' bytes padding added after data member 'xxx'
106110   // warning C4826: Conversion from 'type1 ' to 'type_2' is sign-extended. This may cause unexpected runtime behavior. // 32-bit only
107   { VS7,      "-Wall",                    "/Wall /W4 /wd4003 /wd4018 /wd4061 /wd4100 /wd4127 /wd4131 /wd4141 /wd4146 /wd4150 /wd4189 /wd4201 /wd4242 /wd4244 /wd4250 /wd4255 /wd4296 /wd4310 /wd4324 /wd4347 /wd4435 /wd4510 /wd4512 /wd4514 /wd4571 /wd4610 /wd4619 /wd4625 /wd4626 /wd4668 /wd4702 /wd4706 /wd4710 /wd4711 /wd4805 /wd4820 /wd4826" },
111   { VS7,      "-Wall",                    "/Wall /W4 /wd4003 /wd4018 /wd4061 /wd4100 /wd4127 /wd4131 /wd4141 /wd4146 /wd4150 /wd4189 /wd4191 /wd4201 /wd4242 /wd4244 /wd4250 /wd4255 /wd4296 /wd4306 /wd4310 /wd4324 /wd4347 /wd4435 /wd4510 /wd4512 /wd4514 /wd4571 /wd4610 /wd4611 /wd4619 /wd4625 /wd4626 /wd4640 /wd4668 /wd4702 /wd4706 /wd4710 /wd4711 /wd4805 /wd4820 /wd4826" },
108112   { 0,        "-Wall",                    "/W0" },
109113   { VS7,      "-Wno-unused",              "/wd4100 /wd4101 /wd4102 /wd4505" },
110114   { 0,        "-Wno-sign-compare",        "/wd4365 /wd4389 /wd4245 /wd4388" },
trunk/src/osd/windows/winprefix.h
r243341r243342
1313#ifdef _MSC_VER
1414#include <assert.h>
1515#include <malloc.h>
16#if _MSC_VER < 1500 // < VS2008
17#define vsnprintf _vsnprintf
18#elif _MSC_VER < 1800 // < VS2013
16#if _MSC_VER < 1900 // < VS2015
17#define snprintf _snprintf
18#if _MSC_VER < 1800 // VS2013 or earlier
1919#define alloca _alloca
2020#define round(x) floor((x) + 0.5)
2121#define strtoll _strtoi64
r243341r243342
2424static __inline double fmin(double x, double y){ return (x < y) ? x : y; }
2525static __inline double fmax(double x, double y){ return (x > y) ? x : y; }
2626static __inline double log2(double x) { return log(x) * M_LOG2E; }
27#elif _MSC_VER < 1900 // < VS2015
28#define snprintf _snprintf
29#else
27#if _MSC_VER < 1500 // VS2008 or earlier
28#define vsnprintf _vsnprintf
29#endif // VS2008
30#endif // VS2013
31#else // VS2015
3032#pragma warning (disable: 4091)
3133#pragma warning (disable: 4267)
3234#pragma warning (disable: 4456 4457 4458 4459)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team