public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Default mingw _WIN32_WINNT
@ 2020-05-04 21:42 Yaakov Selkowitz
  2020-05-05  3:15 ` Biswapriyo Nath
  0 siblings, 1 reply; 11+ messages in thread
From: Yaakov Selkowitz @ 2020-05-04 21:42 UTC (permalink / raw)
  To: cygwin

JonY,

In w32api-headers and mingw64-*-headers, the default value of
_WIN32_WINNT can be configured at build-time with --with-default-win32-
winnt=$VER, with the default still being 0x502 (XP x64/2003 R2).  With
2008, 2008 R2, and 7 having gone out of support earlier this year,
Server 2012 is now the oldest currently supported version.  Is it time
to set this to 0x602 by default?

--
Yaakov



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-04 21:42 Default mingw _WIN32_WINNT Yaakov Selkowitz
@ 2020-05-05  3:15 ` Biswapriyo Nath
  2020-05-05  8:54   ` Corinna Vinschen
  0 siblings, 1 reply; 11+ messages in thread
From: Biswapriyo Nath @ 2020-05-05  3:15 UTC (permalink / raw)
  To: cygwin

Chaging the defines in package may break others installation. You can set
the version in source code as you need, for example:

#undef _WIN32_WINNT
#define _WIN32_WINNT 0x602

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-05  3:15 ` Biswapriyo Nath
@ 2020-05-05  8:54   ` Corinna Vinschen
  2020-05-05  9:05     ` Rainer Emrich
  2020-05-08  0:33     ` Yaakov Selkowitz
  0 siblings, 2 replies; 11+ messages in thread
From: Corinna Vinschen @ 2020-05-05  8:54 UTC (permalink / raw)
  To: cygwin

On May  5 08:45, Biswapriyo Nath via Cygwin wrote:
> Chaging the defines in package may break others installation.

No, it doesn't in this case.

Yaakov is talking about mingw-w64 headers used to create *Cygwin*
applications using the occasional Windows function.  Cygwin executables
in the distro run on Vista but not on XP or 2K3 anymore, given the
Cygwin DLL doesn't.

Therefore it might be a good idea to bump the default for these
Cygwin-related headers to at least 0x0600.

Setting them to 0x0602 sounds like a good idea, but as long as we didn't
drop Vista or W7 support it might be premature.

Btw., checking Cygwin sources for Vista and W7-specific code, it turned
out that actually very few lines of code handle Vista or W7-specific
workarounds.  The advantage of removing the code is pretty minor, so I
didn't push the changes.  While it's a bad idea to keep Vista and W7
running (at least attached to the internet), we can support them a while
longer.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-05  8:54   ` Corinna Vinschen
@ 2020-05-05  9:05     ` Rainer Emrich
  2020-05-05 10:06       ` JonY
  2020-05-11 14:55       ` Chris Wagner
  2020-05-08  0:33     ` Yaakov Selkowitz
  1 sibling, 2 replies; 11+ messages in thread
From: Rainer Emrich @ 2020-05-05  9:05 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 805 bytes --]

Hi Corinna,

Am 05.05.2020 um 10:54 schrieb Corinna Vinschen:
> Therefore it might be a good idea to bump the default for these
> Cygwin-related headers to at least 0x0600.
> 
> Setting them to 0x0602 sounds like a good idea, but as long as we didn't
> drop Vista or W7 support it might be premature.
> 
> Btw., checking Cygwin sources for Vista and W7-specific code, it turned
> out that actually very few lines of code handle Vista or W7-specific
> workarounds.  The advantage of removing the code is pretty minor, so I
> didn't push the changes.  While it's a bad idea to keep Vista and W7
> running (at least attached to the internet), we can support them a while
> longer.
I would expect support for Windows 7 as long as the Micsrosoft ESU
program is active.

Cheers

Rainer



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-05  9:05     ` Rainer Emrich
@ 2020-05-05 10:06       ` JonY
  2020-05-05 10:11         ` Corinna Vinschen
  2020-05-11 14:55       ` Chris Wagner
  1 sibling, 1 reply; 11+ messages in thread
From: JonY @ 2020-05-05 10:06 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 1021 bytes --]

On 5/5/20 9:05 AM, Rainer Emrich wrote:
> Hi Corinna,
> 
> Am 05.05.2020 um 10:54 schrieb Corinna Vinschen:
>> Therefore it might be a good idea to bump the default for these
>> Cygwin-related headers to at least 0x0600.
>>
>> Setting them to 0x0602 sounds like a good idea, but as long as we didn't
>> drop Vista or W7 support it might be premature.
>>
>> Btw., checking Cygwin sources for Vista and W7-specific code, it turned
>> out that actually very few lines of code handle Vista or W7-specific
>> workarounds.  The advantage of removing the code is pretty minor, so I
>> didn't push the changes.  While it's a bad idea to keep Vista and W7
>> running (at least attached to the internet), we can support them a while
>> longer.
> I would expect support for Windows 7 as long as the Micsrosoft ESU
> program is active.
> 

By right, applications needing newer APIs should be setting them instead
of relying on the defaults. In this case, Cygwin compiled with
-D_WIN32_WINNT=0x602 if needed.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-05 10:06       ` JonY
@ 2020-05-05 10:11         ` Corinna Vinschen
  0 siblings, 0 replies; 11+ messages in thread
From: Corinna Vinschen @ 2020-05-05 10:11 UTC (permalink / raw)
  To: cygwin

On May  5 10:06, JonY via Cygwin wrote:
> On 5/5/20 9:05 AM, Rainer Emrich wrote:
> > Hi Corinna,
> > 
> > Am 05.05.2020 um 10:54 schrieb Corinna Vinschen:
> >> Therefore it might be a good idea to bump the default for these
> >> Cygwin-related headers to at least 0x0600.
> >>
> >> Setting them to 0x0602 sounds like a good idea, but as long as we didn't
> >> drop Vista or W7 support it might be premature.
> >>
> >> Btw., checking Cygwin sources for Vista and W7-specific code, it turned
> >> out that actually very few lines of code handle Vista or W7-specific
> >> workarounds.  The advantage of removing the code is pretty minor, so I
> >> didn't push the changes.  While it's a bad idea to keep Vista and W7
> >> running (at least attached to the internet), we can support them a while
> >> longer.
> > I would expect support for Windows 7 as long as the Micsrosoft ESU
> > program is active.
> > 
> 
> By right, applications needing newer APIs should be setting them instead
> of relying on the defaults. In this case, Cygwin compiled with
> -D_WIN32_WINNT=0x602 if needed.

It's not about compiling Cygwin itself (which sets _WIN32_WINNT to
0x0a00 anyway), it's about compiling executables *for* Cygwin.  Given
they won't run under pre-0x0600 anyway, it may be a good thing if the
win32 headers for Cygwin executables define the minimum possible as
default.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-05  8:54   ` Corinna Vinschen
  2020-05-05  9:05     ` Rainer Emrich
@ 2020-05-08  0:33     ` Yaakov Selkowitz
  2020-05-08  9:29       ` Corinna Vinschen
  1 sibling, 1 reply; 11+ messages in thread
From: Yaakov Selkowitz @ 2020-05-08  0:33 UTC (permalink / raw)
  To: cygwin

On Tue, 2020-05-05 at 10:54 +0200, Corinna Vinschen wrote:
> On May  5 08:45, Biswapriyo Nath via Cygwin wrote:
> > Chaging the defines in package may break others installation.
> 
> No, it doesn't in this case.

In what case would it?

> Yaakov is talking about mingw-w64 headers used to create *Cygwin*
> applications using the occasional Windows function.  Cygwin executables
> in the distro run on Vista but not on XP or 2K3 anymore, given the
> Cygwin DLL doesn't.

That too, as well as the mingw64-*-headers used in the MinGW-w64
toolchain.

> Therefore it might be a good idea to bump the default for these
> Cygwin-related headers to at least 0x0600.
> 
> Setting them to 0x0602 sounds like a good idea, but as long as we didn't
> drop Vista or W7 support it might be premature.

I suppose so for Cygwin, but the mingw64-*-headers could be different.

> Btw., checking Cygwin sources for Vista and W7-specific code, it turned
> out that actually very few lines of code handle Vista or W7-specific
> workarounds.  The advantage of removing the code is pretty minor, so I
> didn't push the changes.  While it's a bad idea to keep Vista and W7
> running (at least attached to the internet), we can support them a while
> longer.

Fair enough.

--
Yaakov


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-08  0:33     ` Yaakov Selkowitz
@ 2020-05-08  9:29       ` Corinna Vinschen
  0 siblings, 0 replies; 11+ messages in thread
From: Corinna Vinschen @ 2020-05-08  9:29 UTC (permalink / raw)
  To: cygwin

On May  7 20:33, Yaakov Selkowitz wrote:
> On Tue, 2020-05-05 at 10:54 +0200, Corinna Vinschen wrote:
> > On May  5 08:45, Biswapriyo Nath via Cygwin wrote:
> > > Chaging the defines in package may break others installation.
> > 
> > No, it doesn't in this case.
> 
> In what case would it?

Case 1: Creating Cygwin executables

Case 2: Creating native executables

In case 1, setting _WIN32_WINNT to 0x0600 just follows reality in that
Cygwin executables don't run on pre-Vista anymore, so using Win32
functions from same executables follows the same rule.

In case 2, it's a legitimate goal to create executables still running on
older versions of Windows.  In how far changing _WIN32_WINNT makes sense
or not for native development doesn't actually belong here, it would
have to be discussed on the mingw-w64 mailing lists.

> > Yaakov is talking about mingw-w64 headers used to create *Cygwin*
> > applications using the occasional Windows function.  Cygwin executables
> > in the distro run on Vista but not on XP or 2K3 anymore, given the
> > Cygwin DLL doesn't.
> 
> That too, as well as the mingw64-*-headers used in the MinGW-w64
> toolchain.

I disagree, see above.

> > Therefore it might be a good idea to bump the default for these
> > Cygwin-related headers to at least 0x0600.
> > 
> > Setting them to 0x0602 sounds like a good idea, but as long as we didn't
> > drop Vista or W7 support it might be premature.
> 
> I suppose so for Cygwin, but the mingw64-*-headers could be different.

No, the mingw headers for Cygwin are mainly targeted at building Cygwin
executables additionally using Win32 functions, and these are runing on
0x0600 or later.  The fact that Cygwin is developed using the same set
of headers doesn't really matter for this.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-05  9:05     ` Rainer Emrich
  2020-05-05 10:06       ` JonY
@ 2020-05-11 14:55       ` Chris Wagner
  2020-05-11 16:53         ` Yaakov Selkowitz
  1 sibling, 1 reply; 11+ messages in thread
From: Chris Wagner @ 2020-05-11 14:55 UTC (permalink / raw)
  To: cygwin

On 2020-05-05 5:05 am, Rainer Emrich wrote:
> Hi Corinna,
> 
> Am 05.05.2020 um 10:54 schrieb Corinna Vinschen:
>> Therefore it might be a good idea to bump the default for these
>> Cygwin-related headers to at least 0x0600.
>> 
>> Setting them to 0x0602 sounds like a good idea, but as long as we 
>> didn't
>> drop Vista or W7 support it might be premature.
>> 
>> Btw., checking Cygwin sources for Vista and W7-specific code, it 
>> turned
>> out that actually very few lines of code handle Vista or W7-specific
>> workarounds.  The advantage of removing the code is pretty minor, so I
>> didn't push the changes.  While it's a bad idea to keep Vista and W7
>> running (at least attached to the internet), we can support them a 
>> while
>> longer.
> I would expect support for Windows 7 as long as the Micsrosoft ESU
> program is active.


I would just like to chime in that it would be a crying shame if Cygwin 
were to ever drop support for Windows 7.  There are many people, myself 
one, who are dead set against Windows 10.


Thanks.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-11 14:55       ` Chris Wagner
@ 2020-05-11 16:53         ` Yaakov Selkowitz
  2020-05-11 23:08           ` Chris Wagner
  0 siblings, 1 reply; 11+ messages in thread
From: Yaakov Selkowitz @ 2020-05-11 16:53 UTC (permalink / raw)
  To: cygwin

On Mon, 2020-05-11 at 10:55 -0400, Chris Wagner wrote:
> On 2020-05-05 5:05 am, Rainer Emrich wrote:
> > Am 05.05.2020 um 10:54 schrieb Corinna Vinschen:
> > > Therefore it might be a good idea to bump the default for these
> > > Cygwin-related headers to at least 0x0600.
> > > 
> > > Setting them to 0x0602 sounds like a good idea, but as long as we didn't
> > > drop Vista or W7 support it might be premature.
> > > 
> > > Btw., checking Cygwin sources for Vista and W7-specific code, it turned
> > > out that actually very few lines of code handle Vista or W7-specific
> > > workarounds.  The advantage of removing the code is pretty minor, so I
> > > didn't push the changes.  While it's a bad idea to keep Vista and W7
> > > running (at least attached to the internet), we can support them a while
> > > longer.
> > I would expect support for Windows 7 as long as the Micsrosoft ESU
> > program is active.

We don't work for Microsoft, so as an independent project, we'll
support Windows 7 only as long as we feel is viable and valuable.  As
Corinna said, for now that's the case, but nobody here is guaranteeing
anything beyond that.

> I would just like to chime in that it would be a crying shame if Cygwin 
> were to ever drop support for Windows 7.  There are many people, myself 
> one, who are dead set against Windows 10.

"Ever"?!?  You do realize that, ESU aside, Windows 7 is out of support
and therefore should be assumed to be vulnerable?

--
Yaakov



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Default mingw _WIN32_WINNT
  2020-05-11 16:53         ` Yaakov Selkowitz
@ 2020-05-11 23:08           ` Chris Wagner
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wagner @ 2020-05-11 23:08 UTC (permalink / raw)
  To: cygwin

On 2020-05-11 12:53 pm, Yaakov Selkowitz wrote:
>> I would just like to chime in that it would be a crying shame if 
>> Cygwin
>> were to ever drop support for Windows 7.  There are many people, 
>> myself
>> one, who are dead set against Windows 10.
> 
> "Ever"?!?  You do realize that, ESU aside, Windows 7 is out of support
> and therefore should be assumed to be vulnerable?

I suspect that something one day will make it untenable but Windows 7 is 
no less secure or more vulnerable than it was a year ago.  All software 
should always be assumed to be always vulnerable.  Is 10 secure on 
patching day but then vulnerable until the next patch day?  The number 
of vulns in any software is fixed on the day it ships and it's whittled 
down as patches come out.  7 has had a heck of a lot of security fixes.  
It's new software that increases security holes.  I have to use 10 at 
work and it is a ghastly operating system.


Thanks.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-05-11 23:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 21:42 Default mingw _WIN32_WINNT Yaakov Selkowitz
2020-05-05  3:15 ` Biswapriyo Nath
2020-05-05  8:54   ` Corinna Vinschen
2020-05-05  9:05     ` Rainer Emrich
2020-05-05 10:06       ` JonY
2020-05-05 10:11         ` Corinna Vinschen
2020-05-11 14:55       ` Chris Wagner
2020-05-11 16:53         ` Yaakov Selkowitz
2020-05-11 23:08           ` Chris Wagner
2020-05-08  0:33     ` Yaakov Selkowitz
2020-05-08  9:29       ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).