Re: [PATCHES] Client build of MSVC6+ patch
Patch applied. Change made so test is WIN32, and add comment about different structure ordering on Win32 for IPv6 use. Thanks. --- Hiroshi Saito wrote: Hi. Tom-san. Oops, I understood it. Thank you for suggestion. What condition is this? Regards, Hiroshi Saito From: Tom Lane Hiroshi Saito [EMAIL PROTECTED] writes: Why do we need to reorder the fields in the struct? Eh? Even my FreeBSD used well shows a structure object. The standard lists the fields in the other order: http://www.opengroup.org/onlinepubs/009695399/basedefs/netdb.h.html Even though the standard doesn't say that that has to be the physical order, every other platform besides Windows does it that way. The patch as given is unacceptable because it *will* break other platforms (mine for instance ;-)). If it has to be this way for Windows then we need some sort of platform-specific #ifdef. Considering that the code works as-is on several sorts of Windows builds, we probably need something even more specific than that, like #if MSVC-before-version-XX. regards, tom lane [ Attachment, skipping... ] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [PATCHES] Client build of MSVC6+ patch
I am thinking this patch needs to be applied, and the #ifdef test changed to WIN32 so both MinGW and MSVC use the changed structure ordering. Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --- Hiroshi Saito wrote: Hi. Tom-san. Oops, I understood it. Thank you for suggestion. What condition is this? Regards, Hiroshi Saito From: Tom Lane Hiroshi Saito [EMAIL PROTECTED] writes: Why do we need to reorder the fields in the struct? Eh? Even my FreeBSD used well shows a structure object. The standard lists the fields in the other order: http://www.opengroup.org/onlinepubs/009695399/basedefs/netdb.h.html Even though the standard doesn't say that that has to be the physical order, every other platform besides Windows does it that way. The patch as given is unacceptable because it *will* break other platforms (mine for instance ;-)). If it has to be this way for Windows then we need some sort of platform-specific #ifdef. Considering that the code works as-is on several sorts of Windows builds, we probably need something even more specific than that, like #if MSVC-before-version-XX. regards, tom lane [ Attachment, skipping... ] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] Client build of MSVC6+ patch
Why do we need to reorder the fields in the struct? Eh? Even my FreeBSD used well shows a structure object. The standard lists the fields in the other order: http://www.opengroup.org/onlinepubs/009695399/basedefs/netdb.h.html Even though the standard doesn't say that that has to be the physical order, every other platform besides Windows does it that way. The patch as given is unacceptable because it *will* break other platforms (mine for instance ;-)). If it has to be this way for Windows then we need some sort of platform-specific #ifdef. Considering that the code works as-is on several sorts of Windows builds, we probably need something even more specific than that, like #if MSVC-before-version-XX. Haven't dug into the details, but it just feels a bit off that this shuold be depending on the compiler. MSVC6 and MingW uses the same runtime library, and I would've expected it to be more depending on that than on the compiler itself? That said, where does the problem actually show up, Hiroshi? If it's just at runtime, I'm not so sure it works on MingW - AFAIK it's at least not tested on the buildfarm. And I haven't tested IPV6 on newer versions of MSVC. //Magnus ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[PATCHES] Client build of MSVC6+ patch
Hi Bruce-san, and Magnus-san. I take out patch for this as a promise. This is client-build support of MS-VC6+. However, It leaves the problem of IPV6.:-( Regards, Hiroshi Saito msvc_patch Description: Binary data ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [PATCHES] Client build of MSVC6+ patch
Hi Bruce-san, and Magnus-san. I take out patch for this as a promise. This is client-build support of MS-VC6+. However, It leaves the problem of IPV6.:-( Hi! This patch looks a lot better to me. What is the problem with IPV6? Did I break that with my changes to getaddrinfo.c, or is it something else? //Magnus ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [PATCHES] Client build of MSVC6+ patch
Magnus Hagander wrote: What is the problem with IPV6? Did I break that with my changes to getaddrinfo.c, or is it something else? If IPv6 gets broken after all the trouble several of us went to I'll be annoyed. :-) cheers andrew ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [PATCHES] Client build of MSVC6+ patch
Hi. If IPv6 gets broken after all the trouble several of us went to I'll be annoyed. :-) Um, I think that this was the origin in problem.:-) Regards, Hiroshi Saito getaddrinfo_patch Description: Binary data ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [PATCHES] Client build of MSVC6+ patch
Hiroshi Saito said: Hi. If IPv6 gets broken after all the trouble several of us went to I'll be annoyed. :-) Um, I think that this was the origin in problem.:-) Why do we need to reorder the fields in the struct? cheers andrew ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [PATCHES] Client build of MSVC6+ patch
Hi. If IPv6 gets broken after all the trouble several of us went to I'll be annoyed. :-) Um, I think that this was the origin in problem.:-) Why do we need to reorder the fields in the struct? Eh? Even my FreeBSD used well shows a structure object. (FreeBSD) /usr/include/netdb.h struct addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ int ai_family; /* PF_xxx */ int ai_socktype;/* SOCK_xxx */ int ai_protocol;/* 0 or IPPROTO_xxx for IPv4 and IPv6 */ size_t ai_addrlen; /* length of ai_addr */ char*ai_canonname; /* canonical name for hostname */ struct sockaddr *ai_addr; /* binary address */ struct addrinfo *ai_next; /* next structure in linked list */ }; Then, It was helped actually. Regards, Hiroshi Saito ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [PATCHES] Client build of MSVC6+ patch
Hiroshi Saito [EMAIL PROTECTED] writes: Why do we need to reorder the fields in the struct? Eh? Even my FreeBSD used well shows a structure object. The standard lists the fields in the other order: http://www.opengroup.org/onlinepubs/009695399/basedefs/netdb.h.html Even though the standard doesn't say that that has to be the physical order, every other platform besides Windows does it that way. The patch as given is unacceptable because it *will* break other platforms (mine for instance ;-)). If it has to be this way for Windows then we need some sort of platform-specific #ifdef. Considering that the code works as-is on several sorts of Windows builds, we probably need something even more specific than that, like #if MSVC-before-version-XX. regards, tom lane ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] Client build of MSVC6+ patch
Hi. Tom-san. Oops, I understood it. Thank you for suggestion. What condition is this? Regards, Hiroshi Saito From: Tom Lane Hiroshi Saito [EMAIL PROTECTED] writes: Why do we need to reorder the fields in the struct? Eh? Even my FreeBSD used well shows a structure object. The standard lists the fields in the other order: http://www.opengroup.org/onlinepubs/009695399/basedefs/netdb.h.html Even though the standard doesn't say that that has to be the physical order, every other platform besides Windows does it that way. The patch as given is unacceptable because it *will* break other platforms (mine for instance ;-)). If it has to be this way for Windows then we need some sort of platform-specific #ifdef. Considering that the code works as-is on several sorts of Windows builds, we probably need something even more specific than that, like #if MSVC-before-version-XX. regards, tom lane getaddrinfo_patch2 Description: Binary data ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings