Ignore:
Timestamp:
Mar 23, 2000, 8:21:56 PM (25 years ago)
Author:
sandervl
Message:

wsock32\new update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wsock32/new/wsock32.cpp

    r3198 r3205  
    1 /* $Id: wsock32.cpp,v 1.16 2000-03-22 20:01:08 sandervl Exp $ */
     1/* $Id: wsock32.cpp,v 1.17 2000-03-23 19:21:54 sandervl Exp $ */
    22
    33/*
     
    9494        goto tryagain;
    9595    }
    96     else {
     96    if(iData == NULL) {
    9797        dprintf(("WINSOCK_GetIData: couldn't find struct for thread %x", tid));
    9898        DebugInt3();// should never happen!!!!!!!
     
    145145//******************************************************************************
    146146//******************************************************************************
    147 ODINPROCEDURE1(WSASetLastError,
    148                int,iError)
     147void WIN32API WSASetLastError(int iError)
    149148{
    150149  // according to the docs, WSASetLastError() is just a call-through
    151150  // to SetLastError()
     151  if(iError) {
     152        dprintf(("WSASetLastError %x", iError));
     153  }
    152154  SetLastError(iError);
    153155}
    154156//******************************************************************************
    155157//******************************************************************************
    156 ODINFUNCTION0(int,WSAGetLastError)
     158int WIN32API WSAGetLastError()
    157159{
    158160  return GetLastError();
     
    232234
    233235   //Close WSAAsyncSelect thread if one was created for this socket
    234    EnableAsyncEvent(s, 0L);
     236   WSAAsyncSelect(s, 0, 0, 0);
    235237   
    236238   if(ret == SOCKET_ERROR) {
     
    291293        return SOCKET_ERROR;
    292294   }
     295   // clear high word (not used in OS/2's tcpip stack)
     296   cmd = LOUSHORT(cmd);
     297
    293298   if(cmd != FIONBIO && cmd != FIONREAD && cmd != SIOCATMARK) {
    294299        WSASetLastError(WSAEINVAL);
     
    317322        }
    318323   }
    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));
    321325
    322326   // Map EOPNOTSUPP to EINVAL
     
    878882                break;
    879883        default:
     884                dprintf(("setsockopt: unknown option %x", optname));
    880885                WSASetLastError(WSAENOPROTOOPT);
    881886                return SOCKET_ERROR;
     
    892897        }
    893898        else {
     899                dprintf(("setsockopt: unknown option %x", optname));
    894900                WSASetLastError(WSAENOPROTOOPT);
    895901                return SOCKET_ERROR;
     
    974980                break;
    975981        default:
     982                dprintf(("getsockopt: unknown option %x", optname));
    976983                WSASetLastError(WSAENOPROTOOPT);
    977984                return SOCKET_ERROR;
     
    988995        }
    989996        else {
     997                dprintf(("getsockopt: unknown option %x", optname));
    990998                WSASetLastError(WSAENOPROTOOPT);
    991999                return SOCKET_ERROR;
Note: See TracChangeset for help on using the changeset viewer.