Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-19 Thread Tom Lane
Dave Page dp...@pgadmin.org writes: On Tue, Nov 16, 2010 at 10:01 AM, Magnus Hagander mag...@hagander.net wrote: On Tue, Nov 16, 2010 at 01:35, Tom Lane t...@sss.pgh.pa.us wrote: BTW, it seems like it'd be a good thing if we had a Win64 machine in the buildfarm. Yes. I actually thought we

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-19 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Tue, Nov 16, 2010 at 11:01, Magnus Hagander mag...@hagander.net wrote: So yes, it looks completely broken. I guess Windows doesn't actually *assign* you a handle larger than 2^32 until you actually ahve that many open handles. Typical values on my

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-19 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Tue, Nov 16, 2010 at 16:23, Tom Lane t...@sss.pgh.pa.us wrote: What's not clear to me is whether the section title means that only certain handles have this guarantee, and if so whether we have to worry about running into ones that don't. I

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-17 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: Do you still have a reference to the page that said they will never be assigned that high? http://msdn.microsoft.com/en-us/library/ms810720.aspx which says USER and GDI handles are sign extended 32b values To facilitate the porting, a

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 01:35, Tom Lane t...@sss.pgh.pa.us wrote: ... and if so, isn't postmaster.c's code to transfer a HANDLE value to a child process all wet? It is definitely 64-bit. sizeof(HANDLE)==8. So yes, it looks completely broken. I guess Windows doesn't actually *assign* you a

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Dave Page
On Tue, Nov 16, 2010 at 10:01 AM, Magnus Hagander mag...@hagander.net wrote: On Tue, Nov 16, 2010 at 01:35, Tom Lane t...@sss.pgh.pa.us wrote: ... and if so, isn't postmaster.c's code to transfer a HANDLE value to a child process all wet? It is definitely 64-bit. sizeof(HANDLE)==8. So yes,

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 11:01, Magnus Hagander mag...@hagander.net wrote: On Tue, Nov 16, 2010 at 01:35, Tom Lane t...@sss.pgh.pa.us wrote: ... and if so, isn't postmaster.c's code to transfer a HANDLE value to a child process all wet? It is definitely 64-bit. sizeof(HANDLE)==8. So yes, it

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 15:42, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Tue, Nov 16, 2010 at 11:01, Magnus Hagander mag...@hagander.net wrote: So yes, it looks completely broken. I guess Windows doesn't actually *assign* you a handle larger than 2^32

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 16:23, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: Do you still have a reference to the page that said they will never be assigned that high? http://msdn.microsoft.com/en-us/library/ms810720.aspx which says    USER and GDI handles

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 16:35, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Tue, Nov 16, 2010 at 16:23, Tom Lane t...@sss.pgh.pa.us wrote: What's not clear to me is whether the section title means that only certain handles have this guarantee, and if so

[HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-15 Thread Tom Lane
... and if so, isn't postmaster.c's code to transfer a HANDLE value to a child process all wet? sprintf(paramHandleStr, %lu, (DWORD) paramHandle); ... paramHandle = (HANDLE) atol(id); BTW, it seems like it'd be a good thing if we had a Win64 machine in the buildfarm.