Merge branch 'master' into jgrpp

# Conflicts:
#	src/debug.cpp
This commit is contained in:
Jonathan G Rennison
2019-01-02 16:09:44 +00:00
40 changed files with 491 additions and 467 deletions

View File

@@ -163,7 +163,7 @@
#include <malloc.h> // alloca()
#endif
#if defined(WIN32)
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#endif
@@ -228,25 +228,32 @@
#define FALLTHROUGH
#endif
#if defined(WIN32) && !defined(_WIN64) && !defined(WIN64)
# if defined(_WIN32) && !defined(_WIN64)
#if !defined(_W64)
#define _W64
#endif
typedef _W64 int INT_PTR, *PINT_PTR;
typedef _W64 unsigned int UINT_PTR, *PUINT_PTR;
#endif /* WIN32 && !_WIN64 && !WIN64 */
# endif /* _WIN32 && !_WIN64 */
#if defined(_WIN64) || defined(WIN64)
# if defined(_WIN64)
#define fseek _fseeki64
#endif /* _WIN64 || WIN64 */
# endif /* _WIN64 */
/* This is needed to zlib uses the stdcall calling convention on visual studio */
#if defined(WITH_ZLIB) || defined(WITH_PNG)
#if !defined(ZLIB_WINAPI)
#define ZLIB_WINAPI
#endif
#endif
/* zlib from vcpkg use cdecl calling convention without enforcing it in the headers */
# if defined(WITH_ZLIB)
# if !defined(ZEXPORT)
# define ZEXPORT CDECL
# endif
# endif
/* freetype from vcpkg use cdecl calling convention without enforcing it in the headers */
# if defined(WITH_FREETYPE)
# if !defined(FT_EXPORT)
# define FT_EXPORT( x ) extern "C" x CDECL
# endif
# endif
#define strcasecmp stricmp
#define strncasecmp strnicmp
@@ -270,7 +277,7 @@
/* NOTE: the string returned by these functions is only valid until the next
* call to the same function and is not thread- or reentrancy-safe */
#if !defined(STRGEN) && !defined(SETTINGSGEN)
#if defined(WIN32) || defined(WIN64)
# if defined(_WIN32)
char *getcwd(char *buf, size_t size);
#include <tchar.h>
#include <io.h>
@@ -281,14 +288,14 @@
const char *FS2OTTD(const TCHAR *name);
const TCHAR *OTTD2FS(const char *name, bool console_cp = false);
#else
# else
#define fopen(file, mode) fopen(OTTD2FS(file), mode)
const char *FS2OTTD(const char *name);
const char *OTTD2FS(const char *name);
#endif /* WIN32 */
# endif /* _WIN32 */
#endif /* STRGEN || SETTINGSGEN */
#if defined(WIN32) || defined(WIN64) || defined(__OS2__) && !defined(__INNOTEK_LIBC__)
#if defined(_WIN32) || defined(__OS2__) && !defined(__INNOTEK_LIBC__)
#define PATHSEP "\\"
#define PATHSEPCHAR '\\'
#else