+Tue Jun 8 15:26:21 1999 Alexandra Ellwood <lxs@mit.edu>
+
+ * changepw.c: Changed errno to SOCKET_ERRNO/SOCKET_SET_ERRNO
+ after socket operations to work with new Mac OT SocketsLib.
+
+ * hst_realm.c: Changed errno to SOCKET_ERRNO/SOCKET_SET_ERRNO
+ after socket operations to work with new Mac OT SocketsLib.
+
+ * localaddr.c: Changed errno to SOCKET_ERRNO/SOCKET_SET_ERRNO
+ after socket operations to work with new Mac OT SocketsLib.
+
+ * net_read.c: Changed errno to SOCKET_ERRNO/SOCKET_SET_ERRNO
+ after socket operations to work with new Mac OT SocketsLib.
+
+ * net_write.c: Changed errno to SOCKET_ERRNO/SOCKET_SET_ERRNO
+ after socket operations to work with new Mac OT SocketsLib.
+
+ * sn2princ.c: Changed errno to SOCKET_ERRNO/SOCKET_SET_ERRNO
+ after socket operations to work with new Mac OT SocketsLib.
+
Mon May 10 15:26:20 1999 Danilo Almeida <dalmeida@mit.edu>
* Makefile.in: Do win32 build in subdir.
if ((s1 = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET) {
free(addr_p);
- return(errno);
+ return(SOCKET_ERRNO);
}
if ((s2 = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET) {
free(addr_p);
- return(errno);
+ return(SOCKET_ERRNO);
}
for (i=0; i<out; i++) {
if (connect(s2, &addr_p[i], sizeof(addr_p[i])) == SOCKET_ERROR) {
-#ifndef HAVE_MACSOCK_H
- if ((cc < 0) && ((errno == ECONNREFUSED) ||
- (errno == EHOSTUNREACH)))
-#endif
+ if ((cc < 0) && ((SOCKET_ERRNO == ECONNREFUSED) ||
+ (SOCKET_ERRNO == EHOSTUNREACH)))
continue; /* try the next addr */
free(addr_p);
closesocket(s1);
closesocket(s2);
- return(errno);
+ return(SOCKET_ERRNO);
}
addrlen = sizeof(local_addr);
if (getsockname(s2, &local_addr, &addrlen) < 0) {
-#ifndef HAVE_MACSOCK_H
- if ((errno == ECONNREFUSED) ||
- (errno == EHOSTUNREACH))
-#endif
+ if ((SOCKET_ERRNO == ECONNREFUSED) ||
+ (SOCKET_ERRNO == EHOSTUNREACH))
continue; /* try the next addr */
free(addr_p);
closesocket(s1);
closesocket(s2);
- return(errno);
+ return(SOCKET_ERRNO);
}
/* some brain-dead OS's don't return useful information from
addrlen = sizeof(remote_addr);
if (getpeername(s2, &remote_addr, &addrlen) < 0) {
-#ifndef HAVE_MACSOCK_H
- if ((errno == ECONNREFUSED) ||
- (errno == EHOSTUNREACH))
-#endif
+ if ((SOCKET_ERRNO == ECONNREFUSED) ||
+ (SOCKET_ERRNO == EHOSTUNREACH))
continue; /* try the next addr */
free(addr_p);
closesocket(s1);
closesocket(s2);
- return(errno);
+ return(SOCKET_ERRNO);
}
remote_kaddr.addrtype = ADDRTYPE_INET;
(struct sockaddr *) &addr_p[i],
sizeof(addr_p[i]))) !=
chpw_req.length) {
-#ifndef HAVE_MACSOCK_H
- if ((cc < 0) && ((errno == ECONNREFUSED) ||
- (errno == EHOSTUNREACH)))
-#endif
+ if ((cc < 0) && ((SOCKET_ERRNO == ECONNREFUSED) ||
+ (SOCKET_ERRNO == EHOSTUNREACH)))
continue; /* try the next addr */
free(addr_p);
closesocket(s1);
closesocket(s2);
- return((cc < 0)?errno:ECONNABORTED);
+ return((cc < 0)?SOCKET_ERRNO:ECONNABORTED);
}
krb5_xfree(chpw_req.data);
free(addr_p);
closesocket(s1);
closesocket(s2);
- return(errno);
+ return(SOCKET_ERRNO);
}
closesocket(s1);
free(addr_p);
closesocket(s1);
closesocket(s2);
- return(errno);
+ return(SOCKET_ERRNO);
}
s = socket (USE_AF, USE_TYPE, USE_PROTO);
if (s < 0)
- return errno;
+ return SOCKET_ERRNO;
code = ioctl (s, SIOCGIFCONF, (char *)&ifc);
if (code < 0) {
err = 0;
if (gethostname (host, sizeof(host))) {
- err = WSAGetLastError();
+ err = SOCKET_ERRNO;
}
if (!err) {
hostrec = gethostbyname (host);
if (hostrec == NULL) {
- err = WSAGetLastError();
+ err = SOCKET_ERRNO;
}
}