Changeset 3205 for trunk/src/wsock32/new/wsock32.cpp
- Timestamp:
- Mar 23, 2000, 8:21:56 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/new/wsock32.cpp
r3198 r3205 1 /* $Id: wsock32.cpp,v 1.1 6 2000-03-22 20:01:08sandervl Exp $ */1 /* $Id: wsock32.cpp,v 1.17 2000-03-23 19:21:54 sandervl Exp $ */ 2 2 3 3 /* … … 94 94 goto tryagain; 95 95 } 96 else{96 if(iData == NULL) { 97 97 dprintf(("WINSOCK_GetIData: couldn't find struct for thread %x", tid)); 98 98 DebugInt3();// should never happen!!!!!!! … … 145 145 //****************************************************************************** 146 146 //****************************************************************************** 147 ODINPROCEDURE1(WSASetLastError, 148 int,iError) 147 void WIN32API WSASetLastError(int iError) 149 148 { 150 149 // according to the docs, WSASetLastError() is just a call-through 151 150 // to SetLastError() 151 if(iError) { 152 dprintf(("WSASetLastError %x", iError)); 153 } 152 154 SetLastError(iError); 153 155 } 154 156 //****************************************************************************** 155 157 //****************************************************************************** 156 ODINFUNCTION0(int,WSAGetLastError)158 int WIN32API WSAGetLastError() 157 159 { 158 160 return GetLastError(); … … 232 234 233 235 //Close WSAAsyncSelect thread if one was created for this socket 234 EnableAsyncEvent(s, 0L);236 WSAAsyncSelect(s, 0, 0, 0); 235 237 236 238 if(ret == SOCKET_ERROR) { … … 291 293 return SOCKET_ERROR; 292 294 } 295 // clear high word (not used in OS/2's tcpip stack) 296 cmd = LOUSHORT(cmd); 297 293 298 if(cmd != FIONBIO && cmd != FIONREAD && cmd != SIOCATMARK) { 294 299 WSASetLastError(WSAEINVAL); … … 317 322 } 318 323 } 319 // clear high word (not used in OS/2's tcpip stack) 320 ret = ioctl(s, LOUSHORT(cmd), (char *)argp, sizeof(int)); 324 ret = ioctl(s, cmd, (char *)argp, sizeof(int)); 321 325 322 326 // Map EOPNOTSUPP to EINVAL … … 878 882 break; 879 883 default: 884 dprintf(("setsockopt: unknown option %x", optname)); 880 885 WSASetLastError(WSAENOPROTOOPT); 881 886 return SOCKET_ERROR; … … 892 897 } 893 898 else { 899 dprintf(("setsockopt: unknown option %x", optname)); 894 900 WSASetLastError(WSAENOPROTOOPT); 895 901 return SOCKET_ERROR; … … 974 980 break; 975 981 default: 982 dprintf(("getsockopt: unknown option %x", optname)); 976 983 WSASetLastError(WSAENOPROTOOPT); 977 984 return SOCKET_ERROR; … … 988 995 } 989 996 else { 997 dprintf(("getsockopt: unknown option %x", optname)); 990 998 WSASetLastError(WSAENOPROTOOPT); 991 999 return SOCKET_ERROR;
Note:
See TracChangeset
for help on using the changeset viewer.