Index: autoload.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/autoload.cc,v retrieving revision 1.62 diff -u -p -r1.62 autoload.cc --- autoload.cc 20 Feb 2003 11:12:44 -0000 1.62 +++ autoload.cc 24 Feb 2003 19:31:48 -0000 @@ -240,12 +240,15 @@ std_dll_init () return ret.ll; } +#include + /* Initialization function for winsock stuff. */ static long long wsock_init () __asm__ ("wsock_init") __attribute__ ((unused, regparm(1))); bool NO_COPY wsock_started = 0; static long long wsock_init () { + printf("wsock_init(): wsock_started = %ld\n", wsock_started); static LONG NO_COPY here = -1L; struct func_info *func = (struct func_info *) __builtin_return_address (0); struct dll_info *dll = func->dll; @@ -273,9 +276,14 @@ wsock_init () wsastartup = (int (*)(int, WSADATA *)) GetProcAddress ((HMODULE) (dll->handle), "WSAStartup"); + printf("wsock_init(): wsastartup = %p\n", wsastartup); if (wsastartup) { int res = wsastartup ((2<<8) | 2, &wsadata); + printf("wsock_init(): wsastartup() returned %d\n", res); + if (res == 0) + printf("winsock_active = %ld, winsock2_active = %ld\n", + winsock_active, winsock2_active); debug_printf ("res %d", res); debug_printf ("wVersion %d", wsadata.wVersion);