summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-11 11:51:16 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-11 11:51:16 +0800
commit440a2643ed42f8be05450e0b00021d933f64e0b3 (patch)
treee689fda7ca76433967385e0423b84823f144b857 /mbbsd
parentfa5b233767ca9d4e012839c28eb13628d2ebba63 (diff)
downloadpttbbs-piaip.automake.tar
pttbbs-piaip.automake.tar.gz
pttbbs-piaip.automake.tar.bz2
pttbbs-piaip.automake.tar.lz
pttbbs-piaip.automake.tar.xz
pttbbs-piaip.automake.tar.zst
pttbbs-piaip.automake.zip
moving forward!piaip.automake
git-svn-id: http://opensvn.csie.org/pttbbs/branches/piaip.automake@3154 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/Makefile.am14
-rw-r--r--mbbsd/chess.c4
-rw-r--r--mbbsd/mbbsd.c5
-rw-r--r--mbbsd/talk.c12
4 files changed, 8 insertions, 27 deletions
diff --git a/mbbsd/Makefile.am b/mbbsd/Makefile.am
index 8d19b6ff..6ab24ad3 100644
--- a/mbbsd/Makefile.am
+++ b/mbbsd/Makefile.am
@@ -4,7 +4,8 @@
########################################################################
# $Id$
-bin_PROGRAMS=mbbsd
+PROG=mbbsd
+bin_PROGRAMS=$(PROG)
mbbsd_SOURCES= \
../include/var.h \
@@ -19,6 +20,12 @@ mbbsd_SOURCES= \
../include/var.h: var.c
perl ../util/parsevar.pl < var.c > ../include/var.h
+test: $(PROG)
+ killall -9 test$(PROG) || true
+ cp $(PROG) test$(PROG)
+ ./test$(PROG) 9000
+ rm -f test$(PROG)
+
## reduce .bss align overhead
#.if !defined(DEBUG)
#LDFLAGS+=-Wl,--sort-common
@@ -28,11 +35,6 @@ mbbsd_SOURCES= \
# sh ../util/newvers.sh
# $(DIETCC) $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) $(EXT_LIBS) vers.c
-#test: $(PROG)
-# killall -9 testmbbsd || true
-# cp mbbsd testmbbsd
-# ./testmbbsd 9000
-# rm -f testmbbsd
#
#install: $(PROG)
# install -d $(BBSHOME)/bin/
diff --git a/mbbsd/chess.c b/mbbsd/chess.c
index b50ade04..ed6d6472 100644
--- a/mbbsd/chess.c
+++ b/mbbsd/chess.c
@@ -1120,11 +1120,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 83bdc709..595ba1a9 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1535,13 +1535,8 @@ daemon_login(int argc, char *argv[], char *envp[])
/* main loop */
while( 1 ){
len_of_sock_addr = sizeof(xsin);
-#if defined(Solaris) && __OS_MAJOR_VERSION__ == 5 && __OS_MINOR_VERSION__ < 7
- if( (csock = accept(msock, (struct sockaddr *)&xsin,
- &len_of_sock_addr)) < 0 ){
-#else
if( (csock = accept(msock, (struct sockaddr *)&xsin,
(socklen_t *)&len_of_sock_addr)) < 0 ){
-#endif
if (errno != EINTR)
sleep(1);
continue;
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 12d526bf..8d36d472 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1390,11 +1390,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();
@@ -1492,11 +1488,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
close(sock);
if (msgsock == -1) {
perror("accept");
@@ -1599,11 +1591,7 @@ my_talk(userinfo_t * uin, int fri_stat, char defact)
sock = make_connection_to_somebody(uin, 5);
-#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");
unlockutmpmode();