From b7e4629e712a9990315864b15da7c9198da4b1d3 Mon Sep 17 00:00:00 2001 From: Remco Rijnders Date: Tue, 8 Sep 2015 16:03:26 +0200 Subject: [PATCH] CLEANUP: Remove obsolote support for Ultrix, Dynix, and some AIX. Minor cleanups --- Config | 11 ---- Makefile.dist | 16 +----- include/patchlevel.h | 127 ------------------------------------------- include/sys.h | 61 --------------------- src/ircd.c | 2 - src/s_debug.c | 6 -- src/s_misc.c | 10 ---- src/support.c | 6 +- src/whowas.c | 6 -- 9 files changed, 3 insertions(+), 242 deletions(-) delete mode 100644 include/patchlevel.h diff --git a/Config b/Config index cbd82f8..bad177a 100755 --- a/Config +++ b/Config @@ -149,17 +149,6 @@ case "$OS" in DEFLIBS="-lcrypt -lz" OSNAME="FreeBSD" ;; - *SCO_SV*) - DEFCFLAGS="$DEFOPT -DSCOUNIX" - DEFLIBS="-lsocket -lz" - OSNAME="SCO Openserver" - NEEDSKIPNAME="Yep" - ;; - *OSF1*alpha*) - DEFCFLAGS="$DEFOPT" - DEFLIBS="-lz" - OSNAME="OSF/1 or Digital Unix" - ;; *Darwin*) DEFCFLAGS="$DEFOPT" DEFLIBS="-lz" diff --git a/Makefile.dist b/Makefile.dist index bc14d82..d6f7f6a 100755 --- a/Makefile.dist +++ b/Makefile.dist @@ -50,19 +50,7 @@ IRCDDIR=/usr/local/lib/ircd # NEED_U_INT32_T= -DNEED_U_INT32_T NEED_U_INT32_T= -# [CHANGEME] -# If you get a link-time error dealing with strtoul, comment out -# this line. -# STRTOUL= strtoul.o -STRTOUL= - -# [CHANGEME] -# If you get crashes around a specific number of clients, and that client -# load comes close or a little over the system-defined value of FD_SETSIZE, -# override it here and see what happens. -FD_SETSIZE= - -CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) $(NEED_U_INT32_T) $(FD_SETSIZE) +CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) $(NEED_U_INT32_T) SHELL=/bin/sh SUBDIRS=src @@ -80,7 +68,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \ 'BINDIR=${BINDIR}' 'INSTALL=${INSTALL}' \ 'INCLUDEDIR=${INCLUDEDIR}' 'IRCDDIR=${IRCDDIR}' \ 'MANDIR=${MANDIR}' 'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \ - 'RES=${RES}' 'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}' + 'RES=${RES}' 'SHELL=${SHELL}' server: diff --git a/include/patchlevel.h b/include/patchlevel.h deleted file mode 100644 index 013e164..0000000 --- a/include/patchlevel.h +++ /dev/null @@ -1,127 +0,0 @@ -/************************************************************************ - * IRC - Internet Relay Chat, include/patchlevel.h - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 1, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * PATCHes - * - * Only put here ADDED special stuff, for instance: ".mu3" or ".ban" - * Please start the patchlevel with a '.' - * - * IMPORTANT: We've copied the patch-scheme from u2.9, note the new - * format - it isn't neccessary to edit this manually !!! - * If you do, be sure you know what you are doing! - * - * For patch developers: - * To make a diff of your patch, edit any of the below lines containing - * a "" (an EMPTY string). Your patch will then succeed, with only an - * offset, on the first empty place in the users patchlevel.h. - * Do not change anyother line, the '\' are to make sure that the 'fuzz' - * will stay 0. --Run - * - */ - -#define PATCH1 \ - \ - \ - \ - "" - -/* - * Deliberate empty lines - */ - -#define PATCH2 \ - \ - \ - \ - "" - -/* - * Deliberate empty lines - */ - -#define PATCH3 \ - \ - \ - \ - "" - -/* - * Deliberate empty lines - */ - -#define PATCH4 \ - \ - \ - \ - "" - -/* - * Deliberate empty lines - */ - -#define PATCH5 \ - \ - \ - \ - "" - -/* - * Deliberate empty lines - */ - -#define PATCH6 \ - \ - \ - \ - "" - -/* - * Deliberate empty lines - */ - -#define PATCH7 \ - \ - \ - \ - "" - -/* - * Deliberate empty lines - */ - -#define PATCH8 \ - \ - \ - \ - "" - -/* - * Deliberate empty lines - */ - -#ifdef DEBUGMODE -#define PATCH9 ".debug" -#else -#define PATCH9 "" -#endif - -/* - * Deliberate empty lines - */ - diff --git a/include/sys.h b/include/sys.h index bd21475..3fc2ff4 100644 --- a/include/sys.h +++ b/include/sys.h @@ -17,8 +17,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef __sys_include__ -#define __sys_include__ #ifdef ISC202 #include #else @@ -52,10 +50,6 @@ #ifndef HAVE_INDEX #define index strchr #define rindex strrchr -/* -extern char *index PROTO((char *, char)); -extern char *rindex PROTO((char *, char)); -*/ #endif #ifndef HAVE_BZERO @@ -92,18 +86,6 @@ extern char *rindex PROTO((char *, char)); # endif /* HAVE_BSD_SIGNALS */ #endif /* HAVE_POSIX_SIGNALS */ -#ifdef AIX -# include -# include -# define BSD_INCLUDES -# if BYTE_ORDER == BIG_ENDIAN -# define BIT_ZERO_ON_LEFT -# endif -# if BYTE_ORDER == LITTLE_ENDIAN -# define BIT_ZERO_ON_RIGHT -# endif -#endif - #include #if !defined(DEBUGMODE) @@ -112,11 +94,7 @@ extern char *rindex PROTO((char *, char)); #define free(x) MyFree(x) #endif -#ifdef NEXT -#define VOIDSIG int /* whether signal() returns int of void */ -#else #define VOIDSIG void /* whether signal() returns int of void */ -#endif #define OPT_TYPE void /* opt type for get/setsockopt */ @@ -130,43 +108,7 @@ extern char *rindex PROTO((char *, char)); # endif #endif - -#ifdef _SEQUENT_ /* Dynix 1.4 or 2.0 Generic Define.. */ -#undef BSD -#define SYSV /* Also #define SYSV */ -#endif - -#ifdef ultrix -#define ULTRIX -#endif - -#ifdef sgi -#define SGI -#endif - -#if defined(mips) || defined(PCS) -#undef SYSV -#endif - -#ifdef MIPS -#undef BSD -#define BSD 1 /* mips only works in bsd43 environment */ -#endif - -#ifdef sequent /* Dynix (sequent OS) */ -#define SEQ_NOFILE 128 /* set to your current kernel impl, */ -#endif /* max number of socket connections */ - -#ifdef _SEQUENT_ -#define DYNIXPTX -#endif - -/* - * Different name on NetBSD, FreeBSD, BSDI, OpenBSD and Linux - */ -#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__bsdi__) || defined(__OpenBSD__) || defined(__linux__) || defined(__Darwin__) #define dn_skipname __dn_skipname -#endif extern VOIDSIG dummy(); @@ -223,6 +165,3 @@ error CLIENT_FLOOD undefined #if (NICKNAMEHISTORYLENGTH < 100) # define NICKNAMEHISTORYLENGTH 100 #endif - - -#endif /* __sys_include__ */ diff --git a/src/ircd.c b/src/ircd.c index cdf15a5..49fd9f9 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -582,10 +582,8 @@ int main (argc, argv) #endif #if (!defined(CHROOTDIR) || (defined(IRC_UID) && defined(IRC_GID))) -#ifndef AIX (void) setuid ((uid_t) uid); (void) setuid ((uid_t) euid); -#endif if ((int) getuid () == 0) { #if defined(IRC_UID) && defined(IRC_GID) diff --git a/src/s_debug.c b/src/s_debug.c index 315eb47..072a9af 100644 --- a/src/s_debug.c +++ b/src/s_debug.c @@ -68,10 +68,7 @@ char serveropts[] = { #include "whowas.h" #include "hash.h" #include -#if !defined(ULTRIX) && !defined(SGI) && !defined(sequent) && \ - !defined(__convex__) #include -#endif #ifdef GETRUSAGE_2 #include #else @@ -79,9 +76,6 @@ char serveropts[] = { #include #endif #endif -#ifdef PCS -#include -#endif #include "h.h" #ifndef ssize_t diff --git a/src/s_misc.c b/src/s_misc.c index 6f3b092..2c2dd70 100644 --- a/src/s_misc.c +++ b/src/s_misc.c @@ -29,17 +29,7 @@ #include "userload.h" #include #include -#if !defined(ULTRIX) && !defined(SGI) && !defined(sequent) && \ - !defined(__convex__) #include -#endif -#if defined(PCS) || defined(AIX) || defined(SVR3) -#include -#endif -#ifdef DYNIXPTX -#include -#include -#endif #include "h.h" #define _1MEG (1024.0) diff --git a/src/support.c b/src/support.c index d2e6620..f569bab 100644 --- a/src/support.c +++ b/src/support.c @@ -114,12 +114,8 @@ char *strerror (err_no) /* ** inetntoa -- changed name to remove collision possibility and - ** so behaviour is gaurunteed to take a pointer arg. + ** so behaviour is guaranteed to take a pointer arg. ** -avalon 23/11/92 - ** inet_ntoa -- returned the dotted notation of a given - ** internet number (some ULTRIX don't have this) - ** argv 11/90). - ** inet_ntoa -- its broken on some Ultrix/Dynix too. -avalon */ char *inetntoa (in) diff --git a/src/whowas.c b/src/whowas.c index 86cc49e..6e2c4c1 100644 --- a/src/whowas.c +++ b/src/whowas.c @@ -17,12 +17,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* - * --- avalon --- 6th April 1992 - * rewritten to scrap linked lists and use a table of structures which - * is referenced like a circular loop. Should be faster and more efficient. - */ - #include "struct.h" #include "common.h" #include "sys.h" -- 2.30.2