From: | Dmitry Samersoff <dms(at)wplus(dot)net> |
---|---|
To: | Edmund Mergl <E(dot)Mergl(at)bawue(dot)de> |
Cc: | PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | RE: [HACKERS] Win32 pЭort of libpq |
Date: | 1999-09-30 11:43:37 |
Message-ID: | XFMail.990930154337.dms@wplus.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 30-Sep-99 Edmund Mergl wrote:
> Hi,
>
> in the last few days I compiled libpq on Windows NT
> using MS Visual Studio 6.0. I followed the instructions
> given by Bob Kline <bkline(at)rksystems(dot)com> in his mail from
> Fri, 3 Sep 1999.
> Unfortuanetely he sent his mail only to dbi-users, so I would
> like to repeat one major problem on this list.
>
> Here is an excerpt from his mail:
>
> 4. The DllMain function in src/interfaces/libpq/libpqdll.c of the
> PostgreSQL 6.5 sources, in which WSAStartup is invoked, is never called,
> which causes gethostbyname calls to fail. Solution (more properly,
> "kludge" -- I know there's a cleaner fix somewhere, but this works for
> now): immediately after the local declarations for the connectDB function
> in src/interfaces/libpq/fe-connect.c:
>
>#ifdef WIN32
> static int WeHaveCalledWSAStartup;
>
> if (!WeHaveCalledWSAStartup) {
> WSADATA wsaData;
> if (WSAStartup(MAKEWORD(1, 1), &wsaData)) {
> sprintf(conn->errorMessage,
> "WSAStartup failed: errno=%d\n", h_errno);
> goto connect_errReturn;
> }
> WeHaveCalledWSAStartup = 1;
> }
>#endif
You need not to take care wether WSAStartup is alredy called or not.
Windows handle it automatically.
---
Dmitry Samersoff, dms(at)wplus(dot)net, ICQ:3161705
http://devnull.wplus.net
* There will come soft rains ...
From | Date | Subject | |
---|---|---|---|
Next Message | Vince Vielhaber | 1999-09-30 12:06:31 | RE: [HACKERS] Win32 pЭort of libpq |
Previous Message | Jan Wieck | 1999-09-30 10:36:15 | prosrc index removed |