From 98659fd95f068954f57dff94bd56db44c44499de Mon Sep 17 00:00:00 2001 From: Remco Rijnders Date: Wed, 15 Feb 2012 19:06:46 +0100 Subject: [PATCH] Remove support for unsupported OS'es --- src/s_bsd.c | 74 +---------------------------------------------------- 1 file changed, 1 insertion(+), 73 deletions(-) diff --git a/src/s_bsd.c b/src/s_bsd.c index 4dc0161..f0b43f5 100644 --- a/src/s_bsd.c +++ b/src/s_bsd.c @@ -29,9 +29,6 @@ #include #include #include -#if defined(SOL20) -#include -#endif #if (!defined(SVR3) || defined(sgi) || defined(_SEQUENT_)) #include #endif @@ -39,12 +36,7 @@ #include #include #include -#ifdef AIX -#include -#include -#else #include "nameser.h" -#endif #include "resolv_legacy.h" #include "sock.h" /* If FD_ZERO isn't define up to this point, */ /* define it (BSD4.2 needs this) */ @@ -330,11 +322,7 @@ void init_sys () struct rlimit limit; if (!getrlimit (RLIMIT_FD_MAX, &limit)) { -#ifdef pyr - if (limit.rlim_cur < MAXCONNECTIONS) -#else if (limit.rlim_max < MAXCONNECTIONS) -#endif { (void) fprintf (stderr, "ircd fd table too big\n"); (void) fprintf (stderr, "Hard Limit: %d IRC max: %d\n", @@ -342,42 +330,20 @@ void init_sys () (void) fprintf (stderr, "Fix MAXCONNECTIONS\n"); exit (-1); } -#ifndef pyr limit.rlim_cur = limit.rlim_max; /* make soft limit the max */ if (setrlimit (RLIMIT_FD_MAX, &limit) == -1) { (void) fprintf (stderr, "error setting max fd's to %d\n", (int) limit.rlim_cur); exit (-1); } -#endif } #endif -#ifdef sequent -#ifndef DYNIXPTX - int fd_limit; - - fd_limit = setdtablesize (MAXCONNECTIONS + 1); - if (fd_limit < MAXCONNECTIONS) { - (void) fprintf (stderr, "ircd fd table too big\n"); - (void) fprintf (stderr, "Hard Limit: %d IRC max: %d\n", - fd_limit, MAXCONNECTIONS); - (void) fprintf (stderr, "Fix MAXCONNECTIONS\n"); - exit (-1); - } -#endif -#endif #if defined(PCS) || defined(DYNIXPTX) || defined(SVR3) char logbuf[BUFSIZ]; (void) setvbuf (stderr, logbuf, _IOLBF, sizeof (logbuf)); #else -#if defined(HPUX) - (void) setvbuf (stderr, NULL, _IOLBF, 0); -#else -#if !defined(SOL20) && !defined(SCOUNIX) (void) setlinebuf (stderr); -#endif -#endif #endif for (fd = 3; fd < MAXCONNECTIONS; fd++) { (void) close (fd); @@ -401,9 +367,7 @@ void init_sys () (void) close (fd); } #endif -#if defined(HPUX) || defined(SOL20) || defined(DYNIXPTX) || \ - defined(_POSIX_SOURCE) || defined(SVR4) || defined(SGI) \ - || defined(SCOUNIX) +#if defined(_POSIX_SOURCE) || defined(SVR4) (void) setsid (); #else (void) setpgrp (0, (int) getpid ()); @@ -940,14 +904,7 @@ static void set_sock_opts (fd, cptr) report_error ("setsockopt(SO_RCVBUF) %s:%s", cptr); #endif #ifdef SO_SNDBUF -#ifdef _SEQUENT_ -/* seems that Sequent freezes up if the receving buffer is a different size - * to the sending buffer (maybe a tcp window problem too). - */ opt = 8192; -#else - opt = 8192; -#endif if (setsockopt (fd, SOL_SOCKET, SO_SNDBUF, (OPT_TYPE *) & opt, sizeof (opt)) < 0) @@ -1255,10 +1212,6 @@ int read_message (delay) aClient *cptr; int nfds; struct timeval wait; -#ifdef pyr - struct timeval nowt; - u_long us; -#endif fd_set read_set, write_set; time_t delay2 = delay, now; u_long usec = 0; @@ -1266,12 +1219,7 @@ int read_message (delay) int ping = 0; int sockerr; -#ifdef pyr - (void) gettimeofday (&nowt, NULL); - now = nowt.tv_sec; -#else now = time (NULL); -#endif for (res = 0;;) { @@ -1315,23 +1263,7 @@ int read_message (delay) ((cptr->flags2 & FLAGS2_ZIP) && (cptr->zip->outcount > 0)) || #endif (DoList (cptr) && IsSendable (cptr))) -#ifndef pyr FD_SET (i, &write_set); -#else - { - if (!IsBlocked (cptr)) - FD_SET (i, &write_set); - else - delay2 = 0, usec = 500000; - } - if (now - cptr->lw.tv_sec && nowt.tv_usec - cptr->lw.tv_usec < 0) - us = 1000000; - else - us = 0; - us += nowt.tv_usec; - if (us - cptr->lw.tv_usec > 500000) - ClearBlocked (cptr); -#endif } if (udpfd >= 0) FD_SET (udpfd, &read_set); @@ -1737,11 +1669,7 @@ int utmp_read (fd, name, line, host, hlen) strncpyzt (name, ut.ut_name, 9); strncpyzt (line, ut.ut_line, 10); #ifdef USER_PROCESS -#if defined(HPUX) || defined(AIX) - strncpyzt (host, (ut.ut_host[0]) ? (ut.ut_host) : me.name, 16); -#else strncpyzt (host, me.name, 9); -#endif if (ut.ut_type == USER_PROCESS) return 0; #else -- 2.30.2