Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/timed/timed Make compile with -DHAVENIS. Also make ...
details: https://anonhg.NetBSD.org/src/rev/d2647af7571d
branches: trunk
changeset: 533917:d2647af7571d
user: wiz <wiz%NetBSD.org@localhost>
date: Wed Jul 10 22:44:22 2002 +0000
description:
Make compile with -DHAVENIS. Also make compile with WARNS=2, and
set WARNS=2 in Makefile.
diffstat:
usr.sbin/timed/timed/Makefile | 4 +++-
usr.sbin/timed/timed/measure.c | 8 ++++----
usr.sbin/timed/timed/slave.c | 12 ++++++------
usr.sbin/timed/timed/timed.c | 14 +++++++++-----
4 files changed, 22 insertions(+), 16 deletions(-)
diffs (162 lines):
diff -r 9980b0bf8bfe -r d2647af7571d usr.sbin/timed/timed/Makefile
--- a/usr.sbin/timed/timed/Makefile Wed Jul 10 22:40:35 2002 +0000
+++ b/usr.sbin/timed/timed/Makefile Wed Jul 10 22:44:22 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 1998/01/05 05:59:45 lukem Exp $
+# $NetBSD: Makefile,v 1.10 2002/07/10 22:44:22 wiz Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
#
# optional flags are: MEASURE TESTING DEBUG
@@ -10,4 +10,6 @@
LDADD= -lutil
MAN= timed.8
+WARNS= 2
+
.include <bsd.prog.mk>
diff -r 9980b0bf8bfe -r d2647af7571d usr.sbin/timed/timed/measure.c
--- a/usr.sbin/timed/timed/measure.c Wed Jul 10 22:40:35 2002 +0000
+++ b/usr.sbin/timed/timed/measure.c Wed Jul 10 22:44:22 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: measure.c,v 1.8 2001/09/02 00:13:06 reinoud Exp $ */
+/* $NetBSD: measure.c,v 1.9 2002/07/10 22:44:22 wiz Exp $ */
/*-
* Copyright (c) 1985, 1993 The Regents of the University of California.
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)measure.c 8.2 (Berkeley) 3/26/95";
#else
-__RCSID("$NetBSD: measure.c,v 1.8 2001/09/02 00:13:06 reinoud Exp $");
+__RCSID("$NetBSD: measure.c,v 1.9 2002/07/10 22:44:22 wiz Exp $");
#endif
#endif /* not lint */
@@ -71,7 +71,7 @@
u_long wmsec, /* msec to wait for an answer */
char *hname,
struct sockaddr_in *addr,
- int print) /* print complaints on stderr */
+ int printerr) /* print complaints on stderr */
{
int length;
int measure_status;
@@ -271,7 +271,7 @@
measure_delta, trials,
inet_ntoa(addr->sin_addr), hname);
}
- } else if (print) {
+ } else if (printerr) {
if (errno != 0)
fprintf(stderr, "measure %s: %s\n", hname,
strerror(errno));
diff -r 9980b0bf8bfe -r d2647af7571d usr.sbin/timed/timed/slave.c
--- a/usr.sbin/timed/timed/slave.c Wed Jul 10 22:40:35 2002 +0000
+++ b/usr.sbin/timed/timed/slave.c Wed Jul 10 22:44:22 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: slave.c,v 1.10 2002/07/06 22:08:31 wiz Exp $ */
+/* $NetBSD: slave.c,v 1.11 2002/07/10 22:44:22 wiz Exp $ */
/*-
* Copyright (c) 1985, 1993 The Regents of the University of California.
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)slave.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: slave.c,v 1.10 2002/07/06 22:08:31 wiz Exp $");
+__RCSID("$NetBSD: slave.c,v 1.11 2002/07/10 22:44:22 wiz Exp $");
#endif
#endif /* not lint */
@@ -67,7 +67,7 @@
slave(void)
{
int tries;
- long electiontime, refusetime, looktime, looptime, adjtime;
+ long electiontime, refusetime, looktime, looptime, adjusttime;
u_short seq;
long fastelection;
#define FASTTOUT 3
@@ -88,7 +88,7 @@
old_slavenet = 0;
seq = 0;
refusetime = 0;
- adjtime = 0;
+ adjusttime = 0;
(void)gettimeofday(&ntime, 0);
electiontime = ntime.tv_sec + delay2;
@@ -233,7 +233,7 @@
* is found.
*/
(void)gettimeofday(&otime, 0);
- if (adjtime < otime.tv_sec)
+ if (adjusttime < otime.tv_sec)
looptime -= (looptime-otime.tv_sec)/2 + 1;
setmaster(msg);
@@ -244,7 +244,7 @@
(void)gettimeofday(&ntime, 0);
electiontime = ntime.tv_sec + delay2;
fastelection = ntime.tv_sec + FASTTOUT;
- adjtime = ntime.tv_sec + SAMPLEINTVL*2;
+ adjusttime = ntime.tv_sec + SAMPLEINTVL*2;
break;
case TSP_SETTIME:
diff -r 9980b0bf8bfe -r d2647af7571d usr.sbin/timed/timed/timed.c
--- a/usr.sbin/timed/timed/timed.c Wed Jul 10 22:40:35 2002 +0000
+++ b/usr.sbin/timed/timed/timed.c Wed Jul 10 22:44:22 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: timed.c,v 1.15 2002/07/06 22:08:31 wiz Exp $ */
+/* $NetBSD: timed.c,v 1.16 2002/07/10 22:44:23 wiz Exp $ */
/*-
* Copyright (c) 1985, 1993 The Regents of the University of California.
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)timed.c 8.2 (Berkeley) 3/26/95";
#else
-__RCSID("$NetBSD: timed.c,v 1.15 2002/07/06 22:08:31 wiz Exp $");
+__RCSID("$NetBSD: timed.c,v 1.16 2002/07/10 22:44:23 wiz Exp $");
#endif
#endif /* not lint */
@@ -60,6 +60,10 @@
#include <sys/times.h>
#include <util.h>
+#ifdef HAVENIS
+#include <netgroup.h>
+#endif
+
int trace = 0;
int sock, sock_raw = -1;
int status = 0;
@@ -99,7 +103,7 @@
static char *goodgroup; /* net group of trusted hosts */
static void checkignorednets(void);
static void pickslavenet(struct netinfo *);
-static void add_good_host(char*,char);
+static void add_good_host(const char*,char);
/*
@@ -744,7 +748,7 @@
/* note a host as trustworthy */
static void
-add_good_host(char* name,
+add_good_host(const char* name,
char perm) /* 1=not part of the netgroup */
{
register struct goodhost *ghp;
@@ -780,7 +784,7 @@
struct goodhost *ghp, **ghpp;
#ifdef HAVENIS
struct hosttbl *htp;
- char *mach, *usr, *dom;
+ const char *mach, *usr, *dom;
#endif
struct tms tm;
Home |
Main Index |
Thread Index |
Old Index