Index: fe-connect.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v retrieving revision 1.344 diff -c -r1.344 fe-connect.c *** fe-connect.c 20 Feb 2007 15:20:51 -0000 1.344 --- fe-connect.c 8 Mar 2007 12:16:42 -0000 *************** *** 1840,1848 **** #ifdef WIN32 /* ! * Make sure socket support is up and running. Even though this is done in ! * libpqdll.c, that is only for MSVC and BCC builds and doesn't work for ! * static builds at all, so we have to do it in the main code too. */ WSADATA wsaData; --- 1840,1846 ---- #ifdef WIN32 /* ! * Make sure socket support is up and running. */ WSADATA wsaData; Index: libpqdll.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/libpqdll.c,v retrieving revision 1.10 diff -c -r1.10 libpqdll.c *** libpqdll.c 11 Mar 2006 04:38:40 -0000 1.10 --- libpqdll.c 8 Mar 2007 12:05:59 -0000 *************** *** 15,31 **** switch (fdwReason) { case DLL_PROCESS_ATTACH: ! if (WSAStartup(MAKEWORD(1, 1), &wsaData)) ! { ! /* ! * No really good way to do error handling here, since we ! * don't know how we were loaded ! */ ! return FALSE; ! } break; case DLL_PROCESS_DETACH: ! WSACleanup(); break; } --- 15,24 ---- switch (fdwReason) { case DLL_PROCESS_ATTACH: ! /* We used to call WSAStartup() here, but this may cause deadlocks */ break; case DLL_PROCESS_DETACH: ! /* We used to call WSACleanup() here, but this may cause deadlocks */ break; }