Add win32 winnt defines description

This commit is contained in:
Kirigaya Kazuto 2018-08-25 23:35:37 +08:00
parent f4e50620f7
commit e4163a6a7e

View File

@ -7,8 +7,6 @@
#include "gsock.h" #include "gsock.h"
#define GSOCK_DEBUG
#ifdef GSOCK_DEBUG #ifdef GSOCK_DEBUG
#pragma message("GSock Debug mode compiled in") #pragma message("GSock Debug mode compiled in")
#include <cstdio> #include <cstdio>
@ -20,8 +18,17 @@
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
/// Using Win8.1 /* _WIN32_WINNT defines
#define _WIN32_WINNT 0x0603 Windows XP = 0x0501
Windows Server 2003 = 0x0502
Windows Vista, Windows Server 2008 = 0x0600
Windows 7 = 0x0601
Windows 8 = 0x0602
Windows 8.1 = 0x0603
Windows 10 = 0x0A00
*/
// Using Win10 by default
#define _WIN32_WINNT 0x0A00
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#ifdef _MSC_VER #ifdef _MSC_VER