Unix Technical Forum

beta2 no longer builds with MSVC?

This is a discussion on beta2 no longer builds with MSVC? within the pgsql Hackers forums, part of the PostgreSQL category; --> Has anybody tried building beta2 or later with MSVC? It doesn'ät work for me - it builds fine, but ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 06:11 AM
Magnus Hagander
 
Posts: n/a
Default beta2 no longer builds with MSVC?

Has anybody tried building beta2 or later with MSVC? It doesn'ät work for me - it builds fine, but whenever I run with it I get a coredump from it whenever I try to connect.

If I revert it to the 8.0 version of port/getaddrinfo.c, things work again.

The problem shows itself in that conn->addr_cur->ai_addr is NULL when it reaches the "CONNECTION_NEEDED" branch in PQconnectPoll().


Compiling with MingW appears to work fine.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 06:14 AM
Bruce Momjian
 
Posts: n/a
Default Re: beta2 no longer builds with MSVC?

Magnus Hagander wrote:
> Has anybody tried building beta2 or later with MSVC? It doesn'?t work
> for me - it builds fine, but whenever I run with it I get a coredump
> from it whenever I try to connect.
>
> If I revert it to the 8.0 version of port/getaddrinfo.c, things work
> again.
>
> The problem shows itself in that conn->addr_cur->ai_addr is NULL when
> it reaches the "CONNECTION_NEEDED" branch in PQconnectPoll().
>
>
> Compiling with MingW appears to work fine.


Strange. Would you try this patch and see if it helps? It disables the
lookups to call the Win32-native getaddrinfo routines.

(I know you are busy so maybe someone else can test MSVC.)

Another posssible fix would be to do a 'continue' in the loop if
conn->addr_cur->ai_addr is NULL, and see if that works.

--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Index: src/port/getaddrinfo.c
================================================== =================
RCS file: /cvsroot/pgsql/src/port/getaddrinfo.c,v
retrieving revision 1.20
diff -c -c -r1.20 getaddrinfo.c
*** src/port/getaddrinfo.c 13 Oct 2005 23:22:11 -0000 1.20
--- src/port/getaddrinfo.c 13 Oct 2005 23:24:56 -0000
***************
*** 70,75 ****
--- 70,77 ----
void *hLibrary = NULL;
static bool alreadyLookedForIpv6routines = false;

+ return false;
+
if (alreadyLookedForIpv6routines)
return (getaddrinfo_ptr != NULL);



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:51 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com