[Box Backup-commit] COMMIT r934 - box/chris/merge/test/backupstorepatch

subversion at fluffy.co.uk subversion at fluffy.co.uk
Sat Sep 2 12:02:44 BST 2006


Author: chris
Date: 2006-09-02 12:02:44 +0100 (Sat, 02 Sep 2006)
New Revision: 934

Modified:
   box/chris/merge/test/backupstorepatch/testbackupstorepatch.cpp
Log:
(refs #3)

Initialise Windows sockets on Win32


Modified: box/chris/merge/test/backupstorepatch/testbackupstorepatch.cpp
===================================================================
--- box/chris/merge/test/backupstorepatch/testbackupstorepatch.cpp	2006-09-02 11:01:07 UTC (rev 933)
+++ box/chris/merge/test/backupstorepatch/testbackupstorepatch.cpp	2006-09-02 11:02:44 UTC (rev 934)
@@ -283,6 +283,14 @@
 
 int test(int argc, const char *argv[])
 {
+#ifdef WIN32
+	// Under win32 we must initialise the Winsock library
+	// before using sockets
+
+	WSADATA info;
+	TEST_THAT(WSAStartup(0x0101, &info) != SOCKET_ERROR)
+#endif
+
 	// Allocate a buffer
 	buffer = ::malloc(BUFFER_SIZE);
 	TEST_THAT(buffer != 0);




More information about the Boxbackup-commit mailing list