Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-27 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: The initdb code is failing because we didn't call WSAStartup() - this just took me ages to track down. All the rest works. The attached patch seems to do the trick. Applied. regards, tom lane ---(end

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-26 Thread Petr Jelinek
Andrew Dunstan wrote: I suspected we'd forgotten something. The attached small patch appears to be what's required (at least on loris). make check failed but not for any apparent ipv6 reason. More importantly, we correctly set HAVE_IPV6 and HAVE_STRUCT_ADDRINFO. Well this is what I ment

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-26 Thread Andrew Dunstan
Petr Jelinek wrote: Andrew Dunstan wrote: I suspected we'd forgotten something. The attached small patch appears to be what's required (at least on loris). make check failed but not for any apparent ipv6 reason. More importantly, we correctly set HAVE_IPV6 and HAVE_STRUCT_ADDRINFO.

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-26 Thread Petr Jelinek
Andrew Dunstan wrote: The patch I sent should be exactly what is required to have HAVE_IPV6 and HAVE_STRUCT_ADDRINFO defined on windows. That should be true regardless of which windows you are building on - the headers should be the same. Oh, if that include makes HAVE_IPV6 defined than it

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-26 Thread Andrew Dunstan
Petr Jelinek wrote: So I hope IPv6 episode is finally over :) Almost :-) The initdb code is failing because we didn't call WSAStartup() - this just took me ages to track down. All the rest works. The attached patch seems to do the trick. cheers andrew Index: initdb.c

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Petr Jelinek
Dave Page wrote: It, or some related patch appears to have broken the build on buildfarm member snake. I haven't had time to investigate. /D Atached patch fixes it and also adds proper gai_strerror for windows. (It's patch against CVS *after* Chucks patch was aplied) -- Regards Petr

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Andrew Dunstan
Petr Jelinek wrote: Dave Page wrote: It, or some related patch appears to have broken the build on buildfarm member snake. I haven't had time to investigate. /D Atached patch fixes it and also adds proper gai_strerror for windows. (It's patch against CVS *after* Chucks patch was

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Tom Lane
Petr Jelinek [EMAIL PROTECTED] writes: Dave Page wrote: It, or some related patch appears to have broken the build on buildfarm member snake. Atached patch fixes it and also adds proper gai_strerror for windows. Applied. I had to #ifdef the gai_strerror additions to avoid breakage on my

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Petr Jelinek
Andrew Dunstan wrote: I thought this had been tested. I should have tested it myself. Apologies. Right, I thought I tested it, well maybe it was my version dunno but surely it was my mistake. Anyway, with Petr's extra patch I get a clean build, but make check fails with a postmaster bind

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Tom Lane
Petr Jelinek [EMAIL PROTECTED] writes: Andrew Dunstan wrote: So, not quite there yet. [I did make check only in W2K because I don't have direct access to XP machine now] No thats not windows error thats postgres error (look at pqcomm.c), which means HAVE_IPV6 is not defined. Possibly, but

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Petr Jelinek
Tom Lane wrote: Possibly, but that's apparently not the only problem. I'm looking at the first buildfarm result with this patch, http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=lorisdt=2005-08-25%2018:56:02 The interesting part is the postmaster log at the bottom: LOG: could not bind IPv4

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Tom Lane
Petr Jelinek [EMAIL PROTECTED] writes: Yep those changes proposed in my previous email fixes IPv4 too. Apparently not on loris (unless there was another patch that I missed). Maybe something to do with a different version of Windows? regards, tom lane

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Andrew Dunstan
Tom Lane wrote: Petr Jelinek [EMAIL PROTECTED] writes: Yep those changes proposed in my previous email fixes IPv4 too. Apparently not on loris (unless there was another patch that I missed). Maybe something to do with a different version of Windows? I

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Chuck McDevitt
I don't understand this proposed patch. Pulling in more headers, when they aren't needed, shouldn't change the behavior of the code... What am I missing? -Original Message- From: Andrew Dunstan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 25, 2005 4:03 PM To: Tom Lane Cc: Petr

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Chuck McDevitt
The No error message occurs because pqcomm.c assumes bind returns the error code in errno, but on Windows it gets returned by WSAGetLastError().This bug probably exists in many places in the code. The actual error should have said: LOG: could not bind IPv6 socket: The system detected an

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Tom Lane
Chuck McDevitt [EMAIL PROTECTED] writes: It turns out the root of the bug is that our definition of addrinfo and Windows definition of addrinfo are not the same. ... which answers your question about why it's important to pull in Microsoft's header. That should ensure that the code uses

Re: [PATCHES] [HACKERS] Proposed patch to getaddrinfo.c to support

2005-08-25 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: I suspected we'd forgotten something. The attached small patch appears to be what's required (at least on loris). make check failed but not for any apparent ipv6 reason. More importantly, we correctly set HAVE_IPV6 and HAVE_STRUCT_ADDRINFO.