Re: _WIN32_WINNT should be 0x0501 in win32.h

Lists: pgsql-hackers
From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: _WIN32_WINNT should be 0x0501 in win32.h
Date: 2009-09-07 02:34:38
Message-ID: 20090907112633.C851.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

We should define _WIN32_WINNT as 0x0500 in src/include/port/win32.h,
but it should be 0x0501 (Windows XP) because IPPROTO_IPV6 will be
defined only if _WIN32_WINNT >= 0x0501 in the recent Micosoft SDKs.

[ws2def.h]
#if(_WIN32_WINNT >= 0x0501)
IPPROTO_IPV6 = 41, // IPv6 header

Index: src/include/port/win32.h
===================================================================
--- src/include/port/win32.h (head)
+++ src/include/port/win32.h (work)
@@ -4,7 +4,7 @@
#define WIN32_ONLY_COMPILER
#endif

-#define _WIN32_WINNT 0x0500
+#define _WIN32_WINNT 0x0501
/*
* Always build with SSPI support. Keep it as a #define in case
* we want a switch to disable it sometime in the future.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: _WIN32_WINNT should be 0x0501 in win32.h
Date: 2009-09-07 05:41:55
Message-ID: 9837222c0909062241n617934e6jcf93199ff46650c9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Monday, September 7, 2009, Itagaki Takahiro
<itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
> We should define _WIN32_WINNT as 0x0500 in src/include/port/win32.h,
> but it should be 0x0501 (Windows XP) because IPPROTO_IPV6 will be
> defined only if _WIN32_WINNT >= 0x0501 in the recent Micosoft SDKs.

Hi!

Have you verified that binaries compiled that way still run on windows
2000? I had checking that on my list before making this change...

/Magnus

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/


From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: _WIN32_WINNT should be 0x0501 in win32.h
Date: 2009-09-07 05:53:57
Message-ID: 20090907144856.E6F2.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Magnus Hagander <magnus(at)hagander(dot)net> wrote:

> Have you verified that binaries compiled that way still run on windows
> 2000? I had checking that on my list before making this change...

No, I don't have Windows 2000.

BTW, there is no Windows 2000 animal in the BuildFarm.
We cannot support win2k at all, no?

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: _WIN32_WINNT should be 0x0501 in win32.h
Date: 2009-09-07 11:22:19
Message-ID: 9837222c0909070422q48be4bd0h2da31997b27c2c92@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Sep 7, 2009 at 07:53, Itagaki
Takahiro<itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
>
> Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>
>> Have you verified that binaries compiled that way still run on windows
>> 2000? I had checking that on my list before making this change...
>
> No, I don't have Windows 2000.
>
> BTW, there is no Windows 2000 animal in the BuildFarm.
> We cannot support win2k at all, no?

I could've sworn we did, but clearly we don't :( I guess that means
we're already in "best effort" mode on it. And to be honest, Microsoft
haven't supported Windows 2000 mainstream since 2005 (they do provided
extended support until next year though).

Anyway, this *should* work on Win2k as well, so I have applied it. We
also have _WIN32_WINNT defined in pg_ctl.c, so I updated that one to
be the same.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/


From: Andrew Chernow <ac(at)esilo(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: _WIN32_WINNT should be 0x0501 in win32.h
Date: 2009-09-07 13:14:31
Message-ID: 4AA50737.5040607@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Magnus Hagander wrote:
> On Monday, September 7, 2009, Itagaki Takahiro
> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
>> We should define _WIN32_WINNT as 0x0500 in src/include/port/win32.h,
>> but it should be 0x0501 (Windows XP) because IPPROTO_IPV6 will be
>> defined only if _WIN32_WINNT >= 0x0501 in the recent Micosoft SDKs.
>
> Hi!
>
> Have you verified that binaries compiled that way still run on windows
> 2000? I had checking that on my list before making this change...
>

Yes they do. Our current project uses 0x0501. Windows 2000 is part of our
build farm and a target platform for that project. We set WINVER to the same
value as well.

--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Chernow <ac(at)esilo(dot)com>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: _WIN32_WINNT should be 0x0501 in win32.h
Date: 2009-09-07 13:35:54
Message-ID: 9837222c0909070635w4194909et6612e867b5e5484d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Sep 7, 2009 at 15:14, Andrew Chernow<ac(at)esilo(dot)com> wrote:
> Magnus Hagander wrote:
>>
>> On Monday, September 7, 2009, Itagaki Takahiro
>> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
>>>
>>> We should define _WIN32_WINNT as 0x0500 in src/include/port/win32.h,
>>> but it should be 0x0501 (Windows XP) because IPPROTO_IPV6 will be
>>> defined only if _WIN32_WINNT >= 0x0501 in the recent Micosoft SDKs.
>>
>> Hi!
>>
>> Have you verified that binaries compiled that way still run on windows
>> 2000? I had checking that on my list before making this change...
>>
>
> Yes they do.  Our current project uses 0x0501.  Windows 2000 is part of our
> build farm and a target platform for that project.  We set WINVER to the
> same value as well.

Thanks, then we should be good to go.

If you're actively working with win2k, any chance you can get us a
buildfarm machine on it? :-)

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/


From: Andrew Chernow <ac(at)esilo(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: _WIN32_WINNT should be 0x0501 in win32.h
Date: 2009-09-07 14:04:01
Message-ID: 4AA512D1.9050608@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Magnus Hagander wrote:
> On Mon, Sep 7, 2009 at 15:14, Andrew Chernow<ac(at)esilo(dot)com> wrote:
>> Magnus Hagander wrote:
>>> On Monday, September 7, 2009, Itagaki Takahiro
>>> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
>>>> We should define _WIN32_WINNT as 0x0500 in src/include/port/win32.h,
>>>> but it should be 0x0501 (Windows XP) because IPPROTO_IPV6 will be
>>>> defined only if _WIN32_WINNT >= 0x0501 in the recent Micosoft SDKs.
>>> Hi!
>>>
>>> Have you verified that binaries compiled that way still run on windows
>>> 2000? I had checking that on my list before making this change...
>>>
>> Yes they do. Our current project uses 0x0501. Windows 2000 is part of our
>> build farm and a target platform for that project. We set WINVER to the
>> same value as well.
>
> Thanks, then we should be good to go.
>
> If you're actively working with win2k, any chance you can get us a
> buildfarm machine on it? :-)
>

Sure. I think its an image running on one of our ESXi servers. I'll look into
it tomorrow, not supposed to be working today ;)

--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/