[_WIN32,WIN32]: Remove the define WIN32.
Not required for VC8.
This commit is contained in:
parent
0978c0c4fc
commit
91504142c3
1 changed files with 10 additions and 2 deletions
|
@ -189,7 +189,11 @@ main(int ac, char **av)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (!login(sock, uname, cname, pname, send_kill, utf8)) {
|
if (!login(sock, uname, cname, pname, send_kill, utf8)) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
closesocket(sock);
|
||||||
|
#else
|
||||||
close(sock);
|
close(sock);
|
||||||
|
#endif
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
ioq_init(&server, 2048);
|
ioq_init(&server, 2048);
|
||||||
|
@ -243,7 +247,7 @@ main(int ac, char **av)
|
||||||
tm.tv_sec = 0;
|
tm.tv_sec = 0;
|
||||||
tm.tv_usec = 1000;
|
tm.tv_usec = 1000;
|
||||||
|
|
||||||
if (!_isatty(_fileno(stdin)))
|
if (!isatty(fileno(stdin)))
|
||||||
bRedirected = 1;
|
bRedirected = 1;
|
||||||
else {
|
else {
|
||||||
security.nLength = sizeof(SECURITY_ATTRIBUTES);
|
security.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||||
|
@ -288,7 +292,7 @@ main(int ac, char **av)
|
||||||
if (errno == EINTR) {
|
if (errno == EINTR) {
|
||||||
errno = WSAGetLastError();
|
errno = WSAGetLastError();
|
||||||
perror("select");
|
perror("select");
|
||||||
(void)close(sock);
|
(void)closesocket(sock);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -313,7 +317,11 @@ main(int ac, char **av)
|
||||||
CloseHandle(hStdIn);
|
CloseHandle(hStdIn);
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
ioq_drain(&server);
|
ioq_drain(&server);
|
||||||
|
#ifdef _WIN32
|
||||||
|
(void)closesocket(sock);
|
||||||
|
#else
|
||||||
(void)close(sock);
|
(void)close(sock);
|
||||||
|
#endif
|
||||||
return 0; /* Shut the compiler up */
|
return 0; /* Shut the compiler up */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue