[Checked in 1998-10-02. The symptom is typically something like "cannot bind to socket: Invalid argument" (when running CVS for the second or subsequent time). -kingdon] 1998-09-02 Jim Kingdon * config.h: Define SYSTEM_CLEANUP. * win32.c (wnt_cleanup): New function, implements it. Index: config.h =================================================================== RCS file: /home2/cvsroot/ccvs/windows-NT/config.h,v retrieving revision 1.31 diff -c -r1.31 config.h *** config.h 1998/06/11 21:58:58 1.31 --- config.h 1998/09/02 15:55:00 *************** *** 288,293 **** --- 288,295 ---- #define SYSTEM_INITIALIZE(pargc,pargv) init_winsock() extern void init_winsock(); + #define SYSTEM_CLEANUP() wnt_cleanup + extern void wnt_cleanup (); #define HAVE_WINSOCK_H Index: win32.c =================================================================== RCS file: /home2/cvsroot/ccvs/windows-NT/win32.c,v retrieving revision 1.6 diff -c -r1.6 win32.c *** win32.c 1997/07/09 06:35:16 1.6 --- win32.c 1998/09/02 15:50:14 *************** *** 27,32 **** --- 27,46 ---- } } + void + wnt_cleanup () + { + if (WSACleanup ()) + { + /* FIXME: how are we supposed to report errors? As of now + (Aug 98), error() can in turn call us (if it is out of + memory) and in general is built on top of lots of + stuff (especially for the CVS server). */ + /* mumble, WSAGetLastError (), sock_strerror, mumble. */ + ; + } + } + unsigned sleep(unsigned seconds) { Sleep(1000*seconds);