Skip to content

Commit 939b609

Browse files
committed
Require XP compatibility if using XP compiler
Sets target Windows version to XP when v141_xp or v140_xp compiler is used. No non-XP functions are used anyway.
1 parent 23ff0d5 commit 939b609

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Main.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
// If the user hasn't specified a target Windows version via _WIN32_WINNT, and is using an _xp toolset (indicated by _USING_V110_SDK71_),
2+
// then _WIN32_WINNT will be set to Windows XP (0x0501).
3+
#if !defined(_WIN32_WINNT) && defined(_USING_V110_SDK71_)
4+
#define _WIN32_WINNT _WIN32_WINNT_WINXP
5+
#define WINVER _WIN32_WINNT_WINXP
6+
#endif
7+
8+
// For memory leak finding
19
#ifdef _CRTDBG_MAP_ALLOC
210
#include <stdlib.h>
311
#include <crtdbg.h>
412
#endif
13+
514
#include <iostream>
615
#include <ctime>
716
#include <sstream>
@@ -87,11 +96,15 @@ int ExitWithError(const char * msg, int error)
8796

8897
int main()
8998
{
99+
// Enable memory tracking (does nothing in Release)
90100
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
101+
102+
// Handle closing nicely
91103
SetConsoleCtrlHandler(CloseHandler, TRUE);
92104

93-
// for colouring
105+
// For console text colouring
94106
hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
107+
95108
#ifdef _lacewing_debug
96109
FILE * f = NULL;
97110
if (fopen_s(&f, "Bluewing Server error.log", "w"))

0 commit comments

Comments
 (0)