diff mbox series

[3/3] mingw: bump the minimum Windows version to Vista

Message ID 2b127d9669aa7b73ced7611b6e77044f5efed11d.1538595818.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series mingw: require Windows Vista or later (and fix the Windows CI builds) | expand

Commit Message

John Passaro via GitGitGadget Oct. 3, 2018, 7:43 p.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

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.

We tried for a long time to play nice with the last remaining XP users
who somehow manage to build Git from source, but a recent update of
mingw-w64 (7.0.0.5233.e0c09544 -> 7.0.0.5245.edf66197) finally dropped
the last sign of XP support, and Git for Windows' SDK is no longer able
to build core Git's `master` branch as a consequence. (Git for Windows'
`master` branch already bumped the minimum Windows version to Vista a
while ago, so it is fine.)

It is time to require Windows Vista or later to build Git from source.
This, incidentally, lets us use quite a few nice new APIs.

It also means that we no longer need the inet_pton() and inet_ntop()
emulation, which is nice.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 config.mak.uname  | 4 ----
 git-compat-util.h | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

Comments

Ævar Arnfjörð Bjarmason Oct. 10, 2018, 2:08 p.m. UTC | #1
On Wed, Oct 03 2018, Johannes Schindelin via GitGitGadget wrote:

> 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.
>
> We tried for a long time to play nice with the last remaining XP users
> who somehow manage to build Git from source, but a recent update of
> mingw-w64 (7.0.0.5233.e0c09544 -> 7.0.0.5245.edf66197) finally dropped
> the last sign of XP support, and Git for Windows' SDK is no longer able
> to build core Git's `master` branch as a consequence. (Git for Windows'
> `master` branch already bumped the minimum Windows version to Vista a
> while ago, so it is fine.)
>
> It is time to require Windows Vista or later to build Git from source.
> This, incidentally, lets us use quite a few nice new APIs.
>
> It also means that we no longer need the inet_pton() and inet_ntop()
> emulation, which is nice.

Earlier in this series you add a:

#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
...
#endif

Shouldn't that now be something like:

#if defined(_WIN32_WINNT)
#if _WIN32_WINNT >= 0x600
...
#else
#error "You need at least Windows Vista to build Git!"
#endif
#endif

Or do we catch users building on non-supported versions earlier somehow
(i.e. not just with a flood of compilation errors).

> diff --git a/config.mak.uname b/config.mak.uname
> index e47af72e01..8acdeb71fd 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -381,8 +381,6 @@ ifeq ($(uname_S),Windows)
>  	NO_PYTHON = YesPlease
>  	BLK_SHA1 = YesPlease
>  	ETAGS_TARGET = ETAGS
> -	NO_INET_PTON = YesPlease
> -	NO_INET_NTOP = YesPlease
>  	NO_POSIX_GOODIES = UnfortunatelyYes
>  	NATIVE_CRLF = YesPlease
>  	DEFAULT_HELP_FORMAT = html
> @@ -529,8 +527,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

So before we were defining NO_INET_{PTON,NTOP} because XP needed it, but
doing so on all Windows versions, is there other compat stuff there
that's just catering to the lowest common denominator, and if so
shouldn't that be version checked against the NT version?

Both of the above are just questions I was curious about since I saw
your <nycvar.QRO.7.76.6.1810101502220.2034@tvgsbejvaqbjf.bet>, and
shouldn't bee seen as bumping this to "this needs a re-roll" or it
should be delayed in getting to master.
Junio C Hamano Oct. 11, 2018, 6:24 a.m. UTC | #2
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

>> It also means that we no longer need the inet_pton() and inet_ntop()
>> emulation, which is nice.
>
> Earlier in this series you add a:
>
> #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
> ...
> #endif
>
> Shouldn't that now be something like:
>
> #if defined(_WIN32_WINNT)
> #if _WIN32_WINNT >= 0x600
> ...
> #else
> #error "You need at least Windows Vista to build Git!"
> #endif
> #endif
>
> Or do we catch users building on non-supported versions earlier somehow
> (i.e. not just with a flood of compilation errors).

That sounds like a reasonable thing to be curious about.

> Both of the above are just questions I was curious about since I saw
> your <nycvar.QRO.7.76.6.1810101502220.2034@tvgsbejvaqbjf.bet>, and
> shouldn't bee seen as bumping this to "this needs a re-roll" or it
> should be delayed in getting to master.
Johannes Schindelin Oct. 14, 2019, 11:46 a.m. UTC | #3
Hi,

[sorry about the blast from the past, I just noticed that I had not
answered]

On Thu, 11 Oct 2018, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
> >> It also means that we no longer need the inet_pton() and inet_ntop()
> >> emulation, which is nice.
> >
> > Earlier in this series you add a:
> >
> > #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
> > ...
> > #endif
> >
> > Shouldn't that now be something like:
> >
> > #if defined(_WIN32_WINNT)
> > #if _WIN32_WINNT >= 0x600
> > ...
> > #else
> > #error "You need at least Windows Vista to build Git!"
> > #endif
> > #endif
> >
> > Or do we catch users building on non-supported versions earlier somehow
> > (i.e. not just with a flood of compilation errors).
>
> That sounds like a reasonable thing to be curious about.

I specifically wanted to leave the door open for people who might want
to put in the effort of keeping Windows XP support alive.

But I guess this does not make any sense anymore, what with Windows
_Vista_ being at its end of its life in 3 months.

Thanks! Will prepare a patch,
Dscho

>
> > Both of the above are just questions I was curious about since I saw
> > your <nycvar.QRO.7.76.6.1810101502220.2034@tvgsbejvaqbjf.bet>, and
> > shouldn't bee seen as bumping this to "this needs a re-roll" or it
> > should be delayed in getting to master.
>
Johannes Schindelin Oct. 14, 2019, 11:54 a.m. UTC | #4
Hi Ævar,

[sorry about the blast from the past, I forgot to answer back then.]

On Wed, 10 Oct 2018, Ævar Arnfjörð Bjarmason wrote:

> On Wed, Oct 03 2018, Johannes Schindelin via GitGitGadget wrote:
>
> > diff --git a/config.mak.uname b/config.mak.uname
> > index e47af72e01..8acdeb71fd 100644
> > --- a/config.mak.uname
> > +++ b/config.mak.uname
> > @@ -381,8 +381,6 @@ ifeq ($(uname_S),Windows)
> >  	NO_PYTHON = YesPlease
> >  	BLK_SHA1 = YesPlease
> >  	ETAGS_TARGET = ETAGS
> > -	NO_INET_PTON = YesPlease
> > -	NO_INET_NTOP = YesPlease
> >  	NO_POSIX_GOODIES = UnfortunatelyYes
> >  	NATIVE_CRLF = YesPlease
> >  	DEFAULT_HELP_FORMAT = html
> > @@ -529,8 +527,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
>
> So before we were defining NO_INET_{PTON,NTOP} because XP needed it, but
> doing so on all Windows versions, is there other compat stuff there
> that's just catering to the lowest common denominator, and if so
> shouldn't that be version checked against the NT version?

I meant to reply much earlier: When I worked on this, I essentially went
through all of the functions that we load dynamically on Windows, and
I don't think I found any other pre-Vista support code to get rid of.

Thanks,
Dscho
Johannes Schindelin Oct. 14, 2019, 11:58 a.m. UTC | #5
Hi,

On Mon, 14 Oct 2019, Johannes Schindelin wrote:

> On Thu, 11 Oct 2018, Junio C Hamano wrote:
>
> > Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> >
> > >> It also means that we no longer need the inet_pton() and inet_ntop()
> > >> emulation, which is nice.
> > >
> > > Earlier in this series you add a:
> > >
> > > #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
> > > ...
> > > #endif
> > >
> > > Shouldn't that now be something like:
> > >
> > > #if defined(_WIN32_WINNT)
> > > #if _WIN32_WINNT >= 0x600
> > > ...
> > > #else
> > > #error "You need at least Windows Vista to build Git!"
> > > #endif
> > > #endif
> > >
> > > Or do we catch users building on non-supported versions earlier somehow
> > > (i.e. not just with a flood of compilation errors).
> >
> > That sounds like a reasonable thing to be curious about.
>
> I specifically wanted to leave the door open for people who might want
> to put in the effort of keeping Windows XP support alive.
>
> But I guess this does not make any sense anymore, what with Windows
> _Vista_ being at its end of its life in 3 months.
>
> Thanks! Will prepare a patch,

Actually, while preparing that patch, I noticed that this is in the
`compat/poll/` part of our source code. I'd rather not inflict the
Vista-or-later requirement on that part, as it is relatively
self-contained and could still be copied into software that does support
Windows XP.

Thanks,
Dscho
diff mbox series

Patch

diff --git a/config.mak.uname b/config.mak.uname
index e47af72e01..8acdeb71fd 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -381,8 +381,6 @@  ifeq ($(uname_S),Windows)
 	NO_PYTHON = YesPlease
 	BLK_SHA1 = YesPlease
 	ETAGS_TARGET = ETAGS
-	NO_INET_PTON = YesPlease
-	NO_INET_NTOP = YesPlease
 	NO_POSIX_GOODIES = UnfortunatelyYes
 	NATIVE_CRLF = YesPlease
 	DEFAULT_HELP_FORMAT = html
@@ -529,8 +527,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 3ba93d9c15..48c955541e 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -147,7 +147,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 <winsock2.h>