summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtadvd
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-08-11 15:51:54 +0000
committerume <ume@FreeBSD.org>2003-08-11 15:51:54 +0000
commita3738aa5cfd3363f4841d7f50249e183b957de36 (patch)
treeb02ede78804396e1b4d48528a8b846cf77a70533 /usr.sbin/rtadvd
parent44f95bb1cf973ee7e97882481b4462f246d78836 (diff)
downloadFreeBSD-src-a3738aa5cfd3363f4841d7f50249e183b957de36.zip
FreeBSD-src-a3738aa5cfd3363f4841d7f50249e183b957de36.tar.gz
reduce #ifdef.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/rtadvd')
-rw-r--r--usr.sbin/rtadvd/config.c5
-rw-r--r--usr.sbin/rtadvd/dump.c12
-rw-r--r--usr.sbin/rtadvd/if.c13
-rw-r--r--usr.sbin/rtadvd/if.h2
-rw-r--r--usr.sbin/rtadvd/rrenum.c2
-rw-r--r--usr.sbin/rtadvd/timer.c3
6 files changed, 4 insertions, 33 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index 7f3d417..d494182 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -37,9 +37,7 @@
#include <sys/sysctl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
#include <net/route.h>
#include <net/if_dl.h>
@@ -56,9 +54,6 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-#include <search.h>
-#endif
#include <unistd.h>
#include <ifaddrs.h>
diff --git a/usr.sbin/rtadvd/dump.c b/usr.sbin/rtadvd/dump.c
index bd19687..65e7ca2 100644
--- a/usr.sbin/rtadvd/dump.c
+++ b/usr.sbin/rtadvd/dump.c
@@ -34,9 +34,7 @@
#include <sys/queue.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
#include <net/if_dl.h>
#include <netinet/in.h>
@@ -66,12 +64,6 @@ extern struct rainfo *ralist;
static char *ether_str __P((struct sockaddr_dl *));
static void if_dump __P((void));
-#ifdef __FreeBSD__ /* XXX: see PORTABILITY */
-#define LONGLONG "%qu"
-#else
-#define LONGLONG "%llu"
-#endif
-
static char *rtpref_str[] = {
"medium", /* 00 */
"high", /* 01 */
@@ -130,11 +122,11 @@ if_dump()
/* statistics */
fprintf(fp, " statistics: RA(out/in/inconsistent): "
- LONGLONG "/" LONGLONG "/" LONGLONG ", ",
+ "%llu/%llu/%llu, ",
(unsigned long long)rai->raoutput,
(unsigned long long)rai->rainput,
(unsigned long long)rai->rainconsistent);
- fprintf(fp, "RS(input): " LONGLONG "\n",
+ fprintf(fp, "RS(input): %llu\n",
(unsigned long long)rai->rsinput);
/* interface information */
diff --git a/usr.sbin/rtadvd/if.c b/usr.sbin/rtadvd/if.c
index f483ff4..a6517f2 100644
--- a/usr.sbin/rtadvd/if.c
+++ b/usr.sbin/rtadvd/if.c
@@ -36,23 +36,12 @@
#include <sys/ioctl.h>
#include <net/if.h>
#include <net/if_types.h>
-#ifdef __FreeBSD__
-# include <net/ethernet.h>
-#endif
+#include <net/ethernet.h>
#include <ifaddrs.h>
-#ifdef __NetBSD__
-#include <net/if_ether.h>
-#endif
#include <net/route.h>
#include <net/if_dl.h>
#include <netinet/in.h>
#include <netinet/icmp6.h>
-#ifdef __bsdi__
-# include <netinet/if_ether.h>
-#endif
-#ifdef __OpenBSD__
-#include <netinet/if_ether.h>
-#endif
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
diff --git a/usr.sbin/rtadvd/if.h b/usr.sbin/rtadvd/if.h
index 23f9a98..07bb6ee 100644
--- a/usr.sbin/rtadvd/if.h
+++ b/usr.sbin/rtadvd/if.h
@@ -1,5 +1,5 @@
/* $FreeBSD$ */
-/* $KAME: if.h,v 1.6 2001/01/21 15:37:14 itojun Exp $ */
+/* $KAME: if.h,v 1.10 2003/02/24 11:29:10 ono Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
diff --git a/usr.sbin/rtadvd/rrenum.c b/usr.sbin/rtadvd/rrenum.c
index 59c125b..95cbd24 100644
--- a/usr.sbin/rtadvd/rrenum.c
+++ b/usr.sbin/rtadvd/rrenum.c
@@ -36,9 +36,7 @@
#include <sys/sysctl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
#include <net/route.h>
#include <netinet/in.h>
#include <netinet/in_var.h>
diff --git a/usr.sbin/rtadvd/timer.c b/usr.sbin/rtadvd/timer.c
index f30fb37..fb9f299 100644
--- a/usr.sbin/rtadvd/timer.c
+++ b/usr.sbin/rtadvd/timer.c
@@ -36,9 +36,6 @@
#include <syslog.h>
#include <stdlib.h>
#include <string.h>
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-#include <search.h>
-#endif
#include "timer.h"
static struct rtadvd_timer timer_head;
OpenPOWER on IntegriCloud