From 97a4d792507297961fb4cce8a5cc2e93a8a832e6 Mon Sep 17 00:00:00 2001 From: Remco Rijnders Date: Tue, 8 Sep 2015 15:55:13 +0200 Subject: [PATCH] CLEANUP: Remove obsolete Solaris support --- Config | 12 ------------ include/sys.h | 8 ++------ src/dbuf.c | 14 +------------- src/s_bsd.c | 10 ---------- src/s_debug.c | 6 ------ 5 files changed, 3 insertions(+), 47 deletions(-) diff --git a/Config b/Config index dc72474..cbd82f8 100755 --- a/Config +++ b/Config @@ -160,18 +160,6 @@ case "$OS" in DEFLIBS="-lz" OSNAME="OSF/1 or Digital Unix" ;; - *SunOS*4.*) - DEFCFLAGS="$DEFOPT" - DEFLIBS="-lz" - OSNAME="SunOS 4.x" - LOCALD=undef - ;; - *SunOS*5.*) - DEFCFLAGS="$DEFOPT -DSOL20" - DEFLIBS="-lsocket -lnsl -lresolv -lz" - OSNAME="Solaris 2.x (or SunOS 5.x)" - LOCALD=undef - ;; *Darwin*) DEFCFLAGS="$DEFOPT" DEFLIBS="-lz" diff --git a/include/sys.h b/include/sys.h index 94bc863..bd21475 100644 --- a/include/sys.h +++ b/include/sys.h @@ -118,11 +118,7 @@ extern char *rindex PROTO((char *, char)); #define VOIDSIG void /* whether signal() returns int of void */ #endif -#ifdef SOL20 -#define OPT_TYPE char /* opt type for get/setsockopt */ -#else -#define OPT_TYPE void -#endif +#define OPT_TYPE void /* opt type for get/setsockopt */ #ifdef __osf__ # define OSF @@ -168,7 +164,7 @@ extern char *rindex PROTO((char *, char)); /* * Different name on NetBSD, FreeBSD, BSDI, OpenBSD and Linux */ -#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__bsdi__) || defined(__OpenBSD__) || defined(__linux__) || defined(SOL20) || defined(__Darwin__) +#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__bsdi__) || defined(__OpenBSD__) || defined(__linux__) || defined(__Darwin__) #define dn_skipname __dn_skipname #endif diff --git a/src/dbuf.c b/src/dbuf.c index bb3ffcf..cc6ee8b 100644 --- a/src/dbuf.c +++ b/src/dbuf.c @@ -17,18 +17,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* -- Jto -- 20 Jun 1990 - * extern void free() fixed as suggested by - * gruner@informatik.tu-muenchen.de - */ - -/* -- Jto -- 10 May 1990 - * Changed memcpy into bcopy and removed the declaration of memset - * because it was unnecessary. - * Added the #includes for "struct.h" and "sys.h" to get bcopy/memcpy - * work - */ - /* ** For documentation of the *global* functions implemented here, ** see the header file (dbuf.h). @@ -79,7 +67,7 @@ static dbufbuf *dbuf_alloc () return NULL; } #if defined(VALLOC) && !defined(DEBUGMODE) -#if defined(SOL20) || defined(_SC_PAGESIZE) +#if defined(_SC_PAGESIZE) num = sysconf (_SC_PAGESIZE) / sizeof (dbufbuf); #else num = getpagesize () / sizeof (dbufbuf); diff --git a/src/s_bsd.c b/src/s_bsd.c index 485a49f..2e44523 100644 --- a/src/s_bsd.c +++ b/src/s_bsd.c @@ -871,16 +871,6 @@ static void set_sock_opts (fd, cptr) (fd, SOL_SOCKET, SO_REUSEADDR, (OPT_TYPE *) & opt, sizeof (opt)) < 0) report_error ("setsockopt(SO_REUSEADDR) %s:%s", cptr); #endif -#if defined(SO_DEBUG) && defined(DEBUGMODE) && 0 -/* Solaris with SO_DEBUG writes to syslog by default */ -#if !defined(SOL20) || defined(USE_SYSLOG) - opt = 1; - if (setsockopt - (fd, SOL_SOCKET, SO_DEBUG, (OPT_TYPE *) & opt, sizeof (opt)) - < 0) - report_error ("setsockopt(SO_DEBUG) %s:%s", cptr); -#endif /* SOL20 */ -#endif #if defined(SO_USELOOPBACK) opt = 1; if (setsockopt diff --git a/src/s_debug.c b/src/s_debug.c index 7c06c77..315eb47 100644 --- a/src/s_debug.c +++ b/src/s_debug.c @@ -73,12 +73,6 @@ char serveropts[] = { #include #endif #ifdef GETRUSAGE_2 -#ifdef SOL20 -#include -#ifdef RUSAGEH -#include -#endif -#endif #include #else #ifdef TIMES_2 -- 2.30.2