{"thread":{"id":"49482","subject":"[PATCH 0/3] mingw: require Windows Vista or later (and fix the Windows CI builds)","startedAt":"2018-10-03T19:43:44Z","lastAt":"2019-10-14T11:59:02Z","messageCount":9,"participants":["Johannes Schindelin via GitGitGadget","Ævar Arnfjörð Bjarmason","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"359573","messageId":"pull.44.git.gitgitgadget@gmail.com","threadId":"49482","inReplyTo":null,"subject":"[PATCH 0/3] mingw: require Windows Vista or later (and fix the Windows CI builds)","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-03T19:43:39Z","receivedAt":"2018-10-03T19:43:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"I noticed that a recent GitGitGadget build failed in the Windows phase, with\ncompat/poll/poll.h problems all over the place.\n\nTurns out that this is caused by the recent upgrade of the mingw-w64 headers\nand crt files (7.0.0.5233.e0c09544 -> 7.0.0.5245.edf66197, which I assume\nnow enforces Vista as minimal Windows version also for all mingw-w64\nprojects).\n\nLuckily, in Git for Windows' master, we already had changes to require Vista\n(for unrelated reasons: to restrict the std handle inheritance when spawning\nnew processes).\n\nTechnically, Windows Vista is already no longer supported\n[https://support.microsoft.com/en-us/help/22882/windows-vista-end-of-support]\n, but we do try to keep Git building on older Windows version, up until the\npoint when it becomes too big of a maintenance burden.\n\nJohannes Schindelin (3):\n  compat/poll: prepare for targeting Windows Vista\n  mingw: set _WIN32_WINNT explicitly for Git for Windows\n  mingw: bump the minimum Windows version to Vista\n\n compat/poll/poll.c |  6 +++---\n compat/poll/poll.h | 15 +++++++++++++++\n config.mak.uname   |  4 ----\n git-compat-util.h  |  4 ++--\n 4 files changed, 20 insertions(+), 9 deletions(-)\n\n\nbase-commit: fe8321ec057f9231c26c29b364721568e58040f7\nPublished-As: https://github.com/gitgitgadget/git/releases/tags/pr-44%2Fdscho%2Frequire-windows-vista-or-later-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-44/dscho/require-windows-vista-or-later-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/44\n-- \ngitgitgadget\n"},{"id":"359574","messageId":"1c2dba41189e97c2dfa7d98da3b52589eb9091cc.1538595818.git.gitgitgadget@gmail.com","threadId":"49482","inReplyTo":"pull.44.git.gitgitgadget@gmail.com","subject":"[PATCH 1/3] compat/poll: prepare for targeting Windows Vista","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-03T19:43:41Z","receivedAt":"2018-10-03T19:43:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWindows Vista (and later) actually have a working poll(), but we still\ncannot use it because it only works on sockets.\n\nSo let's detect when we are targeting Windows Vista and undefine those\nconstants, and define `pollfd` so that we can declare our own pollfd\nstruct.\n\nWe also need to make sure that we override those constants *after*\n`winsock2.h` has been `#include`d (otherwise we would not really\noverride those constants).\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/poll/poll.c |  6 +++---\n compat/poll/poll.h | 15 +++++++++++++++\n 2 files changed, 18 insertions(+), 3 deletions(-)\n\ndiff --git a/compat/poll/poll.c b/compat/poll/poll.c\nindex 7ed3fbbea1..ad5dcde439 100644\n--- a/compat/poll/poll.c\n+++ b/compat/poll/poll.c\n@@ -29,9 +29,6 @@\n \n #include <sys/types.h>\n \n-/* Specification.  */\n-#include <poll.h>\n-\n #include <errno.h>\n #include <limits.h>\n #include <assert.h>\n@@ -55,6 +52,9 @@\n # include <unistd.h>\n #endif\n \n+/* Specification.  */\n+#include \"poll.h\"\n+\n #ifdef HAVE_SYS_IOCTL_H\n # include <sys/ioctl.h>\n #endif\ndiff --git a/compat/poll/poll.h b/compat/poll/poll.h\nindex cd1995292a..1e1597360f 100644\n--- a/compat/poll/poll.h\n+++ b/compat/poll/poll.h\n@@ -21,6 +21,21 @@\n #ifndef _GL_POLL_H\n #define _GL_POLL_H\n \n+#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600\n+/* Vista has its own, socket-only poll() */\n+#undef POLLIN\n+#undef POLLPRI\n+#undef POLLOUT\n+#undef POLLERR\n+#undef POLLHUP\n+#undef POLLNVAL\n+#undef POLLRDNORM\n+#undef POLLRDBAND\n+#undef POLLWRNORM\n+#undef POLLWRBAND\n+#define pollfd compat_pollfd\n+#endif\n+\n /* fake a poll(2) environment */\n #define POLLIN      0x0001      /* any readable data available   */\n #define POLLPRI     0x0002      /* OOB/Urgent readable data      */\n-- \ngitgitgadget\n\n"},{"id":"359575","messageId":"47966fb1f55bf3014d93b8aa2d746ef22f8b5a7c.1538595818.git.gitgitgadget@gmail.com","threadId":"49482","inReplyTo":"pull.44.git.gitgitgadget@gmail.com","subject":"[PATCH 2/3] mingw: set _WIN32_WINNT explicitly for Git for Windows","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-03T19:43:43Z","receivedAt":"2018-10-03T19:43:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nPreviously, we only ever declared a target Windows version if compiling\nwith Visual C.\n\nWhich meant that we were relying on the MinGW headers to guess which\nWindows version we want to target...\n\nLet's be explicit about it, in particular because we actually want to\nbump the target Windows version to Vista (which we will do in the next\ncommit).\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n git-compat-util.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 5f2e90932f..3ba93d9c15 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -146,7 +146,7 @@\n #define _SGI_SOURCE 1\n \n #if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */\n-# if defined (_MSC_VER) && !defined(_WIN32_WINNT)\n+# if !defined(_WIN32_WINNT)\n #  define _WIN32_WINNT 0x0502\n # endif\n #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */\n-- \ngitgitgadget\n\n"},{"id":"359576","messageId":"2b127d9669aa7b73ced7611b6e77044f5efed11d.1538595818.git.gitgitgadget@gmail.com","threadId":"49482","inReplyTo":"pull.44.git.gitgitgadget@gmail.com","subject":"[PATCH 3/3] mingw: bump the minimum Windows version to Vista","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-03T19:43:44Z","receivedAt":"2018-10-03T19:43:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nQuite some time ago, a last plea to the XP users out there who want to\nsee Windows XP support in Git for Windows, asking them to get engaged\nand help, vanished into the depths of the universe.\n\nWe tried for a long time to play nice with the last remaining XP users\nwho somehow manage to build Git from source, but a recent update of\nmingw-w64 (7.0.0.5233.e0c09544 -> 7.0.0.5245.edf66197) finally dropped\nthe last sign of XP support, and Git for Windows' SDK is no longer able\nto build core Git's `master` branch as a consequence. (Git for Windows'\n`master` branch already bumped the minimum Windows version to Vista a\nwhile ago, so it is fine.)\n\nIt is time to require Windows Vista or later to build Git from source.\nThis, incidentally, lets us use quite a few nice new APIs.\n\nIt also means that we no longer need the inet_pton() and inet_ntop()\nemulation, which is nice.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname  | 4 ----\n git-compat-util.h | 2 +-\n 2 files changed, 1 insertion(+), 5 deletions(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex e47af72e01..8acdeb71fd 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -381,8 +381,6 @@ ifeq ($(uname_S),Windows)\n \tNO_PYTHON = YesPlease\n \tBLK_SHA1 = YesPlease\n \tETAGS_TARGET = ETAGS\n-\tNO_INET_PTON = YesPlease\n-\tNO_INET_NTOP = YesPlease\n \tNO_POSIX_GOODIES = UnfortunatelyYes\n \tNATIVE_CRLF = YesPlease\n \tDEFAULT_HELP_FORMAT = html\n@@ -529,8 +527,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tNO_REGEX = YesPlease\n \tNO_PYTHON = YesPlease\n \tETAGS_TARGET = ETAGS\n-\tNO_INET_PTON = YesPlease\n-\tNO_INET_NTOP = YesPlease\n \tNO_POSIX_GOODIES = UnfortunatelyYes\n \tDEFAULT_HELP_FORMAT = html\n \tCOMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 3ba93d9c15..48c955541e 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -147,7 +147,7 @@\n \n #if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */\n # if !defined(_WIN32_WINNT)\n-#  define _WIN32_WINNT 0x0502\n+#  define _WIN32_WINNT 0x0600\n # endif\n #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */\n #include <winsock2.h>\n-- \ngitgitgadget\n"},{"id":"360026","messageId":"87zhvlevxt.fsf@evledraar.gmail.com","threadId":"49482","inReplyTo":"2b127d9669aa7b73ced7611b6e77044f5efed11d.1538595818.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 3/3] mingw: bump the minimum Windows version to Vista","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-10-10T14:08:14Z","receivedAt":"2018-10-10T14:08:20Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Oct 03 2018, Johannes Schindelin via GitGitGadget wrote:\n\n> Quite some time ago, a last plea to the XP users out there who want to\n> see Windows XP support in Git for Windows, asking them to get engaged\n> and help, vanished into the depths of the universe.\n>\n> We tried for a long time to play nice with the last remaining XP users\n> who somehow manage to build Git from source, but a recent update of\n> mingw-w64 (7.0.0.5233.e0c09544 -> 7.0.0.5245.edf66197) finally dropped\n> the last sign of XP support, and Git for Windows' SDK is no longer able\n> to build core Git's `master` branch as a consequence. (Git for Windows'\n> `master` branch already bumped the minimum Windows version to Vista a\n> while ago, so it is fine.)\n>\n> It is time to require Windows Vista or later to build Git from source.\n> This, incidentally, lets us use quite a few nice new APIs.\n>\n> It also means that we no longer need the inet_pton() and inet_ntop()\n> emulation, which is nice.\n\nEarlier in this series you add a:\n\n#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600\n...\n#endif\n\nShouldn't that now be something like:\n\n#if defined(_WIN32_WINNT)\n#if _WIN32_WINNT >= 0x600\n...\n#else\n#error \"You need at least Windows Vista to build Git!\"\n#endif\n#endif\n\nOr do we catch users building on non-supported versions earlier somehow\n(i.e. not just with a flood of compilation errors).\n\n> diff --git a/config.mak.uname b/config.mak.uname\n> index e47af72e01..8acdeb71fd 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -381,8 +381,6 @@ ifeq ($(uname_S),Windows)\n>  \tNO_PYTHON = YesPlease\n>  \tBLK_SHA1 = YesPlease\n>  \tETAGS_TARGET = ETAGS\n> -\tNO_INET_PTON = YesPlease\n> -\tNO_INET_NTOP = YesPlease\n>  \tNO_POSIX_GOODIES = UnfortunatelyYes\n>  \tNATIVE_CRLF = YesPlease\n>  \tDEFAULT_HELP_FORMAT = html\n> @@ -529,8 +527,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n>  \tNO_REGEX = YesPlease\n>  \tNO_PYTHON = YesPlease\n>  \tETAGS_TARGET = ETAGS\n> -\tNO_INET_PTON = YesPlease\n> -\tNO_INET_NTOP = YesPlease\n>  \tNO_POSIX_GOODIES = UnfortunatelyYes\n>  \tDEFAULT_HELP_FORMAT = html\n>  \tCOMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32\n\nSo before we were defining NO_INET_{PTON,NTOP} because XP needed it, but\ndoing so on all Windows versions, is there other compat stuff there\nthat's just catering to the lowest common denominator, and if so\nshouldn't that be version checked against the NT version?\n\nBoth of the above are just questions I was curious about since I saw\nyour <nycvar.QRO.7.76.6.1810101502220.2034@tvgsbejvaqbjf.bet>, and\nshouldn't bee seen as bumping this to \"this needs a re-roll\" or it\nshould be delayed in getting to master.\n"},{"id":"360140","messageId":"xmqq8t35gfw2.fsf@gitster-ct.c.googlers.com","threadId":"49482","inReplyTo":"87zhvlevxt.fsf@evledraar.gmail.com","subject":"Re: [PATCH 3/3] mingw: bump the minimum Windows version to Vista","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-11T06:24:13Z","receivedAt":"2018-10-11T06:24:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>> It also means that we no longer need the inet_pton() and inet_ntop()\n>> emulation, which is nice.\n>\n> Earlier in this series you add a:\n>\n> #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600\n> ...\n> #endif\n>\n> Shouldn't that now be something like:\n>\n> #if defined(_WIN32_WINNT)\n> #if _WIN32_WINNT >= 0x600\n> ...\n> #else\n> #error \"You need at least Windows Vista to build Git!\"\n> #endif\n> #endif\n>\n> Or do we catch users building on non-supported versions earlier somehow\n> (i.e. not just with a flood of compilation errors).\n\nThat sounds like a reasonable thing to be curious about.\n\n> Both of the above are just questions I was curious about since I saw\n> your <nycvar.QRO.7.76.6.1810101502220.2034@tvgsbejvaqbjf.bet>, and\n> shouldn't bee seen as bumping this to \"this needs a re-roll\" or it\n> should be delayed in getting to master.\n"},{"id":"384010","messageId":"nycvar.QRO.7.76.6.1910141344160.46@tvgsbejvaqbjf.bet","threadId":"49482","inReplyTo":"xmqq8t35gfw2.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 3/3] mingw: bump the minimum Windows version to Vista","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-10-14T11:46:35Z","receivedAt":"2019-10-14T11:46:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n[sorry about the blast from the past, I just noticed that I had not\nanswered]\n\nOn Thu, 11 Oct 2018, Junio C Hamano wrote:\n\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n> >> It also means that we no longer need the inet_pton() and inet_ntop()\n> >> emulation, which is nice.\n> >\n> > Earlier in this series you add a:\n> >\n> > #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600\n> > ...\n> > #endif\n> >\n> > Shouldn't that now be something like:\n> >\n> > #if defined(_WIN32_WINNT)\n> > #if _WIN32_WINNT >= 0x600\n> > ...\n> > #else\n> > #error \"You need at least Windows Vista to build Git!\"\n> > #endif\n> > #endif\n> >\n> > Or do we catch users building on non-supported versions earlier somehow\n> > (i.e. not just with a flood of compilation errors).\n>\n> That sounds like a reasonable thing to be curious about.\n\nI specifically wanted to leave the door open for people who might want\nto put in the effort of keeping Windows XP support alive.\n\nBut I guess this does not make any sense anymore, what with Windows\n_Vista_ being at its end of its life in 3 months.\n\nThanks! Will prepare a patch,\nDscho\n\n>\n> > Both of the above are just questions I was curious about since I saw\n> > your <nycvar.QRO.7.76.6.1810101502220.2034@tvgsbejvaqbjf.bet>, and\n> > shouldn't bee seen as bumping this to \"this needs a re-roll\" or it\n> > should be delayed in getting to master.\n>\n"},{"id":"384011","messageId":"nycvar.QRO.7.76.6.1910141351580.46@tvgsbejvaqbjf.bet","threadId":"49482","inReplyTo":"87zhvlevxt.fsf@evledraar.gmail.com","subject":"Re: [PATCH 3/3] mingw: bump the minimum Windows version to Vista","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-10-14T11:54:40Z","receivedAt":"2019-10-14T11:55:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\n[sorry about the blast from the past, I forgot to answer back then.]\n\nOn Wed, 10 Oct 2018, Ævar Arnfjörð Bjarmason wrote:\n\n> On Wed, Oct 03 2018, Johannes Schindelin via GitGitGadget wrote:\n>\n> > diff --git a/config.mak.uname b/config.mak.uname\n> > index e47af72e01..8acdeb71fd 100644\n> > --- a/config.mak.uname\n> > +++ b/config.mak.uname\n> > @@ -381,8 +381,6 @@ ifeq ($(uname_S),Windows)\n> >  \tNO_PYTHON = YesPlease\n> >  \tBLK_SHA1 = YesPlease\n> >  \tETAGS_TARGET = ETAGS\n> > -\tNO_INET_PTON = YesPlease\n> > -\tNO_INET_NTOP = YesPlease\n> >  \tNO_POSIX_GOODIES = UnfortunatelyYes\n> >  \tNATIVE_CRLF = YesPlease\n> >  \tDEFAULT_HELP_FORMAT = html\n> > @@ -529,8 +527,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n> >  \tNO_REGEX = YesPlease\n> >  \tNO_PYTHON = YesPlease\n> >  \tETAGS_TARGET = ETAGS\n> > -\tNO_INET_PTON = YesPlease\n> > -\tNO_INET_NTOP = YesPlease\n> >  \tNO_POSIX_GOODIES = UnfortunatelyYes\n> >  \tDEFAULT_HELP_FORMAT = html\n> >  \tCOMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32\n>\n> So before we were defining NO_INET_{PTON,NTOP} because XP needed it, but\n> doing so on all Windows versions, is there other compat stuff there\n> that's just catering to the lowest common denominator, and if so\n> shouldn't that be version checked against the NT version?\n\nI meant to reply much earlier: When I worked on this, I essentially went\nthrough all of the functions that we load dynamically on Windows, and\nI don't think I found any other pre-Vista support code to get rid of.\n\nThanks,\nDscho\n"},{"id":"384012","messageId":"nycvar.QRO.7.76.6.1910141357160.46@tvgsbejvaqbjf.bet","threadId":"49482","inReplyTo":"nycvar.QRO.7.76.6.1910141344160.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 3/3] mingw: bump the minimum Windows version to Vista","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-10-14T11:58:39Z","receivedAt":"2019-10-14T11:59:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 14 Oct 2019, Johannes Schindelin wrote:\n\n> On Thu, 11 Oct 2018, Junio C Hamano wrote:\n>\n> > Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n> >\n> > >> It also means that we no longer need the inet_pton() and inet_ntop()\n> > >> emulation, which is nice.\n> > >\n> > > Earlier in this series you add a:\n> > >\n> > > #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600\n> > > ...\n> > > #endif\n> > >\n> > > Shouldn't that now be something like:\n> > >\n> > > #if defined(_WIN32_WINNT)\n> > > #if _WIN32_WINNT >= 0x600\n> > > ...\n> > > #else\n> > > #error \"You need at least Windows Vista to build Git!\"\n> > > #endif\n> > > #endif\n> > >\n> > > Or do we catch users building on non-supported versions earlier somehow\n> > > (i.e. not just with a flood of compilation errors).\n> >\n> > That sounds like a reasonable thing to be curious about.\n>\n> I specifically wanted to leave the door open for people who might want\n> to put in the effort of keeping Windows XP support alive.\n>\n> But I guess this does not make any sense anymore, what with Windows\n> _Vista_ being at its end of its life in 3 months.\n>\n> Thanks! Will prepare a patch,\n\nActually, while preparing that patch, I noticed that this is in the\n`compat/poll/` part of our source code. I'd rather not inflict the\nVista-or-later requirement on that part, as it is relatively\nself-contained and could still be copied into software that does support\nWindows XP.\n\nThanks,\nDscho\n"}]}