mirror of https://github.com/OpenTTD/OpenTTD
(svn r27380) -Fix: [Win32] Compilation with MSVC2015.
parent
e5d105900d
commit
35b77450f8
|
@ -22,6 +22,7 @@
|
||||||
#include "dmusic.h"
|
#include "dmusic.h"
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#undef FACILITY_DIRECTMUSIC // Needed for newer Windows SDK version.
|
||||||
#include <dmksctrl.h>
|
#include <dmksctrl.h>
|
||||||
#include <dmusici.h>
|
#include <dmusici.h>
|
||||||
#include <dmusicc.h>
|
#include <dmusicc.h>
|
||||||
|
|
|
@ -322,7 +322,9 @@ static char *PrintModuleInfo(char *output, const char *last, HMODULE mod)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
#pragma warning(disable:4091)
|
||||||
#include <dbghelp.h>
|
#include <dbghelp.h>
|
||||||
|
#pragma warning(default:4091)
|
||||||
|
|
||||||
char *CrashLogWindows::AppendDecodedStacktrace(char *buffer, const char *last) const
|
char *CrashLogWindows::AppendDecodedStacktrace(char *buffer, const char *last) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -223,7 +223,9 @@
|
||||||
|
|
||||||
#include <malloc.h> // alloca()
|
#include <malloc.h> // alloca()
|
||||||
#define NORETURN __declspec(noreturn)
|
#define NORETURN __declspec(noreturn)
|
||||||
#define inline __forceinline
|
#if (_MSC_VER < 1900)
|
||||||
|
#define inline __forceinline
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(WINCE)
|
#if !defined(WINCE)
|
||||||
#define CDECL _cdecl
|
#define CDECL _cdecl
|
||||||
|
|
|
@ -378,7 +378,7 @@ static int TranslateArgumentIdx(int arg, int offset = 0);
|
||||||
static void EmitWordList(Buffer *buffer, const char * const *words, uint nw)
|
static void EmitWordList(Buffer *buffer, const char * const *words, uint nw)
|
||||||
{
|
{
|
||||||
buffer->AppendByte(nw);
|
buffer->AppendByte(nw);
|
||||||
for (uint i = 0; i < nw; i++) buffer->AppendByte((uint)strlen(words[i]) + 1);
|
for (uint i = 0; i < nw; i++) buffer->AppendByte((byte)strlen(words[i]) + 1);
|
||||||
for (uint i = 0; i < nw; i++) {
|
for (uint i = 0; i < nw; i++) {
|
||||||
for (uint j = 0; words[i][j] != '\0'; j++) buffer->AppendByte(words[i][j]);
|
for (uint j = 0; words[i][j] != '\0'; j++) buffer->AppendByte(words[i][j]);
|
||||||
buffer->AppendByte(0);
|
buffer->AppendByte(0);
|
||||||
|
|
|
@ -349,7 +349,7 @@ bool IsValidChar(WChar key, CharSetFilter afilter)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||||
/**
|
/**
|
||||||
* Almost POSIX compliant implementation of \c vsnprintf for VC compiler.
|
* Almost POSIX compliant implementation of \c vsnprintf for VC compiler.
|
||||||
* The difference is in the value returned on output truncation. This
|
* The difference is in the value returned on output truncation. This
|
||||||
|
|
Loading…
Reference in New Issue