config_win32.h: define version macros first

In Linux, MinGW headers define that if undefined to 0x502, which is
incompatible with version required by rang.hpp (0x0600).
This commit is contained in:
Martin Pulec
2021-04-07 13:29:46 +02:00
parent 303b0390c7
commit e0c8264a7d

View File

@@ -52,6 +52,16 @@
#define __MSVCRT_VERSION__ 0x700
#endif
// 0x0501 is Win XP, 0x0502 2003 Server, 0x0600 Win Vista and Win 7 is 0x0601
#ifndef WINVER
#define WINVER _WIN32_WINNT_WIN7
#endif /* WINVER */
#ifndef _WIN32_WINNT
#define _WIN32_WINNT _WIN32_WINNT_WIN7
#endif /* _WIN32_WINNT */
#define WIN32_LEAN_AND_MEAN
#include "config_common.h"
#include <assert.h>
@@ -64,16 +74,6 @@
#include <stdlib.h> /* abs() */
#include <string.h>
// 0x0501 is Win XP, 0x0502 2003 Server, 0x0600 Win Vista and Win 7 is 0x0601
#ifndef WINVER
#define WINVER 0x0601
#endif /* WINVER */
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0601
#endif /* _WIN32_WINNT */
#define WIN32_LEAN_AND_MEAN
#include <crtdefs.h>
#include <winsock2.h>