From 8ece8c40c2e59d2a39e05be707babc8828b5ad52 Mon Sep 17 00:00:00 2001 From: wens Date: Wed, 9 Apr 2008 11:00:41 +0000 Subject: Drop Solaris support git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4115 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/chess.c | 4 ---- mbbsd/mbbsd.c | 11 ++--------- mbbsd/talk.c | 12 ------------ 3 files changed, 2 insertions(+), 25 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/chess.c b/mbbsd/chess.c index a86ca766..081b812f 100644 --- a/mbbsd/chess.c +++ b/mbbsd/chess.c @@ -1250,11 +1250,7 @@ ChessWatchGame(void (*play)(int, ChessGameMode), int game, const char* title) vmsg("無法建立連線"); return -1; } -#if defined(Solaris) && __OS_MAJOR_VERSION__ == 5 && __OS_MINOR_VERSION__ < 7 - msgsock = accept(sock, (struct sockaddr *) 0, 0); -#else msgsock = accept(sock, (struct sockaddr *) 0, (socklen_t *) 0); -#endif close(sock); if (msgsock < 0) return -1; diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index b112b821..a45c2705 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1712,15 +1712,8 @@ daemon_login(int argc, char *argv[], char *envp[]) /* main loop */ while( 1 ){ len_of_sock_addr = sizeof(xsin); - if( -#if defined(Solaris) && __OS_MAJOR_VERSION__ == 5 && __OS_MINOR_VERSION__ < 7 - (csock = accept(msock, (struct sockaddr *)&xsin, - &len_of_sock_addr)) < 0 -#else - (csock = accept(msock, (struct sockaddr *)&xsin, - (socklen_t *)&len_of_sock_addr)) < 0 -#endif - ) { + if ( (csock = accept(msock, (struct sockaddr *)&xsin, + (socklen_t *)&len_of_sock_addr)) < 0 ) { if (errno != EINTR) sleep(1); continue; diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 199bd639..ea694467 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1543,11 +1543,7 @@ int make_connection_to_somebody(userinfo_t *uin, int timeout){ return -1; } length = sizeof(server); -#if defined(Solaris) && __OS_MAJOR_VERSION__ == 5 && __OS_MINOR_VERSION__ < 7 - if (getsockname(sock, (struct sockaddr *) & server, & length) < 0) { -#else if (getsockname(sock, (struct sockaddr *) & server, (socklen_t *) & length) < 0) { -#endif close(sock); perror("sock name err"); unlockutmpmode(); @@ -1647,11 +1643,7 @@ my_talk(userinfo_t * uin, int fri_stat, char defact) if (sock < 0) vmsg("無法建立連線"); else { -#if defined(Solaris) && __OS_MAJOR_VERSION__ == 5 && __OS_MINOR_VERSION__ < 7 - msgsock = accept(sock, (struct sockaddr *) 0, 0); -#else msgsock = accept(sock, (struct sockaddr *) 0, (socklen_t *) 0); -#endif if (msgsock == -1) { perror("accept"); close(sock); @@ -1784,11 +1776,7 @@ my_talk(userinfo_t * uin, int fri_stat, char defact) return; } -#if defined(Solaris) && __OS_MAJOR_VERSION__ == 5 && __OS_MINOR_VERSION__ < 7 - msgsock = accept(sock, (struct sockaddr *) 0, 0); -#else msgsock = accept(sock, (struct sockaddr *) 0, (socklen_t *) 0); -#endif if (msgsock == -1) { perror("accept"); close(sock); -- cgit v1.2.3