Changeset 4537 for pjproject/trunk/pjlib/src/pj/sock_bsd.c
- Timestamp:
- Jun 19, 2013 6:47:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/sock_bsd.c
r4233 r4537 61 61 #ifdef SOL_IP 62 62 const pj_uint16_t PJ_SOL_IP = SOL_IP; 63 #elif defined(PJ_WIN32) && PJ_WIN3263 #elif (defined(PJ_WIN32) && PJ_WIN32) || (defined(PJ_WIN64) && PJ_WIN64) 64 64 const pj_uint16_t PJ_SOL_IP = IPPROTO_IP; 65 65 #else … … 71 71 #elif defined(IPPROTO_TCP) 72 72 const pj_uint16_t PJ_SOL_TCP = IPPROTO_TCP; 73 #elif defined(PJ_WIN32) && PJ_WIN3273 #elif (defined(PJ_WIN32) && PJ_WIN32) || (defined(PJ_WIN64) && PJ_WIN64) 74 74 const pj_uint16_t PJ_SOL_TCP = IPPROTO_TCP; 75 75 #else … … 81 81 #elif defined(IPPROTO_UDP) 82 82 const pj_uint16_t PJ_SOL_UDP = IPPROTO_UDP; 83 #elif defined(PJ_WIN32) && PJ_WIN3283 #elif (defined(PJ_WIN32) && PJ_WIN32) || (defined(PJ_WIN64) && PJ_WIN64) 84 84 const pj_uint16_t PJ_SOL_UDP = IPPROTO_UDP; 85 85 #else … … 89 89 #ifdef SOL_IPV6 90 90 const pj_uint16_t PJ_SOL_IPV6 = SOL_IPV6; 91 #elif defined(PJ_WIN32) && PJ_WIN3291 #elif (defined(PJ_WIN32) && PJ_WIN32) || (defined(PJ_WIN64) && PJ_WIN64) 92 92 # if defined(IPPROTO_IPV6) || (_WIN32_WINNT >= 0x0501) 93 93 const pj_uint16_t PJ_SOL_IPV6 = IPPROTO_IPV6; … … 305 305 return PJ_SUCCESS; 306 306 307 #elif defined(PJ_WIN32) || defined(PJ_WIN 32_WINCE)307 #elif defined(PJ_WIN32) || defined(PJ_WIN64) || defined(PJ_WIN32_WINCE) 308 308 /* 309 309 * Implementation on Windows, using WSAStringToAddress(). … … 379 379 return PJ_SUCCESS; 380 380 381 #elif defined(PJ_WIN32) || defined(PJ_WIN 32_WINCE)381 #elif defined(PJ_WIN32) || defined(PJ_WIN64) || defined(PJ_WIN32_WINCE) 382 382 /* 383 383 * Implementation on Windows, using WSAAddressToString(). … … 462 462 } 463 463 464 #if defined(PJ_WIN32) 464 #if defined(PJ_WIN32) || defined(PJ_WIN64) 465 465 /* 466 466 * Create new socket/endpoint for communication and returns a descriptor. … … 475 475 /* Sanity checks. */ 476 476 PJ_ASSERT_RETURN(sock!=NULL, PJ_EINVAL); 477 PJ_ASSERT_RETURN(( unsigned)PJ_INVALID_SOCKET==INVALID_SOCKET,477 PJ_ASSERT_RETURN((SOCKET)PJ_INVALID_SOCKET==INVALID_SOCKET, 478 478 (*sock=PJ_INVALID_SOCKET, PJ_EINVAL)); 479 479 … … 600 600 PJ_CHECK_STACK(); 601 601 #if defined(PJ_WIN32) && PJ_WIN32!=0 || \ 602 defined(PJ_WIN64) && PJ_WIN64 != 0 || \ 602 603 defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0 603 604 rc = closesocket(sock); … … 660 661 #endif 661 662 662 *len = send(sock, (const char*)buf, *len, flags);663 *len = send(sock, (const char*)buf, (int)(*len), flags); 663 664 664 665 if (*len < 0) … … 684 685 CHECK_ADDR_LEN(to, tolen); 685 686 686 *len = sendto(sock, (const char*)buf, *len, flags,687 *len = sendto(sock, (const char*)buf, (int)(*len), flags, 687 688 (const struct sockaddr*)to, tolen); 688 689 … … 704 705 PJ_ASSERT_RETURN(buf && len, PJ_EINVAL); 705 706 706 *len = recv(sock, (char*)buf, *len, flags);707 *len = recv(sock, (char*)buf, (int)(*len), flags); 707 708 708 709 if (*len < 0) … … 725 726 PJ_ASSERT_RETURN(buf && len, PJ_EINVAL); 726 727 727 *len = recvfrom(sock, (char*)buf, *len, flags,728 *len = recvfrom(sock, (char*)buf, (int)(*len), flags, 728 729 (struct sockaddr*)from, (socklen_t*)fromlen); 729 730
Note: See TracChangeset
for help on using the changeset viewer.