summaryrefslogtreecommitdiffstats
path: root/innbbsd
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-10 08:49:47 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-10 08:49:47 +0800
commit540cfa70e8e8b4db3cc2addccfcbeeb69fffa033 (patch)
tree6a4dec7d69249e48a6f79c4436eb634cb28744b2 /innbbsd
parenta8a0ef3c4d10bf576054dc26348d9b4e6efeecc2 (diff)
downloadpttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.gz
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.bz2
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.lz
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.xz
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.zst
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.zip
merge back from branch victor.solaris
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2189 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'innbbsd')
-rw-r--r--innbbsd/Makefile8
-rw-r--r--innbbsd/bbsnnrp.c17
-rw-r--r--innbbsd/connectsock.c23
-rw-r--r--innbbsd/rfc931.c3
4 files changed, 29 insertions, 22 deletions
diff --git a/innbbsd/Makefile b/innbbsd/Makefile
index 9bb71f52..9399d32d 100644
--- a/innbbsd/Makefile
+++ b/innbbsd/Makefile
@@ -7,7 +7,8 @@
# ------------------------------------------------------- #
# stdarg.h patch for pttbbs by in2 03/05/05 #
-OSTYPE!=uname
+OS!=uname
+OSTYPE?=$(OS)
####################################################
# this is a bbs <--> news gateway
#####################################################
@@ -30,6 +31,7 @@ BBS_REC = $(BBS_UTIL)/util_record.o $(BBS_UTIL)/util_cache.o \
$(BBS_UTIL)/util_var.o $(BBS_REC_EXTRA_$(OSTYPE))
BBS_REC_EXTRA_Linux = $(BBS_UTIL)/util_osdep.o
+BBS_REC_EXTRA_Solaris = $(BBS_UTIL)/util_osdep.o
#########################
#
@@ -92,8 +94,10 @@ hpux:
irix:
@$(MAKE) EXTRAFLAGS="-DMMAP -DIRIX -DSYSV" target
+Solaris: solaris
+
solaris:
- @$(MAKE) EXTRAFLAGS="-DMMAP -DSOLARIS -DSYSV" LDFLAGS="-lsocket -lnsl" YACC="bison -y" target
+ @$(MAKE) EXTRAFLAGS="-DMMAP -DSOLARIS -DSYSV -I/usr/local/include/ -I../include/" LDFLAGS="-L/usr/local/lib -liconv -lsocket -lnsl -lkstat ../mbbsd/osdep.o" YACC="bison -y" target
FreeBSD:
@$(MAKE) CC=cc EXTRAFLAGS="-DBSD44 -DMMAP -DGETRUSAGE" LDFLAGS="-lcrypt -liconv" target
diff --git a/innbbsd/bbsnnrp.c b/innbbsd/bbsnnrp.c
index fadafe72..544e3336 100644
--- a/innbbsd/bbsnnrp.c
+++ b/innbbsd/bbsnnrp.c
@@ -18,6 +18,7 @@
#include "bbslib.h"
#include "daemon.h"
#include "nntp.h"
+#include "osdep.h"
#ifndef MAX_ARTS
#define MAX_ARTS 100
@@ -288,10 +289,10 @@ main(argc, argv)
sprintf(BBSNNRP.rcfile, "%s/.newsrc.%s.%s", INNDHOME, server, ptr);
initrcfiles(&BBSNNRP);
- signal(SIGTERM, doterm);
- signal(SIGKILL, doterm);
- signal(SIGHUP, doterm);
- signal(SIGPIPE, doterm);
+ Signal(SIGTERM, doterm);
+ Signal(SIGKILL, doterm);
+ Signal(SIGHUP, doterm);
+ Signal(SIGPIPE, doterm);
readnews(server, &BBSNNRP);
writerc(&BBSNNRP);
@@ -310,10 +311,10 @@ main(argc, argv)
exit(1);
}
initsockets(server, &BBSNNRP, inputtype);
- signal(SIGTERM, doterm);
- signal(SIGKILL, doterm);
- signal(SIGHUP, doterm);
- signal(SIGPIPE, doterm);
+ Signal(SIGTERM, doterm);
+ Signal(SIGKILL, doterm);
+ Signal(SIGHUP, doterm);
+ Signal(SIGPIPE, doterm);
stdinreadnews(&BBSNNRP);
closesockets();
diff --git a/innbbsd/connectsock.c b/innbbsd/connectsock.c
index 1c401dbc..f61ff160 100644
--- a/innbbsd/connectsock.c
+++ b/innbbsd/connectsock.c
@@ -2,6 +2,7 @@
#include "daemon.h"
#include <signal.h>
#include <setjmp.h>
+#include "osdep.h"
static jmp_buf timebuf;
@@ -112,12 +113,12 @@ initunixserver(path, protocol)
return -1;
}
/* standalonesetup(s); */
- signal(SIGHUP, SIG_IGN);
- signal(SIGUSR1, SIG_IGN);
- signal(SIGCHLD, reapchild);
+ Signal(SIGHUP, SIG_IGN);
+ Signal(SIGUSR1, SIG_IGN);
+ Signal(SIGCHLD, reapchild);
UNIX_SERVER_PATH = path;
- signal(SIGINT, doremove);
- signal(SIGTERM, doremove);
+ Signal(SIGINT, doremove);
+ Signal(SIGTERM, doremove);
chdir("/");
if (bind(s, (struct sockaddr *) & s_un, sizeof(struct sockaddr_un)) < 0) {
@@ -176,11 +177,11 @@ initinetserver(service, protocol)
return -1;
}
standalonesetup(s);
- signal(SIGHUP, SIG_IGN);
- signal(SIGUSR1, SIG_IGN);
- signal(SIGCHLD, reapchild);
- signal(SIGINT, dokill);
- signal(SIGTERM, dokill);
+ Signal(SIGHUP, SIG_IGN);
+ Signal(SIGUSR1, SIG_IGN);
+ Signal(SIGCHLD, reapchild);
+ Signal(SIGINT, dokill);
+ Signal(SIGTERM, dokill);
chdir("/");
if (bind(s, (struct sockaddr *) & sin, sizeof(struct sockaddr_in)) < 0) {
@@ -404,7 +405,7 @@ inetclient(server, service, protocol)
return -1;
}
if (setjmp(timebuf) == 0) {
- signal(SIGALRM, timeout);
+ Signal(SIGALRM, timeout);
alarm(5);
if (connect(s, (struct sockaddr *) & sin, sizeof(sin)) < 0) {
alarm(0);
diff --git a/innbbsd/rfc931.c b/innbbsd/rfc931.c
index d8428119..187f7929 100644
--- a/innbbsd/rfc931.c
+++ b/innbbsd/rfc931.c
@@ -23,6 +23,7 @@ static char sccsid[] = "@(#) rfc931.c 1.4 93/03/07 22:47:52";
#include <netinet/in.h>
#include <setjmp.h>
#include <signal.h>
+#include "osdep.h"
/* #include "log_tcp.h" */
@@ -90,7 +91,7 @@ my_rfc931_name(herefd, there)
}
/* Set up timer so we won't get stuck. */
- signal(SIGALRM, timeout);
+ Signal(SIGALRM, timeout);
if (setjmp(timebuf)) {
close(s); /* not: fclose(fp) */
return (result);