From 07e7f81ecb42dc6b00662213deec41318eda97eb Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 25 Jan 2018 14:21:51 +0100 Subject: [PATCH] mingw: bump the minimum Windows version to Vista Quite some time ago, a last plea to the XP users out there who want to see Windows XP support in Git for Windows, asking them to get engaged and help, vanished into the depths of the universe. It is time to codify the ascent by the "silent majority" of XP users, and mark the minimum Windows version required for Git for Windows as Windows Vista. This, incidentally, lets us use quite a few nice new APIs. This also means that we no longer need the inet_pton() and inet_ntop() emulation, and we no longer need to do the PROC_ADDR dance with the `CreateSymbolicLinkW()` function, either. Signed-off-by: Johannes Schindelin --- compat/mingw.c | 3 +-- config.mak.uname | 4 ---- git-compat-util.h | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/compat/mingw.c b/compat/mingw.c index 8aaccc3e74..d7bcd6f3cc 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -274,7 +274,6 @@ int mingw_core_config(const char *var, const char *value, void *cb) } static DWORD symlink_file_flags = 0, symlink_directory_flags = 1; -DECLARE_PROC_ADDR(kernel32.dll, BOOLEAN, CreateSymbolicLinkW, LPCWSTR, LPCWSTR, DWORD); enum phantom_symlink_result { PHANTOM_SYMLINK_RETRY, @@ -2722,7 +2721,7 @@ int symlink(const char *target, const char *link) int len; /* fail if symlinks are disabled or API is not supported (WinXP) */ - if (!has_symlinks || !INIT_PROC_ADDR(CreateSymbolicLinkW)) { + if (!has_symlinks) { errno = ENOSYS; return -1; } diff --git a/config.mak.uname b/config.mak.uname index e98c10ce1e..adeca5b9fd 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -407,8 +407,6 @@ ifeq ($(uname_S),Windows) NO_GETTEXT = YesPlease NO_PYTHON = YesPlease ETAGS_TARGET = ETAGS - NO_INET_PTON = YesPlease - NO_INET_NTOP = YesPlease NO_POSIX_GOODIES = UnfortunatelyYes NATIVE_CRLF = YesPlease DEFAULT_HELP_FORMAT = html @@ -577,8 +575,6 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_REGEX = YesPlease NO_PYTHON = YesPlease ETAGS_TARGET = ETAGS - NO_INET_PTON = YesPlease - NO_INET_NTOP = YesPlease NO_POSIX_GOODIES = UnfortunatelyYes DEFAULT_HELP_FORMAT = html COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32 diff --git a/git-compat-util.h b/git-compat-util.h index 4f4fd312ab..54672f7ca5 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -156,7 +156,7 @@ #if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */ # if !defined(_WIN32_WINNT) -# define _WIN32_WINNT 0x0502 +# define _WIN32_WINNT 0x0600 # endif #define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ #include