diff options
author | roberto <roberto@FreeBSD.org> | 2009-12-15 14:58:10 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2009-12-15 14:58:10 +0000 |
commit | 230e76b5380d386df4ba9fee065378a39a10e8b5 (patch) | |
tree | 2928c8428ba1c1401c7dcd5d3c3c610fbb90b794 /contrib/ntp/ntpd | |
parent | 2bc44b96096e82af8f7720c1883039f28c130aa0 (diff) | |
parent | ecc42837d301a8d8e257020b30492277ad558d30 (diff) | |
download | FreeBSD-src-230e76b5380d386df4ba9fee065378a39a10e8b5.zip FreeBSD-src-230e76b5380d386df4ba9fee065378a39a10e8b5.tar.gz |
Merge 4.2.4p8 into contrib (r200452 & r200454).
Subversion is being difficult here so take a hammer and get it in.
MFC after: 2 weeks
Security: CVE-2009-3563
Diffstat (limited to 'contrib/ntp/ntpd')
-rw-r--r-- | contrib/ntp/ntpd/Makefile.in | 460 | ||||
-rw-r--r-- | contrib/ntp/ntpd/cmd_args.c | 58 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntp_crypto.c | 4 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntp_intres.c | 193 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntp_io.c | 240 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntp_request.c | 35 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntp_timer.c | 8 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntpd-opts.c | 16 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntpd-opts.h | 10 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntpd-opts.texi | 19 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntpd.1 | 6 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntpd.c | 39 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntpdsim-opts.c | 16 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntpdsim-opts.h | 10 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntpdsim-opts.texi | 63 | ||||
-rw-r--r-- | contrib/ntp/ntpd/ntpdsim.1 | 6 | ||||
-rw-r--r-- | contrib/ntp/ntpd/refclock_dumbclock.c | 11 | ||||
-rw-r--r-- | contrib/ntp/ntpd/refclock_hopfser.c | 11 | ||||
-rw-r--r-- | contrib/ntp/ntpd/refclock_jjy.c | 156 | ||||
-rw-r--r-- | contrib/ntp/ntpd/refclock_nmea.c | 11 | ||||
-rw-r--r-- | contrib/ntp/ntpd/refclock_palisade.c | 11 |
21 files changed, 906 insertions, 477 deletions
diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in index ad07930..f92b31f 100644 --- a/contrib/ntp/ntpd/Makefile.in +++ b/contrib/ntp/ntpd/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -19,15 +20,12 @@ # subdir to warn folks if there is another version there. -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -43,7 +41,6 @@ build_triplet = @build@ host_triplet = @host@ ANSI2KNR = ../util/ansi2knr bin_PROGRAMS = ntpd$(EXEEXT) @MAKE_NTPDSIM@ -check_PROGRAMS = @MAKE_CHECK_Y2K@ EXTRA_PROGRAMS = check_y2k$(EXEEXT) ntpdsim$(EXEEXT) DIST_COMMON = $(srcdir)/../bincheck.mf $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -59,6 +56,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libntpd_a_AR = $(AR) $(ARFLAGS) @@ -91,7 +89,6 @@ am_libntpd_a_OBJECTS = ntp_control$U.$(OBJEXT) ntp_crypto$U.$(OBJEXT) \ refclock_wwvb$U.$(OBJEXT) refclock_zyfer$U.$(OBJEXT) libntpd_a_OBJECTS = $(am_libntpd_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) check_y2k_SOURCES = check_y2k.c check_y2k_OBJECTS = check_y2k$U.$(OBJEXT) @@ -111,21 +108,47 @@ am_ntpdsim_OBJECTS = $(am__objects_1) ntpdsim-ntpsim$U.$(OBJEXT) \ ntpdsim_OBJECTS = $(am_ntpdsim_OBJECTS) ntpdsim_DEPENDENCIES = $(am__DEPENDENCIES_1) ../libntp/libntpsim.a \ $(am__DEPENDENCIES_2) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +ntpdsim_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(ntpdsim_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(libntpd_a_SOURCES) check_y2k.c $(ntpd_SOURCES) \ $(ntpdsim_SOURCES) DIST_SOURCES = $(libntpd_a_SOURCES) check_y2k.c $(ntpd_SOURCES) \ $(ntpdsim_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) @@ -133,8 +156,6 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARLIB_DIR = @ARLIB_DIR@ @@ -150,10 +171,6 @@ CHUTEST = @CHUTEST@ CLKTEST = @CLKTEST@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DCFD = @DCFD@ DEFS = @DEFS@ @@ -166,11 +183,10 @@ EF_LIBS = @EF_LIBS@ EF_PROGS = @EF_PROGS@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +GREP = @GREP@ +HAVE_INLINE = @HAVE_INLINE@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ -INSTALL_LIBOPTS_FALSE = @INSTALL_LIBOPTS_FALSE@ -INSTALL_LIBOPTS_TRUE = @INSTALL_LIBOPTS_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ @@ -184,6 +200,7 @@ LIBPARSE = @LIBPARSE@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ +LSCF = @LSCF@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAKE_ADJTIMED = @MAKE_ADJTIMED@ @@ -197,8 +214,7 @@ MAKE_NTPTIME = @MAKE_NTPTIME@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@ MAKE_TICKADJ = @MAKE_TICKADJ@ MAKE_TIMETRIM = @MAKE_TIMETRIM@ -NEED_LIBOPTS_FALSE = @NEED_LIBOPTS_FALSE@ -NEED_LIBOPTS_TRUE = @NEED_LIBOPTS_TRUE@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OPENSSL = @OPENSSL@ OPENSSL_INC = @OPENSSL_INC@ @@ -208,6 +224,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_PERL = @PATH_PERL@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -221,16 +238,11 @@ STRIP = @STRIP@ TESTDCF = @TESTDCF@ U = @U@ VERSION = @VERSION@ -ac_ct_AR = @ac_ct_AR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -242,29 +254,41 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = ../util/ansi2knr noinst_LIBRARIES = libntpd.a AM_CPPFLAGS = -I$(top_srcdir)/include -I../include $(LIBOPTS_CFLAGS) @@ -291,6 +315,8 @@ EXTRA_DIST = ntpd-opts.def ntpdbase-opts.def ntpdsim-opts.def \ $(BUILT_SOURCES) ETAGS_ARGS = Makefile.am +### Y2Kfixes +check_PROGRAMS = @MAKE_CHECK_Y2K@ run_ag = cd $(srcdir) && autogen -L ../include --writable std_def_list = $(top_srcdir)/include/debug-opt.def \ $(top_srcdir)/include/autogen-version.def \ @@ -331,14 +357,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../bincheck.mf $(am__con @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ntpd/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign ntpd/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ntpd/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign ntpd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -356,6 +382,7 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) @@ -365,48 +392,65 @@ libntpd.a: $(libntpd_a_OBJECTS) $(libntpd_a_DEPENDENCIES) $(RANLIB) libntpd.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list 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) + $(LINK) $(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) + $(LINK) $(ntpd_OBJECTS) $(ntpd_LDADD) $(LIBS) ntpdsim$(EXEEXT): $(ntpdsim_OBJECTS) $(ntpdsim_DEPENDENCIES) @rm -f ntpdsim$(EXEEXT) - $(LINK) $(ntpdsim_LDFLAGS) $(ntpdsim_OBJECTS) $(ntpdsim_LDADD) $(LIBS) + $(ntpdsim_LINK) $(ntpdsim_OBJECTS) $(ntpdsim_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -414,7 +458,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c ../util/ansi2knr: - cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr + $(am__cd) ../util && $(MAKE) $(AM_MAKEFLAGS) ./ansi2knr mostlyclean-kr: -test "$U" = "" || rm -f *_.c @@ -486,120 +530,120 @@ mostlyclean-kr: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_zyfer$U.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< ntpdsim-cmd_args$U.o: cmd_args$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-cmd_args$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo" -c -o ntpdsim-cmd_args$U.o `test -f 'cmd_args$U.c' || echo '$(srcdir)/'`cmd_args$U.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo" "$(DEPDIR)/ntpdsim-cmd_args$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-cmd_args$U.o -MD -MP -MF $(DEPDIR)/ntpdsim-cmd_args$U.Tpo -c -o ntpdsim-cmd_args$U.o `test -f 'cmd_args$U.c' || echo '$(srcdir)/'`cmd_args$U.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-cmd_args$U.Tpo $(DEPDIR)/ntpdsim-cmd_args$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmd_args$U.c' object='ntpdsim-cmd_args$U.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-cmd_args$U.o `test -f 'cmd_args$U.c' || echo '$(srcdir)/'`cmd_args$U.c ntpdsim-cmd_args$U.obj: cmd_args$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-cmd_args$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo" -c -o ntpdsim-cmd_args$U.obj `if test -f 'cmd_args$U.c'; then $(CYGPATH_W) 'cmd_args$U.c'; else $(CYGPATH_W) '$(srcdir)/cmd_args$U.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo" "$(DEPDIR)/ntpdsim-cmd_args$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-cmd_args$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-cmd_args$U.obj -MD -MP -MF $(DEPDIR)/ntpdsim-cmd_args$U.Tpo -c -o ntpdsim-cmd_args$U.obj `if test -f 'cmd_args$U.c'; then $(CYGPATH_W) 'cmd_args$U.c'; else $(CYGPATH_W) '$(srcdir)/cmd_args$U.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-cmd_args$U.Tpo $(DEPDIR)/ntpdsim-cmd_args$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmd_args$U.c' object='ntpdsim-cmd_args$U.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-cmd_args$U.obj `if test -f 'cmd_args$U.c'; then $(CYGPATH_W) 'cmd_args$U.c'; else $(CYGPATH_W) '$(srcdir)/cmd_args$U.c'; fi` ntpdsim-ntp_config$U.o: ntp_config$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo" -c -o ntpdsim-ntp_config$U.o `test -f 'ntp_config$U.c' || echo '$(srcdir)/'`ntp_config$U.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo" "$(DEPDIR)/ntpdsim-ntp_config$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config$U.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_config$U.Tpo -c -o ntpdsim-ntp_config$U.o `test -f 'ntp_config$U.c' || echo '$(srcdir)/'`ntp_config$U.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_config$U.Tpo $(DEPDIR)/ntpdsim-ntp_config$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_config$U.c' object='ntpdsim-ntp_config$U.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_config$U.o `test -f 'ntp_config$U.c' || echo '$(srcdir)/'`ntp_config$U.c ntpdsim-ntp_config$U.obj: ntp_config$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo" -c -o ntpdsim-ntp_config$U.obj `if test -f 'ntp_config$U.c'; then $(CYGPATH_W) 'ntp_config$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_config$U.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo" "$(DEPDIR)/ntpdsim-ntp_config$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntp_config$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config$U.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_config$U.Tpo -c -o ntpdsim-ntp_config$U.obj `if test -f 'ntp_config$U.c'; then $(CYGPATH_W) 'ntp_config$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_config$U.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_config$U.Tpo $(DEPDIR)/ntpdsim-ntp_config$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_config$U.c' object='ntpdsim-ntp_config$U.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_config$U.obj `if test -f 'ntp_config$U.c'; then $(CYGPATH_W) 'ntp_config$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_config$U.c'; fi` ntpdsim-ntp_io$U.o: ntp_io$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo" -c -o ntpdsim-ntp_io$U.o `test -f 'ntp_io$U.c' || echo '$(srcdir)/'`ntp_io$U.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo" "$(DEPDIR)/ntpdsim-ntp_io$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io$U.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_io$U.Tpo -c -o ntpdsim-ntp_io$U.o `test -f 'ntp_io$U.c' || echo '$(srcdir)/'`ntp_io$U.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_io$U.Tpo $(DEPDIR)/ntpdsim-ntp_io$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_io$U.c' object='ntpdsim-ntp_io$U.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_io$U.o `test -f 'ntp_io$U.c' || echo '$(srcdir)/'`ntp_io$U.c ntpdsim-ntp_io$U.obj: ntp_io$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo" -c -o ntpdsim-ntp_io$U.obj `if test -f 'ntp_io$U.c'; then $(CYGPATH_W) 'ntp_io$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_io$U.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo" "$(DEPDIR)/ntpdsim-ntp_io$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntp_io$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io$U.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_io$U.Tpo -c -o ntpdsim-ntp_io$U.obj `if test -f 'ntp_io$U.c'; then $(CYGPATH_W) 'ntp_io$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_io$U.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_io$U.Tpo $(DEPDIR)/ntpdsim-ntp_io$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_io$U.c' object='ntpdsim-ntp_io$U.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_io$U.obj `if test -f 'ntp_io$U.c'; then $(CYGPATH_W) 'ntp_io$U.c'; else $(CYGPATH_W) '$(srcdir)/ntp_io$U.c'; fi` ntpdsim-ntpd$U.o: ntpd$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpd$U.Tpo" -c -o ntpdsim-ntpd$U.o `test -f 'ntpd$U.c' || echo '$(srcdir)/'`ntpd$U.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpd$U.Tpo" "$(DEPDIR)/ntpdsim-ntpd$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntpd$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd$U.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd$U.Tpo -c -o ntpdsim-ntpd$U.o `test -f 'ntpd$U.c' || echo '$(srcdir)/'`ntpd$U.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpd$U.Tpo $(DEPDIR)/ntpdsim-ntpd$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd$U.c' object='ntpdsim-ntpd$U.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd$U.o `test -f 'ntpd$U.c' || echo '$(srcdir)/'`ntpd$U.c ntpdsim-ntpd$U.obj: ntpd$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpd$U.Tpo" -c -o ntpdsim-ntpd$U.obj `if test -f 'ntpd$U.c'; then $(CYGPATH_W) 'ntpd$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpd$U.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpd$U.Tpo" "$(DEPDIR)/ntpdsim-ntpd$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntpd$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd$U.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd$U.Tpo -c -o ntpdsim-ntpd$U.obj `if test -f 'ntpd$U.c'; then $(CYGPATH_W) 'ntpd$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpd$U.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpd$U.Tpo $(DEPDIR)/ntpdsim-ntpd$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd$U.c' object='ntpdsim-ntpd$U.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd$U.obj `if test -f 'ntpd$U.c'; then $(CYGPATH_W) 'ntpd$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpd$U.c'; fi` ntpdsim-ntpd-opts$U.o: ntpd-opts$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd-opts$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo" -c -o ntpdsim-ntpd-opts$U.o `test -f 'ntpd-opts$U.c' || echo '$(srcdir)/'`ntpd-opts$U.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo" "$(DEPDIR)/ntpdsim-ntpd-opts$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd-opts$U.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo -c -o ntpdsim-ntpd-opts$U.o `test -f 'ntpd-opts$U.c' || echo '$(srcdir)/'`ntpd-opts$U.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo $(DEPDIR)/ntpdsim-ntpd-opts$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd-opts$U.c' object='ntpdsim-ntpd-opts$U.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd-opts$U.o `test -f 'ntpd-opts$U.c' || echo '$(srcdir)/'`ntpd-opts$U.c ntpdsim-ntpd-opts$U.obj: ntpd-opts$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd-opts$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo" -c -o ntpdsim-ntpd-opts$U.obj `if test -f 'ntpd-opts$U.c'; then $(CYGPATH_W) 'ntpd-opts$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpd-opts$U.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo" "$(DEPDIR)/ntpdsim-ntpd-opts$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd-opts$U.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo -c -o ntpdsim-ntpd-opts$U.obj `if test -f 'ntpd-opts$U.c'; then $(CYGPATH_W) 'ntpd-opts$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpd-opts$U.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpd-opts$U.Tpo $(DEPDIR)/ntpdsim-ntpd-opts$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd-opts$U.c' object='ntpdsim-ntpd-opts$U.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd-opts$U.obj `if test -f 'ntpd-opts$U.c'; then $(CYGPATH_W) 'ntpd-opts$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpd-opts$U.c'; fi` ntpdsim-ntpsim$U.o: ntpsim$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo" -c -o ntpdsim-ntpsim$U.o `test -f 'ntpsim$U.c' || echo '$(srcdir)/'`ntpsim$U.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo" "$(DEPDIR)/ntpdsim-ntpsim$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim$U.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpsim$U.Tpo -c -o ntpdsim-ntpsim$U.o `test -f 'ntpsim$U.c' || echo '$(srcdir)/'`ntpsim$U.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpsim$U.Tpo $(DEPDIR)/ntpdsim-ntpsim$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpsim$U.c' object='ntpdsim-ntpsim$U.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim$U.o `test -f 'ntpsim$U.c' || echo '$(srcdir)/'`ntpsim$U.c ntpdsim-ntpsim$U.obj: ntpsim$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo" -c -o ntpdsim-ntpsim$U.obj `if test -f 'ntpsim$U.c'; then $(CYGPATH_W) 'ntpsim$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim$U.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo" "$(DEPDIR)/ntpdsim-ntpsim$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntpsim$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim$U.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpsim$U.Tpo -c -o ntpdsim-ntpsim$U.obj `if test -f 'ntpsim$U.c'; then $(CYGPATH_W) 'ntpsim$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim$U.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpsim$U.Tpo $(DEPDIR)/ntpdsim-ntpsim$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpsim$U.c' object='ntpdsim-ntpsim$U.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim$U.obj `if test -f 'ntpsim$U.c'; then $(CYGPATH_W) 'ntpsim$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim$U.c'; fi` ntpdsim-ntpdsim-opts$U.o: ntpdsim-opts$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpdsim-opts$U.o -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo" -c -o ntpdsim-ntpdsim-opts$U.o `test -f 'ntpdsim-opts$U.c' || echo '$(srcdir)/'`ntpdsim-opts$U.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo" "$(DEPDIR)/ntpdsim-ntpdsim-opts$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpdsim-opts$U.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo -c -o ntpdsim-ntpdsim-opts$U.o `test -f 'ntpdsim-opts$U.c' || echo '$(srcdir)/'`ntpdsim-opts$U.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo $(DEPDIR)/ntpdsim-ntpdsim-opts$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpdsim-opts$U.c' object='ntpdsim-ntpdsim-opts$U.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpdsim-opts$U.o `test -f 'ntpdsim-opts$U.c' || echo '$(srcdir)/'`ntpdsim-opts$U.c ntpdsim-ntpdsim-opts$U.obj: ntpdsim-opts$U.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpdsim-opts$U.obj -MD -MP -MF "$(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo" -c -o ntpdsim-ntpdsim-opts$U.obj `if test -f 'ntpdsim-opts$U.c'; then $(CYGPATH_W) 'ntpdsim-opts$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpdsim-opts$U.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo" "$(DEPDIR)/ntpdsim-ntpdsim-opts$U.Po"; else rm -f "$(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpdsim-opts$U.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo -c -o ntpdsim-ntpdsim-opts$U.obj `if test -f 'ntpdsim-opts$U.c'; then $(CYGPATH_W) 'ntpdsim-opts$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpdsim-opts$U.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpdsim-opts$U.Tpo $(DEPDIR)/ntpdsim-ntpdsim-opts$U.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpdsim-opts$U.c' object='ntpdsim-ntpdsim-opts$U.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpdsim-opts$U.obj `if test -f 'ntpdsim-opts$U.c'; then $(CYGPATH_W) 'ntpdsim-opts$U.c'; else $(CYGPATH_W) '$(srcdir)/ntpdsim-opts$U.c'; fi` @@ -772,129 +816,137 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-man1: $(man1_MANS) $(man_MANS) +install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list=''; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + uninstall-man1: @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -906,7 +958,7 @@ check: $(BUILT_SOURCES) all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am @@ -929,6 +981,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -944,7 +997,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -952,20 +1005,39 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-man +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-am + +install-html-am: install-info: install-info-am +install-info-am: + install-man: install-man1 +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -986,24 +1058,29 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man +uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 +.MAKE: ../util/ansi2knr all check check-am install install-am \ + install-exec-am install-strip + .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ clean-libtool clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ - install-data-am install-exec install-exec-am install-exec-hook \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-man1 \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-kr \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-info-am \ - uninstall-man uninstall-man1 + uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 check-local: @MAKE_CHECK_Y2K@ @@ -1058,6 +1135,7 @@ install-exec-hook: done # + # 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/cmd_args.c b/contrib/ntp/ntpd/cmd_args.c index 760bced..7843bc3 100644 --- a/contrib/ntp/ntpd/cmd_args.c +++ b/contrib/ntp/ntpd/cmd_args.c @@ -87,6 +87,16 @@ getCmdOpts( droproot = 1; chrootdir = OPT_ARG( JAILDIR ); #else + fprintf(stderr, + "command line -i option (jaildir) is not supported by this binary" +# ifndef SYS_WINNT + ",\n" "can not drop root privileges. See configure options\n" + "--enable-clockctl and --enable-linuxcaps.\n"); +# else + ".\n"); +# endif + msyslog(LOG_ERR, + "command line -i option (jaildir) is not supported by this binary."); errflg++; #endif } @@ -118,8 +128,8 @@ getCmdOpts( stats_config(STATS_STATSDIR, OPT_ARG( STATSDIR )); if (HAVE_OPT( TRUSTEDKEY )) { - int ct = STACKCT_OPT( TRUSTEDKEY ); - const char** pp = STACKLST_OPT( TRUSTEDKEY ); + int ct = STACKCT_OPT( TRUSTEDKEY ); + const char** pp = STACKLST_OPT( TRUSTEDKEY ); do { u_long tkey; @@ -141,23 +151,29 @@ getCmdOpts( char *ntp_optarg = OPT_ARG( USER ); droproot = 1; - user = malloc(strlen(ntp_optarg) + 1); - if (user == NULL) { - errflg++; - } else { - (void)strncpy(user, ntp_optarg, strlen(ntp_optarg) + 1); - group = rindex(user, ':'); - if (group) - *group++ = '\0'; /* get rid of the ':' */ - } + user = emalloc(strlen(ntp_optarg) + 1); + (void)strncpy(user, ntp_optarg, strlen(ntp_optarg) + 1); + group = rindex(user, ':'); + if (group) + *group++ = '\0'; /* get rid of the ':' */ #else + fprintf(stderr, + "command line -u/--user option is not supported by this binary" +# ifndef SYS_WINNT + ",\n" "can not drop root privileges. See configure options\n" + "--enable-clockctl and --enable-linuxcaps.\n"); +# else + ".\n"); +# endif + msyslog(LOG_ERR, + "command line -u/--user option is not supported by this binary."); errflg++; #endif } if (HAVE_OPT( VAR )) { - int ct = STACKCT_OPT( VAR ); - const char** pp = STACKLST_OPT( VAR ); + int ct = STACKCT_OPT( VAR ); + const char** pp = STACKLST_OPT( VAR ); do { const char* my_ntp_optarg = *pp++; @@ -168,8 +184,8 @@ getCmdOpts( } if (HAVE_OPT( DVAR )) { - int ct = STACKCT_OPT( DVAR ); - const char** pp = STACKLST_OPT( DVAR ); + int ct = STACKCT_OPT( DVAR ); + const char** pp = STACKLST_OPT( DVAR ); do { const char* my_ntp_optarg = *pp++; @@ -188,9 +204,12 @@ getCmdOpts( if (val >= 0) interface_interval = val; else { - msyslog(LOG_ERR, - "command line interface update interval %ld must be greater or equal to 0", - val); + fprintf(stderr, + "command line interface update interval %ld must not be negative\n", + val); + msyslog(LOG_ERR, + "command line interface update interval %ld must not be negative", + val); errflg++; } } @@ -225,7 +244,8 @@ getCmdOpts( #endif /* SIM */ if (errflg || argc) { - printf("argc is <%d>\n", argc); + if (argc) + fprintf(stderr, "argc after processing is <%d>\n", argc); optionUsage(myOptions, 2); } return; diff --git a/contrib/ntp/ntpd/ntp_crypto.c b/contrib/ntp/ntpd/ntp_crypto.c index b3b9b60..cce95a8 100644 --- a/contrib/ntp/ntpd/ntp_crypto.c +++ b/contrib/ntp/ntpd/ntp_crypto.c @@ -3618,7 +3618,7 @@ crypto_key( if (debug) printf("crypto_key: %s\n", statstr); if (debug > 1) { - if (EVP_MD_type(pkey) == EVP_PKEY_DSA) + if (pkey->type == EVP_PKEY_DSA) DSA_print_fp(stdout, pkey->pkey.dsa, 0); else RSA_print_fp(stdout, pkey->pkey.rsa, 0); @@ -3946,7 +3946,7 @@ crypto_setup(void) sign_pkey = pkey; sstamp = fstamp; hostval.fstamp = htonl(fstamp); - if (EVP_MD_type(host_pkey) != EVP_PKEY_RSA) { + if (host_pkey->type != EVP_PKEY_RSA) { msyslog(LOG_ERR, "crypto_setup: host key is not RSA key type"); exit (-1); diff --git a/contrib/ntp/ntpd/ntp_intres.c b/contrib/ntp/ntpd/ntp_intres.c index 2a4b51f..5facc85 100644 --- a/contrib/ntp/ntpd/ntp_intres.c +++ b/contrib/ntp/ntpd/ntp_intres.c @@ -15,11 +15,6 @@ * might go about autoconfiguring an NTP distribution network. * */ - /* - * For special situations define the FORCE_DNSRETRY Macro - * to force retries even if it fails the lookup. - * Use with extreme caution since it will then retry forever. - */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -463,8 +458,10 @@ findhostaddr( struct conf_entry *entry ) { + static int eai_again_seen = 0; struct addrinfo *addr; struct addrinfo hints; + int again; int error; checkparent(); /* make sure our guy is still running */ @@ -475,17 +472,14 @@ findhostaddr( return 1; } - if (entry->ce_name == NULL && SOCKNUL(&entry->peer_store)) { + if (entry->ce_name == NULL && SOCKNUL(&entry->peer_store)) { msyslog(LOG_ERR, "findhostaddr: both ce_name and ce_peeraddr are undefined!"); return 0; } if (entry->ce_name) { -#ifdef DEBUG - if (debug > 2) - msyslog(LOG_INFO, "findhostaddr: Resolving <%s>", - entry->ce_name); -#endif /* DEBUG */ + DPRINTF(2, ("findhostaddr: Resolving <%s>\n", + entry->ce_name)); memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; @@ -508,68 +502,72 @@ findhostaddr( entry->ce_config.v6_flag = 1; } } - else if (error == EAI_NONAME) - { - msyslog(LOG_ERR, "host name not found: %s", entry->ce_name); - } } else { -#ifdef DEBUG - if (debug > 2) - msyslog(LOG_INFO, "findhostaddr: Resolving %s>", - stoa(&entry->peer_store)); -#endif + DPRINTF(2, ("findhostaddr: Resolving <%s>\n", + stoa(&entry->peer_store))); + entry->ce_name = emalloc(MAXHOSTNAMELEN); error = getnameinfo((const struct sockaddr *)&entry->peer_store, SOCKLEN(&entry->peer_store), (char *)&entry->ce_name, MAXHOSTNAMELEN, NULL, 0, 0); } -#ifdef DEBUG - if (debug > 2) - printf("intres: got error status of: %d\n", error); -#endif - /* - * If the resolver failed, see if the failure is - * temporary. If so, return success. - */ - if (error != 0) { - switch (error) - { + if (0 == error) { + + /* again is our return value, for success it is 1 */ + again = 1; + + DPRINTF(2, ("findhostaddr: %s resolved.\n", + (entry->ce_name) ? "name" : "address")); + } else { + /* + * If the resolver failed, see if the failure is + * temporary. If so, return success. + */ + again = 0; + + switch (error) { + + case EAI_FAIL: + again = 1; + break; + case EAI_AGAIN: - return (1); + again = 1; + eai_again_seen = 1; + break; + case EAI_NONAME: -#ifndef FORCE_DNSRETRY - return (0); -#else - return (1); -#endif #if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) case EAI_NODATA: #endif - case EAI_FAIL: + msyslog(LOG_ERR, "host name not found%s%s: %s", + (EAI_NONAME == error) ? "" : " EAI_NODATA", + (eai_again_seen) ? " (permanent)" : "", + entry->ce_name); + again = !eai_again_seen; + break; + #ifdef EAI_SYSTEM case EAI_SYSTEM: - return (1); + /* + * EAI_SYSTEM means the real error is in errno. We should be more + * discriminating about which errno values require retrying, but + * this matches existing behavior. + */ + again = 1; + DPRINTF(1, ("intres: EAI_SYSTEM errno %d (%s) means try again, right?\n", + errno, strerror(errno))); + break; #endif - default: - return (0); } - } - - if (entry->ce_name) { -#ifdef DEBUG - if (debug > 2) - msyslog(LOG_INFO, "findhostaddr: name resolved."); -#endif -#ifdef DEBUG - if (debug > 2) - msyslog(LOG_INFO, "findhostaddr: address resolved."); -#endif + /* do this here to avoid perturbing errno earlier */ + DPRINTF(2, ("intres: got error status of: %d\n", error)); } - - return (1); + + return again; } @@ -579,12 +577,14 @@ findhostaddr( static void openntp(void) { - struct addrinfo hints; - struct addrinfo *addrResult; - const char *localhost = "127.0.0.1"; /* Use IPv6 loopback */ + const char *localhost = "127.0.0.1"; /* Use IPv4 loopback */ + struct addrinfo hints; + struct addrinfo *addr; + u_long on; + int err; if (sockfd != INVALID_SOCKET) - return; + return; memset(&hints, 0, sizeof(hints)); @@ -592,52 +592,81 @@ openntp(void) * For now only bother with IPv4 */ hints.ai_family = AF_INET; - hints.ai_socktype = SOCK_DGRAM; - if (getaddrinfo(localhost, "ntp", &hints, &addrResult)!=0) { - msyslog(LOG_ERR, "getaddrinfo failed: %m"); + + err = getaddrinfo(localhost, "ntp", &hints, &addr); + + if (err) { +#ifdef EAI_SYSTEM + if (EAI_SYSTEM == err) + msyslog(LOG_ERR, "getaddrinfo(%s) failed: %m", + localhost); + else +#endif + msyslog(LOG_ERR, "getaddrinfo(%s) failed: %s", + localhost, gai_strerror(err)); resolver_exit(1); } - sockfd = socket(addrResult->ai_family, addrResult->ai_socktype, 0); - if (sockfd == -1) { + sockfd = socket(addr->ai_family, addr->ai_socktype, 0); + + if (INVALID_SOCKET == sockfd) { msyslog(LOG_ERR, "socket() failed: %m"); resolver_exit(1); } +#ifndef SYS_WINNT + /* + * On Windows only the count of sockets must be less than + * FD_SETSIZE. On Unix each descriptor's value must be less + * than FD_SETSIZE, as fd_set is a bit array. + */ + if (sockfd >= FD_SETSIZE) { + msyslog(LOG_ERR, "socket fd %d too large, FD_SETSIZE %d", + (int)sockfd, FD_SETSIZE); + resolver_exit(1); + } + /* * Make the socket non-blocking. We'll wait with select() + * Unix: fcntl(O_NONBLOCK) or fcntl(FNDELAY) */ -#ifndef SYS_WINNT -#if defined(O_NONBLOCK) +# ifdef O_NONBLOCK if (fcntl(sockfd, F_SETFL, O_NONBLOCK) == -1) { msyslog(LOG_ERR, "fcntl(O_NONBLOCK) failed: %m"); resolver_exit(1); } -#else -#if defined(FNDELAY) +# else +# ifdef FNDELAY if (fcntl(sockfd, F_SETFL, FNDELAY) == -1) { msyslog(LOG_ERR, "fcntl(FNDELAY) failed: %m"); resolver_exit(1); } -#else -# include "Bletch: NEED NON BLOCKING IO" -#endif /* FNDDELAY */ -#endif /* O_NONBLOCK */ -#else /* SYS_WINNT */ - { - int on = 1; - if (ioctlsocket(sockfd,FIONBIO,(u_long *) &on) == SOCKET_ERROR) { - msyslog(LOG_ERR, "ioctlsocket(FIONBIO) fails: %m"); - resolver_exit(1); /* Windows NT - set socket in non-blocking mode */ - } +# else +# include "Bletch: NEED NON BLOCKING IO" +# endif /* FNDDELAY */ +# endif /* O_NONBLOCK */ + (void)on; /* quiet unused warning */ +#else /* !SYS_WINNT above */ + /* + * Make the socket non-blocking. We'll wait with select() + * Windows: ioctlsocket(FIONBIO) + */ + on = 1; + err = ioctlsocket(sockfd, FIONBIO, &on); + if (SOCKET_ERROR == err) { + msyslog(LOG_ERR, "ioctlsocket(FIONBIO) fails: %m"); + resolver_exit(1); } #endif /* SYS_WINNT */ - if (connect(sockfd, addrResult->ai_addr, addrResult->ai_addrlen) == -1) { + + err = connect(sockfd, addr->ai_addr, addr->ai_addrlen); + if (SOCKET_ERROR == err) { msyslog(LOG_ERR, "openntp: connect() failed: %m"); resolver_exit(1); } - freeaddrinfo(addrResult); + + freeaddrinfo(addr); } @@ -664,7 +693,7 @@ request( checkparent(); /* make sure our guy is still running */ if (sockfd == INVALID_SOCKET) - openntp(); + openntp(); #ifdef SYS_WINNT hReadWriteEvent = CreateEvent(NULL, FALSE, FALSE, NULL); @@ -1110,6 +1139,7 @@ doconfigure( #endif if (dores && SOCKNUL(&(ce->peer_store))) { if (!findhostaddr(ce)) { +#ifndef IGNORE_DNS_ERRORS msyslog(LOG_ERR, "couldn't resolve `%s', giving up on it", ce->ce_name); @@ -1117,6 +1147,7 @@ doconfigure( ce = ceremove->ce_next; removeentry(ceremove); continue; +#endif } } diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c index d3e909d..71ee15f 100644 --- a/contrib/ntp/ntpd/ntp_io.c +++ b/contrib/ntp/ntpd/ntp_io.c @@ -100,7 +100,12 @@ extern const char *specific_interface; #define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12) #endif -#endif +/* + * Windows C runtime ioctl() can't deal properly with sockets, + * map to ioctlsocket for this source file. + */ +#define ioctl(fd, opt, val) ioctlsocket((fd), (opt), (u_long *)(val)) +#endif /* SYS_WINNT */ /* * We do asynchronous input using the SIGIO facility. A number of @@ -200,7 +205,7 @@ static isc_boolean_t socket_multicast_disable P((struct interface *, struct sock static void print_interface P((struct interface *, char *, char *)); #define DPRINT_INTERFACE(_LVL_, _ARGS_) do { if (debug >= (_LVL_)) { print_interface _ARGS_; } } while (0) #else -#define DPRINT_INTERFACE(_LVL_, _ARGS_) +#define DPRINT_INTERFACE(_LVL_, _ARGS_) do {} while (0) #endif typedef struct vsock vsock_t; @@ -295,23 +300,29 @@ static inline int read_refclock_packet P((SOCKET, struct refclockio *, l_fp) * systems are not affected by this and work correctly. * See Microsoft Knowledge Base Article Q263823 for details of this. */ -isc_result_t -connection_reset_fix(SOCKET fd) { +void +connection_reset_fix( + SOCKET fd, + struct sockaddr_storage *addr + ) +{ DWORD dwBytesReturned = 0; BOOL bNewBehavior = FALSE; DWORD status; - if(isc_win32os_majorversion() < 5) - return (ISC_R_SUCCESS); /* NT 4.0 has no problem */ - - /* disable bad behavior using IOCTL: SIO_UDP_CONNRESET */ - status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior, - sizeof(bNewBehavior), NULL, 0, - &dwBytesReturned, NULL, NULL); - if (status != SOCKET_ERROR) - return (ISC_R_SUCCESS); - else - return (ISC_R_UNEXPECTED); + /* + * disable bad behavior using IOCTL: SIO_UDP_CONNRESET + * NT 4.0 has no problem + */ + if (isc_win32os_majorversion() >= 5) { + status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior, + sizeof(bNewBehavior), NULL, 0, + &dwBytesReturned, NULL, NULL); + if (SOCKET_ERROR == status) + netsyslog(LOG_ERR, "connection_reset_fix() " + "failed for address %s: %m", + stoa(addr)); + } } #endif @@ -483,6 +494,8 @@ void init_io(void) { #ifdef SYS_WINNT + init_io_completion_port(); + if (!Win32InitSockets()) { netsyslog(LOG_ERR, "No useable winsock.dll: %m"); @@ -754,6 +767,24 @@ delete_interface(struct interface *interface) static void add_interface(struct interface *interface) { + static struct interface *listhead = NULL; + + /* + * For ntpd, the first few interfaces (wildcard, localhost) + * will never be removed. This means inter_list.head is + * unchanging once initialized. Take advantage of that to + * watch for changes and catch corruption earlier. This + * helped track down corruption caused by using FD_SET with + * a descriptor numerically larger than FD_SETSIZE. + */ + if (NULL == listhead) + listhead = inter_list.head; + + if (listhead != inter_list.head) { + msyslog(LOG_ERR, "add_interface inter_list.head corrupted: was %p now %p", + listhead, inter_list.head); + exit(1); + } /* * Calculate the address hash */ @@ -1220,7 +1251,7 @@ update_interfaces( scan_ipv6 = ISC_TRUE; #if defined(DEBUG) else - if(debug) + if (debug) netsyslog(LOG_ERR, "no IPv6 interfaces found"); #endif #endif @@ -1228,7 +1259,7 @@ update_interfaces( scan_ipv6 = ISC_TRUE; #if defined(ISC_PLATFORM_HAVEIPV6) && defined(DEBUG) else - if(debug) + if (debug) netsyslog(LOG_ERR, "no IPv6 interfaces found"); #endif @@ -1542,6 +1573,24 @@ create_interface( return interface; } + +#ifdef SO_EXCLUSIVEADDRUSE +static void +set_excladdruse(int fd) +{ + int one = 1; + int failed; + + failed = setsockopt(fd, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, + (char *)&one, sizeof(one)); + + if (failed) + netsyslog(LOG_ERR, + "setsockopt(%d, SO_EXCLUSIVEADDRUSE, on): %m", fd); +} +#endif /* SO_EXCLUSIVEADDRUSE */ + + /* * set_reuseaddr() - set/clear REUSEADDR on all sockets * NB possible hole - should we be doing this on broadcast @@ -1549,13 +1598,16 @@ create_interface( */ static void set_reuseaddr(int flag) { - struct interface *interf; + struct interface *interf; + +#ifndef SO_EXCLUSIVEADDRUSE for (interf = ISC_LIST_HEAD(inter_list); interf != NULL; interf = ISC_LIST_NEXT(interf, link)) { - if (interf->flags & INT_WILDCARD) - continue; + + if (interf->flags & INT_WILDCARD) + continue; /* * if interf->fd is INVALID_SOCKET, we might have a adapter @@ -1571,6 +1623,7 @@ set_reuseaddr(int flag) { } } } +#endif /* ! SO_EXCLUSIVEADDRUSE */ } /* @@ -1732,7 +1785,7 @@ enable_multicast_if(struct interface *iface, struct sockaddr_storage *maddr) case AF_INET6: #ifdef INCLUDE_IPV6_MULTICAST_SUPPORT if (setsockopt(iface->fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, - &iface->scopeid, sizeof(iface->scopeid)) == -1) { + (char *) &iface->scopeid, sizeof(iface->scopeid)) == -1) { netsyslog(LOG_ERR, "setsockopt IPV6_MULTICAST_IF failure: %m on socket %d, addr %s, scope %d for multicast address %s", iface->fd, stoa(&iface->sin), iface->scopeid, @@ -1744,7 +1797,7 @@ enable_multicast_if(struct interface *iface, struct sockaddr_storage *maddr) * Don't send back to itself, but allow it to fail to set it */ if (setsockopt(iface->fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, - &off, sizeof(off)) == -1) { + (char *) &off, sizeof(off)) == -1) { netsyslog(LOG_ERR, "setsockopt IP_MULTICAST_LOOP failure: %m on socket %d, addr %s for multicast address %s", iface->fd, stoa(&iface->sin), stoa(maddr)); @@ -2022,7 +2075,10 @@ io_multicast_add( ) { #ifdef MCAST - struct interface *interface, *iface; + struct interface *interface; +#ifndef MULTICAST_NONEWSOCKET + struct interface *iface; +#endif int lscope = 0; /* @@ -2099,7 +2155,7 @@ io_multicast_add( } else { - delete_interface(interface); /* re-use existing interface */ + delete_interface(interface); /* re-use existing interface */ interface = NULL; if (addr.ss_family == AF_INET) interface = wildipv4; @@ -2268,12 +2324,7 @@ static void init_nonblocking_io(SOCKET fd) #elif defined(FIONBIO) { int on = 1; -# if defined(SYS_WINNT) - - if (ioctlsocket(fd,FIONBIO,(u_long *) &on) == SOCKET_ERROR) -# else if (ioctl(fd,FIONBIO,&on) < 0) -# endif { netsyslog(LOG_ERR, "ioctl(FIONBIO) fails on fd #%d: %m", fd); @@ -2308,8 +2359,13 @@ open_socket( { int errval; SOCKET fd; - int on = 1, off = 0; /* int is OK for REUSEADR per */ - /* http://www.kohala.com/start/mcast.api.txt */ + /* + * int is OK for REUSEADR per + * http://www.kohala.com/start/mcast.api.txt + */ + int on = 1; + int off = 0; + #if defined(IPTOS_LOWDELAY) && defined(IPPROTO_IP) && defined(IP_TOS) int tos; #endif /* IPTOS_LOWDELAY && IPPROTO_IP && IP_TOS */ @@ -2318,38 +2374,30 @@ open_socket( return (INVALID_SOCKET); /* create a datagram (UDP) socket */ + fd = socket(addr->ss_family, SOCK_DGRAM, 0); + if (INVALID_SOCKET == fd) { #ifndef SYS_WINNT - if ( (fd = socket(addr->ss_family, SOCK_DGRAM, 0)) < 0) { errval = errno; #else - if ( (fd = socket(addr->ss_family, SOCK_DGRAM, 0)) == INVALID_SOCKET) { errval = WSAGetLastError(); #endif - if(addr->ss_family == AF_INET) - netsyslog(LOG_ERR, "socket(AF_INET, SOCK_DGRAM, 0) failed on address %s: %m", - stoa(addr)); - else if(addr->ss_family == AF_INET6) - netsyslog(LOG_ERR, "socket(AF_INET6, SOCK_DGRAM, 0) failed on address %s: %m", - stoa(addr)); -#ifndef SYS_WINNT - if (errval == EPROTONOSUPPORT || errval == EAFNOSUPPORT || + netsyslog(LOG_ERR, + "socket(AF_INET%s, SOCK_DGRAM, 0) failed on address %s: %m", + (addr->ss_family == AF_INET6) ? "6" : "", + stoa(addr)); + + if (errval == EPROTONOSUPPORT || + errval == EAFNOSUPPORT || errval == EPFNOSUPPORT) -#else - if (errval == WSAEPROTONOSUPPORT || errval == WSAEAFNOSUPPORT || - errval == WSAEPFNOSUPPORT) -#endif return (INVALID_SOCKET); msyslog(LOG_ERR, "unexpected error code %d (not PROTONOSUPPORT|AFNOSUPPORT|FPNOSUPPORT) - exiting", errval); exit(1); /*NOTREACHED*/ } -#ifdef SYS_WINNT - if (connection_reset_fix(fd) != ISC_R_SUCCESS) { - netsyslog(LOG_ERR, "connection_reset_fix(fd) failed on address %s: %m", - stoa(addr)); - } -#endif /* SYS_WINNT */ +#ifdef SYS_WINNT + connection_reset_fix(fd, addr); +#endif /* * Fixup the file descriptor for some systems * See bug #530 for details of the issue. @@ -2358,18 +2406,36 @@ open_socket( /* * set SO_REUSEADDR since we will be binding the same port - * number on each interface according to flag + * number on each interface according to turn_off_reuse. + * This is undesirable on Windows versions starting with + * Windows XP (numeric version 5.1). */ - if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, - turn_off_reuse ? (char *)&off : (char *)&on, sizeof(on))) - { - netsyslog(LOG_ERR, "setsockopt SO_REUSEADDR %s on fails on address %s: %m", - turn_off_reuse ? "off" : "on", stoa(addr)); - - closesocket(fd); - - return INVALID_SOCKET; - } +#ifdef SYS_WINNT + if (isc_win32os_versioncheck(5, 1, 0, 0) < 0) /* before 5.1 */ +#endif + if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, + (char *)(turn_off_reuse + ? &off + : &on), + sizeof(on))) { + + netsyslog(LOG_ERR, "setsockopt SO_REUSEADDR %s" + " fails for address %s: %m", + turn_off_reuse + ? "off" + : "on", + stoa(addr)); + closesocket(fd); + return INVALID_SOCKET; + } +#ifdef SO_EXCLUSIVEADDRUSE + /* + * setting SO_EXCLUSIVEADDRUSE on the wildcard we open + * first will cause more specific binds to fail. + */ + if (!(interf->flags & INT_WILDCARD)) + set_excladdruse(fd); +#endif /* * IPv4 specific options go here @@ -2447,22 +2513,24 @@ open_socket( ) { if (addr->ss_family == AF_INET) netsyslog(LOG_ERR, - "bind() fd %d, family %d, port %d, addr %s, in_classd=%d flags=0x%x fails: %m", - fd, addr->ss_family, (int)ntohs(((struct sockaddr_in*)addr)->sin_port), + "bind() fd %d, family AF_INET, port %d, addr %s, in_classd=%d flags=0x%x fails: %m", + fd, (int)ntohs(((struct sockaddr_in*)addr)->sin_port), stoa(addr), - IN_CLASSD(ntohl(((struct sockaddr_in*)addr)->sin_addr.s_addr)), flags); + IN_CLASSD(ntohl(((struct sockaddr_in*)addr)->sin_addr.s_addr)), + flags); #ifdef INCLUDE_IPV6_SUPPORT else if (addr->ss_family == AF_INET6) - netsyslog(LOG_ERR, - "bind() fd %d, family %d, port %d, scope %d, addr %s, in6_is_addr_multicast=%d flags=0x%x fails: %m", - fd, addr->ss_family, (int)ntohs(((struct sockaddr_in6*)addr)->sin6_port), + netsyslog(LOG_ERR, + "bind() fd %d, family AF_INET6, port %d, scope %d, addr %s, mcast=%d flags=0x%x fails: %m", + fd, (int)ntohs(((struct sockaddr_in6*)addr)->sin6_port), # ifdef ISC_PLATFORM_HAVESCOPEID ((struct sockaddr_in6*)addr)->sin6_scope_id # else -1 # endif , stoa(addr), - IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6*)addr)->sin6_addr), flags); + IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6*)addr)->sin6_addr), + flags); #endif } @@ -2493,7 +2561,7 @@ open_socket( addr->ss_family, (int)ntohs(((struct sockaddr_in*)addr)->sin_port), stoa(addr), - flags)); + interf->flags)); init_nonblocking_io(fd); @@ -2537,9 +2605,6 @@ sendpkt( ) { int cc, slot; -#ifdef SYS_WINNT - DWORD err; -#endif /* SYS_WINNT */ /* * Send error caches. Empty slots have port == 0 @@ -2659,8 +2724,8 @@ sendpkt( #endif /* INCLUDE_IPV6_SUPPORT */ #if defined(HAVE_IO_COMPLETION_PORT) - err = io_completion_port_sendto(inter, pkt, len, dest); - if (err != ERROR_SUCCESS) + cc = io_completion_port_sendto(inter, pkt, len, dest); + if (cc != ERROR_SUCCESS) #else #ifdef SIM cc = srvr_rply(&ntp_node, dest, inter, pkt); @@ -2673,9 +2738,9 @@ sendpkt( { inter->notsent++; packets_notsent++; + #if defined(HAVE_IO_COMPLETION_PORT) - err = WSAGetLastError(); - if (err != WSAEWOULDBLOCK && err != WSAENOBUFS && slot < 0) + if (cc != WSAEWOULDBLOCK && cc != WSAENOBUFS && slot < 0) #else if (errno != EWOULDBLOCK && errno != ENOBUFS && slot < 0) #endif @@ -2700,13 +2765,13 @@ sendpkt( case AF_INET6 : for (slot = ERRORCACHESIZE; --slot >= 0; ) - if (badaddrs6[slot].port == 0) - { - badaddrs6[slot].port = SRCPORT(dest); - badaddrs6[slot].addr = ((struct sockaddr_in6*)dest)->sin6_addr; - break; - } - break; + if (badaddrs6[slot].port == 0) + { + badaddrs6[slot].port = SRCPORT(dest); + badaddrs6[slot].addr = ((struct sockaddr_in6*)dest)->sin6_addr; + break; + } + break; #endif /* INCLUDE_IPV6_SUPPORT */ default: /* don't care if not supported */ break; @@ -3248,7 +3313,7 @@ findlocalinterface( struct interface *iface; DPRINTF(4, ("Finding interface for addr %s in list of addresses\n", - stoa(addr));) + stoa(addr))); memset(&saddr, 0, sizeof(saddr)); saddr.ss_family = addr->ss_family; @@ -3665,6 +3730,11 @@ add_fd_to_list(SOCKET fd, enum desc_type type) { * I/O Completion Ports don't care about the select and FD_SET */ #ifndef HAVE_IO_COMPLETION_PORT + if (fd < 0 || fd >= FD_SETSIZE) { + msyslog(LOG_ERR, "Too many sockets in use, FD_SETSIZE %d exceeded", + FD_SETSIZE); + exit(1); + } /* * keep activefds in sync */ diff --git a/contrib/ntp/ntpd/ntp_request.c b/contrib/ntp/ntpd/ntp_request.c index b1bc99d..f5eed444 100644 --- a/contrib/ntp/ntpd/ntp_request.c +++ b/contrib/ntp/ntpd/ntp_request.c @@ -409,6 +409,7 @@ process_private( int mod_okay ) { + static u_long quiet_until; struct req_pkt *inpkt; struct req_pkt_tail *tailinpkt; struct sockaddr_storage *srcadr; @@ -444,8 +445,14 @@ process_private( || (++ec, INFO_MBZ(inpkt->mbz_itemsize) != 0) || (++ec, rbufp->recv_length < REQ_LEN_HDR) ) { - msyslog(LOG_ERR, "process_private: INFO_ERR_FMT: test %d failed, pkt from %s", ec, stoa(srcadr)); - req_ack(srcadr, inter, inpkt, INFO_ERR_FMT); + NLOG(NLOG_SYSEVENT) + if (current_time >= quiet_until) { + msyslog(LOG_ERR, + "process_private: drop test %d" + " failed, pkt from %s", + ec, stoa(srcadr)); + quiet_until = current_time + 60; + } return; } @@ -496,10 +503,10 @@ process_private( */ temp_size = INFO_ITEMSIZE(inpkt->mbz_itemsize); if ((temp_size != proc->sizeofitem && - temp_size != proc->v6_sizeofitem) && + temp_size != proc->v6_sizeofitem) && !(inpkt->implementation == IMPL_XNTPD && - inpkt->request == REQ_CONFIG && - temp_size == sizeof(struct old_conf_peer))) { + inpkt->request == REQ_CONFIG && + temp_size == sizeof(struct old_conf_peer))) { #ifdef DEBUG if (debug > 2) printf("process_private: wrong item size, received %d, should be %d or %d\n", @@ -1319,6 +1326,7 @@ do_conf( struct req_pkt *inpkt ) { + static u_long soonest_ifrescan_time = 0; int items; u_int fl; struct conf_peer *cp; @@ -1412,6 +1420,23 @@ do_conf( req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); return; } + + /* + * ntp_intres.c uses REQ_CONFIG/doconf() to add each + * server after its name is resolved. If we have been + * disconnected from the network, it may notice the + * network has returned and add the first server while + * the relevant interface is still disabled, awaiting + * the next interface rescan. To get things moving + * more quickly, trigger an interface scan now, except + * if we have done so in the last half minute. + */ + if (soonest_ifrescan_time < current_time) { + soonest_ifrescan_time = current_time + 30; + timer_interfacetimeout(current_time); + DPRINTF(1, ("do_conf triggering interface rescan\n")); + } + cp = (struct conf_peer *) ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize)); } diff --git a/contrib/ntp/ntpd/ntp_timer.c b/contrib/ntp/ntpd/ntp_timer.c index fb6de70..812206a 100644 --- a/contrib/ntp/ntpd/ntp_timer.c +++ b/contrib/ntp/ntpd/ntp_timer.c @@ -343,12 +343,10 @@ timer(void) * interface update timer */ if (interface_interval && interface_timer <= current_time) { + timer_interfacetimeout(current_time + interface_interval); -#ifdef DEBUG - if (debug) - printf("timer: interface update\n"); -#endif - interface_update(NULL, NULL); + DPRINTF(1, ("timer: interface update\n")); + interface_update(NULL, NULL); } /* diff --git a/contrib/ntp/ntpd/ntpd-opts.c b/contrib/ntp/ntpd/ntpd-opts.c index eae28cb..4d23d66 100644 --- a/contrib/ntp/ntpd/ntpd-opts.c +++ b/contrib/ntp/ntpd/ntpd-opts.c @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpd-opts.c) * - * It has been AutoGen-ed Sunday August 17, 2008 at 05:20:10 AM EDT + * It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:10 AM EST * From the definitions ntpd-opts.def * and the template file options * @@ -19,7 +19,7 @@ * * This source file is copyrighted and licensed under the following terms: * - * ntpd copyright 1970-2008 David L. Mills and/or others - all rights reserved + * ntpd copyright 1970-2009 David L. Mills and/or others - all rights reserved * * see html/copyright.html */ @@ -34,7 +34,7 @@ extern "C" { #endif tSCC zCopyright[] = - "ntpd copyright (c) 1970-2008 David L. Mills and/or others, all rights reserved"; + "ntpd copyright (c) 1970-2009 David L. Mills and/or others, all rights reserved"; tSCC zCopyrightNotice[] = /* extracted from ../include/copyright.def near line 8 */ @@ -835,16 +835,16 @@ static tOptDesc optDesc[ OPTION_CT ] = { */ tSCC zPROGNAME[] = "NTPD"; tSCC zUsageTitle[] = -"ntpd - NTP daemon program - Ver. 4.2.4p5\n\ +"ntpd - NTP daemon program - Ver. 4.2.4p8\n\ USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"; #define zRcName NULL #define apzHomeList NULL -tSCC zBugsAddr[] = "http://bugs.ntp.isc.org, bugs@ntp.org"; +tSCC zBugsAddr[] = "http://bugs.ntp.org, bugs@ntp.org"; #define zExplain NULL tSCC zDetail[] = "\n\n"; tSCC zFullVersion[] = NTPD_FULL_VERSION; -/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 408 */ +/* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optcode.tpl near line 408 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE @@ -914,7 +914,7 @@ DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg ); #endif /* defined(TEST_NTPD_OPTS) */ -/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 92 */ +/* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optmain.tpl near line 92 */ #if defined(TEST_NTPD_OPTS) /* TEST MAIN PROCEDURE: */ @@ -930,7 +930,7 @@ main( int argc, char** argv ) return res; } #endif /* defined TEST_NTPD_OPTS */ -/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 514 */ +/* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optcode.tpl near line 514 */ #if ENABLE_NLS #include <stdio.h> diff --git a/contrib/ntp/ntpd/ntpd-opts.h b/contrib/ntp/ntpd/ntpd-opts.h index 45d0de5..0347f33 100644 --- a/contrib/ntp/ntpd/ntpd-opts.h +++ b/contrib/ntp/ntpd/ntpd-opts.h @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpd-opts.h) * - * It has been AutoGen-ed Sunday August 17, 2008 at 05:20:09 AM EDT + * It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:09 AM EST * From the definitions ntpd-opts.def * and the template file options * @@ -19,7 +19,7 @@ * * This source file is copyrighted and licensed under the following terms: * - * ntpd copyright 1970-2008 David L. Mills and/or others - all rights reserved + * ntpd copyright 1970-2009 David L. Mills and/or others - all rights reserved * * see html/copyright.html */ @@ -87,8 +87,8 @@ typedef enum { } teOptIndex; #define OPTION_CT 32 -#define NTPD_VERSION "4.2.4p5" -#define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.4p5" +#define NTPD_VERSION "4.2.4p8" +#define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.4p8" /* * Interface defines for all options. Replace "n" with the UPPER_CASED @@ -319,7 +319,7 @@ typedef enum { ntpdOptions.pzCurOpt = NULL ) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*ntpdOptions.pUsageProc)( &ntpdOptions, c ) -/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 360 */ +/* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/opthead.tpl near line 360 */ /* * * * * * * diff --git a/contrib/ntp/ntpd/ntpd-opts.texi b/contrib/ntp/ntpd/ntpd-opts.texi index 5a99b58..0491294 100644 --- a/contrib/ntp/ntpd/ntpd-opts.texi +++ b/contrib/ntp/ntpd/ntpd-opts.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (ntpd-opts.texi) # -# It has been AutoGen-ed Sunday August 17, 2008 at 05:20:12 AM EDT +# It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:12 AM EST # From the definitions ntpd-opts.def # and the template file aginfo.tpl @end ignore @@ -60,12 +60,15 @@ This is the automatically generated usage text for ntpd: @exampleindent 0 @example -ntpd - NTP daemon program - Ver. 4.2.5p113 +ntpd - NTP daemon program - Ver. 4.2.5p247-RC USAGE: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... Flg Arg Option-Name Description -4 no ipv4 Force IPv4 DNS name resolution + - prohibits these options: + ipv6 -6 no ipv6 Force IPv6 DNS name resolution - - an alternate for ipv4 + - prohibits these options: + ipv4 -a no authreq Require crypto authentication - prohibits these options: authnoreq @@ -80,20 +83,24 @@ USAGE: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... - may appear multiple times -f Str driftfile frequency drift file name -g no panicgate Allow the first adjustment to be Big - -I Str interface Listen on the specified interface or IP + - may appear multiple times + -i --- jaildir built without --enable-clockctl or --enable-linuxcaps + -I Str interface Listen on an interface name or address - may appear multiple times -k Str keyfile path to symmetric keys -l Str logfile path to the log file - -L no novirtualips Do not listen to virtual IPs + -L no novirtualips Do not listen to virtual interfaces -n no nofork Do not fork -N no nice Run at high priority -p Str pidfile path to the PID file -P Num priority Process priority -q no quit Set the time and quit -r Str propagationdelay Broadcast/propagation delay + Str saveconfigquit Save parsed configuration and quit -s Str statsdir Statistics file location -t Str trustedkey Trusted key number - may appear multiple times + -u --- user built without --enable-clockctl or --enable-linuxcaps -U Num updateinterval interval in seconds between scans for new or dropped interfaces Str var make ARG an ntp variable (RW) - may appear multiple times @@ -101,7 +108,7 @@ USAGE: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... - may appear multiple times -x no slew Slew up to 600 seconds opt version Output version information and exit - -? no help Display usage information and exit + -? no help Display extended usage information and exit -! no more-help Extended usage information passed thru pager Options are specified by doubled hyphens and their name diff --git a/contrib/ntp/ntpd/ntpd.1 b/contrib/ntp/ntpd/ntpd.1 index 25aee41..ec0a0ed 100644 --- a/contrib/ntp/ntpd/ntpd.1 +++ b/contrib/ntp/ntpd/ntpd.1 @@ -1,7 +1,7 @@ -.TH NTPD 1 2008-08-17 "( 4.2.4p5)" "Programmer's Manual" +.TH NTPD 1 2009-12-08 "( 4.2.4p8)" "Programmer's Manual" .\" EDIT THIS FILE WITH CAUTION (ntpd.1) .\" -.\" It has been AutoGen-ed Sunday August 17, 2008 at 05:20:11 AM EDT +.\" It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:11 AM EST .\" From the definitions ntpd-opts.def .\" and the template file agman1.tpl .\" @@ -283,7 +283,7 @@ by loading values from environment variables named: .SH AUTHOR David L. Mills and/or others .br -Please send bug reports to: http://bugs.ntp.isc.org, bugs@ntp.org +Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org .PP .nf diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c index 04e0d07..02a5198 100644 --- a/contrib/ntp/ntpd/ntpd.c +++ b/contrib/ntp/ntpd/ntpd.c @@ -26,30 +26,22 @@ # include <sys/stat.h> #endif #include <stdio.h> -#ifndef SYS_WINNT -# if !defined(VMS) /*wjm*/ -# ifdef HAVE_SYS_PARAM_H -# include <sys/param.h> -# endif -# endif /* VMS */ -# ifdef HAVE_SYS_SIGNAL_H -# include <sys/signal.h> -# else -# include <signal.h> +#if !defined(VMS) /*wjm*/ +# ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> # endif -# ifdef HAVE_SYS_IOCTL_H -# include <sys/ioctl.h> -# endif /* HAVE_SYS_IOCTL_H */ -# ifdef HAVE_SYS_RESOURCE_H -# include <sys/resource.h> -# endif /* HAVE_SYS_RESOURCE_H */ +#endif /* VMS */ +#ifdef HAVE_SYS_SIGNAL_H +# include <sys/signal.h> #else # include <signal.h> -# include <process.h> -# include <io.h> -# include <clockstuff.h> -#include "ntp_iocompletionport.h" -#endif /* SYS_WINNT */ +#endif +#ifdef HAVE_SYS_IOCTL_H +# include <sys/ioctl.h> +#endif /* HAVE_SYS_IOCTL_H */ +#ifdef HAVE_SYS_RESOURCE_H +# include <sys/resource.h> +#endif /* HAVE_SYS_RESOURCE_H */ #if defined(HAVE_RTPRIO) # ifdef HAVE_SYS_RESOURCE_H # include <sys/resource.h> @@ -821,9 +813,6 @@ ntpdmain( init_restrict(); init_mon(); init_timer(); -#if defined (HAVE_IO_COMPLETION_PORT) - init_io_completion_port(); -#endif init_lib(); init_request(); init_control(); @@ -993,7 +982,7 @@ getgroup: #if defined(HAVE_IO_COMPLETION_PORT) for (;;) { - int tot_full_recvbufs = GetReceivedBuffers(); + GetReceivedBuffers(); #else /* normal I/O */ BLOCK_IO_AND_ALARM(); diff --git a/contrib/ntp/ntpd/ntpdsim-opts.c b/contrib/ntp/ntpd/ntpdsim-opts.c index 4f09c0f..d9ef1b2 100644 --- a/contrib/ntp/ntpd/ntpdsim-opts.c +++ b/contrib/ntp/ntpd/ntpdsim-opts.c @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpdsim-opts.c) * - * It has been AutoGen-ed Sunday August 17, 2008 at 05:20:14 AM EDT + * It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:13 AM EST * From the definitions ntpdsim-opts.def * and the template file options * @@ -19,7 +19,7 @@ * * This source file is copyrighted and licensed under the following terms: * - * ntpdsim copyright 1970-2008 David L. Mills and/or others - all rights reserved + * ntpdsim copyright 1970-2009 David L. Mills and/or others - all rights reserved * * see html/copyright.html */ @@ -34,7 +34,7 @@ extern "C" { #endif tSCC zCopyright[] = - "ntpdsim copyright (c) 1970-2008 David L. Mills and/or others, all rights reserved"; + "ntpdsim copyright (c) 1970-2009 David L. Mills and/or others, all rights reserved"; tSCC zCopyrightNotice[] = /* extracted from ../include/copyright.def near line 8 */ @@ -1072,7 +1072,7 @@ static tOptDesc optDesc[ OPTION_CT ] = { */ tSCC zPROGNAME[] = "NTPDSIM"; tSCC zUsageTitle[] = -"ntpdsim - NTP daemon simulation program - Ver. 4.2.4p5\n\ +"ntpdsim - NTP daemon simulation program - Ver. 4.2.4p8\n\ USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"; tSCC zRcName[] = ".ntprc"; tSCC* apzHomeList[] = { @@ -1080,11 +1080,11 @@ tSCC* apzHomeList[] = { ".", NULL }; -tSCC zBugsAddr[] = "http://bugs.ntp.isc.org, bugs@ntp.org"; +tSCC zBugsAddr[] = "http://bugs.ntp.org, bugs@ntp.org"; #define zExplain NULL tSCC zDetail[] = "\n\n"; tSCC zFullVersion[] = NTPDSIM_FULL_VERSION; -/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 408 */ +/* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optcode.tpl near line 408 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE @@ -1155,7 +1155,7 @@ DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg ); #endif /* defined(TEST_NTPDSIM_OPTS) */ -/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 92 */ +/* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optmain.tpl near line 92 */ #if defined(TEST_NTPDSIM_OPTS) /* TEST MAIN PROCEDURE: */ @@ -1171,7 +1171,7 @@ main( int argc, char** argv ) return res; } #endif /* defined TEST_NTPDSIM_OPTS */ -/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 514 */ +/* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optcode.tpl near line 514 */ #if ENABLE_NLS #include <stdio.h> diff --git a/contrib/ntp/ntpd/ntpdsim-opts.h b/contrib/ntp/ntpd/ntpdsim-opts.h index 1c63654..3458bbf 100644 --- a/contrib/ntp/ntpd/ntpdsim-opts.h +++ b/contrib/ntp/ntpd/ntpdsim-opts.h @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpdsim-opts.h) * - * It has been AutoGen-ed Sunday August 17, 2008 at 05:20:13 AM EDT + * It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:12 AM EST * From the definitions ntpdsim-opts.def * and the template file options * @@ -19,7 +19,7 @@ * * This source file is copyrighted and licensed under the following terms: * - * ntpdsim copyright 1970-2008 David L. Mills and/or others - all rights reserved + * ntpdsim copyright 1970-2009 David L. Mills and/or others - all rights reserved * * see html/copyright.html */ @@ -98,8 +98,8 @@ typedef enum { } teOptIndex; #define OPTION_CT 43 -#define NTPDSIM_VERSION "4.2.4p5" -#define NTPDSIM_FULL_VERSION "ntpdsim - NTP daemon simulation program - Ver. 4.2.4p5" +#define NTPDSIM_VERSION "4.2.4p8" +#define NTPDSIM_FULL_VERSION "ntpdsim - NTP daemon simulation program - Ver. 4.2.4p8" /* * Interface defines for all options. Replace "n" with the UPPER_CASED @@ -390,7 +390,7 @@ typedef enum { ntpdsimOptions.pzCurOpt = NULL ) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*ntpdsimOptions.pUsageProc)( &ntpdsimOptions, c ) -/* extracted from /usr/local/gnu/share/autogen/opthead.tpl near line 360 */ +/* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/opthead.tpl near line 360 */ /* * * * * * * diff --git a/contrib/ntp/ntpd/ntpdsim-opts.texi b/contrib/ntp/ntpd/ntpdsim-opts.texi index 49b5439..ed52210 100644 --- a/contrib/ntp/ntpd/ntpdsim-opts.texi +++ b/contrib/ntp/ntpd/ntpdsim-opts.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (ntpdsim-opts.texi) # -# It has been AutoGen-ed Sunday August 17, 2008 at 05:20:17 AM EDT +# It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:15 AM EST # From the definitions ntpdsim-opts.def # and the template file aginfo.tpl @end ignore @@ -69,7 +69,66 @@ This is the automatically generated usage text for ntpdsim: @exampleindent 0 @example -ntpdsim is unavailable - no --help +ntpd - NTP daemon program - Ver. 4.2.5p247-RC +USAGE: ntpdsim [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... + Flg Arg Option-Name Description + -4 no ipv4 Force IPv4 DNS name resolution + - prohibits these options: + ipv6 + -6 no ipv6 Force IPv6 DNS name resolution + - prohibits these options: + ipv4 + -a no authreq Require crypto authentication + - prohibits these options: + authnoreq + -A no authnoreq Do not require crypto authentication + - prohibits these options: + authreq + -b no bcastsync Allow us to sync to broadcast servers + -c Str configfile configuration file name + -d no debug-level Increase output debug message level + - may appear multiple times + -D Str set-debug-level Set the output debug message level + - may appear multiple times + -f Str driftfile frequency drift file name + -g no panicgate Allow the first adjustment to be Big + - may appear multiple times + -i --- jaildir built without --enable-clockctl or --enable-linuxcaps + -I Str interface Listen on an interface name or address + - may appear multiple times + -k Str keyfile path to symmetric keys + -l Str logfile path to the log file + -L no novirtualips Do not listen to virtual interfaces + -n no nofork Do not fork + -N no nice Run at high priority + -p Str pidfile path to the PID file + -P Num priority Process priority + -q no quit Set the time and quit + -r Str propagationdelay Broadcast/propagation delay + Str saveconfigquit Save parsed configuration and quit + -s Str statsdir Statistics file location + -t Str trustedkey Trusted key number + - may appear multiple times + -u --- user built without --enable-clockctl or --enable-linuxcaps + -U Num updateinterval interval in seconds between scans for new or dropped interfaces + Str var make ARG an ntp variable (RW) + - may appear multiple times + Str dvar make ARG an ntp variable (RW|DEF) + - may appear multiple times + -x no slew Slew up to 600 seconds + opt version Output version information and exit + -? no help Display extended usage information and exit + -! no more-help Extended usage information passed thru pager + +Options are specified by doubled hyphens and their name +or by a single hyphen and the flag character. + +The following option preset mechanisms are supported: + - examining environment variables named NTPD_* + + + +please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org @end example @exampleindent 4 diff --git a/contrib/ntp/ntpd/ntpdsim.1 b/contrib/ntp/ntpd/ntpdsim.1 index 2a7ea46..2028764 100644 --- a/contrib/ntp/ntpd/ntpdsim.1 +++ b/contrib/ntp/ntpd/ntpdsim.1 @@ -1,7 +1,7 @@ -.TH NTPDSIM 1 2008-08-17 "( 4.2.4p5)" "Programmer's Manual" +.TH NTPDSIM 1 2009-12-08 "( 4.2.4p8)" "Programmer's Manual" .\" EDIT THIS FILE WITH CAUTION (ntpdsim.1) .\" -.\" It has been AutoGen-ed Sunday August 17, 2008 at 05:20:16 AM EDT +.\" It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:14 AM EST .\" From the definitions ntpdsim-opts.def .\" and the template file agman1.tpl .\" @@ -344,7 +344,7 @@ is searched for within those directories. .SH AUTHOR David L. Mills and/or others .br -Please send bug reports to: http://bugs.ntp.isc.org, bugs@ntp.org +Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org .PP .nf diff --git a/contrib/ntp/ntpd/refclock_dumbclock.c b/contrib/ntp/ntpd/refclock_dumbclock.c index 2788649..10ff2cf 100644 --- a/contrib/ntp/ntpd/refclock_dumbclock.c +++ b/contrib/ntp/ntpd/refclock_dumbclock.c @@ -12,11 +12,6 @@ #include <config.h> #endif -#if defined(SYS_WINNT) -#undef close -#define close closesocket -#endif - #if defined(REFCLOCK) && defined(CLOCK_DUMBCLOCK) #include "ntpd.h" @@ -28,6 +23,12 @@ #include <stdio.h> #include <ctype.h> +#ifdef SYS_WINNT +extern int async_write(int, const void *, unsigned int); +#undef write +#define write(fd, data, octets) async_write(fd, data, octets) +#endif + /* * This driver supports a generic dumb clock that only outputs hh:mm:ss, * in local time, no less. diff --git a/contrib/ntp/ntpd/refclock_hopfser.c b/contrib/ntp/ntpd/refclock_hopfser.c index 94b660b..9037d4a 100644 --- a/contrib/ntp/ntpd/refclock_hopfser.c +++ b/contrib/ntp/ntpd/refclock_hopfser.c @@ -14,11 +14,6 @@ # include "config.h" #endif -#if defined(SYS_WINNT) -#undef close -#define close closesocket -#endif - #if defined(REFCLOCK) && (defined(CLOCK_HOPF_SERIAL)) #include "ntpd.h" @@ -51,6 +46,12 @@ # include <sys/ioctl.h> #endif +#ifdef SYS_WINNT +extern int async_write(int, const void *, unsigned int); +#undef write +#define write(fd, data, octets) async_write(fd, data, octets) +#endif + /* * clock definitions */ diff --git a/contrib/ntp/ntpd/refclock_jjy.c b/contrib/ntp/ntpd/refclock_jjy.c index 9d1419a..d1707ce 100644 --- a/contrib/ntp/ntpd/refclock_jjy.c +++ b/contrib/ntp/ntpd/refclock_jjy.c @@ -74,6 +74,9 @@ /* [Fix] C-DEX JST2000 */ /* Thanks to Hideo Kuramatsu for the patch */ /* */ +/* 2009/04/05 */ +/* [Add] Support the CITIZEN T.I.C JJY-200 receiver */ +/* */ /**********************************************************************/ #ifdef HAVE_CONFIG_H @@ -131,12 +134,26 @@ /* <SUB> Second signal */ /* */ /**********************************************************************/ +/* */ +/* The CITIZEN T.I.C CO., LTD. JJY receiver JJY200 */ +/* */ +/* Command Response Remarks */ +/* ------------ ---------------------- --------------------- */ +/* 'XX YY/MM/DD W HH:MM:SS<CR> */ +/* XX: OK|NG|ER */ +/* W: 0(Monday)-6(Sunday) */ +/* */ +/**********************************************************************/ /* * Interface definitions */ #define DEVICE "/dev/jjy%d" /* device name and unit */ #define SPEED232 B9600 /* uart speed (9600 baud) */ +#define SPEED232_TRISTATE_JJY01 B9600 /* UART speed (9600 baud) */ +#define SPEED232_CDEX_JST2000 B9600 /* UART speed (9600 baud) */ +#define SPEED232_ECHOKEISOKUKI_LT2000 B9600 /* UART speed (9600 baud) */ +#define SPEED232_CITIZENTIC_JJY200 B4800 /* UART speed (4800 baud) */ #define REFID "JJY" /* reference ID */ #define DESCRIPTION "JJY Receiver" #define PRECISION (-3) /* precision assumed (about 100 ms) */ @@ -149,6 +166,7 @@ struct jjyunit { short operationmode ; /* Echo Keisokuki LT-2000 : 1 or 2 */ short version ; short linediscipline ; /* LDISC_CLK or LDISC_RAW */ + char bPollFlag ; /* Set by jjy_pool and Reset by jjy_receive */ int linecount ; int lineerror ; int year, month, day, hour, minute, second, msecond ; @@ -164,6 +182,7 @@ struct jjyunit { #define UNITTYPE_TRISTATE_JJY01 1 #define UNITTYPE_CDEX_JST2000 2 #define UNITTYPE_ECHOKEISOKUKI_LT2000 3 +#define UNITTYPE_CITIZENTIC_JJY200 4 /* * Function prototypes @@ -174,10 +193,12 @@ 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_poll_echokeisokuki_lt2000 P((int, struct peer *)); +static void jjy_poll_citizentic_jjy200 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 *)); static int jjy_receive_echokeisokuki_lt2000 P((struct recvbuf *)); +static int jjy_receive_citizentic_jjy200 P((struct recvbuf *)); /* * Transfer vector @@ -217,6 +238,7 @@ jjy_start ( int unit, struct peer *peer ) int fd ; char *pDeviceName ; short iDiscipline ; + int iSpeed232 ; #ifdef DEBUG if ( debug ) { @@ -238,9 +260,22 @@ jjy_start ( int unit, struct peer *peer ) */ switch ( peer->ttl ) { case 0 : - case 1 : iDiscipline = LDISC_CLK ; break ; - case 2 : iDiscipline = LDISC_RAW ; break ; - case 3 : iDiscipline = LDISC_CLK ; break ; + case 1 : + iDiscipline = LDISC_CLK ; + iSpeed232 = SPEED232_TRISTATE_JJY01 ; + break ; + case 2 : + iDiscipline = LDISC_RAW ; + iSpeed232 = SPEED232_CDEX_JST2000 ; + break ; + case 3 : + iDiscipline = LDISC_CLK ; + iSpeed232 = SPEED232_ECHOKEISOKUKI_LT2000 ; + break ; + case 4 : + iDiscipline = LDISC_CLK ; + iSpeed232 = SPEED232_CITIZENTIC_JJY200 ; + break ; default : msyslog ( LOG_ERR, "JJY receiver [ %s mode %d ] : Unsupported mode", ntoa(&peer->srcadr), peer->ttl ) ; @@ -248,7 +283,7 @@ jjy_start ( int unit, struct peer *peer ) return RC_START_ERROR ; } - if ( ! ( fd = refclock_open ( pDeviceName, SPEED232, iDiscipline ) ) ) { + if ( ! ( fd = refclock_open ( pDeviceName, iSpeed232, iDiscipline ) ) ) { free ( (void*) pDeviceName ) ; return RC_START_ERROR ; } @@ -299,6 +334,11 @@ jjy_start ( int unit, struct peer *peer ) break ; } break ; + case 4 : + up->unittype = UNITTYPE_CITIZENTIC_JJY200 ; + up->lineexpect = 1 ; + up->charexpect[0] = 23 ; /* 'XX YY/MM/DD W HH:MM:SS<CR> */ + break ; default : msyslog ( LOG_ERR, "JJY receiver [ %s mode %d ] : Unsupported mode", ntoa(&peer->srcadr), peer->ttl ) ; @@ -434,6 +474,10 @@ jjy_receive ( struct recvbuf *rbufp ) rc = jjy_receive_echokeisokuki_lt2000 ( rbufp ) ; break ; + case UNITTYPE_CITIZENTIC_JJY200 : + rc = jjy_receive_citizentic_jjy200 ( rbufp ) ; + break ; + default : rc = 0 ; break ; @@ -453,6 +497,8 @@ jjy_receive ( struct recvbuf *rbufp ) if ( rc == 0 ) return ; + up->bPollFlag = 0 ; + if ( up->lineerror != 0 ) { refclock_report ( peer, CEVNT_BADREPLY ) ; strcpy ( sLogText, "BAD REPLY [" ) ; @@ -866,6 +912,93 @@ jjy_receive_echokeisokuki_lt2000 ( struct recvbuf *rbufp ) } /**************************************************************************************************/ + +static int +jjy_receive_citizentic_jjy200 ( struct recvbuf *rbufp ) +{ + + static char *sFunctionName = "jjy_receive_citizentic_jjy200" ; + + struct jjyunit *up ; + struct refclockproc *pp ; + struct peer *peer; + + char *pBuf ; + int iLen ; + int rc ; + char cApostrophe, sStatus[3] ; + int iWeekday ; + + /* + * 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 ; + } + + /* + * JJY-200 sends a timestamp every second. + * So, a timestamp is ignored unless it is right after polled. + */ + if ( ! up->bPollFlag ) return 0 ; + + switch ( up->linecount ) { + + case 1 : /* 'XX YY/MM/DD W HH:MM:SS<CR> */ + + if ( iLen != 23 ) { +#ifdef DEBUG + if ( debug >= 2 ) { + printf ( "%s (refclock_jjy.c) : Reply length error ( iLen=%d )\n", sFunctionName, iLen ) ; + } +#endif + up->lineerror = 1 ; + break ; + } + + rc = sscanf ( pBuf, "%c%2s %2d/%2d/%2d %1d %2d:%2d:%2d", + &cApostrophe, sStatus, + &up->year, &up->month, &up->day, &iWeekday, &up->hour, &up->minute, &up->second ) ; + sStatus[2] = 0 ; + if ( rc != 9 || cApostrophe != '\'' || strcmp( sStatus, "OK" ) != 0 + || up->month < 1 || up->month > 12 || up->day < 1 || up->day > 31 + || iWeekday > 6 + || up->hour > 23 || up->minute > 59 || up->second > 60 ) { +#ifdef DEBUG + if ( debug >= 2 ) { + printf ( "%s (refclock_jjy.c) : Time error (rc=%d) [ %c %2s %02d %02d %02d %d %02d %02d %02d ]\n", sFunctionName, + rc, cApostrophe, sStatus, up->year, up->month, up->day, iWeekday, up->hour, up->minute, up->second ) ; + } +#endif + up->lineerror = 1 ; + break ; + } + + up->year += 2000 ; + up->msecond = 0 ; + + break ; + + default : /* Unexpected reply */ + + up->lineerror = 1 ; + break ; + + } + + return 1 ; + +} + +/**************************************************************************************************/ /* jjy_poll - called by the transmit procedure */ /**************************************************************************************************/ static void @@ -893,6 +1026,7 @@ jjy_poll ( int unit, struct peer *peer ) pp->polls ++ ; + up->bPollFlag = 1 ; up->linecount = 0 ; up->lineerror = 0 ; up->charcount = 0 ; @@ -911,6 +1045,10 @@ jjy_poll ( int unit, struct peer *peer ) jjy_poll_echokeisokuki_lt2000 ( unit, peer ) ; break ; + case UNITTYPE_CITIZENTIC_JJY200 : + jjy_poll_citizentic_jjy200 ( unit, peer ) ; + break ; + default : break ; @@ -1006,6 +1144,16 @@ jjy_poll_echokeisokuki_lt2000 ( int unit, struct peer *peer ) } +/**************************************************************************************************/ + +static void +jjy_poll_citizentic_jjy200 ( int unit, struct peer *peer ) +{ + + /* Do nothing ( up->bPollFlag is set by the jjy_poll ) */ + +} + #else int refclock_jjy_bs ; #endif /* REFCLOCK */ diff --git a/contrib/ntp/ntpd/refclock_nmea.c b/contrib/ntp/ntpd/refclock_nmea.c index 5b124cb..a176ee8 100644 --- a/contrib/ntp/ntpd/refclock_nmea.c +++ b/contrib/ntp/ntpd/refclock_nmea.c @@ -7,11 +7,6 @@ #include <config.h> #endif -#if defined(SYS_WINNT) -#undef close -#define close closesocket -#endif - #if defined(REFCLOCK) && defined(CLOCK_NMEA) #include <stdio.h> @@ -27,6 +22,12 @@ # include "ppsapi_timepps.h" #endif /* HAVE_PPSAPI */ +#ifdef SYS_WINNT +extern int async_write(int, const void *, unsigned int); +#undef write +#define write(fd, data, octets) async_write(fd, data, octets) +#endif + /* * This driver supports the NMEA GPS Receiver with * diff --git a/contrib/ntp/ntpd/refclock_palisade.c b/contrib/ntp/ntpd/refclock_palisade.c index 217ec10..adb4659 100644 --- a/contrib/ntp/ntpd/refclock_palisade.c +++ b/contrib/ntp/ntpd/refclock_palisade.c @@ -56,13 +56,14 @@ #include "config.h" #endif -#if defined(SYS_WINNT) -#undef close -#define close closesocket -#endif - #if defined(REFCLOCK) && (defined(PALISADE) || defined(CLOCK_PALISADE)) +#ifdef SYS_WINNT +extern int async_write(int, const void *, unsigned int); +#undef write +#define write(fd, data, octets) async_write(fd, data, octets) +#endif + #include "refclock_palisade.h" /* Table to get from month to day of the year */ const int days_of_year [12] = { |