Module Name: src
Committed By: maya
Date: Mon Oct 2 11:02:19 UTC 2017
Modified Files:
src/sbin/routed: defs.h if.c main.c trace.c
Log Message:
unifdef sgi. NFCI
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sbin/routed/defs.h
cvs rdiff -u -r1.30 -r1.31 src/sbin/routed/if.c
cvs rdiff -u -r1.41 -r1.42 src/sbin/routed/main.c
cvs rdiff -u -r1.32 -r1.33 src/sbin/routed/trace.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/routed/defs.h
diff -u src/sbin/routed/defs.h:1.27 src/sbin/routed/defs.h:1.28
--- src/sbin/routed/defs.h:1.27 Sun Feb 12 13:56:56 2012
+++ src/sbin/routed/defs.h Mon Oct 2 11:02:19 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.27 2012/02/12 13:56:56 wiz Exp $ */
+/* $NetBSD: defs.h,v 1.28 2017/10/02 11:02:19 maya Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -69,10 +69,6 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
-#ifdef sgi
-#include <strings.h>
-#include <bstring.h>
-#endif
#include <stdarg.h>
#include <syslog.h>
#include <time.h>
@@ -83,14 +79,9 @@
#include <sys/ioctl.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
-#ifdef sgi
-#define _USER_ROUTE_TREE
-#include <net/radix.h>
-#else
#include "radix.h"
#define UNUSED __attribute__((unused))
#define PATTRIB(f,l) __attribute__((format (printf,f,l)))
-#endif
#include <net/if.h>
#include <net/route.h>
#include <net/if_dl.h>
@@ -112,9 +103,7 @@
* So define it here so it can be changed for the target system.
* It should be defined somewhere netinet/in.h, but it is not.
*/
-#ifdef sgi
-#define naddr u_int32_t
-#elif defined (__NetBSD__)
+#if defined (__NetBSD__)
#define naddr u_int32_t
#define _HAVE_SA_LEN
#define _HAVE_SIN_LEN
@@ -161,9 +150,7 @@
/* Router Discovery parameters */
-#ifndef sgi
#define INADDR_ALLROUTERS_GROUP 0xe0000002 /* 224.0.0.2 */
-#endif
#define MaxMaxAdvertiseInterval 1800
#define MinMaxAdvertiseInterval 4
#define DefMaxAdvertiseInterval 600
@@ -311,9 +298,6 @@ struct interface {
u_int ierrors;
u_int opackets;
u_int oerrors;
-#ifdef sgi
- u_int odrops;
-#endif
time_t ts; /* timestamp on network stats */
} int_data;
# define MAX_AUTH_KEYS 5
@@ -520,12 +504,6 @@ extern char inittracename[MAXPATHLEN+1];
extern struct radix_node_head *rhead;
-
-#ifdef sgi
-/* Fix conflicts */
-#define dup2(x,y) BSDdup2(x,y)
-#endif /* sgi */
-
extern void fix_sock(int, const char *);
extern void fix_select(void);
extern void rip_off(void);
Index: src/sbin/routed/if.c
diff -u src/sbin/routed/if.c:1.30 src/sbin/routed/if.c:1.31
--- src/sbin/routed/if.c:1.30 Sun Jun 24 16:24:34 2012
+++ src/sbin/routed/if.c Mon Oct 2 11:02:19 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.30 2012/06/24 16:24:34 kardel Exp $ */
+/* $NetBSD: if.c,v 1.31 2017/10/02 11:02:19 maya Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#include "pathnames.h"
#ifdef __NetBSD__
-__RCSID("$NetBSD: if.c,v 1.30 2012/06/24 16:24:34 kardel Exp $");
+__RCSID("$NetBSD: if.c,v 1.31 2017/10/02 11:02:19 maya Exp $");
#elif defined(__FreeBSD__)
__RCSID("$FreeBSD$");
#else
@@ -770,9 +770,7 @@ ifinit(void)
ifs0.int_data.ierrors = ifm.ifm_data.ifi_ierrors;
ifs0.int_data.opackets = ifm.ifm_data.ifi_opackets;
ifs0.int_data.oerrors = ifm.ifm_data.ifi_oerrors;
-#ifdef sgi
- ifs0.int_data.odrops = ifm.ifm_data.ifi_odrops;
-#endif
+
sdl = (const struct sockaddr_dl *)
((struct if_msghdr *)ifam + 1);
/* NUL-termination by memset, above. */
@@ -1011,16 +1009,7 @@ ifinit(void)
ierr = ifs.int_data.ierrors - ifp->int_data.ierrors;
out = ifs.int_data.opackets - ifp->int_data.opackets;
oerr = ifs.int_data.oerrors - ifp->int_data.oerrors;
-#ifdef sgi
- /* Through at least IRIX 6.2, PPP and SLIP
- * count packets dropped by the filters.
- * But FDDI rings stuck non-operational count
- * dropped packets as they wait for improvement.
- */
- if (!(ifp->int_if_flags & IFF_POINTOPOINT))
- oerr += (ifs.int_data.odrops
- - ifp->int_data.odrops);
-#endif
+
/* If the interface just awoke, restart the counters.
*/
if (ifp->int_data.ts == 0) {
Index: src/sbin/routed/main.c
diff -u src/sbin/routed/main.c:1.41 src/sbin/routed/main.c:1.42
--- src/sbin/routed/main.c:1.41 Mon Oct 26 02:53:15 2009
+++ src/sbin/routed/main.c Mon Oct 2 11:02:19 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.41 2009/10/26 02:53:15 christos Exp $ */
+/* $NetBSD: main.c,v 1.42 2017/10/02 11:02:19 maya Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -35,9 +35,6 @@
#include "defs.h"
#include "pathnames.h"
-#ifdef sgi
-#include "math.h"
-#endif
#if defined(__NetBSD__)
#include <util.h>
#endif
@@ -48,7 +45,7 @@
__COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993\
The Regents of the University of California. All rights reserved.");
#ifdef __NetBSD__
-__RCSID("$NetBSD: main.c,v 1.41 2009/10/26 02:53:15 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.42 2017/10/02 11:02:19 maya Exp $");
#elif defined(__FreeBSD__)
__RCSID("$FreeBSD$");
#else
@@ -288,14 +285,8 @@ usage:
signal(SIGUSR2, sigtrace_off);
/* get into the background */
-#ifdef sgi
- if (0 > _daemonize(background ? 0 : (_DF_NOCHDIR|_DF_NOFORK),
- STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO))
- BADERR(0, "_daemonize()");
-#else
if (background && daemon(0, 1) < 0)
BADERR(0,"daemon()");
-#endif
#if defined(__NetBSD__)
pidfile(NULL);
Index: src/sbin/routed/trace.c
diff -u src/sbin/routed/trace.c:1.32 src/sbin/routed/trace.c:1.33
--- src/sbin/routed/trace.c:1.32 Mon Apr 6 12:36:27 2009
+++ src/sbin/routed/trace.c Mon Oct 2 11:02:19 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: trace.c,v 1.32 2009/04/06 12:36:27 lukem Exp $ */
+/* $NetBSD: trace.c,v 1.33 2017/10/02 11:02:19 maya Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -41,7 +41,7 @@
#include <fcntl.h>
#ifdef __NetBSD__
-__RCSID("$NetBSD: trace.c,v 1.32 2009/04/06 12:36:27 lukem Exp $");
+__RCSID("$NetBSD: trace.c,v 1.33 2017/10/02 11:02:19 maya Exp $");
#elif defined(__FreeBSD__)
__RCSID("$FreeBSD$");
#else
@@ -49,12 +49,6 @@ __RCSID("Revision: 2.27 ");
#ident "Revision: 2.27 "
#endif
-
-#ifdef sgi
-/* use *stat64 for files on large filesystems */
-#define stat stat64
-#endif
-
#define NRECORDS 50 /* size of circular trace buffer */
int tracelevel, new_tracelevel;
@@ -158,12 +152,9 @@ ts(time_t secs) {
static char s[20];
secs += epoch.tv_sec;
-#ifdef sgi
- (void)cftime(s, "%T", &secs);
-#else
memcpy(s, ctime(&secs)+11, 8);
s[8] = '\0';
-#endif
+
return s;
}