From d612ae65672bfaea4c0e90627e44a0693e292893 Mon Sep 17 00:00:00 2001 From: skarg Date: Tue, 25 Oct 2016 13:43:14 +0000 Subject: [PATCH] Some Win32 changes for clean compile of IPv6. --- bacnet-stack/ports/win32/net.h | 9 +++++++-- bacnet-stack/ports/win32/stdbool.h | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bacnet-stack/ports/win32/net.h b/bacnet-stack/ports/win32/net.h index ade64b10..e577854e 100644 --- a/bacnet-stack/ports/win32/net.h +++ b/bacnet-stack/ports/win32/net.h @@ -29,8 +29,13 @@ #define WIN32_LEAN_AND_MEAN #define STRICT 1 /* Windows XP minimum */ -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x501 +#if (_WIN32_WINNT < 0x501) + #undef _WIN32_WINNT + #define _WIN32_WINNT 0x501 + #undef NTDDI_VERSION + #define NTDDI_VERSION _NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT) +#endif + #include #if (!defined(USE_INADDR) || (USE_INADDR == 0)) && \ diff --git a/bacnet-stack/ports/win32/stdbool.h b/bacnet-stack/ports/win32/stdbool.h index 7eebc160..f7bccff5 100644 --- a/bacnet-stack/ports/win32/stdbool.h +++ b/bacnet-stack/ports/win32/stdbool.h @@ -8,10 +8,10 @@ #if !defined(__cplusplus) -#if !defined(__GNUC__) && !defined(_MSC_VER) +#if !defined(__GNUC__) /* _Bool builtin type is included in GCC */ -/* ISO C Standard: 5.2.5 An object declared as - type _Bool is large enough to store +/* ISO C Standard: 5.2.5 An object declared as + type _Bool is large enough to store the values 0 and 1. */ /* We choose 8 bit to match C++ */ /* It must also promote to integer */