Windows now builds and runs selftest correctly, and fixed a Windows (and possibly other platforms) issue in Phy<>.

This commit is contained in:
Adam Ierymenko 2015-04-24 15:05:28 -07:00
parent 54954f5b88
commit f5848972f9
12 changed files with 223 additions and 112 deletions

View file

@ -628,7 +628,7 @@ struct TestPhyHandlers
{
std::string *testMessage = (std::string *)*uptr;
if ((testMessage)&&(testMessage->length() > 0)) {
long sent = testPhyInstance->tcpSend(sock,(const void *)testMessage->data(),testMessage->length(),true);
long sent = testPhyInstance->tcpSend(sock,(const void *)testMessage->data(),(unsigned long)testMessage->length(),true);
if (sent > 0)
testMessage->erase(0,sent);
}
@ -804,6 +804,11 @@ int main(int argc,char **argv)
{
int r = 0;
#ifdef __WINDOWS__
WSADATA wsaData;
WSAStartup(MAKEWORD(2,2),&wsaData);
#endif
// Code to generate the C25519 test vectors -- did this once and then
// put these up top so that we can ensure that every platform produces
// the same result.