- Timestamp:
- Nov 21, 1999, 4:22:18 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/wsock32.cpp
r1691 r1798 1 /* $Id: wsock32.cpp,v 1.1 3 1999-11-10 16:39:46phaller Exp $ */1 /* $Id: wsock32.cpp,v 1.14 1999-11-21 15:22:18 phaller Exp $ */ 2 2 3 3 /* … … 92 92 #endif 93 93 94 95 // forwarder prototypes96 void _System SetLastError(int iError);97 int _System GetLastError(void);98 94 99 95 … … 128 124 * Local variables * 129 125 *****************************************************************************/ 130 131 // @@@PH not reentrancy proof132 //<_sandervl> phs: I already have a rewrite of the error support in wsock. Use the133 // GetThreadTHDB export in kernel32 and add a DWORD to the thread134 // structure in include\win\thread.h135 126 136 127 typedef struct tagWsockThreadData … … 983 974 int, namelen) 984 975 { 985 return gethostname(name,namelen); 976 int rc = gethostname(name,namelen); 977 978 if (rc == SOCKET_ERROR) 979 WSASetLastError(ERROR_SUCCESS); 980 else 981 WSASetLastError(iTranslateSockErrToWSock(sock_errno())); 982 983 return (rc); 986 984 } 987 985 … … 1192 1190 } 1193 1191 else 1194 return(iTranslateSockErrToWSock(sock_errno())); 1192 { 1193 WSASetLastError(iTranslateSockErrToWSock(sock_errno())); 1194 return(WSASYSNOTREADY); 1195 } 1195 1196 } 1196 1197 … … 1210 1211 ODINFUNCTION0(int,OS2WSACleanup) 1211 1212 { 1213 WSASetLastError(ERROR_SUCCESS); 1212 1214 return 0; 1213 1215 }
Note:
See TracChangeset
for help on using the changeset viewer.