[Box Backup-commit] COMMIT r941 - box/chris/merge/infrastructure
subversion@fluffy.co.uk
subversion@fluffy.co.uk
Sat, 02 Sep 2006 12:16:22 +0100
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
{