summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-17 14:34:38 +0000
committerlukem <lukem@NetBSD.org>1997-10-17 14:34:38 +0000
commitbb2c8b04e6ebbd46b3552187ef5d80be62830d25 (patch)
treea2b9899380e4b53c1148c019ec373eb5dcfc8cb2 /usr.sbin
parenta67f5d3e9660e1368be588d2670ffbccd4cc0615 (diff)
ntp_getopt returns -1 not EOF, disable WARNS here
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/xntp/Makefile.inc9
-rw-r--r--usr.sbin/xntp/ntpdate/ntpdate.c2
-rw-r--r--usr.sbin/xntp/ntpq/ntpq.c2
-rw-r--r--usr.sbin/xntp/ntptime/ntptime.c2
-rw-r--r--usr.sbin/xntp/ntptrace/ntptrace.c2
-rw-r--r--usr.sbin/xntp/xntp2netbsd8
-rw-r--r--usr.sbin/xntp/xntpd/ntp_config.c2
-rw-r--r--usr.sbin/xntp/xntpdc/ntpdc.c2
8 files changed, 19 insertions, 10 deletions
diff --git a/usr.sbin/xntp/Makefile.inc b/usr.sbin/xntp/Makefile.inc
index 77ea0468a67..920052424b3 100644
--- a/usr.sbin/xntp/Makefile.inc
+++ b/usr.sbin/xntp/Makefile.inc
@@ -1,5 +1,10 @@
-# $NetBSD: Makefile.inc,v 1.4 1997/06/23 17:34:18 christos Exp $
+# $NetBSD: Makefile.inc,v 1.5 1997/10/17 14:34:38 lukem Exp $
+
+WARNS?= 0
CFLAGS += -I${.CURDIR}/../include -DHAVE_CONFIG_H
LDADD += -lntp
DPADD += ${LIBNTP}
-BINDIR = /usr/sbin
+
+.if exists(${.CURDIR}/../../Makefile.inc)
+.include "${.CURDIR}/../../Makefile.inc"
+.endif
diff --git a/usr.sbin/xntp/ntpdate/ntpdate.c b/usr.sbin/xntp/ntpdate/ntpdate.c
index 3fc37dd675d..dacb0a8f1c0 100644
--- a/usr.sbin/xntp/ntpdate/ntpdate.c
+++ b/usr.sbin/xntp/ntpdate/ntpdate.c
@@ -238,7 +238,7 @@ main(argc, argv)
/*
* Decode argument list
*/
- while ((c = ntp_getopt(argc, argv, "a:bBde:k:o:p:qr:st:uv")) != EOF)
+ while ((c = ntp_getopt(argc, argv, "a:bBde:k:o:p:qr:st:uv")) != -1)
switch (c)
{
case 'a':
diff --git a/usr.sbin/xntp/ntpq/ntpq.c b/usr.sbin/xntp/ntpq/ntpq.c
index 14700ebce19..c8ad2cf0791 100644
--- a/usr.sbin/xntp/ntpq/ntpq.c
+++ b/usr.sbin/xntp/ntpq/ntpq.c
@@ -447,7 +447,7 @@ char *argv[];
delay_time.l_uf = DEFDELAY;
progname = argv[0];
- while ((c = ntp_getopt(argc, argv, "c:dinp")) != EOF)
+ while ((c = ntp_getopt(argc, argv, "c:dinp")) != -1)
switch (c) {
case 'c':
ADDCMD(ntp_optarg);
diff --git a/usr.sbin/xntp/ntptime/ntptime.c b/usr.sbin/xntp/ntptime/ntptime.c
index 8346ed2e1ba..3ee0fc486a8 100644
--- a/usr.sbin/xntp/ntptime/ntptime.c
+++ b/usr.sbin/xntp/ntptime/ntptime.c
@@ -103,7 +103,7 @@ main(argc, argv)
memset((char *)&ntx, 0, sizeof(ntx));
progname = argv[0];
- while ((c = ntp_getopt(argc, argv, optargs)) != EOF) switch (c) {
+ while ((c = ntp_getopt(argc, argv, optargs)) != -1) switch (c) {
case 'c':
cost++;
break;
diff --git a/usr.sbin/xntp/ntptrace/ntptrace.c b/usr.sbin/xntp/ntptrace/ntptrace.c
index b47c8c1173e..e7264c677f4 100644
--- a/usr.sbin/xntp/ntptrace/ntptrace.c
+++ b/usr.sbin/xntp/ntptrace/ntptrace.c
@@ -127,7 +127,7 @@ main(argc, argv)
/*
* Decode argument list
*/
- while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != EOF)
+ while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != -1)
switch (c) {
case 'd':
++debug;
diff --git a/usr.sbin/xntp/xntp2netbsd b/usr.sbin/xntp/xntp2netbsd
index 2df11bca3a0..827d99936f4 100644
--- a/usr.sbin/xntp/xntp2netbsd
+++ b/usr.sbin/xntp/xntp2netbsd
@@ -1,6 +1,6 @@
#!/usr/local/bin/perl
#
-# $NetBSD: xntp2netbsd,v 1.9 1997/07/08 05:07:47 christos Exp $
+# $NetBSD: xntp2netbsd,v 1.10 1997/10/17 14:34:44 lukem Exp $
#
# Perl script to convert a standard distribution directory for xntp into
# a NetBSD source tree.
@@ -263,10 +263,14 @@ SUBDIR= ntpdate ntpq ntptime ntptrace xntpd xntpdc
.include <bsd.subdir.mk>
%% file usr.sbin/xntp/Makefile.inc
%% NetBSD #
+WARNS?= 0
CFLAGS += -I${.CURDIR}/../include -DHAVE_CONFIG_H
LDADD += -lntp
DPADD += ${LIBNTP}
-BINDIR = /usr/sbin
+
+.if exists(${.CURDIR}/../../Makefile.inc)
+.include "${.CURDIR}/../../Makefile.inc"
+.endif
%% file usr.sbin/xntp/xntpd/Makefile
%% NetBSD #
diff --git a/usr.sbin/xntp/xntpd/ntp_config.c b/usr.sbin/xntp/xntpd/ntp_config.c
index 138b3ccf9f5..9d6770c05c5 100644
--- a/usr.sbin/xntp/xntpd/ntp_config.c
+++ b/usr.sbin/xntp/xntpd/ntp_config.c
@@ -484,7 +484,7 @@ getstartup(argc, argv)
/*
* Decode argument list
*/
- while ((c = ntp_getopt(argc, argv, xntp_options)) != EOF)
+ while ((c = ntp_getopt(argc, argv, xntp_options)) != -1)
switch (c) {
#ifdef DEBUG
case 'd':
diff --git a/usr.sbin/xntp/xntpdc/ntpdc.c b/usr.sbin/xntp/xntpdc/ntpdc.c
index 8a32ec18cf3..dae851ba638 100644
--- a/usr.sbin/xntp/xntpdc/ntpdc.c
+++ b/usr.sbin/xntp/xntpdc/ntpdc.c
@@ -248,7 +248,7 @@ char *argv[];
delay_time.l_uf = DEFDELAY;
progname = argv[0];
- while ((c = ntp_getopt(argc, argv, "c:dilnps")) != EOF)
+ while ((c = ntp_getopt(argc, argv, "c:dilnps")) != -1)
switch (c) {
case 'c':
ADDCMD(ntp_optarg);