From 972e31d58d6391a357f98ddb369ed1da50a232ed Mon Sep 17 00:00:00 2001 From: Jeff Genovy Date: Wed, 23 Jan 2019 12:41:46 -0800 Subject: [PATCH] ICU-20364 Cygwin builds need to set WINVER to 0x0601 for Windows 7, similar to MinGW builds. --- icu4c/source/config/mh-cygwin | 4 ++++ icu4c/source/config/mh-cygwin-msvc | 4 ++++ icu4c/source/config/mh-cygwin64 | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/icu4c/source/config/mh-cygwin b/icu4c/source/config/mh-cygwin index efba5511dd..1b09a5bf92 100644 --- a/icu4c/source/config/mh-cygwin +++ b/icu4c/source/config/mh-cygwin @@ -18,6 +18,10 @@ else STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION endif +## ICU requires a minimum target of Windows 7, and WINVER is not set to this by default. +## https://msdn.microsoft.com/en-us/library/aa383745.aspx +CPPFLAGS += -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 + ## Flags for position independent code SHAREDLIBCFLAGS = SHAREDLIBCXXFLAGS = diff --git a/icu4c/source/config/mh-cygwin-msvc b/icu4c/source/config/mh-cygwin-msvc index 4744bb949e..0db6b2654f 100644 --- a/icu4c/source/config/mh-cygwin-msvc +++ b/icu4c/source/config/mh-cygwin-msvc @@ -24,6 +24,10 @@ else STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION endif +## ICU requires a minimum target of Windows 7, and WINVER is not set to this by default. +## https://msdn.microsoft.com/en-us/library/aa383745.aspx +CPPFLAGS += -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 + ## Flags for position independent code SHAREDLIBCFLAGS = SHAREDLIBCXXFLAGS = diff --git a/icu4c/source/config/mh-cygwin64 b/icu4c/source/config/mh-cygwin64 index 6be8db7702..0eee473684 100644 --- a/icu4c/source/config/mh-cygwin64 +++ b/icu4c/source/config/mh-cygwin64 @@ -18,6 +18,10 @@ else STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION endif +## ICU requires a minimum target of Windows 7, and WINVER is not set to this by default. +## https://msdn.microsoft.com/en-us/library/aa383745.aspx +CPPFLAGS += -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 + ## Flags for position independent code SHAREDLIBCFLAGS = SHAREDLIBCXXFLAGS =