summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpd
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/ntpd')
-rw-r--r--contrib/ntp/ntpd/Makefile.am30
-rw-r--r--contrib/ntp/ntpd/Makefile.in605
-rw-r--r--contrib/ntp/ntpd/jupiter.h2
-rw-r--r--contrib/ntp/ntpd/ntp_config.c14
-rw-r--r--contrib/ntp/ntpd/ntp_control.c3
-rw-r--r--contrib/ntp/ntpd/ntp_crypto.c4
-rw-r--r--contrib/ntp/ntpd/ntp_intres.c3
-rw-r--r--contrib/ntp/ntpd/ntp_io.c34
-rw-r--r--contrib/ntp/ntpd/ntp_loopfilter.c85
-rw-r--r--contrib/ntp/ntpd/ntp_proto.c9
-rw-r--r--contrib/ntp/ntpd/ntp_request.c99
-rw-r--r--contrib/ntp/ntpd/ntp_timer.c4
-rw-r--r--contrib/ntp/ntpd/ntpd.c46
-rw-r--r--contrib/ntp/ntpd/refclock_chu.c3
-rw-r--r--contrib/ntp/ntpd/refclock_conf.c31
-rw-r--r--contrib/ntp/ntpd/refclock_jjy.c712
-rw-r--r--contrib/ntp/ntpd/refclock_local.c2
-rw-r--r--contrib/ntp/ntpd/refclock_oncore.c2
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.c2
-rw-r--r--contrib/ntp/ntpd/refclock_true.c2
-rw-r--r--contrib/ntp/ntpd/refclock_tt560.c274
-rw-r--r--contrib/ntp/ntpd/refclock_zyfer.c346
22 files changed, 1903 insertions, 409 deletions
diff --git a/contrib/ntp/ntpd/Makefile.am b/contrib/ntp/ntpd/Makefile.am
index 718d996..0c1d4c1 100644
--- a/contrib/ntp/ntpd/Makefile.am
+++ b/contrib/ntp/ntpd/Makefile.am
@@ -20,22 +20,24 @@ EXTRA_PROGRAMS = check_y2k
check-local: @MAKE_CHECK_Y2K@
test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
+# ntp_resolver.c is presently unused...
ntpd_SOURCES = cmd_args.c jupiter.h map_vme.c ntp_config.c ntp_control.c \
ntp_crypto.c ntp_filegen.c \
ntp_intres.c ntp_io.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \
- ntp_proto.c ntp_refclock.c ntp_request.c ntp_resolver.c \
- ntp_restrict.c ntp_timer.c \
- ntp_util.c ntpd.c refclock_acts.c refclock_arbiter.c refclock_arc.c \
- refclock_as2201.c refclock_atom.c refclock_bancomm.c \
- refclock_chronolog.c refclock_chu.c refclock_conf.c refclock_datum.c \
- refclock_dumbclock.c refclock_fg.c refclock_gpsvme.c refclock_heath.c \
- refclock_hopfser.c refclock_hopfpci.c \
- refclock_hpgps.c refclock_irig.c refclock_jupiter.c refclock_leitch.c \
- refclock_local.c refclock_msfees.c refclock_mx4200.c refclock_nmea.c \
- refclock_oncore.c refclock_palisade.c refclock_palisade.h \
- refclock_parse.c refclock_pcf.c refclock_pst.c refclock_ptbacts.c \
- refclock_shm.c refclock_tpro.c refclock_trak.c refclock_true.c \
- refclock_ulink.c refclock_usno.c refclock_wwv.c refclock_wwvb.c
+ ntp_proto.c ntp_refclock.c ntp_request.c \
+ ntp_restrict.c ntp_timer.c ntp_util.c ntpd.c \
+ refclock_acts.c refclock_arbiter.c refclock_arc.c refclock_as2201.c \
+ refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
+ refclock_chu.c refclock_conf.c refclock_datum.c refclock_dumbclock.c \
+ refclock_fg.c refclock_gpsvme.c refclock_heath.c refclock_hopfser.c \
+ refclock_hopfpci.c refclock_hpgps.c refclock_irig.c refclock_jjy.c \
+ refclock_jupiter.c refclock_leitch.c refclock_local.c \
+ refclock_msfees.c refclock_mx4200.c refclock_nmea.c refclock_oncore.c \
+ refclock_palisade.c refclock_palisade.h refclock_parse.c \
+ refclock_pcf.c refclock_pst.c refclock_ptbacts.c refclock_shm.c \
+ refclock_tpro.c refclock_trak.c refclock_true.c refclock_tt560.c \
+ refclock_ulink.c refclock_usno.c refclock_wwv.c refclock_wwvb.c \
+ refclock_zyfer.c
$(PROGRAMS): $(LDADD)
@@ -46,5 +48,5 @@ $(PROGRAMS): $(LDADD)
cd ../libparse && $(MAKE)
version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ @LIBRSAREF@ Makefile
- $(top_builddir)/scripts/mkver ntpd
+ env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpd
$(COMPILE) -c version.c
diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in
index 0e3ad1c..5eb698f 100644
--- a/contrib/ntp/ntpd/Makefile.in
+++ b/contrib/ntp/ntpd/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,10 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+@SET_MAKE@
+
+#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
+
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +35,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-
top_builddir = ..
ACLOCAL = @ACLOCAL@
@@ -49,23 +51,18 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
-
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
-
-@SET_MAKE@
-AMDEP = @AMDEP@
AMTAR = @AMTAR@
AUTOKEY = @AUTOKEY@
AWK = @AWK@
@@ -78,13 +75,12 @@ DCFD = @DCFD@
DEPDIR = @DEPDIR@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
+EXEEXT = @EXEEXT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
LDFLAGS = @LDFLAGS@
LIBPARSE = @LIBPARSE@
LIBRSAREF = @LIBRSAREF@
LN_S = @LN_S@
-MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
@@ -95,6 +91,7 @@ MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
+OBJEXT = @OBJEXT@
OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
@@ -107,16 +104,13 @@ RSADIR = @RSADIR@
RSAOBJS = @RSAOBJS@
RSAREF = @RSAREF@
RSASRCS = @RSASRCS@
-STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
-_am_include = @_am_include@
+am__include = @am__include@
+am__quote = @am__quote@
install_sh = @install_sh@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-
-
AUTOMAKE_OPTIONS = ../util/ansi2knr
bin_PROGRAMS = ntpd
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/librsaref
@@ -135,25 +129,25 @@ ETAGS_ARGS = Makefile.am
check_PROGRAMS = @MAKE_CHECK_Y2K@
EXTRA_PROGRAMS = check_y2k
+# ntp_resolver.c is presently unused...
ntpd_SOURCES = cmd_args.c jupiter.h map_vme.c ntp_config.c ntp_control.c \
ntp_crypto.c ntp_filegen.c \
ntp_intres.c ntp_io.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \
- ntp_proto.c ntp_refclock.c ntp_request.c ntp_resolver.c \
- ntp_restrict.c ntp_timer.c \
- ntp_util.c ntpd.c refclock_acts.c refclock_arbiter.c refclock_arc.c \
- refclock_as2201.c refclock_atom.c refclock_bancomm.c \
- refclock_chronolog.c refclock_chu.c refclock_conf.c refclock_datum.c \
- refclock_dumbclock.c refclock_fg.c refclock_gpsvme.c refclock_heath.c \
- refclock_hopfser.c refclock_hopfpci.c \
- refclock_hpgps.c refclock_irig.c refclock_jupiter.c refclock_leitch.c \
- refclock_local.c refclock_msfees.c refclock_mx4200.c refclock_nmea.c \
- refclock_oncore.c refclock_palisade.c refclock_palisade.h \
- refclock_parse.c refclock_pcf.c refclock_pst.c refclock_ptbacts.c \
- refclock_shm.c refclock_tpro.c refclock_trak.c refclock_true.c \
- refclock_ulink.c refclock_usno.c refclock_wwv.c refclock_wwvb.c
-
-EXEEXT =
-OBJEXT = o
+ ntp_proto.c ntp_refclock.c ntp_request.c \
+ ntp_restrict.c ntp_timer.c ntp_util.c ntpd.c \
+ refclock_acts.c refclock_arbiter.c refclock_arc.c refclock_as2201.c \
+ refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
+ refclock_chu.c refclock_conf.c refclock_datum.c refclock_dumbclock.c \
+ refclock_fg.c refclock_gpsvme.c refclock_heath.c refclock_hopfser.c \
+ refclock_hopfpci.c refclock_hpgps.c refclock_irig.c refclock_jjy.c \
+ refclock_jupiter.c refclock_leitch.c refclock_local.c \
+ refclock_msfees.c refclock_mx4200.c refclock_nmea.c refclock_oncore.c \
+ refclock_palisade.c refclock_palisade.h refclock_parse.c \
+ refclock_pcf.c refclock_pst.c refclock_ptbacts.c refclock_shm.c \
+ refclock_tpro.c refclock_trak.c refclock_true.c refclock_tt560.c \
+ refclock_ulink.c refclock_usno.c refclock_wwv.c refclock_wwvb.c \
+ refclock_zyfer.c
+
subdir = ntpd
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
@@ -163,94 +157,120 @@ bin_PROGRAMS = ntpd$(EXEEXT)
check_PROGRAMS = @MAKE_CHECK_Y2K@
PROGRAMS = $(bin_PROGRAMS)
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-ANSI2KNR = ../util/ansi2knr
check_y2k_SOURCES = check_y2k.c
check_y2k_OBJECTS = check_y2k$U.$(OBJEXT)
check_y2k_LDADD = $(LDADD)
check_y2k_DEPENDENCIES = version.o ../libntp/libntp.a
-check_y2k_LDFLAGS =
+check_y2k_LDFLAGS =
am_ntpd_OBJECTS = cmd_args$U.$(OBJEXT) map_vme$U.$(OBJEXT) \
-ntp_config$U.$(OBJEXT) ntp_control$U.$(OBJEXT) ntp_crypto$U.$(OBJEXT) \
-ntp_filegen$U.$(OBJEXT) ntp_intres$U.$(OBJEXT) ntp_io$U.$(OBJEXT) \
-ntp_loopfilter$U.$(OBJEXT) ntp_monitor$U.$(OBJEXT) ntp_peer$U.$(OBJEXT) \
-ntp_proto$U.$(OBJEXT) ntp_refclock$U.$(OBJEXT) ntp_request$U.$(OBJEXT) \
-ntp_resolver$U.$(OBJEXT) ntp_restrict$U.$(OBJEXT) ntp_timer$U.$(OBJEXT) \
-ntp_util$U.$(OBJEXT) ntpd$U.$(OBJEXT) refclock_acts$U.$(OBJEXT) \
-refclock_arbiter$U.$(OBJEXT) refclock_arc$U.$(OBJEXT) \
-refclock_as2201$U.$(OBJEXT) refclock_atom$U.$(OBJEXT) \
-refclock_bancomm$U.$(OBJEXT) refclock_chronolog$U.$(OBJEXT) \
-refclock_chu$U.$(OBJEXT) refclock_conf$U.$(OBJEXT) \
-refclock_datum$U.$(OBJEXT) refclock_dumbclock$U.$(OBJEXT) \
-refclock_fg$U.$(OBJEXT) refclock_gpsvme$U.$(OBJEXT) \
-refclock_heath$U.$(OBJEXT) refclock_hopfser$U.$(OBJEXT) \
-refclock_hopfpci$U.$(OBJEXT) refclock_hpgps$U.$(OBJEXT) \
-refclock_irig$U.$(OBJEXT) refclock_jupiter$U.$(OBJEXT) \
-refclock_leitch$U.$(OBJEXT) refclock_local$U.$(OBJEXT) \
-refclock_msfees$U.$(OBJEXT) refclock_mx4200$U.$(OBJEXT) \
-refclock_nmea$U.$(OBJEXT) refclock_oncore$U.$(OBJEXT) \
-refclock_palisade$U.$(OBJEXT) refclock_parse$U.$(OBJEXT) \
-refclock_pcf$U.$(OBJEXT) refclock_pst$U.$(OBJEXT) \
-refclock_ptbacts$U.$(OBJEXT) refclock_shm$U.$(OBJEXT) \
-refclock_tpro$U.$(OBJEXT) refclock_trak$U.$(OBJEXT) \
-refclock_true$U.$(OBJEXT) refclock_ulink$U.$(OBJEXT) \
-refclock_usno$U.$(OBJEXT) refclock_wwv$U.$(OBJEXT) \
-refclock_wwvb$U.$(OBJEXT)
+ ntp_config$U.$(OBJEXT) ntp_control$U.$(OBJEXT) \
+ ntp_crypto$U.$(OBJEXT) ntp_filegen$U.$(OBJEXT) \
+ ntp_intres$U.$(OBJEXT) ntp_io$U.$(OBJEXT) \
+ ntp_loopfilter$U.$(OBJEXT) ntp_monitor$U.$(OBJEXT) \
+ ntp_peer$U.$(OBJEXT) ntp_proto$U.$(OBJEXT) \
+ ntp_refclock$U.$(OBJEXT) ntp_request$U.$(OBJEXT) \
+ ntp_restrict$U.$(OBJEXT) ntp_timer$U.$(OBJEXT) \
+ ntp_util$U.$(OBJEXT) ntpd$U.$(OBJEXT) refclock_acts$U.$(OBJEXT) \
+ refclock_arbiter$U.$(OBJEXT) refclock_arc$U.$(OBJEXT) \
+ refclock_as2201$U.$(OBJEXT) refclock_atom$U.$(OBJEXT) \
+ refclock_bancomm$U.$(OBJEXT) refclock_chronolog$U.$(OBJEXT) \
+ refclock_chu$U.$(OBJEXT) refclock_conf$U.$(OBJEXT) \
+ refclock_datum$U.$(OBJEXT) refclock_dumbclock$U.$(OBJEXT) \
+ refclock_fg$U.$(OBJEXT) refclock_gpsvme$U.$(OBJEXT) \
+ refclock_heath$U.$(OBJEXT) refclock_hopfser$U.$(OBJEXT) \
+ refclock_hopfpci$U.$(OBJEXT) refclock_hpgps$U.$(OBJEXT) \
+ refclock_irig$U.$(OBJEXT) refclock_jjy$U.$(OBJEXT) \
+ refclock_jupiter$U.$(OBJEXT) refclock_leitch$U.$(OBJEXT) \
+ refclock_local$U.$(OBJEXT) refclock_msfees$U.$(OBJEXT) \
+ refclock_mx4200$U.$(OBJEXT) refclock_nmea$U.$(OBJEXT) \
+ refclock_oncore$U.$(OBJEXT) refclock_palisade$U.$(OBJEXT) \
+ refclock_parse$U.$(OBJEXT) refclock_pcf$U.$(OBJEXT) \
+ refclock_pst$U.$(OBJEXT) refclock_ptbacts$U.$(OBJEXT) \
+ refclock_shm$U.$(OBJEXT) refclock_tpro$U.$(OBJEXT) \
+ refclock_trak$U.$(OBJEXT) refclock_true$U.$(OBJEXT) \
+ refclock_tt560$U.$(OBJEXT) refclock_ulink$U.$(OBJEXT) \
+ refclock_usno$U.$(OBJEXT) refclock_wwv$U.$(OBJEXT) \
+ refclock_wwvb$U.$(OBJEXT) refclock_zyfer$U.$(OBJEXT)
ntpd_OBJECTS = $(am_ntpd_OBJECTS)
ntpd_DEPENDENCIES = version.o ../libntp/libntp.a
-ntpd_LDFLAGS =
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ntpd_LDFLAGS =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/check_y2k$U.Po $(DEPDIR)/cmd_args$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/map_vme$U.Po $(DEPDIR)/ntp_config$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_control$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_crypto$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_filegen$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_intres$U.Po $(DEPDIR)/ntp_io$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_loopfilter$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_monitor$U.Po $(DEPDIR)/ntp_peer$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_proto$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_refclock$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_request$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_restrict$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntp_timer$U.Po $(DEPDIR)/ntp_util$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ntpd$U.Po $(DEPDIR)/refclock_acts$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_arbiter$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_arc$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_as2201$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_atom$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_bancomm$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_chronolog$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_chu$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_conf$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_datum$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_dumbclock$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_fg$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_gpsvme$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_heath$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_hopfpci$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_hopfser$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_hpgps$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_irig$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_jjy$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_jupiter$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_leitch$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_local$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_msfees$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_mx4200$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_nmea$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_oncore$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_palisade$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_parse$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_pcf$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_pst$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_ptbacts$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_shm$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_tpro$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_trak$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_true$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_tt560$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_ulink$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_usno$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_wwv$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_wwvb$U.Po \
+@AMDEP_TRUE@ $(DEPDIR)/refclock_zyfer$U.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = check_y2k.c $(ntpd_SOURCES)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP@DEP_FILES = $(DEPDIR)/check_y2k$U.Po $(DEPDIR)/cmd_args$U.Po \
-@AMDEP@ $(DEPDIR)/map_vme$U.Po $(DEPDIR)/ntp_config$U.Po \
-@AMDEP@ $(DEPDIR)/ntp_control$U.Po $(DEPDIR)/ntp_crypto$U.Po \
-@AMDEP@ $(DEPDIR)/ntp_filegen$U.Po $(DEPDIR)/ntp_intres$U.Po \
-@AMDEP@ $(DEPDIR)/ntp_io$U.Po $(DEPDIR)/ntp_loopfilter$U.Po \
-@AMDEP@ $(DEPDIR)/ntp_monitor$U.Po $(DEPDIR)/ntp_peer$U.Po \
-@AMDEP@ $(DEPDIR)/ntp_proto$U.Po $(DEPDIR)/ntp_refclock$U.Po \
-@AMDEP@ $(DEPDIR)/ntp_request$U.Po $(DEPDIR)/ntp_resolver$U.Po \
-@AMDEP@ $(DEPDIR)/ntp_restrict$U.Po $(DEPDIR)/ntp_timer$U.Po \
-@AMDEP@ $(DEPDIR)/ntp_util$U.Po $(DEPDIR)/ntpd$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_acts$U.Po $(DEPDIR)/refclock_arbiter$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_arc$U.Po $(DEPDIR)/refclock_as2201$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_atom$U.Po $(DEPDIR)/refclock_bancomm$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_chronolog$U.Po $(DEPDIR)/refclock_chu$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_conf$U.Po $(DEPDIR)/refclock_datum$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_dumbclock$U.Po $(DEPDIR)/refclock_fg$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_gpsvme$U.Po $(DEPDIR)/refclock_heath$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_hopfpci$U.Po $(DEPDIR)/refclock_hopfser$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_hpgps$U.Po $(DEPDIR)/refclock_irig$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_jupiter$U.Po $(DEPDIR)/refclock_leitch$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_local$U.Po $(DEPDIR)/refclock_msfees$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_mx4200$U.Po $(DEPDIR)/refclock_nmea$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_oncore$U.Po $(DEPDIR)/refclock_palisade$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_parse$U.Po $(DEPDIR)/refclock_pcf$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_pst$U.Po $(DEPDIR)/refclock_ptbacts$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_shm$U.Po $(DEPDIR)/refclock_tpro$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_trak$U.Po $(DEPDIR)/refclock_true$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_ulink$U.Po $(DEPDIR)/refclock_usno$U.Po \
-@AMDEP@ $(DEPDIR)/refclock_wwv$U.Po $(DEPDIR)/refclock_wwvb$U.Po
DIST_COMMON = Makefile.am Makefile.in
-
SOURCES = check_y2k.c $(ntpd_SOURCES)
-OBJECTS = check_y2k$U.$(OBJEXT) $(am_ntpd_OBJECTS)
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .h .o .obj
-
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu ntpd/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
@@ -258,8 +278,10 @@ install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ ; then \
+ f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
@@ -278,161 +300,238 @@ clean-binPROGRAMS:
clean-checkPROGRAMS:
-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+check_y2k$(EXEEXT): $(check_y2k_OBJECTS) $(check_y2k_DEPENDENCIES)
+ @rm -f check_y2k$(EXEEXT)
+ $(LINK) $(check_y2k_LDFLAGS) $(check_y2k_OBJECTS) $(check_y2k_LDADD) $(LIBS)
+ntpd$(EXEEXT): $(ntpd_OBJECTS) $(ntpd_DEPENDENCIES)
+ @rm -f ntpd$(EXEEXT)
+ $(LINK) $(ntpd_LDFLAGS) $(ntpd_OBJECTS) $(ntpd_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
-../util/ansi2knr: ../util/ansi2knr.$(OBJEXT)
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-../util/ansi2knr.$(OBJEXT):
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr.$(OBJEXT)
+ANSI2KNR = ../util/ansi2knr
+../util/ansi2knr:
+ cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr:
-rm -f *_.c
-check_y2k: $(check_y2k_OBJECTS) $(check_y2k_DEPENDENCIES)
- @rm -f check_y2k
- $(LINK) $(check_y2k_LDFLAGS) $(check_y2k_OBJECTS) $(check_y2k_LDADD) $(LIBS)
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/check_y2k$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cmd_args$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/map_vme$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_config$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_control$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_crypto$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_filegen$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_intres$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_io$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_loopfilter$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_monitor$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_peer$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_proto$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_refclock$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_request$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_restrict$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_timer$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntp_util$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntpd$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_acts$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_arbiter$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_arc$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_as2201$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_atom$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_bancomm$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_chronolog$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_chu$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_conf$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_datum$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_dumbclock$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_fg$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_gpsvme$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_heath$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_hopfpci$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_hopfser$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_hpgps$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_irig$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_jjy$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_jupiter$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_leitch$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_local$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_msfees$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_mx4200$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_nmea$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_oncore$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_palisade$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_parse$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_pcf$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_pst$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_ptbacts$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_shm$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_tpro$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_trak$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_true$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_tt560$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_ulink$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_usno$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_wwv$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_wwvb$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/refclock_zyfer$U.Po@am__quote@
-ntpd: $(ntpd_OBJECTS) $(ntpd_DEPENDENCIES)
- @rm -f ntpd
- $(LINK) $(ntpd_LDFLAGS) $(ntpd_OBJECTS) $(ntpd_LDADD) $(LIBS)
+distclean-depend:
+ -rm -rf $(DEPDIR)
+
+.c.o:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+
+.c.obj:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `cygpath -w $<`
+CCDEPMODE = @CCDEPMODE@
check_y2k_.c: check_y2k.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/check_y2k.c; then echo $(srcdir)/check_y2k.c; else echo check_y2k.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > check_y2k_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/check_y2k.c; then echo $(srcdir)/check_y2k.c; else echo check_y2k.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > check_y2k_.c || rm -f check_y2k_.c
cmd_args_.c: cmd_args.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmd_args.c; then echo $(srcdir)/cmd_args.c; else echo cmd_args.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > cmd_args_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmd_args.c; then echo $(srcdir)/cmd_args.c; else echo cmd_args.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > cmd_args_.c || rm -f cmd_args_.c
map_vme_.c: map_vme.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/map_vme.c; then echo $(srcdir)/map_vme.c; else echo map_vme.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > map_vme_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/map_vme.c; then echo $(srcdir)/map_vme.c; else echo map_vme.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > map_vme_.c || rm -f map_vme_.c
ntp_config_.c: ntp_config.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_config.c; then echo $(srcdir)/ntp_config.c; else echo ntp_config.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_config_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_config.c; then echo $(srcdir)/ntp_config.c; else echo ntp_config.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_config_.c || rm -f ntp_config_.c
ntp_control_.c: ntp_control.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_control.c; then echo $(srcdir)/ntp_control.c; else echo ntp_control.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_control_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_control.c; then echo $(srcdir)/ntp_control.c; else echo ntp_control.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_control_.c || rm -f ntp_control_.c
ntp_crypto_.c: ntp_crypto.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_crypto.c; then echo $(srcdir)/ntp_crypto.c; else echo ntp_crypto.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_crypto_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_crypto.c; then echo $(srcdir)/ntp_crypto.c; else echo ntp_crypto.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_crypto_.c || rm -f ntp_crypto_.c
ntp_filegen_.c: ntp_filegen.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_filegen.c; then echo $(srcdir)/ntp_filegen.c; else echo ntp_filegen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_filegen_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_filegen.c; then echo $(srcdir)/ntp_filegen.c; else echo ntp_filegen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_filegen_.c || rm -f ntp_filegen_.c
ntp_intres_.c: ntp_intres.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_intres.c; then echo $(srcdir)/ntp_intres.c; else echo ntp_intres.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_intres_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_intres.c; then echo $(srcdir)/ntp_intres.c; else echo ntp_intres.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_intres_.c || rm -f ntp_intres_.c
ntp_io_.c: ntp_io.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_io.c; then echo $(srcdir)/ntp_io.c; else echo ntp_io.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_io_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_io.c; then echo $(srcdir)/ntp_io.c; else echo ntp_io.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_io_.c || rm -f ntp_io_.c
ntp_loopfilter_.c: ntp_loopfilter.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_loopfilter.c; then echo $(srcdir)/ntp_loopfilter.c; else echo ntp_loopfilter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_loopfilter_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_loopfilter.c; then echo $(srcdir)/ntp_loopfilter.c; else echo ntp_loopfilter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_loopfilter_.c || rm -f ntp_loopfilter_.c
ntp_monitor_.c: ntp_monitor.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_monitor.c; then echo $(srcdir)/ntp_monitor.c; else echo ntp_monitor.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_monitor_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_monitor.c; then echo $(srcdir)/ntp_monitor.c; else echo ntp_monitor.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_monitor_.c || rm -f ntp_monitor_.c
ntp_peer_.c: ntp_peer.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_peer.c; then echo $(srcdir)/ntp_peer.c; else echo ntp_peer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_peer_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_peer.c; then echo $(srcdir)/ntp_peer.c; else echo ntp_peer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_peer_.c || rm -f ntp_peer_.c
ntp_proto_.c: ntp_proto.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_proto.c; then echo $(srcdir)/ntp_proto.c; else echo ntp_proto.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_proto_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_proto.c; then echo $(srcdir)/ntp_proto.c; else echo ntp_proto.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_proto_.c || rm -f ntp_proto_.c
ntp_refclock_.c: ntp_refclock.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_refclock.c; then echo $(srcdir)/ntp_refclock.c; else echo ntp_refclock.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_refclock_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_refclock.c; then echo $(srcdir)/ntp_refclock.c; else echo ntp_refclock.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_refclock_.c || rm -f ntp_refclock_.c
ntp_request_.c: ntp_request.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_request.c; then echo $(srcdir)/ntp_request.c; else echo ntp_request.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_request_.c
-ntp_resolver_.c: ntp_resolver.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_resolver.c; then echo $(srcdir)/ntp_resolver.c; else echo ntp_resolver.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_resolver_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_request.c; then echo $(srcdir)/ntp_request.c; else echo ntp_request.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_request_.c || rm -f ntp_request_.c
ntp_restrict_.c: ntp_restrict.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_restrict.c; then echo $(srcdir)/ntp_restrict.c; else echo ntp_restrict.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_restrict_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_restrict.c; then echo $(srcdir)/ntp_restrict.c; else echo ntp_restrict.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_restrict_.c || rm -f ntp_restrict_.c
ntp_timer_.c: ntp_timer.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_timer.c; then echo $(srcdir)/ntp_timer.c; else echo ntp_timer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_timer_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_timer.c; then echo $(srcdir)/ntp_timer.c; else echo ntp_timer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_timer_.c || rm -f ntp_timer_.c
ntp_util_.c: ntp_util.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_util.c; then echo $(srcdir)/ntp_util.c; else echo ntp_util.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_util_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntp_util.c; then echo $(srcdir)/ntp_util.c; else echo ntp_util.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntp_util_.c || rm -f ntp_util_.c
ntpd_.c: ntpd.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpd.c; then echo $(srcdir)/ntpd.c; else echo ntpd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntpd_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntpd.c; then echo $(srcdir)/ntpd.c; else echo ntpd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntpd_.c || rm -f ntpd_.c
refclock_acts_.c: refclock_acts.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_acts.c; then echo $(srcdir)/refclock_acts.c; else echo refclock_acts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_acts_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_acts.c; then echo $(srcdir)/refclock_acts.c; else echo refclock_acts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_acts_.c || rm -f refclock_acts_.c
refclock_arbiter_.c: refclock_arbiter.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_arbiter.c; then echo $(srcdir)/refclock_arbiter.c; else echo refclock_arbiter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_arbiter_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_arbiter.c; then echo $(srcdir)/refclock_arbiter.c; else echo refclock_arbiter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_arbiter_.c || rm -f refclock_arbiter_.c
refclock_arc_.c: refclock_arc.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_arc.c; then echo $(srcdir)/refclock_arc.c; else echo refclock_arc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_arc_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_arc.c; then echo $(srcdir)/refclock_arc.c; else echo refclock_arc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_arc_.c || rm -f refclock_arc_.c
refclock_as2201_.c: refclock_as2201.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_as2201.c; then echo $(srcdir)/refclock_as2201.c; else echo refclock_as2201.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_as2201_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_as2201.c; then echo $(srcdir)/refclock_as2201.c; else echo refclock_as2201.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_as2201_.c || rm -f refclock_as2201_.c
refclock_atom_.c: refclock_atom.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_atom.c; then echo $(srcdir)/refclock_atom.c; else echo refclock_atom.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_atom_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_atom.c; then echo $(srcdir)/refclock_atom.c; else echo refclock_atom.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_atom_.c || rm -f refclock_atom_.c
refclock_bancomm_.c: refclock_bancomm.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_bancomm.c; then echo $(srcdir)/refclock_bancomm.c; else echo refclock_bancomm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_bancomm_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_bancomm.c; then echo $(srcdir)/refclock_bancomm.c; else echo refclock_bancomm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_bancomm_.c || rm -f refclock_bancomm_.c
refclock_chronolog_.c: refclock_chronolog.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_chronolog.c; then echo $(srcdir)/refclock_chronolog.c; else echo refclock_chronolog.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_chronolog_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_chronolog.c; then echo $(srcdir)/refclock_chronolog.c; else echo refclock_chronolog.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_chronolog_.c || rm -f refclock_chronolog_.c
refclock_chu_.c: refclock_chu.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_chu.c; then echo $(srcdir)/refclock_chu.c; else echo refclock_chu.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_chu_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_chu.c; then echo $(srcdir)/refclock_chu.c; else echo refclock_chu.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_chu_.c || rm -f refclock_chu_.c
refclock_conf_.c: refclock_conf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_conf.c; then echo $(srcdir)/refclock_conf.c; else echo refclock_conf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_conf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_conf.c; then echo $(srcdir)/refclock_conf.c; else echo refclock_conf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_conf_.c || rm -f refclock_conf_.c
refclock_datum_.c: refclock_datum.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_datum.c; then echo $(srcdir)/refclock_datum.c; else echo refclock_datum.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_datum_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_datum.c; then echo $(srcdir)/refclock_datum.c; else echo refclock_datum.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_datum_.c || rm -f refclock_datum_.c
refclock_dumbclock_.c: refclock_dumbclock.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_dumbclock.c; then echo $(srcdir)/refclock_dumbclock.c; else echo refclock_dumbclock.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_dumbclock_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_dumbclock.c; then echo $(srcdir)/refclock_dumbclock.c; else echo refclock_dumbclock.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_dumbclock_.c || rm -f refclock_dumbclock_.c
refclock_fg_.c: refclock_fg.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_fg.c; then echo $(srcdir)/refclock_fg.c; else echo refclock_fg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_fg_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_fg.c; then echo $(srcdir)/refclock_fg.c; else echo refclock_fg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_fg_.c || rm -f refclock_fg_.c
refclock_gpsvme_.c: refclock_gpsvme.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_gpsvme.c; then echo $(srcdir)/refclock_gpsvme.c; else echo refclock_gpsvme.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_gpsvme_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_gpsvme.c; then echo $(srcdir)/refclock_gpsvme.c; else echo refclock_gpsvme.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_gpsvme_.c || rm -f refclock_gpsvme_.c
refclock_heath_.c: refclock_heath.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_heath.c; then echo $(srcdir)/refclock_heath.c; else echo refclock_heath.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_heath_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_heath.c; then echo $(srcdir)/refclock_heath.c; else echo refclock_heath.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_heath_.c || rm -f refclock_heath_.c
refclock_hopfpci_.c: refclock_hopfpci.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hopfpci.c; then echo $(srcdir)/refclock_hopfpci.c; else echo refclock_hopfpci.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_hopfpci_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hopfpci.c; then echo $(srcdir)/refclock_hopfpci.c; else echo refclock_hopfpci.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_hopfpci_.c || rm -f refclock_hopfpci_.c
refclock_hopfser_.c: refclock_hopfser.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hopfser.c; then echo $(srcdir)/refclock_hopfser.c; else echo refclock_hopfser.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_hopfser_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hopfser.c; then echo $(srcdir)/refclock_hopfser.c; else echo refclock_hopfser.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_hopfser_.c || rm -f refclock_hopfser_.c
refclock_hpgps_.c: refclock_hpgps.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hpgps.c; then echo $(srcdir)/refclock_hpgps.c; else echo refclock_hpgps.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_hpgps_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_hpgps.c; then echo $(srcdir)/refclock_hpgps.c; else echo refclock_hpgps.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_hpgps_.c || rm -f refclock_hpgps_.c
refclock_irig_.c: refclock_irig.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_irig.c; then echo $(srcdir)/refclock_irig.c; else echo refclock_irig.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_irig_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_irig.c; then echo $(srcdir)/refclock_irig.c; else echo refclock_irig.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_irig_.c || rm -f refclock_irig_.c
+refclock_jjy_.c: refclock_jjy.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_jjy.c; then echo $(srcdir)/refclock_jjy.c; else echo refclock_jjy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_jjy_.c || rm -f refclock_jjy_.c
refclock_jupiter_.c: refclock_jupiter.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_jupiter.c; then echo $(srcdir)/refclock_jupiter.c; else echo refclock_jupiter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_jupiter_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_jupiter.c; then echo $(srcdir)/refclock_jupiter.c; else echo refclock_jupiter.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_jupiter_.c || rm -f refclock_jupiter_.c
refclock_leitch_.c: refclock_leitch.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_leitch.c; then echo $(srcdir)/refclock_leitch.c; else echo refclock_leitch.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_leitch_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_leitch.c; then echo $(srcdir)/refclock_leitch.c; else echo refclock_leitch.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_leitch_.c || rm -f refclock_leitch_.c
refclock_local_.c: refclock_local.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_local.c; then echo $(srcdir)/refclock_local.c; else echo refclock_local.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_local_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_local.c; then echo $(srcdir)/refclock_local.c; else echo refclock_local.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_local_.c || rm -f refclock_local_.c
refclock_msfees_.c: refclock_msfees.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_msfees.c; then echo $(srcdir)/refclock_msfees.c; else echo refclock_msfees.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_msfees_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_msfees.c; then echo $(srcdir)/refclock_msfees.c; else echo refclock_msfees.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_msfees_.c || rm -f refclock_msfees_.c
refclock_mx4200_.c: refclock_mx4200.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_mx4200.c; then echo $(srcdir)/refclock_mx4200.c; else echo refclock_mx4200.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_mx4200_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_mx4200.c; then echo $(srcdir)/refclock_mx4200.c; else echo refclock_mx4200.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_mx4200_.c || rm -f refclock_mx4200_.c
refclock_nmea_.c: refclock_nmea.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_nmea.c; then echo $(srcdir)/refclock_nmea.c; else echo refclock_nmea.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_nmea_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_nmea.c; then echo $(srcdir)/refclock_nmea.c; else echo refclock_nmea.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_nmea_.c || rm -f refclock_nmea_.c
refclock_oncore_.c: refclock_oncore.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_oncore.c; then echo $(srcdir)/refclock_oncore.c; else echo refclock_oncore.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_oncore_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_oncore.c; then echo $(srcdir)/refclock_oncore.c; else echo refclock_oncore.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_oncore_.c || rm -f refclock_oncore_.c
refclock_palisade_.c: refclock_palisade.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_palisade.c; then echo $(srcdir)/refclock_palisade.c; else echo refclock_palisade.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_palisade_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_palisade.c; then echo $(srcdir)/refclock_palisade.c; else echo refclock_palisade.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_palisade_.c || rm -f refclock_palisade_.c
refclock_parse_.c: refclock_parse.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_parse.c; then echo $(srcdir)/refclock_parse.c; else echo refclock_parse.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_parse_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_parse.c; then echo $(srcdir)/refclock_parse.c; else echo refclock_parse.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_parse_.c || rm -f refclock_parse_.c
refclock_pcf_.c: refclock_pcf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_pcf.c; then echo $(srcdir)/refclock_pcf.c; else echo refclock_pcf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_pcf_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_pcf.c; then echo $(srcdir)/refclock_pcf.c; else echo refclock_pcf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_pcf_.c || rm -f refclock_pcf_.c
refclock_pst_.c: refclock_pst.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_pst.c; then echo $(srcdir)/refclock_pst.c; else echo refclock_pst.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_pst_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_pst.c; then echo $(srcdir)/refclock_pst.c; else echo refclock_pst.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_pst_.c || rm -f refclock_pst_.c
refclock_ptbacts_.c: refclock_ptbacts.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ptbacts.c; then echo $(srcdir)/refclock_ptbacts.c; else echo refclock_ptbacts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_ptbacts_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ptbacts.c; then echo $(srcdir)/refclock_ptbacts.c; else echo refclock_ptbacts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_ptbacts_.c || rm -f refclock_ptbacts_.c
refclock_shm_.c: refclock_shm.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_shm.c; then echo $(srcdir)/refclock_shm.c; else echo refclock_shm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_shm_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_shm.c; then echo $(srcdir)/refclock_shm.c; else echo refclock_shm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_shm_.c || rm -f refclock_shm_.c
refclock_tpro_.c: refclock_tpro.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_tpro.c; then echo $(srcdir)/refclock_tpro.c; else echo refclock_tpro.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_tpro_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_tpro.c; then echo $(srcdir)/refclock_tpro.c; else echo refclock_tpro.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_tpro_.c || rm -f refclock_tpro_.c
refclock_trak_.c: refclock_trak.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_trak.c; then echo $(srcdir)/refclock_trak.c; else echo refclock_trak.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_trak_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_trak.c; then echo $(srcdir)/refclock_trak.c; else echo refclock_trak.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_trak_.c || rm -f refclock_trak_.c
refclock_true_.c: refclock_true.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_true.c; then echo $(srcdir)/refclock_true.c; else echo refclock_true.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_true_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_true.c; then echo $(srcdir)/refclock_true.c; else echo refclock_true.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_true_.c || rm -f refclock_true_.c
+refclock_tt560_.c: refclock_tt560.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_tt560.c; then echo $(srcdir)/refclock_tt560.c; else echo refclock_tt560.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_tt560_.c || rm -f refclock_tt560_.c
refclock_ulink_.c: refclock_ulink.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ulink.c; then echo $(srcdir)/refclock_ulink.c; else echo refclock_ulink.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_ulink_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_ulink.c; then echo $(srcdir)/refclock_ulink.c; else echo refclock_ulink.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_ulink_.c || rm -f refclock_ulink_.c
refclock_usno_.c: refclock_usno.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_usno.c; then echo $(srcdir)/refclock_usno.c; else echo refclock_usno.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_usno_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_usno.c; then echo $(srcdir)/refclock_usno.c; else echo refclock_usno.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_usno_.c || rm -f refclock_usno_.c
refclock_wwv_.c: refclock_wwv.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_wwv.c; then echo $(srcdir)/refclock_wwv.c; else echo refclock_wwv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_wwv_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_wwv.c; then echo $(srcdir)/refclock_wwv.c; else echo refclock_wwv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_wwv_.c || rm -f refclock_wwv_.c
refclock_wwvb_.c: refclock_wwvb.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_wwvb.c; then echo $(srcdir)/refclock_wwvb.c; else echo refclock_wwvb.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_wwvb_.c
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_wwvb.c; then echo $(srcdir)/refclock_wwvb.c; else echo refclock_wwvb.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_wwvb_.c || rm -f refclock_wwvb_.c
+refclock_zyfer_.c: refclock_zyfer.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/refclock_zyfer.c; then echo $(srcdir)/refclock_zyfer.c; else echo refclock_zyfer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > refclock_zyfer_.c || rm -f refclock_zyfer_.c
check_y2k_.$(OBJEXT) cmd_args_.$(OBJEXT) map_vme_.$(OBJEXT) \
ntp_config_.$(OBJEXT) ntp_control_.$(OBJEXT) ntp_crypto_.$(OBJEXT) \
ntp_filegen_.$(OBJEXT) ntp_intres_.$(OBJEXT) ntp_io_.$(OBJEXT) \
ntp_loopfilter_.$(OBJEXT) ntp_monitor_.$(OBJEXT) ntp_peer_.$(OBJEXT) \
ntp_proto_.$(OBJEXT) ntp_refclock_.$(OBJEXT) ntp_request_.$(OBJEXT) \
-ntp_resolver_.$(OBJEXT) ntp_restrict_.$(OBJEXT) ntp_timer_.$(OBJEXT) \
-ntp_util_.$(OBJEXT) ntpd_.$(OBJEXT) refclock_acts_.$(OBJEXT) \
-refclock_arbiter_.$(OBJEXT) refclock_arc_.$(OBJEXT) \
-refclock_as2201_.$(OBJEXT) refclock_atom_.$(OBJEXT) \
-refclock_bancomm_.$(OBJEXT) refclock_chronolog_.$(OBJEXT) \
-refclock_chu_.$(OBJEXT) refclock_conf_.$(OBJEXT) \
-refclock_datum_.$(OBJEXT) refclock_dumbclock_.$(OBJEXT) \
-refclock_fg_.$(OBJEXT) refclock_gpsvme_.$(OBJEXT) \
-refclock_heath_.$(OBJEXT) refclock_hopfpci_.$(OBJEXT) \
-refclock_hopfser_.$(OBJEXT) refclock_hpgps_.$(OBJEXT) \
-refclock_irig_.$(OBJEXT) refclock_jupiter_.$(OBJEXT) \
+ntp_restrict_.$(OBJEXT) ntp_timer_.$(OBJEXT) ntp_util_.$(OBJEXT) \
+ntpd_.$(OBJEXT) refclock_acts_.$(OBJEXT) refclock_arbiter_.$(OBJEXT) \
+refclock_arc_.$(OBJEXT) refclock_as2201_.$(OBJEXT) \
+refclock_atom_.$(OBJEXT) refclock_bancomm_.$(OBJEXT) \
+refclock_chronolog_.$(OBJEXT) refclock_chu_.$(OBJEXT) \
+refclock_conf_.$(OBJEXT) refclock_datum_.$(OBJEXT) \
+refclock_dumbclock_.$(OBJEXT) refclock_fg_.$(OBJEXT) \
+refclock_gpsvme_.$(OBJEXT) refclock_heath_.$(OBJEXT) \
+refclock_hopfpci_.$(OBJEXT) refclock_hopfser_.$(OBJEXT) \
+refclock_hpgps_.$(OBJEXT) refclock_irig_.$(OBJEXT) \
+refclock_jjy_.$(OBJEXT) refclock_jupiter_.$(OBJEXT) \
refclock_leitch_.$(OBJEXT) refclock_local_.$(OBJEXT) \
refclock_msfees_.$(OBJEXT) refclock_mx4200_.$(OBJEXT) \
refclock_nmea_.$(OBJEXT) refclock_oncore_.$(OBJEXT) \
@@ -440,9 +539,11 @@ refclock_palisade_.$(OBJEXT) refclock_parse_.$(OBJEXT) \
refclock_pcf_.$(OBJEXT) refclock_pst_.$(OBJEXT) \
refclock_ptbacts_.$(OBJEXT) refclock_shm_.$(OBJEXT) \
refclock_tpro_.$(OBJEXT) refclock_trak_.$(OBJEXT) \
-refclock_true_.$(OBJEXT) refclock_ulink_.$(OBJEXT) \
-refclock_usno_.$(OBJEXT) refclock_wwv_.$(OBJEXT) \
-refclock_wwvb_.$(OBJEXT) : $(ANSI2KNR)
+refclock_true_.$(OBJEXT) refclock_tt560_.$(OBJEXT) \
+refclock_ulink_.$(OBJEXT) refclock_usno_.$(OBJEXT) \
+refclock_wwv_.$(OBJEXT) refclock_wwvb_.$(OBJEXT) \
+refclock_zyfer_.$(OBJEXT) : $(ANSI2KNR)
+uninstall-info-am:
tags: TAGS
@@ -455,7 +556,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP)
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
@@ -471,87 +572,10 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
- && gtags -i $$here
+ && gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID
-
-@AMDEP@@_am_include@ $(DEPDIR)/check_y2k$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/cmd_args$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/map_vme$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_config$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_control$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_crypto$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_filegen$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_intres$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_io$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_loopfilter$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_monitor$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_peer$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_proto$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_refclock$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_request$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_resolver$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_restrict$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_timer$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntp_util$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/ntpd$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_acts$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_arbiter$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_arc$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_as2201$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_atom$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_bancomm$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_chronolog$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_chu$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_conf$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_datum$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_dumbclock$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_fg$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_gpsvme$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_heath$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_hopfpci$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_hopfser$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_hpgps$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_irig$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_jupiter$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_leitch$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_local$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_msfees$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_mx4200$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_nmea$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_oncore$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_palisade$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_parse$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_pcf$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_pst$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_ptbacts$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_shm$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_tpro$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_trak$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_true$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_ulink$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_usno$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_wwv$U.Po
-@AMDEP@@_am_include@ $(DEPDIR)/refclock_wwvb$U.Po
-
-distclean-depend:
- -rm -rf $(DEPDIR)
-
-@AMDEP@CCDEPMODE = @CCDEPMODE@
-
-.c.o:
-@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
-
-.c.obj:
-@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c -o $@ `cygpath -w $<`
-
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -560,7 +584,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
- d=$(srcdir); \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -588,24 +616,21 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
-
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
- -rm -f Makefile.in
clean: clean-am
clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
@@ -616,11 +641,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-compile distclean-depend \
distclean-generic distclean-tags
-dvi:
+dvi: dvi-am
dvi-am:
-info:
+info: info-am
info-am:
@@ -628,7 +653,7 @@ install-data-am:
install-exec-am: install-binPROGRAMS
-install-info:
+install-info: install-info-am
install-man:
@@ -642,18 +667,19 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
-uninstall-am: uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-.PHONY: all all-am check check-am check-local clean clean-binPROGRAMS \
- clean-checkPROGRAMS clean-generic distclean distclean-compile \
- distclean-depend distclean-generic distclean-tags distdir dvi \
- dvi-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-exec install-exec-am \
- install-info install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \
- uninstall-binPROGRAMS
+.PHONY: GTAGS all all-am check check-am check-local clean \
+ clean-binPROGRAMS clean-checkPROGRAMS clean-generic distclean \
+ distclean-compile distclean-depend distclean-generic \
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-binPROGRAMS install-data install-data-am \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-kr tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-info-am
check-local: @MAKE_CHECK_Y2K@
@@ -668,9 +694,8 @@ $(PROGRAMS): $(LDADD)
cd ../libparse && $(MAKE)
version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ @LIBRSAREF@ Makefile
- $(top_builddir)/scripts/mkver ntpd
+ env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpd
$(COMPILE) -c version.c
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/ntp/ntpd/jupiter.h b/contrib/ntp/ntpd/jupiter.h
index 84b9a59..ed80b0c 100644
--- a/contrib/ntp/ntpd/jupiter.h
+++ b/contrib/ntp/ntpd/jupiter.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /cvs/ntp/ntpd/jupiter.h,v 1.1.1.1 1999/05/26 00:48:19 stenn Exp $ (LBL) */
+/* @(#) $Header$ (LBL) */
/*
* Rockwell Jupiter GPS receiver definitions
diff --git a/contrib/ntp/ntpd/ntp_config.c b/contrib/ntp/ntpd/ntp_config.c
index 208b257..660d2c5 100644
--- a/contrib/ntp/ntpd/ntp_config.c
+++ b/contrib/ntp/ntpd/ntp_config.c
@@ -24,7 +24,9 @@
#include <stdio.h>
#include <ctype.h>
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
#include <signal.h>
#ifndef SIGCHLD
# define SIGCHLD SIGCLD
@@ -79,8 +81,8 @@ extern int priority_done;
* setvar [ ]
* logfile logfile
* logconfig [+|-|=][{sync|sys|peer|clock}{{,all}{info|statistics|events|status}}]...
- * enable auth|bclient|pll|kernel|monitor|stats
- * disable auth|bclient|pll|kernel|monitor|stats
+ * enable auth|bclient|pll|kernel|monitor|stats|calibrate
+ * disable auth|bclient|pll|kernel|monitor|stats|calibrate
* phone ...
* pps device [assert|clear] [hardpps]
* priority high|normal
@@ -240,12 +242,12 @@ static struct keyword fgen_types[] = {
static struct keyword flags_keywords[] = {
{ "auth", PROTO_AUTHENTICATE },
{ "bclient", PROTO_BROADCLIENT },
+ { "calibrate", PROTO_CAL },
{ "kernel", PROTO_KERNEL },
{ "monitor", PROTO_MONITOR },
{ "ntp", PROTO_NTP },
- { "stats", PROTO_FILEGEN },
{ "pps", PROTO_PPS },
- { "calibrate", PROTO_CAL },
+ { "stats", PROTO_FILEGEN },
{ "", CONFIG_UNKNOWN }
};
@@ -2101,11 +2103,11 @@ save_resolve(
}
#endif
- (void)fprintf(res_fp, "%s %d %d %d %d %d %d %d %s\n", name,
+ (void)fprintf(res_fp, "%s %d %d %d %d %d %d %u %s\n", name,
mode, version, minpoll, maxpoll, flags, ttl, keyid, keystr);
#ifdef DEBUG
if (debug > 1)
- printf("config: %s %d %d %d %d %x %d %08x %s\n", name, mode,
+ printf("config: %s %d %d %d %d %x %d %u %s\n", name, mode,
version, minpoll, maxpoll, flags, ttl, keyid, keystr);
#endif
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
index 570e2f9..11686be 100644
--- a/contrib/ntp/ntpd/ntp_control.c
+++ b/contrib/ntp/ntpd/ntp_control.c
@@ -395,6 +395,9 @@ static u_char clocktypes[] = {
CTL_SST_TS_LF, /* REFCLK_FG (37) */
CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
CTL_SST_TS_UHF, /* REFCLK_HOPF_PCI (39) */
+ CTL_SST_TS_LF, /* REFCLK_JJY (40) */
+ CTL_SST_TS_UHF, /* REFCLK_TT560 (41) */
+ CTL_SST_TS_UHF, /* REFCLK_ZYFER (42) */
};
diff --git a/contrib/ntp/ntpd/ntp_crypto.c b/contrib/ntp/ntpd/ntp_crypto.c
index d8516b5..19f902a 100644
--- a/contrib/ntp/ntpd/ntp_crypto.c
+++ b/contrib/ntp/ntpd/ntp_crypto.c
@@ -950,9 +950,7 @@ crypto_recv(
#if NTP_API > 3
ntv.modes = MOD_TAI;
ntv.constant = sys_tai;
- if (ntp_adjtime(&ntv) == TIME_ERROR)
- msyslog(LOG_ERR,
- "kernel TAI update failed");
+ (void)ntp_adjtime(&ntv);
#endif /* NTP_API */
#endif /* KERNEL_PLL */
diff --git a/contrib/ntp/ntpd/ntp_intres.c b/contrib/ntp/ntpd/ntp_intres.c
index 9653fdd..b6cd45b 100644
--- a/contrib/ntp/ntpd/ntp_intres.c
+++ b/contrib/ntp/ntpd/ntp_intres.c
@@ -20,6 +20,7 @@
# include <config.h>
#endif
+#include "ntp_machine.h"
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_request.h"
@@ -515,7 +516,7 @@ findhostaddr(
msyslog(LOG_INFO, "findhostaddr: address resolved.");
#endif
s = strlen(hp->h_name) + 1;
- cp = emalloc(s);
+ cp = (char *)emalloc(s);
strcpy(cp, hp->h_name);
entry->ce_name = cp;
}
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
index 23c0cb7..ef0c146 100644
--- a/contrib/ntp/ntpd/ntp_io.c
+++ b/contrib/ntp/ntpd/ntp_io.c
@@ -26,9 +26,13 @@
#ifdef HAVE_NETINET_IN_SYSTM_H
# include <netinet/in_systm.h>
#else /* Some old linux systems at least have in_system.h instead. */
-# include <netinet/in_system.h>
+# ifdef HAVE_NETINET_IN_SYSTEM_H
+# include <netinet/in_system.h>
+# endif
#endif /* HAVE_NETINET_IN_SYSTM_H */
-#include <netinet/ip.h>
+#ifdef HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
@@ -37,6 +41,8 @@
#endif
#include <arpa/inet.h>
+extern int listen_to_virtual_ips;
+
#if _BSDI_VERSION >= 199510
# include <ifaddrs.h>
#endif
@@ -271,9 +277,15 @@ create_sockets(
if ((ifap->ifa_flags & IFF_UP) == 0)
continue;
+ if (debug)
+ printf("after getifaddrs(), considering %s (%s)\n",
+ ifap->ifa_name,
+ inet_ntoa(((struct sockaddr_in *)ifap->ifa_addr)->sin_addr));
+
if (ifap->ifa_flags & IFF_LOOPBACK) {
sin = (struct sockaddr_in *)ifap->ifa_addr;
- if (ntohl(sin->sin_addr.s_addr) != 0x7f000001)
+ if (ntohl(sin->sin_addr.s_addr) != 0x7f000001 &&
+ !listen_to_virtual_ips)
continue;
}
inter_list[i].flags = 0;
@@ -314,10 +326,10 @@ create_sockets(
* one physical interface. -wsr
*/
for (j=0; j < i; j++)
- if (inter_list[j].sin.sin_addr.s_addr &
- inter_list[j].mask.sin_addr.s_addr ==
- inter_list[i].sin.sin_addr.s_addr &
- inter_list[i].mask.sin_addr.s_addr)
+ if ((inter_list[j].sin.sin_addr.s_addr &
+ inter_list[j].mask.sin_addr.s_addr) ==
+ (inter_list[i].sin.sin_addr.s_addr &
+ inter_list[i].mask.sin_addr.s_addr))
{
if (inter_list[j].flags & INT_LOOPBACK)
inter_list[j] = inter_list[i];
@@ -391,8 +403,6 @@ create_sockets(
for(n = ifc.ifc_len, ifr = ifc.ifc_req; n > 0;
ifr = (struct ifreq *)((char *)ifr + size))
{
- extern int listen_to_virtual_ips;
-
size = sizeof(*ifr);
# ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
@@ -465,7 +475,7 @@ create_sockets(
(ifreq.ifr_flags & IFF_LOOPBACK)
# else /* not IFF_LOCAL_LOOPBACK and not IFF_LOOPBACK */
/* test against 127.0.0.1 (yuck!!) */
- (inter_list[i].sin.sin_addr.s_addr == inet_addr("127.0.0.1"))
+ ((*(struct sockaddr_in *)&ifr->ifr_addr).sin_addr.s_addr == inet_addr("127.0.0.1"))
# endif /* not IFF_LOCAL_LOOPBACK and not IFF_LOOPBACK */
)
{
@@ -1231,7 +1241,7 @@ fdbits(
/*
* input_handler - receive packets asynchronously
*/
-extern void
+void
input_handler(
l_fp *cts
)
@@ -1585,7 +1595,7 @@ findbcastinter(
struct sockaddr_in *addr
)
{
-#if defined(SIOCGIFCONF) || defined(SYS_WINNT)
+#if !defined(MPE) && (defined(SIOCGIFCONF) || defined(SYS_WINNT))
register int i;
register u_int32 xaddr;
diff --git a/contrib/ntp/ntpd/ntp_loopfilter.c b/contrib/ntp/ntpd/ntp_loopfilter.c
index c8a86cf..21085aa 100644
--- a/contrib/ntp/ntpd/ntp_loopfilter.c
+++ b/contrib/ntp/ntpd/ntp_loopfilter.c
@@ -32,20 +32,19 @@
* included to protect against timewarps, timespikes and general mayhem.
* All units are in s and s/s, unless noted otherwise.
*/
-#define CLOCK_MAX .128 /* default max offset (s) */
+#define CLOCK_MAX .128 /* default step offset (s) */
#define CLOCK_PANIC 1000. /* default panic offset (s) */
-#define CLOCK_MAXSTAB 2e-6 /* max frequency stability (s/s) */
-#define CLOCK_MAXERR 1e-2 /* max phase jitter (s) */
#define CLOCK_PHI 15e-6 /* max frequency error (s/s) */
#define SHIFT_PLL 4 /* PLL loop gain (shift) */
-#define CLOCK_AVG 4. /* FLL loop gain */
+#define CLOCK_FLL 8. /* FLL loop gain */
+#define CLOCK_AVG 4. /* parameter averaging constant */
#define CLOCK_MINSEC 256. /* min FLL update interval (s) */
#define CLOCK_MINSTEP 900. /* step-change timeout (s) */
-#define CLOCK_DAY 86400. /* one day of seconds */
+#define CLOCK_DAY 86400. /* one day of seconds (s) */
#define CLOCK_LIMIT 30 /* poll-adjust threshold */
#define CLOCK_PGATE 4. /* poll-adjust gate */
-#define CLOCK_ALLAN 1024. /* min Allan intercept (s) */
-#define CLOCK_ADF 1e11 /* Allan deviation factor */
+#define CLOCK_ALLAN 10 /* min Allan intercept (log2 s) */
+#define PPS_MAXAGE 120 /* kernel pps signal timeout (s) */
/*
* Clock discipline state machine. This is used to control the
@@ -106,8 +105,6 @@
* also a signal for the external clock driver to discipline the system
* clock.
*/
-#define PPS_MAXAGE 120 /* kernel pps signal timeout (s) */
-
/*
* Program variables that can be tinkered.
*/
@@ -115,7 +112,18 @@ double clock_max = CLOCK_MAX; /* max offset before step (s) */
double clock_panic = CLOCK_PANIC; /* max offset before panic (s) */
double clock_phi = CLOCK_PHI; /* dispersion rate (s/s) */
double clock_minstep = CLOCK_MINSTEP; /* step timeout (s) */
-double allan_xpt = CLOCK_ALLAN; /* minimum Allan intercept (s) */
+u_char allan_xpt = CLOCK_ALLAN; /* minimum Allan intercept (log2 s) */
+
+/*
+ * Hybrid PLL/FLL parameters. These were chosen by experiment using a
+ * MatLab program. The parameters were fudged to match a pure PLL at
+ * poll intervals of 64 s and lower and a pure FLL at poll intervals of
+ * 4096 s and higher. Between these extremes the parameters were chosen
+ * as a geometric series of intervals while holding the overshoot to
+ * less than 5 percent.
+ */
+static double fll[] = {0., 1./64, 1./32, 1./16, 1./8, 1./4, 1.};
+static double pll[] = {1., 1.4, 2., 2.8, 4.1, 7., 12.};
/*
* Program variables
@@ -207,6 +215,7 @@ local_clock(
double clock_frequency; /* clock frequency adjustment (ppm) */
double dtemp, etemp; /* double temps */
int retval; /* return value */
+ int i;
/*
* If the loop is opened, monitor and record the offsets
@@ -447,7 +456,7 @@ local_clock(
* and ignore it.
*/
default:
- allow_panic = TRUE;
+ allow_panic = FALSE;
if (fabs(fp_offset - last_offset) >
CLOCK_SGATE * oerror && mu <
ULOGTOD(sys_poll + 1)) {
@@ -466,23 +475,30 @@ local_clock(
/*
* Compute the FLL and PLL frequency adjustments
* conditioned on intricate weighting factors.
- * For the FLL, the averaging interval is
- * clamped to a minimum of 1024 s and the gain
- * is decreased from unity for mu above 1024 s
- * to zero below 256 s. For the PLL, the
- * averaging interval is clamped not to exceed
- * the sustem poll interval. No gain factor is
- * necessary, since the frequency steering above
- * 1024 s is negligible. Particularly for the
+ * The gain factors depend on the poll interval
+ * and Allan intercept. For the FLL, the
+ * averaging interval is clamped to a minimum of
+ * 1024 s and the gain increased in stages from
+ * zero for poll intervals below half the Allan
+ * intercept to unity above twice the Allan
+ * intercept. For the PLL, the averaging
+ * interval is clamped not to exceed the poll
+ * interval. No gain factor is necessary, since
+ * the frequency steering above the Allan
+ * intercept is negligible. Particularly for the
* PLL, these measures allow oversampling, but
* not undersampling and insure stability even
* when the rules of fair engagement are broken.
*/
- dtemp = max(mu, allan_xpt);
- etemp = min(max(0, mu - CLOCK_MINSEC) /
- allan_xpt, 1.);
- flladj = fp_offset * etemp / (dtemp *
- CLOCK_AVG);
+ i = sys_poll - allan_xpt + 4;
+ if (i < 0)
+ i = 0;
+ else if (i > 6)
+ i = 6;
+ etemp = fll[i];
+ dtemp = max(mu, ULOGTOD(allan_xpt));
+ flladj = (fp_offset - clock_offset) * etemp /
+ (dtemp * CLOCK_FLL);
dtemp = ULOGTOD(SHIFT_PLL + 2 + sys_poll);
etemp = min(mu, ULOGTOD(sys_poll));
plladj = fp_offset * etemp / (dtemp * dtemp);
@@ -679,8 +695,8 @@ local_clock(
if (debug)
printf(
"local_clock: mu %.0f noi %.3f stb %.3f pol %d cnt %d\n",
- mu, sys_jitter * 1e6 / mu, clock_stability * 1e6,
- sys_poll, tc_counter);
+ mu, sys_jitter * 1e6, clock_stability * 1e6, sys_poll,
+ tc_counter);
#endif /* DEBUG */
return (retval);
}
@@ -695,6 +711,7 @@ adj_host_clock(
)
{
double adjustment;
+ int i;
/*
* Update the dispersion since the last update. In contrast to
@@ -740,7 +757,19 @@ adj_host_clock(
sys_peer->flags & FLAG_PREFER)
return;
}
- adjustment = clock_offset / ULOGTOD(SHIFT_PLL + sys_poll);
+
+ /*
+ * This ugly bit of business is necessary in order to move the
+ * pole frequency higher in FLL mode. This is necessary for loop
+ * stability.
+ */
+ i = sys_poll - allan_xpt + 4;
+ if (i < 0)
+ i = 0;
+ else if (i > 6)
+ i = 6;
+ adjustment = clock_offset / (pll[i] * ULOGTOD(SHIFT_PLL +
+ sys_poll));
clock_offset -= adjustment;
adj_systime(adjustment + drift_comp);
}
@@ -922,7 +951,7 @@ loop_config(
case LOOP_ALLAN: /* minimum Allan intercept */
if (freq < CLOCK_ALLAN)
freq = CLOCK_ALLAN;
- allan_xpt = freq;
+ allan_xpt = (u_char)freq;
break;
case LOOP_HUFFPUFF: /* huff-n'-puff filter length */
diff --git a/contrib/ntp/ntpd/ntp_proto.c b/contrib/ntp/ntpd/ntp_proto.c
index 4962057..fc95016 100644
--- a/contrib/ntp/ntpd/ntp_proto.c
+++ b/contrib/ntp/ntpd/ntp_proto.c
@@ -309,11 +309,7 @@ receive(
#endif
if (restrict_mask & RES_IGNORE)
return; /* no anything */
- if (!(SRCPORT(&rbufp->recv_srcadr) == NTP_PORT ||
- SRCPORT(&rbufp->recv_srcadr) >= IPPORT_RESERVED)) {
- sys_badlength++;
- return; /* invalid port */
- }
+
pkt = &rbufp->recv_pkt;
if (PKT_VERSION(pkt->li_vn_mode) == NTP_VERSION) {
sys_newversionpkt++; /* new version */
@@ -2506,7 +2502,8 @@ int
default_get_precision(void)
{
struct timeval tp;
-#if !defined(SYS_WINNT) && !defined(VMS) && !defined(_SEQUENT_)
+#if !defined(SYS_WINNT) && !defined(VMS) && !defined(_SEQUENT_) && \
+ !defined(MPE)
struct timezone tzp;
#elif defined(VMS) || defined(_SEQUENT_)
struct timezone {
diff --git a/contrib/ntp/ntpd/ntp_request.c b/contrib/ntp/ntpd/ntp_request.c
index 6f5e153..260b48b 100644
--- a/contrib/ntp/ntpd/ntp_request.c
+++ b/contrib/ntp/ntpd/ntp_request.c
@@ -379,6 +379,7 @@ process_private(
)
{
struct req_pkt *inpkt;
+ struct req_pkt_tail *tailinpkt;
struct sockaddr_in *srcadr;
struct interface *inter;
struct req_proc *proc;
@@ -410,7 +411,7 @@ process_private(
|| (++ec, INFO_ERR(inpkt->err_nitems) != 0)
|| (++ec, INFO_MBZ(inpkt->mbz_itemsize) != 0)
|| (++ec, rbufp->recv_length > REQ_LEN_MAC)
- || (++ec, rbufp->recv_length < REQ_LEN_NOMAC)
+ || (++ec, rbufp->recv_length < REQ_LEN_HDR)
) {
msyslog(LOG_ERR, "process_private: INFO_ERR_FMT: test %d failed", ec);
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
@@ -462,18 +463,27 @@ process_private(
l_fp ftmp;
double dtemp;
+ if (rbufp->recv_length < (REQ_LEN_HDR +
+ (INFO_ITEMSIZE(inpkt->mbz_itemsize) *
+ INFO_NITEMS(inpkt->err_nitems))
+ + sizeof(struct req_pkt_tail))) {
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ }
+ tailinpkt = (struct req_pkt_tail *)((char *)&rbufp->recv_pkt +
+ rbufp->recv_length - sizeof(struct req_pkt_tail));
+
/*
* If this guy is restricted from doing this, don't let him
* If wrong key was used, or packet doesn't have mac, return.
*/
if (!INFO_IS_AUTH(inpkt->auth_seq) || info_auth_keyid == 0
- || ntohl(inpkt->keyid) != info_auth_keyid) {
+ || ntohl(tailinpkt->keyid) != info_auth_keyid) {
#ifdef DEBUG
if (debug > 4)
printf("failed auth %d info_auth_keyid %lu pkt keyid %lu\n",
INFO_IS_AUTH(inpkt->auth_seq),
(u_long)info_auth_keyid,
- (u_long)ntohl(inpkt->keyid));
+ (u_long)ntohl(tailinpkt->keyid));
#endif
req_ack(srcadr, inter, inpkt, INFO_ERR_AUTH);
return;
@@ -502,7 +512,7 @@ process_private(
* calculate absolute time difference between xmit time stamp
* and receive time stamp. If too large, too bad.
*/
- NTOHL_FP(&inpkt->tstamp, &ftmp);
+ NTOHL_FP(&tailinpkt->tstamp, &ftmp);
L_SUB(&ftmp, &rbufp->recv_time);
LFPTOD(&ftmp, dtemp);
if (fabs(dtemp) >= INFO_TS_MAXSKEW) {
@@ -517,7 +527,8 @@ process_private(
* So far so good. See if decryption works out okay.
*/
if (!authdecrypt(info_auth_keyid, (u_int32 *)inpkt,
- REQ_LEN_NOMAC, (int)(rbufp->recv_length - REQ_LEN_NOMAC))) {
+ rbufp->recv_length - sizeof(struct req_pkt_tail) +
+ REQ_LEN_HDR, sizeof(struct req_pkt_tail) - REQ_LEN_HDR)) {
req_ack(srcadr, inter, inpkt, INFO_ERR_AUTH);
return;
}
@@ -526,8 +537,13 @@ process_private(
/*
* If we need data, check to see if we have some. If we
* don't, check to see that there is none (picky, picky).
+ *
+ * Handle the exception of REQ_CONFIG. It can have two data sizes.
*/
- if (INFO_ITEMSIZE(inpkt->mbz_itemsize) != proc->sizeofitem) {
+ if (INFO_ITEMSIZE(inpkt->mbz_itemsize) != proc->sizeofitem &&
+ !(inpkt->implementation == IMPL_XNTPD &&
+ inpkt->request == REQ_CONFIG &&
+ INFO_ITEMSIZE(inpkt->mbz_itemsize) == sizeof(struct old_conf_peer))) {
msyslog(LOG_ERR, "INFO_ITEMSIZE(inpkt->mbz_itemsize) != proc->sizeofitem: %d != %d",
INFO_ITEMSIZE(inpkt->mbz_itemsize), proc->sizeofitem);
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
@@ -903,22 +919,24 @@ sys_info(
is->poll = sys_poll;
is->flags = 0;
- if (sys_bclient)
- is->flags |= INFO_FLAG_BCLIENT;
if (sys_authenticate)
- is->flags |= INFO_FLAG_AUTHENTICATE;
+ is->flags |= INFO_FLAG_AUTHENTICATE;
+ if (sys_bclient)
+ is->flags |= INFO_FLAG_BCLIENT;
+#ifdef REFCLOCK
+ if (cal_enable)
+ is->flags |= INFO_FLAG_CAL;
+#endif /* REFCLOCK */
if (kern_enable)
- is->flags |= INFO_FLAG_KERNEL;
- if (ntp_enable)
- is->flags |= INFO_FLAG_NTP;
- if (pll_control)
- is->flags |= INFO_FLAG_PLL_SYNC;
- if (pps_control)
- is->flags |= INFO_FLAG_PPS_SYNC;
+ is->flags |= INFO_FLAG_KERNEL;
if (mon_enabled != MON_OFF)
- is->flags |= INFO_FLAG_MONITOR;
+ is->flags |= INFO_FLAG_MONITOR;
+ if (ntp_enable)
+ is->flags |= INFO_FLAG_NTP;
+ if (pps_enable)
+ is->flags |= INFO_FLAG_PPS_SYNC;
if (stats_control)
- is->flags |= INFO_FLAG_FILEGEN;
+ is->flags |= INFO_FLAG_FILEGEN;
is->bdelay = HTONS_FP(DTOFP(sys_bdelay));
HTONL_UF(sys_authdelay.l_f, &is->authdelay);
@@ -1133,8 +1151,9 @@ do_conf(
)
{
u_int fl;
- register struct conf_peer *cp;
- register int items;
+ struct conf_peer *cp;
+ struct old_conf_peer *ocp;
+ int items;
struct sockaddr_in peeraddr;
/*
@@ -1142,6 +1161,9 @@ do_conf(
* okay. If not, complain about it. Note we are
* very picky here.
*/
+ ocp = NULL;
+ if (INFO_ITEMSIZE(inpkt->mbz_itemsize) == sizeof(struct old_conf_peer))
+ ocp = (struct old_conf_peer *)inpkt->data;
items = INFO_NITEMS(inpkt->err_nitems);
cp = (struct conf_peer *)inpkt->data;
@@ -1158,7 +1180,11 @@ do_conf(
CONF_FLAG_NOSELECT | CONF_FLAG_BURST | CONF_FLAG_IBURST |
CONF_FLAG_SKEY))
fl = 1;
- cp++;
+ if (ocp) {
+ ocp++;
+ cp = (struct conf_peer *)ocp;
+ } else
+ cp++;
}
if (fl) {
@@ -1172,6 +1198,8 @@ do_conf(
*/
items = INFO_NITEMS(inpkt->err_nitems);
cp = (struct conf_peer *)inpkt->data;
+ if (ocp)
+ ocp = (struct old_conf_peer *)inpkt->data;
memset((char *)&peeraddr, 0, sizeof(struct sockaddr_in));
peeraddr.sin_family = AF_INET;
peeraddr.sin_port = htons(NTP_PORT);
@@ -1211,11 +1239,15 @@ do_conf(
/* XXX W2DO? minpoll/maxpoll arguments ??? */
if (peer_config(&peeraddr, any_interface, cp->hmode,
cp->version, cp->minpoll, cp->maxpoll, fl, cp->ttl,
- cp->keyid, cp->keystr) == 0) {
+ cp->keyid, NULL) == 0) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
- cp++;
+ if (ocp) {
+ ocp++;
+ cp = (struct conf_peer *)ocp;
+ } else
+ cp++;
}
req_ack(srcadr, inter, inpkt, INFO_OKAY);
@@ -1433,27 +1465,32 @@ setclr_flags(
if (flags & ~(SYS_FLAG_BCLIENT | SYS_FLAG_PPS |
SYS_FLAG_NTP | SYS_FLAG_KERNEL | SYS_FLAG_MONITOR |
- SYS_FLAG_FILEGEN)) {
+ SYS_FLAG_FILEGEN | SYS_FLAG_AUTH | SYS_FLAG_CAL)) {
msyslog(LOG_ERR, "setclr_flags: extra flags: %#x",
flags & ~(SYS_FLAG_BCLIENT | SYS_FLAG_PPS |
SYS_FLAG_NTP | SYS_FLAG_KERNEL |
- SYS_FLAG_MONITOR | SYS_FLAG_FILEGEN));
+ SYS_FLAG_MONITOR | SYS_FLAG_FILEGEN |
+ SYS_FLAG_AUTH | SYS_FLAG_CAL));
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
if (flags & SYS_FLAG_BCLIENT)
- proto_config(PROTO_BROADCLIENT, set, 0.);
+ proto_config(PROTO_BROADCLIENT, set, 0.);
if (flags & SYS_FLAG_PPS)
- proto_config(PROTO_PPS, set, 0.);
+ proto_config(PROTO_PPS, set, 0.);
if (flags & SYS_FLAG_NTP)
- proto_config(PROTO_NTP, set, 0.);
+ proto_config(PROTO_NTP, set, 0.);
if (flags & SYS_FLAG_KERNEL)
- proto_config(PROTO_KERNEL, set, 0.);
+ proto_config(PROTO_KERNEL, set, 0.);
if (flags & SYS_FLAG_MONITOR)
- proto_config(PROTO_MONITOR, set, 0.);
+ proto_config(PROTO_MONITOR, set, 0.);
if (flags & SYS_FLAG_FILEGEN)
- proto_config(PROTO_FILEGEN, set, 0.);
+ proto_config(PROTO_FILEGEN, set, 0.);
+ if (flags & SYS_FLAG_AUTH)
+ proto_config(PROTO_AUTHENTICATE, set, 0.);
+ if (flags & SYS_FLAG_CAL)
+ proto_config(PROTO_CAL, set, 0.);
req_ack(srcadr, inter, inpkt, INFO_OKAY);
}
diff --git a/contrib/ntp/ntpd/ntp_timer.c b/contrib/ntp/ntpd/ntp_timer.c
index 71a84e2..c2b1d72 100644
--- a/contrib/ntp/ntpd/ntp_timer.c
+++ b/contrib/ntp/ntpd/ntp_timer.c
@@ -11,7 +11,9 @@
#include <stdio.h>
#include <signal.h>
-#include <sys/signal.h>
+#ifdef HAVE_SYS_SIGNAL_H
+# include <sys/signal.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c
index aab9881..1b80560 100644
--- a/contrib/ntp/ntpd/ntpd.c
+++ b/contrib/ntp/ntpd/ntpd.c
@@ -6,6 +6,7 @@
# include <config.h>
#endif
+#include "ntp_machine.h"
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_stdlib.h"
@@ -19,9 +20,15 @@
#include <stdio.h>
#ifndef SYS_WINNT
# if !defined(VMS) /*wjm*/
-# include <sys/param.h>
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# endif
# endif /* VMS */
-# include <sys/signal.h>
+# ifdef HAVE_SYS_SIGNAL_H
+# include <sys/signal.h>
+# else
+# include <signal.h>
+# endif
# ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
# endif /* HAVE_SYS_IOCTL_H */
@@ -118,7 +125,7 @@ HANDLE ResolverThreadHandle = NULL;
/* variables used to inform the Service Control Manager of our current state */
SERVICE_STATUS ssStatus;
SERVICE_STATUS_HANDLE sshStatusHandle;
-HANDLE WaitHandles[2] = { NULL, NULL };
+HANDLE WaitHandles[3] = { NULL, NULL, NULL };
char szMsgPath[255];
static BOOL WINAPI OnConsoleEvent(DWORD dwCtrlType);
#endif /* SYS_WINNT */
@@ -354,7 +361,7 @@ ntpdmain(
}
#endif
-#ifdef HAVE_GETUID
+#if defined(HAVE_GETUID) && !defined(MPE) /* MPE lacks the concept of root */
{
uid_t uid;
@@ -790,6 +797,7 @@ service_main(
#if defined(HAVE_IO_COMPLETION_PORT)
WaitHandles[0] = CreateEvent(NULL, FALSE, FALSE, NULL); /* exit reques */
WaitHandles[1] = get_timer_handle();
+ WaitHandles[2] = get_io_event();
for (;;) {
DWORD Index = WaitForMultipleObjectsEx(sizeof(WaitHandles)/sizeof(WaitHandles[0]), WaitHandles, FALSE, 1000, MWMO_ALERTABLE);
@@ -801,16 +809,36 @@ service_main(
case WAIT_OBJECT_0 + 1 : /* timer */
timer();
break;
- case WAIT_OBJECT_0 + 2 : { /* Windows message */
+
+ case WAIT_OBJECT_0 + 2 : /* Io event */
+# ifdef DEBUG
+ if ( debug > 3 )
+ {
+ printf( "IoEvent occurred\n" );
+ }
+# endif
+ break;
+
+# if 1
+ /*
+ * FIXME: According to the documentation for WaitForMultipleObjectsEx
+ * this is not possible. This may be a vestigial from when this was
+ * MsgWaitForMultipleObjects, maybe it should be removed?
+ */
+ case WAIT_OBJECT_0 + 3 : /* windows message */
+ {
MSG msg;
- while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
- if (msg.message == WM_QUIT) {
- exit(0);
+ while ( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
+ {
+ if ( msg.message == WM_QUIT )
+ {
+ exit( 0 );
}
- DispatchMessage(&msg);
+ DispatchMessage( &msg );
}
}
break;
+# endif
case WAIT_IO_COMPLETION : /* loop */
case WAIT_TIMEOUT :
diff --git a/contrib/ntp/ntpd/refclock_chu.c b/contrib/ntp/ntpd/refclock_chu.c
index 10fcea5..b239ad6 100644
--- a/contrib/ntp/ntpd/refclock_chu.c
+++ b/contrib/ntp/ntpd/refclock_chu.c
@@ -1315,6 +1315,9 @@ chu_poll(
} else if (up->leap & 0x2) {
pp->leap = LEAP_ADDSECOND;
leapchar = 'L';
+ } else if (up->leap & 0x4) {
+ pp->leap = LEAP_DELSECOND;
+ leapchar = 'l';
} else {
pp->leap = LEAP_NOWARNING;
}
diff --git a/contrib/ntp/ntpd/refclock_conf.c b/contrib/ntp/ntpd/refclock_conf.c
index 0e6c927..478019f 100644
--- a/contrib/ntp/ntpd/refclock_conf.c
+++ b/contrib/ntp/ntpd/refclock_conf.c
@@ -240,6 +240,24 @@ extern struct refclock refclock_hopfpci;
#define refclock_hopfpci refclock_none
#endif
+#ifdef CLOCK_JJY
+extern struct refclock refclock_jjy;
+#else
+#define refclock_jjy refclock_none
+#endif
+
+#ifdef CLOCK_TT560
+extern struct refclock refclock_tt560;
+#else
+#define refclock_tt560 refclock_none
+#endif
+
+#ifdef CLOCK_ZYFER
+extern struct refclock refclock_zyfer;
+#else
+#define refclock_zyfer refclock_none
+#endif
+
/*
* Order is clock_start(), clock_shutdown(), clock_poll(),
* clock_control(), clock_init(), clock_buginfo, clock_flags;
@@ -259,7 +277,7 @@ struct refclock *refclock_conf[] = {
&refclock_mx4200, /* 9 REFCLK_GPS_MX4200 */
&refclock_as2201, /* 10 REFCLK_GPS_AS2201 */
&refclock_arbiter, /* 11 REFCLK_GPS_ARBITER */
- &refclock_tpro, /* 12 REFCLK_IRIG_TPRO */
+ &refclock_tpro, /* 12 REFCLK_IRIG_TPRO */
&refclock_leitch, /* 13 REFCLK_ATOM_LEITCH */
&refclock_msfees, /* 14 REFCLK_MSF_EES */
&refclock_true, /* 15 alias for REFCLK_TRUETIME */
@@ -276,17 +294,20 @@ struct refclock *refclock_conf[] = {
&refclock_hpgps, /* 26 REFCLK_GPS_HP */
&refclock_arc, /* 27 REFCLK_ARCRON_MSF */
&refclock_shm, /* 28 REFCLK_SHM */
- &refclock_palisade, /* 29 REFCLK_PALISADE */
+ &refclock_palisade, /* 29 REFCLK_PALISADE */
&refclock_oncore, /* 30 REFCLK_ONCORE */
&refclock_jupiter, /* 31 REFCLK_GPS_JUPITER */
&refclock_chronolog, /* 32 REFCLK_CHRONOLOG */
&refclock_dumbclock, /* 33 REFCLK_DUMBCLOCK */
- &refclock_ulink, /* 34 REFCLOCK_ULINK */
- &refclock_pcf, /* 35 REFCLOCK_PCF */
+ &refclock_ulink, /* 34 REFCLOCK_ULINK */
+ &refclock_pcf, /* 35 REFCLOCK_PCF */
&refclock_wwv, /* 36 REFCLOCK_WWV_AUDIO */
&refclock_fg, /* 37 REFCLOCK_FG */
&refclock_hopfser, /* 38 REFCLK_HOPF_SERIAL */
- &refclock_hopfpci /* 39 REFCLK_HOPF_PCI */
+ &refclock_hopfpci, /* 39 REFCLK_HOPF_PCI */
+ &refclock_jjy, /* 40 REFCLK_JJY */
+ &refclock_tt560, /* 41 REFCLK_TT560 */
+ &refclock_zyfer /* 42 REFCLK_ZYFER */
};
u_char num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock *);
diff --git a/contrib/ntp/ntpd/refclock_jjy.c b/contrib/ntp/ntpd/refclock_jjy.c
new file mode 100644
index 0000000..18de93a
--- /dev/null
+++ b/contrib/ntp/ntpd/refclock_jjy.c
@@ -0,0 +1,712 @@
+/*
+ * refclock_jjy - clock driver for JJY receivers
+ */
+
+/**********************************************************************/
+/* */
+/* Copyright (C) 2001, Takao Abe. All rights reserved. */
+/* */
+/* Permission to use, copy, modify, and distribute this software */
+/* and its documentation for any purpose is hereby granted */
+/* without fee, provided that the following conditions are met: */
+/* */
+/* One retains the entire copyright notice properly, and both the */
+/* copyright notice and this license. in the documentation and/or */
+/* other materials provided with the distribution. */
+/* */
+/* This software and the name of the author must not be used to */
+/* endorse or promote products derived from this software without */
+/* prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESSED OR IMPLIED */
+/* WARRANTIES OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, THE */
+/* IMPLIED WARRANTIES OF MERCHANTABLILITY AND FITNESS FOR A */
+/* PARTICULAR PURPOSE. */
+/* IN NO EVENT SHALL THE AUTHOR TAKAO ABE BE LIABLE FOR ANY DIRECT, */
+/* INDIRECT, GENERAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
+/* ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
+/* GOODS OR SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS */
+/* INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, */
+/* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ( INCLUDING */
+/* NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF */
+/* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/* */
+/* This driver is developed in my private time, and is opened as */
+/* voluntary contributions for the NTP. */
+/* The manufacturer of the JJY receiver has not participated in */
+/* a development of this driver. */
+/* The manufacturer does not warrant anything about this driver, */
+/* and is not liable for anything about this driver. */
+/* */
+/**********************************************************************/
+/* */
+/* Author Takao Abe */
+/* Email abetakao@bea.hi-ho.ne.jp */
+/* Homepage http://www.bea.hi-ho.ne.jp/abetakao/ */
+/* */
+/**********************************************************************/
+/* */
+/* History */
+/* */
+/* 2001/07/15 */
+/* [New] Support the Tristate Ltd. JJY receiver */
+/* */
+/* 2001/08/04 */
+/* [Change] Log to clockstats even if bad reply */
+/* [Fix] PRECISION = (-3) (about 100 ms) */
+/* [Add] Support the C-DEX Co.Ltd. JJY receiver */
+/* 2001/12/04 */
+/* [Fix] C-DEX JST2000 ( fukusima@goto.info.waseda.ac.jp ) */
+/* */
+/**********************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if defined(REFCLOCK) && defined(CLOCK_JJY)
+
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_tty.h"
+#include "ntp_refclock.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+
+/**********************************************************************/
+/* */
+/* The Tristate Ltd. JJY receiver JJY01 */
+/* */
+/* Command Response Remarks */
+/* ------------ ---------------------- --------------------- */
+/* date<CR><LF> YYYY/MM/DD XXX<CR><LF> */
+/* time<CR><LF> HH:MM:SS<CR><LF> */
+/* stim<CR><LF> HH:MM:SS<CR><LF> Reply at just second */
+/* */
+/* During synchronization after a receiver is turned on, */
+/* It replies the past time from 2000/01/01 00:00:00. */
+/* The function "refclock_process" checks the time and tells */
+/* as an insanity time. */
+/* */
+/**********************************************************************/
+/* */
+/* The C-DEX Co. Ltd. JJY receiver JST2000 */
+/* */
+/* Command Response Remarks */
+/* ------------ ---------------------- --------------------- */
+/* <ENQ>1J<ETX> <STX>JYYMMDD HHMMSSS<ETX> */
+/* */
+/**********************************************************************/
+
+/*
+ * Interface definitions
+ */
+#define DEVICE "/dev/jjy%d" /* device name and unit */
+#define SPEED232 B9600 /* uart speed (9600 baud) */
+#define REFID "JJY" /* reference ID */
+#define DESCRIPTION "JJY Receiver"
+#define PRECISION (-3) /* precision assumed (about 100 ms) */
+
+/*
+ * JJY unit control structure
+ */
+struct jjyunit {
+ char unittype ; /* UNITTYPE_XXXXXXXXXX */
+ short version ;
+ short linediscipline ; /* LDISC_CLK or LDISC_RAW */
+ int linecount ;
+ int lineerror ;
+ int year, month, day, hour, minute, second, msecond ;
+/* LDISC_RAW only */
+#define MAX_LINECOUNT 8
+#define MAX_RAWBUF 64
+ int lineexpect ;
+ int charexpect [ MAX_LINECOUNT ] ;
+ int charcount ;
+ char rawbuf [ MAX_RAWBUF ] ;
+};
+
+#define UNITTYPE_TRISTATE_JJY01 1
+#define UNITTYPE_CDEX_JST2000 2
+
+/*
+ * Function prototypes
+ */
+static int jjy_start P((int, struct peer *));
+static void jjy_shutdown P((int, struct peer *));
+static void jjy_poll P((int, struct peer *));
+static void jjy_poll_tristate_jjy01 P((int, struct peer *));
+static void jjy_poll_cdex_jst2000 P((int, struct peer *));
+static void jjy_receive P((struct recvbuf *));
+static int jjy_receive_tristate_jjy01 P((struct recvbuf *));
+static int jjy_receive_cdex_jst2000 P((struct recvbuf *));
+
+/*
+ * Transfer vector
+ */
+struct refclock refclock_jjy = {
+ jjy_start, /* start up driver */
+ jjy_shutdown, /* shutdown driver */
+ jjy_poll, /* transmit poll message */
+ noentry, /* not used */
+ noentry, /* not used */
+ noentry, /* not used */
+ NOFLAGS /* not used */
+};
+
+/*
+ * Start up driver return code
+ */
+#define RC_START_SUCCESS 1
+#define RC_START_ERROR 0
+
+/*
+ * Local constants definition
+ */
+
+#define MAX_LOGTEXT 64
+
+
+/**************************************************************************************************/
+/* jjy_start - open the devices and initialize data for processing */
+/**************************************************************************************************/
+static int
+jjy_start ( int unit, struct peer *peer )
+{
+
+ struct jjyunit *up ;
+ struct refclockproc *pp ;
+ int fd ;
+ char *pDeviceName ;
+ short iDiscipline ;
+
+#ifdef DEBUG
+ if ( debug ) {
+ printf ( "jjy_start (refclock_jjy.c) : %s mode=%d ", ntoa(&peer->srcadr), peer->ttlmax ) ;
+ printf ( DEVICE, unit ) ;
+ printf ( "\n" ) ;
+ }
+#endif
+ /*
+ * Open serial port
+ */
+ if ( ! ( pDeviceName = (char*) emalloc ( strlen(DEVICE) + 10 ) ) ) {
+ return RC_START_ERROR ;
+ }
+ sprintf ( pDeviceName, DEVICE, unit ) ;
+
+ /*
+ * peer->ttlmax is a mode number specified by "127.127.40.X mode N" in the ntp.conf
+ */
+ switch ( peer->ttlmax ) {
+ case 0 :
+ case 1 : iDiscipline = LDISC_CLK ; break ;
+ case 2 : iDiscipline = LDISC_RAW ; break ;
+ default :
+ msyslog ( LOG_ERR, "JJY receiver [ %s mode %d ] : Unsupported mode",
+ ntoa(&peer->srcadr), peer->ttlmax ) ;
+ free ( (void*) pDeviceName ) ;
+ return RC_START_ERROR ;
+ }
+
+ if ( ! ( fd = refclock_open ( pDeviceName, SPEED232, iDiscipline ) ) ) {
+ free ( (void*) pDeviceName ) ;
+ return RC_START_ERROR ;
+ }
+ free ( (void*) pDeviceName ) ;
+
+ /*
+ * Allocate and initialize unit structure
+ */
+ if ( ! ( up = (struct jjyunit *) emalloc (sizeof(struct jjyunit)) ) ) {
+ close ( fd ) ;
+ return RC_START_ERROR ;
+ }
+
+ memset ( (char*)up, 0, sizeof(struct jjyunit) ) ;
+ up->linediscipline = iDiscipline ;
+
+ /*
+ * peer->ttlmax is a mode number specified by "127.127.40.X mode N" in the ntp.conf
+ */
+ switch ( peer->ttlmax ) {
+ case 0 :
+ /*
+ * The mode 0 is a default clock type at this time.
+ * But this will be change to auto-detect mode in the future.
+ */
+ case 1 :
+ up->unittype = UNITTYPE_TRISTATE_JJY01 ;
+ up->version = 100 ;
+ up->lineexpect = 2 ;
+ up->charexpect[0] = 14 ; /* YYYY/MM/DD WWW<CR><LF> */
+ up->charexpect[1] = 8 ; /* HH:MM:SS<CR><LF> */
+ break ;
+ case 2 :
+ up->unittype = UNITTYPE_CDEX_JST2000 ;
+ up->lineexpect = 1 ;
+ up->charexpect[0] = 15 ; /* <STX>JYYMMDD HHMMSSS<ETX> */
+ break ;
+ default :
+ msyslog ( LOG_ERR, "JJY receiver [ %s mode %d ] : Unsupported mode",
+ ntoa(&peer->srcadr), peer->ttlmax ) ;
+ close ( fd ) ;
+ free ( (void*) up ) ;
+ return RC_START_ERROR ;
+ }
+
+ pp = peer->procptr ;
+ pp->unitptr = (caddr_t) up ;
+ pp->io.clock_recv = jjy_receive ;
+ pp->io.srcclock = (caddr_t) peer ;
+ pp->io.datalen = 0 ;
+ pp->io.fd = fd ;
+ if ( ! io_addclock(&pp->io) ) {
+ close ( fd ) ;
+ free ( (void*) up ) ;
+ return RC_START_ERROR ;
+ }
+
+ /*
+ * Initialize miscellaneous variables
+ */
+ peer->precision = PRECISION ;
+ peer->burst = 1 ;
+ pp->clockdesc = DESCRIPTION ;
+ memcpy ( (char*)&pp->refid, REFID, strlen(REFID) ) ;
+
+ return RC_START_SUCCESS ;
+
+}
+
+
+/**************************************************************************************************/
+/* jjy_shutdown - shutdown the clock */
+/**************************************************************************************************/
+static void
+jjy_shutdown ( int unit, struct peer *peer )
+{
+
+ struct jjyunit *up;
+ struct refclockproc *pp;
+
+ pp = peer->procptr ;
+ up = (struct jjyunit *) pp->unitptr ;
+ io_closeclock ( &pp->io ) ;
+ free ( (void*) up ) ;
+
+}
+
+
+/**************************************************************************************************/
+/* jjy_receive - receive data from the serial interface */
+/**************************************************************************************************/
+static void
+jjy_receive ( struct recvbuf *rbufp )
+{
+
+ struct jjyunit *up ;
+ struct refclockproc *pp ;
+ struct peer *peer;
+
+ l_fp tRecvTimestamp; /* arrival timestamp */
+ int rc ;
+ char sLogText [ MAX_LOGTEXT ] ;
+ int i, bCntrlChar ;
+
+ /*
+ * Initialize pointers and read the timecode and timestamp
+ */
+ peer = (struct peer *) rbufp->recv_srcclock ;
+ pp = peer->procptr ;
+ up = (struct jjyunit *) pp->unitptr ;
+
+ /*
+ * Get next input line
+ */
+ pp->lencode = refclock_gtlin ( rbufp, pp->a_lastcode, BMAX, &tRecvTimestamp ) ;
+
+ if ( up->linediscipline == LDISC_RAW ) {
+ /*
+ * The reply with <STX> and <ETX> may give a blank line
+ */
+ if ( pp->lencode == 0 && up->charcount == 0 ) return ;
+ /*
+ * Copy received charaters to temporary buffer
+ */
+ for ( i = 0 ; i < pp->lencode && up->charcount < MAX_RAWBUF - 2 ; i ++ , up->charcount ++ ) {
+ up->rawbuf[up->charcount] = pp->a_lastcode[i] ;
+ }
+ while ( up->charcount > 0 && up->rawbuf[0] < ' ' ) {
+ for ( i = 0 ; i < up->charcount - 1 ; i ++ ) up->rawbuf[i] = up->rawbuf[i+1] ;
+ up->charcount -- ;
+ }
+ bCntrlChar = 0 ;
+ for ( i = 0 ; i < up->charcount ; i ++ ) {
+ if ( up->rawbuf[i] < ' ' ) {
+ bCntrlChar = 1 ;
+ break ;
+ }
+ }
+ if ( pp->lencode > 0 && up->linecount < up->lineexpect ) {
+ if ( bCntrlChar == 0 && up->charcount < up->charexpect[up->linecount] ) return ;
+ }
+ up->rawbuf[up->charcount] = 0 ;
+ } else {
+ /*
+ * The reply with <CR><LF> gives a blank line
+ */
+ if ( pp->lencode == 0 ) return ;
+ }
+ /*
+ * We get down to business
+ */
+
+ pp->lastrec = tRecvTimestamp ;
+
+ up->linecount ++ ;
+
+ if ( up->lineerror != 0 ) return ;
+
+ switch ( up->unittype ) {
+
+ case UNITTYPE_TRISTATE_JJY01 :
+ rc = jjy_receive_tristate_jjy01 ( rbufp ) ;
+ break ;
+
+ case UNITTYPE_CDEX_JST2000 :
+ rc = jjy_receive_cdex_jst2000 ( rbufp ) ;
+ break ;
+
+ default :
+ rc = 0 ;
+ break ;
+
+ }
+
+ if ( up->linediscipline == LDISC_RAW ) {
+ if ( up->linecount <= up->lineexpect && up->charcount > up->charexpect[up->linecount-1] ) {
+ for ( i = 0 ; i < up->charcount - up->charexpect[up->linecount-1] ; i ++ ) {
+ up->rawbuf[i] = up->rawbuf[i+up->charexpect[up->linecount-1]] ;
+ }
+ up->charcount -= up->charexpect[up->linecount-1] ;
+ } else {
+ up->charcount = 0 ;
+ }
+ }
+
+ if ( rc == 0 ) return ;
+
+ if ( up->lineerror != 0 ) {
+ refclock_report ( peer, CEVNT_BADREPLY ) ;
+ strcpy ( sLogText, "BAD REPLY [" ) ;
+ if ( up->linediscipline == LDISC_RAW ) {
+ strncat ( sLogText, up->rawbuf, MAX_LOGTEXT - strlen ( sLogText ) - 1 ) ;
+ } else {
+ strncat ( sLogText, pp->a_lastcode, MAX_LOGTEXT - strlen ( sLogText ) - 1 ) ;
+ }
+ sLogText[MAX_LOGTEXT-1] = 0 ;
+ if ( strlen ( sLogText ) < MAX_LOGTEXT - 2 ) strcat ( sLogText, "]" ) ;
+ record_clock_stats ( &peer->srcadr, sLogText ) ;
+ return ;
+ }
+
+ pp->year = up->year ;
+ pp->day = ymd2yd ( up->year, up->month, up->day ) ;
+ pp->hour = up->hour ;
+ pp->minute = up->minute ;
+ pp->second = up->second ;
+ pp->msec = up->msecond ;
+ pp->usec = 0;
+
+ /*
+ * JST to UTC
+ */
+ pp->hour -= 9 ;
+ if ( pp->hour < 0 ) {
+ pp->hour += 24 ;
+ pp->day -- ;
+ if ( pp->day < 1 ) {
+ pp->year -- ;
+ pp->day = ymd2yd ( pp->year, 12, 31 ) ;
+ }
+ }
+#ifdef DEBUG
+ if ( debug ) {
+ printf ( "jjy_receive (refclock_jjy.c) : %04d/%02d/%02d %02d:%02d:%02d JST ",
+ up->year, up->month, up->day, up->hour, up->minute, up->second ) ;
+ printf ( "( %04d/%03d %02d:%02d:%02d UTC )\n",
+ pp->year, pp->day, pp->hour, pp->minute, pp->second ) ;
+ }
+#endif
+
+ /*
+ * Process the new sample in the median filter and determine the
+ * timecode timestamp.
+ */
+ if ( ! refclock_process ( pp ) ) {
+ refclock_report(peer, CEVNT_BADTIME);
+ sprintf ( sLogText, "BAD TIME %04d/%02d/%02d %02d:%02d:%02d JST",
+ up->year, up->month, up->day, up->hour, up->minute, up->second ) ;
+ record_clock_stats ( &peer->srcadr, sLogText ) ;
+ return ;
+ }
+
+ sprintf ( sLogText, "%04d/%02d/%02d %02d:%02d:%02d JST",
+ up->year, up->month, up->day, up->hour, up->minute, up->second ) ;
+ record_clock_stats ( &peer->srcadr, sLogText ) ;
+
+ refclock_receive(peer);
+
+}
+
+/**************************************************************************************************/
+
+static int
+jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
+{
+
+ struct jjyunit *up ;
+ struct refclockproc *pp ;
+ struct peer *peer;
+
+ char *pBuf ;
+ int iLen ;
+ int rc ;
+
+ /*
+ * Initialize pointers and read the timecode and timestamp
+ */
+ peer = (struct peer *) rbufp->recv_srcclock ;
+ pp = peer->procptr ;
+ up = (struct jjyunit *) pp->unitptr ;
+
+ if ( up->linediscipline == LDISC_RAW ) {
+ pBuf = up->rawbuf ;
+ iLen = up->charcount ;
+ } else {
+ pBuf = pp->a_lastcode ;
+ iLen = pp->lencode ;
+ }
+
+ switch ( up->linecount ) {
+
+ case 1 : /* YYYY/MM/DD */
+
+ if ( iLen < 10 ) {
+ up->lineerror = 1 ;
+ break ;
+ }
+ rc = sscanf ( pBuf, "%4d/%2d/%2d", &up->year, &up->month, &up->day ) ;
+ if ( rc != 3 || up->year < 2000 || up->month < 1 || up->month > 12 || up->day < 1 || up->day > 31 ) {
+ up->lineerror = 1 ;
+ break ;
+ }
+ return 0 ;
+
+ case 2 : /* HH:MM:SS */
+
+ if ( iLen < 8 ) {
+ up->lineerror = 1 ;
+ break ;
+ }
+ rc = sscanf ( pBuf, "%2d:%2d:%2d", &up->hour, &up->minute, &up->second ) ;
+ if ( rc != 3 || up->hour > 23 || up->minute > 59 || up->second > 60 ) {
+ up->lineerror = 1 ;
+ break ;
+ }
+ up->msecond = 0 ;
+ if ( up->hour == 0 && up->minute == 0 && up->second <= 2 ) {
+ /*
+ * The command "date" and "time" ( or "stim" ) were sent to the JJY receiver continuously.
+ * But the JJY receiver replies a date and time separately.
+ * Just after midnight transtions, we ignore this time.
+ */
+ return 0 ;
+ }
+ break ;
+
+ default : /* Unexpected reply */
+
+ up->lineerror = 1 ;
+ break ;
+
+ }
+
+ return 1 ;
+
+}
+
+/**************************************************************************************************/
+
+static int
+jjy_receive_cdex_jst2000 ( struct recvbuf *rbufp )
+{
+
+ struct jjyunit *up ;
+ struct refclockproc *pp ;
+ struct peer *peer;
+
+ char *pBuf ;
+ int iLen ;
+ int rc ;
+
+ /*
+ * Initialize pointers and read the timecode and timestamp
+ */
+ peer = (struct peer *) rbufp->recv_srcclock ;
+ pp = peer->procptr ;
+ up = (struct jjyunit *) pp->unitptr ;
+
+ if ( up->linediscipline == LDISC_RAW ) {
+ pBuf = up->rawbuf ;
+ iLen = up->charcount ;
+ } else {
+ pBuf = pp->a_lastcode ;
+ iLen = pp->lencode ;
+ }
+
+ switch ( up->linecount ) {
+
+ case 1 : /* JYYMMDD HHMMSSS */
+
+ if ( iLen < 15 ) {
+ up->lineerror = 1 ;
+ break ;
+ }
+ rc = sscanf ( pBuf, "J%2d%2d%2d%*1d%2d%2d%2d%1d",
+ &up->year, &up->month, &up->day, &up->hour, &up->minute, &up->second, &up->msecond ) ;
+ if ( rc != 7 || up->month < 1 || up->month > 12 || up->day < 1 || up->day > 31
+ || up->hour > 23 || up->minute > 59 || up->second > 60 ) {
+ up->lineerror = 1 ;
+ break ;
+ }
+ up->year += 2000 ;
+ up->msecond *= 100 ;
+ break ;
+
+ default : /* Unexpected reply */
+
+ up->lineerror = 1 ;
+ break ;
+
+ }
+
+ return 1 ;
+
+}
+
+/**************************************************************************************************/
+/* jjy_poll - called by the transmit procedure */
+/**************************************************************************************************/
+static void
+jjy_poll ( int unit, struct peer *peer )
+{
+
+ struct jjyunit *up;
+ struct refclockproc *pp;
+
+ pp = peer->procptr;
+ up = (struct jjyunit *) pp->unitptr ;
+
+ if ( pp->polls > 0 && up->linecount == 0 ) {
+ /*
+ * No reply for last command
+ */
+ refclock_report ( peer, CEVNT_TIMEOUT ) ;
+ }
+
+#ifdef DEBUG
+ if ( debug ) {
+ printf ( "jjy_poll (refclock_jjy.c) : %ld\n", pp->polls ) ;
+ }
+#endif
+
+ pp->polls ++ ;
+
+ up->linecount = 0 ;
+ up->lineerror = 0 ;
+ up->charcount = 0 ;
+
+ switch ( up->unittype ) {
+
+ case UNITTYPE_TRISTATE_JJY01 :
+ jjy_poll_tristate_jjy01 ( unit, peer ) ;
+ break ;
+
+ case UNITTYPE_CDEX_JST2000 :
+ jjy_poll_cdex_jst2000 ( unit, peer ) ;
+ break ;
+
+ default :
+ break ;
+
+ }
+
+}
+
+/**************************************************************************************************/
+
+static void
+jjy_poll_tristate_jjy01 ( int unit, struct peer *peer )
+{
+
+ struct jjyunit *up;
+ struct refclockproc *pp;
+
+ pp = peer->procptr;
+ up = (struct jjyunit *) pp->unitptr ;
+
+ /*
+ * Send "date<CR><LF>" command
+ */
+
+ if ( write ( pp->io.fd, "date\r\n",6 ) != 6 ) {
+ refclock_report ( peer, CEVNT_FAULT ) ;
+ }
+
+ /*
+ * Send "stim<CR><LF>" or "time<CR><LF>" command
+ */
+
+ if ( up->version >= 100 ) {
+ if ( write ( pp->io.fd, "stim\r\n",6 ) != 6 ) {
+ refclock_report ( peer, CEVNT_FAULT ) ;
+ }
+ } else {
+ if ( write ( pp->io.fd, "time\r\n",6 ) != 6 ) {
+ refclock_report ( peer, CEVNT_FAULT ) ;
+ }
+ }
+
+}
+
+/**************************************************************************************************/
+
+static void
+jjy_poll_cdex_jst2000 ( int unit, struct peer *peer )
+{
+
+ struct refclockproc *pp;
+
+ pp = peer->procptr;
+
+ /*
+ * Send "<ENQ>1J<ETX>" command
+ */
+
+ if ( write ( pp->io.fd, "\x051J\x03", 4 ) != 4 ) {
+ refclock_report ( peer, CEVNT_FAULT ) ;
+ }
+
+}
+
+#else
+int refclock_jjy_bs ;
+#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_local.c b/contrib/ntp/ntpd/refclock_local.c
index a3e5773..345a7a2 100644
--- a/contrib/ntp/ntpd/refclock_local.c
+++ b/contrib/ntp/ntpd/refclock_local.c
@@ -255,4 +255,6 @@ local_poll(
refclock_receive(peer);
pp->fudgetime1 = 0;
}
+#else
+int refclock_local_bs;
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_oncore.c b/contrib/ntp/ntpd/refclock_oncore.c
index dbb9f5d..43a38fb 100644
--- a/contrib/ntp/ntpd/refclock_oncore.c
+++ b/contrib/ntp/ntpd/refclock_oncore.c
@@ -652,7 +652,7 @@ oncore_start(
exit(1);
}
- if (pps_device) {
+ if (pps_device && pps_device[0]) {
if (stat(pps_device, &stat1)) {
perror("ONCORE: stat pps_device");
return(0);
diff --git a/contrib/ntp/ntpd/refclock_palisade.c b/contrib/ntp/ntpd/refclock_palisade.c
index d8ce411..4b36b78 100644
--- a/contrib/ntp/ntpd/refclock_palisade.c
+++ b/contrib/ntp/ntpd/refclock_palisade.c
@@ -878,4 +878,6 @@ getint (
return (short) (bp[1] + (bp[0] << 8));
}
+#else
+int refclock_palisade_bs;
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_true.c b/contrib/ntp/ntpd/refclock_true.c
index dcc362d..986031d 100644
--- a/contrib/ntp/ntpd/refclock_true.c
+++ b/contrib/ntp/ntpd/refclock_true.c
@@ -410,7 +410,7 @@ true_receive(
}
}
else {
- refclock_report(peer, CEVNT_BADREPLY);
+ /*refclock_report(peer, CEVNT_BADREPLY);*/
label = "UNKNOWN";
}
true_debug(peer, "GOES: station %s\n", label);
diff --git a/contrib/ntp/ntpd/refclock_tt560.c b/contrib/ntp/ntpd/refclock_tt560.c
new file mode 100644
index 0000000..f3d7bc1
--- /dev/null
+++ b/contrib/ntp/ntpd/refclock_tt560.c
@@ -0,0 +1,274 @@
+/*
+ * refclock_tt560 - clock driver for the TrueTime 560 IRIG-B decoder
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if defined(REFCLOCK) && defined(CLOCK_TT560)
+
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_refclock.h"
+#include "ntp_unixtime.h"
+#include "sys/tt560_api.h"
+#include "ntp_stdlib.h"
+
+#include <stdio.h>
+#include <ctype.h>
+
+/*
+ * This driver supports the TrueTime 560 IRIG-B decoder for the PCI bus.
+ */
+
+/*
+ * TT560 interface definitions
+ */
+#define DEVICE "/dev/tt560%d" /* device name and unit */
+#define PRECISION (-20) /* precision assumed (1 us) */
+#define REFID "IRIG" /* reference ID */
+#define DESCRIPTION "TrueTime 560 IRIG-B PCI Decoder"
+
+/*
+ * Unit control structure
+ */
+struct tt560unit {
+ tt_mem_space_t *tt_mem; /* mapped address of PCI board */
+ time_freeze_reg_t tt560rawt; /* data returned from PCI board */
+};
+
+typedef union byteswap_u
+{
+ unsigned int long_word;
+ unsigned char byte[4];
+} byteswap_t;
+
+/*
+ * Function prototypes
+ */
+static int tt560_start P((int, struct peer *));
+static void tt560_shutdown P((int, struct peer *));
+static void tt560_poll P((int unit, struct peer *));
+
+/*
+ * Transfer vector
+ */
+struct refclock refclock_tt560 = {
+ tt560_start, /* clock_start */
+ tt560_shutdown, /* clock_shutdown */
+ tt560_poll, /* clock_poll */
+ noentry, /* clock_control (not used) */
+ noentry, /* clock_init (not used) */
+ noentry, /* clock_buginfo (not used) */
+ NOFLAGS /* clock_flags (not used) */
+};
+
+
+/*
+ * tt560_start - open the TT560 device and initialize data for processing
+ */
+static int
+tt560_start(
+ int unit,
+ struct peer *peer
+ )
+{
+ register struct tt560unit *up;
+ struct refclockproc *pp;
+ char device[20];
+ int fd;
+ caddr_t membase;
+
+ /*
+ * Open TT560 device
+ */
+ (void)sprintf(device, DEVICE, unit);
+ fd = open(device, O_RDWR);
+ if (fd == -1) {
+ msyslog(LOG_ERR, "tt560_start: open of %s: %m", device);
+ return (0);
+ }
+
+ /*
+ * Map the device registers into user space.
+ */
+ membase = mmap ((caddr_t) 0, TTIME_MEMORY_SIZE,
+ PROT_READ | PROT_WRITE,
+ MAP_SHARED, fd, (off_t)0);
+
+ if (membase == (caddr_t) -1) {
+ msyslog(LOG_ERR, "tt560_start: mapping of %s: %m", device);
+ (void) close(fd);
+ return (0);
+ }
+
+ /*
+ * Allocate and initialize unit structure
+ */
+ if (!(up = (struct tt560unit *) emalloc(sizeof(struct tt560unit)))) {
+ (void) close(fd);
+ return (0);
+ }
+ memset((char *)up, 0, sizeof(struct tt560unit));
+ up->tt_mem = (tt_mem_space_t *)membase;
+ pp = peer->procptr;
+ pp->io.clock_recv = noentry;
+ pp->io.srcclock = (caddr_t)peer;
+ pp->io.datalen = 0;
+ pp->io.fd = fd;
+ pp->unitptr = (caddr_t)up;
+
+ /*
+ * Initialize miscellaneous peer variables
+ */
+ peer->precision = PRECISION;
+ peer->burst = NSTAGE;
+ pp->clockdesc = DESCRIPTION;
+ memcpy((char *)&pp->refid, REFID, 4);
+ return (1);
+}
+
+
+/*
+ * tt560_shutdown - shut down the clock
+ */
+static void
+tt560_shutdown(
+ int unit,
+ struct peer *peer
+ )
+{
+ register struct tt560unit *up;
+ struct refclockproc *pp;
+
+ pp = peer->procptr;
+ up = (struct tt560unit *)pp->unitptr;
+ io_closeclock(&pp->io);
+ free(up);
+}
+
+
+/*
+ * tt560_poll - called by the transmit procedure
+ */
+static void
+tt560_poll(
+ int unit,
+ struct peer *peer
+ )
+{
+ register struct tt560unit *up;
+ struct refclockproc *pp;
+ time_freeze_reg_t *tp;
+ tt_mem_space_t *mp;
+
+ int i;
+ unsigned int *p_time_t, *tt_mem_t;
+
+ /*
+ * This is the main routine. It snatches the time from the TT560
+ * board and tacks on a local timestamp.
+ */
+ pp = peer->procptr;
+ up = (struct tt560unit *)pp->unitptr;
+ mp = up->tt_mem;
+ tp = &up->tt560rawt;
+
+ p_time_t = (unsigned int *)tp;
+ tt_mem_t = (unsigned int *)&mp->time_freeze_reg;
+
+ *tt_mem_t = 0; /* update the time freeze register */
+ /* and copy time stamp to memory */
+ for (i=0; i < TIME_FREEZE_REG_LEN; i++) {
+ *p_time_t = byte_swap(*tt_mem_t);
+ p_time_t++;
+ tt_mem_t++;
+ }
+
+ get_systime(&pp->lastrec);
+ pp->polls++;
+
+ /*
+ * We get down to business, check the timecode format and decode
+ * its contents. If the timecode has invalid length or is not in
+ * proper format, we declare bad format and exit. Note: we
+ * can't use the sec/usec conversion produced by the driver,
+ * since the year may be suspect. All format error checking is
+ * done by the sprintf() and sscanf() routines.
+ */
+ sprintf(pp->a_lastcode,
+ "%1x%1x%1x %1x%1x:%1x%1x:%1x%1x.%1x%1x%1x%1x%1x%1x %1x",
+ tp->hun_day, tp->tens_day, tp->unit_day,
+ tp->tens_hour, tp->unit_hour,
+ tp->tens_min, tp->unit_min,
+ tp->tens_sec, tp->unit_sec,
+ tp->hun_ms, tp->tens_ms, tp->unit_ms,
+ tp->hun_us, tp->tens_us, tp->unit_us,
+ tp->status);
+ pp->lencode = strlen(pp->a_lastcode);
+#ifdef DEBUG
+ if (debug)
+ printf("tt560: time %s timecode %d %s\n",
+ ulfptoa(&pp->lastrec, 6), pp->lencode,
+ pp->a_lastcode);
+#endif
+ if (sscanf(pp->a_lastcode, "%3d %2d:%2d:%2d.%6ld",
+ &pp->day, &pp->hour, &pp->minute, &pp->second, &pp->usec)
+ != 5) {
+ refclock_report(peer, CEVNT_BADTIME);
+ return;
+ }
+ if ((tp->status & 0x6) != 0x6)
+ pp->leap = LEAP_NOTINSYNC;
+ else
+ pp->leap = LEAP_NOWARNING;
+ if (!refclock_process(pp)) {
+ refclock_report(peer, CEVNT_BADTIME);
+ return;
+ }
+ if (peer->burst > 0)
+ return;
+ if (pp->coderecv == pp->codeproc) {
+ refclock_report(peer, CEVNT_TIMEOUT);
+ return;
+ }
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ refclock_receive(peer);
+ peer->burst = NSTAGE;
+}
+
+/******************************************************************
+ *
+ * byte_swap
+ *
+ * Inputs: 32 bit integer
+ *
+ * Output: byte swapped 32 bit integer.
+ *
+ * This routine is used to compensate for the byte alignment
+ * differences between big-endian and little-endian integers.
+ *
+ ******************************************************************/
+static unsigned int
+byte_swap(unsigned int input_num)
+{
+ byteswap_t byte_swap;
+ unsigned char temp;
+
+ byte_swap.long_word = input_num;
+
+ temp = byte_swap.byte[3];
+ byte_swap.byte[3] = byte_swap.byte[0];
+ byte_swap.byte[0] = temp;
+
+ temp = byte_swap.byte[2];
+ byte_swap.byte[2] = byte_swap.byte[1];
+ byte_swap.byte[1] = temp;
+
+ return (byte_swap.long_word);
+}
+
+#else
+int refclock_tt560_bs;
+#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_zyfer.c b/contrib/ntp/ntpd/refclock_zyfer.c
new file mode 100644
index 0000000..b622931
--- /dev/null
+++ b/contrib/ntp/ntpd/refclock_zyfer.c
@@ -0,0 +1,346 @@
+/*
+ * refclock_zyfer - clock driver for the Zyfer GPSTarplus Clock
+ *
+ * Harlan Stenn, Jan 2002
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if defined(REFCLOCK) && defined(CLOCK_ZYFER)
+
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_refclock.h"
+#include "ntp_stdlib.h"
+#include "ntp_unixtime.h"
+
+#include <stdio.h>
+#include <ctype.h>
+
+#ifdef HAVE_SYS_TERMIOS_H
+# include <sys/termios.h>
+#endif
+#ifdef HAVE_SYS_PPSCLOCK_H
+# include <sys/ppsclock.h>
+#endif
+
+/*
+ * This driver provides support for the TOD serial port of a Zyfer GPStarplus.
+ * This clock also provides PPS as well as IRIG outputs.
+ * Precision is limited by the serial driver, etc.
+ *
+ * If I was really brave I'd hack/generalize the serial driver to deal
+ * with arbitrary on-time characters. This clock *begins* the stream with
+ * `!`, the on-time character, and the string is *not* EOL-terminated.
+ *
+ * Configure the beast for 9600, 8N1. While I see leap-second stuff
+ * in the documentation, the published specs on the TOD format only show
+ * the seconds going to '59'. I see no leap warning in the TOD format.
+ *
+ * The clock sends the following message once per second:
+ *
+ * !TIME,2002,017,07,59,32,2,4,1
+ * YYYY DDD HH MM SS m T O
+ *
+ * ! On-time character
+ * YYYY Year
+ * DDD 001-366 Day of Year
+ * HH 00-23 Hour
+ * MM 00-59 Minute
+ * SS 00-59 Second (probably 00-60)
+ * m 1-5 Time Mode:
+ * 1 = GPS time
+ * 2 = UTC time
+ * 3 = LGPS time (Local GPS)
+ * 4 = LUTC time (Local UTC)
+ * 5 = Manual time
+ * T 4-9 Time Figure Of Merit:
+ * 4 x <= 1us
+ * 5 1us < x <= 10 us
+ * 6 10us < x <= 100us
+ * 7 100us < x <= 1ms
+ * 8 1ms < x <= 10ms
+ * 9 10ms < x
+ * O 0-4 Operation Mode:
+ * 0 Warm-up
+ * 1 Time Locked
+ * 2 Coasting
+ * 3 Recovering
+ * 4 Manual
+ *
+ */
+
+/*
+ * Interface definitions
+ */
+#define DEVICE "/dev/zyfer%d" /* device name and unit */
+#define SPEED232 B9600 /* uart speed (9600 baud) */
+#define PRECISION (-20) /* precision assumed (about 1 us) */
+#define REFID "GPS\0" /* reference ID */
+#define DESCRIPTION "Zyfer GPStarplus" /* WRU */
+
+#define LENZYFER 29 /* timecode length */
+
+/*
+ * Unit control structure
+ */
+struct zyferunit {
+ u_char Rcvbuf[LENZYFER + 1];
+ u_char polled; /* poll message flag */
+ int pollcnt;
+ l_fp tstamp; /* timestamp of last poll */
+ int Rcvptr;
+};
+
+/*
+ * Function prototypes
+ */
+static int zyfer_start P((int, struct peer *));
+static void zyfer_shutdown P((int, struct peer *));
+static void zyfer_receive P((struct recvbuf *));
+static void zyfer_poll P((int, struct peer *));
+
+/*
+ * Transfer vector
+ */
+struct refclock refclock_zyfer = {
+ zyfer_start, /* start up driver */
+ zyfer_shutdown, /* shut down driver */
+ zyfer_poll, /* transmit poll message */
+ noentry, /* not used (old zyfer_control) */
+ noentry, /* initialize driver (not used) */
+ noentry, /* not used (old zyfer_buginfo) */
+ NOFLAGS /* not used */
+};
+
+
+/*
+ * zyfer_start - open the devices and initialize data for processing
+ */
+static int
+zyfer_start(
+ int unit,
+ struct peer *peer
+ )
+{
+ register struct zyferunit *up;
+ struct refclockproc *pp;
+ int fd;
+ char device[20];
+
+ /*
+ * Open serial port.
+ * Something like LDISC_ACTS that looked for ! would be nice...
+ */
+ (void)sprintf(device, DEVICE, unit);
+ if ( !(fd = refclock_open(device, SPEED232, LDISC_RAW)) )
+ return (0);
+
+ msyslog(LOG_NOTICE, "zyfer(%d) fd: %d dev <%s>", unit, fd, device);
+
+ /*
+ * Allocate and initialize unit structure
+ */
+ if (!(up = (struct zyferunit *)
+ emalloc(sizeof(struct zyferunit)))) {
+ (void) close(fd);
+ return (0);
+ }
+ memset((char *)up, 0, sizeof(struct zyferunit));
+ pp = peer->procptr;
+ pp->io.clock_recv = zyfer_receive;
+ pp->io.srcclock = (caddr_t)peer;
+ pp->io.datalen = 0;
+ pp->io.fd = fd;
+ if (!io_addclock(&pp->io)) {
+ (void) close(fd);
+ free(up);
+ return (0);
+ }
+ pp->unitptr = (caddr_t)up;
+
+ /*
+ * Initialize miscellaneous variables
+ */
+ peer->precision = PRECISION;
+ pp->clockdesc = DESCRIPTION;
+ memcpy((char *)&pp->refid, REFID, 4);
+ up->pollcnt = 2;
+ up->polled = 0; /* May not be needed... */
+
+ return (1);
+}
+
+
+/*
+ * zyfer_shutdown - shut down the clock
+ */
+static void
+zyfer_shutdown(
+ int unit,
+ struct peer *peer
+ )
+{
+ register struct zyferunit *up;
+ struct refclockproc *pp;
+
+ pp = peer->procptr;
+ up = (struct zyferunit *)pp->unitptr;
+ io_closeclock(&pp->io);
+ free(up);
+}
+
+
+/*
+ * zyfer_receive - receive data from the serial interface
+ */
+static void
+zyfer_receive(
+ struct recvbuf *rbufp
+ )
+{
+ register struct zyferunit *up;
+ struct refclockproc *pp;
+ struct peer *peer;
+ int tmode; /* Time mode */
+ int tfom; /* Time Figure Of Merit */
+ int omode; /* Operation mode */
+ u_char *p;
+#ifdef PPS
+ struct ppsclockev ppsev;
+ int request;
+#ifdef HAVE_CIOGETEV
+ request = CIOGETEV;
+#endif
+#ifdef HAVE_TIOCGPPSEV
+ request = TIOCGPPSEV;
+#endif
+#endif /* PPS */
+
+ peer = (struct peer *)rbufp->recv_srcclock;
+ pp = peer->procptr;
+ up = (struct zyferunit *)pp->unitptr;
+ p = (u_char *) &rbufp->recv_space;
+ /*
+ * If lencode is 0:
+ * - if *rbufp->recv_space is !
+ * - - call refclock_gtlin to get things going
+ * - else flush
+ * else stuff it on the end of lastcode
+ * If we don't have LENZYFER bytes
+ * - wait for more data
+ * Crack the beast, and if it's OK, process it.
+ *
+ * We use refclock_getlin() because we might use LDISC_CLK.
+ *
+ * Under FreeBSD, we get the ! followed by two 14-byte packets.
+ */
+
+ if (pp->lencode >= LENZYFER)
+ pp->lencode = 0;
+
+ if (!pp->lencode) {
+ if (*p == '!')
+ pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode,
+ BMAX, &pp->lastrec);
+ else
+ return;
+ } else {
+ memcpy(pp->a_lastcode + pp->lencode, p, rbufp->recv_length);
+ pp->lencode += rbufp->recv_length;
+ pp->a_lastcode[pp->lencode] = '\0';
+ }
+
+ if (pp->lencode < LENZYFER)
+ return;
+
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+
+ /*
+ * We get down to business, check the timecode format and decode
+ * its contents. If the timecode has invalid length or is not in
+ * proper format, we declare bad format and exit.
+ */
+
+ if (pp->lencode != LENZYFER) {
+ refclock_report(peer, CEVNT_BADTIME);
+ return;
+ }
+
+ /*
+ * Timecode sample: "!TIME,2002,017,07,59,32,2,4,1"
+ */
+ if (sscanf(pp->a_lastcode, "!TIME,%4d,%3d,%2d,%2d,%2d,%d,%d,%d",
+ &pp->year, &pp->day, &pp->hour, &pp->minute, &pp->second,
+ &tmode, &tfom, &omode) != 8) {
+ refclock_report(peer, CEVNT_BADREPLY);
+ return;
+ }
+
+ if (tmode != 2) {
+ refclock_report(peer, CEVNT_BADTIME);
+ return;
+ }
+
+ /* Should we make sure tfom is 4? */
+
+ if (omode != 1) {
+ pp->leap = LEAP_NOTINSYNC;
+ return;
+ }
+#ifdef PPS
+ if(ioctl(fdpps,request,(caddr_t) &ppsev) >=0) {
+ ppsev.tv.tv_sec += (u_int32) JAN_1970;
+ TVTOTS(&ppsev.tv,&up->tstamp);
+ }
+ /* record the last ppsclock event time stamp */
+ pp->lastrec = up->tstamp;
+#endif /* PPS */
+ if (!refclock_process(pp)) {
+ refclock_report(peer, CEVNT_BADTIME);
+ return;
+ }
+
+ /*
+ * Good place for record_clock_stats()
+ */
+ up->pollcnt = 2;
+
+ if (up->polled) {
+ up->polled = 0;
+ refclock_receive(peer);
+ }
+}
+
+
+/*
+ * zyfer_poll - called by the transmit procedure
+ */
+static void
+zyfer_poll(
+ int unit,
+ struct peer *peer
+ )
+{
+ register struct zyferunit *up;
+ struct refclockproc *pp;
+
+ /*
+ * We don't really do anything here, except arm the receiving
+ * side to capture a sample and check for timeouts.
+ */
+ pp = peer->procptr;
+ up = (struct zyferunit *)pp->unitptr;
+ if (!up->pollcnt)
+ refclock_report(peer, CEVNT_TIMEOUT);
+ else
+ up->pollcnt--;
+ pp->polls++;
+ up->polled = 1;
+}
+
+#else
+int refclock_zyfer_bs;
+#endif /* REFCLOCK */
OpenPOWER on IntegriCloud