mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Very preliminary work with Visual Studio 2015 Community RC/RTM, resolve some version-specific build errors:
1. Standard library functions snprintf & vsnprintf are available thusly named (without the prepended underscores). Someone may want to check my conditionals against non-MSVC compilers, though. 2. zone/bonuses.cpp throws an internal compiler error with optimize enabled; #pragma disable optimization on VS2015 only. Doing further testing as to whether we have to disable optimization for the WHOLE file ...
This commit is contained in:
parent
c91374444b
commit
663ff55271
@ -23,7 +23,9 @@
|
||||
*/
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
|
||||
|
||||
@ -43,7 +43,9 @@ typedef unsigned char uchar;
|
||||
typedef const char Const_char; //for perl XS
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
typedef void ThreadReturnType;
|
||||
|
||||
@ -26,8 +26,10 @@ target to center around.
|
||||
class Zone;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
@ -38,6 +38,16 @@
|
||||
#include "../common/unix.h"
|
||||
#endif
|
||||
|
||||
// Avoid an internal compiler error in VS 2015
|
||||
// Community RC (free) with the /O2 compiler
|
||||
// option enabled on x64 build; definite fail on
|
||||
// building Release-X64. Disabling optimizations
|
||||
// for the entire file might be overkill and/or
|
||||
// inapplicable to other builds, more testing needed.
|
||||
// Bug has been reported to MS, fix ETA unknown.
|
||||
#if (defined(_MSC_VER) && defined(_WIN64)&& _MSC_VER==1900)
|
||||
#pragma optimize( "", off )
|
||||
#endif
|
||||
|
||||
void Mob::CalcBonuses()
|
||||
{
|
||||
@ -4669,3 +4679,7 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
||||
}
|
||||
}
|
||||
|
||||
// See line 41 above, more or less
|
||||
#if (defined(_MSC_VER) && defined(_WIN64)&& _MSC_VER==1900)
|
||||
#pragma optimize( "", on )
|
||||
#endif
|
||||
|
||||
@ -22,8 +22,10 @@ Child of the Mob class.
|
||||
*/
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
@ -17,10 +17,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
#include "../common/races.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user