[Box Backup-commit] COMMIT r1112 - box/trunk/infrastructure

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Fri Oct 27 20:06:13 BST 2006


Author: chris
Date: 2006-10-27 20:06:13 +0100 (Fri, 27 Oct 2006)
New Revision: 1112

Modified:
   box/trunk/infrastructure/buildenv-testmain-template.cpp
Log:
Automatically initialise Windows sockets for all tests.


Modified: box/trunk/infrastructure/buildenv-testmain-template.cpp
===================================================================
--- box/trunk/infrastructure/buildenv-testmain-template.cpp	2006-10-27 19:05:09 UTC (rev 1111)
+++ box/trunk/infrastructure/buildenv-testmain-template.cpp	2006-10-27 19:06:13 UTC (rev 1112)
@@ -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