Upgraded to Delaware version 3.3p (yes, that's right, they're not increasing).

This version still doesn't talk to the kernel PLL code, but you should be
able to convince it to do so relatively easily.  Also deleted some junk
files and fixed all compilation warnings.
This commit is contained in:
Garrett Wollman 1994-04-03 20:37:34 +00:00
parent 9ee42a21fa
commit 6341250e5d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1331
9 changed files with 73 additions and 18 deletions

View File

@ -2,6 +2,6 @@ DEFS_LOCAL=-DREFCLOCK -DPARSE
NTPDEFS= -DSYS_FREEBSD -DSYS_386BSD -DHAVE_TERMIOS
AUTHDEFS= -DMD5
CLOCKDEFS= -DLOCAL_CLOCK -DPST -DWWVB -DAS2201 -DGOES -DGPSTM -DOMEGA \
-DLEITCH
-DLEITCH -DTRAK
CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${AUTHDEFS} ${CLOCKDEFS} ${COPTS}
BINDIR?= /usr/sbin

View File

@ -1,6 +1,6 @@
This version of NTP was converted to the BSD-style Makefile system by
Garrett Wollman (wollman@freefall.cdrom.com); it is based on version
3.3z (late beta) from the University of Delaware.
3.3p (late beta) from the University of Delaware.
Besides the Makefile changes, the DES code has been completely removed
in order to make this code exportable. If you have a legal copy of

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile,v 1.3 1993/12/21 21:06:27 wollman Exp $
# $Id: Makefile,v 1.4 1993/12/22 11:32:23 rgrimes Exp $
#
CFLAGS+= -I${.CURDIR}/../include
@ -10,7 +10,7 @@ SRCS= atoint.c atolfp.c atouint.c auth12crypt.c authdecrypt.c authdes.c \
clocktime.c dofptoa.c dolfptoa.c emalloc.c fptoa.c fptoms.c \
gettstamp.c hextoint.c hextolfp.c humandate.c inttoa.c \
lib_strbuf.c mfptoa.c mfptoms.c modetoa.c mstolfp.c \
msutotsf.c numtoa.c refnumtoa.c numtohost.c octtoint.c \
msutotsf.c netof.c numtoa.c refnumtoa.c numtohost.c octtoint.c \
prettydate.c ranny.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
uglydate.c uinttoa.c utvtoa.c clocktypes.c \
md5.c a_md5encrypt.c a_md5decrypt.c \

View File

@ -301,7 +301,7 @@ static int decodereach P((char *, U_LONG *));
static int decodearr P((char *, int *, l_fp *));
static char * getcode P((int, struct codestring *));
static void help P((struct parse *, FILE *));
#if defined(sgi) || defined(SYS_BSDI)
#if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
static int helpsort P((const void *, const void *));
#else
static int helpsort P((char **, char **));
@ -335,7 +335,7 @@ static void output P((FILE *, char *, char *));
static void endoutput P((FILE *));
static void outputarr P((FILE *, char *, int, l_fp *));
static void cookedprint P((int, int, char *, int, FILE *));
#if defined(sgi) || defined(SYS_BSDI)
#if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
static int assoccmp P((const void *, const void *));
#else
static int assoccmp P((struct association *, struct association *));
@ -1888,7 +1888,7 @@ help(pcmd, fp)
for (xcp = opcmds; xcp->keyword != 0; xcp++)
cmdsort[n++] = xcp->keyword;
#if defined(sgi) || defined(SYS_BSDI)
#if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
qsort((void *)cmdsort, n, sizeof(char *), helpsort);
#else
qsort((char *)cmdsort, n, sizeof(char *), helpsort);
@ -1934,7 +1934,7 @@ help(pcmd, fp)
* helpsort - do hostname qsort comparisons
*/
static int
#if defined(sgi) || defined(SYS_BSDI)
#if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
helpsort(t1, t2)
const void *t1;
const void *t2;
@ -3028,7 +3028,7 @@ void
sortassoc()
{
if (numassoc > 1)
#if defined(sgi) || defined(SYS_BSDI)
#if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
qsort((void *)assoc_cache, numassoc,
sizeof(struct association), assoccmp);
#else
@ -3042,7 +3042,7 @@ sortassoc()
* assoccmp - compare two associations
*/
static int
#if defined(sgi) || defined(SYS_BSDI)
#if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
assoccmp(t1, t2)
const void *t1;
const void *t2;

View File

@ -1,4 +1,4 @@
/* tickadj.c,v 3.1 1993/07/06 01:11:05 jbj Exp
/*
* tickadj - read, and possibly modify, the kernel `tick' and
* `tickadj' variables, as well as `dosynctodr'. Note that
* this operates on the running kernel only. I'd like to be
@ -6,6 +6,41 @@
* mastered this yet.
*/
#include <stdio.h>
#ifdef SYS_LINUX
#include <sys/timex.h>
struct timex txc;
int
main(int argc, char ** argv)
{
if (argc > 2)
{
fprintf(stderr, "Usage: %s [tick_value]\n", argv[0]);
exit(-1);
}
else if (argc == 2)
{
if ( (txc.tick = atoi(argv[1])) < 1 )
{
fprintf(stderr, "Silly value for tick: %s\n", argv[1]);
exit(-1);
}
txc.mode = ADJ_TICK;
}
else
txc.mode = 0;
if (__adjtimex(&txc) < 0)
perror("adjtimex");
else
printf("tick = %d\n", txc.tick);
return(0);
}
#else /* not Linux... kmem tweaking: */
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
@ -353,6 +388,22 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off)
#endif
#endif
#if defined(SYS_HPUX)
#define X_TICKADJ 0
#define X_TICK 1
#define X_DEF
static struct nlist nl[] =
#ifdef hp9000s300
{ {"_tickadj"},
{"_old_tick"},
#else
{ {"tickadj"},
{"old_tick"},
#endif
{""},
};
#endif
#if !defined(X_DEF)
#define X_TICKADJ 0
#define X_TICK 1
@ -373,6 +424,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off)
"/kernel/unix",
"/386bsd",
"/netbsd",
"/hp-ux",
NULL
};
struct stat stbuf;
@ -513,3 +565,4 @@ readvar(fd, off, var)
exit(1);
}
}
#endif /* not Linux */

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile,v 1.3 1993/12/23 10:21:55 rgrimes Exp $
# $Id: Makefile,v 1.4 1994/02/03 23:23:17 wollman Exp $
#
CFLAGS+= -I${.CURDIR}/../include
@ -34,7 +34,7 @@ SRCS= ntp_config.c ntp_control.c ntp_io.c ntp_leap.c \
refclock_wwvb.c refclock_goes.c refclock_mx4200.c \
refclock_parse.c refclock_as2201.c refclock_omega.c \
refclock_tpro.c refclock_leitch.c refclock_irig.c \
refclock_msfees.c refclock_gpstm.c ntp_intres.c \
refclock_msfees.c refclock_gpstm.c refclock_trak.c ntp_intres.c \
ntp_filegen.c version.c
beforedepend: version.c

View File

@ -294,7 +294,7 @@ static struct utsname utsname;
static u_char clocktypes[] = {
CTL_SST_TS_NTP, /* REFCLK_NONE */
CTL_SST_TS_UNSPEC, /* REFCLK_LOCALCLOCK */
CTL_SST_TS_HF, /* REFCLK_WWV_HEATH */
CTL_SST_TS_HF, /* REFCLK_GPS_TRAK */
CTL_SST_TS_HF, /* REFCLK_WWV_PST */
CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM */
CTL_SST_TS_UHF, /* REFCLK_GOES_TRUETIME */

View File

@ -14,6 +14,8 @@
#include "ntp_refclock.h"
#include "ntp_unixtime.h"
static void gps_send();
#if defined(HAVE_BSD_TTYS)
#include <sgtty.h>
#endif /* HAVE_BSD_TTYS */
@ -841,7 +843,7 @@ trak_poll(unit, peer)
/*
* usually trak_receive can get a timestamp every second
*/
#ifndef TRAKPPS && TRAKCLK
#if !defined(TRAKPPS) && !defined(TRAKCLK)
gettstamp(&gps->lastrec);
#endif
gps->polls++;

View File

@ -53,7 +53,7 @@ static int findcmd P((char *, struct xcmd *, struct xcmd *, struct xcmd **));
static int getarg P((char *, int, arg_v *));
static int getnetnum P((char *, U_LONG *, char *));
static void help P((struct parse *, FILE *));
#if defined(sgi) || defined(SYS_BSDI)
#if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
static int helpsort P((const void *, const void *));
#else
static int helpsort P((char **, char **));
@ -1153,7 +1153,7 @@ help(pcmd, fp)
for (xcp = opcmds; xcp->keyword != 0; xcp++)
cmdsort[n++] = xcp->keyword;
#if defined(sgi) || defined(SYS_BSDI)
#if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
qsort((void *)cmdsort, n, sizeof(char *), helpsort);
#else
qsort((char *)cmdsort, n, sizeof(char *), helpsort);
@ -1199,7 +1199,7 @@ help(pcmd, fp)
* helpsort - do hostname qsort comparisons
*/
static int
#if defined(sgi) || defined(SYS_BSDI)
#if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
helpsort(t1, t2)
const void *t1;
const void *t2;