[ntp:bk-ntp-dev-send] ***SPAM*** BitKeeper patch

Harlan Stenn stenn at whimsy.udel.edu
Wed Jul 20 02:16:00 UTC 2005


This BitKeeper patch contains the following changesets:
stenn at whimsy.udel.edu|ChangeSet|20050720012036|46565
stenn at whimsy.udel.edu|ChangeSet|20050720012145|46775
stenn at whimsy.udel.edu|ChangeSet|20050720021332|41070

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# ID:	stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
# User:	stenn
# Host:	whimsy.udel.edu
# Root:	/deacon/backroom/ntp-dev

#
#--- 1.46/Makefile.am	2004-02-18 00:56:17 -05:00
#+++ 1.49/Makefile.am	2005-07-19 22:13:22 -04:00
#@@ -1,5 +1,6 @@
# #AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
# AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.5
#+ACLOCAL_AMFLAGS= -I m4
# 
# SUBDIRS = \
# 	scripts \
#@@ -61,22 +62,24 @@
# 	install-sh \
# 	readme.y2kfixes \
# 	results.y2kfixes \
#+	\
# 	conf \
# 	html \
# 	libisc \
# 	ports \
#+	\
# 	version
# 
#-DISTCLEANFILES = .warning
#+DISTCLEANFILES = .gcc-warning
# 
#-#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in
#-ETAGS_ARGS = Makefile.am configure.in
#+#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.ac
#+ETAGS_ARGS = Makefile.am configure.ac
# 
# # HMS: make ports be the last directory...
# # DIST_HOOK_DIRS = conf html scripts ports
# 
#-# HMS: Keep .warning first, as that way it gets printed first.
#-BUILT_SOURCES = .warning $(srcdir)/COPYRIGHT $(srcdir)/version
#+# HMS: Keep .gcc-warning first, as that way it gets printed first.
#+BUILT_SOURCES = .gcc-warning $(srcdir)/COPYRIGHT $(srcdir)/version
# 
# $(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
# 	( echo "This file is automatically generated from html/copyright.html" ; lynx -dump $(srcdir)/html/copyright.html ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
#@@ -100,7 +103,7 @@
# 	@for i in `find $(distdir)/ports/winnt -type f -name '*.ds*' -print`; \
# 	   do chmod u+w $$i ; unix2dos $$i $$i; done
# 
#-.warning:
#+.gcc-warning:
# 	@echo "Compiling with GCC now generates lots of new warnings."
# 	@echo " "
# 	@echo "Don't be concerned. They're just warnings."
#@@ -110,7 +113,7 @@
# 	@echo "Feel free to send patches that fix these warnings, though."
# 	@echo " "
# 	@sleep 1
#-	@touch .warning
#+	@touch .gcc-warning
# 
# # HMS: The following seems to be a work-in-progress...
# 
#
#--- 1.25/include/ntp_control.h	2004-04-07 20:38:36 -04:00
#+++ 1.27/include/ntp_control.h	2005-07-19 22:13:23 -04:00
#@@ -218,17 +218,16 @@
# #define	CP_FILTERROR	34
# #define	CP_FLASH	35
# #define CP_TTL		36
#-#define	CP_RANK		37
#-#define CP_VARLIST	38
#+#define CP_VARLIST	37
# #ifdef OPENSSL
#-#define CP_FLAGS	39
#-#define CP_HOST		40
#-#define CP_VALID	41
#-#define	CP_INITSEQ	42
#-#define	CP_INITKEY	43
#-#define	CP_INITTSP	44
#-#define	CP_DIGEST	45
#-#define CP_IDENT	46
#+#define CP_FLAGS	38
#+#define CP_HOST		39
#+#define CP_VALID	40
#+#define	CP_INITSEQ	41
#+#define	CP_INITKEY	42
#+#define	CP_INITTSP	43
#+#define	CP_DIGEST	44
#+#define CP_IDENT	45
# #define	CP_MAXCODE	CP_IDENT
# #else
# #define	CP_MAXCODE	CP_VARLIST
#@@ -268,6 +267,7 @@
# 	u_char tr_flags;		/* trap flags */
# 	u_char tr_version;		/* version number of trapper */
# };
#+extern struct ctl_trap ctl_trap[];
# 
# /*
#  * Flag bits
#
#--- 1.15/include/ntp_refclock.h	2002-11-24 23:17:51 -05:00
#+++ 1.19/include/ntp_refclock.h	2005-07-19 22:13:24 -04:00
#@@ -65,6 +65,7 @@
# 	const char *clocktype;	/* long description */
# 	const char *abbrev;	/* short description */
# };
#+extern struct clktype clktypes[];
# 
# /*
#  * Configuration flag values
#@@ -163,13 +164,15 @@
#  * modules to be installed/loaded in the kernel. If specified, but not
#  * installed, the code runs as if unspecified.
#  */
#-#define LDISC_STD	0x0	/* standard */
#-#define LDISC_CLK	0x1	/* tty_clk \n intercept */
#-#define LDISC_CLKPPS	0x2	/* tty_clk \377 intercept */
#-#define LDISC_ACTS	0x4	/* tty_clk #* intercept */
#-#define LDISC_CHU	0x8	/* depredated */
#+#define LDISC_STD	0x00	/* standard */
#+#define LDISC_CLK	0x01	/* tty_clk \n intercept */
#+#define LDISC_CLKPPS	0x02	/* tty_clk \377 intercept */
#+#define LDISC_ACTS	0x04	/* tty_clk #* intercept */
#+#define LDISC_CHU	0x08	/* depredated */
# #define LDISC_PPS	0x10	/* ppsclock, ppsapi */
# #define LDISC_RAW	0x20	/* raw binary */
#+#define LDISC_ECHO	0x40	/* enable echo */
#+#define	LDISC_REMOTE	0x80	/* remobe mode */
# 
# struct refclockproc {
# 	struct	refclockio io;	/* I/O handler structure */
#@@ -234,7 +237,7 @@
# 				    struct refclockstat *, struct peer *));
# 	void (*clock_init)	P((void));
# 	void (*clock_buginfo)	P((int, struct refclockbug *, struct peer *));
#-	u_long clock_flags;
#+	void (*clock_timer)	P((int, struct peer *));
# };
# 
# /*
#@@ -254,14 +257,16 @@
# extern	void	refclock_control P((struct sockaddr_storage *,
# 				    struct refclockstat *,
# 				    struct refclockstat *));
#-extern	int	refclock_open	P((char *, int, int));
#+extern	int	refclock_open	P((char *, u_int, u_int));
#+extern	int	refclock_setup	P((int, u_int, u_int));
#+extern	void	refclock_timer	P((struct peer *));
# extern	void	refclock_transmit P((struct peer *));
#-extern	int	refclock_ioctl	P((int, int));
#+extern	int	refclock_ioctl	P((int, u_int));
# extern 	int	refclock_process P((struct refclockproc *));
# extern 	void	refclock_process_offset P((struct refclockproc *, l_fp, l_fp, double));
# extern	void	refclock_report	P((struct peer *, int));
#-extern	int	refclock_gtlin	P((struct recvbuf *, char *, int,
#-				    l_fp *));
#+extern	int	refclock_gtlin	P((struct recvbuf *, char *, int, l_fp *));
#+extern	int	refclock_gtraw  P((struct recvbuf *, char *, int, l_fp *));
# #endif /* REFCLOCK */
# 
# #endif /* NTP_REFCLOCK_H */
#
#--- 1.20/include/ntp_stdlib.h	2003-05-04 10:50:25 -04:00
#+++ 1.21/include/ntp_stdlib.h	2005-07-19 21:20:01 -04:00
#@@ -133,10 +133,6 @@
# extern u_char *	cache_key;		/* key pointer */
# extern u_int	cache_keylen;		/* key length */
# 
#-/* clocktypes.c */
#-struct clktype;
#-extern struct clktype clktypes[];
#-
# /* getopt.c */
# extern char *	ntp_optarg;		/* global argument pointer */
# extern int	ntp_optind;		/* global argv index */
#
#--- 1.66/include/ntpd.h	2004-05-04 01:01:25 -04:00
#+++ 1.79/include/ntpd.h	2005-07-19 22:13:25 -04:00
#@@ -11,8 +11,8 @@
# #include "recvbuff.h"
# 
# #ifdef SYS_WINNT
#-#define exit service_exit
#-extern	void	service_exit	(int);
#+#define exit ntservice_exit
#+extern	void	ntservice_exit	(int);
# /*	declare the service threads */
# void	service_main	(DWORD, LPTSTR *);
# void	service_ctrl	(DWORD);
#@@ -73,6 +73,8 @@
# /* ntp_io.c */
# extern	struct interface *findinterface P((struct sockaddr_storage *));
# extern  struct interface *findbcastinter P((struct sockaddr_storage *));
#+extern  void	enable_broadcast P((struct interface *, struct sockaddr_storage *));
#+extern	void	interface_dump	 P((struct interface *));
# 
# extern	void	init_io 	P((void));
# extern	void	input_handler	P((l_fp *));
#@@ -108,6 +110,7 @@
# extern	void	adj_host_clock	P((void));
# extern	void	loop_config P((int, double));
# extern	void	huffpuff	P((void));
#+extern	u_long	sys_clocktime;
# 
# /* ntp_monitor.c */
# extern	void	init_mon	P((void));
#@@ -118,7 +121,7 @@
# /* ntp_peer.c */
# extern	void	init_peer	P((void));
# extern	struct peer *findexistingpeer P((struct sockaddr_storage *, struct peer *, int));
#-extern	struct peer *findpeer	P((struct sockaddr_storage *, struct interface *, int, int, int *));
#+extern	struct peer *findpeer	P((struct sockaddr_storage *, struct interface *, int, int, int, int *));
# extern	struct peer *findpeerbyassoc P((u_int));
# extern	struct peer *newpeer	P((struct sockaddr_storage *, struct interface *, int, int, int, int, u_int, u_char, int, keyid_t));
# extern	void	peer_all_reset	P((void));
#@@ -154,9 +157,10 @@
# extern	void	transmit	P((struct peer *));
# extern	void	receive 	P((struct recvbuf *));
# extern	void	peer_clear	P((struct peer *, char *));
#-extern	void 	process_packet	P((struct peer *, struct pkt *, l_fp *));
#+extern	void 	process_packet	P((struct peer *, struct pkt *));
# extern	void	clock_select	P((void));
# extern	void	kod_proto	P((void));
#+extern	int	peer_unfit	P((struct peer *));
# 
# /*
#  * there seems to be a bug in the IRIX 4 compiler which prevents
#@@ -211,6 +215,7 @@
# extern	void	record_sys_stats P((void));
# extern	void	record_crypto_stats P((struct sockaddr_storage *, const char *));
# extern  int	sock_hash P((struct sockaddr_storage *));
#+extern	double	old_drift;
# 
# /*
#  * Variable declarations for ntpd.
#@@ -218,15 +223,13 @@
# 
# /* ntp_config.c */
# extern char const *	progname;
#-extern char	sys_phone[][MAXDIAL];	/* ACTS phone numbers */
#+extern char	*sys_phone[];		/* ACTS phone numbers */
# #if defined(HAVE_SCHED_SETSCHEDULER)
# extern int	config_priority_override;
# extern int	config_priority;
# #endif
# 
# /* ntp_control.c */
#-struct ctl_trap;
#-extern struct ctl_trap ctl_trap[];
# extern int	num_ctl_traps;
# extern keyid_t	ctl_auth_keyid;		/* keyid used for authenticating write requests */
# 
#@@ -350,7 +353,6 @@
# extern s_char	sys_precision;		/* local clock precision */
# extern double	sys_rootdelay;		/* distance to current sync source */
# extern double	sys_rootdispersion;	/* dispersion of system clock */
#-extern u_long	sys_clocktime;		/* last system clock update */
# extern u_int32	sys_refid;		/* reference source for local clock */
# extern l_fp	sys_reftime;		/* time we were last updated */
# extern struct peer *sys_peer;		/* our current peer */
#
#--- 1.33/ntpdc/ntpdc.c	2004-03-30 18:26:37 -05:00
#+++ 1.42/ntpdc/ntpdc.c	2005-07-19 22:13:25 -04:00
#@@ -7,7 +7,6 @@
# #include <ctype.h>
# #include <signal.h>
# #include <setjmp.h>
#-#include <netdb.h>
# 
# #include "ntpdc.h"
# #include "ntp_select.h"
#@@ -19,6 +18,7 @@
# #include "isc/result.h"
# 
# #ifdef SYS_WINNT
#+#include <Mswsock.h>
# # include <io.h>
# #else
# # define closesocket close
#@@ -105,10 +105,10 @@
# 	{ "help",	help,		{  OPT|NTP_STR, NO, NO, NO },
# 	  { "command", "", "", "" },
# 	  "tell the use and syntax of commands" },
#-	{ "timeout",	timeout,	{ OPT|UINT, NO, NO, NO },
#+	{ "timeout",	timeout,	{ OPT|NTP_UINT, NO, NO, NO },
# 	  { "msec", "", "", "" },
# 	  "set the primary receive time out" },
#-	{ "delay",	my_delay,	{ OPT|INT, NO, NO, NO },
#+	{ "delay",	my_delay,	{ OPT|NTP_INT, NO, NO, NO },
# 	  { "msec", "", "", "" },
# 	  "set the delay added to encryption time stamps" },
# 	{ "host",	host,		{ OPT|NTP_STR, OPT|NTP_STR, NO, NO },
#@@ -129,7 +129,7 @@
# 	{ "exit",	quit,		{ NO, NO, NO, NO },
# 	  { "", "", "", "" },
# 	  "exit ntpdc" },
#-	{ "keyid",	keyid,		{ OPT|UINT, NO, NO, NO },
#+	{ "keyid",	keyid,		{ OPT|NTP_UINT, NO, NO, NO },
# 	  { "key#", "", "", "" },
# 	  "set/show keyid to use for authenticated requests" },
# 	{ "keytype",	keytype,	{ OPT|NTP_STR, NO, NO, NO },
#@@ -155,8 +155,7 @@
# #define	MAXHOSTS	200		/* maximum hosts on cmd line */
# #define	MAXLINE		512		/* maximum line length */
# #define	MAXTOKENS	(1+1+MAXARGS+2)	/* maximum number of usable tokens */
#-					/* command + -4|-6 + MAXARGS + */
#-					/* redirection */
#+#define	SCREENWIDTH  	78		/* nominal screen width in columns */
# 
# /*
#  * Some variables used and manipulated locally
#@@ -449,7 +448,11 @@
# 	hints.ai_flags = AI_NUMERICHOST;
# 
# 	a_info = getaddrinfo(hname, service, &hints, &ai);
#-	if (a_info == EAI_NONAME || a_info == EAI_NODATA) {
#+	if (a_info == EAI_NONAME
#+#ifdef EAI_NODATA
#+	    || a_info == EAI_NODATA
#+#endif
#+	   ) {
# 		hints.ai_flags = AI_CANONNAME;
# #ifdef AI_ADDRCONFIG
# 		hints.ai_flags |= AI_ADDRCONFIG;
#@@ -870,13 +873,17 @@
# 		    + MAX_MAC_LEN - sizeof(struct req_pkt_tail));
# 
# 		if (info_auth_keyid == 0) {
#-			maclen = getkeyid("Keyid: ");
#-			if (maclen == 0) {
#-				(void) fprintf(stderr,
#-				    "Invalid key identifier\n");
#-				return 1;
#+			if (((struct conf_peer *)qpkt.data)->keyid > 0)
#+				info_auth_keyid = ((struct conf_peer *)qpkt.data)->keyid;
#+			else {
#+				maclen = getkeyid("Keyid: ");
#+				if (maclen == 0) {
#+					(void) fprintf(stderr,
#+					    "Invalid key identifier\n");
#+					return 1;
#+				}
#+				info_auth_keyid = maclen;
# 			}
#-			info_auth_keyid = maclen;
# 		}
# 		if (!authistrusted(info_auth_keyid)) {
# 			pass = getpass("MD5 Password: ");
#@@ -1313,7 +1320,7 @@
# 	    case NTP_STR:
# 		argp->string = str;
# 		break;
#-	    case ADD:
#+	    case NTP_ADD:
# 		if (!strcmp("-6", str)) {
# 			ai_fam_templ = AF_INET6;
# 			return -1;
#@@ -1325,8 +1332,8 @@
# 			return 0;
# 		}
# 		break;
#-	    case INT:
#-	    case UINT:
#+	    case NTP_INT:
#+	    case NTP_UINT:
# 		isneg = 0;
# 		np = str;
# 		if (*np == '-') {
#@@ -1347,7 +1354,7 @@
# 		} while (*(++np) != '\0');
# 
# 		if (isneg) {
#-			if ((code & ~OPT) == UINT) {
#+			if ((code & ~OPT) == NTP_UINT) {
# 				(void) fprintf(stderr,
# 					       "***Value %s should be unsigned\n", str);
# 				return 0;
#@@ -1447,57 +1454,56 @@
# 	FILE *fp
# 	)
# {
#-	int i;
#-	int n;
# 	struct xcmd *xcp;
# 	char *cmd;
#-	const char *cmdsort[100];
#-	int length[100];
#-	int maxlength;
#-	int numperline;
#-	static const char *spaces = "                    ";	/* 20 spaces */
#+	const char *list[100];
#+	int word, words;     
#+        int row, rows;
#+	int col, cols;
# 
# 	if (pcmd->nargs == 0) {
#-		n = 0;
#+		words = 0;
# 		for (xcp = builtins; xcp->keyword != 0; xcp++) {
# 			if (*(xcp->keyword) != '?')
#-			    cmdsort[n++] = xcp->keyword;
#+			    list[words++] = xcp->keyword;
# 		}
#-		for (xcp = opcmds; xcp->keyword != 0; xcp++)
#-		    cmdsort[n++] = xcp->keyword;
#+                for (xcp = opcmds; xcp->keyword != 0; xcp++)
#+		    list[words++] = xcp->keyword;
# 
#+		qsort(
# #ifdef QSORT_USES_VOID_P
#-		qsort(cmdsort, (size_t)n, sizeof(char *), helpsort);
#+		    (void *)
# #else
#-		qsort((char *)cmdsort, (size_t)n, sizeof(char *), helpsort);
#+		    (char *)
# #endif
#-
#-		maxlength = 0;
#-		for (i = 0; i < n; i++) {
#-			length[i] = strlen(cmdsort[i]);
#-			if (length[i] > maxlength)
#-			    maxlength = length[i];
#-		}
#-		maxlength++;
#-		numperline = 76 / maxlength;
#-
#-		(void) fprintf(fp, "Commands available:\n");
#-		for (i = 0; i < n; i++) {
#-			if ((i % numperline) == (numperline-1)
#-			    || i == (n-1))
#-			    (void) fprintf(fp, "%s\n", cmdsort[i]);
#-			else
#-			    (void) fprintf(fp, "%s%s", cmdsort[i],
#-					   spaces+20-maxlength+length[i]);
#+			(list), (size_t)(words), sizeof(char *), helpsort);
#+		col = 0;
#+		for (word = 0; word < words; word++) {
#+			int length = strlen(list[word]);
#+			if (col < length) {
#+			    col = length;
#+                        }
#+		}
#+
#+		cols = SCREENWIDTH / ++col;
#+                rows = (words + cols - 1) / cols;
#+
#+		(void) fprintf(fp, "ntpdc commands:\n");
#+
#+		for (row = 0; row < rows; row++) {
#+                        for (word = row; word < words; word += rows) {
#+				(void) fprintf(fp, "%-*.*s", col, col-1, list[word]);
#+                        }
#+			(void) fprintf(fp, "\n");
# 		}
# 	} else {
# 		cmd = pcmd->argval[0].string;
#-		n = findcmd(cmd, builtins, opcmds, &xcp);
#-		if (n == 0) {
#+		words = findcmd(cmd, builtins, opcmds, &xcp);
#+		if (words == 0) {
# 			(void) fprintf(stderr,
# 				       "Command `%s' is unknown\n", cmd);
# 			return;
#-		} else if (n >= 2) {
#+		} else if (words >= 2) {
# 			(void) fprintf(stderr,
# 				       "Command `%s' is ambiguous\n", cmd);
# 			return;
#@@ -1549,7 +1555,7 @@
# 	opt46 = 0;
# 	(void) fprintf(fp, "usage: %s", xcp->keyword);
# 	for (i = 0; i < MAXARGS && xcp->arg[i] != NO; i++) {
#-		if (opt46 == 0 && (xcp->arg[i] & ~OPT) == ADD) {
#+		if (opt46 == 0 && (xcp->arg[i] & ~OPT) == NTP_ADD) {
# 			(void) fprintf(fp, " [ -4|-6 ]");
# 			opt46 = 1;
# 		}
#
#--- 1.48/ntpq/ntpq.c	2004-05-04 01:57:26 -04:00
#+++ 1.59/ntpq/ntpq.c	2005-07-19 22:13:26 -04:00
#@@ -9,7 +9,6 @@
# #include <setjmp.h>
# #include <sys/types.h>
# #include <sys/time.h>
#-#include <netdb.h>
# 
# #include "ntpq.h"
# #include "ntp_unixtime.h"
#@@ -23,6 +22,7 @@
# #include "isc/result.h"
# 
# #ifdef SYS_WINNT
#+#include <Mswsock.h>
# # include <io.h>
# #else
# #define closesocket close
#@@ -210,17 +210,19 @@
#  * flasher bits
#  */
# static const char *tstflagnames[] = {
#-	"dup_pkt",		/* TEST1 */
#-	"bogus_pkt",		/* TEST2 */
#-	"proto_unsync",		/* TEST3 */
#-	"no_access",		/* TEST4 */
#-	"bad_auth",			/* TEST5 */
#-	"peer_unsync",		/* TEST6 */
#-	"peer_stratum",		/* TEST7 */
#-	"root_bounds",		/* TEST8 */
#-	"peer_bounds",		/* TEST9 */
#-	"bad_autokey",		/* TEST10 */
#-	"not_proventic"		/* TEST11*/
#+	"pkt_dup",		/* TEST1 */
#+	"pkt_bogus",		/* TEST2 */
#+	"pkt_proto",		/* TEST3 */
#+	"pkt_denied",		/* TEST4 */
#+	"pkt_auth",		/* TEST5 */
#+	"pkt_synch",		/* TEST6 */
#+	"pkt_dist",		/* TEST7 */
#+	"pkt_autokey",		/* TEST8 */
#+	"pkt_crypto",		/* TEST9 */
#+	"peer_stratum",		/* TEST10 */
#+	"peer_dist",		/* TEST11 */
#+	"peer_loop",		/* TEST12 */
#+	"peer_unfit"		/* TEST13 */
# };
# 
# 
#@@ -285,31 +287,31 @@
#  * Built-in commands we understand
#  */
# struct xcmd builtins[] = {
#-	{ "?",		help,		{  OPT|STR, NO, NO, NO },
#+	{ "?",		help,		{  OPT|NTP_STR, NO, NO, NO },
# 	  { "command", "", "", "" },
# 	  "tell the use and syntax of commands" },
#-	{ "help",	help,		{  OPT|STR, NO, NO, NO },
#+	{ "help",	help,		{  OPT|NTP_STR, NO, NO, NO },
# 	  { "command", "", "", "" },
# 	  "tell the use and syntax of commands" },
#-	{ "timeout",	timeout,	{ OPT|UINT, NO, NO, NO },
#+	{ "timeout",	timeout,	{ OPT|NTP_UINT, NO, NO, NO },
# 	  { "msec", "", "", "" },
# 	  "set the primary receive time out" },
#-	{ "delay",	auth_delay,	{ OPT|INT, NO, NO, NO },
#+	{ "delay",	auth_delay,	{ OPT|NTP_INT, NO, NO, NO },
# 	  { "msec", "", "", "" },
# 	  "set the delay added to encryption time stamps" },
#-	{ "host",	host,		{ OPT|STR, OPT|STR, NO, NO },
#+	{ "host",	host,		{ OPT|NTP_STR, OPT|NTP_STR, NO, NO },
# 	  { "-4|-6", "hostname", "", "" },
# 	  "specify the host whose NTP server we talk to" },
#-	{ "poll",	ntp_poll,	{ OPT|UINT, OPT|STR, NO, NO },
#+	{ "poll",	ntp_poll,	{ OPT|NTP_UINT, OPT|NTP_STR, NO, NO },
# 	  { "n", "verbose", "", "" },
# 	  "poll an NTP server in client mode `n' times" },
# 	{ "passwd",	passwd,		{ NO, NO, NO, NO },
# 	  { "", "", "", "" },
# 	  "specify a password to use for authenticated requests"},
#-	{ "hostnames",	hostnames,	{ OPT|STR, NO, NO, NO },
#+	{ "hostnames",	hostnames,	{ OPT|NTP_STR, NO, NO, NO },
# 	  { "yes|no", "", "", "" },
# 	  "specify whether hostnames or net numbers are printed"},
#-	{ "debug",	setdebug,	{ OPT|STR, NO, NO, NO },
#+	{ "debug",	setdebug,	{ OPT|NTP_STR, NO, NO, NO },
# 	  { "no|more|less", "", "", "" },
# 	  "set/change debugging level" },
# 	{ "quit",	quit,		{ NO, NO, NO, NO },
#@@ -318,7 +320,7 @@
# 	{ "exit",	quit,		{ NO, NO, NO, NO },
# 	  { "", "", "", "" },
# 	  "exit ntpq" },
#-	{ "keyid",	keyid,		{ OPT|UINT, NO, NO, NO },
#+	{ "keyid",	keyid,		{ OPT|NTP_UINT, NO, NO, NO },
# 	  { "key#", "", "", "" },
# 	  "set keyid to use for authenticated requests" },
# 	{ "version",	version,	{ NO, NO, NO, NO },
#@@ -330,13 +332,13 @@
# 	{ "cooked",	cooked,		{ NO, NO, NO, NO },
# 	  { "", "", "", "" },
# 	  "do cooked mode variable output" },
#-	{ "authenticate", authenticate,	{ OPT|STR, NO, NO, NO },
#+	{ "authenticate", authenticate,	{ OPT|NTP_STR, NO, NO, NO },
# 	  { "yes|no", "", "", "" },
# 	  "always authenticate requests to this server" },
#-	{ "ntpversion",	ntpversion,	{ OPT|UINT, NO, NO, NO },
#+	{ "ntpversion",	ntpversion,	{ OPT|NTP_UINT, NO, NO, NO },
# 	  { "version number", "", "", "" },
# 	  "set the NTP version number to use for requests" },
#-	{ "keytype",	keytype,	{ OPT|STR, NO, NO, NO },
#+	{ "keytype",	keytype,	{ OPT|NTP_STR, NO, NO, NO },
# 	  { "key type (md5|des)", "", "", "" },
# 	  "set key type to use for authenticated requests (des|md5)" },
# 	{ 0,		0,		{ NO, NO, NO, NO },
#@@ -359,6 +361,7 @@
# #define	MAXVARLEN	256		/* maximum length of a variable name */
# #define	MAXVALLEN	400		/* maximum length of a variable value */
# #define	MAXOUTLINE	72		/* maximum length of an output line */
#+#define SCREENWIDTH     76              /* nominal screen width in columns */
# 
# /*
#  * Some variables used and manipulated locally
#@@ -495,10 +498,11 @@
# 	extern int ntp_optind;
# 	extern char *ntp_optarg;
# 
#-#ifdef NO_MAIN_ALLOWED
#-    clear_globals();
#-    taskPrioritySet(taskIdSelf(), 100 );
#+#ifdef SYS_VXWORKS
#+	clear_globals();
#+	taskPrioritySet(taskIdSelf(), 100 );
# #endif
#+
# 	delay_time.l_ui = 0;
# 	delay_time.l_uf = DEFDELAY;
# 
#@@ -631,7 +635,11 @@
# 	hints.ai_flags = AI_NUMERICHOST;
# 
# 	a_info = getaddrinfo(hname, service, &hints, &ai);
#-	if (a_info == EAI_NONAME || a_info == EAI_NODATA) {
#+	if (a_info == EAI_NONAME
#+#ifdef EAI_NODATA
#+	    || a_info == EAI_NODATA
#+#endif
#+	   ) {
# 		hints.ai_flags = AI_CANONNAME;
# #ifdef AI_ADDRCONFIG
# 		hints.ai_flags |= AI_ADDRCONFIG;
#@@ -1581,16 +1589,16 @@
# 	static const char *digits = "0123456789";
# 
# 	switch (code & ~OPT) {
#-	    case STR:
#+	    case NTP_STR:
# 		argp->string = str;
# 		break;
#-	    case ADD:
#+	    case NTP_ADD:
# 		if (!getnetnum(str, &(argp->netnum), (char *)0, 0)) {
# 			return 0;
# 		}
# 		break;
#-	    case INT:
#-	    case UINT:
#+	    case NTP_INT:
#+	    case NTP_UINT:
# 		isneg = 0;
# 		np = str;
# 		if (*np == '&') {
#@@ -1633,7 +1641,7 @@
# 		} while (*(++np) != '\0');
# 
# 		if (isneg) {
#-			if ((code & ~OPT) == UINT) {
#+			if ((code & ~OPT) == NTP_UINT) {
# 				(void) fprintf(stderr,
# 					       "***Value %s should be unsigned\n", str);
# 				return 0;
#@@ -1993,57 +2001,56 @@
# 	FILE *fp
# 	)
# {
#-	int i;
#-	int n;
# 	struct xcmd *xcp;
# 	char *cmd;
#-	const char *cmdsort[100];
#-	int length[100];
#-	int maxlength;
#-	int numperline;
#-	static const char *spaces = "                    ";	/* 20 spaces */
#+	const char *list[100];
#+        int word, words;
#+        int row, rows;
#+        int col, cols;
# 
# 	if (pcmd->nargs == 0) {
#-		n = 0;
#+		words = 0;
# 		for (xcp = builtins; xcp->keyword != 0; xcp++) {
# 			if (*(xcp->keyword) != '?')
#-			    cmdsort[n++] = xcp->keyword;
#+			    list[words++] = xcp->keyword;
# 		}
# 		for (xcp = opcmds; xcp->keyword != 0; xcp++)
#-		    cmdsort[n++] = xcp->keyword;
#+		    list[words++] = xcp->keyword;
# 
#+		qsort(
# #ifdef QSORT_USES_VOID_P
#-		qsort(cmdsort, (size_t)n, sizeof(char *), helpsort);
#+		    (void *)
# #else
#-		qsort((char *)cmdsort, (size_t)n, sizeof(char *), helpsort);
#+		    (char *)
# #endif
#-
#-		maxlength = 0;
#-		for (i = 0; i < n; i++) {
#-			length[i] = strlen(cmdsort[i]);
#-			if (length[i] > maxlength)
#-			    maxlength = length[i];
#-		}
#-		maxlength++;
#-		numperline = 76 / maxlength;
#-
#-		(void) fprintf(fp, "Commands available:\n");
#-		for (i = 0; i < n; i++) {
#-			if ((i % numperline) == (numperline-1)
#-			    || i == (n-1))
#-			    (void) fprintf(fp, "%s\n", cmdsort[i]);
#-			else
#-			    (void) fprintf(fp, "%s%s", cmdsort[i],
#-					   spaces+20-maxlength+length[i]);
#-		}
#+			(list), (size_t)(words), sizeof(char *), helpsort);
#+		col = 0;
#+		for (word = 0; word < words; word++) {
#+		 	int length = strlen(list[word]);
#+			if (col < length) {
#+			    col = length;
#+                        }
#+		}
#+
#+		cols = SCREENWIDTH / ++col;
#+                rows = (words + cols - 1) / cols;
#+
#+		(void) fprintf(fp, "ntpq commands:\n");
#+
#+		for (row = 0; row < rows; row++) {
#+                        for (word = row; word < words; word += rows) {
#+			        (void) fprintf(fp, "%-*.*s", col, col-1, list[word]);
#+                        }
#+                        (void) fprintf(fp, "\n");
#+                }
# 	} else {
# 		cmd = pcmd->argval[0].string;
#-		n = findcmd(cmd, builtins, opcmds, &xcp);
#-		if (n == 0) {
#+		words = findcmd(cmd, builtins, opcmds, &xcp);
#+		if (words == 0) {
# 			(void) fprintf(stderr,
# 				       "Command `%s' is unknown\n", cmd);
# 			return;
#-		} else if (n >= 2) {
#+		} else if (words >= 2) {
# 			(void) fprintf(stderr,
# 				       "Command `%s' is ambiguous\n", cmd);
# 			return;
#@@ -2745,12 +2752,15 @@
# 
# 
# /*
#- * findvar - see if this variable is known to us
#+ * findvar - see if this variable is known to us.
#+ * If "code" is 1, return ctl_var->code.
#+ * Otherwise return the ordinal position of the found variable.
#  */
# int
# findvar(
# 	char *varname,
#-	struct ctl_var *varlist
#+	struct ctl_var *varlist,
#+	int code
# 	)
# {
# 	register char *np;
#@@ -2760,7 +2770,10 @@
# 	np = varname;
# 	while (vl->fmt != EOV) {
# 		if (vl->fmt != PADDING && STREQ(np, vl->text))
#-		    return vl->code;
#+		    return (code)
#+				? vl->code
#+				: (vl - varlist)
#+			    ;
# 		vl++;
# 	}
# 	return 0;
#@@ -2966,7 +2979,7 @@
# 		cb += strlen(cb);
# 	} else {
# 		*cb++ = ' ';
#-		for (i = 0; i < 11; i++) {
#+		for (i = 0; i < 14; i++) {
# 			if (val & 0x1) {
# 				sprintf(cb, "%s%s", sep, tstflagnames[i]);
# 				sep = ", ";
#@@ -3024,7 +3037,7 @@
# 
# 	startoutput();
# 	while (nextvar(&length, &data, &name, &value)) {
#-		varid = findvar(name, varlist);
#+		varid = findvar(name, varlist, 0);
# 		if (varid == 0) {
# 			output_raw = '*';
# 		} else {
#

# Diff checksum=d8a241ab


# Patch vers:	1.3
# Patch type:	REGULAR

== ChangeSet ==
stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
stenn at whimsy.udel.edu|ChangeSet|20050720001343|47019
D 1.1178.5.4 05/07/19 21:20:36-04:00 stenn at whimsy.udel.edu +4 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 466] Fix compilation under gcc4
K 46565
P ChangeSet
------------------------------------------------

0a0
> stenn at whimsy.udel.edu|include/ntp_control.h|19990526004814|01635|3aed0663 stenn at whimsy.udel.edu|include/ntp_control.h|20050720012000|26203
> stenn at whimsy.udel.edu|include/ntp_refclock.h|19990526004814|01635|3aed0663 stenn at whimsy.udel.edu|include/ntp_refclock.h|20050720012001|61614
> stenn at whimsy.udel.edu|include/ntp_stdlib.h|19990526004815|01635|3aed0663 stenn at whimsy.udel.edu|include/ntp_stdlib.h|20050720012001|27403
> stenn at whimsy.udel.edu|include/ntpd.h|19990526004815|01635|3aed0663 stenn at whimsy.udel.edu|include/ntpd.h|20050720012002|44955

stenn at whimsy.udel.edu|ChangeSet|20050720012036|46565
D 1.1178.5.5 05/07/19 21:21:45-04:00 stenn at whimsy.udel.edu +3 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c FreeBSD porting issues
K 46775
P ChangeSet
------------------------------------------------

0a0
> stenn at whimsy.udel.edu|Makefile.am|19990526004810|01635|3aed0663 stenn at whimsy.udel.edu|Makefile.am|20050720012129|15662
> stenn at whimsy.udel.edu|ntpdc/ntpdc.c|19990526004819|01635|3aed0663 stenn at whimsy.udel.edu|ntpdc/ntpdc.c|20050720012129|17118
> stenn at whimsy.udel.edu|ntpq/ntpq.c|19990526004819|01635|3aed0663 stenn at whimsy.udel.edu|ntpq/ntpq.c|20050720012129|32406

stenn at whimsy.udel.edu|ChangeSet|20050720002529|41341
D 1.1389 05/07/19 22:13:32-04:00 stenn at whimsy.udel.edu +6 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Merge whimsy.udel.edu:/backroom/ntp-stable
c into  whimsy.udel.edu:/deacon/backroom/ntp-dev
i stenn at whimsy.udel.edu|ChangeSet|20050720012036|46565
i stenn at whimsy.udel.edu|ChangeSet|20050720012145|46775
K 41070
M stenn at whimsy.udel.edu|ChangeSet|20050720012145|46775
P ChangeSet
------------------------------------------------

0a0
> stenn at whimsy.udel.edu|Makefile.am|19990526004810|01635|3aed0663 stenn at whimsy.udel.edu|Makefile.am|20050720021322|17357
> stenn at whimsy.udel.edu|include/ntp_control.h|19990526004814|01635|3aed0663 stenn at whimsy.udel.edu|include/ntp_control.h|20050720021323|24864
> stenn at whimsy.udel.edu|include/ntp_refclock.h|19990526004814|01635|3aed0663 stenn at whimsy.udel.edu|include/ntp_refclock.h|20050720021324|19327
> stenn at whimsy.udel.edu|include/ntpd.h|19990526004815|01635|3aed0663 stenn at whimsy.udel.edu|include/ntpd.h|20050720021325|60016
> stenn at whimsy.udel.edu|ntpdc/ntpdc.c|19990526004819|01635|3aed0663 stenn at whimsy.udel.edu|ntpdc/ntpdc.c|20050720021325|24521
> stenn at whimsy.udel.edu|ntpq/ntpq.c|19990526004819|01635|3aed0663 stenn at whimsy.udel.edu|ntpq/ntpq.c|20050720021326|53168

== Makefile.am ==
stenn at whimsy.udel.edu|Makefile.am|19990526004810|01635|3aed0663
stenn at whimsy.udel.edu|Makefile.am|20040218055617|13932
D 1.46.1.1 05/07/19 21:21:29-04:00 stenn at whimsy.udel.edu +5 -5
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c FreeBSD porting issues
K 15662
O -rw-rw-r--
P Makefile.am
------------------------------------------------

D70 1
I70 1
DISTCLEANFILES = .gcc-warning
D78 2
I79 2
# HMS: Keep .gcc-warning first, as that way it gets printed first.
BUILT_SOURCES = .gcc-warning $(srcdir)/COPYRIGHT $(srcdir)/version
D103 1
I103 1
.gcc-warning:
D113 1
I113 1
	@touch .gcc-warning

stenn at whimsy.udel.edu|Makefile.am|20040812022810|17357
D 1.49 05/07/19 22:13:22-04:00 stenn at whimsy.udel.edu +0 -5
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Auto merged
i stenn at whimsy.udel.edu|Makefile.am|20050720012129|15662
K 17357
M stenn at whimsy.udel.edu|Makefile.am|20050720012129|15662
O -rw-rw-r--
P Makefile.am
------------------------------------------------

D74 1
D84 2
D110 1
D120 1

== include/ntp_control.h ==
stenn at whimsy.udel.edu|include/ntp_control.h|19990526004814|01635|3aed0663
stenn at whimsy.udel.edu|include/ntp_control.h|20040408003836|22801
D 1.25.1.1 05/07/19 21:20:00-04:00 stenn at whimsy.udel.edu +1 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 466] Fix compilation under gcc4
K 26203
O -rw-rw-r--
P include/ntp_control.h
------------------------------------------------

I270 1
extern struct ctl_trap ctl_trap[];

stenn at whimsy.udel.edu|include/ntp_control.h|20050418050113|21462
D 1.27 05/07/19 22:13:23-04:00 stenn at whimsy.udel.edu +0 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Auto merged
i stenn at whimsy.udel.edu|include/ntp_control.h|20050720012000|26203
K 24864
M stenn at whimsy.udel.edu|include/ntp_control.h|20050720012000|26203
O -rw-rw-r--
P include/ntp_control.h
------------------------------------------------


== include/ntp_refclock.h ==
stenn at whimsy.udel.edu|include/ntp_refclock.h|19990526004814|01635|3aed0663
mayer at tecotoo.myibg.com|include/ntp_refclock.h|20021125041751|58283
D 1.15.1.1 05/07/19 21:20:01-04:00 stenn at whimsy.udel.edu +1 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 466] Fix compilation under gcc4
K 61614
O -rw-rw-r--
P include/ntp_refclock.h
------------------------------------------------

I67 1
extern struct clktype clktypes[];

stenn at whimsy.udel.edu|include/ntp_refclock.h|20050506035512|15996
D 1.19 05/07/19 22:13:24-04:00 stenn at whimsy.udel.edu +0 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Auto merged
i stenn at whimsy.udel.edu|include/ntp_refclock.h|20050720012001|61614
K 19327
M stenn at whimsy.udel.edu|include/ntp_refclock.h|20050720012001|61614
O -rw-rw-r--
P include/ntp_refclock.h
------------------------------------------------


== include/ntp_stdlib.h ==
stenn at whimsy.udel.edu|include/ntp_stdlib.h|19990526004815|01635|3aed0663
mayer at tecotoo.myibg.com|include/ntp_stdlib.h|20030504145025|33772
D 1.21 05/07/19 21:20:01-04:00 stenn at whimsy.udel.edu +0 -4
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 466] Fix compilation under gcc4
K 27403
O -rw-rw-r--
P include/ntp_stdlib.h
------------------------------------------------

D136 4

== include/ntpd.h ==
stenn at whimsy.udel.edu|include/ntpd.h|19990526004815|01635|3aed0663
stenn at whimsy.udel.edu|include/ntpd.h|20040504050125|49992
D 1.66.1.1 05/07/19 21:20:02-04:00 stenn at whimsy.udel.edu +0 -2
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 466] Fix compilation under gcc4
K 44955
O -rw-rw-r--
P include/ntpd.h
------------------------------------------------

D228 2

stenn at whimsy.udel.edu|include/ntpd.h|20050528084442|65053
D 1.79 05/07/19 22:13:25-04:00 stenn at whimsy.udel.edu +0 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Auto merged
i stenn at whimsy.udel.edu|include/ntpd.h|20050720012002|44955
K 60016
M stenn at whimsy.udel.edu|include/ntpd.h|20050720012002|44955
O -rw-rw-r--
P include/ntpd.h
------------------------------------------------


== ntpdc/ntpdc.c ==
stenn at whimsy.udel.edu|ntpdc/ntpdc.c|19990526004819|01635|3aed0663
mayer at pogo.udel.edu|ntpdc/ntpdc.c|20040330232637|14997
D 1.33.2.1 05/07/19 21:21:29-04:00 stenn at whimsy.udel.edu +5 -1
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c FreeBSD porting issues
K 17118
O -rw-rw-r--
P ntpdc/ntpdc.c
------------------------------------------------

D452 1
I452 5
	if (a_info == EAI_NONAME
#ifdef EAI_NODATA
	    || a_info == EAI_NODATA
#endif
	   ) {

stenn at whimsy.udel.edu|ntpdc/ntpdc.c|20050427095322|24521
D 1.42 05/07/19 22:13:25-04:00 stenn at whimsy.udel.edu +0 -5
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Auto merged
i stenn at whimsy.udel.edu|ntpdc/ntpdc.c|20050720012129|17118
K 24521
M stenn at whimsy.udel.edu|ntpdc/ntpdc.c|20050720012129|17118
O -rw-rw-r--
P ntpdc/ntpdc.c
------------------------------------------------

D456 5

== ntpq/ntpq.c ==
stenn at whimsy.udel.edu|ntpq/ntpq.c|19990526004819|01635|3aed0663
stenn at whimsy.udel.edu|ntpq/ntpq.c|20040504055726|30285
D 1.48.2.1 05/07/19 21:21:29-04:00 stenn at whimsy.udel.edu +5 -1
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c FreeBSD porting issues
K 32406
O -rw-rw-r--
P ntpq/ntpq.c
------------------------------------------------

D634 1
I634 5
	if (a_info == EAI_NONAME
#ifdef EAI_NODATA
	    || a_info == EAI_NODATA
#endif
	   ) {

stenn at whimsy.udel.edu|ntpq/ntpq.c|20050629083137|53168
D 1.59 05/07/19 22:13:26-04:00 stenn at whimsy.udel.edu +0 -5
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c Auto merged
i stenn at whimsy.udel.edu|ntpq/ntpq.c|20050720012129|32406
K 53168
M stenn at whimsy.udel.edu|ntpq/ntpq.c|20050720012129|32406
O -rw-rw-r--
P ntpq/ntpq.c
------------------------------------------------

D643 5

# Patch checksum=c75651eb


More information about the bk-ntp-dev-send mailing list