summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-03-08 19:14:38 +0000
committerSimon McVittie <smcv@collabora.com>2018-03-09 12:26:08 +0000
commit83549e28ec5bb07e7c6d913cad4356d6bef5b0ae (patch)
tree7cf30a4fa866de323d4673ad14ff4124a3d0eb3f
parentdc15de1f7b3525babd723151927fc739d7f8a249 (diff)
Windows: Target Windows Vista or higher
This will give us the RFC-2553 inet_ntop() interface. Windows Vista extended security support ended in 2017, but we don't actually need anything from versions newer than Vista yet. Loosely based on part of a patch by Ralf Habacker. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61922
-rw-r--r--cmake/config.h.cmake2
-rw-r--r--configure.ac3
-rw-r--r--dbus/dbus-sysdeps-win.c6
3 files changed, 5 insertions, 6 deletions
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index 14b43e930..3c123b062 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -228,6 +228,8 @@
# define DBUS_WINCE
# else
# define DBUS_WIN32
+ /* Define to the minimum supported Windows version (0x0600 is Vista) */
+# define _WIN32_WINNT 0x0600
# endif
#else
# define DBUS_UNIX
diff --git a/configure.ac b/configure.ac
index efed4f0a4..2a4fce85e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -156,6 +156,9 @@ if test "$dbus_win" = yes; then
if test "$dbus_wince" = yes; then
AC_DEFINE(DBUS_WINCE,1,[Defined if we run on a W32 CE API based system])
AC_DEFINE(_WIN32_WCE, 0x0502, [Defined to get newer W32 CE APIs])
+ else
+ AC_DEFINE([_WIN32_WINNT], [0x0600],
+ [Define to the minimum supported Windows version (0x0600 is Vista)])
fi
else
AC_DEFINE(DBUS_UNIX,1,[Defined if we run on a Unix-based system])
diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c
index 37faacb32..9a270566e 100644
--- a/dbus/dbus-sysdeps-win.c
+++ b/dbus/dbus-sysdeps-win.c
@@ -30,12 +30,6 @@
#define STRSAFE_NO_DEPRECATE
-#ifndef DBUS_WINCE
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#endif
-#endif
-
#include "dbus-internals.h"
#include "dbus-sha.h"
#include "dbus-sysdeps.h"