Merge pull request #8767 from andyque/fixIOSIssue

fix winRT macro
This commit is contained in:
minggo 2014-10-17 10:26:14 +08:00
commit f537877116
1 changed files with 3 additions and 3 deletions

View File

@ -519,7 +519,7 @@ void TestController::autorun()
hints.ai_flags = 0; hints.ai_flags = 0;
hints.ai_protocol = 0; /* Any protocol */ hints.ai_protocol = 0; /* Any protocol */
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
WSADATA wsaData; WSADATA wsaData;
WSAStartup(MAKEWORD(2, 2),&wsaData); WSAStartup(MAKEWORD(2, 2),&wsaData);
#endif #endif
@ -545,7 +545,7 @@ void TestController::autorun()
if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1) if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1)
break; /* Success */ break; /* Success */
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
closesocket(sfd); closesocket(sfd);
#else #else
close(sfd); close(sfd);
@ -581,7 +581,7 @@ void TestController::autorun()
strcpy(cmd, tmp.c_str()); strcpy(cmd, tmp.c_str());
send(sfd,cmd,strlen(cmd),0); send(sfd,cmd,strlen(cmd),0);
wait(1); wait(1);
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
closesocket(sfd); closesocket(sfd);
WSACleanup(); WSACleanup();
#else #else