[Box Backup-commit] COMMIT r941 - box/chris/merge/infrastructure

subversion at fluffy.co.uk subversion at fluffy.co.uk
Sat Sep 2 12:16:22 BST 2006


Author: chris
Date: 2006-09-02 12:16:22 +0100 (Sat, 02 Sep 2006)
New Revision: 941

Modified:
   box/chris/merge/infrastructure/buildenv-testmain-template.cpp
Log:
(refs #3)

Automatically initialise Windows sockets for all tests


Modified: box/chris/merge/infrastructure/buildenv-testmain-template.cpp
===================================================================
--- box/chris/merge/infrastructure/buildenv-testmain-template.cpp	2006-09-02 11:12:01 UTC (rev 940)
+++ box/chris/merge/infrastructure/buildenv-testmain-template.cpp	2006-09-02 11:16:22 UTC (rev 941)
@@ -103,6 +103,14 @@
 
 		// banner
 		printf("Running test TEST_NAME in " MODE_TEXT " mode...\n");
+
+		#ifdef WIN32
+			// Under win32 we must initialise the Winsock library
+			// before using sockets
+
+			WSADATA info;
+			TEST_THAT(WSAStartup(0x0101, &info) != SOCKET_ERROR)
+		#endif
 	}
 	try
 	{




More information about the Boxbackup-commit mailing list