Misc: Ensure that both WINVER and _WIN32_WINNT are defined for Windows builds
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 4 Jan 2018 03:19:39 +0000 (19:19 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Thu, 4 Jan 2018 03:19:39 +0000 (19:19 -0800)
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
configure.ac
libusb/version_nano.h
msvc/config.h

index 272deea..b596eae 100644 (file)
@@ -177,6 +177,7 @@ windows)
        LTLDFLAGS="${LTLDFLAGS} -avoid-version -Wl,--add-stdcall-alias"
        AC_DEFINE([POLL_NFDS_TYPE],[unsigned int],[type of second poll() argument])
        AC_DEFINE([WINVER], 0x0501, [Oldest Windows version supported])
+       AC_DEFINE([_WIN32_WINNT], 0x0501, [Oldest Windows version supported])
 
        AC_ARG_ENABLE([usbdk],
                [AC_HELP_STRING([--enable-usbdk], [use UsbDk Windows backend [default=no]])],
index b8b0363..da66a9e 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11244
+#define LIBUSB_NANO 11245
index 7a374b3..bcfa757 100644 (file)
@@ -5,6 +5,10 @@
 #error "Please make sure the msvc/ directory is removed from your build path."
 #endif
 
+/* Only support Windows XP and later */
+#define WINVER         0x0501
+#define _WIN32_WINNT   0x0501
+
 /* Visual Studio 2015 and later defines timespec */
 #if defined(_MSC_VER) && (_MSC_VER >= 1900)
 #define _TIMESPEC_DEFINED 1