aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog80
-rw-r--r--CommitLog2566
-rw-r--r--Makefile.in10
-rw-r--r--NEWS141
-rw-r--r--aclocal.m45
-rw-r--r--adjtimed/Makefile.in10
-rw-r--r--clockstuff/Makefile.in10
-rw-r--r--config.h.in4
-rwxr-xr-xconfigure133
-rw-r--r--configure.ac64
-rw-r--r--html/build.html4
-rw-r--r--html/miscopt.html4
-rw-r--r--html/sntp.html6
-rw-r--r--include/Makefile.in10
-rw-r--r--include/binio.h10
-rw-r--r--include/isc/Makefile.in10
-rw-r--r--include/mbg_gps166.h1195
-rw-r--r--include/ntp.h35
-rw-r--r--include/ntp_calendar.h6
-rw-r--r--include/ntp_fp.h5
-rw-r--r--include/ntp_md5.h2
-rw-r--r--include/ntpd.h11
-rw-r--r--include/parse.h49
-rw-r--r--include/parse_conf.h14
-rw-r--r--kernel/Makefile.in10
-rw-r--r--kernel/sys/Makefile.in10
-rw-r--r--kernel/sys/parsestreams.h2
-rw-r--r--lib/isc/inet_ntop.c1
-rw-r--r--lib/isc/log.c24
-rw-r--r--lib/isc/result.c12
-rw-r--r--lib/isc/unix/file.c6
-rw-r--r--lib/isc/unix/ifiter_getifaddrs.c3
-rw-r--r--lib/isc/unix/ifiter_ioctl.c18
-rw-r--r--lib/isc/unix/net.c3
-rw-r--r--libntp/Makefile.in10
-rw-r--r--libntp/ntp_calendar.c74
-rw-r--r--libntp/work_fork.c2
-rw-r--r--libparse/Makefile.in10
-rw-r--r--libparse/clk_computime.c62
-rw-r--r--libparse/clk_dcf7000.c27
-rw-r--r--libparse/clk_hopf6021.c39
-rw-r--r--libparse/clk_meinberg.c177
-rw-r--r--libparse/clk_rawdcf.c44
-rw-r--r--libparse/clk_rcc8000.c31
-rw-r--r--libparse/clk_schmid.c36
-rw-r--r--libparse/clk_sel240x.c16
-rw-r--r--libparse/clk_trimtaip.c23
-rw-r--r--libparse/clk_trimtsip.c62
-rw-r--r--libparse/clk_varitext.c87
-rw-r--r--libparse/clk_wharton.c13
-rw-r--r--libparse/data_mbg.c143
-rw-r--r--libparse/gpstolfp.c10
-rw-r--r--libparse/parse.c120
-rw-r--r--libparse/parse_conf.c4
-rw-r--r--libparse/parsesolaris.c108
-rw-r--r--libparse/parsestreams.c126
-rw-r--r--libparse/trim_info.c2
-rw-r--r--ntpd/Makefile.in10
-rw-r--r--ntpd/cmd_args.c9
-rw-r--r--ntpd/invoke-ntp.conf.texi17
-rw-r--r--ntpd/invoke-ntp.keys.texi2
-rw-r--r--ntpd/invoke-ntpd.texi25
-rw-r--r--ntpd/keyword-gen-utd2
-rw-r--r--ntpd/keyword-gen.c2
-rw-r--r--ntpd/ntp.conf.5man23
-rw-r--r--ntpd/ntp.conf.5mdoc21
-rw-r--r--ntpd/ntp.conf.def17
-rw-r--r--ntpd/ntp.conf.html15
-rw-r--r--ntpd/ntp.conf.man.in23
-rw-r--r--ntpd/ntp.conf.mdoc.in21
-rw-r--r--ntpd/ntp.keys.5man4
-rw-r--r--ntpd/ntp.keys.5mdoc4
-rw-r--r--ntpd/ntp.keys.html2
-rw-r--r--ntpd/ntp.keys.man.in4
-rw-r--r--ntpd/ntp.keys.mdoc.in4
-rw-r--r--ntpd/ntp_config.c8
-rw-r--r--ntpd/ntp_control.c107
-rw-r--r--ntpd/ntp_crypto.c2
-rw-r--r--ntpd/ntp_keyword.h975
-rw-r--r--ntpd/ntp_leapsec.c12
-rw-r--r--ntpd/ntp_loopfilter.c136
-rw-r--r--ntpd/ntp_parser.c1600
-rw-r--r--ntpd/ntp_parser.h158
-rw-r--r--ntpd/ntp_parser.y4
-rw-r--r--ntpd/ntp_peer.c20
-rw-r--r--ntpd/ntp_proto.c87
-rw-r--r--ntpd/ntpd-opts.c482
-rw-r--r--ntpd/ntpd-opts.h69
-rw-r--r--ntpd/ntpd.1ntpdman24
-rw-r--r--ntpd/ntpd.1ntpdmdoc21
-rw-r--r--ntpd/ntpd.c1
-rw-r--r--ntpd/ntpd.html76
-rw-r--r--ntpd/ntpd.man.in24
-rw-r--r--ntpd/ntpd.mdoc.in21
-rw-r--r--ntpd/ntpdbase-opts.def22
-rw-r--r--ntpd/refclock_palisade.c10
-rw-r--r--ntpd/refclock_palisade.h1
-rw-r--r--ntpd/refclock_parse.c838
-rw-r--r--ntpdate/Makefile.in10
-rw-r--r--ntpdc/Makefile.in10
-rw-r--r--ntpdc/invoke-ntpdc.texi4
-rw-r--r--ntpdc/ntpdc-opts.c14
-rw-r--r--ntpdc/ntpdc-opts.h6
-rw-r--r--ntpdc/ntpdc.1ntpdcman6
-rw-r--r--ntpdc/ntpdc.1ntpdcmdoc4
-rw-r--r--ntpdc/ntpdc.html4
-rw-r--r--ntpdc/ntpdc.man.in6
-rw-r--r--ntpdc/ntpdc.mdoc.in4
-rw-r--r--ntpq/Makefile.in10
-rw-r--r--ntpq/invoke-ntpq.texi4
-rw-r--r--ntpq/ntpq-opts.c14
-rw-r--r--ntpq/ntpq-opts.h6
-rw-r--r--ntpq/ntpq-subs.c2
-rw-r--r--ntpq/ntpq.1ntpqman6
-rw-r--r--ntpq/ntpq.1ntpqmdoc4
-rw-r--r--ntpq/ntpq.html4
-rw-r--r--ntpq/ntpq.man.in6
-rw-r--r--ntpq/ntpq.mdoc.in4
-rw-r--r--ntpsnmpd/Makefile.in10
-rw-r--r--ntpsnmpd/invoke-ntpsnmpd.texi4
-rw-r--r--ntpsnmpd/ntpsnmpd-opts.c14
-rw-r--r--ntpsnmpd/ntpsnmpd-opts.h6
-rw-r--r--ntpsnmpd/ntpsnmpd.1ntpsnmpdman6
-rw-r--r--ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc4
-rw-r--r--ntpsnmpd/ntpsnmpd.html2
-rw-r--r--ntpsnmpd/ntpsnmpd.man.in6
-rw-r--r--ntpsnmpd/ntpsnmpd.mdoc.in4
-rw-r--r--packageinfo.sh4
-rw-r--r--parseutil/Makefile.in10
-rw-r--r--parseutil/dcfd.c62
-rw-r--r--parseutil/testdcf.c25
-rw-r--r--ports/winnt/include/config.h2
-rw-r--r--ports/winnt/include/termios.h2
-rw-r--r--ports/winnt/libntp/arc4wrap.c84
-rw-r--r--ports/winnt/libntp/getclock.c2
-rw-r--r--ports/winnt/libntp/termios.c3
-rw-r--r--ports/winnt/ntpd/nt_clockstuff.c4
-rw-r--r--ports/winnt/vs2005/libntp.vcproj4
-rw-r--r--ports/winnt/vs2008/libntp/libntp.vcproj8
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcxproj1
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcxproj.filters6
-rw-r--r--scripts/Makefile.am1
-rw-r--r--scripts/Makefile.in11
-rw-r--r--scripts/build/Makefile.in10
-rw-r--r--scripts/calc_tickadj/Makefile.in10
-rw-r--r--scripts/calc_tickadj/calc_tickadj.1calc_tickadjman6
-rw-r--r--scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc4
-rw-r--r--scripts/calc_tickadj/calc_tickadj.html2
-rw-r--r--scripts/calc_tickadj/calc_tickadj.man.in6
-rw-r--r--scripts/calc_tickadj/calc_tickadj.mdoc.in4
-rw-r--r--scripts/calc_tickadj/invoke-calc_tickadj.texi2
-rw-r--r--scripts/invoke-plot_summary.texi4
-rw-r--r--scripts/invoke-summary.texi4
-rw-r--r--scripts/lib/Makefile.in10
-rw-r--r--scripts/lib/NTP/Util.pm19
-rw-r--r--scripts/ntp-wait/Makefile.in10
-rw-r--r--scripts/ntp-wait/invoke-ntp-wait.texi4
-rw-r--r--scripts/ntp-wait/ntp-wait-opts4
-rw-r--r--scripts/ntp-wait/ntp-wait.1ntp-waitman6
-rw-r--r--scripts/ntp-wait/ntp-wait.1ntp-waitmdoc4
-rw-r--r--scripts/ntp-wait/ntp-wait.html4
-rw-r--r--scripts/ntp-wait/ntp-wait.man.in6
-rw-r--r--scripts/ntp-wait/ntp-wait.mdoc.in4
-rw-r--r--scripts/ntpsweep/Makefile.in10
-rw-r--r--scripts/ntpsweep/invoke-ntpsweep.texi4
-rw-r--r--scripts/ntpsweep/ntpsweep-opts4
-rw-r--r--scripts/ntpsweep/ntpsweep.1ntpsweepman6
-rw-r--r--scripts/ntpsweep/ntpsweep.1ntpsweepmdoc4
-rw-r--r--scripts/ntpsweep/ntpsweep.html4
-rw-r--r--scripts/ntpsweep/ntpsweep.man.in6
-rw-r--r--scripts/ntpsweep/ntpsweep.mdoc.in4
-rw-r--r--scripts/ntptrace/Makefile.in10
-rw-r--r--scripts/ntptrace/invoke-ntptrace.texi4
-rw-r--r--scripts/ntptrace/ntptrace-opts4
-rw-r--r--scripts/ntptrace/ntptrace.1ntptraceman6
-rw-r--r--scripts/ntptrace/ntptrace.1ntptracemdoc4
-rw-r--r--scripts/ntptrace/ntptrace.html4
-rw-r--r--scripts/ntptrace/ntptrace.man.in6
-rw-r--r--scripts/ntptrace/ntptrace.mdoc.in4
-rw-r--r--scripts/plot_summary-opts4
-rw-r--r--scripts/plot_summary.1plot_summaryman6
-rw-r--r--scripts/plot_summary.1plot_summarymdoc4
-rw-r--r--scripts/plot_summary.html4
-rw-r--r--scripts/plot_summary.man.in6
-rw-r--r--scripts/plot_summary.mdoc.in4
-rw-r--r--scripts/summary-opts4
-rw-r--r--scripts/summary.1summaryman6
-rw-r--r--scripts/summary.1summarymdoc4
-rw-r--r--scripts/summary.html4
-rw-r--r--scripts/summary.man.in6
-rw-r--r--scripts/summary.mdoc.in4
-rw-r--r--scripts/update-leap/Makefile.am97
-rw-r--r--scripts/update-leap/Makefile.in887
-rw-r--r--scripts/update-leap/invoke-update-leap.menu1
-rw-r--r--scripts/update-leap/invoke-update-leap.texi170
-rw-r--r--scripts/update-leap/update-leap434
-rw-r--r--scripts/update-leap/update-leap-opts72
-rw-r--r--scripts/update-leap/update-leap-opts.def163
-rw-r--r--scripts/update-leap/update-leap.1update-leapman169
-rw-r--r--scripts/update-leap/update-leap.1update-leapmdoc134
-rw-r--r--scripts/update-leap/update-leap.html274
-rw-r--r--scripts/update-leap/update-leap.man.in169
-rw-r--r--scripts/update-leap/update-leap.mdoc.in134
-rw-r--r--scripts/update-leap/update-leap.texi43
-rw-r--r--sntp/Makefile.in13
-rw-r--r--sntp/aclocal.m44
-rwxr-xr-xsntp/configure44
-rw-r--r--sntp/include/Makefile.in13
-rw-r--r--sntp/include/version.def2
-rw-r--r--sntp/include/version.texi6
-rw-r--r--sntp/invoke-sntp.texi7
-rw-r--r--sntp/libevent/ChangeLog786
-rw-r--r--sntp/libevent/Makefile.am4
-rw-r--r--sntp/libevent/Makefile.in98
-rw-r--r--sntp/libevent/README218
-rw-r--r--sntp/libevent/WIN32-Code/nmake/event2/event-config.h4
-rw-r--r--sntp/libevent/WIN32-Code/tree.h677
-rw-r--r--sntp/libevent/aclocal.m43
-rw-r--r--sntp/libevent/buffer.c84
-rw-r--r--sntp/libevent/bufferevent.c13
-rw-r--r--sntp/libevent/bufferevent_async.c10
-rw-r--r--sntp/libevent/bufferevent_filter.c69
-rw-r--r--sntp/libevent/bufferevent_openssl.c2
-rw-r--r--sntp/libevent/bufferevent_pair.c33
-rw-r--r--sntp/libevent/config.h.in118
-rwxr-xr-xsntp/libevent/configure4647
-rw-r--r--sntp/libevent/configure.ac33
-rw-r--r--sntp/libevent/evbuffer-internal.h14
-rw-r--r--sntp/libevent/evdns.c113
-rw-r--r--sntp/libevent/event.c48
-rw-r--r--sntp/libevent/event_tagging.c15
-rw-r--r--sntp/libevent/evrpc-internal.h1
-rw-r--r--sntp/libevent/evthread-internal.h7
-rw-r--r--sntp/libevent/evthread.c23
-rw-r--r--sntp/libevent/evutil.c42
-rw-r--r--sntp/libevent/evutil_time.c50
-rw-r--r--sntp/libevent/ht-internal.h1
-rw-r--r--sntp/libevent/http-internal.h2
-rw-r--r--sntp/libevent/http.c47
-rw-r--r--sntp/libevent/include/event2/buffer.h11
-rw-r--r--sntp/libevent/include/event2/bufferevent.h9
-rw-r--r--sntp/libevent/include/event2/dns.h18
-rw-r--r--sntp/libevent/include/event2/event.h10
-rw-r--r--sntp/libevent/include/event2/http.h14
-rw-r--r--sntp/libevent/include/event2/listener.h9
-rw-r--r--sntp/libevent/include/event2/util.h69
-rw-r--r--sntp/libevent/kqueue.c17
-rw-r--r--sntp/libevent/listener.c5
-rw-r--r--sntp/libevent/m4/acx_pthread.m4279
-rw-r--r--sntp/libevent/sample/http-server.c7
-rw-r--r--sntp/libevent/sample/https-client.c17
-rw-r--r--sntp/libevent/sample/include.am2
-rw-r--r--sntp/libevent/test/include.am3
-rw-r--r--sntp/libevent/test/regress.c37
-rw-r--r--sntp/libevent/test/regress.h6
-rw-r--r--sntp/libevent/test/regress_buffer.c53
-rw-r--r--sntp/libevent/test/regress_bufferevent.c152
-rw-r--r--sntp/libevent/test/regress_dns.c155
-rw-r--r--sntp/libevent/test/regress_finalize.c1
-rw-r--r--sntp/libevent/test/regress_http.c116
-rw-r--r--sntp/libevent/test/regress_main.c4
-rw-r--r--sntp/libevent/test/regress_minheap.c5
-rw-r--r--sntp/libevent/test/regress_ssl.c1
-rw-r--r--sntp/libevent/test/regress_thread.c5
-rw-r--r--sntp/libevent/test/regress_util.c36
-rw-r--r--sntp/libevent/test/regress_zlib.c17
-rw-r--r--sntp/libevent/test/test-fdleak.c20
-rw-r--r--sntp/libevent/test/test-ratelim.c11
-rw-r--r--sntp/libevent/test/test-time.c15
-rw-r--r--sntp/libevent/test/tinytest.c33
-rw-r--r--sntp/libevent/test/tinytest.h2
-rw-r--r--sntp/libevent/test/tinytest_macros.h27
-rw-r--r--sntp/libevent/time-internal.h3
-rw-r--r--sntp/libevent/util-internal.h2
-rw-r--r--sntp/libevent/whatsnew-2.1.txt53
-rw-r--r--sntp/libopts/Makefile.in13
-rw-r--r--sntp/libopts/m4/libopts.m424
-rw-r--r--sntp/loc/darwin1
-rw-r--r--sntp/loc/debian1
-rw-r--r--sntp/loc/freebsd1
-rw-r--r--sntp/loc/legacy1
-rw-r--r--sntp/loc/netbsd1
-rw-r--r--sntp/loc/solaris1
-rw-r--r--sntp/m4/ax_c99_struct_init.m459
-rw-r--r--sntp/m4/ntp_libntp.m48
-rw-r--r--sntp/m4/ntp_locinfo.m46
-rw-r--r--sntp/m4/openldap-thread-check.m4 (renamed from sntp/libevent/m4/openldap-thread-check.m4)0
-rw-r--r--sntp/m4/openldap.m4 (renamed from sntp/libevent/m4/openldap.m4)0
-rw-r--r--sntp/m4/version.m42
-rw-r--r--sntp/main.c22
-rw-r--r--sntp/scripts/Makefile.in13
-rw-r--r--sntp/sntp-opts.c14
-rw-r--r--sntp/sntp-opts.def3
-rw-r--r--sntp/sntp-opts.h6
-rw-r--r--sntp/sntp.1sntpman9
-rw-r--r--sntp/sntp.1sntpmdoc7
-rw-r--r--sntp/sntp.html7
-rw-r--r--sntp/sntp.man.in9
-rw-r--r--sntp/sntp.mdoc.in7
-rw-r--r--sntp/tests/Makefile.in13
-rw-r--r--tests/Makefile.in10
-rw-r--r--tests/libntp/Makefile.in10
-rw-r--r--tests/ntpd/Makefile.in10
-rw-r--r--util/Makefile.am2
-rw-r--r--util/Makefile.in12
-rw-r--r--util/invoke-ntp-keygen.texi4
-rw-r--r--util/jitter.c3
-rw-r--r--util/jitter.h401
-rw-r--r--util/ntp-keygen-opts.c14
-rw-r--r--util/ntp-keygen-opts.h6
-rw-r--r--util/ntp-keygen.1ntp-keygenman6
-rw-r--r--util/ntp-keygen.1ntp-keygenmdoc4
-rw-r--r--util/ntp-keygen.c30
-rw-r--r--util/ntp-keygen.html4
-rw-r--r--util/ntp-keygen.man.in6
-rw-r--r--util/ntp-keygen.mdoc.in4
316 files changed, 13348 insertions, 9906 deletions
diff --git a/ChangeLog b/ChangeLog
index 400cf79340f5..e75384c88fab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,80 @@
---
+(4.2.8p2) 2015/04/07 Released by Harlan Stenn <stenn@ntp.org>
+(4.2.8p2-RC3) 2015/04/03 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2763] Fix for different thresholds for forward and backward steps.
+---
+(4.2.8p2-RC2) 2015/04/03 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2592] FLAG_TSTAMP_PPS cleanup for refclock_parse.c.
+* [Bug 2769] New script: update-leap
+* [Bug 2769] cleannup for update-leap
+* [Bug 2788] New flag -G (force_step_once).
+* [Bug 2794] Clean up kernel clock status reports.
+* [Bug 2795] Cannot build without OpenSLL (on Win32).
+ Provided a Win32 specific wrapper around libevent/arc4random.c.
+ fixed some minor warnings.
+* [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32.
+* [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys
+ on big-endian machines.
+* [Bug 2798] sntp should decode and display the leap indicator.
+* Simple cleanup to html/build.html
+---
+(4.2.8p2-RC1) 2015/03/30 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2794] Don't let reports on normal kernel status changes
+ look like errors.
+* [Bug 2788] New flag -G (force_step_once).
+* [Bug 2592] Account for PPS sources which can provide an accurate
+ absolute time stamp, and status information.
+ Fixed indention and removed trailing whitespace.
+* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument.
+* [Bug 2346] "graceful termination" signals do not do peer cleanup.
+* [Bug 2728] See if C99-style structure initialization works.
+* [Bug 2747] Upgrade libevent to 2.1.5-beta.
+* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. .
+* [Bug 2751] jitter.h has stale copies of l_fp macros.
+* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM.
+* [Bug 2757] Quiet compiler warnings.
+* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
+* [Bug 2763] Allow different thresholds for forward and backward steps.
+* [Bug 2766] ntp-keygen output files should not be world-readable.
+* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
+* [Bug 2771] nonvolatile value is documented in wrong units.
+* [Bug 2773] Early leap announcement from Palisade/Thunderbolt
+* [Bug 2774] Unreasonably verbose printout - leap pending/warning
+* [Bug 2775] ntp-keygen.c fails to compile under Windows.
+* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info.
+ Removed non-ASCII characters from some copyright comments.
+ Removed trailing whitespace.
+ Updated definitions for Meinberg clocks from current Meinberg header files.
+ Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Account for updated definitions pulled from Meinberg header files.
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Replaced some constant numbers by defines from ntp_calendar.h
+ Modified creation of parse-specific variables for Meinberg devices
+ in gps16x_message().
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling
+ if the time status shall be printed.
+* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+* [Sec 2781] Authentication doesn't protect symmetric associations against
+ DoS attacks.
+* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
+* [Bug 2789] Quiet compiler warnings from libevent.
+* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
+ pause briefly before measuring system clock precision to yield
+ correct results.
+* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer.
+* Use predefined function types for parse driver functions
+ used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast parse conversion results to appropriate types to avoid
+ compiler warnings.
+ Let ioctl() for Windows accept a (void *) to avoid compiler warnings
+ when called with pointers to different types.
+---
(4.2.8p1) 2015/02/04 Released by Harlan Stenn <stenn@ntp.org>
* Update the NEWS file.
@@ -14,7 +90,7 @@
(This should work for all versions of Windows >= W2K)
* [Bug 2738] Missing buffer initialization in refclocK_parse.c::parsestate().
* [Bug 2739] Parse driver with PPS enabled occasionally evaluates
- PPS timestamp with wrong sign.
+ PPS timestamp with wrong sign.
Removed some German umlauts.
* [Bug 2740] Removed some obsolete code from the parse driver.
* [Bug 2741] Incorrect buffer check in refclocK_parse.c::parsestatus().
@@ -94,7 +170,7 @@
* [Bug 2678] nmea_control() now checks 'refclock_params()' result.
(4.2.7p481) 2014/11/22 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2314] Only enable PPS if kernel consumer binding succeeds.
-* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition.
+* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition.
* Rename pps_enable to hardpps_enable.
(4.2.7p480) 2014/11/21 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2677] PATH_MAX isn't #define'd under Windows.
diff --git a/CommitLog b/CommitLog
index 38097ac6ccfe..0e87846dbfbd 100644
--- a/CommitLog
+++ b/CommitLog
@@ -1,3 +1,2569 @@
+ChangeSet@1.3320, 2015-04-07 04:28:16-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P2
+ TAG: NTP_4_2_8P2
+
+ ChangeLog@1.1633 +1 -0
+ NTP_4_2_8P2
+
+ ntpd/invoke-ntp.conf.texi@1.182 +1 -1
+ NTP_4_2_8P2
+
+ ntpd/invoke-ntp.keys.texi@1.178 +1 -1
+ NTP_4_2_8P2
+
+ ntpd/invoke-ntpd.texi@1.495 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.5man@1.216 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.5mdoc@1.216 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.html@1.173 +1 -1
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.man.in@1.216 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.mdoc.in@1.216 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.5man@1.212 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.5mdoc@1.212 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.html@1.174 +1 -1
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.man.in@1.212 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.mdoc.in@1.212 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntpd-opts.c@1.517 +245 -245
+ NTP_4_2_8P2
+
+ ntpd/ntpd-opts.h@1.516 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntpd.1ntpdman@1.324 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntpd.1ntpdmdoc@1.324 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntpd.html@1.168 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntpd.man.in@1.324 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntpd.mdoc.in@1.324 +2 -2
+ NTP_4_2_8P2
+
+ ntpdc/invoke-ntpdc.texi@1.492 +2 -2
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc-opts.c@1.510 +107 -107
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc-opts.h@1.509 +3 -3
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.1ntpdcman@1.323 +3 -3
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.323 +2 -2
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.html@1.336 +2 -2
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.man.in@1.323 +3 -3
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2
+
+ ntpq/invoke-ntpq.texi@1.498 +2 -2
+ NTP_4_2_8P2
+
+ ntpq/ntpq-opts.c@1.515 +106 -106
+ NTP_4_2_8P2
+
+ ntpq/ntpq-opts.h@1.513 +3 -3
+ NTP_4_2_8P2
+
+ ntpq/ntpq.1ntpqman@1.326 +3 -3
+ NTP_4_2_8P2
+
+ ntpq/ntpq.1ntpqmdoc@1.326 +2 -2
+ NTP_4_2_8P2
+
+ ntpq/ntpq.html@1.165 +2 -2
+ NTP_4_2_8P2
+
+ ntpq/ntpq.man.in@1.326 +3 -3
+ NTP_4_2_8P2
+
+ ntpq/ntpq.mdoc.in@1.326 +2 -2
+ NTP_4_2_8P2
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.494 +2 -2
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.512 +68 -68
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.511 +3 -3
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.323 +3 -3
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.323 +2 -2
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.html@1.163 +1 -1
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.man.in@1.323 +3 -3
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2
+
+ packageinfo.sh@1.509 +2 -2
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.84 +3 -3
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.85 +2 -2
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.html@1.86 +1 -1
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.83 +3 -3
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.85 +2 -2
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.88 +1 -1
+ NTP_4_2_8P2
+
+ scripts/invoke-plot_summary.texi@1.105 +2 -2
+ NTP_4_2_8P2
+
+ scripts/invoke-summary.texi@1.105 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.315 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait-opts@1.51 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.312 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.313 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.html@1.332 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.man.in@1.312 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.313 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep-opts@1.53 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.91 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.91 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.html@1.104 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.man.in@1.91 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.92 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.104 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace-opts@1.53 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.91 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.92 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.html@1.105 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.man.in@1.91 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.93 +2 -2
+ NTP_4_2_8P2
+
+ scripts/plot_summary-opts@1.53 +2 -2
+ NTP_4_2_8P2
+
+ scripts/plot_summary.1plot_summaryman@1.103 +3 -3
+ NTP_4_2_8P2
+
+ scripts/plot_summary.1plot_summarymdoc@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/plot_summary.html@1.106 +2 -2
+ NTP_4_2_8P2
+
+ scripts/plot_summary.man.in@1.103 +3 -3
+ NTP_4_2_8P2
+
+ scripts/plot_summary.mdoc.in@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/summary-opts@1.53 +2 -2
+ NTP_4_2_8P2
+
+ scripts/summary.1summaryman@1.103 +3 -3
+ NTP_4_2_8P2
+
+ scripts/summary.1summarymdoc@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/summary.html@1.106 +2 -2
+ NTP_4_2_8P2
+
+ scripts/summary.man.in@1.103 +3 -3
+ NTP_4_2_8P2
+
+ scripts/summary.mdoc.in@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/update-leap/invoke-update-leap.texi@1.4 +1 -1
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap-opts@1.4 +2 -2
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.1update-leapman@1.4 +3 -3
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.4 +2 -2
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.html@1.4 +1 -1
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.man.in@1.4 +3 -3
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.mdoc.in@1.4 +2 -2
+ NTP_4_2_8P2
+
+ sntp/invoke-sntp.texi@1.492 +2 -2
+ NTP_4_2_8P2
+
+ sntp/sntp-opts.c@1.511 +159 -159
+ NTP_4_2_8P2
+
+ sntp/sntp-opts.h@1.509 +3 -3
+ NTP_4_2_8P2
+
+ sntp/sntp.1sntpman@1.327 +3 -3
+ NTP_4_2_8P2
+
+ sntp/sntp.1sntpmdoc@1.327 +2 -2
+ NTP_4_2_8P2
+
+ sntp/sntp.html@1.507 +2 -2
+ NTP_4_2_8P2
+
+ sntp/sntp.man.in@1.327 +3 -3
+ NTP_4_2_8P2
+
+ sntp/sntp.mdoc.in@1.327 +2 -2
+ NTP_4_2_8P2
+
+ util/invoke-ntp-keygen.texi@1.495 +2 -2
+ NTP_4_2_8P2
+
+ util/ntp-keygen-opts.c@1.513 +173 -173
+ NTP_4_2_8P2
+
+ util/ntp-keygen-opts.h@1.511 +3 -3
+ NTP_4_2_8P2
+
+ util/ntp-keygen.1ntp-keygenman@1.323 +3 -3
+ NTP_4_2_8P2
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.323 +2 -2
+ NTP_4_2_8P2
+
+ util/ntp-keygen.html@1.169 +2 -2
+ NTP_4_2_8P2
+
+ util/ntp-keygen.man.in@1.323 +3 -3
+ NTP_4_2_8P2
+
+ util/ntp-keygen.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2
+
+ChangeSet@1.3319, 2015-04-07 04:05:46-04:00, stenn@deacon.udel.edu
+ ntp-4.2.8p2
+
+ packageinfo.sh@1.508 +2 -2
+ ntp-4.2.8p2
+
+ChangeSet@1.3318, 2015-04-07 07:57:32+00:00, stenn@psp-fb1.ntp.org
+ NEWS update
+
+ NEWS@1.135 +4 -2
+ NEWS update
+
+ChangeSet@1.3314.1.3, 2015-04-03 03:56:38-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P2_RC3
+ TAG: NTP_4_2_8P2_RC3
+
+ ChangeLog@1.1629.1.3 +1 -0
+ NTP_4_2_8P2_RC3
+
+ ntpd/invoke-ntp.conf.texi@1.181 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/invoke-ntp.keys.texi@1.177 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/invoke-ntpd.texi@1.494 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.5man@1.215 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.5mdoc@1.215 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.html@1.172 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.man.in@1.215 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.mdoc.in@1.215 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.5man@1.211 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.5mdoc@1.211 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.html@1.173 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.man.in@1.211 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.mdoc.in@1.211 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd-opts.c@1.516 +7 -7
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd-opts.h@1.515 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.1ntpdman@1.323 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.1ntpdmdoc@1.323 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.html@1.167 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.man.in@1.323 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.mdoc.in@1.323 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpdc/invoke-ntpdc.texi@1.491 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc-opts.c@1.509 +7 -7
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc-opts.h@1.508 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.1ntpdcman@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.html@1.335 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.man.in@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.mdoc.in@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpq/invoke-ntpq.texi@1.497 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq-opts.c@1.514 +7 -7
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq-opts.h@1.512 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.1ntpqman@1.325 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.1ntpqmdoc@1.325 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.html@1.164 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.man.in@1.325 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.mdoc.in@1.325 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.493 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.511 +7 -7
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.510 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.html@1.162 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.man.in@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ packageinfo.sh@1.507 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.83 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.84 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.html@1.85 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.82 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.84 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.87 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/invoke-plot_summary.texi@1.104 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/invoke-summary.texi@1.104 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.314 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.311 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.312 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.html@1.331 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.man.in@1.311 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.312 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.102 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep-opts@1.52 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.90 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.90 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.html@1.103 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.man.in@1.90 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.91 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.103 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace-opts@1.52 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.90 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.91 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.html@1.104 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.man.in@1.90 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.92 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary-opts@1.52 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.1plot_summaryman@1.102 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.1plot_summarymdoc@1.102 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.html@1.105 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.man.in@1.102 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.mdoc.in@1.102 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/summary-opts@1.52 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.1summaryman@1.102 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.1summarymdoc@1.102 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.html@1.105 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.man.in@1.102 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.mdoc.in@1.102 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/invoke-update-leap.texi@1.3 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap-opts@1.3 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.1update-leapman@1.3 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.3 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.html@1.3 +6 -5
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.man.in@1.3 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.mdoc.in@1.3 +1 -1
+ NTP_4_2_8P2_RC3
+
+ sntp/invoke-sntp.texi@1.491 +2 -2
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp-opts.c@1.510 +7 -7
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp-opts.h@1.508 +3 -3
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.1sntpman@1.326 +3 -3
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.1sntpmdoc@1.326 +1 -1
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.html@1.506 +2 -2
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.man.in@1.326 +3 -3
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.mdoc.in@1.326 +1 -1
+ NTP_4_2_8P2_RC3
+
+ util/invoke-ntp-keygen.texi@1.494 +2 -2
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen-opts.c@1.512 +7 -7
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen-opts.h@1.510 +3 -3
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.1ntp-keygenman@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.html@1.168 +2 -2
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.man.in@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.mdoc.in@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ChangeSet@1.3314.1.2, 2015-04-03 03:35:54-04:00, stenn@deacon.udel.edu
+ [Bug 2763] Fix for different thresholds for forward and backward steps
+
+ ChangeLog@1.1629.1.2 +3 -0
+ [Bug 2763] Fix for different thresholds for forward and backward steps
+
+ ntpd/ntp_loopfilter.c@1.183 +2 -2
+ [Bug 2763] Fix for different thresholds for forward and backward steps
+
+ChangeSet@1.3314.1.1, 2015-04-03 01:16:34-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P2_RC2
+ TAG: NTP_4_2_8P2_RC2
+
+ ChangeLog@1.1629.1.1 +1 -0
+ NTP_4_2_8P2_RC2
+
+ ntpd/invoke-ntp.conf.texi@1.180 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpd/invoke-ntp.keys.texi@1.176 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpd/invoke-ntpd.texi@1.493 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.5man@1.214 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.5mdoc@1.214 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.html@1.171 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.man.in@1.214 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.mdoc.in@1.214 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.5man@1.210 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.5mdoc@1.210 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.html@1.172 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.man.in@1.210 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.mdoc.in@1.210 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd-opts.c@1.515 +7 -7
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd-opts.h@1.514 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.1ntpdman@1.322 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.1ntpdmdoc@1.322 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.html@1.166 +50 -26
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.man.in@1.322 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.mdoc.in@1.322 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpdc/invoke-ntpdc.texi@1.490 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc-opts.c@1.508 +7 -7
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc-opts.h@1.507 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.1ntpdcman@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.html@1.334 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.man.in@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.mdoc.in@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpq/invoke-ntpq.texi@1.496 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq-opts.c@1.513 +7 -7
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq-opts.h@1.511 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.1ntpqman@1.324 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.1ntpqmdoc@1.324 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.html@1.163 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.man.in@1.324 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.mdoc.in@1.324 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.492 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.510 +7 -7
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.509 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.html@1.161 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.man.in@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ packageinfo.sh@1.506 +1 -1
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.82 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.83 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.html@1.84 +1 -1
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.81 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.83 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.86 +1 -1
+ NTP_4_2_8P2_RC2
+
+ scripts/invoke-plot_summary.texi@1.103 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/invoke-summary.texi@1.103 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.313 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait-opts@1.49 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.310 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.311 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.html@1.330 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.man.in@1.310 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.311 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep-opts@1.51 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.89 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.89 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.html@1.102 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.man.in@1.89 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.90 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.102 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace-opts@1.51 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.89 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.90 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.html@1.103 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.man.in@1.89 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.91 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary-opts@1.51 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.1plot_summaryman@1.101 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.1plot_summarymdoc@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.html@1.104 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.man.in@1.101 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.mdoc.in@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/summary-opts@1.51 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.1summaryman@1.101 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.1summarymdoc@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.html@1.104 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.man.in@1.101 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.mdoc.in@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/invoke-update-leap.texi@1.2 +6 -5
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap-opts@1.2 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.1update-leapman@1.2 +7 -6
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.2 +6 -5
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.html@1.2 +48 -72
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.man.in@1.2 +7 -6
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.mdoc.in@1.2 +6 -5
+ NTP_4_2_8P2_RC2
+
+ sntp/invoke-sntp.texi@1.490 +2 -2
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp-opts.c@1.509 +7 -7
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp-opts.h@1.507 +3 -3
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.1sntpman@1.325 +3 -3
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.1sntpmdoc@1.325 +2 -2
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.html@1.505 +111 -135
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.man.in@1.325 +3 -3
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.mdoc.in@1.325 +2 -2
+ NTP_4_2_8P2_RC2
+
+ util/invoke-ntp-keygen.texi@1.493 +2 -2
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen-opts.c@1.511 +7 -7
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen-opts.h@1.509 +3 -3
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.1ntp-keygenman@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.html@1.167 +2 -2
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.man.in@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.mdoc.in@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ChangeSet@1.3314, 2015-04-03 02:36:18+00:00, stenn@psp-fb1.ntp.org
+ merge cleanup
+
+ NEWS@1.133 +6 -5
+ merge cleanup
+
+ChangeSet@1.3313, 2015-04-03 02:31:18+00:00, stenn@psp-fb1.ntp.org
+ merge cleanup
+
+ ChangeLog@1.1629 +3 -3
+ merge cleanup
+
+ChangeSet@1.3308.2.11, 2015-04-02 21:42:37+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2592] FLAG_TSTAMP_PPS cleanup for refclock_parse.c
+
+ ChangeLog@1.1625.2.9 +1 -0
+ [Bug 2592] FLAG_TSTAMP_PPS cleanup for refclock_parse.c
+
+ChangeSet@1.3308.2.10, 2015-04-02 20:17:55+00:00, stenn@psp-deb1.ntp.org
+ merge cleanup
+
+ ChangeLog@1.1625.2.8 +1 -3
+ merge cleanup
+
+ChangeSet@1.3308.2.9, 2015-04-02 21:41:22+02:00, jnperlin@nemesis.localnet
+ [Bug 2795] Cannot build without OpenSLL (on Win32).
+ fixed minor warning
+
+ ChangeLog@1.1625.2.7 +3 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32).
+ fixed minor warning
+
+ include/ntp_md5.h@1.10 +1 -1
+ [Bug 2795] Cannot build without OpenSLL (on Win32).
+ OpenSSL declares EVP_md5() as function without arguments; surrogate should do the same.
+
+ChangeSet@1.3308.6.2, 2015-04-02 07:45:04+00:00, stenn@psp-deb1.ntp.org
+ cleanup
+
+ ChangeLog@1.1625.6.3 +0 -2
+ cleanup
+
+ ChangeLog@1.1625.6.2 +6 -0
+
+ ntpd/invoke-ntpd.texi@1.492 +20 -3
+ [Bug 2788] New -G flag (force step once) cleanup.
+
+ ntpd/ntp_loopfilter.c@1.182 +17 -6
+ [Bug 2794] Clean up kernel clock status reports.
+ Trailing whitespace cleanup.
+
+ ntpd/ntpd-opts.c@1.514 +249 -249
+ Autogenerated file.
+
+ ntpd/ntpd-opts.h@1.513 +3 -3
+ Autogenerated file.
+
+ ntpd/ntpd.1ntpdman@1.321 +19 -5
+ Autogenerated file.
+
+ ntpd/ntpd.1ntpdmdoc@1.321 +17 -4
+ Autogenerated file.
+
+ ntpd/ntpd.man.in@1.321 +19 -5
+ Autogenerated file.
+
+ ntpd/ntpd.mdoc.in@1.321 +17 -4
+ Autogenerated file.
+
+ ntpd/ntpdbase-opts.def@1.29 +9 -6
+ [Bug 2788] New flag -G (force_step_once) - documentation cleanup.
+
+ChangeSet@1.3308.2.7, 2015-04-02 07:34:40+00:00, stenn@psp-deb1.ntp.org
+ Simple cleanup to html/build.html
+
+ ChangeLog@1.1625.2.5 +1 -0
+ Simple cleanup to html/build.html
+
+ html/build.html@1.28 +2 -2
+ Simple cleanup to html/build.html
+
+ChangeSet@1.3308.2.6, 2015-04-02 03:15:42+00:00, stenn@psp-fb1.ntp.org
+ typos
+
+ ChangeLog@1.1625.2.4 +4 -4
+ typos
+
+ChangeSet@1.3308.5.2, 2015-04-01 11:08:14+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ html/sntp.html@1.12 +3 -3
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/invoke-sntp.texi@1.489 +4 -3
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp-opts.c@1.508 +1 -1
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp-opts.def@1.47 +2 -1
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp-opts.h@1.506 +1 -1
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.1sntpman@1.324 +5 -4
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.1sntpmdoc@1.324 +4 -3
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.html@1.504 +136 -111
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.man.in@1.324 +5 -4
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.mdoc.in@1.324 +4 -3
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ChangeSet@1.3308.5.1, 2015-04-01 10:44:24+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ ChangeLog@1.1625.5.1 +3 -0
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/main.c@1.95 +21 -1
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ChangeSet@1.3308.4.1, 2015-03-30 20:14:46+02:00, jnperlin@hydra.(none)
+ [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys on big-endian machines
+
+ ChangeLog@1.1625.4.1 +3 -0
+ [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys on big-endian machines
+
+ util/ntp-keygen.c@1.104 +4 -4
+ [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys on big-endian machines
+
+ChangeSet@1.3308.3.1, 2015-03-30 19:39:17+02:00, jnperlin@nemesis.localnet
+ [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32
+
+ ChangeLog@1.1625.3.1 +2 -0
+ [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32
+
+ ports/winnt/libntp/getclock.c@1.5 +2 -0
+ [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32
+ make sure 'init_win_precise_time()' gets called
+
+ChangeSet@1.3308.2.4, 2015-03-30 19:10:12+02:00, jnperlin@nemesis.localnet
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ChangeLog@1.1625.2.2 +3 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/libntp/arc4wrap.c@1.1 +84 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/libntp/arc4wrap.c@1.0 +0 -0
+
+ ports/winnt/vs2005/libntp.vcproj@1.24 +4 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.52 +6 -2
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.6 +1 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.4 +6 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ChangeSet@1.3305.3.8, 2015-03-30 15:55:43+02:00, martin@pc-martin.(none)
+ [Bug 2794] Don't let reports on normal kernel status changes look like errors.
+
+ ChangeLog@1.1622.3.8 +2 -0
+ [Bug 2794] Don't let reports on normal kernel status changes look like errors.
+
+ ntpd/ntp_loopfilter.c@1.181 +30 -19
+ [Bug 2794] Don't let reports on normal kernel status changes look like errors.
+
+ChangeSet@1.3305.3.7, 2015-03-30 11:23:48+02:00, martin@pc-martin.(none)
+ [Bug 2788] New flag -G (force_step_once)
+
+ ChangeLog@1.1622.3.7 +1 -0
+ [Bug 2788] New flag -G (force_step_once)
+
+ include/ntpd.h@1.185.1.1 +4 -3
+ [Bug 2788] Support new flag -G (force_step_once)
+ Removed trailing whitespace.
+
+ ntpd/cmd_args.c@1.62 +6 -3
+ [Bug 2788] New flag -G (force_step_once)
+ Removed trailing whitespace.
+
+ ntpd/ntp_loopfilter.c@1.180 +21 -15
+ [Bug 2788] New flag -G (force_step_once)
+ Removed trailing whitespace.
+
+ ntpd/ntpd-opts.c@1.511.1.1 +255 -225
+ [Bug 2788] New flag -G (force_step_once)
+
+ ntpd/ntpd-opts.h@1.510.1.1 +36 -29
+ [Bug 2788] New flag -G (force_step_once)
+
+ ntpd/ntpdbase-opts.def@1.28 +17 -2
+ [Bug 2788] New flag -G (force_step_once)
+ Removed trailing whitespace.
+
+ChangeSet@1.3308.1.3, 2015-03-30 09:11:33+00:00, stenn@psp-fb1.ntp.org
+ Start the RC cycle for ntp-4.2.8p2
+
+ NEWS@1.130.1.2 +82 -1
+ Start the RC cycle for ntp-4.2.8p2
+
+ChangeSet@1.3308.2.3, 2015-03-30 04:48:27-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P2_RC1
+ TAG: NTP_4_2_8P2_RC1
+
+ ChangeLog@1.1625.2.1 +1 -0
+ NTP_4_2_8P2_RC1
+
+ ntpd/invoke-ntp.conf.texi@1.179 +1 -1
+ NTP_4_2_8P2_RC1
+
+ ntpd/invoke-ntp.keys.texi@1.175 +1 -1
+ NTP_4_2_8P2_RC1
+
+ ntpd/invoke-ntpd.texi@1.491 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.5man@1.213 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.5mdoc@1.213 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.html@1.170 +13 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.man.in@1.213 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.mdoc.in@1.213 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.5man@1.209 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.5mdoc@1.209 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.html@1.171 +1 -1
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.man.in@1.209 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.mdoc.in@1.209 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd-opts.c@1.512 +239 -239
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd-opts.h@1.511 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.1ntpdman@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.1ntpdmdoc@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.html@1.165 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.man.in@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.mdoc.in@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpdc/invoke-ntpdc.texi@1.489 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc-opts.c@1.507 +107 -107
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc-opts.h@1.506 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.1ntpdcman@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.html@1.333 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.man.in@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.mdoc.in@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpq/invoke-ntpq.texi@1.495 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq-opts.c@1.512 +106 -106
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq-opts.h@1.510 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.1ntpqman@1.323 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.1ntpqmdoc@1.323 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.html@1.162 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.man.in@1.323 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.491 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.509 +68 -68
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.508 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.html@1.160 +1 -1
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.man.in@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ packageinfo.sh@1.505 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.81 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.82 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.html@1.83 +1 -1
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.80 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.82 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.85 +1 -1
+ NTP_4_2_8P2_RC1
+
+ scripts/invoke-plot_summary.texi@1.102 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/invoke-summary.texi@1.102 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.312 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait-opts@1.48 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.309 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.310 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.html@1.329 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.man.in@1.309 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.310 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.88 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.88 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.html@1.101 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.man.in@1.88 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.89 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.101 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.88 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.89 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.html@1.102 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.man.in@1.88 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.90 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.1plot_summaryman@1.100 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.1plot_summarymdoc@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.html@1.103 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.man.in@1.100 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.mdoc.in@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/summary-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.1summaryman@1.100 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.1summarymdoc@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.html@1.103 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.man.in@1.100 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.mdoc.in@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ sntp/invoke-sntp.texi@1.488 +2 -2
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp-opts.c@1.507 +159 -159
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp-opts.h@1.505 +3 -3
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.1sntpman@1.323 +3 -3
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.1sntpmdoc@1.323 +2 -2
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.html@1.503 +2 -2
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.man.in@1.323 +3 -3
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2_RC1
+
+ util/invoke-ntp-keygen.texi@1.492 +2 -2
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen-opts.c@1.510 +173 -173
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen-opts.h@1.508 +3 -3
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.1ntp-keygenman@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.html@1.166 +2 -2
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.man.in@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.mdoc.in@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ChangeSet@1.3308.2.2, 2015-03-30 04:25:58-04:00, stenn@deacon.udel.edu
+ Begin 4.2.8p2-RC1
+
+ packageinfo.sh@1.504 +1 -1
+ Begin 4.2.8p2-RC1
+
+ChangeSet@1.3308.2.1, 2015-03-30 08:18:35+00:00, stenn@psp-fb1.ntp.org
+ Start the RC cycle for ntp-4.2.8p2
+
+ NEWS@1.130.1.1 +49 -0
+ Start the RC cycle for ntp-4.2.8p2
+
+ChangeSet@1.3311, 2015-03-29 05:05:41+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2769] cleannup for update-leap
+
+ ChangeLog@1.1627 +1 -0
+ [Bug 2769] cleannup for update-leap
+
+ChangeSet@1.3310, 2015-03-29 04:10:31+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2769] cleannup for update-leap
+
+ NEWS@1.131 +8 -0
+ [Bug 2769] cleannup for update-leap
+
+ scripts/update-leap/Makefile.am@1.3 +1 -0
+ [Bug 2769] cleannup for update-leap
+
+ scripts/update-leap/update-leap-opts.def@1.2 +4 -3
+ [Bug 2769] cleannup for update-leap
+
+ChangeSet@1.3308, 2015-03-29 01:49:10+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ ChangeLog@1.1625 +1 -0
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ include/ntpd.h@1.186 +1 -0
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ ntpd/ntp_peer.c@1.154 +20 -0
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ ntpd/ntpd.c@1.159 +1 -0
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ChangeSet@1.3305.3.6, 2015-03-25 17:32:25+01:00, martin@pc-martin.(none)
+ [Bug 2592] Account for PPS sources which can provide an accurate absolute time stamp, and status information.
+
+ ChangeLog@1.1622.3.6 +2 -0
+ [Bug 2592] Account for PPS sources which can provide an accurate absolute time stamp, and status information.
+
+ include/ntp.h@1.213 +2 -1
+ New flag FLAG_TSTAMP_PPS.
+
+ ntpd/ntp_proto.c@1.353.1.2 +2 -1
+ [Bug 2592] Account for PPS sources which can provide an accurate absolute time stamp, and status information.
+
+ ntpd/refclock_parse.c@1.78 +2 -2
+ [Bug 2592] Parse driver can return absolute timestamp with PPS, and status information.
+
+ChangeSet@1.3305.3.5, 2015-03-25 17:24:59+01:00, martin@pc-martin.(none)
+ Fixed indention and removed trailing whitespace.
+
+ ChangeLog@1.1622.3.5 +1 -0
+ Fixed indention and removed trailing whitespace.
+
+ include/ntp.h@1.212 +4 -4
+ Fixed indention.
+
+ include/parse_conf.h@1.7 +6 -6
+ Fixed indention.
+
+ ntpd/ntp_proto.c@1.353.1.1 +27 -27
+ Removed trailing whitespace.
+
+ ntpd/refclock_parse.c@1.77 +16 -16
+ Fixed indention.
+
+ChangeSet@1.3305.3.4, 2015-03-22 07:59:12+00:00, stenn@psp-fb1.ntp.org
+ merge cleanup
+
+ ChangeLog@1.1622.3.4 +0 -1
+ merge cleanup
+
+ChangeSet@1.3305.5.3, 2015-03-22 07:24:07+00:00, stenn@psp-fb1.ntp.org
+ Bug 2791 -> Bug 2789
+
+ ChangeLog@1.1622.5.3 +1 -1
+ Bug 2791 -> Bug 2789
+
+ChangeSet@1.3305.5.2, 2015-03-22 06:59:06+00:00, stenn@psp-fb1.ntp.org
+ Merge cleanup
+
+ ChangeLog@1.1622.5.2 +22 -22
+ Merge cleanup
+
+ChangeSet@1.3305.4.2, 2015-03-22 03:48:52+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2769] New script: update-leap
+
+ .point-changed-filelist@1.26 +7 -0
+ [Bug 2769] New script: update-leap
+
+ scripts/update-leap/Makefile.am@1.2 +2 -1
+ [Bug 2769] New script: update-leap
+
+ChangeSet@1.3305.4.1, 2015-03-22 03:01:33+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2769] New script: update-leap
+
+ BitKeeper/etc/ignore@1.86 +1 -0
+ added Makefile.in
+
+ ChangeLog@1.1622.4.1 +1 -0
+ [Bug 2769] New script: update-leap
+
+ configure.ac@1.585 +8 -7
+ [Bug 2769] New script: update-leap
+
+ scripts/Makefile.am@1.40 +1 -0
+ [Bug 2769] New script: update-leap
+
+ scripts/update-leap/Makefile.am@1.1 +95 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/Makefile.am
+
+ scripts/update-leap/Makefile.am@1.0 +0 -0
+
+ scripts/update-leap/invoke-update-leap.menu@1.1 +1 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/invoke-update-leap.menu
+
+ scripts/update-leap/invoke-update-leap.menu@1.0 +0 -0
+
+ scripts/update-leap/invoke-update-leap.texi@1.1 +169 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/invoke-update-leap.texi
+
+ scripts/update-leap/invoke-update-leap.texi@1.0 +0 -0
+
+ scripts/update-leap/update-leap@1.1 +434 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap
+
+ scripts/update-leap/update-leap@1.0 +0 -0
+
+ scripts/update-leap/update-leap-opts@1.1 +72 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap-opts
+
+ scripts/update-leap/update-leap-opts@1.0 +0 -0
+
+ scripts/update-leap/update-leap-opts.def@1.1 +162 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap-opts.def
+
+ scripts/update-leap/update-leap-opts.def@1.0 +0 -0
+
+ scripts/update-leap/update-leap.1update-leapman@1.1 +168 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.1update-leapman
+
+ scripts/update-leap/update-leap.1update-leapman@1.0 +0 -0
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.1 +133 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.1update-leapmdoc
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.0 +0 -0
+
+ scripts/update-leap/update-leap.html@1.1 +297 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.html
+
+ scripts/update-leap/update-leap.html@1.0 +0 -0
+
+ scripts/update-leap/update-leap.man.in@1.1 +168 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.man.in
+
+ scripts/update-leap/update-leap.man.in@1.0 +0 -0
+
+ scripts/update-leap/update-leap.mdoc.in@1.1 +133 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.mdoc.in
+
+ scripts/update-leap/update-leap.mdoc.in@1.0 +0 -0
+
+ scripts/update-leap/update-leap.texi@1.1 +43 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.texi
+
+ scripts/update-leap/update-leap.texi@1.0 +0 -0
+
+ sntp/loc/darwin@1.3 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/debian@1.4 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/freebsd@1.6 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/legacy@1.7 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/netbsd@1.4 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/solaris@1.7 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/m4/ntp_locinfo.m4@1.18 +6 -0
+ [Bug 2769] New script: update-leap
+
+ChangeSet@1.3305.3.1, 2015-03-20 13:03:38+01:00, burnicki@pc-martin4.
+ [Bug 2790] If ntpd sets the Windows MM timer highest resolution then pause
+ briefly before measuring system clock precision to yield correct results.
+
+ ChangeLog@1.1622.3.1 +3 -1
+ [Bug 2790] If ntpd sets the Windows MM timer highest resolution then pause
+ briefly before measuring system clock precision to yield correct results.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.65 +4 -0
+ [Bug 2790] If ntpd sets the Windows MM timer highest resolution then pause
+ briefly before measuring system clock precision to yield correct results.
+
+ChangeSet@1.3305.2.6, 2015-03-20 11:47:15+01:00, martin@pc-martin.(none)
+ [Bug 2791] Quiet compiler warnings from libevent.
+
+ ChangeLog@1.1622.2.6 +1 -0
+ [Bug 2791] Quiet compiler warnings from libevent.
+
+ sntp/libevent/evthread-internal.h@1.8 +2 -2
+ [Bug 2791] Fixed function prototypes to quiet compiler warnings.
+
+ChangeSet@1.3305.2.5, 2015-03-20 11:36:15+01:00, martin@pc-martin.(none)
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ ChangeLog@1.1622.2.5 +4 -3
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ include/parse.h@1.12 +3 -3
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ libparse/clk_meinberg.c@1.14 +7 -4
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ libparse/clk_rawdcf.c@1.20 +3 -2
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ libparse/clk_schmid.c@1.13 +3 -3
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ libparse/parse.c@1.19 +1 -1
+ Quiet compiler warning.
+
+ ntpd/refclock_parse.c@1.76 +1 -1
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ parseutil/dcfd.c@1.28 +26 -25
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+ Removed trailing whitespace.
+
+ parseutil/testdcf.c@1.10 +11 -10
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+ Removed trailing whitespace and fixed indention.
+
+ChangeSet@1.3305.2.4, 2015-03-19 17:00:30+01:00, martin@pc-martin.(none)
+ Added a comment from Juergen Perlinger in ntp_date.c to make the code clearer.
+
+ ChangeLog@1.1622.2.4 +1 -0
+ Added a comment from Juergen Perlinger in ntp_date.c to make the code clearer.
+
+ libntp/ntp_calendar.c@1.15 +40 -34
+ Added a comment from Juergen Perlinger to make the code clearer.
+ Removed trailing whitespace.
+
+ChangeSet@1.3305.2.3, 2015-03-19 16:52:05+01:00, martin@pc-martin.(none)
+ Use predefined function types for parse driver functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast parse conversion results to appropriate types to avoid compiler warnings.
+ Let ioctl() for Windows accept a (void *) to avoid compiler warnings when called with pointers to different types.
+
+ ChangeLog@1.1622.2.3 +7 -0
+ Use predefined function types for parse driver functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast parse conversion results to appropriate types to avoid compiler warnings.
+ Let ioctl() for Windows accept a (void *) to avoid compiler warnings when called with pointers to different types.
+
+ include/binio.h@1.6 +10 -0
+ Added macros casting the result of the conversion function to a dedicated with to avoid compiler warnings.
+
+ include/mbg_gps166.h@1.13 +1 -1
+ Use specific data type with mbg_csum() to avoid compiler warnings.
+
+ include/parse.h@1.11 +15 -11
+ Introduced some dedicated function types simplifying use with function pointers.
+ Let parse input functions expect a char instead of an unsigned int since chars are used anyway.
+ This helps to avoid compiler warnings.
+
+ libparse/clk_computime.c@1.12 +10 -10
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_dcf7000.c@1.12 +8 -7
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_hopf6021.c@1.11 +21 -20
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_meinberg.c@1.13 +20 -19
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast conversion results to appropriate types to avoid compiler warnings.
+
+ libparse/clk_rawdcf.c@1.19 +8 -7
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast to appropriate types to avoid compiler warnings.
+
+ libparse/clk_rcc8000.c@1.11 +17 -16
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_schmid.c@1.12 +9 -9
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_sel240x.c@1.4 +5 -11
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast to appropriate types to avoid compiler warnings.
+
+ libparse/clk_trimtaip.c@1.12 +8 -7
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_trimtsip.c@1.13 +18 -18
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast conversion results to appropriate types to avoid compiler warnings.
+ Use commonly defined constants to handle GPS week number wraparounds.
+
+ libparse/clk_varitext.c@1.11 +6 -5
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_wharton.c@1.10 +7 -4
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/data_mbg.c@1.15 +36 -36
+ Cast conversion results to appropriate types to avoid compiler warnings.
+
+ libparse/gpstolfp.c@1.12 +1 -1
+ Type cast to avoid compiler warning.
+
+ libparse/parse.c@1.18 +14 -14
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast conversion results to appropriate types to avoid compiler warnings.
+
+ ntpd/refclock_parse.c@1.75 +49 -48
+ Cast conversion results to appropriate types to avoid compiler warnings.
+
+ ports/winnt/include/termios.h@1.17 +1 -1
+ Changed the prototype for ioctl() to accept a (void *) to avoid compiler warnings when called with pointers to different types.
+
+ ports/winnt/libntp/termios.c@1.30 +2 -1
+ Let ioctl() accept a (void *) to avoid compiler warnings when called with pointers to different types.
+
+ChangeSet@1.3305.1.19, 2015-03-19 07:54:24+00:00, stenn@psp-deb1.ntp.org
+ ntp_proto.c, ChangeLog:
+ [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+ [Sec 2781] Authentication doesn't protect symmetric associations against DoS attacks.
+
+ ChangeLog@1.1622.1.16 +3 -0
+ [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+ [Sec 2781] Authentication doesn't protect symmetric associations against DoS attacks.
+
+ ntpd/ntp_proto.c@1.354 +16 -14
+ [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+ [Sec 2781] Authentication doesn't protect symmetric associations against DoS attacks.
+
+ChangeSet@1.3305.1.18, 2015-03-16 09:17:42+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ChangeLog@1.1622.1.15 +1 -0
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ include/ntp.h@1.211 +13 -11
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ include/ntpd.h@1.185 +2 -1
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/invoke-ntp.conf.texi@1.178 +15 -2
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/keyword-gen-utd@1.22 +1 -1
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/keyword-gen.c@1.27 +2 -0
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.5man@1.212 +19 -4
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.5mdoc@1.212 +18 -3
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.def@1.15 +16 -1
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.man.in@1.212 +19 -4
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.mdoc.in@1.212 +18 -3
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_config.c@1.323 +8 -0
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_keyword.h@1.24 +492 -483
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_loopfilter.c@1.179 +27 -5
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_parser.c@1.90 +803 -797
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_parser.h@1.56 +81 -77
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_parser.y@1.83 +4 -0
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ChangeSet@1.3305.2.2, 2015-03-13 10:28:32+01:00, martin@pc-martin.(none)
+ Removed non-ASCII characters from some copyright comments.
+ Removed trailing whitespace.
+ Updated definitions for Meinberg clocks from current Meinberg header files. Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Account for updated definitions pulled from Meinberg header files.
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Replaced some constant numbers by defines from ntp_calendar.h
+ Modified creation of parse-specific variables for Meinberg devices in gps16x_message().
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling if the time status shall be printed.
+
+ ChangeLog@1.1622.2.2 +12 -0
+ Removed non-ASCII characters from some copyright comments.
+ Removed trailing whitespace.
+ Updated definitions for Meinberg clocks from current Meinberg header files. Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Account for updated definitions pulled from Meinberg header files.
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Replaced some constant numbers by defines from ntp_calendar.h
+ Modified creation of parse-specific variables for Meinberg devices in gps16x_message().
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling if the time status shall be printed.
+
+ include/mbg_gps166.h@1.12 +841 -408
+ Updated definitions for Meinberg clocks from current Meinberg header files. Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Updated prototype for mbg_tm_str() which now takes one more parameter.
+
+ include/ntp_calendar.h@1.17 +4 -2
+ Added definitions for DAYSPERWEEK and SECSPERWEEK.
+
+ include/parse.h@1.10 +14 -7
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+ Moved a few definitions from gpstolfp.c here so they can also be used in other c modules.
+
+ include/parse_conf.h@1.6 +1 -1
+ Removed non-ASCII characters from copyright comment.
+
+ kernel/sys/parsestreams.h@1.8 +1 -1
+ Removed non-ASCII characters from copyright comment.
+
+ libparse/clk_computime.c@1.11 +23 -23
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_dcf7000.c@1.11 +7 -7
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_meinberg.c@1.12 +71 -70
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_rawdcf.c@1.18 +12 -12
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_schmid.c@1.11 +7 -7
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_trimtaip.c@1.11 +5 -5
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_trimtsip.c@1.12 +13 -13
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_varitext.c@1.10 +38 -38
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_wharton.c@1.9 +1 -1
+ Fixed a typo.
+
+ libparse/data_mbg.c@1.14 +39 -36
+ Account for updated definitions pulled from Meinberg header files.
+ Updated definitions for Meinberg clocks from current Meinberg header files. Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Replaced some constant numbers by defines from ntp_calendar.h.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling if the time status shall be printed.
+
+ libparse/gpstolfp.c@1.11 +4 -6
+ Moved some commonly used constants to parse.h.
+ Removed duplicate defines and use those in ntp_calendar.h.
+ Also replaced some constant numbers by defines from ntp_calendar.h.
+
+ libparse/parse.c@1.17 +46 -46
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/parse_conf.c@1.11 +2 -2
+ Removed non-ASCII characters from copyright comment.
+
+ libparse/parsesolaris.c@1.12 +55 -55
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/parsestreams.c@1.8 +63 -63
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/trim_info.c@1.6 +1 -1
+ Removed non-ASCII characters from copyright comment.
+
+ ntpd/refclock_parse.c@1.74 +326 -295
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified creation of parse-specific variables for Meinberg devices in gps16x_message().
+
+ parseutil/dcfd.c@1.27 +2 -2
+ Removed non-ASCII characters from copyright comment.
+
+ parseutil/testdcf.c@1.9 +2 -2
+ Removed non-ASCII characters from copyright comment.
+
+ChangeSet@1.3305.1.17, 2015-03-10 11:21:46+00:00, stenn@psp-fb1.ntp.org
+ merge cleanup
+
+ ChangeLog@1.1622.1.14 +1 -3
+ merge cleanup
+
+ ntpd/ntp_loopfilter.c@1.178 +5 -2
+ merge cleanup
+
+ChangeSet@1.3305.2.1, 2015-03-10 10:48:25+01:00, martin@pc-martin.(none)
+ Fixed loops and decoding of Meinberg GPS satellite info.
+
+ ChangeLog@1.1622.2.1 +1 -0
+ Fixed loops and decoding of Meinberg GPS satellite info.
+
+ libparse/data_mbg.c@1.13 +3 -3
+ Fixed loops handling Meinberg GPS satellite info.
+
+ ntpd/refclock_parse.c@1.73 +44 -68
+ Fixed loops and decoding of Meinberg GPS satellite info.
+
+ChangeSet@1.3305.1.16, 2015-03-09 06:36:19-04:00, murray@pogo.udel.edu
+ ChangeLog, ntp_loopfilter.c:
+ Fix for bug 2774
+
+ ChangeLog@1.1622.1.13 +3 -0
+ Fix for bug 2774
+
+ ntpd/ntp_loopfilter.c@1.177 +4 -1
+ Fix for bug 2774
+
+ChangeSet@1.3305.1.15, 2015-03-05 10:17:02+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ ChangeLog@1.1622.1.12 +1 -0
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ configure.ac@1.584 +24 -22
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ sntp/libopts/m4/libopts.m4@1.33 +12 -12
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ sntp/m4/ntp_libntp.m4@1.29 +4 -4
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ChangeSet@1.3305.1.14, 2015-03-04 11:16:31+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2775] ntp-keygen.c fails to compile under Windows
+
+ ChangeLog@1.1622.1.11 +1 -0
+ [Bug 2775] ntp-keygen.c fails to compile under Windows.
+
+ util/ntp-keygen.c@1.103 +7 -1
+ [Bug 2775] ntp-keygen.c fails to compile under Windows
+
+ChangeSet@1.3305.1.13, 2015-03-01 21:46:56-05:00, stenn@pogo.udel.edu
+ cleanup
+
+ ChangeLog@1.1622.1.10 +1 -2
+ cleanup
+
+ChangeSet@1.3305.1.12, 2015-03-01 02:50:18-05:00, murray@pogo.udel.edu
+ refclock_palisade.h, ChangeLog, refclock_palisade.c:
+ Fix bug 2773 - early leap from Palisade/Thunderbolt
+
+ ChangeLog@1.1622.1.9 +2 -0
+ Fix bug 2773 - early leap from Palisade/Thunderbolt
+
+ ntpd/refclock_palisade.c@1.42 +8 -2
+ Fix bug 2773 - early leap from Palisade/Thunderbolt
+
+ ntpd/refclock_palisade.h@1.15 +1 -0
+ Fix bug 2773 - early leap from Palisade/Thunderbolt
+
+ChangeSet@1.3305.1.11, 2015-02-28 12:12:13+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ util/Makefile.am@1.78 +1 -1
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ChangeSet@1.3305.1.10, 2015-02-28 12:04:02+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2771] nonvolatile value is documented in wrong units
+
+ ChangeLog@1.1622.1.8 +1 -0
+ [Bug 2771] nonvolatile value is documented in wrong units
+
+ html/miscopt.html@1.80 +2 -2
+ [Bug 2771] nonvolatile value is documented in wrong units
+
+ChangeSet@1.3305.1.9, 2015-02-28 11:34:24+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2767] ntp-keygen -M should symlink to ntp.keys
+
+ ChangeLog@1.1622.1.7 +1 -0
+ [Bug 2767] ntp-keygen -M should symlink to ntp.keys
+
+ util/ntp-keygen.c@1.102 +6 -2
+ [Bug 2767] ntp-keygen -M should symlink to ntp.keys
+
+ChangeSet@1.3305.1.8, 2015-02-28 11:28:04+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2766] ntp-keygen output files should not be world-readable
+
+ ChangeLog@1.1622.1.6 +1 -0
+ [Bug 2766] ntp-keygen output files should not be world-readable
+
+ util/ntp-keygen.c@1.101 +5 -1
+ [Bug 2766] ntp-keygen output files should not be world-readable
+
+ChangeSet@1.3305.1.7, 2015-02-28 11:18:57+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq
+
+ ChangeLog@1.1622.1.5 +1 -0
+ [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq
+
+ ntpd/ntp_control.c@1.196 +56 -51
+ [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq
+
+ChangeSet@1.3305.1.6, 2015-02-28 09:47:20+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2757] Quiet compiler warnings.
+
+ lib/isc/inet_ntop.c@1.14 +1 -0
+ [Bug 2757] Quiet compiler warnings.
+
+ lib/isc/log.c@1.8 +12 -12
+ [Bug 2757] Quiet compiler warnings.
+
+ ntpd/ntp_leapsec.c@1.16 +6 -6
+ [Bug 2757] Quiet compiler warnings.
+
+ parseutil/dcfd.c@1.26 +7 -0
+ [Bug 2757] Quiet compiler warnings.
+
+ sntp/libevent/include/event2/event.h@1.11 +4 -0
+ [Bug 2757] Quiet compiler warnings.
+
+ChangeSet@1.3305.1.5, 2015-02-28 09:11:24+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM
+
+ ChangeLog@1.1622.1.4 +1 -0
+ [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM
+
+ configure.ac@1.583 +0 -2
+ [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM
+
+ include/ntp_fp.h@1.32 +4 -1
+ [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM
+
+ChangeSet@1.3305.1.4, 2015-02-25 07:58:47+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ BitKeeper/deleted/fd/jitter.h~11d7c056cb18e28@1.5 +0 -0
+ Delete: util/jitter.h
+
+ ChangeLog@1.1622.1.3 +1 -0
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ util/jitter.c@1.11 +1 -2
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ChangeSet@1.3305.1.3, 2015-02-21 05:56:16-05:00, stenn@deacon.udel.edu
+ Update triggers for bk-6
+
+ BitKeeper/triggers/post-incoming.license-warn@1.9 +3 -0
+ Update triggers for bk-6
+
+ BitKeeper/triggers/pre-resolve.license-chk@1.10 +3 -0
+ Update triggers for bk-6
+
+ BitKeeper/triggers/send@1.16 +2 -2
+ Update triggers for bk-6
+
+ChangeSet@1.3305.1.2, 2015-02-21 10:35:38+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2757] Quiet compiler warnings
+
+ ChangeLog@1.1622.1.2 +1 -0
+ [Bug 2757] Quiet compiler warnings
+
+ lib/isc/result.c@1.4 +6 -6
+ [Bug 2757] Quiet compiler warnings
+
+ lib/isc/unix/file.c@1.7 +3 -3
+ [Bug 2757] Quiet compiler warnings
+
+ lib/isc/unix/ifiter_ioctl.c@1.32.1.1 +4 -0
+ [Bug 2757] Quiet compiler warnings
+
+ lib/isc/unix/net.c@1.19 +2 -1
+ [Bug 2757] Quiet compiler warnings
+
+ libntp/work_fork.c@1.13 +1 -1
+ [Bug 2757] Quiet compiler warnings
+
+ ntpd/ntp_crypto.c@1.174 +1 -1
+ [Bug 2757] Quiet compiler warnings
+
+ChangeSet@1.3305.1.1, 2015-02-21 09:51:32+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL.
+
+ ChangeLog@1.1622.1.1 +1 -0
+ [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL.
+
+ scripts/lib/NTP/Util.pm@1.3 +15 -4
+ [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL.
+
+ChangeSet@1.3306, 2015-02-21 09:28:08+00:00, stenn@psp-fb1.ntp.org
+ [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument
+
+ ChangeLog@1.1623 +1 -0
+ [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument
+
+ lib/isc/unix/ifiter_getifaddrs.c@1.14 +3 -0
+ [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument
+
+ lib/isc/unix/ifiter_ioctl.c@1.33 +12 -2
+ [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument
+
+ChangeSet@1.3302.1.1, 2015-02-21 07:15:54+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2728] See if C99-style structure initialization works
+
+ ChangeLog@1.1620.1.1 +3 -0
+ [Bug 2728] See if C99-style structure initialization works
+
+ configure.ac@1.582 +1 -0
+ [Bug 2728] See if C99-style structure initialization works
+
+ ntpq/ntpq-subs.c@1.104 +1 -1
+ [Bug 2728] See if C99-style structure initialization works
+
+ ports/winnt/include/config.h@1.111 +1 -1
+ [Bug 2728] See if C99-style structure initialization works
+
+ sntp/m4/ax_c99_struct_init.m4@1.1 +59 -0
+ BitKeeper file /home/stenn/ntp-stable-2728/sntp/m4/ax_c99_struct_init.m4
+
+ sntp/m4/ax_c99_struct_init.m4@1.0 +0 -0
+
+ChangeSet@1.3304, 2015-02-11 09:08:51+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ ChangeLog@1.1621 +3 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ChangeSet@1.3303, 2015-02-11 09:05:59+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ BitKeeper/deleted/5b/README~3a69bb76c676898e@1.7 +0 -0
+ Delete: sntp/libevent/README
+
+ sntp/libevent/ChangeLog@1.9 +726 -60
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/Makefile.am@1.13 +3 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/README.md@1.1 +318 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/README.md
+
+ sntp/libevent/README.md@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/getopt.c@1.1 +149 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/WIN32-Code/getopt.c
+
+ sntp/libevent/WIN32-Code/getopt.c@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/getopt.h@1.1 +33 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/WIN32-Code/getopt.h
+
+ sntp/libevent/WIN32-Code/getopt.h@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/getopt_long.c@1.1 +233 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/WIN32-Code/getopt_long.c
+
+ sntp/libevent/WIN32-Code/getopt_long.c@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/nmake/event2/event-config.h@1.2 +2 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/WIN32-Code/tree.h@1.2 +0 -677
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/buffer.c@1.10 +74 -10
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent.c@1.8 +9 -4
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent_async.c@1.7 +6 -4
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent_filter.c@1.7 +50 -23
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent_openssl.c@1.9 +2 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent_pair.c@1.8 +32 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/configure.ac@1.17 +15 -18
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evbuffer-internal.h@1.8 +13 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evdns.c@1.10 +80 -33
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/event.c@1.13 +38 -10
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/event_tagging.c@1.5 +14 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evrpc-internal.h@1.3 +1 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evthread-internal.h@1.7 +7 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evthread.c@1.8 +17 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evutil.c@1.10 +28 -14
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evutil_time.c@1.5 +50 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/ht-internal.h@1.4 +0 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/http-internal.h@1.6 +2 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/http.c@1.10 +45 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/buffer.h@1.7 +3 -8
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/bufferevent.h@1.6 +5 -4
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/dns.h@1.7 +17 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/event.h@1.10 +6 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/http.h@1.7 +14 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/listener.h@1.4 +9 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/util.h@1.7 +69 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/kqueue.c@1.7 +17 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/listener.c@1.7 +5 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/sample/http-server.c@1.10 +5 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/sample/https-client.c@1.2 +15 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/sample/include.am@1.3 +2 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/include.am@1.4 +2 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/print-winsock-errors.c@1.1 +84 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/test/print-winsock-errors.c
+
+ sntp/libevent/test/print-winsock-errors.c@1.0 +0 -0
+
+ sntp/libevent/test/regress.c@1.6 +29 -8
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress.h@1.5 +5 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_buffer.c@1.8 +47 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_bufferevent.c@1.6 +150 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_dns.c@1.8 +141 -14
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_finalize.c@1.2 +1 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_http.c@1.8 +107 -9
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_main.c@1.7 +4 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_minheap.c@1.3 +3 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_ssl.c@1.7 +1 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_thread.c@1.6 +3 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_util.c@1.7 +19 -17
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_zlib.c@1.5 +10 -7
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/test-fdleak.c@1.2 +10 -10
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/test-ratelim.c@1.9 +5 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/test-ratelim.sh@1.1 +88 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/test/test-ratelim.sh
+
+ sntp/libevent/test/test-ratelim.sh@1.0 +0 -0
+
+ sntp/libevent/test/test-time.c@1.5 +9 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/tinytest.c@1.6 +33 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/tinytest.h@1.4 +2 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/tinytest_demo.c@1.1 +260 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/test/tinytest_demo.c
+
+ sntp/libevent/test/tinytest_demo.c@1.0 +0 -0
+
+ sntp/libevent/test/tinytest_macros.h@1.3 +21 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/time-internal.h@1.2 +0 -3
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/util-internal.h@1.10 +1 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/whatsnew-2.1.txt@1.4 +52 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/m4/LICENSE-OPENLDAP@1.2 +0 -0
+ Rename: sntp/libevent/m4/LICENSE-OPENLDAP -> sntp/m4/LICENSE-OPENLDAP
+
+ sntp/m4/openldap-thread-check.m4@1.5 +0 -0
+ Rename: sntp/libevent/m4/openldap-thread-check.m4 -> sntp/m4/openldap-thread-check.m4
+
+ sntp/m4/openldap.m4@1.2 +0 -0
+ Rename: sntp/libevent/m4/openldap.m4 -> sntp/m4/openldap.m4
+
ChangeSet@1.3302, 2015-02-04 02:44:25-05:00, stenn@deacon.udel.edu
NTP_4_2_8P1
TAG: NTP_4_2_8P1
diff --git a/Makefile.in b/Makefile.in
index abd5a09463b8..47232a60e2bd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -49,8 +49,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -79,6 +78,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -347,6 +348,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/NEWS b/NEWS
index d33f059985e4..a425a9a4dc3f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,145 @@
---
+NTP 4.2.8p2 (Harlan Stenn <stenn@ntp.org>, 2015/04/xx)
+
+Focus: Security and Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+In addition to bug fixes and enhancements, this release fixes the
+following medium-severity vulnerabilities involving private key
+authentication:
+
+* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+
+ References: Sec 2779 / CVE-2015-1798 / VU#374268
+ Affects: All NTP4 releases starting with ntp-4.2.5p99 up to but not
+ including ntp-4.2.8p2 where the installation uses symmetric keys
+ to authenticate remote associations.
+ CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
+ Date Resolved: Stable (4.2.8p2) 07 Apr 2015
+ Summary: When ntpd is configured to use a symmetric key to authenticate
+ a remote NTP server/peer, it checks if the NTP message
+ authentication code (MAC) in received packets is valid, but not if
+ there actually is any MAC included. Packets without a MAC are
+ accepted as if they had a valid MAC. This allows a MITM attacker to
+ send false packets that are accepted by the client/peer without
+ having to know the symmetric key. The attacker needs to know the
+ transmit timestamp of the client to match it in the forged reply
+ and the false reply needs to reach the client before the genuine
+ reply from the server. The attacker doesn't necessarily need to be
+ relaying the packets between the client and the server.
+
+ Authentication using autokey doesn't have this problem as there is
+ a check that requires the key ID to be larger than NTP_MAXKEY,
+ which fails for packets without a MAC.
+ Mitigation:
+ Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Configure ntpd with enough time sources and monitor it properly.
+ Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
+
+* [Sec 2781] Authentication doesn't protect symmetric associations against
+ DoS attacks.
+
+ References: Sec 2781 / CVE-2015-1799 / VU#374268
+ Affects: All NTP releases starting with at least xntp3.3wy up to but
+ not including ntp-4.2.8p2 where the installation uses symmetric
+ key authentication.
+ CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
+ Note: the CVSS base Score for this issue could be 4.3 or lower, and
+ it could be higher than 5.4.
+ Date Resolved: Stable (4.2.8p2) 07 Apr 2015
+ Summary: An attacker knowing that NTP hosts A and B are peering with
+ each other (symmetric association) can send a packet to host A
+ with source address of B which will set the NTP state variables
+ on A to the values sent by the attacker. Host A will then send
+ on its next poll to B a packet with originate timestamp that
+ doesn't match the transmit timestamp of B and the packet will
+ be dropped. If the attacker does this periodically for both
+ hosts, they won't be able to synchronize to each other. This is
+ a known denial-of-service attack, described at
+ https://www.eecis.udel.edu/~mills/onwire.html .
+
+ According to the document the NTP authentication is supposed to
+ protect symmetric associations against this attack, but that
+ doesn't seem to be the case. The state variables are updated even
+ when authentication fails and the peers are sending packets with
+ originate timestamps that don't match the transmit timestamps on
+ the receiving side.
+
+ This seems to be a very old problem, dating back to at least
+ xntp3.3wy. It's also in the NTPv3 (RFC 1305) and NTPv4 (RFC 5905)
+ specifications, so other NTP implementations with support for
+ symmetric associations and authentication may be vulnerable too.
+ An update to the NTP RFC to correct this error is in-process.
+ Mitigation:
+ Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Note that for users of autokey, this specific style of MITM attack
+ is simply a long-known potential problem.
+ Configure ntpd with appropriate time sources and monitor ntpd.
+ Alert your staff if problems are detected.
+ Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
+
+* New script: update-leap
+The update-leap script will verify and if necessary, update the
+leap-second definition file.
+It requires the following commands in order to work:
+
+ wget logger tr sed shasum
+
+Some may choose to run this from cron. It needs more portability testing.
+
+Bug Fixes and Improvements:
+
+* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument.
+* [Bug 2346] "graceful termination" signals do not do peer cleanup.
+* [Bug 2728] See if C99-style structure initialization works.
+* [Bug 2747] Upgrade libevent to 2.1.5-beta.
+* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. .
+* [Bug 2751] jitter.h has stale copies of l_fp macros.
+* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM.
+* [Bug 2757] Quiet compiler warnings.
+* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
+* [Bug 2763] Allow different thresholds for forward and backward steps.
+* [Bug 2766] ntp-keygen output files should not be world-readable.
+* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
+* [Bug 2771] nonvolatile value is documented in wrong units.
+* [Bug 2773] Early leap announcement from Palisade/Thunderbolt
+* [Bug 2774] Unreasonably verbose printout - leap pending/warning
+* [Bug 2775] ntp-keygen.c fails to compile under Windows.
+* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info.
+ Removed non-ASCII characters from some copyright comments.
+ Removed trailing whitespace.
+ Updated definitions for Meinberg clocks from current Meinberg header files.
+ Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Account for updated definitions pulled from Meinberg header files.
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Replaced some constant numbers by defines from ntp_calendar.h
+ Modified creation of parse-specific variables for Meinberg devices
+ in gps16x_message().
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling
+ if the time status shall be printed.
+* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+* [Sec 2781] Authentication doesn't protect symmetric associations against
+ DoS attacks.
+* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
+* [Bug 2789] Quiet compiler warnings from libevent.
+* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
+ pause briefly before measuring system clock precision to yield
+ correct results.
+* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer.
+* Use predefined function types for parse driver functions
+ used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast parse conversion results to appropriate types to avoid
+ compiler warnings.
+ Let ioctl() for Windows accept a (void *) to avoid compiler warnings
+ when called with pointers to different types.
+
+---
NTP 4.2.8p1 (Harlan Stenn <stenn@ntp.org>, 2015/02/04)
Focus: Security and Bug fixes, enhancements.
diff --git a/aclocal.m4 b/aclocal.m4
index c82bc094c180..24036a425915 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1132,8 +1132,7 @@ AC_SUBST([am__untar])
m4_include([sntp/libopts/m4/libopts.m4])
m4_include([sntp/libopts/m4/stdnoreturn.m4])
-m4_include([sntp/libevent/m4/openldap-thread-check.m4])
-m4_include([sntp/libevent/m4/openldap.m4])
+m4_include([sntp/m4/ax_c99_struct_init.m4])
m4_include([sntp/m4/define_dir.m4])
m4_include([sntp/m4/hms_search_lib.m4])
m4_include([sntp/m4/libtool.m4])
@@ -1162,5 +1161,7 @@ m4_include([sntp/m4/ntp_rlimit.m4])
m4_include([sntp/m4/ntp_sntp.m4])
m4_include([sntp/m4/ntp_ver_suffix.m4])
m4_include([sntp/m4/ntp_vpathhack.m4])
+m4_include([sntp/m4/openldap-thread-check.m4])
+m4_include([sntp/m4/openldap.m4])
m4_include([sntp/m4/os_cflags.m4])
m4_include([sntp/m4/snprintf.m4])
diff --git a/adjtimed/Makefile.in b/adjtimed/Makefile.in
index a6e97da38919..56f4dfbe1d62 100644
--- a/adjtimed/Makefile.in
+++ b/adjtimed/Makefile.in
@@ -49,8 +49,7 @@ subdir = adjtimed
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -79,6 +78,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -329,6 +330,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/clockstuff/Makefile.in b/clockstuff/Makefile.in
index f04ff2c4a8c1..c852adb9c940 100644
--- a/clockstuff/Makefile.in
+++ b/clockstuff/Makefile.in
@@ -42,8 +42,7 @@ subdir = clockstuff
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -72,6 +71,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -325,6 +326,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/config.h.in b/config.h.in
index 76facf9643b4..5ca9484a00c7 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1331,6 +1331,10 @@
/* Should we recommend a minimum value for tickadj? */
#undef MIN_REC_TICKADJ
+/* Define to 1 if the compiler does not support C99's structure
+ initialization. */
+#undef MISSING_C99_STRUCT_INIT
+
/* Do we need HPUX adjtime() library support? */
#undef NEED_HPUX_ADJTIME
diff --git a/configure b/configure
index 28e0c3729cd1..29d777c34ea0 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for ntp 4.2.8p1.
+# Generated by GNU Autoconf 2.68 for ntp 4.2.8p2.
#
# Report bugs to <http://bugs.ntp.org./>.
#
@@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ntp'
PACKAGE_TARNAME='ntp'
-PACKAGE_VERSION='4.2.8p1'
-PACKAGE_STRING='ntp 4.2.8p1'
+PACKAGE_VERSION='4.2.8p2'
+PACKAGE_STRING='ntp 4.2.8p2'
PACKAGE_BUGREPORT='http://bugs.ntp.org./'
PACKAGE_URL='http://www.ntp.org./'
@@ -710,6 +710,13 @@ LD
FGREP
SED
LIBTOOL
+INSTALL_UPDATE_LEAP_FALSE
+INSTALL_UPDATE_LEAP_TRUE
+UPDATE_LEAP_NI
+UPDATE_LEAP_MS
+UPDATE_LEAP_DS
+UPDATE_LEAP_DL
+UPDATE_LEAP_DB
TIMETRIM_NI
TIMETRIM_MS
TIMETRIM_DS
@@ -1573,7 +1580,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ntp 4.2.8p1 to adapt to many kinds of systems.
+\`configure' configures ntp 4.2.8p2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1643,7 +1650,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ntp 4.2.8p1:";;
+ short | recursive ) echo "Configuration of ntp 4.2.8p2:";;
esac
cat <<\_ACEOF
@@ -1872,7 +1879,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ntp configure 4.2.8p1
+ntp configure 4.2.8p2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2697,7 +2704,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ntp $as_me 4.2.8p1, which was
+It was created by ntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -3644,7 +3651,7 @@ fi
# Define the identity of the package.
PACKAGE='ntp'
- VERSION='4.2.8p1'
+ VERSION='4.2.8p2'
cat >>confdefs.h <<_ACEOF
@@ -7780,6 +7787,44 @@ $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports C99 structure initialization" >&5
+$as_echo_n "checking whether the compiler supports C99 structure initialization... " >&6; }
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ struct foo_s {int i1; int i2;};
+ int main() { struct foo_s foo[] = { { .i1 = 1, .i2 = 1 }, { .i1 = 2, .i2 = 2 }, { .i1 = 0, .i2 = 0 } }; }
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define MISSING_C99_STRUCT_INIT 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we need ylwrap VPATH hack" >&5
$as_echo_n "checking to see if we need ylwrap VPATH hack... " >&6; }
@@ -7946,6 +7991,19 @@ fi
+
+ if test -z "$UPDATE_LEAP_NI" ; then
+ INSTALL_UPDATE_LEAP_TRUE=
+ INSTALL_UPDATE_LEAP_FALSE='#'
+else
+ INSTALL_UPDATE_LEAP_TRUE='#'
+ INSTALL_UPDATE_LEAP_FALSE=
+fi
+
+
+
+
+
# So far, the only shared library we might use is libopts.
# It's a small library - we might as well use a static version of it.
# Check whether --enable-shared was given.
@@ -31709,10 +31767,10 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <sys/syscall.h>
- #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
- # error
- #endif
+ #include <sys/syscall.h>
+ #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
+ # error
+ #endif
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
@@ -31748,10 +31806,10 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <sys/timex.h>
- #ifndef STA_FLL
- # error
- #endif
+ #include <sys/timex.h>
+ #ifndef STA_FLL
+ # error
+ #endif
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
@@ -35326,7 +35384,6 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should enable NIST lockclock scheme" >&5
$as_echo_n "checking if we should enable NIST lockclock scheme... " >&6; }
-
# Check whether --enable-nist was given.
if test "${enable_nist+set}" = set; then :
enableval=$enable_nist; ans=$enableval
@@ -35348,7 +35405,6 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want support for Samba's signing daemon" >&5
$as_echo_n "checking if we want support for Samba's signing daemon... " >&6; }
-
# Check whether --enable-ntp-signd was given.
if test "${enable_ntp_signd+set}" = set; then :
enableval=$enable_ntp_signd; ans=$enableval
@@ -36444,33 +36500,35 @@ ac_config_files="$ac_config_files parseutil/Makefile"
ac_config_files="$ac_config_files scripts/Makefile"
-ac_config_files="$ac_config_files scripts/lib/Makefile"
+ac_config_files="$ac_config_files scripts/build/Makefile"
-ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
+ac_config_files="$ac_config_files scripts/build/mkver"
ac_config_files="$ac_config_files scripts/calc_tickadj/Makefile"
-ac_config_files="$ac_config_files scripts/build/mkver"
+ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
-ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
+ac_config_files="$ac_config_files scripts/lib/Makefile"
ac_config_files="$ac_config_files scripts/ntp-wait/Makefile"
-ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
+ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
ac_config_files="$ac_config_files scripts/ntpsweep/Makefile"
-ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
+ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
ac_config_files="$ac_config_files scripts/ntptrace/Makefile"
+ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
+
ac_config_files="$ac_config_files scripts/ntpver"
ac_config_files="$ac_config_files scripts/plot_summary"
ac_config_files="$ac_config_files scripts/summary"
-ac_config_files="$ac_config_files scripts/build/Makefile"
+ac_config_files="$ac_config_files scripts/update-leap/Makefile"
ac_config_files="$ac_config_files tests/Makefile"
@@ -36664,6 +36722,10 @@ if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; th
as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -37109,7 +37171,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ntp $as_me 4.2.8p1, which was
+This file was extended by ntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -37176,7 +37238,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ntp config.status 4.2.8p1
+ntp config.status 4.2.8p2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -37703,20 +37765,21 @@ do
"ntpsnmpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpsnmpd/Makefile" ;;
"parseutil/Makefile") CONFIG_FILES="$CONFIG_FILES parseutil/Makefile" ;;
"scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
- "scripts/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
- "scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
- "scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
+ "scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
"scripts/build/mkver") CONFIG_FILES="$CONFIG_FILES scripts/build/mkver" ;;
- "scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
+ "scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
+ "scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
+ "scripts/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
"scripts/ntp-wait/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/Makefile" ;;
- "scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
+ "scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
"scripts/ntpsweep/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/Makefile" ;;
- "scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
+ "scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
"scripts/ntptrace/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/Makefile" ;;
+ "scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
"scripts/ntpver") CONFIG_FILES="$CONFIG_FILES scripts/ntpver" ;;
"scripts/plot_summary") CONFIG_FILES="$CONFIG_FILES scripts/plot_summary" ;;
"scripts/summary") CONFIG_FILES="$CONFIG_FILES scripts/summary" ;;
- "scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
+ "scripts/update-leap/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/update-leap/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"tests/libntp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libntp/Makefile" ;;
"tests/ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpd/Makefile" ;;
@@ -39254,8 +39317,8 @@ _LT_EOF
;;
"ntpd/complete.conf":F) sed -e '/^rlimit$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;;
"ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;;
- "scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
"scripts/build/mkver":F) chmod +x scripts/build/mkver ;;
+ "scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
"scripts/ntp-wait/ntp-wait":F) chmod +x scripts/ntp-wait/ntp-wait ;;
"scripts/ntpsweep/ntpsweep":F) chmod +x scripts/ntpsweep/ntpsweep ;;
"scripts/ntptrace/ntptrace":F) chmod +x scripts/ntptrace/ntptrace ;;
diff --git a/configure.ac b/configure.ac
index 6942ceb5333f..dc5c7fcfd703 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,7 @@ AC_PROG_CPP
AC_PROG_CXX
AC_PROG_YACC
AC_PROG_CC_C_O
+AX_C99_STRUCT_INIT
NTP_VPATH_HACK dnl used only by ntpd/Makefile.am
@@ -1499,12 +1500,13 @@ AC_CACHE_CHECK(
;;
*)
AC_PREPROC_IFELSE(
- [
- #include <sys/syscall.h>
- #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
- # error
- #endif
- ],
+ [AC_LANG_SOURCE(
+ [
+ #include <sys/syscall.h>
+ #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
+ # error
+ #endif
+ ])],
[ntp_cv_var_ntp_syscalls=kernel]
)
;;
@@ -1526,12 +1528,13 @@ AC_CACHE_CHECK(
[if sys/timex.h has STA_FLL],
[ntp_cv_var_sta_fll],
[AC_PREPROC_IFELSE(
- [
- #include <sys/timex.h>
- #ifndef STA_FLL
- # error
- #endif
- ],
+ [AC_LANG_SOURCE(
+ [
+ #include <sys/timex.h>
+ #ifndef STA_FLL
+ # error
+ #endif
+ ])],
[ntp_cv_var_sta_fll=yes],
[ntp_cv_var_sta_fll=no]
)]
@@ -1586,12 +1589,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCGPPSEV])
case "$ac_cv_header_termios_h" in
yes)
AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <termios.h>
#ifndef TIOCGPPSEV
# error
#endif
- ],
+ ])],
[ntp_ok=yes],
[ntp_ok=no]
)
@@ -1612,12 +1615,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCSPPS])
case "$ac_cv_header_termios_h" in
yes)
AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <termios.h>
#ifndef TIOCSPPS
# error
#endif
- ],
+ ])],
[ntp_ok=yes],
[ntp_ok=no]
)
@@ -1638,12 +1641,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl CIOGETEV])
case "$ac_cv_header_sys_ppsclock_h" in
yes)
AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <sys/ppsclock.h>
#ifndef CIOGETEV
# error
#endif
- ],
+ ])],
[ntp_ok=yes],
[ntp_ok=no]
)
@@ -1689,7 +1692,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
yesyes)
AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG])
AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <sys/time.h>
typedef int u_int;
#include <sys/ppsclock.h>
@@ -1710,7 +1713,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
#ifndef CIOGETEV
# error
#endif
- ],
+ ])],
[ntp_ok=yes],
[ntp_ok=no]
)
@@ -4193,7 +4196,6 @@ case "$ans" in
esac
AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
-
AC_ARG_ENABLE(
[nist],
[AS_HELP_STRING(
@@ -4213,7 +4215,6 @@ case "$ans" in
esac
AC_MSG_CHECKING([if we want support for Samba's signing daemon])
-
AC_ARG_ENABLE(
[ntp-signd],
[AS_HELP_STRING(
@@ -4266,14 +4267,14 @@ AC_CACHE_CHECK(
[for interface list sysctl],
[ntp_cv_iflist_sysctl],
[AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#ifndef NET_RT_IFLIST
# error
#endif
- ],
+ ])],
[ntp_cv_iflist_sysctl=yes],
[ntp_cv_iflist_sysctl=no]
)]
@@ -4333,20 +4334,21 @@ AC_CONFIG_FILES([ntpq/Makefile])
AC_CONFIG_FILES([ntpsnmpd/Makefile])
AC_CONFIG_FILES([parseutil/Makefile])
AC_CONFIG_FILES([scripts/Makefile])
-AC_CONFIG_FILES([scripts/lib/Makefile])
-AC_CONFIG_FILES([scripts/calc_tickadj/calc_tickadj], [chmod +x scripts/calc_tickadj/calc_tickadj])
-AC_CONFIG_FILES([scripts/calc_tickadj/Makefile])
+AC_CONFIG_FILES([scripts/build/Makefile])
AC_CONFIG_FILES([scripts/build/mkver], [chmod +x scripts/build/mkver])
-AC_CONFIG_FILES([scripts/ntp-wait/ntp-wait], [chmod +x scripts/ntp-wait/ntp-wait])
+AC_CONFIG_FILES([scripts/calc_tickadj/Makefile])
+AC_CONFIG_FILES([scripts/calc_tickadj/calc_tickadj], [chmod +x scripts/calc_tickadj/calc_tickadj])
+AC_CONFIG_FILES([scripts/lib/Makefile])
AC_CONFIG_FILES([scripts/ntp-wait/Makefile])
-AC_CONFIG_FILES([scripts/ntpsweep/ntpsweep], [chmod +x scripts/ntpsweep/ntpsweep])
+AC_CONFIG_FILES([scripts/ntp-wait/ntp-wait], [chmod +x scripts/ntp-wait/ntp-wait])
AC_CONFIG_FILES([scripts/ntpsweep/Makefile])
-AC_CONFIG_FILES([scripts/ntptrace/ntptrace], [chmod +x scripts/ntptrace/ntptrace])
+AC_CONFIG_FILES([scripts/ntpsweep/ntpsweep], [chmod +x scripts/ntpsweep/ntpsweep])
AC_CONFIG_FILES([scripts/ntptrace/Makefile])
+AC_CONFIG_FILES([scripts/ntptrace/ntptrace], [chmod +x scripts/ntptrace/ntptrace])
AC_CONFIG_FILES([scripts/ntpver], [chmod +x scripts/ntpver])
AC_CONFIG_FILES([scripts/plot_summary], [chmod +x scripts/plot_summary])
AC_CONFIG_FILES([scripts/summary], [chmod +x scripts/summary])
-AC_CONFIG_FILES([scripts/build/Makefile])
+AC_CONFIG_FILES([scripts/update-leap/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([tests/libntp/Makefile])
AC_CONFIG_FILES([tests/ntpd/Makefile])
diff --git a/html/build.html b/html/build.html
index 9683b291f41a..5e3c2d8118c9 100644
--- a/html/build.html
+++ b/html/build.html
@@ -11,7 +11,7 @@
<img src="pic/beaver.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
<p>For putting out compiler fires.</p>
<p>Last update:
- <!-- #BeginDate format:En2m -->31-Mar-2014 05:39<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->1-Apr-2015 02:57<!-- #EndDate -->
</p>
<br clear="left">
<h4>Related Links</h4>
@@ -27,7 +27,7 @@
</ul>
<hr>
<h4 id="build">Building and Installing the Distribution</h4>
-<p>It is not possible in a software distribution such as this to support every individual computer and operating system with a common executable, even with the same system but different versions and options. Therefore, it is necessary to configure, build and install for each system and version. In almost all cases, these procedures are completely automatic, The user types <tt>./configure</tt>, <tt>make</tt> and <tt>install</tt> in that order and the autoconfigure system does the rest. There are some exceptions, as noted below and on the <a href="hints.html">Hints and Kinks</a> pages.</p>
+<p>It is not possible in a software distribution such as this to support every individual computer and operating system with a common executable, even with the same system but different versions and options. Therefore, it is necessary to configure, build and install for each system and version. In almost all cases, these procedures are completely automatic, The user types <tt>./configure</tt>, and <tt>make install</tt> in that order and the autoconfigure system does the rest. There are some exceptions, as noted below and on the <a href="hints.html">Hints and Kinks</a> pages.</p>
<p>If available, the OpenSSL library from <a href="http://www.openssl.org">http://www.openssl.org</a> is used to support public key cryptography. The library must be built and installed prior to building NTP. The procedures for doing that are included in the OpenSSL documentation. The library is found during the normal NTP configure phase and the interface routines compiled automatically. Only the <tt>libcrypto.a</tt> library file and <tt>openssl</tt> header files are needed. If the library is not available or disabled, this step is not required.</p>
<p>The <a href="config.html">Build Options</a> page describes a number of options that determine whether debug support is included, whether and which reference clock drivers are included and the locations of the executables and library files, if not the default. By default debugging options and all reference clock drivers are included.</p>
<h4 id="unix">Building and Installing for Unix</h4>
diff --git a/html/miscopt.html b/html/miscopt.html
index 62f41b6c59c3..5750d17999d5 100644
--- a/html/miscopt.html
+++ b/html/miscopt.html
@@ -10,7 +10,7 @@
<img src="pic/boom3.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
<p>We have three, now looking for more.</p>
<p>Last update:
- <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->28-Feb-2015 12:01<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
@@ -90,7 +90,7 @@
</dl>
</dd>
<dt id="nonvolatile"><tt>nonvolatile <i>threshold</i></tt></dt>
- <dd>Specify the <i><tt>threshold</tt></i> in PPM to write the frequency file, with default 0.1 PPM. The frequency file is inspected each hour. If the difference between the current frequency and the last value written exceeds the threshold, the file is written and the <tt><em>threshold</em></tt> becomes the new threshold value. If the threshold is not exceeded, it is reduced by half. This is intended to reduce the frequency of unnecessary file writes for embedded systems with nonvolatile memory.</dd>
+ <dd>Specify the <i><tt>threshold</tt></i> in seconds to write the frequency file, with default of 1e-7 (0.1 PPM). The frequency file is inspected each hour. If the difference between the current frequency and the last value written exceeds the threshold, the file is written and the <tt><em>threshold</em></tt> becomes the new threshold value. If the threshold is not exceeded, it is reduced by half. This is intended to reduce the frequency of unnecessary file writes for embedded systems with nonvolatile memory.</dd>
<dt id="phone"><tt>phone <i>dial</i> ...</tt></dt>
<dd>This command is used in conjunction with the ACTS modem driver (type 18). The arguments consist of a maximum of 10 telephone numbers used to dial USNO, NIST or European time services. The Hayes command ATDT&nbsp;is normally prepended to the number, which can contain other modem control codes as well.</dd>
<dt id="reset"><tt>reset [allpeers] [auth] [ctl] [io] [mem] [sys] [timer]</tt></dt>
diff --git a/html/sntp.html b/html/sntp.html
index fa17203f25f8..84c6f29d5fa1 100644
--- a/html/sntp.html
+++ b/html/sntp.html
@@ -11,7 +11,7 @@
<img src="pic/dogsnake.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
<p>S is for snakeoil.</p>
<p>Last update:
- <!-- #BeginDate format:En2m -->7-Dec-2014 11:09<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->1-Apr-2015 11:05<!-- #EndDate -->
UTC</p>
<br clear="left">
<hr>
@@ -20,8 +20,8 @@
<h4>Description</h4>
<p>This program is a Simple Network Time Protocol (SNTP) client that can be used to query a Network Time Protocol (NTP) server and display the time offset of the system clock relative to the server clock. Run as root it can correct the system clock to this offset as well. It can be run as an interactive command or from a script by a <tt>cron</tt> job. The program implements the SNTP client protocol defined in RFC 5905, including the full on-wire protocol but does not provide the sanity checks, access controls, security functions and mitigation algorithms as in the full NTP version 4 specification, also defined in RFC 5905.</p>
<p>By default, <tt>sntp</tt> writes the local date and time (i.e., not UTC) to the standard output in the format</p>
-<p><tt>2011-08-04 00:40:36.642222 (+0000) +0.006611 +/- 0.041061 psp-os1 149.20.68.26</tt></p>
-<p>where the <tt>+0.006611 +/- 0.041061</tt> indicates the time offset and error bound of the system clock relative to the server clock, in seconds.</p>
+<p><tt>2011-08-04 00:40:36.642222 (+0000) +0.006611 +/- 0.041061 psp-os1 149.20.68.26 s3 no-leap</tt></p>
+<p>where the <tt>+0.006611 +/- 0.041061</tt> indicates the time offset and error bound of the system clock relative to the server clock, in seconds. The hostname and/or the IP is displayed, as is the stratum of the server. Finally, the leap indicator status is displayed.</p>
<p>If -b <i>bcaddress</i> is not specified, the program sends a single message to each address and waits up to <i>uctimeout</i> (default 5) seconds for a unicast server response. Otherwise, it sends no message and waits up to <i>bctimeout</i> (default 68) seconds for a broadcast NTP message.</p>
<h4>Options</h4>
<p><tt>sntp</tt> recognizes the following options:</p>
diff --git a/include/Makefile.in b/include/Makefile.in
index 36c9b865f481..cb210040d8b7 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -40,8 +40,7 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -70,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -327,6 +328,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/include/binio.h b/include/binio.h
index d1ee94429144..cf98633578bc 100644
--- a/include/binio.h
+++ b/include/binio.h
@@ -42,11 +42,21 @@ void put_lsb_short (unsigned char **, long);
long get_lsb_long (unsigned char **);
void put_lsb_long (unsigned char **, long);
+#define get_lsb_int16( _x_ ) ((int16_t) get_lsb_short( _x_ ))
+#define get_lsb_uint16( _x_ ) ((uint16_t) get_lsb_short( _x_ ))
+#define get_lsb_int32( _x_ ) ((int32_t) get_lsb_long( _x_ ))
+#define get_lsb_uint32( _x_ ) ((uint32_t) get_lsb_long( _x_ ))
+
long get_msb_short (unsigned char **);
void put_msb_short (unsigned char **, long);
long get_msb_long (unsigned char **);
void put_msb_long (unsigned char **, long);
+#define get_msb_int16( _x_ ) ((int16_t) get_msb_short( _x_ ))
+#define get_msb_uint16( _x_ ) ((uint16_t) get_msb_short( _x_ ))
+#define get_msb_int32( _x_ ) ((int32_t) get_msb_long( _x_ ))
+#define get_msb_uint32( _x_ ) ((uint32_t) get_msb_long( _x_ ))
+
#endif
/*
* History:
diff --git a/include/isc/Makefile.in b/include/isc/Makefile.in
index f29d1454b9a9..ad0da46e1002 100644
--- a/include/isc/Makefile.in
+++ b/include/isc/Makefile.in
@@ -40,8 +40,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -70,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -289,6 +290,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/include/mbg_gps166.h b/include/mbg_gps166.h
index 974debafae28..b9b3d778356b 100644
--- a/include/mbg_gps166.h
+++ b/include/mbg_gps166.h
@@ -39,206 +39,459 @@
#define MBG_GPS166_H
-/***************************************************************************/
-/* */
-/* File: GPSSERIO.H 4.1 */
-/* */
-/* Project: Common C Library */
-/* */
-/* Compiler: Borland C++ */
-/* */
-/* Author: M. Burnicki, Meinberg Funkuhren */
-/* */
-/* */
-/* Description: */
-/* This file defines structures and codes to be used to access GPS166 */
-/* via its serial interface COM0. COM0 should be set to a high baud */
-/* rate, default is 19200. */
-/* */
-/* Standard GPS166 serial operation is to send a time string that is */
-/* compatible with Meinberg UA31 or PZF535 DCF77 radio remote clocks. */
-/* That string can be transmitted automatically once per second, once */
-/* per minute or on request per ASCII '?'. */
-/* */
-/* Parameter setup or parameter readout works using blocks of binary */
-/* data which have to be isolated from the standard string. A block of */
-/* data starts with a SOH code (ASCII Start Of Header, 0x01) followed */
-/* by a message header with constant length and a data portion with */
-/* variable length. The first field (cmd) of the message header holds */
-/* the command code rsp. the type of data to be transmitted. The next */
-/* field (len) gives the number of data bytes that are transmitted */
-/* after the header. This number ranges from 0 to sizeof( MSG_DATA ). */
-/* The third field (data_csum) holds a checksum of all data bytes and */
-/* the last field of the header finally holds the checksum of the. */
-/* header. */
-/* */
-/***************************************************************************/
-
-/* the control codes defined below are to be or'ed with a command/type code */
-
-#define GPS_REQACK 0x8000 /* to GPS166: request acknowledge */
-#define GPS_ACK 0x4000 /* from GPS166: acknowledge a command */
-#define GPS_NACK 0x2000 /* from GPS166: error receiving command */
-
-#define GPS_CTRL_MSK 0xF000 /* masks control code from command */
-
-
-/* The codes below specify commands/types of data to be supplied to GPS166: */
-
-/* GPS166 auto-message to host */
-/* þ host request, GPS166 response */
-/* þ þ host download to GPS166 */
-/* þ þ þ */
-enum { /* þ þ þ */
- /* system data */
- GPS_AUTO_ON = 0x000, /* þ þ þ X þ enable auto-messages from GPS166 */
- GPS_AUTO_OFF, /* þ þ þ X þ disable auto-messages from GPS166 */
- GPS_SW_REV, /* þ þ X þ þ request software revision */
- GPS_STAT, /* þ þ X þ þ request status of buffered variables */
- GPS_TIME, /* þ X þ þ X þ current time or capture or init board time */
- GPS_POS_XYZ, /* þ þ X þ X þ current position in ECEF coords */
- GPS_POS_LLA, /* þ þ X þ X þ current position in geographic coords */
- GPS_TZDL, /* þ þ X þ X þ time zone / daylight saving */
- GPS_PORT_PARM, /* þ þ X þ X þ parameters of the serial ports */
- GPS_SYNTH, /* þ þ X þ X þ synthesizer's frequency and phase */
- GPS_ANT_INFO, /* þ X þ X þ þ time diff after antenna disconnect */
- GPS_UCAP, /* þ X þ X þ þ user capture */
+/***************************************************************************
+ *
+ * Definitions taken from Meinberg's gpsserio.h and gpsdefs.h files.
+ *
+ * Author: Martin Burnicki, Meinberg Funkuhren
+ *
+ * Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
+ *
+ * Description:
+ * Structures and codes to be used to access Meinberg GPS clocks via
+ * their serial interface COM0. COM0 should be set to a high baud rate,
+ * default is 19200.
+ *
+ * Standard Meinberg GPS serial operation is to send the Meinberg
+ * standard time string automatically once per second, once per
+ * minute, or on request per ASCII '?'.
+ *
+ * GPS parameter setup or parameter readout uses blocks of binary
+ * data which have to be isolated from the standard string. A block
+ * of data starts with a SOH code (ASCII Start Of Header, 0x01)
+ * followed by a message header with constant length and a block of
+ * data with variable length.
+ *
+ * The first field (cmd) of the message header holds the command
+ * code resp. the type of data to be transmitted. The next field (len)
+ * gives the number of data bytes that follow the header. This number
+ * ranges from 0 to sizeof( MSG_DATA ). The third field (data_csum)
+ * holds a checksum of all data bytes and the last field of the header
+ * finally holds the checksum of the header itself.
+ *
+ ***************************************************************************/
+
+/**
+ * @brief GPS epoch bias from ordinary time_t epoch
+ *
+ * The Unix time_t epoch is usually 1970-01-01 00:00 whereas
+ * the GPS epoch is 1980-01-06 00:00, so the difference is 10 years,
+ * plus 2 days due to leap years (1972 and 1976), plus the difference
+ * of the day-of-month (6 - 1), so:<br>
+ *
+ * time_t t = ( gps_week * ::SECS_PER_WEEK ) + sec_of_week + ::GPS_SEC_BIAS
+ */
+#define GPS_SEC_BIAS 315964800UL // ( ( ( 10UL * 365UL ) + 2 + 5 ) * SECS_PER_DAY )
+
+
+#ifndef _COM_HS_DEFINED
+ /**
+ * @brief Enumeration of handshake modes
+ */
+ enum COM_HANSHAKE_MODES { HS_NONE, HS_XONXOFF, HS_RTSCTS, N_COM_HS };
+ #define _COM_HS_DEFINED
+#endif
+
+#ifndef _COM_PARM_DEFINED
+ /**
+ * @brief A data type to configure a serial port's baud rate
+ *
+ * @see ::MBG_BAUD_RATES
+ */
+ typedef int32_t BAUD_RATE;
+
+ /**
+ * @brief Indices used to identify a parameter in the framing string
+ *
+ * @see ::MBG_FRAMING_STRS
+ */
+ enum MBG_FRAMING_STR_IDXS { F_DBITS, F_PRTY, F_STBITS };
+
+ /**
+ * @brief A structure to store the configuration of a serial port
+ */
+ typedef struct
+ {
+ BAUD_RATE baud_rate; ///< transmission speed, e.g. 19200L, see ::MBG_BAUD_RATES
+ char framing[4]; ///< ASCIIZ framing string, e.g. "8N1" or "7E2", see ::MBG_FRAMING_STRS
+ int16_t handshake; ///< handshake mode, yet only ::HS_NONE supported
+
+ } COM_PARM;
+
+ #define _COM_PARM_DEFINED
+#endif
+
+
+/**
+ * @brief Enumeration of modes supported for time string transmission
+ *
+ * This determines e.g. at which point in time a string starts
+ * to be transmitted via the serial port.
+ * Used with ::PORT_SETTINGS::mode.
+ *
+ * @see ::STR_MODE_MASKS
+ */
+enum STR_MODES
+{
+ STR_ON_REQ, ///< transmission on request by received '?' character only
+ STR_PER_SEC, ///< transmission automatically if second changes
+ STR_PER_MIN, ///< transmission automatically if minute changes
+ STR_AUTO, ///< transmission automatically if required, e.g. on capture event
+ STR_ON_REQ_SEC, ///< transmission if second changes and a request has been received before
+ N_STR_MODE ///< the number of known modes
+};
+
+
+/**
+ * The number of serial ports which are at least available
+ * even with very old GPS receiver models. For devices providing
+ * a ::RECEIVER_INFO structure the number of provided COM ports
+ * is available in ::RECEIVER_INFO::n_com_ports.
+ */
+#define DEFAULT_N_COM 2
+
+
+/**
+ * @brief A The structure used to store the configuration of two serial ports
+ *
+ * @deprecated This structure is deprecated, ::PORT_SETTINGS and related structures
+ * should be used instead, if supported by the device.
+ */
+typedef struct
+{
+ COM_PARM com[DEFAULT_N_COM]; ///< COM0 and COM1 settings
+ uint8_t mode[DEFAULT_N_COM]; ///< COM0 and COM1 output mode
+
+} PORT_PARM;
+
+
+/**
+ * @brief The type of a GPS command code
+ *
+ * @see ::GPS_CMD_CODES
+ */
+typedef uint16_t GPS_CMD;
+
+
+/**
+ * @brief Control codes to be or'ed with a particular command/type code
+ */
+enum GPS_CMD_CTRL_CODES
+{
+ GPS_REQACK = 0x8000, ///< to device: request acknowledge
+ GPS_ACK = 0x4000, ///< from device: acknowledge a command
+ GPS_NACK = 0x2000, ///< from device: error evaluating a command
+};
+
+#define GPS_CTRL_MSK 0xF000 ///< bit mask of all ::GPS_CMD_CTRL_CODES
+
+
+/**
+ * @brief Command codes for the binary protocol
+ *
+ * These codes specify commands and associated data types used by Meinberg's
+ * binary protocol to exchange data with a device via serial port, direct USB,
+ * or socket I/O.
+ *
+ * Some commands and associated data structures can be read (r) from a device, others
+ * can be written (w) to the device, and some can also be sent automatically (a) by
+ * a device after a ::GPS_AUTO_ON command has been sent to the device.
+ * The individual command codes are marked with (rwa) accordingly, where '-' is used
+ * to indicate that a particular mode is not supported.
+ *
+ * @note Not all command code are supported by all devices.
+ * See the hints for a particular command.
+ *
+ * @note If ::GPS_ALM, ::GPS_EPH or a code named ..._IDX is sent to retrieve
+ * some data from a device then an uint16_t parameter must be also supplied
+ * in order to specify the index number of the data set to be returned.
+ * The valid index range depends on the command code.
+ * For ::GPS_ALM and ::GPS_EPH the index is the SV number which may be 0 or
+ * ::MIN_SVNO_GPS to ::MAX_SVNO_GPS. If the number is 0 then all ::N_SVNO_GPS
+ * almanacs or ephemeris data structures are returned.
+ *
+ * @see ::GPS_CMD_CODES_TABLE
+ */
+enum GPS_CMD_CODES
+{ /* system data */
+ GPS_AUTO_ON = 0x000, ///< (-w-) no data, enable auto-msgs from device
+ GPS_AUTO_OFF, ///< (-w-) no data, disable auto-msgs from device
+ GPS_SW_REV, ///< (r--) deprecated, ::SW_REV, software revision, use only if ::GPS_RECEIVER_INFO not supp.
+ GPS_BVAR_STAT, ///< (r--) ::BVAR_STAT, status of buffered variables, only if ::GPS_MODEL_HAS_BVAR_STAT
+ GPS_TIME, ///< (-wa) ::TTM, current time or capture, or init board time
+ GPS_POS_XYZ, ///< (rw-) ::XYZ, current position in ECEF coordinates, only if ::GPS_MODEL_HAS_POS_XYZ
+ GPS_POS_LLA, ///< (rw-) ::LLA, current position in geographic coordinates, only if ::GPS_MODEL_HAS_POS_LLA
+ GPS_TZDL, ///< (rw-) ::TZDL, time zone / daylight saving, only if ::GPS_MODEL_HAS_TZDL
+ GPS_PORT_PARM, ///< (rw-) deprecated, ::PORT_PARM, use ::PORT_SETTINGS etc. if ::GPS_RECEIVER_INFO supported
+ GPS_SYNTH, ///< (rw-) ::SYNTH, synthesizer settings, only if ::GPS_HAS_SYNTH
+ GPS_ANT_INFO, ///< (r-a) ::ANT_INFO, time diff after antenna disconnect, only if ::GPS_MODEL_HAS_ANT_INFO
+ GPS_UCAP, ///< (r-a) ::TTM, user capture events, only if ::RECEIVER_INFO::n_ucaps > 0
/* GPS data */
- GPS_CFGH = 0x100, /* þ þ X þ X þ SVs' configuration and health codes */
- GPS_ALM, /* þ þ X þ X þ one SV's almanac */
- GPS_EPH, /* þ þ X þ X þ one SV's ephemeris */
- GPS_UTC, /* þ þ X þ X þ UTC correction parameters */
- GPS_IONO, /* þ þ X þ X þ ionospheric correction parameters */
- GPS_ASCII_MSG /* þ þ X þ þ the GPS ASCII message */
+ GPS_CFGH = 0x100, ///< (rw-) ::CFGH, SVs' configuration and health codes
+ GPS_ALM, ///< (rw-) req: uint16_t SV num, ::SV_ALM, one SV's almanac
+ GPS_EPH, ///< (rw-) req: uint16_t SV num, ::SV_EPH, one SV's ephemeris
+ GPS_UTC, ///< (rw-) ::UTC, GPS %UTC correction parameters
+ GPS_IONO, ///< (rw-) ::IONO, GPS ionospheric correction parameters
+ GPS_ASCII_MSG ///< (r--) ::ASCII_MSG, the GPS ASCII message
};
-/*
- * modelled after GPSDEFS.H Revision 1.5
- */
-/***************************************************************************/
-/* */
-/* File: GPSDEFS.H 4.1 */
-/* */
-/* Project: Common C Library */
-/* */
-/* Compiler: Borland C++ */
-/* */
-/* Author: M. Burnicki, Meinberg Funkuhren */
-/* */
-/* */
-/* Description: */
-/* General definitions to be used with GPS166 */
-/* GPS166 Rev. 1.23 or above */
-/* */
-/* Modifications: see file GPSLIB.TXT */
-/* */
-/***************************************************************************/
-#define _GPSDEFS_H
-/* the type of various checksums */
#ifndef _CSUM_DEFINED
- typedef unsigned short CSUM;
-# define _CSUM_DEFINED
+ typedef uint16_t CSUM; /* checksum used by some structures stored in non-volatile memory */
+ #define _CSUM_DEFINED
#endif
-/* the message header */
-typedef struct {
- unsigned short gps_cmd;
- unsigned short gps_len;
- unsigned short gps_data_csum;
- unsigned short gps_hdr_csum;
+/**
+ * @brief The header of a binary message.
+ */
+typedef struct
+{
+ GPS_CMD cmd; ///< see ::GPS_CMD_CODES
+ uint16_t len; ///< length of the data portion appended after the header
+ CSUM data_csum; ///< checksum of the data portion appended after the header
+ CSUM hdr_csum; ///< checksum of the preceding header bytes
+
} GPS_MSG_HDR;
-/* a struct used to hold the software revision information */
-typedef struct {
- unsigned short code; /* e.g. 0x0120 means rev. 1.20 */
- unsigned char name[17]; /* used to identify customized versions */
+#define GPS_ID_STR_LEN 16
+#define GPS_ID_STR_SIZE ( GPS_ID_STR_LEN + 1 )
+
+/**
+ * @brief Software revision information
+ *
+ * Contains a software revision code, plus an optional
+ * identifier for a customized version.
+ */
+typedef struct
+{
+ uint16_t code; ///< Version number, e.g. 0x0120 means v1.20
+ char name[GPS_ID_STR_SIZE]; ///< Optional string identifying a customized version
+ uint8_t reserved; ///< Reserved field to yield even structure size
+
} SW_REV;
-/* GPS ASCII message */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
- char s[23]; /* 22 chars GPS ASCII message plus trailing zero */
-} ASCII_MSG;
+/**
+ * @brief GNSS satellite numbers
+ *
+ * @todo: Check if MAX_SVNO_GLN is 94 instead of 95, and thus
+ * N_SVNO_GLN is 30 instead of 31, as reported by Wikipedia.
+ */
+enum GNSS_SVNOS
+{
+ MIN_SVNO_GPS = 1, ///< min. GPS satellite PRN number
+ MAX_SVNO_GPS = 32, ///< max. GPS satellite PRN number
+ N_SVNO_GPS = 32, ///< max. number of active GPS satellites
+
+ MIN_SVNO_WAAS = 33, ///< min. WAAS satellite number
+ MAX_SVNO_WAAS = 64, ///< max. WAAS satellite number
+ N_SVNO_WAAS = 32, ///< max. number of active WAAS satellites
+
+ MIN_SVNO_GLONASS = 65, ///< min. Glonass satellite number (64 + sat slot ID)
+ MAX_SVNO_GLONASS = 95, ///< max. Glonass satellite number (64 + sat slot ID)
+ N_SVNO_GLONASS = 31 ///< max. number of active Glonass satellites
+};
+
+
+typedef uint16_t SVNO; ///< the number of an SV (Space Vehicle, i.e. satellite)
+typedef uint16_t HEALTH; ///< an SV's 6 bit health code
+typedef uint16_t CFG; ///< an SV's 4 bit configuration code
+typedef uint16_t IOD; ///< Issue-Of-Data code
+
+
+/**
+ * @brief Status flags of battery buffered data
+ *
+ * Related to data received from the satellites, or data derived thereof.
+ *
+ * All '0' means OK, single bits set to '1' indicate
+ * the associated type of GPS data is not available.
+ *
+ * @see ::BVAR_FLAGS
+ */
+typedef uint16_t BVAR_STAT;
+
+#define _mbg_swab_bvar_stat( _p ) _mbg_swab16( (_p) )
-#define MIN_SVNO 1 /* min. SV number */
-#define MAX_SVNO 32 /* max. SV number */
-#define N_SVNO ( MAX_SVNO - MIN_SVNO + 1) /* number of possibly active SVs */
+/**
+ * @brief Enumeration of flag bits used to define ::BVAR_FLAGS
+ *
+ * For each bit which is set this means the associated data set in
+ * non-volatile memory is not available, or incomplete.
+ * Most data sets will just be re-collected from the data streams sent
+ * by the satellites. However, the receiver position has usually been
+ * computed earlier during normal operation, and will be re-computed
+ * when a sufficient number of satellites can be received.
+ *
+ * @see ::BVAR_STAT
+ * @see ::BVAR_FLAGS
+ * @see ::BVAR_FLAG_NAMES
+ */
+enum BVAR_FLAG_BITS
+{
+ BVAR_BIT_CFGH_INVALID, ///< Satellite configuration and health parameters incomplete
+ BVAR_BIT_ALM_NOT_COMPLETE, ///< Almanac parameters incomplete
+ BVAR_BIT_UTC_INVALID, ///< %UTC offset parameters incomplete
+ BVAR_BIT_IONO_INVALID, ///< Ionospheric correction parameters incomplete
+ BVAR_BIT_RCVR_POS_INVALID, ///< No valid receiver position available
+ N_BVAR_BIT ///< number of defined ::BVAR_STAT bits
+};
+
+
+/**
+ * @brief Bit masks associated with ::BVAR_FLAG_BITS
+ *
+ * Used with ::BVAR_STAT.
+ *
+ * @see ::BVAR_STAT
+ * @see ::BVAR_FLAG_BITS
+ * @see ::BVAR_FLAG_NAMES
+ */
+enum BVAR_FLAGS
+{
+ BVAR_CFGH_INVALID = ( 1UL << BVAR_BIT_CFGH_INVALID ), ///< see ::BVAR_BIT_CFGH_INVALID
+ BVAR_ALM_NOT_COMPLETE = ( 1UL << BVAR_BIT_ALM_NOT_COMPLETE ), ///< see ::BVAR_BIT_ALM_NOT_COMPLETE
+ BVAR_UTC_INVALID = ( 1UL << BVAR_BIT_UTC_INVALID ), ///< see ::BVAR_BIT_UTC_INVALID
+ BVAR_IONO_INVALID = ( 1UL << BVAR_BIT_IONO_INVALID ), ///< see ::BVAR_BIT_IONO_INVALID
+ BVAR_RCVR_POS_INVALID = ( 1UL << BVAR_BIT_RCVR_POS_INVALID ), ///< see ::BVAR_BIT_RCVR_POS_INVALID
+};
-typedef short SVNO; /* the number of a SV */
-typedef unsigned short HEALTH; /* a SV's health code */
-typedef unsigned short CFG; /* a SV's configuration code */
-typedef unsigned short IOD; /* Issue-Of-Data code */
-/* Date and time referred to the linear time scale defined by GPS. */
-/* GPS time is defined by the number of weeks since midnight from */
-/* January 5, 1980 to January 6, 1980 plus the number of seconds of */
-/* the current week plus fractions of a second. GPS time differs from */
-/* UTC because UTC is corrected with leap seconds while GPS time scale */
-/* is continuous. */
+/**
+ * @brief A structure used to hold time in GPS format
+ *
+ * Date and time refer to the linear time scale defined by GPS, with
+ * the epoch starting at %UTC midnight at the beginning of January 6, 1980.
+ *
+ * GPS time is counted by the week numbers since the epoch, plus second
+ * of the week, plus fraction of the second. The week number transmitted
+ * by the satellites rolls over from 1023 to 0, but Meinberg devices
+ * just continue to count the weeks beyond the 1024 week limit to keep
+ * the receiver's internal time.
+ *
+ * %UTC time differs from GPS time since a number of leap seconds have
+ * been inserted in the %UTC time scale after the GPS epoche. The number
+ * of leap seconds is disseminated by the satellites using the ::UTC
+ * parameter set, which also provides info on pending leap seconds.
+ */
+typedef struct
+{
+ uint16_t wn; ///< the week number since GPS has been installed
+ uint32_t sec; ///< the second of that week
+ uint32_t tick; ///< fractions of a second, 1/::RECEIVER_INFO::ticks_per_sec units
-typedef struct {
- unsigned short wn; /* the week number since GPS has been installed */
- unsigned long sec; /* the second of that week */
- unsigned long tick; /* fractions of a second; scale: 1E-7 */
} T_GPS;
-/* Local date and time computed from GPS time. The current number */
-/* of leap seconds have to be added to get UTC from GPS time. */
-/* Additional corrections could have been made according to the */
-/* time zone/daylight saving parameters (TZDL, see below) defined */
-/* by the user. The status field can be checked to see which corrections */
-/* have been applied. */
-
-#ifndef GPS166_TM_DEFINED
- typedef struct {
- short year; /* 0..9999 */
- char month; /* 1..12 */
- char mday; /* 1..31 */
- short yday; /* 1..366 */
- char wday; /* 0..6 == Sun..Sat */
- char hour; /* 0..23 */
- char minute; /* 0..59 */
- char second; /* 0..59 */
- long frac; /* fractions of a second, scale 1E-7 */
- long offs_from_utc; /* local time's offset from UTC */
- unsigned short status; /* flags */
- } TM;
-
- /* status flags used with conversion from GPS time to local time */
-
-# define TM_UTC 0x01 /* UTC correction has been made */
-# define TM_LOCAL 0x02 /* UTC has been converted to local time */
-# define TM_DL_ANN 0x04 /* state of daylight saving is going to change */
-# define TM_DL_ENB 0x08 /* daylight saving is enabled */
-# define TM_LS_ANN 0x10 /* leap second will be inserted */
-# define TM_LS_ENB 0x20 /* current second is leap second */
-
-# define GPS166_TM_DEFINED
-#endif
+/**
+ * @brief Local date and time computed from GPS time
+ *
+ * The current number of leap seconds have to be added to get %UTC
+ * from GPS time. Additional corrections could have been made according
+ * to the time zone/daylight saving parameters ::TZDL defined by the user.
+ * The status field can be checked to see which corrections
+ * have actually been applied.
+ *
+ * @note Conversion from GPS time to %UTC and/or local time can only be
+ * done if some valid ::UTC correction parameters are available in the
+ * receiver's non-volatile memory.
+ */
+typedef struct
+{
+ int16_t year; ///< year number, 0..9999
+ int8_t month; ///< month, 1..12
+ int8_t mday; ///< day of month, 1..31
+ int16_t yday; ///< day of year, 1..365, or 366 in case of leap year
+ int8_t wday; ///< day of week, 0..6 == Sun..Sat
+ int8_t hour; ///< hours, 0..23
+ int8_t min; ///< minutes, 0..59
+ int8_t sec; ///< seconds, 0..59, or 60 in case of inserted leap second
+ int32_t frac; ///< fractions of a second, 1/::RECEIVER_INFO::ticks_per_sec units
+ int32_t offs_from_utc; ///< local time offset from %UTC [sec]
+ uint16_t status; ///< status flags, see ::TM_GPS_STATUS_BIT_MASKS
+
+} TM_GPS;
+
+
+
+/**
+ * @brief Status flag bits used to define ::TM_GPS_STATUS_BIT_MASKS
+ *
+ * These bits report info on the time conversion from GPS time to %UTC
+ * and/or local time as well as device status info.
+ *
+ * @see ::TM_GPS_STATUS_BIT_MASKS
+ */
+enum TM_GPS_STATUS_BITS
+{
+ TM_BIT_UTC, ///< %UTC correction has been made
+ TM_BIT_LOCAL, ///< %UTC has been converted to local time according to ::TZDL settings
+ TM_BIT_DL_ANN, ///< state of daylight saving is going to change
+ TM_BIT_DL_ENB, ///< daylight saving is in effect
+ TM_BIT_LS_ANN, ///< leap second pending
+ TM_BIT_LS_ENB, ///< current second is leap second
+ TM_BIT_LS_ANN_NEG, ///< set in addition to ::TM_BIT_LS_ANN if leap sec is negative
+ TM_BIT_INVT, ///< invalid time, e.g. if RTC battery bas been empty
+
+ TM_BIT_EXT_SYNC, ///< synchronized externally
+ TM_BIT_HOLDOVER, ///< in holdover mode after previous synchronization
+ TM_BIT_ANT_SHORT, ///< antenna cable short circuited
+ TM_BIT_NO_WARM, ///< OCXO has not warmed up
+ TM_BIT_ANT_DISCONN, ///< antenna currently disconnected
+ TM_BIT_SYN_FLAG, ///< TIME_SYN output is low
+ TM_BIT_NO_SYNC, ///< time sync actually not verified
+ TM_BIT_NO_POS ///< position actually not verified, LOCK LED off
+};
-/* the status flags below are defined starting with rev. 1.32 */
+/**
+ * @brief Status flag masks used with ::TM_GPS::status
+ *
+ * These bits report info on the time conversion from GPS time to %UTC
+ * and/or local time as well as device status info.
+ *
+ * @see ::TM_GPS_STATUS_BITS
+ */
+enum TM_GPS_STATUS_BIT_MASKS
+{
+ TM_UTC = ( 1UL << TM_BIT_UTC ), ///< see ::TM_BIT_UTC
+ TM_LOCAL = ( 1UL << TM_BIT_LOCAL ), ///< see ::TM_BIT_LOCAL
+ TM_DL_ANN = ( 1UL << TM_BIT_DL_ANN ), ///< see ::TM_BIT_DL_ANN
+ TM_DL_ENB = ( 1UL << TM_BIT_DL_ENB ), ///< see ::TM_BIT_DL_ENB
+ TM_LS_ANN = ( 1UL << TM_BIT_LS_ANN ), ///< see ::TM_BIT_LS_ANN
+ TM_LS_ENB = ( 1UL << TM_BIT_LS_ENB ), ///< see ::TM_BIT_LS_ENB
+ TM_LS_ANN_NEG = ( 1UL << TM_BIT_LS_ANN_NEG ), ///< see ::TM_BIT_LS_ANN_NEG
+ TM_INVT = ( 1UL << TM_BIT_INVT ), ///< see ::TM_BIT_INVT
+
+ TM_EXT_SYNC = ( 1UL << TM_BIT_EXT_SYNC ), ///< see ::TM_BIT_EXT_SYNC
+ TM_HOLDOVER = ( 1UL << TM_BIT_HOLDOVER ), ///< see ::TM_BIT_HOLDOVER
+ TM_ANT_SHORT = ( 1UL << TM_BIT_ANT_SHORT ), ///< see ::TM_BIT_ANT_SHORT
+ TM_NO_WARM = ( 1UL << TM_BIT_NO_WARM ), ///< see ::TM_BIT_NO_WARM
+ TM_ANT_DISCONN = ( 1UL << TM_BIT_ANT_DISCONN ), ///< see ::TM_BIT_ANT_DISCONN
+ TM_SYN_FLAG = ( 1UL << TM_BIT_SYN_FLAG ), ///< see ::TM_BIT_SYN_FLAG
+ TM_NO_SYNC = ( 1UL << TM_BIT_NO_SYNC ), ///< see ::TM_BIT_NO_SYNC
+ TM_NO_POS = ( 1UL << TM_BIT_NO_POS ) ///< see ::TM_BIT_NO_POS
+};
-#define TM_ANT_DISCONN 0x1000 /* antenna currently disconnected */
-#define TM_SYN_FLAG 0x2000 /* TIME_SYN output is low */
-#define TM_NO_SYNC 0x4000 /* not sync'ed after reset */
-#define TM_NO_POS 0x8000 /* position not computed after reset, */
- /* LOCK LED off */
-/* a struct used to transmit information on date and time */
+/**
+ * @brief A structure used to transmit information on date and time
+ *
+ * This structure can be used to transfer the current time, in which
+ * case the channel field has to be set to -1, or an event capture time
+ * retrieved from the on-board FIFO, in which case the channel field
+ * contains the index of the time capture input, e.g. 0 or 1.
+ */
+typedef struct
+{
+ int16_t channel; ///< -1: the current on-board time; >= 0 the capture channel number
+ T_GPS t; ///< time in GPS scale and format
+ TM_GPS tm; ///< time converted to %UTC and/or local time according to ::TZDL settings
-typedef struct {
- short channel; /* -1: the current time; 0, 1: capture 0, 1 */
- T_GPS t; /* time in GPS format */
- TM tm; /* that time converted to local time */
} TTM;
@@ -249,282 +502,462 @@ typedef struct {
/* to geographic coordinates as defined by WGS84 (World Geodetic */
/* System from 1984). */
-#ifndef _XYZ_DEFINED
- /* sequence and number of components of a cartesian position */
- enum { XP, YP, ZP, N_XYZ };
+/**
+ * @brief Sequence and number of components of a cartesian position
+ */
+enum XYZ_FIELDS { XP, YP, ZP, N_XYZ }; // x, y, z
+
+/**
+ * @brief A position in cartesian coordinates
+ *
+ * Usually earth centered, earth fixed (ECEF) coordinates,
+ * in [m].
+ *
+ * @note In the original code this is an array of double.
+ *
+ * @see ::XYZ_FIELDS
+ */
+typedef l_fp XYZ[N_XYZ];
- /* a type of array holding a cartesian position */
- typedef l_fp XYZ[N_XYZ]; /* values are in [m] */
-# define _XYZ_DEFINED
-#endif
+/**
+ * @brief Sequence and number of components of a geographic position
+ */
+enum LLA_FIELDS { LAT, LON, ALT, N_LLA }; /* latitude, longitude, altitude */
+/**
+ * @brief A geographic position based on latitude, longitude, and altitude
+ *
+ * The geographic position associated to specific cartesian coordinates
+ * depends on the characteristics of the ellipsoid used for the computation,
+ * the so-called geographic datum. GPS uses the WGS84 (World Geodetic System
+ * from 1984) ellipsoid by default.
+ *
+ * lon, lat in [rad], alt in [m]
+ *
+ * @note In the original code this is an array of double.
+ *
+ * @see ::LLA_FIELDS
+ */
+typedef l_fp LLA[N_LLA];
-#ifndef _LLA_DEFINED
- /* sequence and number of components of a geographic position */
- enum { LAT, LON, ALT, N_LLA }; /* latitude, longitude, altitude */
- /* a type of array holding a geographic position */
- typedef l_fp LLA[N_LLA]; /* lon, lat in [rad], alt in [m] */
+/**
+ * @defgroup group_synth Synthesizer parameters
+ *
+ * Synthesizer frequency is expressed as a
+ * four digit decimal number (freq) to be multiplied by 0.1 Hz and an
+ * base 10 exponent (range). If the effective frequency is less than
+ * 10 kHz its phase is synchronized corresponding to the variable phase.
+ * Phase may be in a range from -360 deg to +360 deg with a resolution
+ * of 0.1 deg, so the resulting numbers to be stored are in a range of
+ * -3600 to +3600.
+ *
+ * Example:<br>
+ * Assume the value of freq is 2345 (decimal) and the value of phase is 900.
+ * If range == 0 the effective frequency is 234.5 Hz with a phase of +90 deg.
+ * If range == 1 the synthesizer will generate a 2345 Hz output frequency
+ * and so on.
+ *
+ * Limitations:<br>
+ * If freq == 0 the synthesizer is disabled. If range == 0 the least
+ * significant digit of freq is limited to 0, 3, 5 or 6. The resulting
+ * frequency is shown in the examples below:
+ * - freq == 1230 --> 123.0 Hz
+ * - freq == 1233 --> 123 1/3 Hz (real 1/3 Hz, NOT 123.3 Hz)
+ * - freq == 1235 --> 123.5 Hz
+ * - freq == 1236 --> 123 2/3 Hz (real 2/3 Hz, NOT 123.6 Hz)
+ *
+ * If range == ::MAX_SYNTH_RANGE the value of freq must not exceed 1000, so
+ * the output frequency is limited to 10 MHz (see ::MAX_SYNTH_FREQ_VAL).
+ *
+ * @{ */
-# define _LLA_DEFINED
-#endif
+#define N_SYNTH_FREQ_DIGIT 4 ///< number of digits to edit
+#define MAX_SYNTH_FREQ 1000 ///< if range == ::MAX_SYNTH_RANGE
-/* Synthesizer parameters. Synthesizer frequency is expressed as a */
-/* four digit decimal number (freq) to be multiplied by 0.1 Hz and an */
-/* base 10 exponent (range). If the effective frequency is less than */
-/* 10 kHz its phase is synchronized corresponding to the variable phase. */
-/* Phase may be in a range from -360° to +360° with a resolution of 0.1°, */
-/* so the resulting numbers to be stored are in a range of -3600 to +3600. */
-
-/* Example: */
-/* Assume the value of freq is 2345 (decimal) and the value of phase is 900. */
-/* If range == 0 the effective frequency is 234.5 Hz with a phase of +90°. */
-/* If range == 1 the synthesizer will generate a 2345 Hz output frequency */
-/* and so on. */
-
-/* Limitations: */
-/* If freq == 0 the synthesizer is disabled. If range == 0 the least */
-/* significant digit of freq is limited to 0, 3, 5 or 6. The resulting */
-/* frequency is shown in the examples below: */
-/* freq == 1230 --> 123.0 Hz */
-/* freq == 1233 --> 123 1/3 Hz (real 1/3 Hz, NOT 123.3 Hz) */
-/* freq == 1235 --> 123.5 Hz */
-/* freq == 1236 --> 123 2/3 Hz (real 2/3 Hz, NOT 123.6 Hz) */
-
-/* If range == MAX_RANGE the value of freq must not exceed 1200, so the */
-/* output frequency is limited to 12 MHz. */
-
-/* Phase will be ignored if the resulting frequency is greater or equal */
-/* to 10 kHz. */
-
-#define MAX_SYNTH_FREQ 1200 /* if range == MAX_SYNTH_RANGE */
#define MIN_SYNTH_RANGE 0
#define MAX_SYNTH_RANGE 5
-#define MAX_SYNTH_PHASE 3600
+#define N_SYNTH_RANGE ( MAX_SYNTH_RANGE - MIN_SYNTH_RANGE + 1 )
-typedef struct {
- short freq; /* four digits used; scale: 0.1; e.g. 1234 -> 123.4 Hz */
- short range; /* scale factor for freq; 0..MAX_SYNTH_RANGE */
- short phase; /* -MAX_SYNTH_PHASE..+MAX_SYNTH_PHASE; >0 -> pulses later */
-} SYNTH;
+#define N_SYNTH_PHASE_DIGIT 4
+#define MAX_SYNTH_PHASE 3600
+#define MAX_SYNTH_FREQ_EDIT 9999 ///< max sequence of digits when editing
-/* Time zone/daylight saving parameters. */
-/* the name of a time zone, 5 characters plus trailing zero */
-typedef char TZ_NAME[6];
+/**
+ * @brief The maximum frequency that can be configured for the synthesizer
+ */
+#define MAX_SYNTH_FREQ_VAL 10000000UL ///< 10 MHz
+/* == MAX_SYNTH_FREQ * 10^(MAX_SYNTH_RANGE-1) */
-typedef struct {
- long offs; /* offset from UTC to local time [sec] */
- long offs_dl; /* additional offset if daylight saving enabled [sec] */
- TM tm_on; /* date/time when daylight saving starts */
- TM tm_off; /* date/time when daylight saving ends */
- TZ_NAME name[2]; /* names without and with daylight saving enabled */
-} TZDL;
+/**
+ * @brief The synthesizer's phase is only be synchronized if the frequency is below this limit
+ */
+#define SYNTH_PHASE_SYNC_LIMIT 10000UL ///< 10 kHz
-/* The constant below is defined beginning with software rev. 1.29. */
-/* If the year in tzdl.tmon and tzdl.tm_off is or'ed with that constant, */
-/* the receiver automatically generates daylight saving year by year. */
-/* See GPSLIB.TXT for more information. */
+/**
+ * A Macro used to determine the position of the decimal point
+ * when printing the synthesizer frequency as 4 digit value
+ */
+#define _synth_dp_pos_from_range( _r ) \
+ ( ( ( N_SYNTH_RANGE - (_r) ) % ( N_SYNTH_FREQ_DIGIT - 1 ) ) + 1 )
+
+/**
+ * @brief Synthesizer frequency units
+ *
+ * An initializer for commonly displayed synthesizer frequency units
+ * (::N_SYNTH_RANGE strings)
+ */
+#define DEFAULT_FREQ_RANGES \
+{ \
+ "Hz", \
+ "kHz", \
+ "kHz", \
+ "kHz", \
+ "MHz", \
+ "MHz", \
+}
-#define DL_AUTO_FLAG 0x8000
-/* Example: */
-/* for automatic daylight saving enable/disable in Central Europe, */
-/* the variables are to be set as shown below: */
-/* offs = 3600L one hour from UTC */
-/* offs_dl = 3600L one additional hour if daylight saving enabled */
-/* tm_on = first Sunday from March 25, 02:00:00h ( year |= DL_AUTO_FLAG ) */
-/* tm_off = first Sunday from Sept 24, 03:00:00h ( year |= DL_AUTO_FLAG ) */
-/* name[0] == "MEZ " name if daylight saving not enabled */
-/* name[1] == "MESZ " name if daylight saving is enabled */
+/**
+ * @brief Synthesizer configuration parameters
+ */
+typedef struct
+{
+ int16_t freq; ///< four digits used; scale: 0.1 Hz; e.g. 1234 -> 123.4 Hz
+ int16_t range; ///< scale factor for freq; 0..::MAX_SYNTH_RANGE
+ int16_t phase; ///< -::MAX_SYNTH_PHASE..+::MAX_SYNTH_PHASE; >0 -> pulses later
+} SYNTH;
+#define _mbg_swab_synth( _p ) \
+{ \
+ _mbg_swab16( &(_p)->freq ); \
+ _mbg_swab16( &(_p)->range ); \
+ _mbg_swab16( &(_p)->phase ); \
+}
-/* the structure below was defined in rev. 1.31. It reflects the status */
-/* of the antenna, the times of last disconnect/reconnect and the boards */
-/* clock offset after the phase of disconnection. */
-typedef struct {
- short status; /* current status of antenna */
- TM tm_disconn; /* time of antenna disconnect */
- TM tm_reconn; /* time of antenna reconnect */
- long delta_t; /* clock offset at reconnect time, units: TICKS_PER_SEC */
-} ANT_INFO;
+/**
+ * @brief Enumeration of synthesizer states
+ */
+enum SYNTH_STATES
+{
+ SYNTH_DISABLED, ///< disbled by cfg, i.e. freq == 0.0
+ SYNTH_OFF, ///< not enabled after power-up
+ SYNTH_FREE, ///< enabled, but not synchronized
+ SYNTH_DRIFTING, ///< has initially been sync'd, but now running free
+ SYNTH_SYNC, ///< fully synchronized
+ N_SYNTH_STATE ///< the number of known states
+};
+
+/**
+ * @brief A structure used to report the synthesizer state
+ */
+typedef struct
+{
+ uint8_t state; ///< state code as enumerated in ::SYNTH_STATES
+ uint8_t flags; ///< reserved, currently always 0
-/* the status field may be set to one of the values below: */
+} SYNTH_STATE;
-enum {
- ANT_INVALID, /* struct not set yet because ant. has not been disconn. */
- ANT_DISCONN, /* ant. now disconn., tm_reconn and delta_t not set */
- ANT_RECONN /* ant. has been disconn. and reconn., all fields valid */
-};
+#define _mbg_swab_synth_state( _p ) _nop_macro_fnc()
+#define SYNTH_FLAG_PHASE_IGNORED 0x01
-/* Summary of configuration and health data of all SVs. */
+/** @} defgroup group_synth */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
- T_GPS tot_51; /* time of transmission, page 51 */
- T_GPS tot_63; /* time of transmission, page 63 */
- T_GPS t0a; /* complete reference time almanac */
- CFG cfg[N_SVNO]; /* SV configuration from page 63 */
- HEALTH health[N_SVNO]; /* SV health from pages 51, 63 */
-} CFGH;
+/**
+ * @defgroup group_tzdl Time zone / daylight saving parameters
+ *
+ * Example: <br>
+ * For automatic daylight saving enable/disable in Central Europe,
+ * the variables are to be set as shown below: <br>
+ * - offs = 3600L one hour from %UTC
+ * - offs_dl = 3600L one additional hour if daylight saving enabled
+ * - tm_on = first Sunday from March 25, 02:00:00h ( year |= ::DL_AUTO_FLAG )
+ * - tm_off = first Sunday from October 25, 03:00:00h ( year |= ::DL_AUTO_FLAG )
+ * - name[0] == "CET " name if daylight saving not enabled
+ * - name[1] == "CEST " name if daylight saving is enabled
+ *
+ * @{ */
+
+/**
+ * @brief The name of a time zone
+ *
+ * @note Up to 5 printable characters, plus trailing zero
+ */
+typedef char TZ_NAME[6];
+/**
+ * @brief Time zone / daylight saving parameters
+ *
+ * This structure is used to specify how a device converts on-board %UTC
+ * to local time, including computation of beginning and end of daylight
+ * saving time (DST), if required.
+ *
+ * @note The ::TZDL structure contains members of type ::TM_GPS to specify
+ * the times for beginning and end of DST. However, the ::TM_GPS::frac,
+ * ::TM_GPS::offs_from_utc, and ::TM_GPS::status fields of these ::TZDL::tm_on
+ * and ::TZDL::tm_off members are ignored for the conversion to local time,
+ * and thus should be 0.
+ */
+typedef struct
+{
+ int32_t offs; ///< standard offset from %UTC to local time [sec]
+ int32_t offs_dl; ///< additional offset if daylight saving enabled [sec]
+ TM_GPS tm_on; ///< date/time when daylight saving starts
+ TM_GPS tm_off; ///< date/time when daylight saving ends
+ TZ_NAME name[2]; ///< names without and with daylight saving enabled
+} TZDL;
+
+/**
+ * @brief A flag indicating automatic computation of DST
+ *
+ * If this flag is or'ed to the year numbers in ::TZDL::tm_on and ::TZDL::tm_off
+ * then daylight saving is computed automatically year by year.
+ */
+#define DL_AUTO_FLAG 0x8000
-/* UTC correction parameters */
+/** @} defgroup group_tzdl */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
- T_GPS t0t; /* Reference Time UTC Parameters [sec] */
- l_fp A0; /* ± Clock Correction Coefficient 0 [sec] */
- l_fp A1; /* ± Clock Correction Coefficient 1 [sec/sec] */
- u_short WNlsf; /* week number of nearest leap second */
- short DNt; /* the day number at the end of which LS is inserted */
- char delta_tls; /* */
- char delta_tlsf; /* */
+/**
+ * @brief Antenna status and error at reconnect information
+ *
+ * The structure below reflects the status of the antenna,
+ * the times of last disconnect/reconnect, and the board's
+ * clock offset when it has synchronized again after the
+ * disconnection interval.
+ *
+ * @note ::ANT_INFO::status changes back to ::ANT_RECONN only
+ * after the antenna has been reconnected <b>and</b> the
+ * receiver has re-synchronized to the satellite signal.
+ * In this case ::ANT_INFO::delta_t reports the time offset
+ * before resynchronization, i.e. how much the internal
+ * time has drifted while the antenna was disconnected.
+ */
+typedef struct
+{
+ int16_t status; ///< current status of antenna, see ::ANT_STATUS_CODES
+ TM_GPS tm_disconn; ///< time of antenna disconnect
+ TM_GPS tm_reconn; ///< time of antenna reconnect
+ int32_t delta_t; ///< clock offs at reconn. time in 1/::RECEIVER_INFO::ticks_per_sec units
-} UTC;
+} ANT_INFO;
-/* a struct used to hold the settings of a serial port */
-#ifndef _COM_PARM_DEFINED
- typedef long BAUD_RATE;
+/**
+ * @brief Status code used with ::ANT_INFO::status
+ */
+enum ANT_STATUS_CODES
+{
+ ANT_INVALID, ///< No other fields valid since antenna has not yet been disconnected
+ ANT_DISCONN, ///< Antenna is disconnected, tm_reconn and delta_t not yet set
+ ANT_RECONN, ///< Antenna has been disconnect, and receiver sync. after reconnect, so all fields valid
+ N_ANT_STATUS_CODES ///< the number of known status codes
+};
- /* indices used to identify a parameter in the framing string */
- enum { F_DBITS, F_PRTY, F_STBITS };
- /* types of handshake */
- enum { HS_NONE, HS_XONXOFF, HS_RTSCTS };
- typedef struct {
- BAUD_RATE baud_rate; /* e.g. 19200L */
- char framing[4]; /* e.g. "8N1" */
- short handshake; /* a numeric value, only HS_NONE supported yet */
- } COM_PARM;
+/**
+ * @brief Summary of configuration and health data of all satellites
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes
+ int16_t valid; ///< flag data are valid
+
+ T_GPS tot_51; ///< time of transmission, page 51
+ T_GPS tot_63; ///< time of transmission, page 63
+ T_GPS t0a; ///< complete reference time almanac
+
+ CFG cfg[N_SVNO_GPS]; ///< 4 bit SV configuration code from page 63
+ HEALTH health[N_SVNO_GPS]; ///< 6 bit SV health codes from pages 51, 63
+
+} CFGH;
+
-#define _COM_PARM_DEFINED
-#endif
+/**
+ * @brief GPS %UTC correction parameters
+ *
+ * %UTC correction parameters basically as sent by the GPS satellites.
+ *
+ * The csum field is only used by the card's firmware to check the
+ * consistency of the structure in non-volatile memory.
+ *
+ * The field labeled valid indicates if the parameter set is valid, i.e.
+ * if it contains data received from the satellites.
+ *
+ * t0t, A0 and A1 contain fractional correction parameters for the current
+ * GPS-%UTC time offset in addition to the whole seconds. This is evaluated
+ * by the receivers' firmware to convert GPS time to %UTC time.
+ *
+ * The delta_tls field contains the current full seconds offset between
+ * GPS time and %UTC, which corresponds to the number of leap seconds inserted
+ * into the %UTC time scale since GPS was put into operation in January 1980.
+ *
+ * delta_tlfs holds the number of "future" leap seconds, i.e. the %UTC offset
+ * after the next leap second event defined by WNlsf and DNt.
+ *
+ * The fields WNlsf and DNt specify the GPS week number and the day number
+ * in that week for the end of which a leap second has been scheduled.
+ *
+ * @note: The satellites transmit WNlsf only as a signed 8 bit value, so it
+ * can only define a point in time which is +/- 127 weeks off the current time.
+ * The firmware tries to expand this based on the current week number, but
+ * the result is ambiguous if the leap second occurs or occurred more
+ * than 127 weeks in the future or past.
+ *
+ * So the leap second date should <b>only</b> be evaluated and displayed
+ * in a user interface if the fields delta_tls and delta_tlsf have
+ * different values, in which case there is indeed a leap second announcement
+ * inside the +/- 127 week range.
+ *
+ * @note In the original code the type of A0 and A1 is double.
+ */
+typedef struct
+{
+ CSUM csum; ///< Checksum of the remaining bytes
+ int16_t valid; ///< Flag indicating %UTC parameters are valid
+ T_GPS t0t; ///< Reference Time %UTC Parameters [wn|sec]
+ l_fp A0; ///< +- Clock Correction Coefficient 0 [sec]
+ l_fp A1; ///< +- Clock Correction Coefficient 1 [sec/sec]
-/* the codes below define what has to comes out of the serial ports */
+ uint16_t WNlsf; ///< Week number of nearest leap second
+ int16_t DNt; ///< The day number at the end of which a leap second occurs
+ int8_t delta_tls; ///< Current %UTC offset to GPS system time [sec]
+ int8_t delta_tlsf; ///< Future %UTC offset to GPS system time after next leap second transition [sec]
-enum { STR_ON_REQ, STR_PER_SEC,
- STR_PER_MIN, N_STR_MODE_0, /* COM0 and COM1 */
- STR_UCAP = N_STR_MODE_0,
- STR_UCAP_REQ, N_STR_MODE_1 /* COM1 only */
- };
+} UTC;
-#define N_COM 2 /* the number of serial ports */
+/**
+ * @brief GPS ASCII message
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes */
+ int16_t valid; ///< flag data are valid
+ char s[23]; ///< 22 chars GPS ASCII message plus trailing zero
-/* the structure used to store the modes of both serial ports */
+} ASCII_MSG;
-typedef struct {
- COM_PARM com[N_COM]; /* COM0 and COM1 settings */
- u_char mode[N_COM]; /* COM0 and COM1 output mode */
-} PORT_PARM;
-/* Ephemeris parameters of one specific SV. Needed to compute the position */
-/* of a satellite at a given time with high precision. Valid for an */
-/* interval of 4 to 6 hours from start of transmission. */
-
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
-
- HEALTH health; /* health indication of transmitting SV [---] */
- IOD IODC; /* Issue Of Data, Clock */
- IOD IODE2; /* Issue of Data, Ephemeris (Subframe 2) */
- IOD IODE3; /* Issue of Data, Ephemeris (Subframe 3) */
- T_GPS tt; /* time of transmission */
- T_GPS t0c; /* Reference Time Clock [---] */
- T_GPS t0e; /* Reference Time Ephemeris [---] */
-
- l_fp sqrt_A; /* Square Root of semi-major Axis [sqrt(m)] */
- l_fp e; /* Eccentricity [---] */
- l_fp M0; /* ± Mean Anomaly at Ref. Time [rad] */
- l_fp omega; /* ± Argument of Perigee [rad] */
- l_fp OMEGA0; /* ± Longit. of Asc. Node of orbit plane [rad] */
- l_fp OMEGADOT; /* ± Rate of Right Ascension [rad/sec] */
- l_fp deltan; /* ± Mean Motion Diff. from computed value [rad/sec] */
- l_fp i0; /* ± Inclination Angle [rad] */
- l_fp idot; /* ± Rate of Inclination Angle [rad/sec] */
- l_fp crc; /* ± Cosine Corr. Term to Orbit Radius [m] */
- l_fp crs; /* ± Sine Corr. Term to Orbit Radius [m] */
- l_fp cuc; /* ± Cosine Corr. Term to Arg. of Latitude [rad] */
- l_fp cus; /* ± Sine Corr. Term to Arg. of Latitude [rad] */
- l_fp cic; /* ± Cosine Corr. Term to Inclination Angle [rad] */
- l_fp cis; /* ± Sine Corr. Term to Inclination Angle [rad] */
-
- l_fp af0; /* ± Clock Correction Coefficient 0 [sec] */
- l_fp af1; /* ± Clock Correction Coefficient 1 [sec/sec] */
- l_fp af2; /* ± Clock Correction Coefficient 2 [sec/sec²] */
- l_fp tgd; /* ± estimated group delay differential [sec] */
-
- u_short URA; /* predicted User Range Accuracy */
-
- u_char L2code; /* code on L2 channel [---] */
- u_char L2flag; /* L2 P data flag [---] */
+/**
+ * @brief Ephemeris parameters of one specific satellite
+ *
+ * Needed to compute the position of a satellite at a given time with
+ * high precision. Valid for an interval of 4 to 6 hours from start
+ * of transmission.
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes
+ int16_t valid; ///< flag data are valid
+
+ HEALTH health; ///< health indication of transmitting SV [---]
+ IOD IODC; ///< Issue Of Data, Clock
+ IOD IODE2; ///< Issue of Data, Ephemeris (Subframe 2)
+ IOD IODE3; ///< Issue of Data, Ephemeris (Subframe 3)
+ T_GPS tt; ///< time of transmission
+ T_GPS t0c; ///< Reference Time Clock [---]
+ T_GPS t0e; ///< Reference Time Ephemeris [---]
+
+ l_fp sqrt_A; ///< Square Root of semi-major Axis [sqrt(m)]
+ l_fp e; ///< Eccentricity [---]
+ l_fp M0; ///< +- Mean Anomaly at Ref. Time [rad]
+ l_fp omega; ///< +- Argument of Perigee [rad]
+ l_fp OMEGA0; ///< +- Longit. of Asc. Node of orbit plane [rad]
+ l_fp OMEGADOT; ///< +- Rate of Right Ascension [rad/sec]
+ l_fp deltan; ///< +- Mean Motion Diff. from computed value [rad/sec]
+ l_fp i0; ///< +- Inclination Angle [rad]
+ l_fp idot; ///< +- Rate of Inclination Angle [rad/sec]
+ l_fp crc; ///< +- Cosine Corr. Term to Orbit Radius [m]
+ l_fp crs; ///< +- Sine Corr. Term to Orbit Radius [m]
+ l_fp cuc; ///< +- Cosine Corr. Term to Arg. of Latitude [rad]
+ l_fp cus; ///< +- Sine Corr. Term to Arg. of Latitude [rad]
+ l_fp cic; ///< +- Cosine Corr. Term to Inclination Angle [rad]
+ l_fp cis; ///< +- Sine Corr. Term to Inclination Angle [rad]
+
+ l_fp af0; ///< +- Clock Correction Coefficient 0 [sec]
+ l_fp af1; ///< +- Clock Correction Coefficient 1 [sec/sec]
+ l_fp af2; ///< +- Clock Correction Coefficient 2 [sec/sec^2]
+ l_fp tgd; ///< +- estimated group delay differential [sec]
+
+ uint16_t URA; ///< predicted User Range Accuracy
+
+ uint8_t L2code; ///< code on L2 channel [---]
+ uint8_t L2flag; ///< L2 P data flag [---]
} EPH;
-/* Almanac parameters of one specific SV. A reduced precision set of */
-/* parameters used to check if a satellite is in view at a given time. */
-/* Valid for an interval of more than 7 days from start of transmission. */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
- HEALTH health; /* [---] */
- T_GPS t0a; /* Reference Time Almanac [sec] */
+/**
+ * @brief Almanac parameters of one specific satellite
+ *
+ * A reduced precision set of parameters used to check if a satellite
+ * is in view at a given time. Valid for an interval of more than 7 days
+ * from start of transmission.
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes
+ int16_t valid; ///< flag data are valid
+
+ HEALTH health; ///< [---]
+ T_GPS t0a; ///< Reference Time Almanac [sec]
+
+ l_fp sqrt_A; ///< Square Root of semi-major Axis [sqrt(m)]
+ l_fp e; ///< Eccentricity [---]
- l_fp sqrt_A; /* Square Root of semi-major Axis [sqrt(m)] */
- l_fp e; /* Eccentricity [---] */
+ l_fp M0; ///< +- Mean Anomaly at Ref. Time [rad]
+ l_fp omega; ///< +- Argument of Perigee [rad]
+ l_fp OMEGA0; ///< +- Longit. of Asc. Node of orbit plane [rad]
+ l_fp OMEGADOT; ///< +- Rate of Right Ascension [rad/sec]
+ l_fp deltai; ///< +- [rad]
+ l_fp af0; ///< +- Clock Correction Coefficient 0 [sec]
+ l_fp af1; ///< +- Clock Correction Coefficient 1 [sec/sec]
- l_fp M0; /* ± Mean Anomaly at Ref. Time [rad] */
- l_fp omega; /* ± Argument of Perigee [rad] */
- l_fp OMEGA0; /* ± Longit. of Asc. Node of orbit plane [rad] */
- l_fp OMEGADOT; /* ± Rate of Right Ascension [rad/sec] */
- l_fp deltai; /* ± [rad] */
- l_fp af0; /* ± Clock Correction Coefficient 0 [sec] */
- l_fp af1; /* ± Clock Correction Coefficient 1 [sec/sec] */
} ALM;
-/* ionospheric correction parameters */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
+/**
+ * @brief Ionospheric correction parameters
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes
+ int16_t valid; ///< flag data are valid
- l_fp alpha_0; /* Ionosph. Corr. Coeff. Alpha 0 [sec] */
- l_fp alpha_1; /* Ionosph. Corr. Coeff. Alpha 1 [sec/deg] */
- l_fp alpha_2; /* Ionosph. Corr. Coeff. Alpha 2 [sec/deg^2] */
- l_fp alpha_3; /* Ionosph. Corr. Coeff. Alpha 3 [sec/deg^3] */
+ l_fp alpha_0; ///< Ionosph. Corr. Coeff. Alpha 0 [sec]
+ l_fp alpha_1; ///< Ionosph. Corr. Coeff. Alpha 1 [sec/deg]
+ l_fp alpha_2; ///< Ionosph. Corr. Coeff. Alpha 2 [sec/deg^2]
+ l_fp alpha_3; ///< Ionosph. Corr. Coeff. Alpha 3 [sec/deg^3]
- l_fp beta_0; /* Ionosph. Corr. Coeff. Beta 0 [sec] */
- l_fp beta_1; /* Ionosph. Corr. Coeff. Beta 1 [sec/deg] */
- l_fp beta_2; /* Ionosph. Corr. Coeff. Beta 2 [sec/deg^2] */
- l_fp beta_3; /* Ionosph. Corr. Coeff. Beta 3 [sec/deg^3] */
+ l_fp beta_0; ///< Ionosph. Corr. Coeff. Beta 0 [sec]
+ l_fp beta_1; ///< Ionosph. Corr. Coeff. Beta 1 [sec/deg]
+ l_fp beta_2; ///< Ionosph. Corr. Coeff. Beta 2 [sec/deg^2]
+ l_fp beta_3; ///< Ionosph. Corr. Coeff. Beta 3 [sec/deg^3]
} IONO;
-void mbg_tm_str (char **, TM *, int);
+
+
+void mbg_tm_str (char **, TM_GPS *, int, int);
void mbg_tgps_str (char **, T_GPS *, int);
void get_mbg_header (unsigned char **, GPS_MSG_HDR *);
void put_mbg_header (unsigned char **, GPS_MSG_HDR *);
@@ -534,7 +967,7 @@ void get_mbg_svno (unsigned char **, SVNO *);
void get_mbg_health (unsigned char **, HEALTH *);
void get_mbg_cfg (unsigned char **, CFG *);
void get_mbg_tgps (unsigned char **, T_GPS *);
-void get_mbg_tm (unsigned char **, TM *);
+void get_mbg_tm (unsigned char **, TM_GPS *);
void get_mbg_ttm (unsigned char **, TTM *);
void get_mbg_synth (unsigned char **, SYNTH *);
void get_mbg_tzdl (unsigned char **, TZDL *);
@@ -548,7 +981,7 @@ void get_mbg_eph (unsigned char **, EPH *);
void get_mbg_alm (unsigned char **, ALM *);
void get_mbg_iono (unsigned char **, IONO *);
-unsigned long mbg_csum (unsigned char *, unsigned int);
+CSUM mbg_csum (unsigned char *, unsigned int);
#endif
/*
diff --git a/include/ntp.h b/include/ntp.h
index 38343f23a705..4ffc35f6febc 100644
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -435,7 +435,7 @@ struct peer {
#define STRATUM_UNSPEC ((u_char)16) /* unspecified */
/*
- * Values for peer.flags
+ * Values for peer.flags (u_int)
*/
#define FLAG_CONFIG 0x0001 /* association was configured */
#define FLAG_PREEMPT 0x0002 /* preemptable association */
@@ -453,8 +453,9 @@ struct peer {
#define FLAG_XB 0x2000 /* interleaved broadcast */
#define FLAG_XBOGUS 0x4000 /* interleaved bogus packet */
#ifdef OPENSSL
-#define FLAG_ASSOC 0x8000 /* autokey request */
+# define FLAG_ASSOC 0x8000 /* autokey request */
#endif /* OPENSSL */
+#define FLAG_TSTAMP_PPS 0x10000 /* PPS source provides absolute timestamp */
/*
* Definitions for the clear() routine. We use memset() to clear
@@ -713,17 +714,19 @@ struct pkt {
*/
#define LOOP_DRIFTINIT 1 /* iniitialize frequency */
#define LOOP_KERN_CLEAR 2 /* set initial frequency offset */
-#define LOOP_MAX 3 /* set step offset */
-#define LOOP_PANIC 4 /* set panic offseet */
-#define LOOP_PHI 5 /* set dispersion rate */
-#define LOOP_MINSTEP 6 /* set step timeout */
-#define LOOP_MINPOLL 7 /* set min poll interval (log2 s) */
-#define LOOP_ALLAN 8 /* set minimum Allan intercept */
-#define LOOP_HUFFPUFF 9 /* set huff-n'-puff filter length */
-#define LOOP_FREQ 10 /* set initial frequency */
-#define LOOP_CODEC 11 /* set audio codec frequency */
-#define LOOP_LEAP 12 /* insert leap after second 23:59 */
-#define LOOP_TICK 13 /* sim. low precision clock */
+#define LOOP_MAX 3 /* set both step offsets */
+#define LOOP_MAX_BACK 4 /* set bacward-step offset */
+#define LOOP_MAX_FWD 5 /* set forward-step offset */
+#define LOOP_PANIC 6 /* set panic offseet */
+#define LOOP_PHI 7 /* set dispersion rate */
+#define LOOP_MINSTEP 8 /* set step timeout */
+#define LOOP_MINPOLL 9 /* set min poll interval (log2 s) */
+#define LOOP_ALLAN 10 /* set minimum Allan intercept */
+#define LOOP_HUFFPUFF 11 /* set huff-n'-puff filter length */
+#define LOOP_FREQ 12 /* set initial frequency */
+#define LOOP_CODEC 13 /* set audio codec frequency */
+#define LOOP_LEAP 14 /* insert leap after second 23:59 */
+#define LOOP_TICK 15 /* sim. low precision clock */
/*
* Configuration items for the stats printer
@@ -875,13 +878,13 @@ struct endpoint {
*/
#define AM_ERR -1 /* error */
#define AM_NOMATCH 0 /* no match */
-#define AM_PROCPKT 1 /* server/symmetric packet */
-#define AM_BCST 2 /* broadcast packet */
+#define AM_PROCPKT 1 /* server/symmetric packet */
+#define AM_BCST 2 /* broadcast packet */
#define AM_FXMIT 3 /* client packet */
#define AM_MANYCAST 4 /* manycast or pool */
#define AM_NEWPASS 5 /* new passive */
#define AM_NEWBCL 6 /* new broadcast */
-#define AM_POSSBCL 7 /* discard broadcast */
+#define AM_POSSBCL 7 /* discard broadcast */
/* NetInfo configuration locations */
#ifdef HAVE_NETINFO
diff --git a/include/ntp_calendar.h b/include/ntp_calendar.h
index 3ee1ff79c806..3afb627d2594 100644
--- a/include/ntp_calendar.h
+++ b/include/ntp_calendar.h
@@ -83,13 +83,15 @@ extern systime_func_ptr ntpcal_set_timefunc(systime_func_ptr);
#define SECSPERMIN (60) /* seconds per minute */
#define MINSPERHR (60) /* minutes per hour */
#define HRSPERDAY (24) /* hours per day */
+#define DAYSPERWEEK (7) /* days per week */
#define DAYSPERYEAR (365) /* days per year */
#define SECSPERHR (SECSPERMIN * MINSPERHR)
#define SECSPERDAY (SECSPERHR * HRSPERDAY)
+#define SECSPERWEEK (DAYSPERWEEK * SECSPERDAY)
#define SECSPERYEAR (365 * SECSPERDAY) /* regular year */
#define SECSPERLEAPYEAR (366 * SECSPERDAY) /* leap year */
-#define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */
+#define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */
/*
* Gross hacks. I have illicit knowlege that there won't be overflows
@@ -113,7 +115,7 @@ extern uint32_t caltontp (const struct calendar *);
* Convert between 'time_t' and 'vint64'
*/
extern vint64 time_to_vint64(const time_t *);
-extern time_t vint64_to_time(const vint64 *);
+extern time_t vint64_to_time(const vint64 *);
/*
* Get the build date & time. ATTENTION: The time zone is not specified!
diff --git a/include/ntp_fp.h b/include/ntp_fp.h
index 1b97e8b5cf72..780693226207 100644
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -264,10 +264,13 @@ typedef u_int32 u_fp;
* headers. So far the problem has only been seen with gcc, but it
* may also affect Sun compilers, in which case the defined(__GNUC__)
* term should be removed.
+ * XSCALE also generates bad code for these, at least with GCC 3.3.5.
+ * This is unrelated to math.h, but the same solution applies.
*/
#if defined(HAVE_U_INT64) && \
!(defined(__SVR4) && defined(__sun) && \
- defined(sparc) && defined(__GNUC__))
+ defined(sparc) && defined(__GNUC__) || \
+ defined(__arm__) && defined(__XSCALE__) && defined(__GNUC__))
#include <math.h> /* ldexp() */
diff --git a/include/ntp_md5.h b/include/ntp_md5.h
index 9f43378f81c5..2306b9a87fa6 100644
--- a/include/ntp_md5.h
+++ b/include/ntp_md5.h
@@ -24,7 +24,7 @@
typedef MD5_CTX EVP_MD_CTX;
# define EVP_get_digestbynid(t) NULL
-# define EVP_md5(v) NULL
+# define EVP_md5() NULL
# define EVP_MD_CTX_init(c)
# define EVP_MD_CTX_set_flags(c, f)
# define EVP_DigestInit(c, dt) (MD5Init(c), 1)
diff --git a/include/ntpd.h b/include/ntpd.h
index 77fe4843a654..f0bbeb08211f 100644
--- a/include/ntpd.h
+++ b/include/ntpd.h
@@ -188,6 +188,7 @@ extern void unpeer (struct peer *);
extern void clear_all (void);
extern int score_all (struct peer *);
extern struct peer *findmanycastpeer(struct recvbuf *);
+extern void peer_cleanup (void);
/* ntp_crypto.c */
#ifdef AUTOKEY
@@ -385,7 +386,8 @@ extern endpt * ep_list; /* linked list */
/* ntp_loopfilter.c */
extern double drift_comp; /* clock frequency (s/s) */
extern double clock_stability; /* clock stability (s/s) */
-extern double clock_max; /* max offset before step (s) */
+extern double clock_max_back; /* max backward offset before step (s) */
+extern double clock_max_fwd; /* max forward offset before step (s) */
extern double clock_panic; /* max offset before panic (s) */
extern double clock_phi; /* dispersion rate (s/s) */
extern double clock_minstep; /* step timeout (s) */
@@ -403,8 +405,9 @@ extern int kern_enable; /* kernel support enabled */
extern int hardpps_enable; /* kernel PPS discipline enabled */
extern int ext_enable; /* external clock enabled */
extern int cal_enable; /* refclock calibrate enable */
-extern int allow_panic; /* allow panic correction */
-extern int mode_ntpdate; /* exit on first clock set */
+extern int allow_panic; /* allow panic correction (-g) */
+extern int force_step_once; /* always step time once at startup (-G) */
+extern int mode_ntpdate; /* exit on first clock set (-q) */
extern int peer_ntpdate; /* count of ntpdate peers */
/*
@@ -518,7 +521,7 @@ extern u_int32 conf_file_sum; /* Simple sum of characters */
/* ntp_signd.c */
#ifdef HAVE_NTP_SIGND
-extern void send_via_ntp_signd(struct recvbuf *, int, keyid_t, int,
+extern void send_via_ntp_signd(struct recvbuf *, int, keyid_t, int,
struct pkt *);
#endif
diff --git a/include/parse.h b/include/parse.h
index 3a98408f07de..ca6855d18e58 100644
--- a/include/parse.h
+++ b/include/parse.h
@@ -4,7 +4,7 @@
* parse.h,v 4.12 2007/01/14 08:36:03 kardel RELEASE_20070114_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -105,6 +105,13 @@ extern unsigned int splclock (void);
#endif
/*
+ * some constants useful for GPS time conversion
+ */
+#define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */
+#define GPSWRAP 990U /* assume week count less than this in the previous epoch */
+#define GPSWEEKS 1024U /* number of weeks until the GPS epch rolls over */
+
+/*
* state flags
*/
#define PARSEB_POWERUP 0x00000001 /* no synchronisation */
@@ -127,7 +134,7 @@ extern unsigned int splclock (void);
/*
* optional status information
*/
-#define PARSEB_ALTERNATE 0x00001000 /* alternate antenna used */
+#define PARSEB_CALLBIT 0x00001000 /* "call bit" used to signalize irregularities in the control facilities */
#define PARSEB_POSITION 0x00002000 /* position available */
#define PARSEB_MESSAGE 0x00004000 /* addtitional message data */
/*
@@ -145,7 +152,7 @@ extern unsigned int splclock (void);
#define PARSEB_PPS 0x20000000 /* valid PPS sample */
#define PARSE_TCINFO (PARSEB_ANNOUNCE|PARSEB_POWERUP|PARSEB_NOSYNC|PARSEB_DST|\
- PARSEB_UTC|PARSEB_LEAPS|PARSEB_ALTERNATE|PARSEB_S_LEAP|\
+ PARSEB_UTC|PARSEB_LEAPS|PARSEB_CALLBIT|PARSEB_S_LEAP|\
PARSEB_S_LOCATION|PARSEB_TIMECODE|PARSEB_MESSAGE)
#define PARSE_POWERUP(x) ((x) & PARSEB_POWERUP)
@@ -156,7 +163,7 @@ extern unsigned int splclock (void);
#define PARSE_UTC(x) ((x) & PARSEB_UTC)
#define PARSE_LEAPADD(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPADD))
#define PARSE_LEAPDEL(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPDEL))
-#define PARSE_ALTERNATE(x) ((x) & PARSEB_ALTERNATE)
+#define PARSE_CALLBIT(x) ((x) & PARSEB_CALLBIT)
#define PARSE_LEAPSECOND(x) (PARSE_SYNC(x) && ((x) & PARSEB_LEAP_SECOND))
#define PARSE_S_LEAP(x) ((x) & PARSEB_S_LEAP)
@@ -229,13 +236,13 @@ typedef struct parsetime parsetime_t;
#define PARSE_IO_CSIZE 0x00000003
#define PARSE_IO_CS5 0x00000000
#define PARSE_IO_CS6 0x00000001
-#define PARSE_IO_CS7 0x00000002
-#define PARSE_IO_CS8 0x00000003
+#define PARSE_IO_CS7 0x00000002
+#define PARSE_IO_CS8 0x00000003
/*
* ioctl structure
*/
-union parsectl
+union parsectl
{
struct parsegettc
{
@@ -258,7 +265,7 @@ union parsectl
u_long parse_cs; /* character size (needed for stripping) */
} parsesetcs;
};
-
+
typedef union parsectl parsectl_t;
/*------ for conversion routines --------*/
@@ -266,7 +273,7 @@ typedef union parsectl parsectl_t;
struct parse /* parse module local data */
{
int parse_flags; /* operation and current status flags */
-
+
int parse_ioflags; /* io handling flags (5-8 Bit control currently) */
/*
@@ -286,7 +293,7 @@ struct parse /* parse module local data */
char *parse_ldata; /* last data buffer */
unsigned short parse_ldsize; /* last data buffer length */
u_long parse_badformat; /* number of unparsable pakets */
-
+
timestamp_t parse_lastchar; /* last time a character was received */
parsetime_t parse_dtime; /* external data prototype */
};
@@ -337,15 +344,19 @@ typedef struct clocktime clocktime_t;
#define SYNC_ZERO 0x00
#define SYNC_ONE 0x01
+typedef u_long parse_inp_fnc_t(parse_t *, char, timestamp_t *);
+typedef u_long parse_cvt_fnc_t(unsigned char *, int, struct format *, clocktime_t *, void *);
+typedef u_long parse_pps_fnc_t(parse_t *, int, timestamp_t *);
+
struct clockformat
{
/* special input protocol - implies fixed format */
- u_long (*input) (parse_t *, unsigned int, timestamp_t *);
+ parse_inp_fnc_t *input;
/* conversion routine */
- u_long (*convert) (unsigned char *, int, struct format *, clocktime_t *, void *);
+ parse_cvt_fnc_t *convert;
/* routine for handling RS232 sync events (time stamps) */
/* PPS input routine */
- u_long (*syncpps) (parse_t *, int, timestamp_t *);
+ parse_pps_fnc_t *syncpps;
/* time code synthesizer */
void *data; /* local parameters */
@@ -361,7 +372,7 @@ typedef struct clockformat clockformat_t;
*/
extern int parse_ioinit (parse_t *);
extern void parse_ioend (parse_t *);
-extern int parse_ioread (parse_t *, unsigned int, timestamp_t *);
+extern int parse_ioread (parse_t *, char, timestamp_t *);
extern int parse_iopps (parse_t *, int, timestamp_t *);
extern void parse_iodone (parse_t *);
extern int parse_timecode (parsectl_t *, parse_t *);
@@ -369,8 +380,8 @@ extern int parse_getfmt (parsectl_t *, parse_t *);
extern int parse_setfmt (parsectl_t *, parse_t *);
extern int parse_setcs (parsectl_t *, parse_t *);
-extern unsigned int parse_restart (parse_t *, unsigned int);
-extern unsigned int parse_addchar (parse_t *, unsigned int);
+extern unsigned int parse_restart (parse_t *, char);
+extern unsigned int parse_addchar (parse_t *, char);
extern unsigned int parse_end (parse_t *);
extern int Strok (const unsigned char *, const unsigned char *);
@@ -379,9 +390,9 @@ extern int Stoi (const unsigned char *, long *, int);
extern time_t parse_to_unixtime (clocktime_t *, u_long *);
extern u_long updatetimeinfo (parse_t *, u_long);
extern void syn_simple (parse_t *, timestamp_t *, struct format *, u_long);
-extern u_long pps_simple (parse_t *, int, timestamp_t *);
-extern u_long pps_one (parse_t *, int, timestamp_t *);
-extern u_long pps_zero (parse_t *, int, timestamp_t *);
+extern parse_pps_fnc_t pps_simple;
+extern parse_pps_fnc_t pps_one;
+extern parse_pps_fnc_t pps_zero;
extern int parse_timedout (parse_t *, timestamp_t *, struct timeval *);
#endif
diff --git a/include/parse_conf.h b/include/parse_conf.h
index 319dd543c43c..d17d616a4845 100644
--- a/include/parse_conf.h
+++ b/include/parse_conf.h
@@ -4,7 +4,7 @@
* parse_conf.h,v 4.7 2005/06/25 10:58:45 kardel RELEASE_20050625_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -41,13 +41,13 @@
/*
* field location structure
*/
-#define O_DAY 0
+#define O_DAY 0
#define O_MONTH 1
-#define O_YEAR 2
-#define O_HOUR 3
-#define O_MIN 4
-#define O_SEC 5
-#define O_WDAY 6
+#define O_YEAR 2
+#define O_HOUR 3
+#define O_MIN 4
+#define O_SEC 5
+#define O_WDAY 6
#define O_FLAGS 7
#define O_ZONE 8
#define O_UTCHOFFSET 9
diff --git a/kernel/Makefile.in b/kernel/Makefile.in
index 5c85def062fd..2147529a1a83 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -38,8 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -68,6 +67,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -324,6 +325,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/kernel/sys/Makefile.in b/kernel/sys/Makefile.in
index 83334765ee47..2e8f990bbb41 100644
--- a/kernel/sys/Makefile.in
+++ b/kernel/sys/Makefile.in
@@ -40,8 +40,7 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -70,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -289,6 +290,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/kernel/sys/parsestreams.h b/kernel/sys/parsestreams.h
index e784f9e8b37a..bd40093d362c 100644
--- a/kernel/sys/parsestreams.h
+++ b/kernel/sys/parsestreams.h
@@ -4,7 +4,7 @@
* parsestreams.h,v 4.5 2005/06/25 10:52:47 kardel RELEASE_20050625_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/lib/isc/inet_ntop.c b/lib/isc/inet_ntop.c
index 26d5dcad1f0a..773018031b9d 100644
--- a/lib/isc/inet_ntop.c
+++ b/lib/isc/inet_ntop.c
@@ -135,6 +135,7 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
cur.base = -1;
+ best.len = cur.len = 0;
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)
diff --git a/lib/isc/log.c b/lib/isc/log.c
index ce98303fecaf..38f0c4ff51e6 100644
--- a/lib/isc/log.c
+++ b/lib/isc/log.c
@@ -1143,7 +1143,7 @@ sync_channellist(isc_logconfig_t *lcfg) {
static isc_result_t
greatest_version(isc_logchannel_t *channel, int *greatestp) {
/* XXXDCL HIGHLY NT */
- char *basename, *digit_end;
+ char *basenam, *digit_end;
const char *dirname;
int version, greatest = -1;
unsigned int basenamelen;
@@ -1160,23 +1160,23 @@ greatest_version(isc_logchannel_t *channel, int *greatestp) {
* It is safe to DE_CONST the file.name because it was copied
* with isc_mem_strdup in isc_log_createchannel.
*/
- basename = strrchr(FILE_NAME(channel), sep);
+ basenam = strrchr(FILE_NAME(channel), sep);
#ifdef _WIN32
basename2 = strrchr(FILE_NAME(channel), '\\');
- if ((basename != NULL && basename2 != NULL && basename2 > basename) ||
- (basename == NULL && basename2 != NULL)) {
- basename = basename2;
+ if ((basenam != NULL && basename2 != NULL && basename2 > basenam) ||
+ (basenam == NULL && basename2 != NULL)) {
+ basenam = basename2;
sep = '\\';
}
#endif
- if (basename != NULL) {
- *basename++ = '\0';
+ if (basenam != NULL) {
+ *basenam++ = '\0';
dirname = FILE_NAME(channel);
} else {
- DE_CONST(FILE_NAME(channel), basename);
+ DE_CONST(FILE_NAME(channel), basenam);
dirname = ".";
}
- basenamelen = strlen(basename);
+ basenamelen = strlen(basenam);
isc_dir_init(&dir);
result = isc_dir_open(&dir, dirname);
@@ -1184,8 +1184,8 @@ greatest_version(isc_logchannel_t *channel, int *greatestp) {
/*
* Replace the file separator if it was taken out.
*/
- if (basename != FILE_NAME(channel))
- *(basename - 1) = sep;
+ if (basenam != FILE_NAME(channel))
+ *(basenam - 1) = sep;
/*
* Return if the directory open failed.
@@ -1195,7 +1195,7 @@ greatest_version(isc_logchannel_t *channel, int *greatestp) {
while (isc_dir_read(&dir) == ISC_R_SUCCESS) {
if (dir.entry.length > basenamelen &&
- strncmp(dir.entry.name, basename, basenamelen) == 0 &&
+ strncmp(dir.entry.name, basenam, basenamelen) == 0 &&
dir.entry.name[basenamelen] == '.') {
version = strtol(&dir.entry.name[basenamelen + 1],
diff --git a/lib/isc/result.c b/lib/isc/result.c
index 520f1613acd1..da57272dfc27 100644
--- a/lib/isc/result.c
+++ b/lib/isc/result.c
@@ -172,7 +172,7 @@ const char *
isc_result_totext(isc_result_t result) {
resulttable *table;
const char *txt, *default_text;
- int index;
+ int idx;
initialize();
@@ -183,15 +183,15 @@ isc_result_totext(isc_result_t result) {
table != NULL;
table = ISC_LIST_NEXT(table, link)) {
if (result >= table->base && result <= table->last) {
- index = (int)(result - table->base);
- default_text = table->text[index];
+ idx = (int)(result - table->base);
+ default_text = table->text[idx];
/*
- * Note: we use 'index + 1' as the message number
- * instead of index because isc_msgcat_get() requires
+ * Note: we use 'idx + 1' as the message number
+ * instead of idx because isc_msgcat_get() requires
* the message number to be > 0.
*/
txt = isc_msgcat_get(table->msgcat, table->set,
- index + 1, default_text);
+ idx + 1, default_text);
break;
}
}
diff --git a/lib/isc/unix/file.c b/lib/isc/unix/file.c
index 3b59e86b0755..9eda4a33bc80 100644
--- a/lib/isc/unix/file.c
+++ b/lib/isc/unix/file.c
@@ -508,7 +508,7 @@ isc_file_safecreate(const char *filename, FILE **fp) {
}
isc_result_t
-isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
+isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirnam, char **basenam)
{
char *dir, *file, *slash;
@@ -537,8 +537,8 @@ isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
return (ISC_R_INVALIDFILE);
}
- *dirname = dir;
- *basename = file;
+ *dirnam = dir;
+ *basenam = file;
return (ISC_R_SUCCESS);
}
diff --git a/lib/isc/unix/ifiter_getifaddrs.c b/lib/isc/unix/ifiter_getifaddrs.c
index c2e4044ac008..425b9b4c3d35 100644
--- a/lib/isc/unix/ifiter_getifaddrs.c
+++ b/lib/isc/unix/ifiter_getifaddrs.c
@@ -212,6 +212,9 @@ internal_current(isc_interfaceiter_t *iter) {
get_addr(family, &iter->current.broadcast, ifa->ifa_broadaddr,
ifa->ifa_name);
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
}
diff --git a/lib/isc/unix/ifiter_ioctl.c b/lib/isc/unix/ifiter_ioctl.c
index a684867ce71f..c8e4970e6b33 100644
--- a/lib/isc/unix/ifiter_ioctl.c
+++ b/lib/isc/unix/ifiter_ioctl.c
@@ -109,6 +109,10 @@ struct isc_interfaceiter {
#endif
#endif
+/* Silence a warning when this file is #included */
+int
+isc_ioctl(int fildes, int req, char *arg);
+
int
isc_ioctl(int fildes, int req, char *arg) {
int trys;
@@ -588,6 +592,9 @@ internal_current4(isc_interfaceiter_t *iter) {
}
iter->current.netmask.type.in6.s6_addr[i] = (~0 << bits) & 0xff;
}
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
inet:
@@ -664,6 +671,9 @@ internal_current4(isc_interfaceiter_t *iter) {
}
get_addr(family, &iter->current.netmask,
(struct sockaddr *)&ifreq.ifr_addr, ifreq.ifr_name);
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
}
@@ -704,7 +714,6 @@ internal_current6(isc_interfaceiter_t *iter) {
get_addr(family, &iter->current.address,
(struct sockaddr *)&lifreq.lifr_addr, lifreq.lifr_name);
- iter->current.ifindex = lifreq.lifr_index;
if (isc_netaddr_islinklocal(&iter->current.address))
isc_netaddr_setzone(&iter->current.address,
(isc_uint32_t)lifreq.lifr_index);
@@ -844,7 +853,9 @@ internal_current6(isc_interfaceiter_t *iter) {
iter->current.netmask.type.in6.s6_addr[i / 8] =
(~0 << bits) & 0xff;
}
-
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
}
#endif
@@ -867,6 +878,9 @@ internal_current6(isc_interfaceiter_t *iter) {
get_addr(family, &iter->current.netmask,
(struct sockaddr *)&lifreq.lifr_addr, lifreq.lifr_name);
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
}
#endif
diff --git a/lib/isc/unix/net.c b/lib/isc/unix/net.c
index 2ba17d165067..7056668ca0cd 100644
--- a/lib/isc/unix/net.c
+++ b/lib/isc/unix/net.c
@@ -106,7 +106,8 @@ const struct in6_addr isc_net_in6addrloop = IN6ADDR_LOOPBACK_INIT;
static isc_once_t once_ipv6only = ISC_ONCE_INIT;
# endif
-# if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
+# if defined(ISC_PLATFORM_HAVEIPV6) && \
+ defined(WANT_IPV6) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
static isc_once_t once_ipv6pktinfo = ISC_ONCE_INIT;
# endif
#endif /* ISC_PLATFORM_HAVEIPV6 */
diff --git a/libntp/Makefile.in b/libntp/Makefile.in
index ca8b13c50ba6..bb680423ae70 100644
--- a/libntp/Makefile.in
+++ b/libntp/Makefile.in
@@ -41,8 +41,7 @@ subdir = libntp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -71,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -444,6 +445,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/libntp/ntp_calendar.c b/libntp/ntp_calendar.c
index 94ca0e9ee154..ff91fcfc678d 100644
--- a/libntp/ntp_calendar.c
+++ b/libntp/ntp_calendar.c
@@ -29,7 +29,7 @@ ntpcal_set_timefunc(
)
{
systime_func_ptr res;
-
+
res = systime_func;
if (NULL == nfunc)
nfunc = &time;
@@ -118,7 +118,7 @@ vint64_to_time(
#endif
return res;
-}
+}
/*
*---------------------------------------------------------------------
@@ -170,7 +170,7 @@ ntpcal_get_build_date(
#ifdef DEBUG
static int ignore = 0;
#endif
-
+
ZERO(*jd);
jd->year = 1970;
jd->month = 1;
@@ -255,7 +255,7 @@ static const uint16_t real_month_table[2][13] = {
* in the proleptic Gregorian calendar. The begin of the Christian Era
* (0001-01-01) is RD(1).
*
- *
+ *
* Some notes on the implementation:
*
* Calendar algorithms thrive on the division operation, which is one of
@@ -351,7 +351,7 @@ ntpcal_periodic_extend(
char cpl = 0; /* modulo complement flag */
char neg = 0; /* sign change flag */
- /* make the cycle positive and adjust the flags */
+ /* make the cycle positive and adjust the flags */
if (cycle < 0) {
cycle = - cycle;
neg ^= 1;
@@ -407,21 +407,21 @@ ntpcal_ntp_to_time(
#ifdef HAVE_INT64
- res.q_s = (pivot != NULL)
+ res.q_s = (pivot != NULL)
? *pivot
- : now();
+ : now();
res.Q_s -= 0x80000000; /* unshift of half range */
ntp -= (uint32_t)JAN_1970; /* warp into UN*X domain */
ntp -= res.D_s.lo; /* cycle difference */
res.Q_s += (uint64_t)ntp; /* get expanded time */
#else /* no 64bit scalars */
-
+
time_t tmp;
-
- tmp = (pivot != NULL)
+
+ tmp = (pivot != NULL)
? *pivot
- : now();
+ : now();
res = time_to_vint64(&tmp);
M_SUB(res.D_s.hi, res.D_s.lo, 0, 0x80000000);
ntp -= (uint32_t)JAN_1970; /* warp into UN*X domain */
@@ -465,9 +465,9 @@ ntpcal_ntp_to_ntp(
res.Q_s += (uint64_t)ntp; /* get expanded time */
#else /* no 64bit scalars */
-
+
time_t tmp;
-
+
tmp = (pivot)
? *pivot
: now();
@@ -492,7 +492,7 @@ ntpcal_ntp_to_ntp(
*/
/*
- *-------------------------------------------------------------------
+ *-------------------------------------------------------------------
* Split a 64bit seconds value into elapsed days in 'res.hi' and
* elapsed seconds since midnight in 'res.lo' using explicit floor
* division. This function happily accepts negative time values as
@@ -532,7 +532,7 @@ ntpcal_daysplit(
isneg = M_ISNEG(op.D_s.hi);
if (isneg)
M_NEG(op.D_s.hi, op.D_s.lo);
-
+
/* save remainder of DIV 128, shift for divide */
r = op.D_s.lo & 127; /* save remainder bits */
op.D_s.lo = (op.D_s.lo >> 7) | (op.D_s.hi << 25);
@@ -572,16 +572,16 @@ ntpcal_daysplit(
} else
q = ~q + 1;
}
-
+
res.hi = q;
res.lo = r;
-#endif
+#endif
return res;
}
/*
- *-------------------------------------------------------------------
+ *-------------------------------------------------------------------
* Split a 32bit seconds value into h/m/s and excessive days. This
* function happily accepts negative time values as timestamps before
* midnight.
@@ -632,7 +632,7 @@ ntpcal_split_eradays(
{
ntpcal_split res;
int32_t n400, n100, n004, n001, yday; /* calendar year cycles */
-
+
/*
* Split off calendar cycles, using floor division in the first
* step. After that first step, simple division does it because
@@ -652,7 +652,7 @@ ntpcal_split_eradays(
yday = yday % GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
n001 = yday / DAYSPERYEAR;
yday = yday % DAYSPERYEAR;
-
+
/*
* check for leap cycle overflows and calculate the leap flag
* if needed
@@ -665,11 +665,11 @@ ntpcal_split_eradays(
*isleapyear = 1;
} else if (isleapyear)
*isleapyear = (n001 == 3) && ((n004 != 24) || (n100 == 3));
-
+
/* now merge the cycles to elapsed years, using horner scheme */
res.hi = ((4*n400 + n100)*25 + n004)*4 + n001;
res.lo = yday;
-
+
return res;
}
@@ -724,7 +724,13 @@ ntpcal_rd_to_date(
leaps = 0;
retv = 0;
- /* get day-of-week first */
+ /* Get day-of-week first. Since rd is signed, the remainder can
+ * be in the range [-6..+6], but the assignment to an unsigned
+ * variable maps the negative values to positive values >=7.
+ * This makes the sign correction look strange, but adding 7
+ * causes the needed wrap-around into the desired value range of
+ * zero to six, both inclusive.
+ */
jd->weekday = rd % 7;
if (jd->weekday >= 7) /* unsigned! */
jd->weekday += 7;
@@ -794,7 +800,7 @@ ntpcal_daysec_to_date(
{
int32_t days;
int ts[3];
-
+
days = priv_timesplit(ts, sec);
jd->hour = (uint8_t)ts[0];
jd->minute = (uint8_t)ts[1];
@@ -817,7 +823,7 @@ ntpcal_daysec_to_tm(
{
int32_t days;
int32_t ts[3];
-
+
days = priv_timesplit(ts, sec);
utm->tm_hour = ts[0];
utm->tm_min = ts[1];
@@ -946,7 +952,7 @@ ntpcal_dayjoin(
/* fix sign */
if (isneg)
M_NEG(res.D_s.hi, res.D_s.lo);
-
+
/* properly add seconds */
p2 = 0;
if (secs < 0) {
@@ -957,7 +963,7 @@ ntpcal_dayjoin(
}
M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
-#endif
+#endif
return res;
}
@@ -1279,7 +1285,7 @@ ntpcal_ntp64_to_date(
)
{
ntpcal_split ds;
-
+
ds = ntpcal_daysplit(ntp);
ds.hi += ntpcal_daysec_to_date(jd, ds.lo);
@@ -1294,7 +1300,7 @@ ntpcal_ntp_to_date(
)
{
vint64 ntp64;
-
+
/*
* Unfold ntp time around current time into NTP domain. Split
* into days and seconds, shift days into CE domain and
@@ -1516,12 +1522,12 @@ isocal_split_eraweeks(
res.lo += (res.lo >= 10435);
cents = res.lo / 5218;
res.lo %= 5218; /* res.lo is weeks in century now */
-
+
/* convert elapsed weeks in century to elapsed years and weeks */
res.lo = res.lo * 157 + bctab[cents];
res.hi += cents * 100 + res.lo / 8192;
- res.lo = (res.lo % 8192) / 157;
-
+ res.lo = (res.lo % 8192) / 157;
+
return res;
}
@@ -1538,7 +1544,7 @@ isocal_ntp64_to_date(
{
ntpcal_split ds;
int32_t ts[3];
-
+
/*
* Split NTP time into days and seconds, shift days into CE
* domain and process the parts.
@@ -1576,7 +1582,7 @@ isocal_ntp_to_date(
)
{
vint64 ntp64;
-
+
/*
* Unfold ntp time around current time into NTP domain, then
* convert the full time stamp.
diff --git a/libntp/work_fork.c b/libntp/work_fork.c
index 10329e70be8f..dab02bc6af14 100644
--- a/libntp/work_fork.c
+++ b/libntp/work_fork.c
@@ -382,7 +382,7 @@ fork_blocking_child(
int rc;
int was_pipe;
int is_pipe;
- int saved_errno;
+ int saved_errno = 0;
int childpid;
int keep_fd;
int fd;
diff --git a/libparse/Makefile.in b/libparse/Makefile.in
index 15a989b318fd..11dbc382c58c 100644
--- a/libparse/Makefile.in
+++ b/libparse/Makefile.in
@@ -43,8 +43,7 @@ subdir = libparse
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -73,6 +72,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -352,6 +353,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/libparse/clk_computime.c b/libparse/clk_computime.c
index 1068576f88aa..5026232ea5f0 100644
--- a/libparse/clk_computime.c
+++ b/libparse/clk_computime.c
@@ -7,15 +7,15 @@
* /src/NTP/ntp4-dev/libparse/clk_computime.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* clk_computime.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* Supports Diem's Computime Radio Clock
- *
+ *
* Used the Meinberg clock as a template for Diem's Computime Radio Clock
*
* adapted by Alois Camenzind <alois.camenzind@ubs.ch>
- *
+ *
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -59,22 +59,22 @@ extern int printf (const char *, ...);
/*
* The Computime receiver sends a datagram in the following format every minute
- *
- * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
+ *
+ * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
* Pos 0123456789012345678901 2 3
* 0000000000111111111122 2 2
* Parse T: : : : : : : rn
- *
- * T Startcharacter "T" specifies start of the timestamp
- * YY Year MM Month 1-12
- * MD Day of the month
- * WD Day of week
- * HH Hour
- * MM Minute
+ *
+ * T Startcharacter "T" specifies start of the timestamp
+ * YY Year MM Month 1-12
+ * MD Day of the month
+ * WD Day of week
+ * HH Hour
+ * MM Minute
* SS Second
- * CR Carriage return
+ * CR Carriage return
* LF Linefeed
- *
+ *
*/
static struct format computime_fmt =
@@ -88,10 +88,10 @@ static struct format computime_fmt =
0
};
-static u_long cvt_computime (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_computime (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_computime;
+static parse_inp_fnc_t inp_computime;
-clockformat_t clock_computime =
+clockformat_t clock_computime =
{
inp_computime, /* Computime input handling */
cvt_computime, /* Computime conversion */
@@ -99,15 +99,15 @@ clockformat_t clock_computime =
(void *)&computime_fmt, /* conversion configuration */
"Diem's Computime Radio Clock", /* Computime Radio Clock */
24, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
};
/*
- * cvt_computime
- *
+ * parse_cvt_fnc_t cvt_computime
+ *
* convert simple type format
*/
-static u_long
+static u_long
cvt_computime(
unsigned char *buffer,
int size,
@@ -117,7 +117,7 @@ cvt_computime(
)
{
- if (!Strok(buffer, format->fixed_string)) {
+ if (!Strok(buffer, format->fixed_string)) {
return CVT_NONE;
} else {
if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
@@ -131,7 +131,7 @@ cvt_computime(
Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
format->field_offsets[O_MIN].length) ||
Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
- format->field_offsets[O_SEC].length)) {
+ format->field_offsets[O_SEC].length)) {
return CVT_FAIL | CVT_BADFMT;
} else {
@@ -144,31 +144,31 @@ cvt_computime(
}
/*
- * inp_computime
+ * parse_inp_fnc_t inp_computime
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_computime(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_computime(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case 'T':
parseprintf(DD_PARSE, ("inp_computime: START seen\n"));
-
+
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
return PARSE_INP_SKIP;
-
+
case '\n':
parseprintf(DD_PARSE, ("inp_computime: END seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
diff --git a/libparse/clk_dcf7000.c b/libparse/clk_dcf7000.c
index bfd9a744acb3..f1da9ef8484e 100644
--- a/libparse/clk_dcf7000.c
+++ b/libparse/clk_dcf7000.c
@@ -1,12 +1,12 @@
/*
* /src/NTP/ntp4-dev/libparse/clk_dcf7000.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* clk_dcf7000.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* ELV DCF7000 module
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -63,9 +63,10 @@ static struct format dcf7000_fmt =
},
(const unsigned char *)" - - - - - - - \r",
0
-};
-static u_long cvt_dcf7000 (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_dcf7000 (parse_t *, unsigned int, timestamp_t *);
+};
+
+static parse_cvt_fnc_t cvt_dcf7000;
+static parse_inp_fnc_t inp_dcf7000;
clockformat_t clock_dcf7000 =
{
@@ -75,11 +76,11 @@ clockformat_t clock_dcf7000 =
(void *)&dcf7000_fmt, /* conversion configuration */
"ELV DCF7000", /* ELV clock */
24, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
};
/*
- * cvt_dcf7000
+ * parse_cvt_fnc_t cvt_dcf7000
*
* convert dcf7000 type format
*/
@@ -117,7 +118,7 @@ cvt_dcf7000(
{
unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
long flags;
-
+
clock_time->flags = 0;
clock_time->usecond = 0;
@@ -144,21 +145,21 @@ cvt_dcf7000(
}
/*
- * inp_dcf700
+ * parse_inp_fnc_t inp_dcf700
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_dcf7000(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_dcf7000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case '\r':
diff --git a/libparse/clk_hopf6021.c b/libparse/clk_hopf6021.c
index 033d2d2ca4e7..357ac2ec0f15 100644
--- a/libparse/clk_hopf6021.c
+++ b/libparse/clk_hopf6021.c
@@ -37,10 +37,10 @@
extern int printf (const char *, ...);
#endif
-/*
- * hopf Funkuhr 6021
+/*
+ * hopf Funkuhr 6021
* used with 9600,8N1,
- * UTC ueber serielle Schnittstelle
+ * UTC ueber serielle Schnittstelle
* Sekundenvorlauf ON
* ETX zum Sekundenvorlauf ON
* Datenstring 6021
@@ -71,7 +71,7 @@ extern int printf (const char *, ...);
* x x 0 x - Wintertime
* x x 1 x - Summertime
* 0 0 x x - Time/Date invalid
- * 0 1 x x - Internal clock used
+ * 0 1 x x - Internal clock used
* 1 0 x x - Radio clock
* 1 1 x x - Radio clock highprecision
*
@@ -90,10 +90,10 @@ extern int printf (const char *, ...);
#define HOPF_DSTWARN 0x01 /* DST switch warning */
#define HOPF_DST 0x02 /* DST in effect */
-#define HOPF_MODE 0x0C /* operation mode mask */
+#define HOPF_MODE 0x0C /* operation mode mask */
#define HOPF_INVALID 0x00 /* no time code available */
#define HOPF_INTERNAL 0x04 /* internal clock */
-#define HOPF_RADIO 0x08 /* radio clock */
+#define HOPF_RADIO 0x08 /* radio clock */
#define HOPF_RADIOHP 0x0C /* high precision radio clock */
#define HOPF_UTC 0x08 /* time code in UTC */
@@ -102,13 +102,13 @@ extern int printf (const char *, ...);
static struct format hopf6021_fmt =
{
{
- { 9, 2 }, {11, 2}, { 13, 2}, /* Day, Month, Year */
- { 3, 2 }, { 5, 2}, { 7, 2}, /* Hour, Minute, Second */
+ { 9, 2 }, {11, 2}, { 13, 2}, /* Day, Month, Year */
+ { 3, 2 }, { 5, 2}, { 7, 2}, /* Hour, Minute, Second */
{ 2, 1 }, { 1, 1}, { 0, 0}, /* Weekday, Flags, Zone */
/* ... */
},
(const unsigned char *)"\002 \n\r\003",
- 0
+ 0
};
#define OFFS(x) format->field_offsets[(x)].offset
@@ -118,8 +118,8 @@ static struct format hopf6021_fmt =
('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \
-1)
-static unsigned long cvt_hopf6021 (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_hopf6021 (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_hopf6021;
+static parse_inp_fnc_t inp_hopf6021;
clockformat_t clock_hopf6021 =
{
@@ -132,7 +132,8 @@ clockformat_t clock_hopf6021 =
0 /* private data length, no private data */
};
-static unsigned long
+/* parse_cvt_fnc_t cvt_hopf6021 */
+static u_long
cvt_hopf6021(
unsigned char *buffer,
int size,
@@ -162,8 +163,8 @@ cvt_hopf6021(
clock_time->usecond = 0;
clock_time->utcoffset = 0;
- status = hexval(buffer[OFFS(O_FLAGS)]);
- weekday= hexval(buffer[OFFS(O_WDAY)]);
+ status = (u_char) hexval(buffer[OFFS(O_FLAGS)]);
+ weekday= (u_char) hexval(buffer[OFFS(O_WDAY)]);
if ((status == 0xFF) || (weekday == 0xFF))
{
@@ -213,21 +214,21 @@ cvt_hopf6021(
}
/*
- * inp_hopf6021
+ * parse_inp_fnc_t inp_hopf6021
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_hopf6021(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_hopf6021(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case ETX:
diff --git a/libparse/clk_meinberg.c b/libparse/clk_meinberg.c
index a94c3f7a2edd..4047be5e7314 100644
--- a/libparse/clk_meinberg.c
+++ b/libparse/clk_meinberg.c
@@ -1,12 +1,12 @@
/*
* /src/NTP/REPOSITORY/ntp4-dev/libparse/clk_meinberg.c,v 4.12.2.1 2005/09/25 10:22:35 kardel RELEASE_20050925_A
- *
+ *
* clk_meinberg.c,v 4.12.2.1 2005/09/25 10:22:35 kardel RELEASE_20050925_A
*
* Meinberg clock support
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -65,7 +65,7 @@
/*
* The Meinberg receiver every second sends a datagram of the following form
* (Standard Format)
- *
+ *
* <STX>D:<dd>.<mm>.<yy>;T:<w>;U:<hh>:<mm>:<ss>;<S><F><D><A><ETX>
* pos: 0 00 00 0 00 0 11 111 1 111 12 2 22 2 22 2 2 2 3 3 3
* 1 23 45 6 78 9 01 234 5 678 90 1 23 4 56 7 8 9 0 1 2
@@ -105,12 +105,14 @@
* <A> = '!' during the hour preceeding an daylight saving time
* start/end change
* <L> = 'A' LEAP second announcement
- * <R> = 'R' alternate antenna
+ * <R> = 'R' "call bit" used to signalize irregularities in the control facilities,
+ * usually ' ', until 2003 indicated transmission via alternate antenna
*
- * Meinberg GPS166 receiver
+ * Meinberg GPS receivers
*
- * You must get the Uni-Erlangen firmware for the GPS receiver support
+ * For very old devices you must get the Uni-Erlangen firmware for the GPS receiver support
* to work to full satisfaction !
+ * With newer GPS receiver types the Uni Erlangen string format can be configured at the device.
*
* <STX><dd>.<mm>.<yy>; <w>; <hh>:<mm>:<ss>; <+/-><00:00>; <U><S><F><D><A><L><R><L>; <position...><ETX>
*
@@ -118,7 +120,7 @@
* 123456789012345678901234567890123456789012345678901234567890123456
* \x0209.07.93; 5; 08:48:26; +00:00; #*S!A L; 49.5736N 11.0280E 373m\x03
*
- *
+ *
* <STX> = '\002' ASCII start of text
* <ETX> = '\003' ASCII end of text
* <dd>,<mm>,<yy> = day, month, year(2 digits!!)
@@ -131,8 +133,10 @@
* <A> = '!' during the hour preceeding an daylight saving time
* start/end change
* <L> = 'A' LEAP second announcement
- * <R> = 'R' alternate antenna (reminiscent of PZF535) usually ' '
- * <L> = 'L' on 23:59:60
+ * <R> = 'R' "call bit" used to signalize irregularities in the control facilities,
+ * usually ' ', until 2003 indicated transmission via alternate antenna
+ * (reminiscent of PZF receivers)
+ * <L> = 'L' on 23:59:60
*
* Binary messages have a lead in for a fixed header of SOH
*/
@@ -150,19 +154,20 @@
/* Ret val: the checksum */
/*+-------------------------------------------------------------*/
-unsigned long
+CSUM
mbg_csum(
unsigned char *p,
unsigned int n
)
{
- unsigned long sum = 0;
+ unsigned int sum = 0;
unsigned int i;
-
+
for ( i = 0; i < n; i++ )
sum += *p++;
-
- return( sum );
+
+ return (CSUM) sum;
+
} /* csum */
void
@@ -171,10 +176,10 @@ get_mbg_header(
GPS_MSG_HDR *headerp
)
{
- headerp->gps_cmd = get_lsb_short(bufpp);
- headerp->gps_len = get_lsb_short(bufpp);
- headerp->gps_data_csum = get_lsb_short(bufpp);
- headerp->gps_hdr_csum = get_lsb_short(bufpp);
+ headerp->cmd = (GPS_CMD) get_lsb_short(bufpp);
+ headerp->len = get_lsb_uint16(bufpp);
+ headerp->data_csum = (CSUM) get_lsb_short(bufpp);
+ headerp->hdr_csum = (CSUM) get_lsb_short(bufpp);
}
static struct format meinberg_fmt[] =
@@ -209,10 +214,10 @@ static struct format meinberg_fmt[] =
}
};
-static u_long cvt_meinberg (unsigned char *, int, struct format *, clocktime_t *, void *);
-static u_long cvt_mgps (unsigned char *, int, struct format *, clocktime_t *, void *);
-static u_long mbg_input (parse_t *, unsigned int, timestamp_t *);
-static u_long gps_input (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_meinberg;
+static parse_cvt_fnc_t cvt_mgps;
+static parse_inp_fnc_t mbg_input;
+static parse_inp_fnc_t gps_input;
struct msg_buf
{
@@ -224,7 +229,7 @@ struct msg_buf
#define MBG_HEADER 1 /* receiving header */
#define MBG_DATA 2 /* receiving data */
#define MBG_STRING 3 /* receiving standard data message */
-
+
clockformat_t clock_meinberg[] =
{
{
@@ -234,7 +239,7 @@ clockformat_t clock_meinberg[] =
0, /* conversion configuration */
"Meinberg Standard", /* Meinberg simple format - beware */
32, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
},
{
mbg_input, /* normal input handling */
@@ -243,21 +248,21 @@ clockformat_t clock_meinberg[] =
0, /* conversion configuration */
"Meinberg Extended", /* Meinberg enhanced format */
32, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
},
{
gps_input, /* no input handling */
- cvt_mgps, /* Meinberg GPS166 conversion */
+ cvt_mgps, /* Meinberg GPS receiver conversion */
pps_one, /* easy PPS monitoring */
(void *)&meinberg_fmt[2], /* conversion configuration */
- "Meinberg GPS Extended", /* Meinberg FAU GPS format */
+ "Meinberg GPS Extended", /* Meinberg FAU GPS format */
512, /* string buffer */
- sizeof(struct msg_buf) /* no private data (complete pakets) */
+ sizeof(struct msg_buf) /* no private data (complete packets) */
}
};
/*
- * cvt_meinberg
+ * parse_cvt_fnc_t cvt_meinberg
*
* convert simple type format
*/
@@ -271,7 +276,7 @@ cvt_meinberg(
)
{
struct format *format;
-
+
/*
* select automagically correct data format
*/
@@ -312,7 +317,7 @@ cvt_meinberg(
else
{
unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
-
+
clock_time->usecond = 0;
clock_time->flags = PARSEB_S_LEAP;
@@ -348,7 +353,7 @@ cvt_meinberg(
case ' ':
clock_time->utcoffset = -1*60*60; /* MET */
break;
-
+
case 'S':
clock_time->utcoffset = -2*60*60; /* MED */
break;
@@ -360,27 +365,27 @@ cvt_meinberg(
clock_time->utcoffset = 0; /* UTC */
clock_time->flags |= PARSEB_UTC;
break;
-
+
default:
return CVT_FAIL|CVT_BADFMT;
}
}
-
+
/*
* gather status flags
*/
if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
clock_time->flags |= PARSEB_DST;
-
+
if (f[0] == '#')
clock_time->flags |= PARSEB_POWERUP;
-
+
if (f[1] == '*')
clock_time->flags |= PARSEB_NOSYNC;
-
+
if (f[3] == '!')
clock_time->flags |= PARSEB_ANNOUNCE;
-
+
/*
* oncoming leap second
* 'a' code not confirmed - earth is not
@@ -388,27 +393,27 @@ cvt_meinberg(
*/
if (f[3] == 'A')
clock_time->flags |= PARSEB_LEAPADD;
-
+
if (f[3] == 'a')
clock_time->flags |= PARSEB_LEAPDEL;
-
-
+
+
if (format->flags & MBG_EXTENDED)
{
clock_time->flags |= PARSEB_S_ANTENNA;
-
+
/*
* DCF77 does not encode the direction -
* so we take the current default -
* earth slowing down
*/
clock_time->flags &= ~PARSEB_LEAPDEL;
-
+
if (f[4] == 'A')
clock_time->flags |= PARSEB_LEAPADD;
-
+
if (f[5] == 'R')
- clock_time->flags |= PARSEB_ALTERNATE;
+ clock_time->flags |= PARSEB_CALLBIT;
}
return CVT_OK;
}
@@ -416,31 +421,31 @@ cvt_meinberg(
/*
- * mbg_input
+ * parse_inp_fnc_t mbg_input
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
mbg_input(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("mbg_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case STX:
parseprintf(DD_PARSE, ("mbg_input: STX seen\n"));
-
+
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
return PARSE_INP_SKIP;
-
+
case ETX:
parseprintf(DD_PARSE, ("mbg_input: ETX seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
@@ -455,7 +460,7 @@ mbg_input(
/*
- * cvt_mgps
+ * parse_cvt_fnc_t cvt_mgps
*
* convert Meinberg GPS format
*/
@@ -493,9 +498,9 @@ cvt_mgps(
{
long h;
unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
-
+
clock_time->flags = PARSEB_S_LEAP|PARSEB_S_POSITION;
-
+
clock_time->usecond = 0;
/*
@@ -522,22 +527,22 @@ cvt_mgps(
clock_time->utcoffset = -clock_time->utcoffset;
}
}
-
+
/*
* gather status flags
*/
if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
clock_time->flags |= PARSEB_DST;
-
+
if (clock_time->utcoffset == 0)
clock_time->flags |= PARSEB_UTC;
-
+
/*
* no sv's seen - no time & position
*/
if (f[0] == '#')
clock_time->flags |= PARSEB_POWERUP;
-
+
/*
* at least one sv seen - time (for last position)
*/
@@ -546,13 +551,13 @@ cvt_mgps(
else
if (!(clock_time->flags & PARSEB_POWERUP))
clock_time->flags |= PARSEB_POSITION;
-
+
/*
* oncoming zone switch
*/
if (f[3] == '!')
clock_time->flags |= PARSEB_ANNOUNCE;
-
+
/*
* oncoming leap second
* 'a' code not confirmed - earth is not
@@ -560,14 +565,14 @@ cvt_mgps(
*/
if (f[4] == 'A')
clock_time->flags |= PARSEB_LEAPADD;
-
+
if (f[4] == 'a')
clock_time->flags |= PARSEB_LEAPDEL;
/*
* f[5] == ' '
*/
-
+
/*
* this is the leap second
*/
@@ -580,35 +585,35 @@ cvt_mgps(
}
/*
- * gps_input
+ * parse_inp_fnc_t gps_input
*
* grep binary data from input stream
*/
static u_long
gps_input(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
CSUM calc_csum; /* used to compare the incoming csums */
GPS_MSG_HDR header;
struct msg_buf *msg_buf;
-
+
msg_buf = (struct msg_buf *)parseio->parse_pdata;
parseprintf(DD_PARSE, ("gps_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
if (!msg_buf)
return PARSE_INP_SKIP;
-
+
if ( msg_buf->phase == MBG_NONE )
{ /* not receiving yet */
switch (ch)
{
case SOH:
parseprintf(DD_PARSE, ("gps_input: SOH seen\n"));
-
+
msg_buf->len = sizeof( header ); /* prepare to receive msg header */
msg_buf->phase = MBG_HEADER; /* receiving header */
break;
@@ -621,7 +626,7 @@ gps_input(
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
break;
-
+
default:
return PARSE_INP_SKIP; /* keep searching */
}
@@ -638,7 +643,7 @@ gps_input(
if ((msg_buf->phase == MBG_STRING) &&
(parseio->parse_index < parseio->parse_dsize))
parseio->parse_data[parseio->parse_index++] = ch;
-
+
parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
if (parseio->parse_dtime.parse_msglen > sizeof(parseio->parse_dtime.parse_msg))
@@ -649,7 +654,7 @@ gps_input(
parseio->parse_ldsize = parseio->parse_index;
return PARSE_INP_DATA;
}
-
+
switch (msg_buf->phase)
{
case MBG_HEADER:
@@ -685,41 +690,41 @@ gps_input(
if ( msg_buf->phase == MBG_HEADER )
{ /* header complete now */
unsigned char *datap = parseio->parse_dtime.parse_msg + 1;
-
+
get_mbg_header(&datap, &header);
-
+
parseprintf(DD_PARSE, ("gps_input: header: cmd 0x%x, len %d, dcsum 0x%x, hcsum 0x%x\n",
- (int)header.gps_cmd, (int)header.gps_len, (int)header.gps_data_csum,
- (int)header.gps_hdr_csum));
-
+ (int)header.cmd, (int)header.len, (int)header.data_csum,
+ (int)header.hdr_csum));
+
calc_csum = mbg_csum( (unsigned char *) parseio->parse_dtime.parse_msg + 1, (unsigned short)6 );
- if ( calc_csum != header.gps_hdr_csum )
+ if ( calc_csum != header.hdr_csum )
{
parseprintf(DD_PARSE, ("gps_input: header checksum mismatch expected 0x%x, got 0x%x\n",
(int)calc_csum, (int)mbg_csum( (unsigned char *) parseio->parse_dtime.parse_msg, (unsigned short)6 )));
-
+
msg_buf->phase = MBG_NONE; /* back to hunting mode */
return PARSE_INP_DATA; /* invalid header checksum received - pass up for detection */
}
- if ((header.gps_len == 0) || /* no data to wait for */
- (header.gps_len >= (sizeof (parseio->parse_dtime.parse_msg) - sizeof(header) - 1))) /* blows anything we have space for */
+ if ((header.len == 0) || /* no data to wait for */
+ (header.len >= (sizeof (parseio->parse_dtime.parse_msg) - sizeof(header) - 1))) /* blows anything we have space for */
{
msg_buf->phase = MBG_NONE; /* back to hunting mode */
- return (header.gps_len == 0) ? PARSE_INP_DATA : PARSE_INP_SKIP; /* message complete/throwaway */
+ return (header.len == 0) ? PARSE_INP_DATA : PARSE_INP_SKIP; /* message complete/throwaway */
}
-
- parseprintf(DD_PARSE, ("gps_input: expecting %d bytes of data message\n", (int)header.gps_len));
-
- msg_buf->len = header.gps_len;/* save number of bytes to wait for */
+
+ parseprintf(DD_PARSE, ("gps_input: expecting %d bytes of data message\n", (int)header.len));
+
+ msg_buf->len = header.len;/* save number of bytes to wait for */
msg_buf->phase = MBG_DATA; /* flag header already complete */
return PARSE_INP_SKIP;
}
parseprintf(DD_PARSE, ("gps_input: message data complete\n"));
-
+
/* Header and data have been received. The header checksum has been */
/* checked */
diff --git a/libparse/clk_rawdcf.c b/libparse/clk_rawdcf.c
index d6e4b184c050..132fbc33146e 100644
--- a/libparse/clk_rawdcf.c
+++ b/libparse/clk_rawdcf.c
@@ -1,12 +1,12 @@
/*
* /src/NTP/REPOSITORY/ntp4-dev/libparse/clk_rawdcf.c,v 4.18 2006/06/22 18:40:01 kardel RELEASE_20060622_A
- *
+ *
* clk_rawdcf.c,v 4.18 2006/06/22 18:40:01 kardel RELEASE_20060622_A
*
* Raw DCF77 pulse clock support
*
* Copyright (c) 1995-2006 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -75,7 +75,8 @@
* Second Contents
* 0 - 10 AM: free, FM: 0
* 11 - 14 free
- * 15 R - alternate antenna
+ * 15 R - "call bit" used to signalize irregularities in the control facilities
+ * (until 2003 indicated transmission via alternate antenna)
* 16 A1 - expect zone change (1 hour before)
* 17 - 18 Z1,Z2 - time zone
* 0 0 illegal
@@ -101,9 +102,9 @@
* 59 - usually missing (minute indication), except for leap insertion
*/
-static u_long pps_rawdcf (parse_t *, int, timestamp_t *);
-static u_long cvt_rawdcf (unsigned char *, int, struct format *, clocktime_t *, void *);
-static u_long inp_rawdcf (parse_t *, unsigned int, timestamp_t *);
+static parse_pps_fnc_t pps_rawdcf;
+static parse_cvt_fnc_t cvt_rawdcf;
+static parse_inp_fnc_t inp_rawdcf;
typedef struct last_tcode {
time_t tcode; /* last converted time code */
@@ -127,13 +128,13 @@ static struct dcfparam
{
const unsigned char *onebits;
const unsigned char *zerobits;
-} dcfparameter =
+} dcfparameter =
{
(const unsigned char *)"###############RADMLS1248124P124812P1248121241248112481248P??", /* 'ONE' representation */
(const unsigned char *)"--------------------s-------p------p----------------------p__" /* 'ZERO' representation */
};
-static struct rawdcfcode
+static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@@ -189,7 +190,7 @@ ext_bf(
int i, first;
first = rawdcfcode[idx].offset;
-
+
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@@ -238,7 +239,7 @@ convert_rawdcf(
#endif
return CVT_NONE;
}
-
+
for (i = 0; i < size; i++)
{
if ((*s != *b) && (*s != *c))
@@ -307,7 +308,7 @@ convert_rawdcf(
clock_time->flags |= PARSEB_LEAPADD; /* default: DCF77 data format deficiency */
if (ext_bf(buffer, DCF_R, dcfprm->zerobits))
- clock_time->flags |= PARSEB_ALTERNATE;
+ clock_time->flags |= PARSEB_CALLBIT;
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: TIME CODE OK: %d:%d, %d.%d.%d, flags 0x%lx\n",
(int)clock_time->hour, (int)clock_time->minute, (int)clock_time->day, (int)clock_time->month,(int) clock_time->year,
@@ -327,6 +328,7 @@ convert_rawdcf(
}
/*
+ * parse_cvt_fnc_t cvt_rawdcf
* raw dcf input routine - needs to fix up 50 baud
* characters for 1/0 decision
*/
@@ -379,7 +381,7 @@ cvt_rawdcf(
ch >>= 1;
}
- *s = i;
+ *s = (unsigned char) i;
histbuf[i]++;
cutoff += i;
lowmax++;
@@ -504,12 +506,12 @@ cvt_rawdcf(
}
}
}
-
+
return rtc;
}
/*
- * pps_rawdcf
+ * parse_pps_fnc_t pps_rawdcf
*
* currently a very stupid version - should be extended to decode
* also ones and zeros (which is easy)
@@ -546,30 +548,30 @@ snt_rawdcf(
#else
parseio->parse_dtime.parse_time.fp.l_ui++;
#endif
-
+
parseprintf(DD_RAWDCF,("parse: snt_rawdcf: time stamp synthesized offset %d seconds\n", parseio->parse_index - 1));
-
+
return updatetimeinfo(parseio, parseio->parse_lstate);
}
return CVT_NONE;
}
/*
- * inp_rawdcf
+ * parse_inp_fnc_t inp_rawdcf
*
* grab DCF77 data from input stream
*/
static u_long
inp_rawdcf(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
static struct timeval timeout = { 1, 500000 }; /* 1.5 secongs denote second #60 */
-
+
parseprintf(DD_PARSE, ("inp_rawdcf(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
if (parse_timedout(parseio, tstamp, &timeout))
@@ -583,7 +585,7 @@ inp_rawdcf(
else
{
unsigned int rtc;
-
+
rtc = parse_addchar(parseio, ch);
if (rtc == PARSE_INP_SKIP)
{
diff --git a/libparse/clk_rcc8000.c b/libparse/clk_rcc8000.c
index 6dca1660d445..a690e588b91b 100644
--- a/libparse/clk_rcc8000.c
+++ b/libparse/clk_rcc8000.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/ntp4-dev/libparse/clk_rcc8000.c,v 4.9 2004/11/14 15:29:41 kardel RELEASE_20050508_A
- *
+ *
* clk_rcc8000.c,v 4.9 2004/11/14 15:29:41 kardel RELEASE_20050508_A
*
* Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support
@@ -49,16 +49,16 @@ extern int printf (const char *, ...);
#define O_USEC O_WDAY
static struct format rcc8000_fmt =
-{ { { 13, 2 }, {16, 2}, { 19, 2}, /* Day, Month, Year */
- { 0, 2 }, { 3, 2}, { 6, 2}, /* Hour, Minute, Second */
+{ { { 13, 2 }, {16, 2}, { 19, 2}, /* Day, Month, Year */
+ { 0, 2 }, { 3, 2}, { 6, 2}, /* Hour, Minute, Second */
{ 9, 3 }, {28, 1}, { 0, 0}, /* uSec, Status (Valid,Reject,BST,Leapyear) */ },
- (const unsigned char *)" : : . / / \r\n",
+ (const unsigned char *)" : : . / / \r\n",
/*"15:50:36.534 30/09/94 273 5 A\x0d\x0a" */
- 0
+ 0
};
-static unsigned long cvt_rcc8000 (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_rcc8000 (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_rcc8000;
+static parse_inp_fnc_t inp_rcc8000;
clockformat_t clock_rcc8000 =
{
@@ -71,7 +71,8 @@ clockformat_t clock_rcc8000 =
0 /* no private data */
};
-static unsigned long
+/* parse_cvt_fnc_t cvt_rcc8000 */
+static u_long
cvt_rcc8000(
unsigned char *buffer,
int size,
@@ -121,27 +122,27 @@ cvt_rcc8000(
clock_time->flags |= PARSEB_POWERUP;
clock_time->flags |= PARSEB_UTC; /* British special - guess why 8-) */
-
+
/* other flags not used */
}
return CVT_OK;
}
/*
- * inp_rcc8000
+ * parse_inp_fnc_t inp_rcc8000
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_rcc8000(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_rcc8000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case '\n':
@@ -150,7 +151,7 @@ inp_rcc8000(
return parse_end(parseio);
else
return rtc;
-
+
default:
if (parseio->parse_index == 0) /* take sample at start of message */
diff --git a/libparse/clk_schmid.c b/libparse/clk_schmid.c
index 045f0fcf5a8f..5e303b94c29a 100644
--- a/libparse/clk_schmid.c
+++ b/libparse/clk_schmid.c
@@ -1,13 +1,13 @@
/*
* /src/NTP/ntp4-dev/libparse/clk_schmid.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* clk_schmid.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* Schmid clock support
* based on information and testing from Adam W. Feigin et. al (Swisstime iis.ethz.ch)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,7 +61,7 @@ extern int printf (const char *, ...);
* The command to Schmid's DCF77 clock is a single byte; each bit
* allows the user to select some part of the time string, as follows (the
* output for the lsb is sent first).
- *
+ *
* Bit 0: time in MEZ, 4 bytes *binary, not BCD*; hh.mm.ss.tenths
* Bit 1: date 3 bytes *binary, not BCD: dd.mm.yy
* Bit 2: week day, 1 byte (unused here)
@@ -82,15 +82,15 @@ extern int printf (const char *, ...);
#define WS_TIME 0x01
#define WS_SIGNAL 0x02
-#define WS_ALTERNATE 0x01
+#define WS_CALLBIT 0x01 /* "call bit" used to signalize irregularities in the control facilities */
#define WS_ANNOUNCE 0x02
#define WS_TZ 0x0c
#define WS_MET 0x08
#define WS_MEST 0x04
#define WS_LEAP 0x10
-static u_long cvt_schmid (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_schmid (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_schmid;
+static parse_inp_fnc_t inp_schmid;
clockformat_t clock_schmid =
{
@@ -103,7 +103,7 @@ clockformat_t clock_schmid =
0, /* no private data (complete messages) */
};
-
+/* parse_cvt_fnc_t */
static u_long
cvt_schmid(
unsigned char *buffer,
@@ -155,7 +155,7 @@ cvt_schmid(
default:
return CVT_FAIL|CVT_BADFMT;
}
-
+
if (!(buffer[7] & WS_TIME))
{
clock_time->flags |= PARSEB_POWERUP;
@@ -168,9 +168,9 @@ cvt_schmid(
if (buffer[7] & WS_SIGNAL)
{
- if (buffer[8] & WS_ALTERNATE)
+ if (buffer[8] & WS_CALLBIT)
{
- clock_time->flags |= PARSEB_ALTERNATE;
+ clock_time->flags |= PARSEB_CALLBIT;
}
if (buffer[8] & WS_ANNOUNCE)
@@ -185,32 +185,32 @@ cvt_schmid(
}
clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_ANTENNA;
-
+
return CVT_OK;
}
}
}
/*
- * inp_schmid
+ * parse_inp_fnc_t inp_schmid
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_schmid(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_schmid(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
+
+ switch ((uint8_t)ch)
{
case 0xFD: /* */
- parseprintf(DD_PARSE, ("mbg_input: ETX seen\n"));
+ parseprintf(DD_PARSE, ("inp_schmid: 0xFD seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
return parse_end(parseio);
else
diff --git a/libparse/clk_sel240x.c b/libparse/clk_sel240x.c
index a09d3478dbf6..b1390b4cefb1 100644
--- a/libparse/clk_sel240x.c
+++ b/libparse/clk_sel240x.c
@@ -3,7 +3,7 @@
// Schweitzer Engineering Laboratories, Inc. <opensource@selinc.com>
//////////////////////////////////////////////////////////////////////////////
-// Need to have _XOPEN_SOURCE defined for time.h to give the
+// Need to have _XOPEN_SOURCE defined for time.h to give the
// correct strptime signature. As per feature_test_macros(7),
// define this before including any header files.
@@ -51,14 +51,8 @@
// a '?'. But we are only going to call it synced when we receive a ' '
//////////////////////////////////////////////////////////////////////////////
-static unsigned long inp_sel240x( parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp);
-static unsigned long cvt_sel240x( unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local );
+static parse_inp_fnc_t inp_sel240x;
+static parse_cvt_fnc_t cvt_sel240x;
// Parse clock format structure describing the message above
static struct format sel240x_fmt =
@@ -94,7 +88,7 @@ clockformat_t clock_sel240x =
//////////////////////////////////////////////////////////////////////////////
static unsigned long
inp_sel240x( parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
@@ -139,7 +133,7 @@ cvt_sel240x( unsigned char *buffer,
{
struct tm ptime;
buffer++;
- buffer = (unsigned char *) strptime(
+ buffer = (unsigned char *) strptime(
(const char *)buffer, "%Y:%j:%H:%M:%S", &ptime );
if( *(buffer+1) != '\x0d' )
{
diff --git a/libparse/clk_trimtaip.c b/libparse/clk_trimtaip.c
index 322d0fa08e89..426e897bec97 100644
--- a/libparse/clk_trimtaip.c
+++ b/libparse/clk_trimtaip.c
@@ -6,7 +6,7 @@
* Trimble SV6 clock support - several collected codepieces
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -78,8 +78,8 @@ extern int printf (const char *, ...);
0
};
-static unsigned long cvt_trimtaip (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_trimtaip (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_trimtaip;
+static parse_inp_fnc_t inp_trimtaip;
clockformat_t clock_trimtaip =
{
@@ -92,7 +92,8 @@ clockformat_t clock_trimtaip =
0 /* no private data */
};
-static unsigned long
+/* parse_cvt_fnc_t cvt_trimtaip */
+static u_long
cvt_trimtaip(
unsigned char *buffer,
int size,
@@ -141,31 +142,31 @@ cvt_trimtaip(
}
/*
- * inp_trimtaip
+ * parse_inp_fnc_t inp_trimtaip
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_trimtaip(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_trimtaip(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case '>':
parseprintf(DD_PARSE, ("inp_trimptaip: START seen\n"));
-
+
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
return PARSE_INP_SKIP;
-
+
case '<':
parseprintf(DD_PARSE, ("inp_trimtaip: END seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
diff --git a/libparse/clk_trimtsip.c b/libparse/clk_trimtsip.c
index 743e39c3bc74..6c71d75627ac 100644
--- a/libparse/clk_trimtsip.c
+++ b/libparse/clk_trimtsip.c
@@ -7,7 +7,7 @@
* Thanks to Sven Dietrich for providing test hardware
*
* Copyright (c) 1995-2009 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -116,7 +116,7 @@ struct trimble
#define STATUS_UNSAFE 1 /* not enough receivers for full precision */
#define STATUS_SYNC 2 /* enough information for good operation */
-static unsigned long inp_tsip (parse_t *, unsigned int, timestamp_t *);
+static unsigned long inp_tsip (parse_t *, char, timestamp_t *);
static unsigned long cvt_trimtsip (unsigned char *, int, struct format *, clocktime_t *, void *);
struct clockformat clock_trimtsip =
@@ -136,7 +136,7 @@ struct clockformat clock_trimtsip =
static unsigned long
inp_tsip(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
@@ -183,7 +183,7 @@ inp_tsip(
/* DLE,ETX -> end of packet */
parseio->parse_data[parseio->parse_index++] = DLE;
parseio->parse_data[parseio->parse_index] = ch;
- parseio->parse_ldsize = parseio->parse_index+1;
+ parseio->parse_ldsize = (u_short) (parseio->parse_index + 1);
memcpy(parseio->parse_ldata, parseio->parse_data, parseio->parse_ldsize);
parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = DLE;
parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
@@ -200,13 +200,13 @@ inp_tsip(
return PARSE_INP_SKIP;
}
-
-static int
+
+static short
getshort(
unsigned char *p
)
{
- return get_msb_short(&p);
+ return (short) get_msb_short(&p);
}
/*
@@ -245,7 +245,7 @@ cvt_trimtsip(
{
unsigned char *bp;
cmd = buffer[1];
-
+
switch(cmd)
{
case CMD_RCURTIME:
@@ -258,15 +258,15 @@ cvt_trimtsip(
bp = &mb(0);
if (fetch_ieee754(&bp, IEEE_SINGLE, &secs, trim_offsets) != IEEE_OK)
return CVT_FAIL|CVT_BADFMT;
-
+
if ((secs.l_i <= 0) ||
(t->t_utcknown == 0))
{
clock_time->flags = PARSEB_POWERUP;
return CVT_OK;
}
- if (week < 990) {
- week += 1024;
+ if (week < GPSWRAP) {
+ week += GPSWEEKS;
}
/* time OK */
@@ -275,7 +275,7 @@ cvt_trimtsip(
bp = &mb(6);
if (fetch_ieee754(&bp, IEEE_SINGLE, &utcoffset, trim_offsets) != IEEE_OK)
return CVT_FAIL|CVT_BADFMT;
-
+
L_SUB(&secs, &utcoffset); /* adjust GPS time to UTC time */
gpstolfp((unsigned short)week, (unsigned short)0,
@@ -289,10 +289,10 @@ cvt_trimtsip(
if (t->t_leap == ADDSECOND)
clock_time->flags |= PARSEB_LEAPADD;
-
+
if (t->t_leap == DELSECOND)
clock_time->flags |= PARSEB_LEAPDEL;
-
+
switch (t->t_operable)
{
case STATUS_SYNC:
@@ -307,12 +307,12 @@ cvt_trimtsip(
clock_time->flags |= PARSEB_NOSYNC|PARSEB_POWERUP;
break;
}
-
+
if (t->t_mode == 0)
clock_time->flags |= PARSEB_POSITION;
-
+
clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_POSITION;
-
+
return CVT_OK;
} /* case 0x41 */
@@ -346,26 +346,26 @@ cvt_trimtsip(
{
l_fp t0t;
unsigned char *lbp;
-
+
/* UTC correction data - derive a leap warning */
- int tls = t->t_gpsutc = getshort((unsigned char *)&mb(12)); /* current leap correction (GPS-UTC) */
- int tlsf = t->t_gpsutcleap = getshort((unsigned char *)&mb(24)); /* new leap correction */
-
- t->t_weekleap = getshort((unsigned char *)&mb(20)); /* week no of leap correction */
- if (t->t_weekleap < 990)
- t->t_weekleap += 1024;
-
- t->t_dayleap = getshort((unsigned char *)&mb(22)); /* day in week of leap correction */
- t->t_week = getshort((unsigned char *)&mb(18)); /* current week no */
- if (t->t_week < 990)
- t->t_week += 1024;
-
+ int tls = t->t_gpsutc = (u_short) getshort((unsigned char *)&mb(12)); /* current leap correction (GPS-UTC) */
+ int tlsf = t->t_gpsutcleap = (u_short) getshort((unsigned char *)&mb(24)); /* new leap correction */
+
+ t->t_weekleap = (u_short) getshort((unsigned char *)&mb(20)); /* week no of leap correction */
+ if (t->t_weekleap < GPSWRAP)
+ t->t_weekleap = (u_short)(t->t_weekleap + GPSWEEKS);
+
+ t->t_dayleap = (u_short) getshort((unsigned char *)&mb(22)); /* day in week of leap correction */
+ t->t_week = (u_short) getshort((unsigned char *)&mb(18)); /* current week no */
+ if (t->t_week < GPSWRAP)
+ t->t_week = (u_short)(t->t_weekleap + GPSWEEKS);
+
lbp = (unsigned char *)&mb(14); /* last update time */
if (fetch_ieee754(&lbp, IEEE_SINGLE, &t0t, trim_offsets) != IEEE_OK)
return CVT_FAIL|CVT_BADFMT;
t->t_utcknown = t0t.l_ui != 0;
-
+
if ((t->t_utcknown) && /* got UTC information */
(tlsf != tls) && /* something will change */
((t->t_weekleap - t->t_week) < 5)) /* and close in the future */
diff --git a/libparse/clk_varitext.c b/libparse/clk_varitext.c
index 295ce0af7589..022549e82f4a 100644
--- a/libparse/clk_varitext.c
+++ b/libparse/clk_varitext.c
@@ -9,14 +9,14 @@
* clk_varitext.c,v 1.5 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* Varitext code variant by A.McConnell 1997/01/19
- *
+ *
* Supports Varitext's Radio Clock
- *
+ *
* Used the Meinberg/Computime clock as a template for Varitext Radio Clock
*
* Codebase:
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -67,31 +67,31 @@ static const u_char VT_LAST_TELEGRAM_OK = 0x20;
/*
* The Varitext receiver sends a datagram in the following format every minute
- *
- * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLFSTXXX
+ *
+ * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLFSTXXX
* Pos 0123456789012345678901 2 3 4567
* 0000000000111111111122 2 2 2222
- * Parse T: : : : : : : \r\n
- *
- * T Startcharacter "T" specifies start of the timestamp
- * YY Year MM Month 1-12
- * MD Day of the month
- * WD Day of week
- * HH Hour
- * MM Minute
- * SS Second
- * CR Carriage return
- * LF Linefeed
+ * Parse T: : : : : : : \r\n
+ *
+ * T Startcharacter "T" specifies start of the timestamp
+ * YY Year MM Month 1-12
+ * MD Day of the month
+ * WD Day of week
+ * HH Hour
+ * MM Minute
+ * SS Second
+ * CR Carriage return
+ * LF Linefeed
* ST Status character
* Bit 0 - Set= Initialised; Reset=Time Invalid (DO NOT USE)
- * Bit 1 - Set= Synchronised; Reset= Unsynchronised
- * Bit 2 - Set= Alarm state; Reset= No alarm
- * Bit 3 - Set= BST; Reset= GMT
- * Bit 4 - Set= Seasonal change in approx hour; Reset= No seasonal change expected
+ * Bit 1 - Set= Synchronised; Reset= Unsynchronised
+ * Bit 2 - Set= Alarm state; Reset= No alarm
+ * Bit 3 - Set= BST; Reset= GMT
+ * Bit 4 - Set= Seasonal change in approx hour; Reset= No seasonal change expected
* Bit 5 - Set= Last MSF telegram was OK; Reset= Last telegram was in error;
- * Bit 6 - Always set
+ * Bit 6 - Always set
* Bit 7 - Unused
- * XXX Checksum calculated using Fletcher's method (ignored for now).
+ * XXX Checksum calculated using Fletcher's method (ignored for now).
*/
static struct format varitext_fmt =
@@ -105,8 +105,8 @@ static struct format varitext_fmt =
0
};
-static u_long cvt_varitext (unsigned char *, int, struct format *, clocktime_t *, void *);
-static u_long inp_varitext (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_varitext;
+static parse_inp_fnc_t inp_varitext;
struct varitext {
unsigned char start_found;
@@ -128,11 +128,11 @@ clockformat_t clock_varitext =
};
/*
- * cvt_varitext
- *
+ * parse_cvt_fnc_t cvt_varitext
+ *
* convert simple type format
*/
-static u_long
+static u_long
cvt_varitext(
unsigned char *buffer,
int size,
@@ -142,7 +142,7 @@ cvt_varitext(
)
{
- if (!Strok(buffer, format->fixed_string)) {
+ if (!Strok(buffer, format->fixed_string)) {
return CVT_NONE;
} else {
if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
@@ -156,7 +156,7 @@ cvt_varitext(
Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
format->field_offsets[O_MIN].length) ||
Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
- format->field_offsets[O_SEC].length)) {
+ format->field_offsets[O_SEC].length)) {
return CVT_FAIL | CVT_BADFMT;
} else {
u_char *f = (u_char*) &buffer[format->field_offsets[O_FLAGS].offset];
@@ -170,24 +170,25 @@ cvt_varitext(
clock_time->flags |= PARSEB_DST;
}
/*
- if (!((*f) & VT_INITIALISED)) Clock not initialised
+ if (!((*f) & VT_INITIALISED)) Clock not initialised
clock_time->flags |= PARSEB_POWERUP;
-
- if (!((*f) & VT_SYNCHRONISED)) Clock not synchronised
+
+ if (!((*f) & VT_SYNCHRONISED)) Clock not synchronised
clock_time->flags |= PARSEB_NOSYNC;
-
- if (((*f) & VT_SEASON_CHANGE)) Seasonal change expected in the next hour
+
+ if (((*f) & VT_SEASON_CHANGE)) Seasonal change expected in the next hour
clock_time->flags |= PARSEB_ANNOUNCE;
*/
- return CVT_OK;
+ return CVT_OK;
}
}
}
-static u_long
+/* parse_inp_fnc_t inp_varitext */
+static u_long
inp_varitext(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
@@ -196,10 +197,10 @@ inp_varitext(
parseprintf(DD_PARSE, ("inp_varitext(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
- if (!t)
+ if (!t)
return PARSE_INP_SKIP; /* local data not allocated - sigh! */
- if (ch == 'T')
+ if (ch == 'T')
t->tstamp = *tstamp;
if ((t->previous_ch == 'T') && (ch == ':'))
@@ -224,7 +225,7 @@ inp_varitext(
return rtc;
}
- if (t->end_found)
+ if (t->end_found)
{
if (++(t->end_count) == 4) /* Finally found the end of the message */
{
@@ -235,16 +236,16 @@ inp_varitext(
return parse_end(parseio);
else
return rtc;
- }
+ }
}
- if ((t->previous_ch == '\r') && (ch == '\n'))
+ if ((t->previous_ch == '\r') && (ch == '\n'))
{
t->end_found = 1;
}
}
-
+
t->previous_ch = ch;
return PARSE_INP_SKIP;
diff --git a/libparse/clk_wharton.c b/libparse/clk_wharton.c
index 55ab43a9b574..a65bc53860e6 100644
--- a/libparse/clk_wharton.c
+++ b/libparse/clk_wharton.c
@@ -74,8 +74,11 @@ extern void printf (const char *, ...);
*
*/
+static parse_cvt_fnc_t cvt_wharton_400a;
+static parse_inp_fnc_t inp_wharton_400a;
+
/*
- * cvt_wharton_400a
+ * parse_cvt_fnc_t cvt_wharton_400a
*
* convert simple type format
*/
@@ -121,14 +124,14 @@ cvt_wharton_400a(
}
/*
- * inp_wharton_400a
+ * parse_inp_fnc_t inp_wharton_400a
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_wharton_400a(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
@@ -166,7 +169,7 @@ clockformat_t clock_wharton_400a =
0, /* conversion configuration */
"WHARTON 400A Series clock Output Format 1", /* String format name */
15, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
};
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_WHARTON_400A) */
diff --git a/libparse/data_mbg.c b/libparse/data_mbg.c
index 23ca75509180..0b3808c8ba64 100644
--- a/libparse/data_mbg.c
+++ b/libparse/data_mbg.c
@@ -43,6 +43,7 @@
#include "ntp_types.h"
#include "ntp_stdlib.h"
#include "ntp_fp.h"
+#include "ntp_calendar.h"
#include "mbg_gps166.h"
#include "binio.h"
#include "ieee754io.h"
@@ -63,10 +64,10 @@ put_mbg_header(
GPS_MSG_HDR *headerp
)
{
- put_lsb_short(bufpp, headerp->gps_cmd);
- put_lsb_short(bufpp, headerp->gps_len);
- put_lsb_short(bufpp, headerp->gps_data_csum);
- put_lsb_short(bufpp, headerp->gps_hdr_csum);
+ put_lsb_short(bufpp, headerp->cmd);
+ put_lsb_short(bufpp, headerp->len);
+ put_lsb_short(bufpp, headerp->data_csum);
+ put_lsb_short(bufpp, headerp->hdr_csum);
}
void
@@ -75,7 +76,7 @@ get_mbg_sw_rev(
SW_REV *sw_revp
)
{
- sw_revp->code = get_lsb_short(bufpp);
+ sw_revp->code = get_lsb_uint16(bufpp);
memcpy(sw_revp->name, *bufpp, sizeof(sw_revp->name));
*bufpp += sizeof(sw_revp->name);
}
@@ -86,8 +87,8 @@ get_mbg_ascii_msg(
ASCII_MSG *ascii_msgp
)
{
- ascii_msgp->csum = get_lsb_short(bufpp);
- ascii_msgp->valid = get_lsb_short(bufpp);
+ ascii_msgp->csum = (CSUM) get_lsb_short(bufpp);
+ ascii_msgp->valid = get_lsb_int16(bufpp);
memcpy(ascii_msgp->s, *bufpp, sizeof(ascii_msgp->s));
*bufpp += sizeof(ascii_msgp->s);
}
@@ -98,7 +99,7 @@ get_mbg_svno(
SVNO *svnop
)
{
- *svnop = get_lsb_short(bufpp);
+ *svnop = (SVNO) get_lsb_short(bufpp);
}
void
@@ -107,7 +108,7 @@ get_mbg_health(
HEALTH *healthp
)
{
- *healthp = get_lsb_short(bufpp);
+ *healthp = (HEALTH) get_lsb_short(bufpp);
}
void
@@ -116,7 +117,7 @@ get_mbg_cfg(
CFG *cfgp
)
{
- *cfgp = get_lsb_short(bufpp);
+ *cfgp = (CFG) get_lsb_short(bufpp);
}
void
@@ -125,7 +126,7 @@ get_mbg_tgps(
T_GPS *tgpsp
)
{
- tgpsp->wn = get_lsb_short(bufpp);
+ tgpsp->wn = get_lsb_uint16(bufpp);
tgpsp->sec = get_lsb_long(bufpp);
tgpsp->tick = get_lsb_long(bufpp);
}
@@ -133,20 +134,20 @@ get_mbg_tgps(
void
get_mbg_tm(
unsigned char **buffpp,
- TM *tmp
+ TM_GPS *tmp
)
{
- tmp->year = get_lsb_short(buffpp);
+ tmp->year = get_lsb_int16(buffpp);
tmp->month = *(*buffpp)++;
- tmp->mday = *(*buffpp)++;
- tmp->yday = get_lsb_short(buffpp);
- tmp->wday = *(*buffpp)++;
- tmp->hour = *(*buffpp)++;
- tmp->minute = *(*buffpp)++;
- tmp->second = *(*buffpp)++;
- tmp->frac = get_lsb_long(buffpp);
+ tmp->mday = *(*buffpp)++;
+ tmp->yday = get_lsb_int16(buffpp);
+ tmp->wday = *(*buffpp)++;
+ tmp->hour = *(*buffpp)++;
+ tmp->min = *(*buffpp)++;
+ tmp->sec = *(*buffpp)++;
+ tmp->frac = get_lsb_long(buffpp);
tmp->offs_from_utc = get_lsb_long(buffpp);
- tmp->status= get_lsb_short(buffpp);
+ tmp->status = get_lsb_uint16(buffpp);
}
void
@@ -155,7 +156,7 @@ get_mbg_ttm(
TTM *ttmp
)
{
- ttmp->channel = get_lsb_short(buffpp);
+ ttmp->channel = get_lsb_int16(buffpp);
get_mbg_tgps(buffpp, &ttmp->t);
get_mbg_tm(buffpp, &ttmp->tm);
}
@@ -166,9 +167,9 @@ get_mbg_synth(
SYNTH *synthp
)
{
- synthp->freq = get_lsb_short(buffpp);
- synthp->range = get_lsb_short(buffpp);
- synthp->phase = get_lsb_short(buffpp);
+ synthp->freq = get_lsb_int16(buffpp);
+ synthp->range = get_lsb_int16(buffpp);
+ synthp->phase = get_lsb_int16(buffpp);
}
static void
@@ -201,7 +202,7 @@ get_mbg_antinfo(
ANT_INFO *antinfop
)
{
- antinfop->status = get_lsb_short(buffpp);
+ antinfop->status = get_lsb_int16(buffpp);
get_mbg_tm(buffpp, &antinfop->tm_disconn);
get_mbg_tm(buffpp, &antinfop->tm_reconn);
antinfop->delta_t = get_lsb_long(buffpp);
@@ -216,8 +217,8 @@ mbg_time_status_str(
{
static struct state
{
- int flag; /* bit flag */
- const char *string; /* bit name */
+ int flag; /* bit flag */
+ const char *string; /* bit name */
} states[] =
{
{ TM_UTC, "UTC CORR" },
@@ -233,7 +234,7 @@ mbg_time_status_str(
{
char *start, *p;
struct state *s;
-
+
start = p = *buffpp;
for (s = states; s->flag; s++)
@@ -252,25 +253,27 @@ mbg_time_status_str(
*buffpp = p;
}
}
-
+
void
mbg_tm_str(
char **buffpp,
- TM *tmp,
- int size
+ TM_GPS *tmp,
+ int size,
+ int print_status
)
{
char *s = *buffpp;
snprintf(*buffpp, size, "%04d-%02d-%02d %02d:%02d:%02d.%07ld (%c%02d%02d) ",
tmp->year, tmp->month, tmp->mday,
- tmp->hour, tmp->minute, tmp->second, tmp->frac,
+ tmp->hour, tmp->min, tmp->sec, (long) tmp->frac,
(tmp->offs_from_utc < 0) ? '-' : '+',
abs((int)tmp->offs_from_utc) / 3600,
(abs((int)tmp->offs_from_utc) / 60) % 60);
*buffpp += strlen(*buffpp);
- mbg_time_status_str(buffpp, tmp->status, size - (*buffpp - s));
+ if (print_status)
+ mbg_time_status_str(buffpp, tmp->status, size - (*buffpp - s));
}
void
@@ -281,8 +284,8 @@ mbg_tgps_str(
)
{
snprintf(*buffpp, size, "week %d + %ld days + %ld.%07ld sec",
- tgpsp->wn, tgpsp->sec / 86400,
- tgpsp->sec % 86400, tgpsp->tick);
+ tgpsp->wn, (long) tgpsp->sec / SECSPERDAY,
+ (long) tgpsp->sec % SECSPERDAY, (long) tgpsp->tick);
*buffpp += strlen(*buffpp);
}
@@ -293,19 +296,19 @@ get_mbg_cfgh(
)
{
int i;
-
- cfghp->csum = get_lsb_short(buffpp);
- cfghp->valid = get_lsb_short(buffpp);
+
+ cfghp->csum = (CSUM) get_lsb_short(buffpp);
+ cfghp->valid = get_lsb_int16(buffpp);
get_mbg_tgps(buffpp, &cfghp->tot_51);
get_mbg_tgps(buffpp, &cfghp->tot_63);
get_mbg_tgps(buffpp, &cfghp->t0a);
- for (i = MIN_SVNO; i <= MAX_SVNO; i++)
+ for (i = 0; i < N_SVNO_GPS; i++)
{
get_mbg_cfg(buffpp, &cfghp->cfg[i]);
}
-
- for (i = MIN_SVNO; i <= MAX_SVNO; i++)
+
+ for (i = 0; i < N_SVNO_GPS; i++)
{
get_mbg_health(buffpp, &cfghp->health[i]);
}
@@ -317,23 +320,23 @@ get_mbg_utc(
UTC *utcp
)
{
- utcp->csum = get_lsb_short(buffpp);
- utcp->valid = get_lsb_short(buffpp);
+ utcp->csum = (CSUM) get_lsb_short(buffpp);
+ utcp->valid = get_lsb_int16(buffpp);
get_mbg_tgps(buffpp, &utcp->t0t);
-
+
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A0, mbg_double) != IEEE_OK)
{
L_CLR(&utcp->A0);
}
-
+
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A1, mbg_double) != IEEE_OK)
{
L_CLR(&utcp->A1);
}
- utcp->WNlsf = get_lsb_short(buffpp);
- utcp->DNt = get_lsb_short(buffpp);
+ utcp->WNlsf = get_lsb_uint16(buffpp);
+ utcp->DNt = get_lsb_int16(buffpp);
utcp->delta_tls = *(*buffpp)++;
utcp->delta_tlsf = *(*buffpp)++;
}
@@ -345,7 +348,7 @@ get_mbg_lla(
)
{
int i;
-
+
for (i = LAT; i <= ALT; i++)
{
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &lla[i], mbg_double) != IEEE_OK)
@@ -367,7 +370,7 @@ get_mbg_xyz(
)
{
int i;
-
+
for (i = XP; i <= ZP; i++)
{
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &xyz[i], mbg_double) != IEEE_OK)
@@ -384,13 +387,13 @@ get_mbg_comparam(
)
{
size_t i;
-
+
comparamp->baud_rate = get_lsb_long(buffpp);
for (i = 0; i < sizeof(comparamp->framing); i++)
{
comparamp->framing[i] = *(*buffpp)++;
}
- comparamp->handshake = get_lsb_short(buffpp);
+ comparamp->handshake = get_lsb_int16(buffpp);
}
void
@@ -400,12 +403,12 @@ get_mbg_portparam(
)
{
int i;
-
- for (i = 0; i < N_COM; i++)
+
+ for (i = 0; i < DEFAULT_N_COM; i++)
{
get_mbg_comparam(buffpp, &portparamp->com[i]);
}
- for (i = 0; i < N_COM; i++)
+ for (i = 0; i < DEFAULT_N_COM; i++)
{
portparamp->mode[i] = *(*buffpp)++;
}
@@ -416,20 +419,20 @@ get_mbg_portparam(
{ \
L_CLR(addr); \
}
-
+
void
get_mbg_eph(
unsigned char ** buffpp,
EPH *ephp
)
{
- ephp->csum = get_lsb_short(buffpp);
- ephp->valid = get_lsb_short(buffpp);
-
- ephp->health = get_lsb_short(buffpp);
- ephp->IODC = get_lsb_short(buffpp);
- ephp->IODE2 = get_lsb_short(buffpp);
- ephp->IODE3 = get_lsb_short(buffpp);
+ ephp->csum = (CSUM) get_lsb_short(buffpp);
+ ephp->valid = get_lsb_int16(buffpp);
+
+ ephp->health = (HEALTH) get_lsb_short(buffpp);
+ ephp->IODC = (IOD) get_lsb_short(buffpp);
+ ephp->IODE2 = (IOD) get_lsb_short(buffpp);
+ ephp->IODE3 = (IOD) get_lsb_short(buffpp);
get_mbg_tgps(buffpp, &ephp->tt);
get_mbg_tgps(buffpp, &ephp->t0c);
@@ -456,7 +459,7 @@ get_mbg_eph(
FETCH_DOUBLE(buffpp, &ephp->af2);
FETCH_DOUBLE(buffpp, &ephp->tgd);
- ephp->URA = get_lsb_short(buffpp);
+ ephp->URA = get_lsb_uint16(buffpp);
ephp->L2code = *(*buffpp)++;
ephp->L2flag = *(*buffpp)++;
@@ -468,10 +471,10 @@ get_mbg_alm(
ALM *almp
)
{
- almp->csum = get_lsb_short(buffpp);
- almp->valid = get_lsb_short(buffpp);
-
- almp->health = get_lsb_short(buffpp);
+ almp->csum = (CSUM) get_lsb_short(buffpp);
+ almp->valid = get_lsb_int16(buffpp);
+
+ almp->health = (HEALTH) get_lsb_short(buffpp);
get_mbg_tgps(buffpp, &almp->t0a);
@@ -493,8 +496,8 @@ get_mbg_iono(
IONO *ionop
)
{
- ionop->csum = get_lsb_short(buffpp);
- ionop->valid = get_lsb_short(buffpp);
+ ionop->csum = (CSUM) get_lsb_short(buffpp);
+ ionop->valid = get_lsb_int16(buffpp);
FETCH_DOUBLE(buffpp, &ionop->alpha_0);
FETCH_DOUBLE(buffpp, &ionop->alpha_1);
diff --git a/libparse/gpstolfp.c b/libparse/gpstolfp.c
index 5354dd3223aa..c162429ed92a 100644
--- a/libparse/gpstolfp.c
+++ b/libparse/gpstolfp.c
@@ -34,10 +34,8 @@
*/
#include <config.h>
#include "ntp_fp.h"
-
-#define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */
-#define SECSPERWEEK (unsigned)(604800) /* seconds per week - GPS tells us about weeks */
-#define GPSWRAP 990 /* assume week count less than this in the previous epoch */
+#include "ntp_calendar.h"
+#include "parse.h"
void
gpstolfp(
@@ -49,10 +47,10 @@ gpstolfp(
{
if (weeks < GPSWRAP)
{
- weeks += 1024;
+ weeks += GPSWEEKS;
}
- lfp->l_ui = weeks * SECSPERWEEK + days * 86400 + seconds + GPSORIGIN; /* convert to NTP time */
+ lfp->l_ui = (uint32_t)(weeks * SECSPERWEEK + days * SECSPERDAY + seconds + GPSORIGIN); /* convert to NTP time */
lfp->l_uf = 0;
}
diff --git a/libparse/parse.c b/libparse/parse.c
index 85e5299cb195..9e663f911f74 100644
--- a/libparse/parse.c
+++ b/libparse/parse.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/ntp4-dev/libparse/parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_20050806_A
- *
+ *
* parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_20050806_A
*
* Parser module for reference clock
@@ -12,7 +12,7 @@
* when PARSEKERNEL is not defined NTP time stamps will be used.
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -106,7 +106,7 @@ Strcmp(
while (!(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
@@ -154,10 +154,10 @@ parse_ioinit(
)
{
parseprintf(DD_PARSE, ("parse_iostart\n"));
-
+
parseio->parse_plen = 0;
parseio->parse_pdata = (void *)0;
-
+
parseio->parse_data = 0;
parseio->parse_ldata = 0;
parseio->parse_dsize = 0;
@@ -166,7 +166,7 @@ parse_ioinit(
parseio->parse_ioflags = PARSE_IO_CS7; /* usual unix default */
parseio->parse_index = 0;
parseio->parse_ldsize = 0;
-
+
return 1;
}
@@ -188,15 +188,15 @@ parse_ioend(
unsigned int
parse_restart(
parse_t *parseio,
- unsigned int ch
+ char ch
)
{
unsigned int updated = PARSE_INP_SKIP;
-
+
/*
* re-start packet - timeout - overflow - start symbol
*/
-
+
if (parseio->parse_index)
{
/*
@@ -208,17 +208,17 @@ parse_restart(
parseio->parse_ldsize = parseio->parse_index;
updated = PARSE_INP_TIME;
}
-
+
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseprintf(DD_PARSE, ("parse: parse_restart: buffer start (updated = %x)\n", updated));
return updated;
}
-
+
unsigned int
parse_addchar(
parse_t *parseio,
- unsigned int ch
+ char ch
)
{
/*
@@ -239,7 +239,7 @@ parse_addchar(
*/
return parse_restart(parseio, ch);
}
-
+
unsigned int
parse_end(
parse_t *parseio
@@ -260,11 +260,11 @@ parse_end(
int
parse_ioread(
register parse_t *parseio,
- register unsigned int ch,
+ register char ch,
register timestamp_t *tstamp
)
{
- register unsigned updated = CVT_NONE;
+ register u_int updated = CVT_NONE;
/*
* within STREAMS CSx (x < 8) chars still have the upper bits set
* so we normalize the characters by masking unecessary bits off.
@@ -282,9 +282,9 @@ parse_ioread(
case PARSE_IO_CS7:
ch &= 0x7F;
break;
-
+
case PARSE_IO_CS8:
- ch &= 0xFF;
+ ch &= (char) 0xFFU;
break;
}
@@ -306,18 +306,18 @@ parse_ioread(
{
updated = CVT_OK;
}
-
+
if (input_status & PARSE_INP_TIME) /* time sample is available */
{
- updated = timepacket(parseio);
+ updated = (u_int) timepacket(parseio);
}
-
+
if (input_status & PARSE_INP_DATA) /* got additional data */
{
updated |= CVT_ADDITIONAL;
}
}
-
+
/*
* remember last character time
@@ -353,7 +353,7 @@ parse_iopps(
register timestamp_t *ptime
)
{
- register unsigned updated = CVT_NONE;
+ register u_int updated = CVT_NONE;
/*
* PPS pulse information will only be delivered to ONE clock format
@@ -364,7 +364,7 @@ parse_iopps(
if (clockformats[parseio->parse_lformat]->syncpps)
{
- updated = clockformats[parseio->parse_lformat]->syncpps(parseio, status == SYNC_ONE, ptime);
+ updated = (u_int) clockformats[parseio->parse_lformat]->syncpps(parseio, status == SYNC_ONE, ptime);
parseprintf(DD_PARSE, ("parse_iopps: updated = 0x%x\n", updated));
}
@@ -403,13 +403,13 @@ parse_to_unixtime(
)
{
#define SETRTC(_X_) { if (cvtrtc) *cvtrtc = (_X_); }
- static int days_of_month[] =
+ static int days_of_month[] =
{
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
register int i;
time_t t;
-
+
if (clock_time->utctime)
return clock_time->utctime; /* if the conversion routine gets it right away - why not */
@@ -423,12 +423,12 @@ parse_to_unixtime(
SETRTC(CVT_FAIL|CVT_BADDATE);
return -1;
}
-
+
/*
* sorry, slow section here - but it's not time critical anyway
*/
t = julian0(clock_time->year) - julian0(1970); /* Y2kFixes */
- /* month */
+ /* month */
if (clock_time->month <= 0 || clock_time->month > 12)
{
SETRTC(CVT_FAIL|CVT_BADDATE);
@@ -466,7 +466,7 @@ parse_to_unixtime(
t = TIMES24(t) + clock_time->hour;
- /* min */
+ /* min */
if (clock_time->minute < 0 || clock_time->minute > 59)
{
SETRTC(CVT_FAIL|CVT_BADTIME);
@@ -475,7 +475,7 @@ parse_to_unixtime(
t = TIMES60(t) + clock_time->minute;
/* sec */
-
+
if (clock_time->second < 0 || clock_time->second > 60) /* allow for LEAPs */
{
SETRTC(CVT_FAIL|CVT_BADTIME);
@@ -510,7 +510,7 @@ Stoi(
while(*s == ' ')
s++;
-
+
if (*s == '-')
{
s++;
@@ -519,7 +519,7 @@ Stoi(
else
if (*s == '+')
s++;
-
+
for(;;)
{
c = *s++;
@@ -573,16 +573,16 @@ updatetimeinfo(
{
int s = splhigh();
#endif
-
+
parseio->parse_lstate = parseio->parse_dtime.parse_state | flags | PARSEB_TIMECODE;
-
+
parseio->parse_dtime.parse_state = parseio->parse_lstate;
#ifdef PARSEKERNEL
(void)splx((unsigned int)s);
}
#endif
-
+
#ifdef PARSEKERNEL
parseprintf(DD_PARSE, ("updatetimeinfo status=0x%x, time=%x\n", parseio->parse_dtime.parse_state,
@@ -591,7 +591,7 @@ updatetimeinfo(
parseprintf(DD_PARSE, ("updatetimeinfo status=0x%lx, time=%x\n", (long)parseio->parse_dtime.parse_state,
parseio->parse_dtime.parse_time.fp.l_ui));
#endif
-
+
return CVT_OK; /* everything fine and dandy... */
}
@@ -614,7 +614,7 @@ syn_simple(
}
/*
- * pps_simple
+ * parse_pps_fnc_t pps_simple
*
* handle a pps time stamp
*/
@@ -628,12 +628,12 @@ pps_simple(
{
parseio->parse_dtime.parse_ptime = *ptime;
parseio->parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
-
+
return CVT_NONE;
}
/*
- * pps_one
+ * parse_pps_fnc_t pps_one
*
* handle a pps time stamp in ONE edge
*/
@@ -647,12 +647,12 @@ pps_one(
{
if (status)
return pps_simple(parseio, status, ptime);
-
+
return CVT_NONE;
}
/*
- * pps_zero
+ * parse_pps_fnc_t pps_zero
*
* handle a pps time stamp in ZERO edge
*/
@@ -666,7 +666,7 @@ pps_zero(
{
if (!status)
return pps_simple(parseio, status, ptime);
-
+
return CVT_NONE;
}
@@ -684,13 +684,13 @@ timepacket(
register time_t t;
u_long cvtrtc; /* current conversion result */
clocktime_t clock_time;
-
+
memset((char *)&clock_time, 0, sizeof clock_time);
format = parseio->parse_lformat;
if (format == (unsigned short)~0)
return CVT_NONE;
-
+
switch ((cvtrtc = clockformats[format]->convert ?
clockformats[format]->convert((unsigned char *)parseio->parse_ldata, parseio->parse_ldsize, (struct format *)(clockformats[format]->data), &clock_time, parseio->parse_pdata) :
CVT_NONE) & CVT_MASK)
@@ -698,17 +698,17 @@ timepacket(
case CVT_FAIL:
parseio->parse_badformat++;
break;
-
+
case CVT_NONE:
/*
* too bad - pretend bad format
*/
parseio->parse_badformat++;
break;
-
+
case CVT_OK:
break;
-
+
case CVT_SKIP:
return CVT_NONE;
@@ -716,7 +716,7 @@ timepacket(
/* shouldn't happen */
#ifndef PARSEKERNEL
msyslog(LOG_WARNING, "parse: INTERNAL error: bad return code of convert routine \"%s\"", clockformats[format]->name);
-#endif
+#endif
return CVT_FAIL|cvtrtc;
}
@@ -724,7 +724,7 @@ timepacket(
{
return CVT_FAIL|cvtrtc;
}
-
+
/*
* time stamp
*/
@@ -732,7 +732,7 @@ timepacket(
parseio->parse_dtime.parse_time.tv.tv_sec = t;
parseio->parse_dtime.parse_time.tv.tv_usec = clock_time.usecond;
#else
- parseio->parse_dtime.parse_time.fp.l_ui = t + JAN_1970;
+ parseio->parse_dtime.parse_time.fp.l_ui = (uint32_t) (t + JAN_1970);
TVUTOTSF(clock_time.usecond, parseio->parse_dtime.parse_time.fp.l_uf);
#endif
@@ -758,7 +758,7 @@ parse_timecode(
*/
dct->parsegettc.parse_badformat = parse->parse_badformat;
parse->parse_badformat = 0;
-
+
if (parse->parse_ldsize <= PARSE_TCMAX)
{
dct->parsegettc.parse_count = parse->parse_ldsize;
@@ -771,7 +771,7 @@ parse_timecode(
}
}
-
+
/*ARGSUSED*/
int
parse_setfmt(
@@ -792,7 +792,7 @@ parse_setfmt(
if (parse->parse_pdata)
FREE(parse->parse_pdata, parse->parse_plen);
parse->parse_pdata = 0;
-
+
parse->parse_plen = clockformats[i]->plen;
if (parse->parse_plen)
@@ -809,9 +809,9 @@ parse_setfmt(
if (parse->parse_data)
FREE(parse->parse_data, (unsigned)(parse->parse_dsize * 2 + 2));
parse->parse_ldata = parse->parse_data = 0;
-
+
parse->parse_dsize = clockformats[i]->length;
-
+
if (parse->parse_dsize)
{
parse->parse_data = (char*)MALLOC((unsigned)(parse->parse_dsize * 2 + 2));
@@ -820,20 +820,20 @@ parse_setfmt(
if (parse->parse_pdata)
FREE(parse->parse_pdata, parse->parse_plen);
parse->parse_pdata = 0;
-
+
parseprintf(DD_PARSE, ("init failed: malloc for data area failed\n"));
return 0;
}
}
-
+
/*
* leave room for '\0'
*/
parse->parse_ldata = parse->parse_data + parse->parse_dsize + 1;
-
+
parse->parse_lformat = i;
-
+
return 1;
}
}
@@ -852,7 +852,7 @@ parse_getfmt(
if (dct->parseformat.parse_format < nformats &&
Strlen(clockformats[dct->parseformat.parse_format]->name) <= PARSE_TCMAX)
{
- dct->parseformat.parse_count = Strlen(clockformats[dct->parseformat.parse_format]->name)+1;
+ dct->parseformat.parse_count = (unsigned short) (Strlen(clockformats[dct->parseformat.parse_format]->name) + 1);
memcpy(dct->parseformat.parse_buffer, clockformats[dct->parseformat.parse_format]->name, dct->parseformat.parse_count);
return 1;
}
@@ -870,7 +870,7 @@ parse_setcs(
)
{
parse->parse_ioflags &= ~PARSE_IO_CSIZE;
- parse->parse_ioflags |= dct->parsesetcs.parse_cs & PARSE_IO_CSIZE;
+ parse->parse_ioflags |= (int) (dct->parsesetcs.parse_cs & PARSE_IO_CSIZE);
return 1;
}
diff --git a/libparse/parse_conf.c b/libparse/parse_conf.c
index b7234dd419b7..37871c9de887 100644
--- a/libparse/parse_conf.c
+++ b/libparse/parse_conf.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/ntp4-dev/libparse/parse_conf.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* parse_conf.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* Parser configuration module for reference clocks
@@ -12,7 +12,7 @@
* when STREAM is not defined NTP time stamps will be used.
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/libparse/parsesolaris.c b/libparse/parsesolaris.c
index d3756af882a3..8c91257b4482 100644
--- a/libparse/parsesolaris.c
+++ b/libparse/parsesolaris.c
@@ -1,12 +1,12 @@
/*
* /src/NTP/ntp4-dev/libparse/parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* STREAMS module for reference clocks
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -74,7 +74,7 @@ static struct fmodsw fmod_templ =
extern struct mod_ops mod_strmodops;
-static struct modlstrmod modlstrmod =
+static struct modlstrmod modlstrmod =
{
&mod_strmodops, /* a STREAMS module */
"PARSE - NTP reference", /* name this baby - keep room for revision number */
@@ -100,13 +100,13 @@ _init(
)
{
static char revision[] = "4.6";
- char *s, *S;
+ char *s, *S;
char *t;
-
+
#ifndef lint
t = rcsid;
#endif
-
+
/*
* copy RCS revision into Drv_name
*
@@ -125,20 +125,20 @@ _init(
}
if (*s == ' ') s++;
}
-
- t = modlstrmod.strmod_linkinfo;
+
+ t = modlstrmod.strmod_linkinfo;
while (*t && (*t != ' '))
{
t++;
}
if (*t == ' ') t++;
-
+
S = s;
while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
{
S++;
}
-
+
if (*s && *t && (S > s))
{
if (strlen(t) >= (S - s))
@@ -308,7 +308,7 @@ setup_stream(
}
else
{
- pprintf(DD_OPEN, "parse: setup_stream - FAILED - no MEMORY for allocb\n");
+ pprintf(DD_OPEN, "parse: setup_stream - FAILED - no MEMORY for allocb\n");
return 0;
}
}
@@ -325,18 +325,18 @@ parseopen(
{
register parsestream_t *parse;
static int notice = 0;
-
- pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q);
-
+
+ pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q);
+
if (sflag != MODOPEN)
{ /* open only for modules */
- pprintf(DD_OPEN, "parse: OPEN - FAILED - not MODOPEN\n");
+ pprintf(DD_OPEN, "parse: OPEN - FAILED - not MODOPEN\n");
return EIO;
}
if (q->q_ptr != (caddr_t)NULL)
{
- pprintf(DD_OPEN, "parse: OPEN - FAILED - EXCLUSIVE ONLY\n");
+ pprintf(DD_OPEN, "parse: OPEN - FAILED - EXCLUSIVE ONLY\n");
return EBUSY;
}
@@ -346,10 +346,10 @@ parseopen(
return ENOMEM;
}
- pprintf(DD_OPEN, "parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr);
+ pprintf(DD_OPEN, "parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr);
WR(q)->q_ptr = q->q_ptr;
- pprintf(DD_OPEN, "parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", WR(q), WR(q)->q_ptr);
-
+ pprintf(DD_OPEN, "parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", WR(q), WR(q)->q_ptr);
+
parse = (parsestream_t *) q->q_ptr;
bzero((caddr_t)parse, sizeof(*parse));
parse->parse_queue = q;
@@ -360,7 +360,7 @@ parseopen(
qprocson(q);
- pprintf(DD_OPEN, "parse: OPEN - initializing io subsystem q=%x\n", q);
+ pprintf(DD_OPEN, "parse: OPEN - initializing io subsystem q=%x\n", q);
if (!parse_ioinit(&parse->parse_io))
{
@@ -374,12 +374,12 @@ parseopen(
return EIO;
}
- pprintf(DD_OPEN, "parse: OPEN - initializing stream q=%x\n", q);
+ pprintf(DD_OPEN, "parse: OPEN - initializing stream q=%x\n", q);
if (setup_stream(q, M_PARSE))
{
(void) init_linemon(q); /* hook up PPS ISR routines if possible */
- pprintf(DD_OPEN, "parse: OPEN - SUCCEEDED\n");
+ pprintf(DD_OPEN, "parse: OPEN - SUCCEEDED\n");
/*
* I know that you know the delete key, but you didn't write this
@@ -412,19 +412,19 @@ parseclose(
{
register parsestream_t *parse = (parsestream_t *)q->q_ptr;
register unsigned long s;
-
+
pprintf(DD_CLOSE, "parse: CLOSE\n");
-
+
qprocsoff(q);
s = splhigh();
-
+
if (parse->parse_dqueue)
close_linemon(parse->parse_dqueue, q);
parse->parse_dqueue = (queue_t *)0;
(void) splx(s);
-
+
parse_ioend(&parse->parse_io);
kmem_free((caddr_t)parse, sizeof(parsestream_t));
@@ -444,7 +444,7 @@ parsersvc(
)
{
mblk_t *mp;
-
+
while ((mp = getq(q)))
{
if (canputnext(q) || (mp->b_datap->db_type > QPCTL))
@@ -477,15 +477,15 @@ parsewput(
register mblk_t *datap;
register struct iocblk *iocp;
parsestream_t *parse = (parsestream_t *)q->q_ptr;
-
+
pprintf(DD_WPUT, "parse: parsewput\n");
-
+
switch (mp->b_datap->db_type)
{
default:
putnext(q, mp);
break;
-
+
case M_IOCTL:
iocp = (void *)mp->b_rptr;
switch (iocp->ioc_cmd)
@@ -519,7 +519,7 @@ parsewput(
iocp->ioc_count = sizeof(struct ppsclockev);
qreply(q, mp);
break;
-
+
case PARSEIOC_ENABLE:
case PARSEIOC_DISABLE:
{
@@ -537,7 +537,7 @@ parsewput(
}
qreply(q, mp);
break;
- }
+ }
case PARSEIOC_TIMECODE:
case PARSEIOC_SETFMT:
@@ -553,7 +553,7 @@ parsewput(
pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_TIMECODE\n");
ok = parse_timecode(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_SETFMT:
pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_SETFMT\n");
ok = parse_setfmt(dct, &parse->parse_io);
@@ -600,7 +600,7 @@ rdchar(
else
{
register mblk_t *mmp = *mp;
-
+
*mp = (*mp)->b_cont;
freeb(mmp);
}
@@ -619,7 +619,7 @@ parserput(
{
register unsigned char type;
mblk_t *mp = imp;
-
+
switch (type = mp->b_datap->db_type)
{
default:
@@ -636,7 +636,7 @@ parserput(
else
putq(q, mp);
break;
-
+
case M_BREAK:
case M_DATA:
{
@@ -691,7 +691,7 @@ parserput(
if (nmp) freemsg(nmp);
parse_iodone(&parse->parse_io);
}
- }
+ }
}
else
{
@@ -733,7 +733,7 @@ parserput(
gethrestime(&hres_time);
c_time.tv.tv_sec = hres_time.tv_sec;
c_time.tv.tv_usec = hres_time.tv_nsec / 1000;
-
+
pprintf(DD_RPUT, "parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN");
if ((parse->parse_status & PARSE_ENABLE) &&
@@ -758,7 +758,7 @@ parserput(
}
else
putq(q, mp);
-
+
if (status)
{
parse->parse_ppsclockev.tv = c_time.tv;
@@ -780,7 +780,7 @@ init_linemon(
)
{
register queue_t *dq;
-
+
dq = WR(q);
/*
* we ARE doing very bad things down here (basically stealing ISR
@@ -916,14 +916,14 @@ init_zs_linemon(
szs->zsops.zsop_xsint = (void (*) (struct zscom *))zs_xsisr; /* place our bastard */
szs->oldzsops = zs->zs_ops;
emergencyzs = zs->zs_ops;
-
+
zs->zs_ops = &szs->zsops; /* hook it up */
/*
- * XXX: this is usually done via zsopinit()
+ * XXX: this is usually done via zsopinit()
* - have yet to find a way to call that routine
*/
zs->zs_xsint = (void (*) (struct zscom *))zs_xsisr;
-
+
mutex_exit(zs->zs_excl);
pprintf(DD_INSTALL, "init_zs_linemon: CD monitor installed\n");
@@ -934,7 +934,7 @@ init_zs_linemon(
}
/*
- * unregister our ISR routine - must call under splhigh() (or
+ * unregister our ISR routine - must call under splhigh() (or
* whatever block ZS status interrupts)
*/
static void
@@ -970,7 +970,7 @@ close_zs_linemon(
mutex_exit(zs->zs_excl);
kmem_free((caddr_t)szs, sizeof (struct savedzsops));
-
+
pprintf(DD_INSTALL, "close_zs_linemon: CD monitor deleted\n");
return;
}
@@ -1005,7 +1005,7 @@ zs_xsisr(
{
timestamp_t cdevent;
register int status;
-
+
/*
* time stamp
*/
@@ -1024,7 +1024,7 @@ zs_xsisr(
* ok - now the hard part - find ourself
*/
loopcheck = MAXDEPTH;
-
+
while (q)
{
if (q->q_qinfo && q->q_qinfo->qi_minfo)
@@ -1052,7 +1052,7 @@ zs_xsisr(
*/
parse_iodone(&((parsestream_t *)q->q_ptr)->parse_io);
}
-
+
if (status)
{
((parsestream_t *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
@@ -1091,9 +1091,9 @@ zs_xsisr(
SCC_WRITE0(ZSWR0_RESET_STATUS); /* might kill other conditions here */
return;
}
- }
+ }
- pprintf(DD_ISR, "zs_xsisr: non CD event 0x%x for \"%s\"\n",
+ pprintf(DD_ISR, "zs_xsisr: non CD event 0x%x for \"%s\"\n",
(za->za_rr0 ^ zsstatus) & ~ZSRR0_CD,dname);
/*
* we are now gathered here to process some unusual external status
@@ -1108,7 +1108,7 @@ zs_xsisr(
q = za->za_ttycommon.t_readq;
loopcheck = MAXDEPTH;
-
+
/*
* the real thing for everything else ...
*/
@@ -1120,7 +1120,7 @@ zs_xsisr(
if (!strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
{
register void (*zsisr) (struct zscom *);
-
+
/*
* back home - phew (hopping along stream queues might
* prove dangerous to your health)
@@ -1129,7 +1129,7 @@ zs_xsisr(
zsisr(zs);
else
panic("zs_xsisr: unable to locate original ISR");
-
+
pprintf(DD_ISR, "zs_xsisr: non CD event was processed for \"%s\"\n", dname);
/*
* now back to our program ...
@@ -1151,7 +1151,7 @@ zs_xsisr(
* corrupted TTY structures
*/
printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
-
+
if (emergencyzs && emergencyzs->zsop_xsint)
emergencyzs->zsop_xsint(zs);
else
diff --git a/libparse/parsestreams.c b/libparse/parsestreams.c
index 3fb4cc3511aa..6cd9d8ff904e 100644
--- a/libparse/parsestreams.c
+++ b/libparse/parsestreams.c
@@ -1,13 +1,13 @@
/*
* /src/NTP/ntp4-dev/libparse/parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* STREAMS module for reference clocks
* (SunOS4.x)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -110,7 +110,7 @@ static char mnam[] = "PARSEPPS "; /* name this baby - keep room for revision
#else
static char mnam[] = "PARSE "; /* name this baby - keep room for revision number */
#endif
-struct vdldrv parsesync_vd =
+struct vdldrv parsesync_vd =
{
VDMAGIC_PSEUDO, /* nothing like a real driver - a STREAMS module */
mnam,
@@ -166,7 +166,7 @@ Strcmp(
while (!(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
@@ -186,10 +186,10 @@ Strncmp(
while (n-- && !(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
-
+
void
ntp_memset(
char *a,
@@ -217,12 +217,12 @@ xxxinit(
{
extern struct fmodsw fmodsw[];
extern int fmodcnt;
-
+
struct fmodsw *fm = fmodsw;
struct fmodsw *fmend = &fmodsw[fmodcnt];
struct fmodsw *ifm = (struct fmodsw *)0;
char *mname = parseinfo.st_rdinit->qi_minfo->mi_idname;
-
+
switch (fc)
{
case VDLOAD:
@@ -233,13 +233,13 @@ xxxinit(
*/
while (fm <= fmend)
{
- if (!Strncmp(fm->f_name, mname, FMNAMESZ))
+ if (!Strncmp(fm->f_name, mname, FMNAMESZ))
{
printf("vddrinit[%s]: STREAMS module already loaded.\n", mname);
return(EBUSY);
}
else
- if ((ifm == (struct fmodsw *)0) &&
+ if ((ifm == (struct fmodsw *)0) &&
(fm->f_name[0] == '\0') &&
(fm->f_str == (struct streamtab *)0))
{
@@ -261,7 +261,7 @@ xxxinit(
{
static char revision[] = "4.7";
char *s, *S, *t;
-
+
s = rcsid; /* NOOP - keep compilers happy */
Strncpy(ifm->f_name, mname, FMNAMESZ);
@@ -285,20 +285,20 @@ xxxinit(
}
if (*s == ' ') s++;
}
-
- t = parsesync_vd.Drv_name;
+
+ t = parsesync_vd.Drv_name;
while (*t && (*t != ' '))
{
t++;
}
if (*t == ' ') t++;
-
+
S = s;
while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
{
S++;
}
-
+
if (*s && *t && (S > s))
{
if (Strlen(t) >= (S - s))
@@ -307,9 +307,9 @@ xxxinit(
}
}
return (0);
- }
+ }
break;
-
+
case VDUNLOAD:
if (parsebusy > 0)
{
@@ -328,7 +328,7 @@ xxxinit(
fm->f_name[0] = '\0';
fm->f_str = (struct streamtab *)0;
fm++;
-
+
break;
}
fm++;
@@ -341,14 +341,14 @@ xxxinit(
else
return (0);
}
-
+
case VDSTAT:
return (0);
default:
return (EIO);
-
+
}
return EIO;
}
@@ -460,7 +460,7 @@ setup_stream(
}
else
{
- parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
+ parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
return 0;
}
}
@@ -476,37 +476,37 @@ parseopen(
{
register parsestream_t *parse;
static int notice = 0;
-
- parseprintf(DD_OPEN,("parse: OPEN\n"));
-
+
+ parseprintf(DD_OPEN,("parse: OPEN\n"));
+
if (sflag != MODOPEN)
{ /* open only for modules */
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
return OPENFAIL;
}
if (q->q_ptr != (caddr_t)NULL)
{
u.u_error = EBUSY;
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
return OPENFAIL;
}
#ifdef VDDRV
parsebusy++;
#endif
-
+
q->q_ptr = (caddr_t)kmem_alloc(sizeof(parsestream_t));
if (q->q_ptr == (caddr_t)0)
{
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - no memory\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - no memory\n"));
#ifdef VDDRV
parsebusy--;
#endif
return OPENFAIL;
}
WR(q)->q_ptr = q->q_ptr;
-
+
parse = (parsestream_t *)(void *)q->q_ptr;
bzero((caddr_t)parse, sizeof(*parse));
parse->parse_queue = q;
@@ -531,7 +531,7 @@ parseopen(
{
(void) init_linemon(q); /* hook up PPS ISR routines if possible */
- parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
/*
* I know that you know the delete key, but you didn't write this
@@ -569,17 +569,17 @@ parseclose(
{
register parsestream_t *parse = (parsestream_t *)(void *)q->q_ptr;
register unsigned long s;
-
+
parseprintf(DD_CLOSE,("parse: CLOSE\n"));
-
+
s = splhigh();
-
+
if (parse->parse_dqueue)
close_linemon(parse->parse_dqueue, q);
parse->parse_dqueue = (queue_t *)0;
(void) splx(s);
-
+
parse_ioend(&parse->parse_io);
kmem_free((caddr_t)parse, sizeof(parsestream_t));
@@ -602,7 +602,7 @@ parsersvc(
)
{
mblk_t *mp;
-
+
while ((mp = getq(q)))
{
if (canput(q->q_next) || (mp->b_datap->db_type > QPCTL))
@@ -635,15 +635,15 @@ parsewput(
register mblk_t *datap;
register struct iocblk *iocp;
parsestream_t *parse = (parsestream_t *)(void *)q->q_ptr;
-
+
parseprintf(DD_WPUT,("parse: parsewput\n"));
-
+
switch (mp->b_datap->db_type)
{
default:
putnext(q, mp);
break;
-
+
case M_IOCTL:
iocp = (struct iocblk *)(void *)mp->b_rptr;
switch (iocp->ioc_cmd)
@@ -676,7 +676,7 @@ parsewput(
iocp->ioc_count = sizeof(struct ppsclockev);
qreply(q, mp);
break;
-
+
case PARSEIOC_ENABLE:
case PARSEIOC_DISABLE:
{
@@ -694,7 +694,7 @@ parsewput(
}
qreply(q, mp);
break;
- }
+ }
case PARSEIOC_TIMECODE:
case PARSEIOC_SETFMT:
@@ -710,7 +710,7 @@ parsewput(
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_TIMECODE\n"));
ok = parse_timecode(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_SETFMT:
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_SETFMT\n"));
ok = parse_setfmt(dct, &parse->parse_io);
@@ -757,7 +757,7 @@ rdchar(
else
{
register mblk_t *mmp = *mp;
-
+
*mp = (*mp)->b_cont;
freeb(mmp);
}
@@ -775,7 +775,7 @@ parserput(
)
{
unsigned char type;
-
+
switch (type = mp->b_datap->db_type)
{
default:
@@ -791,7 +791,7 @@ parserput(
else
putq(q, mp);
break;
-
+
case M_BREAK:
case M_DATA:
{
@@ -844,7 +844,7 @@ parserput(
if (nmp) freemsg(nmp);
parse_iodone(&parse->parse_io);
}
- }
+ }
}
else
{
@@ -883,7 +883,7 @@ parserput(
register int status = cd_invert ^ (type == M_UNHANGUP);
uniqtime(&ctime.tv);
-
+
parseprintf(DD_RPUT,("parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN"));
if ((parse->parse_status & PARSE_ENABLE) &&
@@ -908,7 +908,7 @@ parserput(
}
else
putq(q, mp);
-
+
if (status)
{
parse->parse_ppsclockev.tv = ctime.tv;
@@ -930,7 +930,7 @@ init_linemon(
)
{
register queue_t *dq;
-
+
dq = WR(q);
/*
* we ARE doing very bad things down here (basically stealing ISR
@@ -1038,7 +1038,7 @@ init_zs_linemon(
else
{
unsigned long s;
-
+
/*
* we do a direct replacement, in case others fiddle also
* if somebody else grabs our hook and we disconnect
@@ -1064,9 +1064,9 @@ init_zs_linemon(
szs->zsops.zsop_xsint = zs_xsisr; /* place our bastard */
szs->oldzsops = zs->zs_ops;
emergencyzs = zs->zs_ops;
-
+
zsopinit(zs, &szs->zsops); /* hook it up */
-
+
(void) splx(s);
parseprintf(DD_INSTALL, ("init_zs_linemon: CD monitor installed\n"));
@@ -1099,11 +1099,11 @@ close_zs_linemon(
else
{
register struct savedzsops *szs = (struct savedzsops *)parsestream->parse_data;
-
+
zsopinit(zs, szs->oldzsops); /* reset to previous handler functions */
kmem_free((caddr_t)szs, sizeof (struct savedzsops));
-
+
parseprintf(DD_INSTALL, ("close_zs_linemon: CD monitor deleted\n"));
return;
}
@@ -1148,7 +1148,7 @@ zs_xsisr(
{
timestamp_t cdevent;
register int status;
-
+
za->za_rr0 = (za->za_rr0 & ~(cdmask)) | (zsstatus & (cdmask));
#ifdef PPS_SYNC
@@ -1163,7 +1163,7 @@ zs_xsisr(
* time stamp
*/
uniqtime(&cdevent.tv);
-
+
#ifdef PPS_SYNC
(void)splx(s);
#endif
@@ -1190,7 +1190,7 @@ zs_xsisr(
* ok - now the hard part - find ourself
*/
loopcheck = MAXDEPTH;
-
+
while (q)
{
if (q->q_qinfo && q->q_qinfo->qi_minfo)
@@ -1218,7 +1218,7 @@ zs_xsisr(
*/
parse_iodone(&((parsestream_t *)(void *)q->q_ptr)->parse_io);
}
-
+
if (status)
{
((parsestream_t *)(void *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
@@ -1251,13 +1251,13 @@ zs_xsisr(
zsaddr->zscc_control = ZSWR0_RESET_STATUS; /* might kill other conditions here */
return 0;
}
- }
+ }
if (zsstatus & cdmask) /* fake CARRIER status */
za->za_flags |= ZAS_CARR_ON;
else
za->za_flags &= ~ZAS_CARR_ON;
-
+
/*
* we are now gathered here to process some unusual external status
* interrupts.
@@ -1271,7 +1271,7 @@ zs_xsisr(
q = za->za_ttycommon.t_readq;
loopcheck = MAXDEPTH;
-
+
/*
* the real thing for everything else ...
*/
@@ -1283,7 +1283,7 @@ zs_xsisr(
if (!Strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
{
register int (*zsisr) (struct zscom *);
-
+
/*
* back home - phew (hopping along stream queues might
* prove dangerous to your health)
@@ -1292,7 +1292,7 @@ zs_xsisr(
return zsisr(zs);
else
panic("zs_xsisr: unable to locate original ISR");
-
+
parseprintf(DD_ISR, ("zs_xsisr: non CD event was processed for \"%s\"\n", dname));
/*
* now back to our program ...
@@ -1314,7 +1314,7 @@ zs_xsisr(
* corrupted TTY structures
*/
printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
-
+
if (emergencyzs && emergencyzs->zsop_xsint)
emergencyzs->zsop_xsint(zs);
else
diff --git a/libparse/trim_info.c b/libparse/trim_info.c
index 619e23861aef..4178209e5c01 100644
--- a/libparse/trim_info.c
+++ b/libparse/trim_info.c
@@ -6,7 +6,7 @@
* $Created: Sun Aug 2 20:20:34 1998 $
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/ntpd/Makefile.in b/ntpd/Makefile.in
index 5ba1cbf6c2ad..0eccb11c0252 100644
--- a/ntpd/Makefile.in
+++ b/ntpd/Makefile.in
@@ -52,8 +52,7 @@ subdir = ntpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -82,6 +81,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -431,6 +432,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c
index 045c0a98e233..14e86f7e87ca 100644
--- a/ntpd/cmd_args.c
+++ b/ntpd/cmd_args.c
@@ -76,6 +76,9 @@ getCmdOpts(
if (HAVE_OPT( PANICGATE ))
allow_panic = TRUE;
+ if (HAVE_OPT( FORCE_STEP_ONCE ))
+ force_step_once = TRUE;
+
#ifdef HAVE_DROPROOT
if (HAVE_OPT( JAILDIR )) {
droproot = 1;
@@ -175,14 +178,14 @@ getCmdOpts(
if (HAVE_OPT( UPDATEINTERVAL )) {
long val = OPT_VALUE_UPDATEINTERVAL;
-
+
if (val >= 0)
interface_interval = val;
else {
- fprintf(stderr,
+ fprintf(stderr,
"command line interface update interval %ld must not be negative\n",
val);
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"command line interface update interval %ld must not be negative",
val);
errflg++;
diff --git a/ntpd/invoke-ntp.conf.texi b/ntpd/invoke-ntp.conf.texi
index 23569fc52f6f..7151efb82e14 100644
--- a/ntpd/invoke-ntp.conf.texi
+++ b/ntpd/invoke-ntp.conf.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:41:59 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:25:50 AM by AutoGen 5.18.5pre4
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@@ -2482,7 +2482,7 @@ holds
the names of all peer variables and the
@code{clock_var_list}
holds the names of the reference clock variables.
-@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{srep} | @code{stepout} @kbd{stepout}]}
+@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{step} | @code{stepback} @kbd{stepback} | @code{stepfwd} @kbd{stepfwd} | @code{stepout} @kbd{stepout}]}
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@@ -2539,6 +2539,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+@item @code{stepback} @kbd{stepback}
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+@item @code{stepfwd} @kbd{stepfwd}
+As for stepback, but for the forward direction.
@item @code{stepout} @kbd{stepout}
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/invoke-ntp.keys.texi b/ntpd/invoke-ntp.keys.texi
index dbafe1c733e9..b0d494040e79 100644
--- a/ntpd/invoke-ntp.keys.texi
+++ b/ntpd/invoke-ntp.keys.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:42:02 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:25:52 AM by AutoGen 5.18.5pre4
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
diff --git a/ntpd/invoke-ntpd.texi b/ntpd/invoke-ntpd.texi
index 75a525702309..b6c69db8a1da 100644
--- a/ntpd/invoke-ntpd.texi
+++ b/ntpd/invoke-ntpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:42:04 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:25:54 AM by AutoGen 5.18.5pre4
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -95,6 +95,7 @@ This software is released under the NTP license, <http://ntp.org/license>.
* ntpd configfile:: configfile option (-c)
* ntpd driftfile:: driftfile option (-f)
* ntpd panicgate:: panicgate option (-g)
+* ntpd force-step-once:: force-step-once option (-G)
* ntpd jaildir:: jaildir option (-i)
* ntpd interface:: interface option (-I)
* ntpd keyfile:: keyfile option (-k)
@@ -141,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.8p1
+ntpd - NTP daemon program - Ver. 4.2.8p2
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
@@ -162,6 +163,7 @@ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-f Str driftfile frequency drift file name
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
+ -G no force-step-once Step any initial offset correction.
-i Str jaildir Jail directory
-I Str interface Listen on an interface name or address
- may appear multiple times
@@ -298,7 +300,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
@code{driftfile} @kbd{driftfile}
-configuration specification in the
+configuration specification in the
@file{/etc/ntp.conf}
file.
@node ntpd panicgate
@@ -326,6 +328,21 @@ options.
See the
@code{tinker}
configuration file directive for other options.
+@node ntpd force-step-once
+@subsection force-step-once option (-G)
+@cindex ntpd-force-step-once
+
+This is the ``step any initial offset correction.'' option.
+Normally,
+@code{ntpd}
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the @code{tinker} configuration file directive for other options.
@node ntpd jaildir
@subsection jaildir option (-i)
@cindex ntpd-jaildir
@@ -370,7 +387,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-@code{interface} command, which is more versatile.
+@code{interface} command, which is more versatile.
@node ntpd keyfile
@subsection keyfile option (-k)
@cindex ntpd-keyfile
diff --git a/ntpd/keyword-gen-utd b/ntpd/keyword-gen-utd
index 0485feecca0c..b9b59bd4739f 100644
--- a/ntpd/keyword-gen-utd
+++ b/ntpd/keyword-gen-utd
@@ -1 +1 @@
- * Generated 2015-01-03 23:51:10 UTC diff_ignore_line
+ * Generated 2015-03-16 09:05:44 UTC diff_ignore_line
diff --git a/ntpd/keyword-gen.c b/ntpd/keyword-gen.c
index bb593aba2e20..5872e2a5cc1f 100644
--- a/ntpd/keyword-gen.c
+++ b/ntpd/keyword-gen.c
@@ -206,6 +206,8 @@ struct key_tok ntp_keywords[] = {
{ "filenum", T_Filenum, FOLLBY_TOKEN },
/* tinker_option */
{ "step", T_Step, FOLLBY_TOKEN },
+{ "stepback", T_Stepback, FOLLBY_TOKEN },
+{ "stepfwd", T_Stepfwd, FOLLBY_TOKEN },
{ "panic", T_Panic, FOLLBY_TOKEN },
{ "dispersion", T_Dispersion, FOLLBY_TOKEN },
{ "stepout", T_Stepout, FOLLBY_TOKEN },
diff --git a/ntpd/ntp.conf.5man b/ntpd/ntp.conf.5man
index 1e9ba668fe4d..f1ed4b298fd9 100644
--- a/ntpd/ntp.conf.5man
+++ b/ntpd/ntp.conf.5man
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5man "04 Feb 2015" "4.2.8p1" "File Formats"
+.TH ntp.conf 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-sPaOCn/ag-RPaGBn)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:41:46 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -2786,7 +2786,7 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
-.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
+.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@@ -2852,6 +2852,21 @@ Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.TP 7
+.NOP \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[]
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.TP 7
+.NOP \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[]
+As for stepback, but for the forward direction.
+.TP 7
.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/ntp.conf.5mdoc b/ntpd/ntp.conf.5mdoc
index 069a543cf2ea..1a52a1257c4e 100644
--- a/ntpd/ntp.conf.5mdoc
+++ b/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:07 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -2618,7 +2618,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
-.Cm step Ar srep |
+.Cm step Ar step |
+.Cm stepback Ar stepback |
+.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@@ -2678,6 +2680,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+.It Cm stepback Ar stepback
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.It Cm stepfwd Ar stepfwd
+As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/ntp.conf.def b/ntpd/ntp.conf.def
index 6f0bae12b3f5..e5c44b7565c7 100644
--- a/ntpd/ntp.conf.def
+++ b/ntpd/ntp.conf.def
@@ -2620,7 +2620,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
-.Cm step Ar srep |
+.Cm step Ar step |
+.Cm stepback Ar stepback |
+.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@@ -2680,6 +2682,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+.It Cm stepback Ar stepback
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.It Cm stepfwd Ar stepfwd
+As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/ntp.conf.html b/ntpd/ntp.conf.html
index b237cc025085..7ab25e3756f4 100644
--- a/ntpd/ntp.conf.html
+++ b/ntpd/ntp.conf.html
@@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the configuration file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.8p1 of <code>ntp.conf</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp.conf</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -2463,7 +2463,7 @@ holds
the names of all peer variables and the
<code>clock_var_list</code>
holds the names of the reference clock variables.
-<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>srep</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><dd>This command can be used to alter several system variables in
+<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>step</kbd><code> | stepback </code><kbd>stepback</kbd><code> | stepfwd </code><kbd>stepfwd</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><dd>This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
configuration file before any other configuration options.
@@ -2513,6 +2513,17 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+<br><dt><code>stepback</code> <kbd>stepback</kbd><dd>The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+<br><dt><code>stepfwd</code> <kbd>stepfwd</kbd><dd>As for stepback, but for the forward direction.
<br><dt><code>stepout</code> <kbd>stepout</kbd><dd>The argument is the stepout timeout, which by default is 900 s.
It can
be set to any positive number in seconds.
diff --git a/ntpd/ntp.conf.man.in b/ntpd/ntp.conf.man.in
index ec2c866c750a..548151d334c7 100644
--- a/ntpd/ntp.conf.man.in
+++ b/ntpd/ntp.conf.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5 "04 Feb 2015" "4.2.8p1" "File Formats"
+.TH ntp.conf 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-sPaOCn/ag-RPaGBn)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:41:46 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -2786,7 +2786,7 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
-.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
+.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@@ -2852,6 +2852,21 @@ Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.TP 7
+.NOP \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[]
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.TP 7
+.NOP \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[]
+As for stepback, but for the forward direction.
+.TP 7
.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/ntp.conf.mdoc.in b/ntpd/ntp.conf.mdoc.in
index ec45a749c3a0..da935ed697ee 100644
--- a/ntpd/ntp.conf.mdoc.in
+++ b/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:07 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -2618,7 +2618,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
-.Cm step Ar srep |
+.Cm step Ar step |
+.Cm stepback Ar stepback |
+.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@@ -2678,6 +2680,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+.It Cm stepback Ar stepback
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.It Cm stepfwd Ar stepfwd
+As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/ntp.keys.5man b/ntpd/ntp.keys.5man
index 7ba8b5815f04..a505afb90dc6 100644
--- a/ntpd/ntp.keys.5man
+++ b/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "04 Feb 2015" "4.2.8p1" "File Formats"
+.TH ntp.keys 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:41:51 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
diff --git a/ntpd/ntp.keys.5mdoc b/ntpd/ntp.keys.5mdoc
index 8d7dacc0f1b1..a7157ec4e394 100644
--- a/ntpd/ntp.keys.5mdoc
+++ b/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:10 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
diff --git a/ntpd/ntp.keys.html b/ntpd/ntp.keys.html
index 2329476e15ff..98a22ef0aedb 100644
--- a/ntpd/ntp.keys.html
+++ b/ntpd/ntp.keys.html
@@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the symmetric key file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.8p1 of <code>ntp.keys</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp.keys</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/ntpd/ntp.keys.man.in b/ntpd/ntp.keys.man.in
index b1ec652d989f..c7585afa16f3 100644
--- a/ntpd/ntp.keys.man.in
+++ b/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "04 Feb 2015" "4.2.8p1" "File Formats"
+.TH ntp.keys 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:41:51 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
diff --git a/ntpd/ntp.keys.mdoc.in b/ntpd/ntp.keys.mdoc.in
index 1f3fea54ab96..e6590db72fbb 100644
--- a/ntpd/ntp.keys.mdoc.in
+++ b/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:10 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c
index b9f0e24e3ee1..a224579d1cce 100644
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -2705,6 +2705,14 @@ config_tinker(
item = LOOP_MAX;
break;
+ case T_Stepback:
+ item = LOOP_MAX_BACK;
+ break;
+
+ case T_Stepfwd:
+ item = LOOP_MAX_FWD;
+ break;
+
case T_Stepout:
item = LOOP_MINSTEP;
break;
diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c
index b339e7d83b86..aa9f78cb0290 100644
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -220,7 +220,8 @@ static const struct ctl_proc control_codes[] = {
#define CS_TIMER_OVERRUNS 86
#define CS_TIMER_XMTS 87
#define CS_FUZZ 88
-#define CS_MAX_NOAUTOKEY CS_FUZZ
+#define CS_WANDER_THRESH 89
+#define CS_MAX_NOAUTOKEY CS_WANDER_THRESH
#ifdef AUTOKEY
#define CS_FLAGS (1 + CS_MAX_NOAUTOKEY)
#define CS_HOST (2 + CS_MAX_NOAUTOKEY)
@@ -415,6 +416,7 @@ static const struct ctl_var sys_var[] = {
{ CS_TIMER_OVERRUNS, RO, "timer_overruns" }, /* 86 */
{ CS_TIMER_XMTS, RO, "timer_xmts" }, /* 87 */
{ CS_FUZZ, RO, "fuzz" }, /* 88 */
+ { CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 89 */
#ifdef AUTOKEY
{ CS_FLAGS, RO, "flags" }, /* 1 + CS_MAX_NOAUTOKEY */
{ CS_HOST, RO, "host" }, /* 2 + CS_MAX_NOAUTOKEY */
@@ -477,7 +479,7 @@ static const struct ctl_var peer_var[] = {
{ 0, PADDING, "" }, /* 0 */
{ CP_CONFIG, RO, "config" }, /* 1 */
{ CP_AUTHENABLE, RO, "authenable" }, /* 2 */
- { CP_AUTHENTIC, RO, "authentic" }, /* 3 */
+ { CP_AUTHENTIC, RO, "authentic" }, /* 3 */
{ CP_SRCADR, RO, "srcadr" }, /* 4 */
{ CP_SRCPORT, RO, "srcport" }, /* 5 */
{ CP_DSTADR, RO, "dstadr" }, /* 6 */
@@ -529,7 +531,7 @@ static const struct ctl_var peer_var[] = {
{ CP_FLAGS, RO, "flags" }, /* 1 + CP_MAX_NOAUTOKEY */
{ CP_HOST, RO, "host" }, /* 2 + CP_MAX_NOAUTOKEY */
{ CP_VALID, RO, "valid" }, /* 3 + CP_MAX_NOAUTOKEY */
- { CP_INITSEQ, RO, "initsequence" }, /* 4 + CP_MAX_NOAUTOKEY */
+ { CP_INITSEQ, RO, "initsequence" }, /* 4 + CP_MAX_NOAUTOKEY */
{ CP_INITKEY, RO, "initkey" }, /* 5 + CP_MAX_NOAUTOKEY */
{ CP_INITTSP, RO, "timestamp" }, /* 6 + CP_MAX_NOAUTOKEY */
{ CP_SIGNATURE, RO, "signature" }, /* 7 + CP_MAX_NOAUTOKEY */
@@ -682,37 +684,37 @@ int num_ctl_traps;
*/
#ifdef REFCLOCK
static const u_char clocktypes[] = {
- CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
+ CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
CTL_SST_TS_LOCAL, /* REFCLK_LOCALCLOCK (1) */
- CTL_SST_TS_UHF, /* deprecated REFCLK_GPS_TRAK (2) */
+ CTL_SST_TS_UHF, /* deprecated REFCLK_GPS_TRAK (2) */
CTL_SST_TS_HF, /* REFCLK_WWV_PST (3) */
CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM (4) */
- CTL_SST_TS_UHF, /* REFCLK_TRUETIME (5) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_AUDIO (6) */
+ CTL_SST_TS_UHF, /* REFCLK_TRUETIME (5) */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_AUDIO (6) */
CTL_SST_TS_HF, /* REFCLK_CHU (7) */
CTL_SST_TS_LF, /* REFCLOCK_PARSE (default) (8) */
CTL_SST_TS_LF, /* REFCLK_GPS_MX4200 (9) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_AS2201 (10) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_ARBITER (11) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_TPRO (12) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_AS2201 (10) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_ARBITER (11) */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_TPRO (12) */
CTL_SST_TS_ATOM, /* REFCLK_ATOM_LEITCH (13) */
CTL_SST_TS_LF, /* deprecated REFCLK_MSF_EES (14) */
- CTL_SST_TS_NTP, /* not used (15) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_BANCOMM (16) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_DATU (17) */
+ CTL_SST_TS_NTP, /* not used (15) */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_BANCOMM (16) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_DATU (17) */
CTL_SST_TS_TELEPHONE, /* REFCLK_NIST_ACTS (18) */
CTL_SST_TS_HF, /* REFCLK_WWV_HEATH (19) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_NMEA (20) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_VME (21) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_NMEA (20) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_VME (21) */
CTL_SST_TS_ATOM, /* REFCLK_ATOM_PPS (22) */
CTL_SST_TS_NTP, /* not used (23) */
CTL_SST_TS_NTP, /* not used (24) */
- CTL_SST_TS_NTP, /* not used (25) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_HP (26) */
+ CTL_SST_TS_NTP, /* not used (25) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_HP (26) */
CTL_SST_TS_LF, /* REFCLK_ARCRON_MSF (27) */
CTL_SST_TS_UHF, /* REFCLK_SHM (28) */
- CTL_SST_TS_UHF, /* REFCLK_PALISADE (29) */
- CTL_SST_TS_UHF, /* REFCLK_ONCORE (30) */
+ CTL_SST_TS_UHF, /* REFCLK_PALISADE (29) */
+ CTL_SST_TS_UHF, /* REFCLK_ONCORE (30) */
CTL_SST_TS_UHF, /* REFCLK_JUPITER (31) */
CTL_SST_TS_LF, /* REFCLK_CHRONOLOG (32) */
CTL_SST_TS_LF, /* REFCLK_DUMBCLOCK (33) */
@@ -720,7 +722,7 @@ static const u_char clocktypes[] = {
CTL_SST_TS_LF, /* REFCLK_PCF (35) */
CTL_SST_TS_HF, /* REFCLK_WWV (36) */
CTL_SST_TS_LF, /* REFCLK_FG (37) */
- CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
+ CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
CTL_SST_TS_UHF, /* REFCLK_HOPF_PCI (39) */
CTL_SST_TS_LF, /* REFCLK_JJY (40) */
CTL_SST_TS_UHF, /* REFCLK_TT560 (41) */
@@ -751,17 +753,17 @@ static u_char ctl_sys_num_events;
u_long ctltimereset; /* time stats reset */
u_long numctlreq; /* number of requests we've received */
u_long numctlbadpkts; /* number of bad control packets */
-u_long numctlresponses; /* number of resp packets sent with data */
-u_long numctlfrags; /* number of fragments sent */
+u_long numctlresponses; /* number of resp packets sent with data */
+u_long numctlfrags; /* number of fragments sent */
u_long numctlerrors; /* number of error responses sent */
u_long numctltooshort; /* number of too short input packets */
-u_long numctlinputresp; /* number of responses on input */
-u_long numctlinputfrag; /* number of fragments on input */
+u_long numctlinputresp; /* number of responses on input */
+u_long numctlinputfrag; /* number of fragments on input */
u_long numctlinputerr; /* number of input pkts with err bit set */
-u_long numctlbadoffset; /* number of input pkts with nonzero offset */
+u_long numctlbadoffset; /* number of input pkts with nonzero offset */
u_long numctlbadversion; /* number of input pkts with unknown version */
u_long numctldatatooshort; /* data too short for count */
-u_long numctlbadop; /* bad op code found in packet */
+u_long numctlbadop; /* bad op code found in packet */
u_long numasyncmsgs; /* number of async messages we've sent */
/*
@@ -780,7 +782,7 @@ static int res_offset; /* offset of payload in response */
static u_char * datapt;
static u_char * dataend;
static int datalinelen;
-static int datasent; /* flag to avoid initial ", " */
+static int datasent; /* flag to avoid initial ", " */
static int datanotbinflag;
static sockaddr_u *rmt_addr;
static struct interface *lcl_inter;
@@ -844,7 +846,7 @@ ctl_error(
* Fill in the fields. We assume rpkt.sequence and rpkt.associd
* have already been filled in.
*/
- rpkt.r_m_e_op = (u_char)CTL_RESPONSE | CTL_ERROR |
+ rpkt.r_m_e_op = (u_char)CTL_RESPONSE | CTL_ERROR |
(res_opcode & CTL_OP_MASK);
rpkt.status = htons((u_short)(errcode << 8) & 0xff00);
rpkt.count = 0;
@@ -862,7 +864,7 @@ ctl_error(
CTL_HEADER_LEN);
}
-/*
+/*
* save_config - Implements ntpq -c "saveconfig <filename>"
* Writes current configuration including any runtime
* changes by ntpq's :config or config-from-file
@@ -926,7 +928,7 @@ save_config(
if (0 == strftime(filename, sizeof(filename), filespec,
localtime(&now)))
strlcpy(filename, filespec, sizeof(filename));
-
+
/*
* Conceptually we should be searching for DIRSEP in filename,
* however Windows actually recognizes both forward and
@@ -1316,7 +1318,7 @@ static void
ctl_putdata(
const char *dp,
unsigned int dlen,
- int bin /* set to 1 when data is binary */
+ int bin /* set to 1 when data is binary */
)
{
int overhead;
@@ -1686,7 +1688,7 @@ ctl_putrefid(
return;
iptr = (char *)&refid;
iplim = iptr + sizeof(refid);
- for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
+ for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
iptr++, optr++)
if (isprint((int)*iptr))
*optr = *iptr;
@@ -1754,7 +1756,7 @@ ctl_putsys(
static const double to_ms =
# ifdef STA_NANO
- 1.0e-6; /* nsec to msec */
+ 1.0e-6; /* nsec to msec */
# else
1.0e-3; /* usec to msec */
# endif
@@ -1946,12 +1948,12 @@ ctl_putsys(
ctl_putdata(buf, (unsigned)( buffp - buf ), 0);
break;
}
-
+
case CS_TAI:
if (sys_tai > 0)
ctl_putuint(sys_var[CS_TAI].text, sys_tai);
break;
-
+
case CS_LEAPTAB:
{
leap_signature_t lsig;
@@ -1960,7 +1962,7 @@ ctl_putsys(
ctl_putfs(sys_var[CS_LEAPTAB].text, lsig.ttime);
break;
}
-
+
case CS_LEAPEND:
{
leap_signature_t lsig;
@@ -2105,7 +2107,7 @@ ctl_putsys(
break;
case CS_AUTHRESET:
- ctl_putuint(sys_var[varid].text,
+ ctl_putuint(sys_var[varid].text,
current_time - auth_timereset);
break;
@@ -2139,7 +2141,7 @@ ctl_putsys(
case CS_K_OFFSET:
CTL_IF_KERNLOOP(
- ctl_putdblf,
+ ctl_putdblf,
(sys_var[varid].text, 0, -1, to_ms * ntx.offset)
);
break;
@@ -2319,6 +2321,9 @@ ctl_putsys(
case CS_FUZZ:
ctl_putdbl(sys_var[varid].text, sys_fuzz * 1e3);
break;
+ case CS_WANDER_THRESH:
+ ctl_putdbl(sys_var[varid].text, wander_threshold * 1e6);
+ break;
#ifdef AUTOKEY
case CS_FLAGS:
if (crypto_flags)
@@ -2625,7 +2630,7 @@ ctl_putpeer(
memcpy(s, k->text, i);
s += i;
}
- if (s + 2 < be) {
+ if (s + 2 < be) {
*s++ = '"';
*s = '\0';
ctl_putdata(buf, (u_int)(s - buf), 0);
@@ -2704,7 +2709,7 @@ ctl_putpeer(
strlen(p->ident));
break;
-
+
#endif /* AUTOKEY */
}
}
@@ -2813,7 +2818,7 @@ ctl_putclock(
sizeof(buf))
break; /* really long var name */
- snprintf(s, sizeof(buf), "%s=\"",
+ snprintf(s, sizeof(buf), "%s=\"",
clock_var[CC_VARLIST].text);
s += strlen(s);
t = s;
@@ -3301,7 +3306,7 @@ static void configure(
snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"runtime configuration prohibited by restrict ... nomodify");
- ctl_putdata(remote_config.err_msg,
+ ctl_putdata(remote_config.err_msg,
strlen(remote_config.err_msg), 0);
ctl_flushpkt(0);
NLOG(NLOG_SYSINFO)
@@ -3357,7 +3362,7 @@ static void configure(
config_remotely(&rbufp->recv_srcadr);
- /*
+ /*
* Check if errors were reported. If not, output 'Config
* Succeeded'. Else output the error count. It would be nice
* to output any parser error messages.
@@ -3366,10 +3371,10 @@ static void configure(
retval = snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"Config Succeeded");
- if (retval > 0)
+ if (retval > 0)
remote_config.err_pos += retval;
}
-
+
ctl_putdata(remote_config.err_msg, remote_config.err_pos, 0);
ctl_flushpkt(0);
@@ -3782,7 +3787,7 @@ static void read_mru_list(
while (NULL != (v = ctl_getitem(in_parms, &val)) &&
!(EOV & v->flags)) {
- int si;
+ int si;
if (!strcmp(nonce_text, v->text)) {
if (NULL != pnonce)
@@ -3879,7 +3884,7 @@ static void read_mru_list(
pch = sptoa(&mon->rmtadr);
ctl_putunqstr("addr.older", pch, strlen(pch));
- /*
+ /*
* Move on to the first entry the client doesn't have,
* except in the special case of a limit of one. In
* that case return the starting point entry.
@@ -3889,7 +3894,7 @@ static void read_mru_list(
} else { /* start with the oldest */
mon = TAIL_DLIST(mon_mru_list, mru);
}
-
+
/*
* send up to limit= entries in up to frags= datagrams
*/
@@ -4648,7 +4653,7 @@ ctlfindtrap(
for (n = 0; n < COUNTOF(ctl_traps); n++)
if ((ctl_traps[n].tr_flags & TRAP_INUSE)
&& ADDR_PORT_EQ(raddr, &ctl_traps[n].tr_addr)
- && (linter == ctl_traps[n].tr_localaddr))
+ && (linter == ctl_traps[n].tr_localaddr))
return &ctl_traps[n];
return NULL;
@@ -4705,7 +4710,7 @@ report_event(
const char * src;
u_char errlast;
- errlast = (u_char)err & ~PEER_EVENT;
+ errlast = (u_char)err & ~PEER_EVENT;
if (peer->last_event == errlast)
peer->num_events = 0;
if (peer->num_events >= CTL_PEER_MAXEVENTS)
@@ -4977,7 +4982,7 @@ get_ext_sys_var(const char *tag)
}
}
}
-
+
return val;
}
diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c
index 089dc6f2887d..5795ae8dfdd7 100644
--- a/ntpd/ntp_crypto.c
+++ b/ntpd/ntp_crypto.c
@@ -1731,7 +1731,7 @@ crypto_args(
tstamp_t tstamp; /* NTP timestamp */
struct exten *ep; /* extension field pointer */
u_int len; /* extension field length */
- size_t slen;
+ size_t slen = 0;
tstamp = crypto_time();
len = sizeof(struct exten);
diff --git a/ntpd/ntp_keyword.h b/ntpd/ntp_keyword.h
index 131cf0fab1f9..723793636b7e 100644
--- a/ntpd/ntp_keyword.h
+++ b/ntpd/ntp_keyword.h
@@ -2,7 +2,7 @@
* ntp_keyword.h
*
* NOTE: edit this file with caution, it is generated by keyword-gen.c
- * Generated 2015-01-03 23:51:10 UTC diff_ignore_line
+ * Generated 2015-03-16 09:05:44 UTC diff_ignore_line
*
*/
#include "ntp_scanner.h"
@@ -10,7 +10,7 @@
#define LOWEST_KEYWORD_ID 258
-const char * const keyword_text[187] = {
+const char * const keyword_text[189] = {
/* 0 258 T_Abbrev */ "abbrev",
/* 1 259 T_Age */ "age",
/* 2 260 T_All */ "all",
@@ -160,49 +160,51 @@ const char * const keyword_text[187] = {
/* 146 404 T_Stats */ "stats",
/* 147 405 T_Statsdir */ "statsdir",
/* 148 406 T_Step */ "step",
- /* 149 407 T_Stepout */ "stepout",
- /* 150 408 T_Stratum */ "stratum",
- /* 151 409 T_String */ NULL,
- /* 152 410 T_Sys */ "sys",
- /* 153 411 T_Sysstats */ "sysstats",
- /* 154 412 T_Tick */ "tick",
- /* 155 413 T_Time1 */ "time1",
- /* 156 414 T_Time2 */ "time2",
- /* 157 415 T_Timer */ "timer",
- /* 158 416 T_Timingstats */ "timingstats",
- /* 159 417 T_Tinker */ "tinker",
- /* 160 418 T_Tos */ "tos",
- /* 161 419 T_Trap */ "trap",
- /* 162 420 T_True */ "true",
- /* 163 421 T_Trustedkey */ "trustedkey",
- /* 164 422 T_Ttl */ "ttl",
- /* 165 423 T_Type */ "type",
- /* 166 424 T_U_int */ NULL,
- /* 167 425 T_Unconfig */ "unconfig",
- /* 168 426 T_Unpeer */ "unpeer",
- /* 169 427 T_Version */ "version",
- /* 170 428 T_WanderThreshold */ NULL,
- /* 171 429 T_Week */ "week",
- /* 172 430 T_Wildcard */ "wildcard",
- /* 173 431 T_Xleave */ "xleave",
- /* 174 432 T_Year */ "year",
- /* 175 433 T_Flag */ NULL,
- /* 176 434 T_EOC */ NULL,
- /* 177 435 T_Simulate */ "simulate",
- /* 178 436 T_Beep_Delay */ "beep_delay",
- /* 179 437 T_Sim_Duration */ "simulation_duration",
- /* 180 438 T_Server_Offset */ "server_offset",
- /* 181 439 T_Duration */ "duration",
- /* 182 440 T_Freq_Offset */ "freq_offset",
- /* 183 441 T_Wander */ "wander",
- /* 184 442 T_Jitter */ "jitter",
- /* 185 443 T_Prop_Delay */ "prop_delay",
- /* 186 444 T_Proc_Delay */ "proc_delay"
+ /* 149 407 T_Stepback */ "stepback",
+ /* 150 408 T_Stepfwd */ "stepfwd",
+ /* 151 409 T_Stepout */ "stepout",
+ /* 152 410 T_Stratum */ "stratum",
+ /* 153 411 T_String */ NULL,
+ /* 154 412 T_Sys */ "sys",
+ /* 155 413 T_Sysstats */ "sysstats",
+ /* 156 414 T_Tick */ "tick",
+ /* 157 415 T_Time1 */ "time1",
+ /* 158 416 T_Time2 */ "time2",
+ /* 159 417 T_Timer */ "timer",
+ /* 160 418 T_Timingstats */ "timingstats",
+ /* 161 419 T_Tinker */ "tinker",
+ /* 162 420 T_Tos */ "tos",
+ /* 163 421 T_Trap */ "trap",
+ /* 164 422 T_True */ "true",
+ /* 165 423 T_Trustedkey */ "trustedkey",
+ /* 166 424 T_Ttl */ "ttl",
+ /* 167 425 T_Type */ "type",
+ /* 168 426 T_U_int */ NULL,
+ /* 169 427 T_Unconfig */ "unconfig",
+ /* 170 428 T_Unpeer */ "unpeer",
+ /* 171 429 T_Version */ "version",
+ /* 172 430 T_WanderThreshold */ NULL,
+ /* 173 431 T_Week */ "week",
+ /* 174 432 T_Wildcard */ "wildcard",
+ /* 175 433 T_Xleave */ "xleave",
+ /* 176 434 T_Year */ "year",
+ /* 177 435 T_Flag */ NULL,
+ /* 178 436 T_EOC */ NULL,
+ /* 179 437 T_Simulate */ "simulate",
+ /* 180 438 T_Beep_Delay */ "beep_delay",
+ /* 181 439 T_Sim_Duration */ "simulation_duration",
+ /* 182 440 T_Server_Offset */ "server_offset",
+ /* 183 441 T_Duration */ "duration",
+ /* 184 442 T_Freq_Offset */ "freq_offset",
+ /* 185 443 T_Wander */ "wander",
+ /* 186 444 T_Jitter */ "jitter",
+ /* 187 445 T_Prop_Delay */ "prop_delay",
+ /* 188 446 T_Proc_Delay */ "proc_delay"
};
-#define SCANNER_INIT_S 830
+#define SCANNER_INIT_S 837
-const scan_state sst[833] = {
+const scan_state sst[840] = {
/*SS_T( ch, f-by, match, other ), */
0, /* 0 */
S_ST( '-', 3, 322, 0 ), /* 1 */
@@ -248,7 +250,7 @@ const scan_state sst[833] = {
S_ST( 'd', 3, 42, 0 ), /* 41 beep_ */
S_ST( 'e', 3, 43, 0 ), /* 42 beep_d */
S_ST( 'l', 3, 44, 0 ), /* 43 beep_de */
- S_ST( 'a', 3, 436, 0 ), /* 44 beep_del */
+ S_ST( 'a', 3, 438, 0 ), /* 44 beep_del */
S_ST( 'r', 3, 46, 34 ), /* 45 b */
S_ST( 'o', 3, 47, 0 ), /* 46 br */
S_ST( 'a', 3, 48, 0 ), /* 47 bro */
@@ -346,7 +348,7 @@ const scan_state sst[833] = {
S_ST( 'a', 3, 140, 0 ), /* 139 dur */
S_ST( 't', 3, 141, 0 ), /* 140 dura */
S_ST( 'i', 3, 142, 0 ), /* 141 durat */
- S_ST( 'o', 3, 439, 0 ), /* 142 durati */
+ S_ST( 'o', 3, 441, 0 ), /* 142 durati */
S_ST( 'e', 3, 144, 105 ), /* 143 */
S_ST( 'n', 3, 292, 0 ), /* 144 e */
S_ST( 'a', 3, 146, 0 ), /* 145 en */
@@ -372,7 +374,7 @@ const scan_state sst[833] = {
S_ST( 'f', 3, 166, 0 ), /* 165 freq_o */
S_ST( 'f', 3, 167, 0 ), /* 166 freq_of */
S_ST( 's', 3, 168, 0 ), /* 167 freq_off */
- S_ST( 'e', 3, 440, 0 ), /* 168 freq_offs */
+ S_ST( 'e', 3, 442, 0 ), /* 168 freq_offs */
S_ST( 'u', 3, 170, 161 ), /* 169 f */
S_ST( 'd', 3, 171, 0 ), /* 170 fu */
S_ST( 'g', 3, 304, 0 ), /* 171 fud */
@@ -432,7 +434,7 @@ const scan_state sst[833] = {
S_ST( 'i', 3, 226, 0 ), /* 225 j */
S_ST( 't', 3, 227, 0 ), /* 226 ji */
S_ST( 't', 3, 228, 0 ), /* 227 jit */
- S_ST( 'e', 3, 442, 0 ), /* 228 jitt */
+ S_ST( 'e', 3, 444, 0 ), /* 228 jitt */
S_ST( 'k', 3, 236, 224 ), /* 229 */
S_ST( 'e', 3, 324, 0 ), /* 230 k */
S_ST( 'r', 3, 232, 0 ), /* 231 ke */
@@ -457,7 +459,7 @@ const scan_state sst[833] = {
S_ST( 's', 3, 251, 249 ), /* 250 li */
S_ST( 't', 3, 252, 0 ), /* 251 lis */
S_ST( 'e', 3, 332, 0 ), /* 252 list */
- S_ST( 'o', 3, 447, 244 ), /* 253 l */
+ S_ST( 'o', 3, 449, 244 ), /* 253 l */
S_ST( 'g', 3, 315, 0 ), /* 254 lo */
S_ST( 'c', 3, 256, 0 ), /* 255 log */
S_ST( 'o', 3, 257, 0 ), /* 256 logc */
@@ -521,7 +523,7 @@ const scan_state sst[833] = {
S_ST( 'e', 1, 0, 0 ), /* 314 T_Includefile */
S_ST( 'f', 3, 317, 255 ), /* 315 log */
S_ST( 'e', 0, 0, 0 ), /* 316 T_Interface */
- S_ST( 'i', 3, 409, 0 ), /* 317 logf */
+ S_ST( 'i', 3, 411, 0 ), /* 317 logf */
S_ST( 'o', 0, 0, 193 ), /* 318 T_Io */
S_ST( '4', 0, 0, 0 ), /* 319 T_Ipv4 */
S_ST( '4', 0, 0, 0 ), /* 320 T_Ipv4_flag */
@@ -551,7 +553,7 @@ const scan_state sst[833] = {
S_ST( 'm', 0, 0, 0 ), /* 344 T_Maxmem */
S_ST( 'l', 0, 0, 0 ), /* 345 T_Maxpoll */
S_ST( 's', 0, 0, 0 ), /* 346 T_Mdnstries */
- S_ST( 'm', 0, 500, 0 ), /* 347 T_Mem */
+ S_ST( 'm', 0, 502, 0 ), /* 347 T_Mem */
S_ST( 'k', 0, 0, 0 ), /* 348 T_Memlock */
S_ST( 'k', 0, 0, 0 ), /* 349 T_Minclock */
S_ST( 'h', 0, 0, 0 ), /* 350 T_Mindepth */
@@ -577,23 +579,23 @@ const scan_state sst[833] = {
S_ST( 'e', 0, 0, 0 ), /* 370 T_Noserve */
S_ST( 'p', 0, 0, 0 ), /* 371 T_Notrap */
S_ST( 't', 0, 0, 0 ), /* 372 T_Notrust */
- S_ST( 'p', 0, 596, 0 ), /* 373 T_Ntp */
+ S_ST( 'p', 0, 598, 0 ), /* 373 T_Ntp */
S_ST( 't', 0, 0, 0 ), /* 374 T_Ntpport */
S_ST( 't', 1, 0, 0 ), /* 375 T_NtpSignDsocket */
- S_ST( 'n', 0, 611, 0 ), /* 376 T_Orphan */
+ S_ST( 'n', 0, 613, 0 ), /* 376 T_Orphan */
S_ST( 't', 0, 0, 0 ), /* 377 T_Orphanwait */
S_ST( 'c', 0, 0, 0 ), /* 378 T_Panic */
- S_ST( 'r', 1, 620, 0 ), /* 379 T_Peer */
+ S_ST( 'r', 1, 622, 0 ), /* 379 T_Peer */
S_ST( 's', 0, 0, 0 ), /* 380 T_Peerstats */
S_ST( 'e', 2, 0, 0 ), /* 381 T_Phone */
- S_ST( 'd', 0, 628, 0 ), /* 382 T_Pid */
+ S_ST( 'd', 0, 630, 0 ), /* 382 T_Pid */
S_ST( 'e', 1, 0, 0 ), /* 383 T_Pidfile */
S_ST( 'l', 1, 0, 0 ), /* 384 T_Pool */
S_ST( 't', 0, 0, 0 ), /* 385 T_Port */
S_ST( 't', 0, 0, 0 ), /* 386 T_Preempt */
S_ST( 'r', 0, 0, 0 ), /* 387 T_Prefer */
S_ST( 's', 0, 0, 0 ), /* 388 T_Protostats */
- S_ST( 'w', 1, 0, 634 ), /* 389 T_Pw */
+ S_ST( 'w', 1, 0, 636 ), /* 389 T_Pw */
S_ST( 'e', 1, 0, 0 ), /* 390 T_Randfile */
S_ST( 's', 0, 0, 0 ), /* 391 T_Rawstats */
S_ST( 'd', 1, 0, 0 ), /* 392 T_Refid */
@@ -603,439 +605,446 @@ const scan_state sst[833] = {
S_ST( 'e', 0, 0, 0 ), /* 396 T_Revoke */
S_ST( 't', 0, 0, 0 ), /* 397 T_Rlimit */
S_ST( 'r', 1, 0, 0 ), /* 398 T_Saveconfigdir */
- S_ST( 'r', 1, 711, 0 ), /* 399 T_Server */
+ S_ST( 'r', 1, 713, 0 ), /* 399 T_Server */
S_ST( 'r', 1, 0, 0 ), /* 400 T_Setvar */
S_ST( 'e', 0, 0, 0 ), /* 401 T_Source */
S_ST( 'e', 0, 0, 0 ), /* 402 T_Stacksize */
S_ST( 's', 0, 0, 0 ), /* 403 T_Statistics */
- S_ST( 's', 0, 754, 749 ), /* 404 T_Stats */
+ S_ST( 's', 0, 756, 751 ), /* 404 T_Stats */
S_ST( 'r', 1, 0, 0 ), /* 405 T_Statsdir */
- S_ST( 'p', 0, 757, 0 ), /* 406 T_Step */
- S_ST( 't', 0, 0, 0 ), /* 407 T_Stepout */
- S_ST( 'm', 0, 0, 0 ), /* 408 T_Stratum */
- S_ST( 'l', 3, 334, 0 ), /* 409 logfi */
- S_ST( 's', 0, 764, 0 ), /* 410 T_Sys */
- S_ST( 's', 0, 0, 0 ), /* 411 T_Sysstats */
- S_ST( 'k', 0, 0, 0 ), /* 412 T_Tick */
- S_ST( '1', 0, 0, 0 ), /* 413 T_Time1 */
- S_ST( '2', 0, 0, 413 ), /* 414 T_Time2 */
- S_ST( 'r', 0, 0, 414 ), /* 415 T_Timer */
- S_ST( 's', 0, 0, 0 ), /* 416 T_Timingstats */
- S_ST( 'r', 0, 0, 0 ), /* 417 T_Tinker */
- S_ST( 's', 0, 0, 0 ), /* 418 T_Tos */
- S_ST( 'p', 1, 0, 0 ), /* 419 T_Trap */
- S_ST( 'e', 0, 0, 0 ), /* 420 T_True */
- S_ST( 'y', 0, 0, 0 ), /* 421 T_Trustedkey */
- S_ST( 'l', 0, 0, 0 ), /* 422 T_Ttl */
- S_ST( 'e', 0, 0, 0 ), /* 423 T_Type */
- S_ST( 'o', 3, 428, 254 ), /* 424 lo */
- S_ST( 'g', 1, 0, 0 ), /* 425 T_Unconfig */
- S_ST( 'r', 1, 0, 0 ), /* 426 T_Unpeer */
- S_ST( 'n', 0, 0, 0 ), /* 427 T_Version */
- S_ST( 'p', 3, 433, 0 ), /* 428 loo */
- S_ST( 'k', 0, 0, 0 ), /* 429 T_Week */
- S_ST( 'd', 0, 0, 0 ), /* 430 T_Wildcard */
- S_ST( 'e', 0, 0, 0 ), /* 431 T_Xleave */
- S_ST( 'r', 0, 0, 0 ), /* 432 T_Year */
- S_ST( 's', 3, 434, 0 ), /* 433 loop */
- S_ST( 't', 3, 445, 0 ), /* 434 loops */
- S_ST( 'e', 0, 0, 0 ), /* 435 T_Simulate */
- S_ST( 'y', 0, 0, 0 ), /* 436 T_Beep_Delay */
- S_ST( 'n', 0, 0, 0 ), /* 437 T_Sim_Duration */
- S_ST( 't', 0, 0, 0 ), /* 438 T_Server_Offset */
- S_ST( 'n', 0, 0, 0 ), /* 439 T_Duration */
- S_ST( 't', 0, 0, 0 ), /* 440 T_Freq_Offset */
- S_ST( 'r', 0, 0, 0 ), /* 441 T_Wander */
- S_ST( 'r', 0, 0, 0 ), /* 442 T_Jitter */
- S_ST( 'y', 0, 0, 0 ), /* 443 T_Prop_Delay */
- S_ST( 'y', 0, 0, 0 ), /* 444 T_Proc_Delay */
- S_ST( 'a', 3, 446, 0 ), /* 445 loopst */
- S_ST( 't', 3, 335, 0 ), /* 446 loopsta */
- S_ST( 'w', 3, 448, 424 ), /* 447 lo */
- S_ST( 'p', 3, 449, 0 ), /* 448 low */
- S_ST( 'r', 3, 450, 0 ), /* 449 lowp */
- S_ST( 'i', 3, 451, 0 ), /* 450 lowpr */
- S_ST( 'o', 3, 452, 0 ), /* 451 lowpri */
- S_ST( 't', 3, 453, 0 ), /* 452 lowprio */
- S_ST( 'r', 3, 454, 0 ), /* 453 lowpriot */
- S_ST( 'a', 3, 336, 0 ), /* 454 lowpriotr */
- S_ST( 'm', 3, 536, 237 ), /* 455 */
- S_ST( 'a', 3, 474, 0 ), /* 456 m */
- S_ST( 'n', 3, 458, 0 ), /* 457 ma */
- S_ST( 'y', 3, 459, 0 ), /* 458 man */
- S_ST( 'c', 3, 460, 0 ), /* 459 many */
- S_ST( 'a', 3, 461, 0 ), /* 460 manyc */
- S_ST( 's', 3, 462, 0 ), /* 461 manyca */
- S_ST( 't', 3, 468, 0 ), /* 462 manycas */
- S_ST( 'c', 3, 464, 0 ), /* 463 manycast */
- S_ST( 'l', 3, 465, 0 ), /* 464 manycastc */
- S_ST( 'i', 3, 466, 0 ), /* 465 manycastcl */
- S_ST( 'e', 3, 467, 0 ), /* 466 manycastcli */
- S_ST( 'n', 3, 337, 0 ), /* 467 manycastclie */
- S_ST( 's', 3, 469, 463 ), /* 468 manycast */
- S_ST( 'e', 3, 470, 0 ), /* 469 manycasts */
- S_ST( 'r', 3, 471, 0 ), /* 470 manycastse */
- S_ST( 'v', 3, 472, 0 ), /* 471 manycastser */
- S_ST( 'e', 3, 338, 0 ), /* 472 manycastserv */
- S_ST( 's', 3, 339, 457 ), /* 473 ma */
- S_ST( 'x', 3, 489, 473 ), /* 474 ma */
- S_ST( 'a', 3, 476, 0 ), /* 475 max */
- S_ST( 'g', 3, 340, 0 ), /* 476 maxa */
- S_ST( 'c', 3, 478, 475 ), /* 477 max */
- S_ST( 'l', 3, 479, 0 ), /* 478 maxc */
- S_ST( 'o', 3, 480, 0 ), /* 479 maxcl */
- S_ST( 'c', 3, 341, 0 ), /* 480 maxclo */
- S_ST( 'd', 3, 485, 477 ), /* 481 max */
- S_ST( 'e', 3, 483, 0 ), /* 482 maxd */
- S_ST( 'p', 3, 484, 0 ), /* 483 maxde */
- S_ST( 't', 3, 342, 0 ), /* 484 maxdep */
- S_ST( 'i', 3, 486, 482 ), /* 485 maxd */
- S_ST( 's', 3, 343, 0 ), /* 486 maxdi */
- S_ST( 'm', 3, 488, 481 ), /* 487 max */
- S_ST( 'e', 3, 344, 0 ), /* 488 maxm */
- S_ST( 'p', 3, 490, 487 ), /* 489 max */
- S_ST( 'o', 3, 491, 0 ), /* 490 maxp */
- S_ST( 'l', 3, 345, 0 ), /* 491 maxpo */
- S_ST( 'd', 3, 493, 456 ), /* 492 m */
- S_ST( 'n', 3, 494, 0 ), /* 493 md */
- S_ST( 's', 3, 495, 0 ), /* 494 mdn */
- S_ST( 't', 3, 496, 0 ), /* 495 mdns */
- S_ST( 'r', 3, 497, 0 ), /* 496 mdnst */
- S_ST( 'i', 3, 498, 0 ), /* 497 mdnstr */
- S_ST( 'e', 3, 346, 0 ), /* 498 mdnstri */
- S_ST( 'e', 3, 347, 492 ), /* 499 m */
- S_ST( 'l', 3, 501, 0 ), /* 500 mem */
- S_ST( 'o', 3, 502, 0 ), /* 501 meml */
- S_ST( 'c', 3, 348, 0 ), /* 502 memlo */
- S_ST( 'i', 3, 504, 499 ), /* 503 m */
- S_ST( 'n', 3, 521, 0 ), /* 504 mi */
- S_ST( 'c', 3, 506, 0 ), /* 505 min */
- S_ST( 'l', 3, 507, 0 ), /* 506 minc */
- S_ST( 'o', 3, 508, 0 ), /* 507 mincl */
- S_ST( 'c', 3, 349, 0 ), /* 508 minclo */
- S_ST( 'd', 3, 513, 505 ), /* 509 min */
- S_ST( 'e', 3, 511, 0 ), /* 510 mind */
- S_ST( 'p', 3, 512, 0 ), /* 511 minde */
- S_ST( 't', 3, 350, 0 ), /* 512 mindep */
- S_ST( 'i', 3, 514, 510 ), /* 513 mind */
- S_ST( 's', 3, 351, 0 ), /* 514 mindi */
- S_ST( 'i', 3, 516, 509 ), /* 515 min */
- S_ST( 'm', 3, 517, 0 ), /* 516 mini */
- S_ST( 'u', 3, 352, 0 ), /* 517 minim */
- S_ST( 'p', 3, 519, 515 ), /* 518 min */
- S_ST( 'o', 3, 520, 0 ), /* 519 minp */
- S_ST( 'l', 3, 353, 0 ), /* 520 minpo */
- S_ST( 's', 3, 522, 518 ), /* 521 min */
- S_ST( 'a', 3, 523, 0 ), /* 522 mins */
- S_ST( 'n', 3, 354, 0 ), /* 523 minsa */
- S_ST( 'o', 3, 526, 503 ), /* 524 m */
- S_ST( 'd', 3, 355, 0 ), /* 525 mo */
- S_ST( 'n', 3, 530, 525 ), /* 526 mo */
- S_ST( 'i', 3, 528, 0 ), /* 527 mon */
- S_ST( 't', 3, 529, 0 ), /* 528 moni */
- S_ST( 'o', 3, 357, 0 ), /* 529 monit */
- S_ST( 't', 3, 358, 527 ), /* 530 mon */
- S_ST( 'r', 3, 359, 524 ), /* 531 m */
- S_ST( 's', 3, 533, 531 ), /* 532 m */
- S_ST( 's', 3, 534, 0 ), /* 533 ms */
- S_ST( 'n', 3, 535, 0 ), /* 534 mss */
- S_ST( 't', 3, 328, 0 ), /* 535 mssn */
- S_ST( 'u', 3, 537, 532 ), /* 536 m */
- S_ST( 'l', 3, 538, 0 ), /* 537 mu */
- S_ST( 't', 3, 539, 0 ), /* 538 mul */
- S_ST( 'i', 3, 540, 0 ), /* 539 mult */
- S_ST( 'c', 3, 541, 0 ), /* 540 multi */
- S_ST( 'a', 3, 542, 0 ), /* 541 multic */
- S_ST( 's', 3, 543, 0 ), /* 542 multica */
- S_ST( 't', 3, 544, 0 ), /* 543 multicas */
- S_ST( 'c', 3, 545, 0 ), /* 544 multicast */
- S_ST( 'l', 3, 546, 0 ), /* 545 multicastc */
- S_ST( 'i', 3, 547, 0 ), /* 546 multicastcl */
- S_ST( 'e', 3, 548, 0 ), /* 547 multicastcli */
- S_ST( 'n', 3, 360, 0 ), /* 548 multicastclie */
- S_ST( 'n', 3, 592, 455 ), /* 549 */
- S_ST( 'i', 3, 361, 0 ), /* 550 n */
- S_ST( 'o', 3, 587, 550 ), /* 551 n */
- S_ST( 'l', 3, 553, 0 ), /* 552 no */
- S_ST( 'i', 3, 554, 0 ), /* 553 nol */
- S_ST( 'n', 3, 362, 0 ), /* 554 noli */
- S_ST( 'm', 3, 560, 552 ), /* 555 no */
- S_ST( 'o', 3, 557, 0 ), /* 556 nom */
- S_ST( 'd', 3, 558, 0 ), /* 557 nomo */
- S_ST( 'i', 3, 559, 0 ), /* 558 nomod */
- S_ST( 'f', 3, 363, 0 ), /* 559 nomodi */
- S_ST( 'r', 3, 561, 556 ), /* 560 nom */
- S_ST( 'u', 3, 562, 0 ), /* 561 nomr */
- S_ST( 'l', 3, 563, 0 ), /* 562 nomru */
- S_ST( 'i', 3, 564, 0 ), /* 563 nomrul */
- S_ST( 's', 3, 364, 0 ), /* 564 nomruli */
- S_ST( 'n', 3, 566, 555 ), /* 565 no */
- S_ST( 'v', 3, 567, 365 ), /* 566 non */
- S_ST( 'o', 3, 568, 0 ), /* 567 nonv */
- S_ST( 'l', 3, 569, 0 ), /* 568 nonvo */
- S_ST( 'a', 3, 570, 0 ), /* 569 nonvol */
- S_ST( 't', 3, 571, 0 ), /* 570 nonvola */
- S_ST( 'i', 3, 572, 0 ), /* 571 nonvolat */
- S_ST( 'l', 3, 366, 0 ), /* 572 nonvolati */
- S_ST( 'p', 3, 574, 565 ), /* 573 no */
- S_ST( 'e', 3, 575, 0 ), /* 574 nop */
- S_ST( 'e', 3, 367, 0 ), /* 575 nope */
- S_ST( 'q', 3, 577, 573 ), /* 576 no */
- S_ST( 'u', 3, 578, 0 ), /* 577 noq */
- S_ST( 'e', 3, 579, 0 ), /* 578 noqu */
- S_ST( 'r', 3, 368, 0 ), /* 579 noque */
- S_ST( 's', 3, 581, 576 ), /* 580 no */
- S_ST( 'e', 3, 585, 0 ), /* 581 nos */
- S_ST( 'l', 3, 583, 0 ), /* 582 nose */
- S_ST( 'e', 3, 584, 0 ), /* 583 nosel */
- S_ST( 'c', 3, 369, 0 ), /* 584 nosele */
- S_ST( 'r', 3, 586, 582 ), /* 585 nose */
- S_ST( 'v', 3, 370, 0 ), /* 586 noser */
- S_ST( 't', 3, 588, 580 ), /* 587 no */
- S_ST( 'r', 3, 590, 0 ), /* 588 not */
- S_ST( 'a', 3, 371, 0 ), /* 589 notr */
- S_ST( 'u', 3, 591, 589 ), /* 590 notr */
- S_ST( 's', 3, 372, 0 ), /* 591 notru */
- S_ST( 't', 3, 373, 551 ), /* 592 n */
- S_ST( 'p', 3, 594, 0 ), /* 593 ntp */
- S_ST( 'o', 3, 595, 0 ), /* 594 ntpp */
- S_ST( 'r', 3, 374, 0 ), /* 595 ntppo */
- S_ST( 's', 3, 597, 593 ), /* 596 ntp */
- S_ST( 'i', 3, 598, 0 ), /* 597 ntps */
- S_ST( 'g', 3, 599, 0 ), /* 598 ntpsi */
- S_ST( 'n', 3, 600, 0 ), /* 599 ntpsig */
- S_ST( 'd', 3, 601, 0 ), /* 600 ntpsign */
- S_ST( 's', 3, 602, 0 ), /* 601 ntpsignd */
- S_ST( 'o', 3, 603, 0 ), /* 602 ntpsignds */
- S_ST( 'c', 3, 604, 0 ), /* 603 ntpsigndso */
- S_ST( 'k', 3, 605, 0 ), /* 604 ntpsigndsoc */
- S_ST( 'e', 3, 375, 0 ), /* 605 ntpsigndsock */
- S_ST( 'o', 3, 607, 549 ), /* 606 */
- S_ST( 'r', 3, 608, 0 ), /* 607 o */
- S_ST( 'p', 3, 609, 0 ), /* 608 or */
- S_ST( 'h', 3, 610, 0 ), /* 609 orp */
- S_ST( 'a', 3, 376, 0 ), /* 610 orph */
- S_ST( 'w', 3, 612, 0 ), /* 611 orphan */
- S_ST( 'a', 3, 613, 0 ), /* 612 orphanw */
- S_ST( 'i', 3, 377, 0 ), /* 613 orphanwa */
- S_ST( 'p', 3, 389, 606 ), /* 614 */
- S_ST( 'a', 3, 616, 0 ), /* 615 p */
- S_ST( 'n', 3, 617, 0 ), /* 616 pa */
- S_ST( 'i', 3, 378, 0 ), /* 617 pan */
- S_ST( 'e', 3, 619, 615 ), /* 618 p */
- S_ST( 'e', 3, 379, 0 ), /* 619 pe */
- S_ST( 's', 3, 621, 0 ), /* 620 peer */
- S_ST( 't', 3, 622, 0 ), /* 621 peers */
- S_ST( 'a', 3, 623, 0 ), /* 622 peerst */
- S_ST( 't', 3, 380, 0 ), /* 623 peersta */
- S_ST( 'h', 3, 625, 618 ), /* 624 p */
- S_ST( 'o', 3, 626, 0 ), /* 625 ph */
- S_ST( 'n', 3, 381, 0 ), /* 626 pho */
- S_ST( 'i', 3, 382, 624 ), /* 627 p */
- S_ST( 'f', 3, 629, 0 ), /* 628 pid */
- S_ST( 'i', 3, 630, 0 ), /* 629 pidf */
- S_ST( 'l', 3, 383, 0 ), /* 630 pidfi */
- S_ST( 'o', 3, 633, 627 ), /* 631 p */
- S_ST( 'o', 3, 384, 0 ), /* 632 po */
- S_ST( 'r', 3, 385, 632 ), /* 633 po */
- S_ST( 'r', 3, 641, 631 ), /* 634 p */
- S_ST( 'e', 3, 639, 0 ), /* 635 pr */
- S_ST( 'e', 3, 637, 0 ), /* 636 pre */
- S_ST( 'm', 3, 638, 0 ), /* 637 pree */
- S_ST( 'p', 3, 386, 0 ), /* 638 preem */
- S_ST( 'f', 3, 640, 636 ), /* 639 pre */
- S_ST( 'e', 3, 387, 0 ), /* 640 pref */
- S_ST( 'o', 3, 654, 635 ), /* 641 pr */
- S_ST( 'c', 3, 643, 0 ), /* 642 pro */
- S_ST( '_', 3, 644, 0 ), /* 643 proc */
- S_ST( 'd', 3, 645, 0 ), /* 644 proc_ */
- S_ST( 'e', 3, 646, 0 ), /* 645 proc_d */
- S_ST( 'l', 3, 647, 0 ), /* 646 proc_de */
- S_ST( 'a', 3, 444, 0 ), /* 647 proc_del */
- S_ST( 'p', 3, 649, 642 ), /* 648 pro */
- S_ST( '_', 3, 650, 0 ), /* 649 prop */
- S_ST( 'd', 3, 651, 0 ), /* 650 prop_ */
- S_ST( 'e', 3, 652, 0 ), /* 651 prop_d */
- S_ST( 'l', 3, 653, 0 ), /* 652 prop_de */
- S_ST( 'a', 3, 443, 0 ), /* 653 prop_del */
- S_ST( 't', 3, 655, 648 ), /* 654 pro */
- S_ST( 'o', 3, 656, 0 ), /* 655 prot */
- S_ST( 's', 3, 657, 0 ), /* 656 proto */
- S_ST( 't', 3, 658, 0 ), /* 657 protos */
- S_ST( 'a', 3, 659, 0 ), /* 658 protost */
- S_ST( 't', 3, 388, 0 ), /* 659 protosta */
- S_ST( 'r', 3, 691, 614 ), /* 660 */
- S_ST( 'a', 3, 667, 0 ), /* 661 r */
- S_ST( 'n', 3, 663, 0 ), /* 662 ra */
- S_ST( 'd', 3, 664, 0 ), /* 663 ran */
- S_ST( 'f', 3, 665, 0 ), /* 664 rand */
- S_ST( 'i', 3, 666, 0 ), /* 665 randf */
- S_ST( 'l', 3, 390, 0 ), /* 666 randfi */
- S_ST( 'w', 3, 668, 662 ), /* 667 ra */
- S_ST( 's', 3, 669, 0 ), /* 668 raw */
- S_ST( 't', 3, 670, 0 ), /* 669 raws */
- S_ST( 'a', 3, 671, 0 ), /* 670 rawst */
- S_ST( 't', 3, 391, 0 ), /* 671 rawsta */
- S_ST( 'e', 3, 688, 661 ), /* 672 r */
- S_ST( 'f', 3, 674, 0 ), /* 673 re */
- S_ST( 'i', 3, 392, 0 ), /* 674 ref */
- S_ST( 'q', 3, 676, 673 ), /* 675 re */
- S_ST( 'u', 3, 677, 0 ), /* 676 req */
- S_ST( 'e', 3, 678, 0 ), /* 677 requ */
- S_ST( 's', 3, 679, 0 ), /* 678 reque */
- S_ST( 't', 3, 680, 0 ), /* 679 reques */
- S_ST( 'k', 3, 681, 0 ), /* 680 request */
- S_ST( 'e', 3, 393, 0 ), /* 681 requestk */
- S_ST( 's', 3, 684, 675 ), /* 682 re */
- S_ST( 'e', 3, 394, 0 ), /* 683 res */
- S_ST( 't', 3, 685, 683 ), /* 684 res */
- S_ST( 'r', 3, 686, 0 ), /* 685 rest */
- S_ST( 'i', 3, 687, 0 ), /* 686 restr */
- S_ST( 'c', 3, 395, 0 ), /* 687 restri */
- S_ST( 'v', 3, 689, 682 ), /* 688 re */
- S_ST( 'o', 3, 690, 0 ), /* 689 rev */
- S_ST( 'k', 3, 396, 0 ), /* 690 revo */
- S_ST( 'l', 3, 692, 672 ), /* 691 r */
- S_ST( 'i', 3, 693, 0 ), /* 692 rl */
- S_ST( 'm', 3, 694, 0 ), /* 693 rli */
- S_ST( 'i', 3, 397, 0 ), /* 694 rlim */
- S_ST( 's', 3, 763, 660 ), /* 695 */
- S_ST( 'a', 3, 697, 0 ), /* 696 s */
- S_ST( 'v', 3, 698, 0 ), /* 697 sa */
- S_ST( 'e', 3, 699, 0 ), /* 698 sav */
- S_ST( 'c', 3, 700, 0 ), /* 699 save */
- S_ST( 'o', 3, 701, 0 ), /* 700 savec */
- S_ST( 'n', 3, 702, 0 ), /* 701 saveco */
- S_ST( 'f', 3, 703, 0 ), /* 702 savecon */
- S_ST( 'i', 3, 704, 0 ), /* 703 saveconf */
- S_ST( 'g', 3, 705, 0 ), /* 704 saveconfi */
- S_ST( 'd', 3, 706, 0 ), /* 705 saveconfig */
- S_ST( 'i', 3, 398, 0 ), /* 706 saveconfigd */
- S_ST( 'e', 3, 717, 696 ), /* 707 s */
- S_ST( 'r', 3, 709, 0 ), /* 708 se */
- S_ST( 'v', 3, 710, 0 ), /* 709 ser */
- S_ST( 'e', 3, 399, 0 ), /* 710 serv */
- S_ST( '_', 3, 712, 0 ), /* 711 server */
- S_ST( 'o', 3, 713, 0 ), /* 712 server_ */
- S_ST( 'f', 3, 714, 0 ), /* 713 server_o */
- S_ST( 'f', 3, 715, 0 ), /* 714 server_of */
- S_ST( 's', 3, 716, 0 ), /* 715 server_off */
- S_ST( 'e', 3, 438, 0 ), /* 716 server_offs */
- S_ST( 't', 3, 718, 708 ), /* 717 se */
- S_ST( 'v', 3, 719, 0 ), /* 718 set */
- S_ST( 'a', 3, 400, 0 ), /* 719 setv */
- S_ST( 'i', 3, 721, 707 ), /* 720 s */
- S_ST( 'm', 3, 722, 0 ), /* 721 si */
- S_ST( 'u', 3, 723, 0 ), /* 722 sim */
- S_ST( 'l', 3, 724, 0 ), /* 723 simu */
- S_ST( 'a', 3, 725, 0 ), /* 724 simul */
- S_ST( 't', 3, 726, 0 ), /* 725 simula */
- S_ST( 'i', 3, 727, 435 ), /* 726 simulat */
- S_ST( 'o', 3, 728, 0 ), /* 727 simulati */
- S_ST( 'n', 3, 729, 0 ), /* 728 simulatio */
- S_ST( '_', 3, 730, 0 ), /* 729 simulation */
- S_ST( 'd', 3, 731, 0 ), /* 730 simulation_ */
- S_ST( 'u', 3, 732, 0 ), /* 731 simulation_d */
- S_ST( 'r', 3, 733, 0 ), /* 732 simulation_du */
- S_ST( 'a', 3, 734, 0 ), /* 733 simulation_dur */
- S_ST( 't', 3, 735, 0 ), /* 734 simulation_dura */
- S_ST( 'i', 3, 736, 0 ), /* 735 simulation_durat */
- S_ST( 'o', 3, 437, 0 ), /* 736 simulation_durati */
- S_ST( 'o', 3, 738, 720 ), /* 737 s */
- S_ST( 'u', 3, 739, 0 ), /* 738 so */
- S_ST( 'r', 3, 740, 0 ), /* 739 sou */
- S_ST( 'c', 3, 401, 0 ), /* 740 sour */
- S_ST( 't', 3, 759, 737 ), /* 741 s */
- S_ST( 'a', 3, 748, 0 ), /* 742 st */
- S_ST( 'c', 3, 744, 0 ), /* 743 sta */
- S_ST( 'k', 3, 745, 0 ), /* 744 stac */
- S_ST( 's', 3, 746, 0 ), /* 745 stack */
- S_ST( 'i', 3, 747, 0 ), /* 746 stacks */
- S_ST( 'z', 3, 402, 0 ), /* 747 stacksi */
- S_ST( 't', 3, 404, 743 ), /* 748 sta */
- S_ST( 'i', 3, 750, 0 ), /* 749 stat */
- S_ST( 's', 3, 751, 0 ), /* 750 stati */
- S_ST( 't', 3, 752, 0 ), /* 751 statis */
- S_ST( 'i', 3, 753, 0 ), /* 752 statist */
- S_ST( 'c', 3, 403, 0 ), /* 753 statisti */
- S_ST( 'd', 3, 755, 0 ), /* 754 stats */
- S_ST( 'i', 3, 405, 0 ), /* 755 statsd */
- S_ST( 'e', 3, 406, 742 ), /* 756 st */
- S_ST( 'o', 3, 758, 0 ), /* 757 step */
- S_ST( 'u', 3, 407, 0 ), /* 758 stepo */
- S_ST( 'r', 3, 760, 756 ), /* 759 st */
- S_ST( 'a', 3, 761, 0 ), /* 760 str */
- S_ST( 't', 3, 762, 0 ), /* 761 stra */
- S_ST( 'u', 3, 408, 0 ), /* 762 strat */
- S_ST( 'y', 3, 410, 741 ), /* 763 s */
- S_ST( 's', 3, 765, 0 ), /* 764 sys */
- S_ST( 't', 3, 766, 0 ), /* 765 syss */
- S_ST( 'a', 3, 767, 0 ), /* 766 sysst */
- S_ST( 't', 3, 411, 0 ), /* 767 syssta */
- S_ST( 't', 3, 794, 695 ), /* 768 */
- S_ST( 'i', 3, 780, 0 ), /* 769 t */
- S_ST( 'c', 3, 412, 0 ), /* 770 ti */
- S_ST( 'm', 3, 773, 770 ), /* 771 ti */
- S_ST( 'e', 3, 415, 0 ), /* 772 tim */
- S_ST( 'i', 3, 774, 772 ), /* 773 tim */
- S_ST( 'n', 3, 775, 0 ), /* 774 timi */
- S_ST( 'g', 3, 776, 0 ), /* 775 timin */
- S_ST( 's', 3, 777, 0 ), /* 776 timing */
- S_ST( 't', 3, 778, 0 ), /* 777 timings */
- S_ST( 'a', 3, 779, 0 ), /* 778 timingst */
- S_ST( 't', 3, 416, 0 ), /* 779 timingsta */
- S_ST( 'n', 3, 781, 771 ), /* 780 ti */
- S_ST( 'k', 3, 782, 0 ), /* 781 tin */
- S_ST( 'e', 3, 417, 0 ), /* 782 tink */
- S_ST( 'o', 3, 418, 769 ), /* 783 t */
- S_ST( 'r', 3, 786, 783 ), /* 784 t */
- S_ST( 'a', 3, 419, 0 ), /* 785 tr */
- S_ST( 'u', 3, 787, 785 ), /* 786 tr */
- S_ST( 's', 3, 788, 420 ), /* 787 tru */
- S_ST( 't', 3, 789, 0 ), /* 788 trus */
- S_ST( 'e', 3, 790, 0 ), /* 789 trust */
- S_ST( 'd', 3, 791, 0 ), /* 790 truste */
- S_ST( 'k', 3, 792, 0 ), /* 791 trusted */
- S_ST( 'e', 3, 421, 0 ), /* 792 trustedk */
- S_ST( 't', 3, 422, 784 ), /* 793 t */
- S_ST( 'y', 3, 795, 793 ), /* 794 t */
- S_ST( 'p', 3, 423, 0 ), /* 795 ty */
- S_ST( 'u', 3, 797, 768 ), /* 796 */
- S_ST( 'n', 3, 803, 0 ), /* 797 u */
- S_ST( 'c', 3, 799, 0 ), /* 798 un */
- S_ST( 'o', 3, 800, 0 ), /* 799 unc */
- S_ST( 'n', 3, 801, 0 ), /* 800 unco */
- S_ST( 'f', 3, 802, 0 ), /* 801 uncon */
- S_ST( 'i', 3, 425, 0 ), /* 802 unconf */
- S_ST( 'p', 3, 804, 798 ), /* 803 un */
- S_ST( 'e', 3, 805, 0 ), /* 804 unp */
- S_ST( 'e', 3, 426, 0 ), /* 805 unpe */
- S_ST( 'v', 3, 807, 796 ), /* 806 */
- S_ST( 'e', 3, 808, 0 ), /* 807 v */
- S_ST( 'r', 3, 809, 0 ), /* 808 ve */
- S_ST( 's', 3, 810, 0 ), /* 809 ver */
- S_ST( 'i', 3, 811, 0 ), /* 810 vers */
- S_ST( 'o', 3, 427, 0 ), /* 811 versi */
- S_ST( 'w', 3, 819, 806 ), /* 812 */
- S_ST( 'a', 3, 814, 0 ), /* 813 w */
- S_ST( 'n', 3, 815, 0 ), /* 814 wa */
- S_ST( 'd', 3, 816, 0 ), /* 815 wan */
- S_ST( 'e', 3, 441, 0 ), /* 816 wand */
- S_ST( 'e', 3, 818, 813 ), /* 817 w */
- S_ST( 'e', 3, 429, 0 ), /* 818 we */
- S_ST( 'i', 3, 820, 817 ), /* 819 w */
- S_ST( 'l', 3, 821, 0 ), /* 820 wi */
- S_ST( 'd', 3, 822, 0 ), /* 821 wil */
- S_ST( 'c', 3, 823, 0 ), /* 822 wild */
- S_ST( 'a', 3, 824, 0 ), /* 823 wildc */
- S_ST( 'r', 3, 430, 0 ), /* 824 wildca */
- S_ST( 'x', 3, 826, 812 ), /* 825 */
- S_ST( 'l', 3, 827, 0 ), /* 826 x */
- S_ST( 'e', 3, 828, 0 ), /* 827 xl */
- S_ST( 'a', 3, 829, 0 ), /* 828 xle */
- S_ST( 'v', 3, 431, 0 ), /* 829 xlea */
- S_ST( 'y', 3, 831, 825 ), /* 830 [initial state] */
- S_ST( 'e', 3, 832, 0 ), /* 831 y */
- S_ST( 'a', 3, 432, 0 ) /* 832 ye */
+ S_ST( 'p', 0, 764, 0 ), /* 406 T_Step */
+ S_ST( 'k', 0, 0, 0 ), /* 407 T_Stepback */
+ S_ST( 'd', 0, 0, 0 ), /* 408 T_Stepfwd */
+ S_ST( 't', 0, 0, 0 ), /* 409 T_Stepout */
+ S_ST( 'm', 0, 0, 0 ), /* 410 T_Stratum */
+ S_ST( 'l', 3, 334, 0 ), /* 411 logfi */
+ S_ST( 's', 0, 771, 0 ), /* 412 T_Sys */
+ S_ST( 's', 0, 0, 0 ), /* 413 T_Sysstats */
+ S_ST( 'k', 0, 0, 0 ), /* 414 T_Tick */
+ S_ST( '1', 0, 0, 0 ), /* 415 T_Time1 */
+ S_ST( '2', 0, 0, 415 ), /* 416 T_Time2 */
+ S_ST( 'r', 0, 0, 416 ), /* 417 T_Timer */
+ S_ST( 's', 0, 0, 0 ), /* 418 T_Timingstats */
+ S_ST( 'r', 0, 0, 0 ), /* 419 T_Tinker */
+ S_ST( 's', 0, 0, 0 ), /* 420 T_Tos */
+ S_ST( 'p', 1, 0, 0 ), /* 421 T_Trap */
+ S_ST( 'e', 0, 0, 0 ), /* 422 T_True */
+ S_ST( 'y', 0, 0, 0 ), /* 423 T_Trustedkey */
+ S_ST( 'l', 0, 0, 0 ), /* 424 T_Ttl */
+ S_ST( 'e', 0, 0, 0 ), /* 425 T_Type */
+ S_ST( 'o', 3, 430, 254 ), /* 426 lo */
+ S_ST( 'g', 1, 0, 0 ), /* 427 T_Unconfig */
+ S_ST( 'r', 1, 0, 0 ), /* 428 T_Unpeer */
+ S_ST( 'n', 0, 0, 0 ), /* 429 T_Version */
+ S_ST( 'p', 3, 435, 0 ), /* 430 loo */
+ S_ST( 'k', 0, 0, 0 ), /* 431 T_Week */
+ S_ST( 'd', 0, 0, 0 ), /* 432 T_Wildcard */
+ S_ST( 'e', 0, 0, 0 ), /* 433 T_Xleave */
+ S_ST( 'r', 0, 0, 0 ), /* 434 T_Year */
+ S_ST( 's', 3, 436, 0 ), /* 435 loop */
+ S_ST( 't', 3, 447, 0 ), /* 436 loops */
+ S_ST( 'e', 0, 0, 0 ), /* 437 T_Simulate */
+ S_ST( 'y', 0, 0, 0 ), /* 438 T_Beep_Delay */
+ S_ST( 'n', 0, 0, 0 ), /* 439 T_Sim_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 440 T_Server_Offset */
+ S_ST( 'n', 0, 0, 0 ), /* 441 T_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 442 T_Freq_Offset */
+ S_ST( 'r', 0, 0, 0 ), /* 443 T_Wander */
+ S_ST( 'r', 0, 0, 0 ), /* 444 T_Jitter */
+ S_ST( 'y', 0, 0, 0 ), /* 445 T_Prop_Delay */
+ S_ST( 'y', 0, 0, 0 ), /* 446 T_Proc_Delay */
+ S_ST( 'a', 3, 448, 0 ), /* 447 loopst */
+ S_ST( 't', 3, 335, 0 ), /* 448 loopsta */
+ S_ST( 'w', 3, 450, 426 ), /* 449 lo */
+ S_ST( 'p', 3, 451, 0 ), /* 450 low */
+ S_ST( 'r', 3, 452, 0 ), /* 451 lowp */
+ S_ST( 'i', 3, 453, 0 ), /* 452 lowpr */
+ S_ST( 'o', 3, 454, 0 ), /* 453 lowpri */
+ S_ST( 't', 3, 455, 0 ), /* 454 lowprio */
+ S_ST( 'r', 3, 456, 0 ), /* 455 lowpriot */
+ S_ST( 'a', 3, 336, 0 ), /* 456 lowpriotr */
+ S_ST( 'm', 3, 538, 237 ), /* 457 */
+ S_ST( 'a', 3, 476, 0 ), /* 458 m */
+ S_ST( 'n', 3, 460, 0 ), /* 459 ma */
+ S_ST( 'y', 3, 461, 0 ), /* 460 man */
+ S_ST( 'c', 3, 462, 0 ), /* 461 many */
+ S_ST( 'a', 3, 463, 0 ), /* 462 manyc */
+ S_ST( 's', 3, 464, 0 ), /* 463 manyca */
+ S_ST( 't', 3, 470, 0 ), /* 464 manycas */
+ S_ST( 'c', 3, 466, 0 ), /* 465 manycast */
+ S_ST( 'l', 3, 467, 0 ), /* 466 manycastc */
+ S_ST( 'i', 3, 468, 0 ), /* 467 manycastcl */
+ S_ST( 'e', 3, 469, 0 ), /* 468 manycastcli */
+ S_ST( 'n', 3, 337, 0 ), /* 469 manycastclie */
+ S_ST( 's', 3, 471, 465 ), /* 470 manycast */
+ S_ST( 'e', 3, 472, 0 ), /* 471 manycasts */
+ S_ST( 'r', 3, 473, 0 ), /* 472 manycastse */
+ S_ST( 'v', 3, 474, 0 ), /* 473 manycastser */
+ S_ST( 'e', 3, 338, 0 ), /* 474 manycastserv */
+ S_ST( 's', 3, 339, 459 ), /* 475 ma */
+ S_ST( 'x', 3, 491, 475 ), /* 476 ma */
+ S_ST( 'a', 3, 478, 0 ), /* 477 max */
+ S_ST( 'g', 3, 340, 0 ), /* 478 maxa */
+ S_ST( 'c', 3, 480, 477 ), /* 479 max */
+ S_ST( 'l', 3, 481, 0 ), /* 480 maxc */
+ S_ST( 'o', 3, 482, 0 ), /* 481 maxcl */
+ S_ST( 'c', 3, 341, 0 ), /* 482 maxclo */
+ S_ST( 'd', 3, 487, 479 ), /* 483 max */
+ S_ST( 'e', 3, 485, 0 ), /* 484 maxd */
+ S_ST( 'p', 3, 486, 0 ), /* 485 maxde */
+ S_ST( 't', 3, 342, 0 ), /* 486 maxdep */
+ S_ST( 'i', 3, 488, 484 ), /* 487 maxd */
+ S_ST( 's', 3, 343, 0 ), /* 488 maxdi */
+ S_ST( 'm', 3, 490, 483 ), /* 489 max */
+ S_ST( 'e', 3, 344, 0 ), /* 490 maxm */
+ S_ST( 'p', 3, 492, 489 ), /* 491 max */
+ S_ST( 'o', 3, 493, 0 ), /* 492 maxp */
+ S_ST( 'l', 3, 345, 0 ), /* 493 maxpo */
+ S_ST( 'd', 3, 495, 458 ), /* 494 m */
+ S_ST( 'n', 3, 496, 0 ), /* 495 md */
+ S_ST( 's', 3, 497, 0 ), /* 496 mdn */
+ S_ST( 't', 3, 498, 0 ), /* 497 mdns */
+ S_ST( 'r', 3, 499, 0 ), /* 498 mdnst */
+ S_ST( 'i', 3, 500, 0 ), /* 499 mdnstr */
+ S_ST( 'e', 3, 346, 0 ), /* 500 mdnstri */
+ S_ST( 'e', 3, 347, 494 ), /* 501 m */
+ S_ST( 'l', 3, 503, 0 ), /* 502 mem */
+ S_ST( 'o', 3, 504, 0 ), /* 503 meml */
+ S_ST( 'c', 3, 348, 0 ), /* 504 memlo */
+ S_ST( 'i', 3, 506, 501 ), /* 505 m */
+ S_ST( 'n', 3, 523, 0 ), /* 506 mi */
+ S_ST( 'c', 3, 508, 0 ), /* 507 min */
+ S_ST( 'l', 3, 509, 0 ), /* 508 minc */
+ S_ST( 'o', 3, 510, 0 ), /* 509 mincl */
+ S_ST( 'c', 3, 349, 0 ), /* 510 minclo */
+ S_ST( 'd', 3, 515, 507 ), /* 511 min */
+ S_ST( 'e', 3, 513, 0 ), /* 512 mind */
+ S_ST( 'p', 3, 514, 0 ), /* 513 minde */
+ S_ST( 't', 3, 350, 0 ), /* 514 mindep */
+ S_ST( 'i', 3, 516, 512 ), /* 515 mind */
+ S_ST( 's', 3, 351, 0 ), /* 516 mindi */
+ S_ST( 'i', 3, 518, 511 ), /* 517 min */
+ S_ST( 'm', 3, 519, 0 ), /* 518 mini */
+ S_ST( 'u', 3, 352, 0 ), /* 519 minim */
+ S_ST( 'p', 3, 521, 517 ), /* 520 min */
+ S_ST( 'o', 3, 522, 0 ), /* 521 minp */
+ S_ST( 'l', 3, 353, 0 ), /* 522 minpo */
+ S_ST( 's', 3, 524, 520 ), /* 523 min */
+ S_ST( 'a', 3, 525, 0 ), /* 524 mins */
+ S_ST( 'n', 3, 354, 0 ), /* 525 minsa */
+ S_ST( 'o', 3, 528, 505 ), /* 526 m */
+ S_ST( 'd', 3, 355, 0 ), /* 527 mo */
+ S_ST( 'n', 3, 532, 527 ), /* 528 mo */
+ S_ST( 'i', 3, 530, 0 ), /* 529 mon */
+ S_ST( 't', 3, 531, 0 ), /* 530 moni */
+ S_ST( 'o', 3, 357, 0 ), /* 531 monit */
+ S_ST( 't', 3, 358, 529 ), /* 532 mon */
+ S_ST( 'r', 3, 359, 526 ), /* 533 m */
+ S_ST( 's', 3, 535, 533 ), /* 534 m */
+ S_ST( 's', 3, 536, 0 ), /* 535 ms */
+ S_ST( 'n', 3, 537, 0 ), /* 536 mss */
+ S_ST( 't', 3, 328, 0 ), /* 537 mssn */
+ S_ST( 'u', 3, 539, 534 ), /* 538 m */
+ S_ST( 'l', 3, 540, 0 ), /* 539 mu */
+ S_ST( 't', 3, 541, 0 ), /* 540 mul */
+ S_ST( 'i', 3, 542, 0 ), /* 541 mult */
+ S_ST( 'c', 3, 543, 0 ), /* 542 multi */
+ S_ST( 'a', 3, 544, 0 ), /* 543 multic */
+ S_ST( 's', 3, 545, 0 ), /* 544 multica */
+ S_ST( 't', 3, 546, 0 ), /* 545 multicas */
+ S_ST( 'c', 3, 547, 0 ), /* 546 multicast */
+ S_ST( 'l', 3, 548, 0 ), /* 547 multicastc */
+ S_ST( 'i', 3, 549, 0 ), /* 548 multicastcl */
+ S_ST( 'e', 3, 550, 0 ), /* 549 multicastcli */
+ S_ST( 'n', 3, 360, 0 ), /* 550 multicastclie */
+ S_ST( 'n', 3, 594, 457 ), /* 551 */
+ S_ST( 'i', 3, 361, 0 ), /* 552 n */
+ S_ST( 'o', 3, 589, 552 ), /* 553 n */
+ S_ST( 'l', 3, 555, 0 ), /* 554 no */
+ S_ST( 'i', 3, 556, 0 ), /* 555 nol */
+ S_ST( 'n', 3, 362, 0 ), /* 556 noli */
+ S_ST( 'm', 3, 562, 554 ), /* 557 no */
+ S_ST( 'o', 3, 559, 0 ), /* 558 nom */
+ S_ST( 'd', 3, 560, 0 ), /* 559 nomo */
+ S_ST( 'i', 3, 561, 0 ), /* 560 nomod */
+ S_ST( 'f', 3, 363, 0 ), /* 561 nomodi */
+ S_ST( 'r', 3, 563, 558 ), /* 562 nom */
+ S_ST( 'u', 3, 564, 0 ), /* 563 nomr */
+ S_ST( 'l', 3, 565, 0 ), /* 564 nomru */
+ S_ST( 'i', 3, 566, 0 ), /* 565 nomrul */
+ S_ST( 's', 3, 364, 0 ), /* 566 nomruli */
+ S_ST( 'n', 3, 568, 557 ), /* 567 no */
+ S_ST( 'v', 3, 569, 365 ), /* 568 non */
+ S_ST( 'o', 3, 570, 0 ), /* 569 nonv */
+ S_ST( 'l', 3, 571, 0 ), /* 570 nonvo */
+ S_ST( 'a', 3, 572, 0 ), /* 571 nonvol */
+ S_ST( 't', 3, 573, 0 ), /* 572 nonvola */
+ S_ST( 'i', 3, 574, 0 ), /* 573 nonvolat */
+ S_ST( 'l', 3, 366, 0 ), /* 574 nonvolati */
+ S_ST( 'p', 3, 576, 567 ), /* 575 no */
+ S_ST( 'e', 3, 577, 0 ), /* 576 nop */
+ S_ST( 'e', 3, 367, 0 ), /* 577 nope */
+ S_ST( 'q', 3, 579, 575 ), /* 578 no */
+ S_ST( 'u', 3, 580, 0 ), /* 579 noq */
+ S_ST( 'e', 3, 581, 0 ), /* 580 noqu */
+ S_ST( 'r', 3, 368, 0 ), /* 581 noque */
+ S_ST( 's', 3, 583, 578 ), /* 582 no */
+ S_ST( 'e', 3, 587, 0 ), /* 583 nos */
+ S_ST( 'l', 3, 585, 0 ), /* 584 nose */
+ S_ST( 'e', 3, 586, 0 ), /* 585 nosel */
+ S_ST( 'c', 3, 369, 0 ), /* 586 nosele */
+ S_ST( 'r', 3, 588, 584 ), /* 587 nose */
+ S_ST( 'v', 3, 370, 0 ), /* 588 noser */
+ S_ST( 't', 3, 590, 582 ), /* 589 no */
+ S_ST( 'r', 3, 592, 0 ), /* 590 not */
+ S_ST( 'a', 3, 371, 0 ), /* 591 notr */
+ S_ST( 'u', 3, 593, 591 ), /* 592 notr */
+ S_ST( 's', 3, 372, 0 ), /* 593 notru */
+ S_ST( 't', 3, 373, 553 ), /* 594 n */
+ S_ST( 'p', 3, 596, 0 ), /* 595 ntp */
+ S_ST( 'o', 3, 597, 0 ), /* 596 ntpp */
+ S_ST( 'r', 3, 374, 0 ), /* 597 ntppo */
+ S_ST( 's', 3, 599, 595 ), /* 598 ntp */
+ S_ST( 'i', 3, 600, 0 ), /* 599 ntps */
+ S_ST( 'g', 3, 601, 0 ), /* 600 ntpsi */
+ S_ST( 'n', 3, 602, 0 ), /* 601 ntpsig */
+ S_ST( 'd', 3, 603, 0 ), /* 602 ntpsign */
+ S_ST( 's', 3, 604, 0 ), /* 603 ntpsignd */
+ S_ST( 'o', 3, 605, 0 ), /* 604 ntpsignds */
+ S_ST( 'c', 3, 606, 0 ), /* 605 ntpsigndso */
+ S_ST( 'k', 3, 607, 0 ), /* 606 ntpsigndsoc */
+ S_ST( 'e', 3, 375, 0 ), /* 607 ntpsigndsock */
+ S_ST( 'o', 3, 609, 551 ), /* 608 */
+ S_ST( 'r', 3, 610, 0 ), /* 609 o */
+ S_ST( 'p', 3, 611, 0 ), /* 610 or */
+ S_ST( 'h', 3, 612, 0 ), /* 611 orp */
+ S_ST( 'a', 3, 376, 0 ), /* 612 orph */
+ S_ST( 'w', 3, 614, 0 ), /* 613 orphan */
+ S_ST( 'a', 3, 615, 0 ), /* 614 orphanw */
+ S_ST( 'i', 3, 377, 0 ), /* 615 orphanwa */
+ S_ST( 'p', 3, 389, 608 ), /* 616 */
+ S_ST( 'a', 3, 618, 0 ), /* 617 p */
+ S_ST( 'n', 3, 619, 0 ), /* 618 pa */
+ S_ST( 'i', 3, 378, 0 ), /* 619 pan */
+ S_ST( 'e', 3, 621, 617 ), /* 620 p */
+ S_ST( 'e', 3, 379, 0 ), /* 621 pe */
+ S_ST( 's', 3, 623, 0 ), /* 622 peer */
+ S_ST( 't', 3, 624, 0 ), /* 623 peers */
+ S_ST( 'a', 3, 625, 0 ), /* 624 peerst */
+ S_ST( 't', 3, 380, 0 ), /* 625 peersta */
+ S_ST( 'h', 3, 627, 620 ), /* 626 p */
+ S_ST( 'o', 3, 628, 0 ), /* 627 ph */
+ S_ST( 'n', 3, 381, 0 ), /* 628 pho */
+ S_ST( 'i', 3, 382, 626 ), /* 629 p */
+ S_ST( 'f', 3, 631, 0 ), /* 630 pid */
+ S_ST( 'i', 3, 632, 0 ), /* 631 pidf */
+ S_ST( 'l', 3, 383, 0 ), /* 632 pidfi */
+ S_ST( 'o', 3, 635, 629 ), /* 633 p */
+ S_ST( 'o', 3, 384, 0 ), /* 634 po */
+ S_ST( 'r', 3, 385, 634 ), /* 635 po */
+ S_ST( 'r', 3, 643, 633 ), /* 636 p */
+ S_ST( 'e', 3, 641, 0 ), /* 637 pr */
+ S_ST( 'e', 3, 639, 0 ), /* 638 pre */
+ S_ST( 'm', 3, 640, 0 ), /* 639 pree */
+ S_ST( 'p', 3, 386, 0 ), /* 640 preem */
+ S_ST( 'f', 3, 642, 638 ), /* 641 pre */
+ S_ST( 'e', 3, 387, 0 ), /* 642 pref */
+ S_ST( 'o', 3, 656, 637 ), /* 643 pr */
+ S_ST( 'c', 3, 645, 0 ), /* 644 pro */
+ S_ST( '_', 3, 646, 0 ), /* 645 proc */
+ S_ST( 'd', 3, 647, 0 ), /* 646 proc_ */
+ S_ST( 'e', 3, 648, 0 ), /* 647 proc_d */
+ S_ST( 'l', 3, 649, 0 ), /* 648 proc_de */
+ S_ST( 'a', 3, 446, 0 ), /* 649 proc_del */
+ S_ST( 'p', 3, 651, 644 ), /* 650 pro */
+ S_ST( '_', 3, 652, 0 ), /* 651 prop */
+ S_ST( 'd', 3, 653, 0 ), /* 652 prop_ */
+ S_ST( 'e', 3, 654, 0 ), /* 653 prop_d */
+ S_ST( 'l', 3, 655, 0 ), /* 654 prop_de */
+ S_ST( 'a', 3, 445, 0 ), /* 655 prop_del */
+ S_ST( 't', 3, 657, 650 ), /* 656 pro */
+ S_ST( 'o', 3, 658, 0 ), /* 657 prot */
+ S_ST( 's', 3, 659, 0 ), /* 658 proto */
+ S_ST( 't', 3, 660, 0 ), /* 659 protos */
+ S_ST( 'a', 3, 661, 0 ), /* 660 protost */
+ S_ST( 't', 3, 388, 0 ), /* 661 protosta */
+ S_ST( 'r', 3, 693, 616 ), /* 662 */
+ S_ST( 'a', 3, 669, 0 ), /* 663 r */
+ S_ST( 'n', 3, 665, 0 ), /* 664 ra */
+ S_ST( 'd', 3, 666, 0 ), /* 665 ran */
+ S_ST( 'f', 3, 667, 0 ), /* 666 rand */
+ S_ST( 'i', 3, 668, 0 ), /* 667 randf */
+ S_ST( 'l', 3, 390, 0 ), /* 668 randfi */
+ S_ST( 'w', 3, 670, 664 ), /* 669 ra */
+ S_ST( 's', 3, 671, 0 ), /* 670 raw */
+ S_ST( 't', 3, 672, 0 ), /* 671 raws */
+ S_ST( 'a', 3, 673, 0 ), /* 672 rawst */
+ S_ST( 't', 3, 391, 0 ), /* 673 rawsta */
+ S_ST( 'e', 3, 690, 663 ), /* 674 r */
+ S_ST( 'f', 3, 676, 0 ), /* 675 re */
+ S_ST( 'i', 3, 392, 0 ), /* 676 ref */
+ S_ST( 'q', 3, 678, 675 ), /* 677 re */
+ S_ST( 'u', 3, 679, 0 ), /* 678 req */
+ S_ST( 'e', 3, 680, 0 ), /* 679 requ */
+ S_ST( 's', 3, 681, 0 ), /* 680 reque */
+ S_ST( 't', 3, 682, 0 ), /* 681 reques */
+ S_ST( 'k', 3, 683, 0 ), /* 682 request */
+ S_ST( 'e', 3, 393, 0 ), /* 683 requestk */
+ S_ST( 's', 3, 686, 677 ), /* 684 re */
+ S_ST( 'e', 3, 394, 0 ), /* 685 res */
+ S_ST( 't', 3, 687, 685 ), /* 686 res */
+ S_ST( 'r', 3, 688, 0 ), /* 687 rest */
+ S_ST( 'i', 3, 689, 0 ), /* 688 restr */
+ S_ST( 'c', 3, 395, 0 ), /* 689 restri */
+ S_ST( 'v', 3, 691, 684 ), /* 690 re */
+ S_ST( 'o', 3, 692, 0 ), /* 691 rev */
+ S_ST( 'k', 3, 396, 0 ), /* 692 revo */
+ S_ST( 'l', 3, 694, 674 ), /* 693 r */
+ S_ST( 'i', 3, 695, 0 ), /* 694 rl */
+ S_ST( 'm', 3, 696, 0 ), /* 695 rli */
+ S_ST( 'i', 3, 397, 0 ), /* 696 rlim */
+ S_ST( 's', 3, 770, 662 ), /* 697 */
+ S_ST( 'a', 3, 699, 0 ), /* 698 s */
+ S_ST( 'v', 3, 700, 0 ), /* 699 sa */
+ S_ST( 'e', 3, 701, 0 ), /* 700 sav */
+ S_ST( 'c', 3, 702, 0 ), /* 701 save */
+ S_ST( 'o', 3, 703, 0 ), /* 702 savec */
+ S_ST( 'n', 3, 704, 0 ), /* 703 saveco */
+ S_ST( 'f', 3, 705, 0 ), /* 704 savecon */
+ S_ST( 'i', 3, 706, 0 ), /* 705 saveconf */
+ S_ST( 'g', 3, 707, 0 ), /* 706 saveconfi */
+ S_ST( 'd', 3, 708, 0 ), /* 707 saveconfig */
+ S_ST( 'i', 3, 398, 0 ), /* 708 saveconfigd */
+ S_ST( 'e', 3, 719, 698 ), /* 709 s */
+ S_ST( 'r', 3, 711, 0 ), /* 710 se */
+ S_ST( 'v', 3, 712, 0 ), /* 711 ser */
+ S_ST( 'e', 3, 399, 0 ), /* 712 serv */
+ S_ST( '_', 3, 714, 0 ), /* 713 server */
+ S_ST( 'o', 3, 715, 0 ), /* 714 server_ */
+ S_ST( 'f', 3, 716, 0 ), /* 715 server_o */
+ S_ST( 'f', 3, 717, 0 ), /* 716 server_of */
+ S_ST( 's', 3, 718, 0 ), /* 717 server_off */
+ S_ST( 'e', 3, 440, 0 ), /* 718 server_offs */
+ S_ST( 't', 3, 720, 710 ), /* 719 se */
+ S_ST( 'v', 3, 721, 0 ), /* 720 set */
+ S_ST( 'a', 3, 400, 0 ), /* 721 setv */
+ S_ST( 'i', 3, 723, 709 ), /* 722 s */
+ S_ST( 'm', 3, 724, 0 ), /* 723 si */
+ S_ST( 'u', 3, 725, 0 ), /* 724 sim */
+ S_ST( 'l', 3, 726, 0 ), /* 725 simu */
+ S_ST( 'a', 3, 727, 0 ), /* 726 simul */
+ S_ST( 't', 3, 728, 0 ), /* 727 simula */
+ S_ST( 'i', 3, 729, 437 ), /* 728 simulat */
+ S_ST( 'o', 3, 730, 0 ), /* 729 simulati */
+ S_ST( 'n', 3, 731, 0 ), /* 730 simulatio */
+ S_ST( '_', 3, 732, 0 ), /* 731 simulation */
+ S_ST( 'd', 3, 733, 0 ), /* 732 simulation_ */
+ S_ST( 'u', 3, 734, 0 ), /* 733 simulation_d */
+ S_ST( 'r', 3, 735, 0 ), /* 734 simulation_du */
+ S_ST( 'a', 3, 736, 0 ), /* 735 simulation_dur */
+ S_ST( 't', 3, 737, 0 ), /* 736 simulation_dura */
+ S_ST( 'i', 3, 738, 0 ), /* 737 simulation_durat */
+ S_ST( 'o', 3, 439, 0 ), /* 738 simulation_durati */
+ S_ST( 'o', 3, 740, 722 ), /* 739 s */
+ S_ST( 'u', 3, 741, 0 ), /* 740 so */
+ S_ST( 'r', 3, 742, 0 ), /* 741 sou */
+ S_ST( 'c', 3, 401, 0 ), /* 742 sour */
+ S_ST( 't', 3, 766, 739 ), /* 743 s */
+ S_ST( 'a', 3, 750, 0 ), /* 744 st */
+ S_ST( 'c', 3, 746, 0 ), /* 745 sta */
+ S_ST( 'k', 3, 747, 0 ), /* 746 stac */
+ S_ST( 's', 3, 748, 0 ), /* 747 stack */
+ S_ST( 'i', 3, 749, 0 ), /* 748 stacks */
+ S_ST( 'z', 3, 402, 0 ), /* 749 stacksi */
+ S_ST( 't', 3, 404, 745 ), /* 750 sta */
+ S_ST( 'i', 3, 752, 0 ), /* 751 stat */
+ S_ST( 's', 3, 753, 0 ), /* 752 stati */
+ S_ST( 't', 3, 754, 0 ), /* 753 statis */
+ S_ST( 'i', 3, 755, 0 ), /* 754 statist */
+ S_ST( 'c', 3, 403, 0 ), /* 755 statisti */
+ S_ST( 'd', 3, 757, 0 ), /* 756 stats */
+ S_ST( 'i', 3, 405, 0 ), /* 757 statsd */
+ S_ST( 'e', 3, 406, 744 ), /* 758 st */
+ S_ST( 'b', 3, 760, 0 ), /* 759 step */
+ S_ST( 'a', 3, 761, 0 ), /* 760 stepb */
+ S_ST( 'c', 3, 407, 0 ), /* 761 stepba */
+ S_ST( 'f', 3, 763, 759 ), /* 762 step */
+ S_ST( 'w', 3, 408, 0 ), /* 763 stepf */
+ S_ST( 'o', 3, 765, 762 ), /* 764 step */
+ S_ST( 'u', 3, 409, 0 ), /* 765 stepo */
+ S_ST( 'r', 3, 767, 758 ), /* 766 st */
+ S_ST( 'a', 3, 768, 0 ), /* 767 str */
+ S_ST( 't', 3, 769, 0 ), /* 768 stra */
+ S_ST( 'u', 3, 410, 0 ), /* 769 strat */
+ S_ST( 'y', 3, 412, 743 ), /* 770 s */
+ S_ST( 's', 3, 772, 0 ), /* 771 sys */
+ S_ST( 't', 3, 773, 0 ), /* 772 syss */
+ S_ST( 'a', 3, 774, 0 ), /* 773 sysst */
+ S_ST( 't', 3, 413, 0 ), /* 774 syssta */
+ S_ST( 't', 3, 801, 697 ), /* 775 */
+ S_ST( 'i', 3, 787, 0 ), /* 776 t */
+ S_ST( 'c', 3, 414, 0 ), /* 777 ti */
+ S_ST( 'm', 3, 780, 777 ), /* 778 ti */
+ S_ST( 'e', 3, 417, 0 ), /* 779 tim */
+ S_ST( 'i', 3, 781, 779 ), /* 780 tim */
+ S_ST( 'n', 3, 782, 0 ), /* 781 timi */
+ S_ST( 'g', 3, 783, 0 ), /* 782 timin */
+ S_ST( 's', 3, 784, 0 ), /* 783 timing */
+ S_ST( 't', 3, 785, 0 ), /* 784 timings */
+ S_ST( 'a', 3, 786, 0 ), /* 785 timingst */
+ S_ST( 't', 3, 418, 0 ), /* 786 timingsta */
+ S_ST( 'n', 3, 788, 778 ), /* 787 ti */
+ S_ST( 'k', 3, 789, 0 ), /* 788 tin */
+ S_ST( 'e', 3, 419, 0 ), /* 789 tink */
+ S_ST( 'o', 3, 420, 776 ), /* 790 t */
+ S_ST( 'r', 3, 793, 790 ), /* 791 t */
+ S_ST( 'a', 3, 421, 0 ), /* 792 tr */
+ S_ST( 'u', 3, 794, 792 ), /* 793 tr */
+ S_ST( 's', 3, 795, 422 ), /* 794 tru */
+ S_ST( 't', 3, 796, 0 ), /* 795 trus */
+ S_ST( 'e', 3, 797, 0 ), /* 796 trust */
+ S_ST( 'd', 3, 798, 0 ), /* 797 truste */
+ S_ST( 'k', 3, 799, 0 ), /* 798 trusted */
+ S_ST( 'e', 3, 423, 0 ), /* 799 trustedk */
+ S_ST( 't', 3, 424, 791 ), /* 800 t */
+ S_ST( 'y', 3, 802, 800 ), /* 801 t */
+ S_ST( 'p', 3, 425, 0 ), /* 802 ty */
+ S_ST( 'u', 3, 804, 775 ), /* 803 */
+ S_ST( 'n', 3, 810, 0 ), /* 804 u */
+ S_ST( 'c', 3, 806, 0 ), /* 805 un */
+ S_ST( 'o', 3, 807, 0 ), /* 806 unc */
+ S_ST( 'n', 3, 808, 0 ), /* 807 unco */
+ S_ST( 'f', 3, 809, 0 ), /* 808 uncon */
+ S_ST( 'i', 3, 427, 0 ), /* 809 unconf */
+ S_ST( 'p', 3, 811, 805 ), /* 810 un */
+ S_ST( 'e', 3, 812, 0 ), /* 811 unp */
+ S_ST( 'e', 3, 428, 0 ), /* 812 unpe */
+ S_ST( 'v', 3, 814, 803 ), /* 813 */
+ S_ST( 'e', 3, 815, 0 ), /* 814 v */
+ S_ST( 'r', 3, 816, 0 ), /* 815 ve */
+ S_ST( 's', 3, 817, 0 ), /* 816 ver */
+ S_ST( 'i', 3, 818, 0 ), /* 817 vers */
+ S_ST( 'o', 3, 429, 0 ), /* 818 versi */
+ S_ST( 'w', 3, 826, 813 ), /* 819 */
+ S_ST( 'a', 3, 821, 0 ), /* 820 w */
+ S_ST( 'n', 3, 822, 0 ), /* 821 wa */
+ S_ST( 'd', 3, 823, 0 ), /* 822 wan */
+ S_ST( 'e', 3, 443, 0 ), /* 823 wand */
+ S_ST( 'e', 3, 825, 820 ), /* 824 w */
+ S_ST( 'e', 3, 431, 0 ), /* 825 we */
+ S_ST( 'i', 3, 827, 824 ), /* 826 w */
+ S_ST( 'l', 3, 828, 0 ), /* 827 wi */
+ S_ST( 'd', 3, 829, 0 ), /* 828 wil */
+ S_ST( 'c', 3, 830, 0 ), /* 829 wild */
+ S_ST( 'a', 3, 831, 0 ), /* 830 wildc */
+ S_ST( 'r', 3, 432, 0 ), /* 831 wildca */
+ S_ST( 'x', 3, 833, 819 ), /* 832 */
+ S_ST( 'l', 3, 834, 0 ), /* 833 x */
+ S_ST( 'e', 3, 835, 0 ), /* 834 xl */
+ S_ST( 'a', 3, 836, 0 ), /* 835 xle */
+ S_ST( 'v', 3, 433, 0 ), /* 836 xlea */
+ S_ST( 'y', 3, 838, 832 ), /* 837 [initial state] */
+ S_ST( 'e', 3, 839, 0 ), /* 838 y */
+ S_ST( 'a', 3, 434, 0 ) /* 839 ye */
};
diff --git a/ntpd/ntp_leapsec.c b/ntpd/ntp_leapsec.c
index ec42a9740a07..eeef89f3c648 100644
--- a/ntpd/ntp_leapsec.c
+++ b/ntpd/ntp_leapsec.c
@@ -787,7 +787,7 @@ leapsec_add(
const vint64 * now64 ,
int insert)
{
- vint64 ttime, stime;
+ vint64 ttime, starttime;
struct calendar fts;
leap_info_t li;
@@ -815,12 +815,12 @@ leapsec_add(
fts.hour = 0;
fts.minute = 0;
fts.second = 0;
- stime = ntpcal_date_to_ntp64(&fts);
+ starttime = ntpcal_date_to_ntp64(&fts);
fts.month++;
ttime = ntpcal_date_to_ntp64(&fts);
li.ttime = ttime;
- li.stime = ttime.D_s.lo - stime.D_s.lo;
+ li.stime = ttime.D_s.lo - starttime.D_s.lo;
li.taiof = (pt->head.size ? pt->info[0].taiof : pt->head.base_tai)
+ (insert ? 1 : -1);
li.dynls = 1;
@@ -839,7 +839,7 @@ leapsec_raw(
int taiof,
int dynls)
{
- vint64 stime;
+ vint64 starttime;
struct calendar fts;
leap_info_t li;
@@ -856,9 +856,9 @@ leapsec_raw(
return FALSE;
}
fts.month--; /* was in range 1..12, no overflow here! */
- stime = ntpcal_date_to_ntp64(&fts);
+ starttime = ntpcal_date_to_ntp64(&fts);
li.ttime = *ttime;
- li.stime = ttime->D_s.lo - stime.D_s.lo;
+ li.stime = ttime->D_s.lo - starttime.D_s.lo;
li.taiof = (int16_t)taiof;
li.dynls = (dynls != 0);
return add_range(pt, &li);
diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c
index 82ff1632e518..e47f83b976a2 100644
--- a/ntpd/ntp_loopfilter.c
+++ b/ntpd/ntp_loopfilter.c
@@ -46,7 +46,7 @@
#define CLOCK_LIMIT 30 /* poll-adjust threshold */
#define CLOCK_PGATE 4. /* poll-adjust gate */
#define PPS_MAXAGE 120 /* kernel pps signal timeout (s) */
-#define FREQTOD(x) ((x) / 65536e6) /* NTP to double */
+#define FREQTOD(x) ((x) / 65536e6) /* NTP to double */
#define DTOFREQ(x) ((int32)((x) * 65536e6)) /* double to NTP */
/*
@@ -106,7 +106,8 @@
/*
* Program variables that can be tinkered.
*/
-double clock_max = CLOCK_MAX; /* step threshold */
+double clock_max_back = CLOCK_MAX; /* step threshold */
+double clock_max_fwd = CLOCK_MAX; /* step threshold */
double clock_minstep = CLOCK_MINSTEP; /* stepout threshold */
double clock_panic = CLOCK_PANIC; /* panic threshold */
double clock_phi = CLOCK_PHI; /* dispersion rate (s/s) */
@@ -152,8 +153,10 @@ int kern_enable = TRUE; /* kernel support enabled */
int hardpps_enable; /* kernel PPS discipline enabled */
int ext_enable; /* external clock enabled */
int pps_stratum; /* pps stratum */
-int allow_panic = FALSE; /* allow panic correction */
-int mode_ntpdate = FALSE; /* exit on first clock set */
+int kernel_status; /* from ntp_adjtime */
+int allow_panic = FALSE; /* allow panic correction (-g) */
+int force_step_once = FALSE; /* always step time once at startup (-G) */
+int mode_ntpdate = FALSE; /* exit on first clock set (-q) */
int freq_cnt; /* initial frequency clamp */
int freq_set; /* initial set frequency switch */
@@ -279,47 +282,69 @@ ntp_adjtime_error_handler(
}
break;
#ifdef TIME_OK
- case TIME_OK: /* 0 no leap second warning */
- /* OK means OK */
+ case TIME_OK: /* 0: synchronized, no leap second warning */
+ /* msyslog(LOG_INFO, "kernel reports time is synchronized normally"); */
break;
+#else
+# warning TIME_OK is not defined
#endif
#ifdef TIME_INS
- case TIME_INS: /* 1 positive leap second warning */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports positive leap second warning state",
- caller, file_name(), line
- );
+ case TIME_INS: /* 1: positive leap second warning */
+ msyslog(LOG_INFO, "kernel reports leap second insertion scheduled");
break;
+#else
+# warning TIME_INS is not defined
#endif
#ifdef TIME_DEL
- case TIME_DEL: /* 2 negative leap second warning */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports negative leap second warning state",
- caller, file_name(), line
- );
+ case TIME_DEL: /* 2: negative leap second warning */
+ msyslog(LOG_INFO, "kernel reports leap second deletion scheduled");
break;
+#else
+# warning TIME_DEL is not defined
#endif
#ifdef TIME_OOP
- case TIME_OOP: /* 3 leap second in progress */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second in progress",
- caller, file_name(), line
- );
+ case TIME_OOP: /* 3: leap second in progress */
+ msyslog(LOG_INFO, "kernel reports leap second in progress");
break;
+#else
+# warning TIME_OOP is not defined
#endif
#ifdef TIME_WAIT
- case TIME_WAIT: /* 4 leap second has occured */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second has occured",
- caller, file_name(), line
- );
+ case TIME_WAIT: /* 4: leap second has occured */
+ msyslog(LOG_INFO, "kernel reports leap second has occurred");
break;
+#else
+# warning TIME_WAIT is not defined
#endif
#ifdef TIME_ERROR
- case TIME_ERROR: /* loss of synchronization */
+ case TIME_ERROR: /* 5: unsynchronized, or loss of synchronization */
+ /* error (see status word) */
if (pps_call && !(ptimex->status & STA_PPSSIGNAL))
report_event(EVNT_KERN, NULL,
"PPS no signal");
errno = saved_errno;
DPRINTF(1, ("kernel loop status (%s) %d %m\n",
k_st_flags(ptimex->status), errno));
+ /*
+ * This code may be returned when ntp_adjtime() has just
+ * been called for the first time, quite a while after
+ * startup, when ntpd just starts to discipline the kernel
+ * time. In this case the occurrence of this message
+ * can be pretty confusing.
+ *
+ * HMS: How about a message when we begin kernel processing:
+ * Determining kernel clock state...
+ * so an initial TIME_ERROR message is less confising,
+ * or skipping the first message (ugh),
+ * or ???
+ * msyslog(LOG_INFO, "kernel reports time synchronization lost");
+ */
+ errno = saved_errno; /* may not be needed */
+ msyslog(LOG_INFO, "kernel reports TIME_ERROR: %#x: %s %m",
+ ptimex->status, k_st_flags(ptimex->status));
break;
+#else
+# warning TIME_ERROR is not defined
#endif
default:
msyslog(LOG_NOTICE, "%s: %s line %d: unhandled return value %d from ntp_adjtime in %s at line %d",
@@ -403,7 +428,8 @@ local_clock(
* directly to the terminal.
*/
if (mode_ntpdate) {
- if (fabs(fp_offset) > clock_max && clock_max > 0) {
+ if ( ( fp_offset > clock_max_fwd && clock_max_fwd > 0)
+ || (-fp_offset > clock_max_back && clock_max_back > 0)) {
step_systime(fp_offset);
msyslog(LOG_NOTICE, "ntpd: time set %+.6f s",
fp_offset);
@@ -452,10 +478,10 @@ local_clock(
* threshold (128 ms) and when it does not. Under certain
* conditions updates are suspended until the stepout theshold
* (900 s) is exceeded. See the documentation on how these
- * thresholds interact with commands and command line options.
+ * thresholds interact with commands and command line options.
*
* Note the kernel is disabled if step is disabled or greater
- * than 0.5 s or in ntpdate mode.
+ * than 0.5 s or in ntpdate mode.
*/
osys_poll = sys_poll;
if (sys_poll < peer->minpoll)
@@ -465,7 +491,14 @@ local_clock(
mu = current_time - clock_epoch;
clock_frequency = drift_comp;
rval = 1;
- if (fabs(fp_offset) > clock_max && clock_max > 0) {
+ if ( ( fp_offset > clock_max_fwd && clock_max_fwd > 0)
+ || (-fp_offset > clock_max_back && clock_max_back > 0)
+ || force_step_once ) {
+ if (force_step_once) {
+ force_step_once = FALSE; /* we want this only once after startup */
+ msyslog(LOG_NOTICE, "Doing intital time step" );
+ }
+
switch (state) {
/*
@@ -525,7 +558,7 @@ local_clock(
* threshold. Note that a single spike greater than the
* step threshold is always suppressed, even with a
* long time constant.
- */
+ */
default:
snprintf(tbuf, sizeof(tbuf), "%+.6f s",
fp_offset);
@@ -543,7 +576,6 @@ local_clock(
}
rstclock(EVNT_SYNC, 0);
} else {
-
/*
* The offset is less than the step threshold. Calculate
* the jitter as the exponentially weighted offset
@@ -605,9 +637,9 @@ local_clock(
/*
* The PLL frequency gain (numerator) depends on
* the minimum of the update interval and Allan
- * intercept. This reduces the PLL gain when the
+ * intercept. This reduces the PLL gain when the
* FLL becomes effective.
- */
+ */
etemp = min(ULOGTOD(allan_xpt), mu);
dtemp = 4 * CLOCK_PLL * ULOGTOD(sys_poll);
clock_frequency += fp_offset * etemp / (dtemp *
@@ -706,8 +738,13 @@ local_clock(
* the pps. In any case, fetch the kernel offset,
* frequency and jitter.
*/
- if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
- ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
+ ntp_adj_ret = ntp_adjtime(&ntv);
+ /*
+ * A squeal is a return status < 0, or a state change.
+ */
+ if ((0 > ntp_adj_ret) || (ntp_adj_ret != kernel_status)) {
+ kernel_status = ntp_adj_ret;
+ ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
}
pll_status = ntv.status;
#ifdef STA_NANO
@@ -888,7 +925,7 @@ adj_host_clock(
clock_offset -= offset_adj;
/*
* Windows port adj_systime() must be called each second,
- * even if the argument is zero, to ease emulation of
+ * even if the argument is zero, to ease emulation of
* adjtime() using Windows' slew API which controls the rate
* but does not automatically stop slewing when an offset
* has decayed to zero.
@@ -917,7 +954,7 @@ rstclock(
report_event(trans, NULL, NULL);
state = trans;
last_offset = clock_offset = offset;
- clock_epoch = current_time;
+ clock_epoch = current_time;
}
@@ -1190,12 +1227,12 @@ loop_config(
case LOOP_CODEC: /* audio codec frequency (codec) */
clock_codec = freq / 1e6;
break;
-
+
case LOOP_PHI: /* dispersion threshold (dispersion) */
clock_phi = freq / 1e6;
break;
- case LOOP_FREQ: /* initial frequency (freq) */
+ case LOOP_FREQ: /* initial frequency (freq) */
init_drift_comp = freq;
freq_set++;
break;
@@ -1216,8 +1253,27 @@ loop_config(
break;
case LOOP_MAX: /* step threshold (step) */
- clock_max = freq;
- if (clock_max == 0 || clock_max > 0.5)
+ clock_max_fwd = clock_max_back = freq;
+ if (freq == 0 || freq > 0.5)
+ select_loop(FALSE);
+ break;
+
+ case LOOP_MAX_BACK: /* step threshold (step) */
+ clock_max_back = freq;
+ /*
+ * Leave using the kernel discipline code unless both
+ * limits are massive. This assumes the reason to stop
+ * using it is that it's pointless, not that it goes wrong.
+ */
+ if ( (clock_max_back == 0 || clock_max_back > 0.5)
+ || (clock_max_fwd == 0 || clock_max_fwd > 0.5))
+ select_loop(FALSE);
+ break;
+
+ case LOOP_MAX_FWD: /* step threshold (step) */
+ clock_max_fwd = freq;
+ if ( (clock_max_back == 0 || clock_max_back > 0.5)
+ || (clock_max_fwd == 0 || clock_max_fwd > 0.5))
select_loop(FALSE);
break;
@@ -1225,7 +1281,7 @@ loop_config(
if (freq < CLOCK_MINSTEP)
clock_minstep = CLOCK_MINSTEP;
else
- clock_minstep = freq;
+ clock_minstep = freq;
break;
case LOOP_TICK: /* tick increment (tick) */
diff --git a/ntpd/ntp_parser.c b/ntpd/ntp_parser.c
index de3d73cedd65..0cf55197ac6c 100644
--- a/ntpd/ntp_parser.c
+++ b/ntpd/ntp_parser.c
@@ -280,44 +280,46 @@ extern int yydebug;
T_Stats = 404,
T_Statsdir = 405,
T_Step = 406,
- T_Stepout = 407,
- T_Stratum = 408,
- T_String = 409,
- T_Sys = 410,
- T_Sysstats = 411,
- T_Tick = 412,
- T_Time1 = 413,
- T_Time2 = 414,
- T_Timer = 415,
- T_Timingstats = 416,
- T_Tinker = 417,
- T_Tos = 418,
- T_Trap = 419,
- T_True = 420,
- T_Trustedkey = 421,
- T_Ttl = 422,
- T_Type = 423,
- T_U_int = 424,
- T_Unconfig = 425,
- T_Unpeer = 426,
- T_Version = 427,
- T_WanderThreshold = 428,
- T_Week = 429,
- T_Wildcard = 430,
- T_Xleave = 431,
- T_Year = 432,
- T_Flag = 433,
- T_EOC = 434,
- T_Simulate = 435,
- T_Beep_Delay = 436,
- T_Sim_Duration = 437,
- T_Server_Offset = 438,
- T_Duration = 439,
- T_Freq_Offset = 440,
- T_Wander = 441,
- T_Jitter = 442,
- T_Prop_Delay = 443,
- T_Proc_Delay = 444
+ T_Stepback = 407,
+ T_Stepfwd = 408,
+ T_Stepout = 409,
+ T_Stratum = 410,
+ T_String = 411,
+ T_Sys = 412,
+ T_Sysstats = 413,
+ T_Tick = 414,
+ T_Time1 = 415,
+ T_Time2 = 416,
+ T_Timer = 417,
+ T_Timingstats = 418,
+ T_Tinker = 419,
+ T_Tos = 420,
+ T_Trap = 421,
+ T_True = 422,
+ T_Trustedkey = 423,
+ T_Ttl = 424,
+ T_Type = 425,
+ T_U_int = 426,
+ T_Unconfig = 427,
+ T_Unpeer = 428,
+ T_Version = 429,
+ T_WanderThreshold = 430,
+ T_Week = 431,
+ T_Wildcard = 432,
+ T_Xleave = 433,
+ T_Year = 434,
+ T_Flag = 435,
+ T_EOC = 436,
+ T_Simulate = 437,
+ T_Beep_Delay = 438,
+ T_Sim_Duration = 439,
+ T_Server_Offset = 440,
+ T_Duration = 441,
+ T_Freq_Offset = 442,
+ T_Wander = 443,
+ T_Jitter = 444,
+ T_Prop_Delay = 445,
+ T_Proc_Delay = 446
};
#endif
/* Tokens. */
@@ -470,44 +472,46 @@ extern int yydebug;
#define T_Stats 404
#define T_Statsdir 405
#define T_Step 406
-#define T_Stepout 407
-#define T_Stratum 408
-#define T_String 409
-#define T_Sys 410
-#define T_Sysstats 411
-#define T_Tick 412
-#define T_Time1 413
-#define T_Time2 414
-#define T_Timer 415
-#define T_Timingstats 416
-#define T_Tinker 417
-#define T_Tos 418
-#define T_Trap 419
-#define T_True 420
-#define T_Trustedkey 421
-#define T_Ttl 422
-#define T_Type 423
-#define T_U_int 424
-#define T_Unconfig 425
-#define T_Unpeer 426
-#define T_Version 427
-#define T_WanderThreshold 428
-#define T_Week 429
-#define T_Wildcard 430
-#define T_Xleave 431
-#define T_Year 432
-#define T_Flag 433
-#define T_EOC 434
-#define T_Simulate 435
-#define T_Beep_Delay 436
-#define T_Sim_Duration 437
-#define T_Server_Offset 438
-#define T_Duration 439
-#define T_Freq_Offset 440
-#define T_Wander 441
-#define T_Jitter 442
-#define T_Prop_Delay 443
-#define T_Proc_Delay 444
+#define T_Stepback 407
+#define T_Stepfwd 408
+#define T_Stepout 409
+#define T_Stratum 410
+#define T_String 411
+#define T_Sys 412
+#define T_Sysstats 413
+#define T_Tick 414
+#define T_Time1 415
+#define T_Time2 416
+#define T_Timer 417
+#define T_Timingstats 418
+#define T_Tinker 419
+#define T_Tos 420
+#define T_Trap 421
+#define T_True 422
+#define T_Trustedkey 423
+#define T_Ttl 424
+#define T_Type 425
+#define T_U_int 426
+#define T_Unconfig 427
+#define T_Unpeer 428
+#define T_Version 429
+#define T_WanderThreshold 430
+#define T_Week 431
+#define T_Wildcard 432
+#define T_Xleave 433
+#define T_Year 434
+#define T_Flag 435
+#define T_EOC 436
+#define T_Simulate 437
+#define T_Beep_Delay 438
+#define T_Sim_Duration 439
+#define T_Server_Offset 440
+#define T_Duration 441
+#define T_Freq_Offset 442
+#define T_Wander 443
+#define T_Jitter 444
+#define T_Prop_Delay 445
+#define T_Proc_Delay 446
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -533,7 +537,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 537 "ntp_parser.c" /* yacc.c:355 */
+#line 541 "ntp_parser.c" /* yacc.c:355 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -548,7 +552,7 @@ int yyparse (struct FILE_INFO *ip_file);
/* Copy the second part of user declarations. */
-#line 552 "ntp_parser.c" /* yacc.c:358 */
+#line 556 "ntp_parser.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -788,23 +792,23 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 205
+#define YYFINAL 207
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 634
+#define YYLAST 622
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 195
+#define YYNTOKENS 197
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 104
/* YYNRULES -- Number of rules. */
-#define YYNRULES 308
+#define YYNRULES 310
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 413
+#define YYNSTATES 415
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 444
+#define YYMAXUTOK 446
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -817,15 +821,15 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 191, 192, 2, 2, 2, 2, 2, 2, 2, 2,
+ 193, 194, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 190, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 192, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 193, 2, 194, 2, 2, 2, 2,
+ 2, 2, 2, 195, 2, 196, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -857,44 +861,45 @@ static const yytype_uint8 yytranslate[] =
155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
- 185, 186, 187, 188, 189
+ 185, 186, 187, 188, 189, 190, 191
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 364, 364, 368, 369, 370, 384, 385, 386, 387,
- 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
- 405, 415, 416, 417, 418, 419, 423, 424, 429, 434,
- 436, 442, 443, 451, 452, 453, 457, 462, 463, 464,
- 465, 466, 467, 468, 469, 473, 475, 480, 481, 482,
- 483, 484, 485, 489, 494, 503, 513, 514, 524, 526,
- 528, 530, 541, 548, 550, 555, 557, 559, 561, 563,
- 572, 578, 579, 587, 589, 601, 602, 603, 604, 605,
- 614, 619, 624, 632, 634, 636, 641, 642, 643, 644,
- 645, 646, 650, 651, 652, 653, 662, 664, 673, 683,
- 688, 696, 697, 698, 699, 700, 701, 702, 703, 708,
- 709, 717, 727, 736, 751, 756, 757, 761, 762, 766,
- 767, 768, 769, 770, 771, 772, 781, 785, 789, 797,
- 805, 813, 828, 843, 856, 857, 865, 866, 867, 868,
- 869, 870, 871, 872, 873, 874, 875, 876, 877, 878,
- 879, 883, 888, 896, 901, 902, 903, 907, 912, 920,
- 925, 926, 927, 928, 929, 930, 931, 932, 940, 950,
- 955, 963, 965, 967, 969, 971, 976, 977, 981, 982,
- 983, 984, 992, 997, 1002, 1010, 1015, 1016, 1017, 1026,
- 1028, 1033, 1038, 1046, 1048, 1065, 1066, 1067, 1068, 1069,
- 1070, 1074, 1075, 1083, 1088, 1093, 1101, 1106, 1107, 1108,
- 1109, 1110, 1111, 1112, 1113, 1122, 1123, 1124, 1131, 1138,
- 1154, 1173, 1178, 1180, 1182, 1184, 1186, 1193, 1198, 1199,
- 1200, 1204, 1205, 1206, 1210, 1211, 1215, 1222, 1232, 1241,
- 1246, 1248, 1253, 1254, 1262, 1264, 1272, 1277, 1285, 1310,
- 1317, 1327, 1328, 1332, 1333, 1334, 1335, 1339, 1340, 1341,
- 1345, 1350, 1355, 1363, 1364, 1365, 1366, 1367, 1368, 1369,
- 1379, 1384, 1392, 1397, 1405, 1407, 1411, 1416, 1421, 1429,
- 1434, 1442, 1451, 1452, 1456, 1457, 1466, 1484, 1488, 1493,
- 1501, 1506, 1507, 1511, 1516, 1524, 1529, 1534, 1539, 1544,
- 1552, 1557, 1562, 1570, 1575, 1576, 1577, 1578, 1579
+ 0, 366, 366, 370, 371, 372, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 407, 417, 418, 419, 420, 421, 425, 426, 431, 436,
+ 438, 444, 445, 453, 454, 455, 459, 464, 465, 466,
+ 467, 468, 469, 470, 471, 475, 477, 482, 483, 484,
+ 485, 486, 487, 491, 496, 505, 515, 516, 526, 528,
+ 530, 532, 543, 550, 552, 557, 559, 561, 563, 565,
+ 574, 580, 581, 589, 591, 603, 604, 605, 606, 607,
+ 616, 621, 626, 634, 636, 638, 643, 644, 645, 646,
+ 647, 648, 652, 653, 654, 655, 664, 666, 675, 685,
+ 690, 698, 699, 700, 701, 702, 703, 704, 705, 710,
+ 711, 719, 729, 738, 753, 758, 759, 763, 764, 768,
+ 769, 770, 771, 772, 773, 774, 783, 787, 791, 799,
+ 807, 815, 830, 845, 858, 859, 867, 868, 869, 870,
+ 871, 872, 873, 874, 875, 876, 877, 878, 879, 880,
+ 881, 885, 890, 898, 903, 904, 905, 909, 914, 922,
+ 927, 928, 929, 930, 931, 932, 933, 934, 942, 952,
+ 957, 965, 967, 969, 971, 973, 978, 979, 983, 984,
+ 985, 986, 994, 999, 1004, 1012, 1017, 1018, 1019, 1028,
+ 1030, 1035, 1040, 1048, 1050, 1067, 1068, 1069, 1070, 1071,
+ 1072, 1076, 1077, 1085, 1090, 1095, 1103, 1108, 1109, 1110,
+ 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1126, 1127, 1128,
+ 1135, 1142, 1158, 1177, 1182, 1184, 1186, 1188, 1190, 1197,
+ 1202, 1203, 1204, 1208, 1209, 1210, 1214, 1215, 1219, 1226,
+ 1236, 1245, 1250, 1252, 1257, 1258, 1266, 1268, 1276, 1281,
+ 1289, 1314, 1321, 1331, 1332, 1336, 1337, 1338, 1339, 1343,
+ 1344, 1345, 1349, 1354, 1359, 1367, 1368, 1369, 1370, 1371,
+ 1372, 1373, 1383, 1388, 1396, 1401, 1409, 1411, 1415, 1420,
+ 1425, 1433, 1438, 1446, 1455, 1456, 1460, 1461, 1470, 1488,
+ 1492, 1497, 1505, 1510, 1511, 1515, 1520, 1528, 1533, 1538,
+ 1543, 1548, 1556, 1561, 1566, 1574, 1579, 1580, 1581, 1582,
+ 1583
};
#endif
@@ -932,31 +937,32 @@ static const char *const yytname[] =
"T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
"T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
"T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
- "T_Step", "T_Stepout", "T_Stratum", "T_String", "T_Sys", "T_Sysstats",
- "T_Tick", "T_Time1", "T_Time2", "T_Timer", "T_Timingstats", "T_Tinker",
- "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl", "T_Type",
- "T_U_int", "T_Unconfig", "T_Unpeer", "T_Version", "T_WanderThreshold",
- "T_Week", "T_Wildcard", "T_Xleave", "T_Year", "T_Flag", "T_EOC",
- "T_Simulate", "T_Beep_Delay", "T_Sim_Duration", "T_Server_Offset",
- "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter", "T_Prop_Delay",
- "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'", "$accept",
- "configuration", "command_list", "command", "server_command",
- "client_type", "address", "ip_address", "address_fam", "option_list",
- "option", "option_flag", "option_flag_keyword", "option_int",
- "option_int_keyword", "option_str", "option_str_keyword",
- "unpeer_command", "unpeer_keyword", "other_mode_command",
- "authentication_command", "crypto_command_list", "crypto_command",
- "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
- "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
- "monitoring_command", "stats_list", "stat", "filegen_option_list",
- "filegen_option", "link_nolink", "enable_disable", "filegen_type",
- "access_control_command", "ac_flag_list", "access_control_flag",
- "discard_option_list", "discard_option", "discard_option_keyword",
- "mru_option_list", "mru_option", "mru_option_keyword", "fudge_command",
- "fudge_factor_list", "fudge_factor", "fudge_factor_dbl_keyword",
- "fudge_factor_bool_keyword", "rlimit_command", "rlimit_option_list",
- "rlimit_option", "rlimit_option_keyword", "system_option_command",
- "system_option_list", "system_option", "system_option_flag_keyword",
+ "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
+ "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
+ "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
+ "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_Unconfig", "T_Unpeer",
+ "T_Version", "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave",
+ "T_Year", "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay",
+ "T_Sim_Duration", "T_Server_Offset", "T_Duration", "T_Freq_Offset",
+ "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay", "'='", "'('",
+ "')'", "'{'", "'}'", "$accept", "configuration", "command_list",
+ "command", "server_command", "client_type", "address", "ip_address",
+ "address_fam", "option_list", "option", "option_flag",
+ "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
+ "option_str_keyword", "unpeer_command", "unpeer_keyword",
+ "other_mode_command", "authentication_command", "crypto_command_list",
+ "crypto_command", "crypto_str_keyword", "orphan_mode_command",
+ "tos_option_list", "tos_option", "tos_option_int_keyword",
+ "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
+ "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
+ "filegen_type", "access_control_command", "ac_flag_list",
+ "access_control_flag", "discard_option_list", "discard_option",
+ "discard_option_keyword", "mru_option_list", "mru_option",
+ "mru_option_keyword", "fudge_command", "fudge_factor_list",
+ "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
+ "rlimit_command", "rlimit_option_list", "rlimit_option",
+ "rlimit_option_keyword", "system_option_command", "system_option_list",
+ "system_option", "system_option_flag_keyword",
"system_option_local_flag_keyword", "tinker_command",
"tinker_option_list", "tinker_option", "tinker_option_keyword",
"miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_str_keyword",
@@ -998,14 +1004,14 @@ static const yytype_uint16 yytoknum[] =
415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
- 61, 40, 41, 123, 125
+ 445, 446, 61, 40, 41, 123, 125
};
# endif
-#define YYPACT_NINF -180
+#define YYPACT_NINF -182
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-180)))
+ (!!((Yystate) == (-182)))
#define YYTABLE_NINF -7
@@ -1016,48 +1022,48 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 26, -147, -9, -180, -180, -180, -6, -180, 222, 9,
- -96, 222, -180, 276, -41, -180, -93, -180, -90, -86,
- -180, -84, -180, -180, -41, 0, 443, -41, -180, -180,
- -83, -180, -82, -180, -180, 20, 27, -20, 21, -19,
- -180, -180, -68, 276, -66, -180, 221, 328, -65, -55,
- 38, -180, -180, -180, 99, 188, -69, -180, -41, -180,
- -41, -180, -180, -180, -180, -180, -180, -180, -180, -180,
- -180, -3, -40, -39, -180, -4, -180, -180, -77, -180,
- -180, -180, 254, -180, -180, -180, -180, -180, -180, -180,
- -180, 222, -180, -180, -180, -180, -180, -180, 9, -180,
- 47, 90, -180, 222, -180, -180, -180, -180, -180, -180,
- -180, -180, -180, -180, -180, -180, 98, -180, -31, 347,
- -180, -180, -180, -84, -180, -180, -41, -180, -180, -180,
- -180, -180, -180, -180, -180, -180, 443, -180, 61, -41,
- -180, -180, -30, -180, -180, -180, -180, -180, -180, -180,
- -180, 27, -180, -180, 102, 106, -180, -180, 55, -180,
- -180, -180, -180, -19, -180, 87, -42, -180, 276, -180,
- -180, -180, -180, -180, -180, -180, -180, -180, -180, 221,
- -180, -3, -180, -180, -27, -180, -180, -180, -180, -180,
- -180, -180, -180, 328, -180, 91, -3, -180, -180, 93,
- -55, -180, -180, -180, 96, -180, -21, -180, -180, -180,
- -180, -180, -180, -180, -180, -180, -180, -180, 3, -144,
- -180, -180, -180, -180, -180, 100, -180, -5, -180, -180,
- -180, -180, -23, 5, -180, -180, -180, -180, 7, 103,
- -180, -180, 98, -180, -3, -27, -180, -180, -180, -180,
- -180, -180, -180, -180, 462, -180, -180, 462, 462, -65,
- -180, -180, 8, -180, -180, -180, -180, -180, -180, -180,
- -180, -180, -180, -47, 138, -180, -180, -180, 425, -180,
- -180, -180, -180, -180, -180, -180, -180, -105, -2, -15,
- -180, -180, -180, -180, 25, -180, -180, 17, -180, -180,
- -180, -180, -180, -180, -180, -180, -180, -180, -180, -180,
- -180, -180, -180, -180, -180, -180, -180, -180, -180, -180,
- -180, -180, -180, 462, 462, -180, 154, -65, 124, -180,
- 125, -180, -180, -180, -180, -180, -180, -180, -180, -180,
- -180, -180, -180, -180, -180, -180, -180, -180, -180, -180,
- -51, -180, 32, 10, 16, -116, -180, 6, -180, -3,
- -180, -180, -180, -180, -180, -180, -180, -180, -180, 462,
- -180, -180, -180, -180, 15, -180, -180, -180, -41, -180,
- -180, -180, 18, -180, -180, -180, 22, 24, -3, 23,
- -169, -180, 36, -3, -180, -180, -180, 29, -94, -180,
- -180, -180, -180, -180, 89, 37, 30, -180, 40, -180,
- -3, -180, -180
+ 18, -161, -18, -182, -182, -182, -10, -182, 189, 11,
+ -103, 189, -182, 7, -49, -182, -100, -182, -97, -90,
+ -182, -84, -182, -182, -49, 13, 365, -49, -182, -182,
+ -81, -182, -80, -182, -182, 20, 86, 104, 21, -33,
+ -182, -182, -73, 7, -72, -182, 51, 500, -71, -54,
+ 26, -182, -182, -182, 90, 205, -83, -182, -49, -182,
+ -49, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -8, -65, -51, -182, -9, -182, -182, -91, -182,
+ -182, -182, -15, -182, -182, -182, -182, -182, -182, -182,
+ -182, 189, -182, -182, -182, -182, -182, -182, 11, -182,
+ 46, 85, -182, 189, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 92, -182, -35, 366,
+ -182, -182, -182, -84, -182, -182, -49, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 365, -182, 68, -49,
+ -182, -182, -23, -182, -182, -182, -182, -182, -182, -182,
+ -182, 86, -182, -182, 114, 121, -182, -182, 67, -182,
+ -182, -182, -182, -33, -182, 93, -28, -182, 7, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, 51, -182, -8, -182, -182, -17, -182, -182, -182,
+ -182, -182, -182, -182, -182, 500, -182, 107, -8, -182,
+ -182, 112, -54, -182, -182, -182, 113, -182, 8, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -2, -147, -182, -182, -182, -182, -182, 128, -182, 25,
+ -182, -182, -182, -182, 116, 37, -182, -182, -182, -182,
+ 38, 135, -182, -182, 92, -182, -8, -17, -182, -182,
+ -182, -182, -182, -182, -182, -182, 445, -182, -182, 445,
+ 445, -71, -182, -182, 40, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -52, 163, -182, -182, -182,
+ 261, -182, -182, -182, -182, -182, -182, -182, -182, -114,
+ 27, 14, -182, -182, -182, -182, 55, -182, -182, 0,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, 445, 445, -182, 185, -71,
+ 153, -182, 156, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -53, -182, 61, 30, 43, -133, -182, 23,
+ -182, -8, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, 445, -182, -182, -182, -182, 32, -182, -182, -182,
+ -49, -182, -182, -182, 45, -182, -182, -182, 41, 50,
+ -8, 47, -157, -182, 56, -8, -182, -182, -182, 49,
+ 130, -182, -182, -182, -182, -182, 110, 59, 54, -182,
+ 70, -182, -8, -182, -182
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1065,80 +1071,80 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 0, 0, 0, 24, 58, 228, 0, 71, 0, 0,
- 238, 0, 221, 0, 0, 231, 0, 251, 0, 0,
- 232, 0, 234, 25, 0, 0, 0, 0, 252, 229,
- 0, 23, 0, 233, 22, 0, 0, 0, 0, 0,
- 235, 21, 0, 0, 0, 230, 0, 0, 0, 0,
- 0, 56, 57, 287, 0, 2, 0, 7, 0, 8,
+ 0, 0, 0, 24, 58, 230, 0, 71, 0, 0,
+ 240, 0, 223, 0, 0, 233, 0, 253, 0, 0,
+ 234, 0, 236, 25, 0, 0, 0, 0, 254, 231,
+ 0, 23, 0, 235, 22, 0, 0, 0, 0, 0,
+ 237, 21, 0, 0, 0, 232, 0, 0, 0, 0,
+ 0, 56, 57, 289, 0, 2, 0, 7, 0, 8,
0, 9, 10, 13, 11, 12, 14, 15, 16, 17,
- 18, 0, 0, 0, 215, 0, 216, 19, 0, 5,
+ 18, 0, 0, 0, 217, 0, 218, 19, 0, 5,
62, 63, 64, 195, 196, 197, 198, 201, 199, 200,
202, 190, 192, 193, 194, 154, 155, 156, 126, 152,
- 0, 236, 222, 189, 101, 102, 103, 104, 108, 105,
+ 0, 238, 224, 189, 101, 102, 103, 104, 108, 105,
106, 107, 109, 29, 30, 28, 0, 26, 0, 6,
- 65, 66, 248, 223, 247, 280, 59, 61, 160, 161,
+ 65, 66, 250, 225, 249, 282, 59, 61, 160, 161,
162, 163, 164, 165, 166, 167, 127, 158, 0, 60,
- 70, 278, 224, 67, 263, 264, 265, 266, 267, 268,
- 269, 260, 262, 134, 29, 30, 134, 134, 26, 68,
- 188, 186, 187, 182, 184, 0, 0, 225, 96, 100,
- 97, 207, 208, 209, 210, 211, 212, 213, 214, 203,
- 205, 0, 91, 86, 0, 87, 95, 93, 94, 92,
- 90, 88, 89, 80, 82, 0, 0, 242, 274, 0,
- 69, 273, 275, 271, 227, 1, 0, 4, 31, 55,
- 285, 284, 217, 218, 219, 259, 258, 257, 0, 0,
- 79, 75, 76, 77, 78, 0, 72, 0, 191, 151,
- 153, 237, 98, 0, 178, 179, 180, 181, 0, 0,
- 176, 177, 168, 170, 0, 0, 27, 220, 246, 279,
- 157, 159, 277, 261, 130, 134, 134, 133, 128, 0,
- 183, 185, 0, 99, 204, 206, 283, 281, 282, 85,
- 81, 83, 84, 226, 0, 272, 270, 3, 20, 253,
- 254, 255, 250, 256, 249, 291, 292, 0, 0, 0,
- 74, 73, 118, 117, 0, 115, 116, 0, 110, 113,
- 114, 174, 175, 173, 169, 171, 172, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 135, 131, 132, 134, 241, 0, 0, 243,
- 0, 37, 38, 39, 54, 47, 49, 48, 51, 40,
- 41, 42, 43, 50, 52, 44, 32, 33, 36, 34,
- 0, 35, 0, 0, 0, 0, 294, 0, 289, 0,
- 111, 125, 121, 123, 119, 120, 122, 124, 112, 129,
- 240, 239, 245, 244, 0, 45, 46, 53, 0, 288,
- 286, 293, 0, 290, 276, 297, 0, 0, 0, 0,
- 0, 299, 0, 0, 295, 298, 296, 0, 0, 304,
- 305, 306, 307, 308, 0, 0, 0, 300, 0, 302,
- 0, 301, 303
+ 70, 280, 226, 67, 265, 266, 267, 268, 269, 270,
+ 271, 262, 264, 134, 29, 30, 134, 134, 26, 68,
+ 188, 186, 187, 182, 184, 0, 0, 227, 96, 100,
+ 97, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 203, 205, 0, 91, 86, 0, 87, 95, 93,
+ 94, 92, 90, 88, 89, 80, 82, 0, 0, 244,
+ 276, 0, 69, 275, 277, 273, 229, 1, 0, 4,
+ 31, 55, 287, 286, 219, 220, 221, 261, 260, 259,
+ 0, 0, 79, 75, 76, 77, 78, 0, 72, 0,
+ 191, 151, 153, 239, 98, 0, 178, 179, 180, 181,
+ 0, 0, 176, 177, 168, 170, 0, 0, 27, 222,
+ 248, 281, 157, 159, 279, 263, 130, 134, 134, 133,
+ 128, 0, 183, 185, 0, 99, 204, 206, 285, 283,
+ 284, 85, 81, 83, 84, 228, 0, 274, 272, 3,
+ 20, 255, 256, 257, 252, 258, 251, 293, 294, 0,
+ 0, 0, 74, 73, 118, 117, 0, 115, 116, 0,
+ 110, 113, 114, 174, 175, 173, 169, 171, 172, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 135, 131, 132, 134, 243, 0,
+ 0, 245, 0, 37, 38, 39, 54, 47, 49, 48,
+ 51, 40, 41, 42, 43, 50, 52, 44, 32, 33,
+ 36, 34, 0, 35, 0, 0, 0, 0, 296, 0,
+ 291, 0, 111, 125, 121, 123, 119, 120, 122, 124,
+ 112, 129, 242, 241, 247, 246, 0, 45, 46, 53,
+ 0, 290, 288, 295, 0, 292, 278, 299, 0, 0,
+ 0, 0, 0, 301, 0, 0, 297, 300, 298, 0,
+ 0, 306, 307, 308, 309, 310, 0, 0, 0, 302,
+ 0, 304, 0, 303, 305
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -180, -180, -180, -37, -180, -180, -14, -36, -180, -180,
- -180, -180, -180, -180, -180, -180, -180, -180, -180, -180,
- -180, -180, -180, -180, -180, -180, 33, -180, -180, -180,
- -180, -33, -180, -180, -180, -180, -180, -180, -153, -180,
- -180, 131, -180, -180, 97, -180, -180, -180, -10, -180,
- -180, -180, -180, 73, -180, -180, 227, -72, -180, -180,
- -180, -180, 60, -180, -180, -180, -180, -180, -180, -180,
- -180, -180, -180, -180, 119, -180, -180, -180, -180, -180,
- -180, 92, -180, -180, 44, -180, -180, 218, 1, -179,
- -180, -180, -180, -34, -180, -180, -107, -180, -180, -180,
- -140, -180, -150, -180
+ -182, -182, -182, -45, -182, -182, -14, -36, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 60, -182, -182, -182,
+ -182, -38, -182, -182, -182, -182, -182, -182, -142, -182,
+ -182, 134, -182, -182, 120, -182, -182, -182, 5, -182,
+ -182, -182, -182, 96, -182, -182, 250, -42, -182, -182,
+ -182, -182, 81, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, 140, -182, -182, -182, -182, -182,
+ -182, 117, -182, -182, 63, -182, -182, 240, 22, -181,
+ -182, -182, -182, -16, -182, -182, -86, -182, -182, -182,
+ -120, -182, -132, -182
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 54, 55, 56, 57, 58, 125, 117, 118, 278,
- 346, 347, 348, 349, 350, 351, 352, 59, 60, 61,
- 62, 82, 226, 227, 63, 193, 194, 195, 196, 64,
- 168, 112, 232, 298, 299, 300, 368, 65, 254, 322,
- 98, 99, 100, 136, 137, 138, 66, 242, 243, 244,
- 245, 67, 163, 164, 165, 68, 91, 92, 93, 94,
- 69, 179, 180, 181, 70, 71, 72, 73, 102, 167,
- 371, 273, 329, 123, 124, 74, 75, 284, 218, 76,
- 151, 152, 204, 200, 201, 202, 142, 126, 269, 212,
- 77, 78, 287, 288, 289, 355, 356, 387, 357, 390,
- 391, 404, 405, 406
+ -1, 54, 55, 56, 57, 58, 125, 117, 118, 280,
+ 348, 349, 350, 351, 352, 353, 354, 59, 60, 61,
+ 62, 82, 228, 229, 63, 195, 196, 197, 198, 64,
+ 168, 112, 234, 300, 301, 302, 370, 65, 256, 324,
+ 98, 99, 100, 136, 137, 138, 66, 244, 245, 246,
+ 247, 67, 163, 164, 165, 68, 91, 92, 93, 94,
+ 69, 181, 182, 183, 70, 71, 72, 73, 102, 167,
+ 373, 275, 331, 123, 124, 74, 75, 286, 220, 76,
+ 151, 152, 206, 202, 203, 204, 142, 126, 271, 214,
+ 77, 78, 289, 290, 291, 357, 358, 389, 359, 392,
+ 393, 406, 407, 408
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1146,138 +1152,136 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 116, 158, 265, 257, 258, 198, 292, 153, 279, 375,
- 169, 266, 197, 293, 327, 389, 294, 272, 206, 228,
- 95, 361, 160, 157, 113, 394, 114, 1, 353, 210,
- 215, 228, 79, 267, 144, 145, 2, 285, 286, 353,
- 3, 4, 5, 362, 208, 154, 209, 155, 6, 7,
- 216, 80, 146, 295, 81, 8, 9, 211, 101, 10,
- 127, 119, 11, 12, 120, 305, 13, 280, 121, 281,
- 122, 140, 141, 217, 161, 14, 285, 286, 380, 15,
- 143, 159, 247, 328, 296, 16, 166, 17, 170, 115,
- 147, 399, 400, 401, 402, 403, 18, 19, 203, 205,
- 20, 233, 323, 324, 21, 22, 96, 230, 23, 24,
- 207, 97, 249, 115, 213, 214, 219, 25, 376, 148,
- 363, 251, 231, 246, 252, 249, 156, 364, 162, 255,
- 26, 27, 28, 256, 115, 263, 199, 29, 268, 259,
- 234, 235, 236, 237, 365, 297, 30, 261, 262, 291,
- 31, 271, 32, 274, 33, 34, 276, 282, 277, 301,
- 290, 302, 326, 303, 35, 36, 37, 38, 39, 40,
- 41, 42, 369, 330, 43, 359, 44, 358, 283, 360,
- 383, 370, 149, 45, 373, 374, 377, 150, 46, 47,
- 48, 366, 49, 50, 367, 379, 51, 52, 2, 382,
- 378, 386, 3, 4, 5, -6, 53, 384, 389, 392,
- 6, 7, 388, 393, 397, 396, 409, 8, 9, 411,
- 410, 10, 398, 325, 11, 12, 270, 171, 13, 229,
- 83, 412, 304, 250, 84, 238, 260, 14, 103, 264,
- 85, 15, 248, 253, 275, 139, 306, 16, 381, 17,
- 395, 239, 172, 354, 408, 0, 240, 241, 18, 19,
- 0, 0, 20, 0, 0, 0, 21, 22, 0, 173,
- 23, 24, 174, 0, 399, 400, 401, 402, 403, 25,
- 0, 0, 220, 407, 0, 0, 0, 0, 0, 0,
- 86, 372, 26, 27, 28, 0, 104, 0, 0, 29,
- 105, 0, 0, 0, 221, 0, 0, 222, 30, 0,
- 0, 0, 31, 0, 32, 0, 33, 34, 0, 0,
- 0, 0, 0, 87, 88, 0, 35, 36, 37, 38,
- 39, 40, 41, 42, 0, 0, 43, 0, 44, 0,
- 89, 182, 0, 0, 175, 45, 0, 183, 0, 184,
- 46, 47, 48, 0, 49, 50, 106, 2, 51, 52,
- 0, 3, 4, 5, 385, 0, 0, -6, 53, 6,
- 7, 90, 176, 177, 0, 185, 8, 9, 178, 0,
- 10, 0, 0, 11, 12, 0, 0, 13, 223, 224,
- 0, 0, 0, 0, 0, 225, 14, 0, 0, 0,
- 15, 107, 0, 0, 0, 0, 16, 0, 17, 108,
- 0, 0, 109, 0, 186, 0, 187, 18, 19, 0,
- 0, 20, 188, 0, 189, 21, 22, 190, 0, 23,
- 24, 0, 110, 0, 331, 0, 0, 111, 25, 0,
- 0, 0, 332, 0, 0, 0, 0, 0, 0, 191,
- 192, 26, 27, 28, 0, 0, 0, 0, 29, 0,
- 0, 0, 0, 0, 0, 0, 0, 30, 0, 0,
- 0, 31, 0, 32, 0, 33, 34, 333, 334, 0,
- 0, 0, 0, 0, 0, 35, 36, 37, 38, 39,
- 40, 41, 42, 0, 335, 43, 0, 44, 128, 129,
- 130, 131, 0, 0, 45, 0, 0, 0, 307, 46,
- 47, 48, 0, 49, 50, 336, 308, 51, 52, 0,
- 0, 0, 0, 337, 0, 338, 0, 53, 132, 0,
- 133, 0, 134, 0, 309, 310, 0, 311, 135, 339,
- 0, 0, 0, 312, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 340, 341, 0, 0,
+ 116, 158, 267, 281, 363, 169, 200, 377, 160, 329,
+ 208, 355, 199, 222, 259, 260, 113, 274, 114, 1,
+ 79, 268, 95, 157, 212, 217, 364, 104, 2, 391,
+ 355, 105, 3, 4, 5, 223, 287, 288, 224, 396,
+ 6, 7, 80, 269, 210, 218, 211, 8, 9, 230,
+ 81, 10, 213, 101, 11, 12, 119, 171, 13, 120,
+ 161, 230, 282, 382, 283, 307, 121, 14, 219, 287,
+ 288, 15, 122, 127, 249, 140, 141, 16, 330, 17,
+ 143, 159, 172, 166, 170, 115, 205, 106, 18, 19,
+ 207, 215, 20, 144, 145, 235, 21, 22, 209, 173,
+ 23, 24, 174, 365, 221, 216, 232, 115, 96, 25,
+ 366, 146, 251, 97, 162, 325, 326, 233, 378, 225,
+ 226, 248, 26, 27, 28, 251, 227, 367, 253, 29,
+ 265, 153, 107, 254, 236, 237, 238, 239, 30, 201,
+ 108, 257, 31, 109, 32, 294, 33, 34, 258, 147,
+ 270, 261, 295, 263, 284, 296, 35, 36, 37, 38,
+ 39, 40, 41, 42, 264, 110, 43, 273, 44, 154,
+ 111, 155, 276, 278, 175, 285, 368, 45, 148, 369,
+ 385, 293, 46, 47, 48, 371, 49, 50, 292, 279,
+ 51, 52, 297, 303, 304, 305, 328, 83, 332, -6,
+ 53, 84, 176, 177, 178, 179, 361, 85, 360, 394,
+ 180, 362, 372, 375, 399, 2, 376, 379, 384, 3,
+ 4, 5, 380, 298, 381, 327, 386, 6, 7, 240,
+ 388, 414, 231, 390, 8, 9, 391, 398, 10, 395,
+ 411, 11, 12, 149, 400, 13, 412, 241, 150, 306,
+ 156, 413, 242, 243, 14, 272, 252, 86, 15, 262,
+ 115, 103, 266, 250, 16, 277, 17, 139, 255, 308,
+ 333, 383, 397, 356, 410, 18, 19, 0, 334, 20,
+ 0, 0, 0, 21, 22, 0, 299, 23, 24, 0,
+ 87, 88, 0, 374, 0, 0, 25, 401, 402, 403,
+ 404, 405, 0, 0, 0, 0, 409, 89, 0, 26,
+ 27, 28, 0, 335, 336, 0, 29, 401, 402, 403,
+ 404, 405, 0, 0, 0, 30, 0, 0, 0, 31,
+ 337, 32, 0, 33, 34, 0, 0, 0, 90, 0,
+ 0, 0, 0, 35, 36, 37, 38, 39, 40, 41,
+ 42, 338, 0, 43, 0, 44, 0, 0, 0, 339,
+ 0, 340, 0, 0, 45, 0, 387, 0, 0, 46,
+ 47, 48, 0, 49, 50, 341, 2, 51, 52, 0,
+ 3, 4, 5, 0, 0, 0, -6, 53, 6, 7,
+ 0, 0, 342, 343, 0, 8, 9, 0, 0, 10,
+ 0, 0, 11, 12, 0, 0, 13, 0, 0, 0,
+ 0, 0, 0, 0, 0, 14, 0, 0, 0, 15,
+ 128, 129, 130, 131, 0, 16, 0, 17, 344, 0,
+ 345, 0, 0, 0, 0, 346, 18, 19, 0, 347,
+ 20, 0, 0, 0, 21, 22, 0, 0, 23, 24,
+ 132, 0, 133, 0, 134, 0, 0, 25, 0, 0,
+ 135, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 26, 27, 28, 0, 0, 0, 0, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 30, 0, 0, 0,
+ 31, 309, 32, 0, 33, 34, 0, 0, 0, 310,
+ 0, 0, 0, 0, 35, 36, 37, 38, 39, 40,
+ 41, 42, 0, 184, 43, 0, 44, 311, 312, 185,
+ 313, 186, 0, 0, 0, 45, 314, 0, 0, 0,
+ 46, 47, 48, 0, 49, 50, 0, 0, 51, 52,
+ 0, 0, 0, 0, 0, 0, 0, 187, 53, 0,
+ 0, 0, 0, 315, 316, 0, 0, 317, 318, 0,
+ 319, 320, 321, 0, 322, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 313, 314, 0, 0, 315, 316, 0, 317, 318, 319,
- 0, 320, 0, 0, 0, 0, 0, 0, 0, 0,
- 342, 0, 343, 0, 0, 0, 0, 344, 0, 0,
- 0, 345, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 188, 0, 189, 0,
+ 0, 0, 0, 0, 190, 0, 191, 0, 0, 192,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 321
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 323,
+ 0, 193, 194
};
static const yytype_int16 yycheck[] =
{
- 14, 37, 181, 156, 157, 60, 29, 27, 5, 60,
- 43, 38, 48, 36, 61, 184, 39, 196, 55, 91,
- 11, 4, 41, 37, 65, 194, 67, 1, 144, 32,
- 34, 103, 179, 60, 7, 8, 10, 181, 182, 144,
- 14, 15, 16, 26, 58, 65, 60, 67, 22, 23,
- 54, 60, 25, 76, 60, 29, 30, 60, 154, 33,
- 60, 154, 36, 37, 154, 244, 40, 64, 154, 66,
- 154, 154, 154, 77, 93, 49, 181, 182, 194, 53,
- 60, 60, 119, 130, 107, 59, 154, 61, 154, 154,
- 63, 185, 186, 187, 188, 189, 70, 71, 60, 0,
- 74, 3, 255, 256, 78, 79, 97, 60, 82, 83,
- 179, 102, 126, 154, 154, 154, 193, 91, 169, 92,
- 103, 60, 32, 154, 154, 139, 146, 110, 147, 27,
- 104, 105, 106, 27, 154, 168, 191, 111, 165, 84,
- 42, 43, 44, 45, 127, 168, 120, 60, 190, 154,
- 124, 60, 126, 60, 128, 129, 60, 154, 179, 154,
- 60, 154, 154, 60, 138, 139, 140, 141, 142, 143,
- 144, 145, 325, 35, 148, 190, 150, 179, 175, 154,
- 359, 27, 155, 157, 60, 60, 154, 160, 162, 163,
- 164, 174, 166, 167, 177, 179, 170, 171, 10, 193,
- 190, 183, 14, 15, 16, 179, 180, 192, 184, 388,
- 22, 23, 190, 190, 393, 179, 179, 29, 30, 179,
- 190, 33, 193, 259, 36, 37, 193, 6, 40, 98,
- 8, 410, 242, 136, 12, 137, 163, 49, 11, 179,
- 18, 53, 123, 151, 200, 27, 245, 59, 355, 61,
- 390, 153, 31, 287, 404, -1, 158, 159, 70, 71,
- -1, -1, 74, -1, -1, -1, 78, 79, -1, 48,
- 82, 83, 51, -1, 185, 186, 187, 188, 189, 91,
- -1, -1, 28, 194, -1, -1, -1, -1, -1, -1,
- 68, 327, 104, 105, 106, -1, 20, -1, -1, 111,
- 24, -1, -1, -1, 50, -1, -1, 53, 120, -1,
- -1, -1, 124, -1, 126, -1, 128, 129, -1, -1,
- -1, -1, -1, 101, 102, -1, 138, 139, 140, 141,
- 142, 143, 144, 145, -1, -1, 148, -1, 150, -1,
- 118, 13, -1, -1, 123, 157, -1, 19, -1, 21,
- 162, 163, 164, -1, 166, 167, 80, 10, 170, 171,
- -1, 14, 15, 16, 378, -1, -1, 179, 180, 22,
- 23, 149, 151, 152, -1, 47, 29, 30, 157, -1,
- 33, -1, -1, 36, 37, -1, -1, 40, 134, 135,
- -1, -1, -1, -1, -1, 141, 49, -1, -1, -1,
- 53, 125, -1, -1, -1, -1, 59, -1, 61, 133,
- -1, -1, 136, -1, 86, -1, 88, 70, 71, -1,
- -1, 74, 94, -1, 96, 78, 79, 99, -1, 82,
- 83, -1, 156, -1, 9, -1, -1, 161, 91, -1,
- -1, -1, 17, -1, -1, -1, -1, -1, -1, 121,
- 122, 104, 105, 106, -1, -1, -1, -1, 111, -1,
- -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
- -1, 124, -1, 126, -1, 128, 129, 52, 53, -1,
- -1, -1, -1, -1, -1, 138, 139, 140, 141, 142,
- 143, 144, 145, -1, 69, 148, -1, 150, 55, 56,
- 57, 58, -1, -1, 157, -1, -1, -1, 46, 162,
- 163, 164, -1, 166, 167, 90, 54, 170, 171, -1,
- -1, -1, -1, 98, -1, 100, -1, 180, 85, -1,
- 87, -1, 89, -1, 72, 73, -1, 75, 95, 114,
- -1, -1, -1, 81, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 131, 132, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 108, 109, -1, -1, 112, 113, -1, 115, 116, 117,
- -1, 119, -1, -1, -1, -1, -1, -1, -1, -1,
- 165, -1, 167, -1, -1, -1, -1, 172, -1, -1,
- -1, 176, -1, -1, -1, -1, -1, -1, -1, -1,
+ 14, 37, 183, 5, 4, 43, 60, 60, 41, 61,
+ 55, 144, 48, 28, 156, 157, 65, 198, 67, 1,
+ 181, 38, 11, 37, 32, 34, 26, 20, 10, 186,
+ 144, 24, 14, 15, 16, 50, 183, 184, 53, 196,
+ 22, 23, 60, 60, 58, 54, 60, 29, 30, 91,
+ 60, 33, 60, 156, 36, 37, 156, 6, 40, 156,
+ 93, 103, 64, 196, 66, 246, 156, 49, 77, 183,
+ 184, 53, 156, 60, 119, 156, 156, 59, 130, 61,
+ 60, 60, 31, 156, 156, 156, 60, 80, 70, 71,
+ 0, 156, 74, 7, 8, 3, 78, 79, 181, 48,
+ 82, 83, 51, 103, 195, 156, 60, 156, 97, 91,
+ 110, 25, 126, 102, 147, 257, 258, 32, 171, 134,
+ 135, 156, 104, 105, 106, 139, 141, 127, 60, 111,
+ 168, 27, 125, 156, 42, 43, 44, 45, 120, 193,
+ 133, 27, 124, 136, 126, 29, 128, 129, 27, 63,
+ 167, 84, 36, 60, 156, 39, 138, 139, 140, 141,
+ 142, 143, 144, 145, 192, 158, 148, 60, 150, 65,
+ 163, 67, 60, 60, 123, 177, 176, 159, 92, 179,
+ 361, 156, 164, 165, 166, 327, 168, 169, 60, 181,
+ 172, 173, 76, 156, 156, 60, 156, 8, 35, 181,
+ 182, 12, 151, 152, 153, 154, 192, 18, 181, 390,
+ 159, 156, 27, 60, 395, 10, 60, 156, 195, 14,
+ 15, 16, 192, 107, 181, 261, 194, 22, 23, 137,
+ 185, 412, 98, 192, 29, 30, 186, 181, 33, 192,
+ 181, 36, 37, 157, 195, 40, 192, 155, 162, 244,
+ 146, 181, 160, 161, 49, 195, 136, 68, 53, 163,
+ 156, 11, 181, 123, 59, 202, 61, 27, 151, 247,
+ 9, 357, 392, 289, 406, 70, 71, -1, 17, 74,
+ -1, -1, -1, 78, 79, -1, 170, 82, 83, -1,
+ 101, 102, -1, 329, -1, -1, 91, 187, 188, 189,
+ 190, 191, -1, -1, -1, -1, 196, 118, -1, 104,
+ 105, 106, -1, 52, 53, -1, 111, 187, 188, 189,
+ 190, 191, -1, -1, -1, 120, -1, -1, -1, 124,
+ 69, 126, -1, 128, 129, -1, -1, -1, 149, -1,
+ -1, -1, -1, 138, 139, 140, 141, 142, 143, 144,
+ 145, 90, -1, 148, -1, 150, -1, -1, -1, 98,
+ -1, 100, -1, -1, 159, -1, 380, -1, -1, 164,
+ 165, 166, -1, 168, 169, 114, 10, 172, 173, -1,
+ 14, 15, 16, -1, -1, -1, 181, 182, 22, 23,
+ -1, -1, 131, 132, -1, 29, 30, -1, -1, 33,
+ -1, -1, 36, 37, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, -1, -1, 49, -1, -1, -1, 53,
+ 55, 56, 57, 58, -1, 59, -1, 61, 167, -1,
+ 169, -1, -1, -1, -1, 174, 70, 71, -1, 178,
+ 74, -1, -1, -1, 78, 79, -1, -1, 82, 83,
+ 85, -1, 87, -1, 89, -1, -1, 91, -1, -1,
+ 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 104, 105, 106, -1, -1, -1, -1, 111, -1, -1,
+ -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
+ 124, 46, 126, -1, 128, 129, -1, -1, -1, 54,
+ -1, -1, -1, -1, 138, 139, 140, 141, 142, 143,
+ 144, 145, -1, 13, 148, -1, 150, 72, 73, 19,
+ 75, 21, -1, -1, -1, 159, 81, -1, -1, -1,
+ 164, 165, 166, -1, 168, 169, -1, -1, 172, 173,
+ -1, -1, -1, -1, -1, -1, -1, 47, 182, -1,
+ -1, -1, -1, 108, 109, -1, -1, 112, 113, -1,
+ 115, 116, 117, -1, 119, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 86, -1, 88, -1,
+ -1, -1, -1, -1, 94, -1, 96, -1, -1, 99,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 172
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 174,
+ -1, 121, 122
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1288,80 +1292,81 @@ static const yytype_uint16 yystos[] =
33, 36, 37, 40, 49, 53, 59, 61, 70, 71,
74, 78, 79, 82, 83, 91, 104, 105, 106, 111,
120, 124, 126, 128, 129, 138, 139, 140, 141, 142,
- 143, 144, 145, 148, 150, 157, 162, 163, 164, 166,
- 167, 170, 171, 180, 196, 197, 198, 199, 200, 212,
- 213, 214, 215, 219, 224, 232, 241, 246, 250, 255,
- 259, 260, 261, 262, 270, 271, 274, 285, 286, 179,
- 60, 60, 216, 8, 12, 18, 68, 101, 102, 118,
- 149, 251, 252, 253, 254, 11, 97, 102, 235, 236,
- 237, 154, 263, 251, 20, 24, 80, 125, 133, 136,
- 156, 161, 226, 65, 67, 154, 201, 202, 203, 154,
- 154, 154, 154, 268, 269, 201, 282, 60, 55, 56,
- 57, 58, 85, 87, 89, 95, 238, 239, 240, 282,
- 154, 154, 281, 60, 7, 8, 25, 63, 92, 155,
- 160, 275, 276, 27, 65, 67, 146, 201, 202, 60,
- 41, 93, 147, 247, 248, 249, 154, 264, 225, 226,
- 154, 6, 31, 48, 51, 123, 151, 152, 157, 256,
- 257, 258, 13, 19, 21, 47, 86, 88, 94, 96,
- 99, 121, 122, 220, 221, 222, 223, 202, 60, 191,
- 278, 279, 280, 60, 277, 0, 198, 179, 201, 201,
- 32, 60, 284, 154, 154, 34, 54, 77, 273, 193,
- 28, 50, 53, 134, 135, 141, 217, 218, 252, 236,
- 60, 32, 227, 3, 42, 43, 44, 45, 137, 153,
- 158, 159, 242, 243, 244, 245, 154, 198, 269, 201,
- 239, 60, 154, 276, 233, 27, 27, 233, 233, 84,
- 248, 60, 190, 226, 257, 284, 38, 60, 165, 283,
- 221, 60, 284, 266, 60, 279, 60, 179, 204, 5,
- 64, 66, 154, 175, 272, 181, 182, 287, 288, 289,
- 60, 154, 29, 36, 39, 76, 107, 168, 228, 229,
- 230, 154, 154, 60, 243, 284, 283, 46, 54, 72,
- 73, 75, 81, 108, 109, 112, 113, 115, 116, 117,
- 119, 172, 234, 233, 233, 202, 154, 61, 130, 267,
- 35, 9, 17, 52, 53, 69, 90, 98, 100, 114,
- 131, 132, 165, 167, 172, 176, 205, 206, 207, 208,
- 209, 210, 211, 144, 288, 290, 291, 293, 179, 190,
- 154, 4, 26, 103, 110, 127, 174, 177, 231, 233,
- 27, 265, 202, 60, 60, 60, 169, 154, 190, 179,
- 194, 291, 193, 284, 192, 201, 183, 292, 190, 184,
- 294, 295, 284, 190, 194, 295, 179, 284, 193, 185,
- 186, 187, 188, 189, 296, 297, 298, 194, 297, 179,
- 190, 179, 284
+ 143, 144, 145, 148, 150, 159, 164, 165, 166, 168,
+ 169, 172, 173, 182, 198, 199, 200, 201, 202, 214,
+ 215, 216, 217, 221, 226, 234, 243, 248, 252, 257,
+ 261, 262, 263, 264, 272, 273, 276, 287, 288, 181,
+ 60, 60, 218, 8, 12, 18, 68, 101, 102, 118,
+ 149, 253, 254, 255, 256, 11, 97, 102, 237, 238,
+ 239, 156, 265, 253, 20, 24, 80, 125, 133, 136,
+ 158, 163, 228, 65, 67, 156, 203, 204, 205, 156,
+ 156, 156, 156, 270, 271, 203, 284, 60, 55, 56,
+ 57, 58, 85, 87, 89, 95, 240, 241, 242, 284,
+ 156, 156, 283, 60, 7, 8, 25, 63, 92, 157,
+ 162, 277, 278, 27, 65, 67, 146, 203, 204, 60,
+ 41, 93, 147, 249, 250, 251, 156, 266, 227, 228,
+ 156, 6, 31, 48, 51, 123, 151, 152, 153, 154,
+ 159, 258, 259, 260, 13, 19, 21, 47, 86, 88,
+ 94, 96, 99, 121, 122, 222, 223, 224, 225, 204,
+ 60, 193, 280, 281, 282, 60, 279, 0, 200, 181,
+ 203, 203, 32, 60, 286, 156, 156, 34, 54, 77,
+ 275, 195, 28, 50, 53, 134, 135, 141, 219, 220,
+ 254, 238, 60, 32, 229, 3, 42, 43, 44, 45,
+ 137, 155, 160, 161, 244, 245, 246, 247, 156, 200,
+ 271, 203, 241, 60, 156, 278, 235, 27, 27, 235,
+ 235, 84, 250, 60, 192, 228, 259, 286, 38, 60,
+ 167, 285, 223, 60, 286, 268, 60, 281, 60, 181,
+ 206, 5, 64, 66, 156, 177, 274, 183, 184, 289,
+ 290, 291, 60, 156, 29, 36, 39, 76, 107, 170,
+ 230, 231, 232, 156, 156, 60, 245, 286, 285, 46,
+ 54, 72, 73, 75, 81, 108, 109, 112, 113, 115,
+ 116, 117, 119, 174, 236, 235, 235, 204, 156, 61,
+ 130, 269, 35, 9, 17, 52, 53, 69, 90, 98,
+ 100, 114, 131, 132, 167, 169, 174, 178, 207, 208,
+ 209, 210, 211, 212, 213, 144, 290, 292, 293, 295,
+ 181, 192, 156, 4, 26, 103, 110, 127, 176, 179,
+ 233, 235, 27, 267, 204, 60, 60, 60, 171, 156,
+ 192, 181, 196, 293, 195, 286, 194, 203, 185, 294,
+ 192, 186, 296, 297, 286, 192, 196, 297, 181, 286,
+ 195, 187, 188, 189, 190, 191, 298, 299, 300, 196,
+ 299, 181, 192, 181, 286
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 195, 196, 197, 197, 197, 198, 198, 198, 198,
- 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
- 199, 200, 200, 200, 200, 200, 201, 201, 202, 203,
- 203, 204, 204, 205, 205, 205, 206, 207, 207, 207,
- 207, 207, 207, 207, 207, 208, 208, 209, 209, 209,
- 209, 209, 209, 210, 211, 212, 213, 213, 214, 214,
- 214, 214, 215, 215, 215, 215, 215, 215, 215, 215,
- 215, 216, 216, 217, 217, 218, 218, 218, 218, 218,
- 219, 220, 220, 221, 221, 221, 222, 222, 222, 222,
- 222, 222, 223, 223, 223, 223, 224, 224, 224, 225,
- 225, 226, 226, 226, 226, 226, 226, 226, 226, 227,
- 227, 228, 228, 228, 228, 229, 229, 230, 230, 231,
- 231, 231, 231, 231, 231, 231, 232, 232, 232, 232,
- 232, 232, 232, 232, 233, 233, 234, 234, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
- 234, 235, 235, 236, 237, 237, 237, 238, 238, 239,
- 240, 240, 240, 240, 240, 240, 240, 240, 241, 242,
- 242, 243, 243, 243, 243, 243, 244, 244, 245, 245,
- 245, 245, 246, 247, 247, 248, 249, 249, 249, 250,
- 250, 251, 251, 252, 252, 253, 253, 253, 253, 253,
- 253, 254, 254, 255, 256, 256, 257, 258, 258, 258,
- 258, 258, 258, 258, 258, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 259, 260, 260,
- 260, 261, 261, 261, 262, 262, 263, 263, 263, 264,
- 265, 265, 266, 266, 267, 267, 268, 268, 269, 270,
- 270, 271, 271, 272, 272, 272, 272, 273, 273, 273,
- 274, 275, 275, 276, 276, 276, 276, 276, 276, 276,
- 277, 277, 278, 278, 279, 279, 280, 281, 281, 282,
- 282, 283, 283, 283, 284, 284, 285, 286, 287, 287,
- 288, 289, 289, 290, 290, 291, 292, 293, 294, 294,
- 295, 296, 296, 297, 298, 298, 298, 298, 298
+ 0, 197, 198, 199, 199, 199, 200, 200, 200, 200,
+ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+ 201, 202, 202, 202, 202, 202, 203, 203, 204, 205,
+ 205, 206, 206, 207, 207, 207, 208, 209, 209, 209,
+ 209, 209, 209, 209, 209, 210, 210, 211, 211, 211,
+ 211, 211, 211, 212, 213, 214, 215, 215, 216, 216,
+ 216, 216, 217, 217, 217, 217, 217, 217, 217, 217,
+ 217, 218, 218, 219, 219, 220, 220, 220, 220, 220,
+ 221, 222, 222, 223, 223, 223, 224, 224, 224, 224,
+ 224, 224, 225, 225, 225, 225, 226, 226, 226, 227,
+ 227, 228, 228, 228, 228, 228, 228, 228, 228, 229,
+ 229, 230, 230, 230, 230, 231, 231, 232, 232, 233,
+ 233, 233, 233, 233, 233, 233, 234, 234, 234, 234,
+ 234, 234, 234, 234, 235, 235, 236, 236, 236, 236,
+ 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
+ 236, 237, 237, 238, 239, 239, 239, 240, 240, 241,
+ 242, 242, 242, 242, 242, 242, 242, 242, 243, 244,
+ 244, 245, 245, 245, 245, 245, 246, 246, 247, 247,
+ 247, 247, 248, 249, 249, 250, 251, 251, 251, 252,
+ 252, 253, 253, 254, 254, 255, 255, 255, 255, 255,
+ 255, 256, 256, 257, 258, 258, 259, 260, 260, 260,
+ 260, 260, 260, 260, 260, 260, 260, 261, 261, 261,
+ 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
+ 262, 262, 262, 263, 263, 263, 264, 264, 265, 265,
+ 265, 266, 267, 267, 268, 268, 269, 269, 270, 270,
+ 271, 272, 272, 273, 273, 274, 274, 274, 274, 275,
+ 275, 275, 276, 277, 277, 278, 278, 278, 278, 278,
+ 278, 278, 279, 279, 280, 280, 281, 281, 282, 283,
+ 283, 284, 284, 285, 285, 285, 286, 286, 287, 288,
+ 289, 289, 290, 291, 291, 292, 292, 293, 294, 295,
+ 296, 296, 297, 298, 298, 299, 300, 300, 300, 300,
+ 300
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -1388,16 +1393,17 @@ static const yytype_uint8 yyr2[] =
1, 1, 2, 2, 1, 2, 1, 1, 1, 2,
2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
- 3, 1, 2, 2, 2, 2, 3, 2, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 0, 4,
- 1, 0, 0, 2, 2, 2, 2, 1, 1, 3,
- 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 1, 2, 1, 1, 1, 5, 2, 1, 2,
- 1, 1, 1, 1, 1, 1, 5, 1, 3, 2,
- 3, 1, 1, 2, 1, 5, 4, 3, 2, 1,
- 6, 3, 2, 3, 1, 1, 1, 1, 1
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 3, 1, 2, 2, 2, 2, 3, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 0, 4, 1, 0, 0, 2, 2, 2, 2, 1,
+ 1, 3, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 1, 2, 1, 1, 1, 5, 2,
+ 1, 2, 1, 1, 1, 1, 1, 1, 5, 1,
+ 3, 2, 3, 1, 1, 2, 1, 5, 4, 3,
+ 2, 1, 6, 3, 2, 3, 1, 1, 1, 1,
+ 1
};
@@ -2076,7 +2082,7 @@ yyreduce:
switch (yyn)
{
case 5:
-#line 371 "ntp_parser.y" /* yacc.c:1646 */
+#line 373 "ntp_parser.y" /* yacc.c:1646 */
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2088,85 +2094,85 @@ yyreduce:
ip_file->err_line_no,
ip_file->err_col_no);
}
-#line 2092 "ntp_parser.c" /* yacc.c:1646 */
+#line 2098 "ntp_parser.c" /* yacc.c:1646 */
break;
case 20:
-#line 406 "ntp_parser.y" /* yacc.c:1646 */
+#line 408 "ntp_parser.y" /* yacc.c:1646 */
{
peer_node *my_node;
my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.peers, my_node);
}
-#line 2103 "ntp_parser.c" /* yacc.c:1646 */
+#line 2109 "ntp_parser.c" /* yacc.c:1646 */
break;
case 27:
-#line 425 "ntp_parser.y" /* yacc.c:1646 */
+#line 427 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
-#line 2109 "ntp_parser.c" /* yacc.c:1646 */
+#line 2115 "ntp_parser.c" /* yacc.c:1646 */
break;
case 28:
-#line 430 "ntp_parser.y" /* yacc.c:1646 */
+#line 432 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
-#line 2115 "ntp_parser.c" /* yacc.c:1646 */
+#line 2121 "ntp_parser.c" /* yacc.c:1646 */
break;
case 29:
-#line 435 "ntp_parser.y" /* yacc.c:1646 */
+#line 437 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET; }
-#line 2121 "ntp_parser.c" /* yacc.c:1646 */
+#line 2127 "ntp_parser.c" /* yacc.c:1646 */
break;
case 30:
-#line 437 "ntp_parser.y" /* yacc.c:1646 */
+#line 439 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET6; }
-#line 2127 "ntp_parser.c" /* yacc.c:1646 */
+#line 2133 "ntp_parser.c" /* yacc.c:1646 */
break;
case 31:
-#line 442 "ntp_parser.y" /* yacc.c:1646 */
+#line 444 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2133 "ntp_parser.c" /* yacc.c:1646 */
+#line 2139 "ntp_parser.c" /* yacc.c:1646 */
break;
case 32:
-#line 444 "ntp_parser.y" /* yacc.c:1646 */
+#line 446 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2142 "ntp_parser.c" /* yacc.c:1646 */
+#line 2148 "ntp_parser.c" /* yacc.c:1646 */
break;
case 36:
-#line 458 "ntp_parser.y" /* yacc.c:1646 */
+#line 460 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2148 "ntp_parser.c" /* yacc.c:1646 */
+#line 2154 "ntp_parser.c" /* yacc.c:1646 */
break;
case 45:
-#line 474 "ntp_parser.y" /* yacc.c:1646 */
+#line 476 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2154 "ntp_parser.c" /* yacc.c:1646 */
+#line 2160 "ntp_parser.c" /* yacc.c:1646 */
break;
case 46:
-#line 476 "ntp_parser.y" /* yacc.c:1646 */
+#line 478 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2160 "ntp_parser.c" /* yacc.c:1646 */
+#line 2166 "ntp_parser.c" /* yacc.c:1646 */
break;
case 53:
-#line 490 "ntp_parser.y" /* yacc.c:1646 */
+#line 492 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2166 "ntp_parser.c" /* yacc.c:1646 */
+#line 2172 "ntp_parser.c" /* yacc.c:1646 */
break;
case 55:
-#line 504 "ntp_parser.y" /* yacc.c:1646 */
+#line 506 "ntp_parser.y" /* yacc.c:1646 */
{
unpeer_node *my_node;
@@ -2174,85 +2180,85 @@ yyreduce:
if (my_node)
APPEND_G_FIFO(cfgt.unpeers, my_node);
}
-#line 2178 "ntp_parser.c" /* yacc.c:1646 */
+#line 2184 "ntp_parser.c" /* yacc.c:1646 */
break;
case 58:
-#line 525 "ntp_parser.y" /* yacc.c:1646 */
+#line 527 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.broadcastclient = 1; }
-#line 2184 "ntp_parser.c" /* yacc.c:1646 */
+#line 2190 "ntp_parser.c" /* yacc.c:1646 */
break;
case 59:
-#line 527 "ntp_parser.y" /* yacc.c:1646 */
+#line 529 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
-#line 2190 "ntp_parser.c" /* yacc.c:1646 */
+#line 2196 "ntp_parser.c" /* yacc.c:1646 */
break;
case 60:
-#line 529 "ntp_parser.y" /* yacc.c:1646 */
+#line 531 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
-#line 2196 "ntp_parser.c" /* yacc.c:1646 */
+#line 2202 "ntp_parser.c" /* yacc.c:1646 */
break;
case 61:
-#line 531 "ntp_parser.y" /* yacc.c:1646 */
+#line 533 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.mdnstries = (yyvsp[0].Integer); }
-#line 2202 "ntp_parser.c" /* yacc.c:1646 */
+#line 2208 "ntp_parser.c" /* yacc.c:1646 */
break;
case 62:
-#line 542 "ntp_parser.y" /* yacc.c:1646 */
+#line 544 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *atrv;
atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, atrv);
}
-#line 2213 "ntp_parser.c" /* yacc.c:1646 */
+#line 2219 "ntp_parser.c" /* yacc.c:1646 */
break;
case 63:
-#line 549 "ntp_parser.y" /* yacc.c:1646 */
+#line 551 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.control_key = (yyvsp[0].Integer); }
-#line 2219 "ntp_parser.c" /* yacc.c:1646 */
+#line 2225 "ntp_parser.c" /* yacc.c:1646 */
break;
case 64:
-#line 551 "ntp_parser.y" /* yacc.c:1646 */
+#line 553 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.cryptosw++;
CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2228 "ntp_parser.c" /* yacc.c:1646 */
+#line 2234 "ntp_parser.c" /* yacc.c:1646 */
break;
case 65:
-#line 556 "ntp_parser.y" /* yacc.c:1646 */
+#line 558 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keys = (yyvsp[0].String); }
-#line 2234 "ntp_parser.c" /* yacc.c:1646 */
+#line 2240 "ntp_parser.c" /* yacc.c:1646 */
break;
case 66:
-#line 558 "ntp_parser.y" /* yacc.c:1646 */
+#line 560 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keysdir = (yyvsp[0].String); }
-#line 2240 "ntp_parser.c" /* yacc.c:1646 */
+#line 2246 "ntp_parser.c" /* yacc.c:1646 */
break;
case 67:
-#line 560 "ntp_parser.y" /* yacc.c:1646 */
+#line 562 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.request_key = (yyvsp[0].Integer); }
-#line 2246 "ntp_parser.c" /* yacc.c:1646 */
+#line 2252 "ntp_parser.c" /* yacc.c:1646 */
break;
case 68:
-#line 562 "ntp_parser.y" /* yacc.c:1646 */
+#line 564 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.revoke = (yyvsp[0].Integer); }
-#line 2252 "ntp_parser.c" /* yacc.c:1646 */
+#line 2258 "ntp_parser.c" /* yacc.c:1646 */
break;
case 69:
-#line 564 "ntp_parser.y" /* yacc.c:1646 */
+#line 566 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
@@ -2261,38 +2267,38 @@ yyreduce:
// else
// LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
}
-#line 2265 "ntp_parser.c" /* yacc.c:1646 */
+#line 2271 "ntp_parser.c" /* yacc.c:1646 */
break;
case 70:
-#line 573 "ntp_parser.y" /* yacc.c:1646 */
+#line 575 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
-#line 2271 "ntp_parser.c" /* yacc.c:1646 */
+#line 2277 "ntp_parser.c" /* yacc.c:1646 */
break;
case 71:
-#line 578 "ntp_parser.y" /* yacc.c:1646 */
+#line 580 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2277 "ntp_parser.c" /* yacc.c:1646 */
+#line 2283 "ntp_parser.c" /* yacc.c:1646 */
break;
case 72:
-#line 580 "ntp_parser.y" /* yacc.c:1646 */
+#line 582 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2286 "ntp_parser.c" /* yacc.c:1646 */
+#line 2292 "ntp_parser.c" /* yacc.c:1646 */
break;
case 73:
-#line 588 "ntp_parser.y" /* yacc.c:1646 */
+#line 590 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2292 "ntp_parser.c" /* yacc.c:1646 */
+#line 2298 "ntp_parser.c" /* yacc.c:1646 */
break;
case 74:
-#line 590 "ntp_parser.y" /* yacc.c:1646 */
+#line 592 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = NULL;
cfgt.auth.revoke = (yyvsp[0].Integer);
@@ -2301,59 +2307,59 @@ yyreduce:
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
-#line 2305 "ntp_parser.c" /* yacc.c:1646 */
+#line 2311 "ntp_parser.c" /* yacc.c:1646 */
break;
case 80:
-#line 615 "ntp_parser.y" /* yacc.c:1646 */
+#line 617 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
-#line 2311 "ntp_parser.c" /* yacc.c:1646 */
+#line 2317 "ntp_parser.c" /* yacc.c:1646 */
break;
case 81:
-#line 620 "ntp_parser.y" /* yacc.c:1646 */
+#line 622 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2320 "ntp_parser.c" /* yacc.c:1646 */
+#line 2326 "ntp_parser.c" /* yacc.c:1646 */
break;
case 82:
-#line 625 "ntp_parser.y" /* yacc.c:1646 */
+#line 627 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2329 "ntp_parser.c" /* yacc.c:1646 */
+#line 2335 "ntp_parser.c" /* yacc.c:1646 */
break;
case 83:
-#line 633 "ntp_parser.y" /* yacc.c:1646 */
+#line 635 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2335 "ntp_parser.c" /* yacc.c:1646 */
+#line 2341 "ntp_parser.c" /* yacc.c:1646 */
break;
case 84:
-#line 635 "ntp_parser.y" /* yacc.c:1646 */
+#line 637 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2341 "ntp_parser.c" /* yacc.c:1646 */
+#line 2347 "ntp_parser.c" /* yacc.c:1646 */
break;
case 85:
-#line 637 "ntp_parser.y" /* yacc.c:1646 */
+#line 639 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2347 "ntp_parser.c" /* yacc.c:1646 */
+#line 2353 "ntp_parser.c" /* yacc.c:1646 */
break;
case 96:
-#line 663 "ntp_parser.y" /* yacc.c:1646 */
+#line 665 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
-#line 2353 "ntp_parser.c" /* yacc.c:1646 */
+#line 2359 "ntp_parser.c" /* yacc.c:1646 */
break;
case 97:
-#line 665 "ntp_parser.y" /* yacc.c:1646 */
+#line 667 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
cfgt.stats_dir = (yyvsp[0].String);
@@ -2362,55 +2368,55 @@ yyreduce:
yyerror(ip_file, "statsdir remote configuration ignored");
}
}
-#line 2366 "ntp_parser.c" /* yacc.c:1646 */
+#line 2372 "ntp_parser.c" /* yacc.c:1646 */
break;
case 98:
-#line 674 "ntp_parser.y" /* yacc.c:1646 */
+#line 676 "ntp_parser.y" /* yacc.c:1646 */
{
filegen_node *fgn;
fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.filegen_opts, fgn);
}
-#line 2377 "ntp_parser.c" /* yacc.c:1646 */
+#line 2383 "ntp_parser.c" /* yacc.c:1646 */
break;
case 99:
-#line 684 "ntp_parser.y" /* yacc.c:1646 */
+#line 686 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2386 "ntp_parser.c" /* yacc.c:1646 */
+#line 2392 "ntp_parser.c" /* yacc.c:1646 */
break;
case 100:
-#line 689 "ntp_parser.y" /* yacc.c:1646 */
+#line 691 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2395 "ntp_parser.c" /* yacc.c:1646 */
+#line 2401 "ntp_parser.c" /* yacc.c:1646 */
break;
case 109:
-#line 708 "ntp_parser.y" /* yacc.c:1646 */
+#line 710 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2401 "ntp_parser.c" /* yacc.c:1646 */
+#line 2407 "ntp_parser.c" /* yacc.c:1646 */
break;
case 110:
-#line 710 "ntp_parser.y" /* yacc.c:1646 */
+#line 712 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2410 "ntp_parser.c" /* yacc.c:1646 */
+#line 2416 "ntp_parser.c" /* yacc.c:1646 */
break;
case 111:
-#line 718 "ntp_parser.y" /* yacc.c:1646 */
+#line 720 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
@@ -2420,11 +2426,11 @@ yyreduce:
yyerror(ip_file, "filegen file remote config ignored");
}
}
-#line 2424 "ntp_parser.c" /* yacc.c:1646 */
+#line 2430 "ntp_parser.c" /* yacc.c:1646 */
break;
case 112:
-#line 728 "ntp_parser.y" /* yacc.c:1646 */
+#line 730 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2433,11 +2439,11 @@ yyreduce:
yyerror(ip_file, "filegen type remote config ignored");
}
}
-#line 2437 "ntp_parser.c" /* yacc.c:1646 */
+#line 2443 "ntp_parser.c" /* yacc.c:1646 */
break;
case 113:
-#line 737 "ntp_parser.y" /* yacc.c:1646 */
+#line 739 "ntp_parser.y" /* yacc.c:1646 */
{
const char *err;
@@ -2452,33 +2458,33 @@ yyreduce:
yyerror(ip_file, err);
}
}
-#line 2456 "ntp_parser.c" /* yacc.c:1646 */
+#line 2462 "ntp_parser.c" /* yacc.c:1646 */
break;
case 114:
-#line 752 "ntp_parser.y" /* yacc.c:1646 */
+#line 754 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2462 "ntp_parser.c" /* yacc.c:1646 */
+#line 2468 "ntp_parser.c" /* yacc.c:1646 */
break;
case 126:
-#line 782 "ntp_parser.y" /* yacc.c:1646 */
+#line 784 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2470 "ntp_parser.c" /* yacc.c:1646 */
+#line 2476 "ntp_parser.c" /* yacc.c:1646 */
break;
case 127:
-#line 786 "ntp_parser.y" /* yacc.c:1646 */
+#line 788 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2478 "ntp_parser.c" /* yacc.c:1646 */
+#line 2484 "ntp_parser.c" /* yacc.c:1646 */
break;
case 128:
-#line 790 "ntp_parser.y" /* yacc.c:1646 */
+#line 792 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2486,11 +2492,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2490 "ntp_parser.c" /* yacc.c:1646 */
+#line 2496 "ntp_parser.c" /* yacc.c:1646 */
break;
case 129:
-#line 798 "ntp_parser.y" /* yacc.c:1646 */
+#line 800 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2498,11 +2504,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2502 "ntp_parser.c" /* yacc.c:1646 */
+#line 2508 "ntp_parser.c" /* yacc.c:1646 */
break;
case 130:
-#line 806 "ntp_parser.y" /* yacc.c:1646 */
+#line 808 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2510,11 +2516,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2514 "ntp_parser.c" /* yacc.c:1646 */
+#line 2520 "ntp_parser.c" /* yacc.c:1646 */
break;
case 131:
-#line 814 "ntp_parser.y" /* yacc.c:1646 */
+#line 816 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2529,11 +2535,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2533 "ntp_parser.c" /* yacc.c:1646 */
+#line 2539 "ntp_parser.c" /* yacc.c:1646 */
break;
case 132:
-#line 829 "ntp_parser.y" /* yacc.c:1646 */
+#line 831 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2548,11 +2554,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2552 "ntp_parser.c" /* yacc.c:1646 */
+#line 2558 "ntp_parser.c" /* yacc.c:1646 */
break;
case 133:
-#line 844 "ntp_parser.y" /* yacc.c:1646 */
+#line 846 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node * rn;
@@ -2561,199 +2567,199 @@ yyreduce:
NULL, NULL, (yyvsp[0].Int_fifo), ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2565 "ntp_parser.c" /* yacc.c:1646 */
+#line 2571 "ntp_parser.c" /* yacc.c:1646 */
break;
case 134:
-#line 856 "ntp_parser.y" /* yacc.c:1646 */
+#line 858 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Int_fifo) = NULL; }
-#line 2571 "ntp_parser.c" /* yacc.c:1646 */
+#line 2577 "ntp_parser.c" /* yacc.c:1646 */
break;
case 135:
-#line 858 "ntp_parser.y" /* yacc.c:1646 */
+#line 860 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2580 "ntp_parser.c" /* yacc.c:1646 */
+#line 2586 "ntp_parser.c" /* yacc.c:1646 */
break;
case 151:
-#line 884 "ntp_parser.y" /* yacc.c:1646 */
+#line 886 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2589 "ntp_parser.c" /* yacc.c:1646 */
+#line 2595 "ntp_parser.c" /* yacc.c:1646 */
break;
case 152:
-#line 889 "ntp_parser.y" /* yacc.c:1646 */
+#line 891 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2598 "ntp_parser.c" /* yacc.c:1646 */
+#line 2604 "ntp_parser.c" /* yacc.c:1646 */
break;
case 153:
-#line 897 "ntp_parser.y" /* yacc.c:1646 */
+#line 899 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2604 "ntp_parser.c" /* yacc.c:1646 */
+#line 2610 "ntp_parser.c" /* yacc.c:1646 */
break;
case 157:
-#line 908 "ntp_parser.y" /* yacc.c:1646 */
+#line 910 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2613 "ntp_parser.c" /* yacc.c:1646 */
+#line 2619 "ntp_parser.c" /* yacc.c:1646 */
break;
case 158:
-#line 913 "ntp_parser.y" /* yacc.c:1646 */
+#line 915 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2622 "ntp_parser.c" /* yacc.c:1646 */
+#line 2628 "ntp_parser.c" /* yacc.c:1646 */
break;
case 159:
-#line 921 "ntp_parser.y" /* yacc.c:1646 */
+#line 923 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2628 "ntp_parser.c" /* yacc.c:1646 */
+#line 2634 "ntp_parser.c" /* yacc.c:1646 */
break;
case 168:
-#line 941 "ntp_parser.y" /* yacc.c:1646 */
+#line 943 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.fudge, aon);
}
-#line 2639 "ntp_parser.c" /* yacc.c:1646 */
+#line 2645 "ntp_parser.c" /* yacc.c:1646 */
break;
case 169:
-#line 951 "ntp_parser.y" /* yacc.c:1646 */
+#line 953 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2648 "ntp_parser.c" /* yacc.c:1646 */
+#line 2654 "ntp_parser.c" /* yacc.c:1646 */
break;
case 170:
-#line 956 "ntp_parser.y" /* yacc.c:1646 */
+#line 958 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2657 "ntp_parser.c" /* yacc.c:1646 */
+#line 2663 "ntp_parser.c" /* yacc.c:1646 */
break;
case 171:
-#line 964 "ntp_parser.y" /* yacc.c:1646 */
+#line 966 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2663 "ntp_parser.c" /* yacc.c:1646 */
+#line 2669 "ntp_parser.c" /* yacc.c:1646 */
break;
case 172:
-#line 966 "ntp_parser.y" /* yacc.c:1646 */
+#line 968 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2669 "ntp_parser.c" /* yacc.c:1646 */
+#line 2675 "ntp_parser.c" /* yacc.c:1646 */
break;
case 173:
-#line 968 "ntp_parser.y" /* yacc.c:1646 */
+#line 970 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2675 "ntp_parser.c" /* yacc.c:1646 */
+#line 2681 "ntp_parser.c" /* yacc.c:1646 */
break;
case 174:
-#line 970 "ntp_parser.y" /* yacc.c:1646 */
+#line 972 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2681 "ntp_parser.c" /* yacc.c:1646 */
+#line 2687 "ntp_parser.c" /* yacc.c:1646 */
break;
case 175:
-#line 972 "ntp_parser.y" /* yacc.c:1646 */
+#line 974 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2687 "ntp_parser.c" /* yacc.c:1646 */
+#line 2693 "ntp_parser.c" /* yacc.c:1646 */
break;
case 182:
-#line 993 "ntp_parser.y" /* yacc.c:1646 */
+#line 995 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
-#line 2693 "ntp_parser.c" /* yacc.c:1646 */
+#line 2699 "ntp_parser.c" /* yacc.c:1646 */
break;
case 183:
-#line 998 "ntp_parser.y" /* yacc.c:1646 */
+#line 1000 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2702 "ntp_parser.c" /* yacc.c:1646 */
+#line 2708 "ntp_parser.c" /* yacc.c:1646 */
break;
case 184:
-#line 1003 "ntp_parser.y" /* yacc.c:1646 */
+#line 1005 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2711 "ntp_parser.c" /* yacc.c:1646 */
+#line 2717 "ntp_parser.c" /* yacc.c:1646 */
break;
case 185:
-#line 1011 "ntp_parser.y" /* yacc.c:1646 */
+#line 1013 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2717 "ntp_parser.c" /* yacc.c:1646 */
+#line 2723 "ntp_parser.c" /* yacc.c:1646 */
break;
case 189:
-#line 1027 "ntp_parser.y" /* yacc.c:1646 */
+#line 1029 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2723 "ntp_parser.c" /* yacc.c:1646 */
+#line 2729 "ntp_parser.c" /* yacc.c:1646 */
break;
case 190:
-#line 1029 "ntp_parser.y" /* yacc.c:1646 */
+#line 1031 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2729 "ntp_parser.c" /* yacc.c:1646 */
+#line 2735 "ntp_parser.c" /* yacc.c:1646 */
break;
case 191:
-#line 1034 "ntp_parser.y" /* yacc.c:1646 */
+#line 1036 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2738 "ntp_parser.c" /* yacc.c:1646 */
+#line 2744 "ntp_parser.c" /* yacc.c:1646 */
break;
case 192:
-#line 1039 "ntp_parser.y" /* yacc.c:1646 */
+#line 1041 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2747 "ntp_parser.c" /* yacc.c:1646 */
+#line 2753 "ntp_parser.c" /* yacc.c:1646 */
break;
case 193:
-#line 1047 "ntp_parser.y" /* yacc.c:1646 */
+#line 1049 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2753 "ntp_parser.c" /* yacc.c:1646 */
+#line 2759 "ntp_parser.c" /* yacc.c:1646 */
break;
case 194:
-#line 1049 "ntp_parser.y" /* yacc.c:1646 */
+#line 1051 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
@@ -2767,63 +2773,63 @@ yyreduce:
yyerror(ip_file, err_str);
}
}
-#line 2771 "ntp_parser.c" /* yacc.c:1646 */
+#line 2777 "ntp_parser.c" /* yacc.c:1646 */
break;
case 203:
-#line 1084 "ntp_parser.y" /* yacc.c:1646 */
+#line 1086 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
-#line 2777 "ntp_parser.c" /* yacc.c:1646 */
+#line 2783 "ntp_parser.c" /* yacc.c:1646 */
break;
case 204:
-#line 1089 "ntp_parser.y" /* yacc.c:1646 */
+#line 1091 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2786 "ntp_parser.c" /* yacc.c:1646 */
+#line 2792 "ntp_parser.c" /* yacc.c:1646 */
break;
case 205:
-#line 1094 "ntp_parser.y" /* yacc.c:1646 */
+#line 1096 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2795 "ntp_parser.c" /* yacc.c:1646 */
+#line 2801 "ntp_parser.c" /* yacc.c:1646 */
break;
case 206:
-#line 1102 "ntp_parser.y" /* yacc.c:1646 */
+#line 1104 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2801 "ntp_parser.c" /* yacc.c:1646 */
+#line 2807 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 217:
-#line 1125 "ntp_parser.y" /* yacc.c:1646 */
+ case 219:
+#line 1129 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2812 "ntp_parser.c" /* yacc.c:1646 */
+#line 2818 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 218:
-#line 1132 "ntp_parser.y" /* yacc.c:1646 */
+ case 220:
+#line 1136 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2823 "ntp_parser.c" /* yacc.c:1646 */
+#line 2829 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 219:
-#line 1139 "ntp_parser.y" /* yacc.c:1646 */
+ case 221:
+#line 1143 "ntp_parser.y" /* yacc.c:1646 */
{
char error_text[64];
attr_val *av;
@@ -2839,11 +2845,11 @@ yyreduce:
yyerror(ip_file, error_text);
}
}
-#line 2843 "ntp_parser.c" /* yacc.c:1646 */
+#line 2849 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 220:
-#line 1155 "ntp_parser.y" /* yacc.c:1646 */
+ case 222:
+#line 1159 "ntp_parser.y" /* yacc.c:1646 */
{
if (!input_from_file) {
yyerror(ip_file, "remote includefile ignored");
@@ -2862,72 +2868,72 @@ yyreduce:
}
}
}
-#line 2866 "ntp_parser.c" /* yacc.c:1646 */
+#line 2872 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 221:
-#line 1174 "ntp_parser.y" /* yacc.c:1646 */
+ case 223:
+#line 1178 "ntp_parser.y" /* yacc.c:1646 */
{
while (curr_include_level != -1)
FCLOSE(fp[curr_include_level--]);
}
-#line 2875 "ntp_parser.c" /* yacc.c:1646 */
+#line 2881 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 222:
-#line 1179 "ntp_parser.y" /* yacc.c:1646 */
+ case 224:
+#line 1183 "ntp_parser.y" /* yacc.c:1646 */
{ /* see drift_parm below for actions */ }
-#line 2881 "ntp_parser.c" /* yacc.c:1646 */
+#line 2887 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 223:
-#line 1181 "ntp_parser.y" /* yacc.c:1646 */
+ case 225:
+#line 1185 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
-#line 2887 "ntp_parser.c" /* yacc.c:1646 */
+#line 2893 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 224:
-#line 1183 "ntp_parser.y" /* yacc.c:1646 */
+ case 226:
+#line 1187 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
-#line 2893 "ntp_parser.c" /* yacc.c:1646 */
+#line 2899 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 225:
-#line 1185 "ntp_parser.y" /* yacc.c:1646 */
+ case 227:
+#line 1189 "ntp_parser.y" /* yacc.c:1646 */
{ APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
-#line 2899 "ntp_parser.c" /* yacc.c:1646 */
+#line 2905 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 226:
-#line 1187 "ntp_parser.y" /* yacc.c:1646 */
+ case 228:
+#line 1191 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.trap, aon);
}
-#line 2910 "ntp_parser.c" /* yacc.c:1646 */
+#line 2916 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 227:
-#line 1194 "ntp_parser.y" /* yacc.c:1646 */
+ case 229:
+#line 1198 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
-#line 2916 "ntp_parser.c" /* yacc.c:1646 */
+#line 2922 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 236:
-#line 1216 "ntp_parser.y" /* yacc.c:1646 */
+ case 238:
+#line 1220 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2927 "ntp_parser.c" /* yacc.c:1646 */
+#line 2933 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 237:
-#line 1223 "ntp_parser.y" /* yacc.c:1646 */
+ case 239:
+#line 1227 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
@@ -2936,82 +2942,82 @@ yyreduce:
av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2940 "ntp_parser.c" /* yacc.c:1646 */
+#line 2946 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 238:
-#line 1232 "ntp_parser.y" /* yacc.c:1646 */
+ case 240:
+#line 1236 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval(T_Driftfile, "");
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2951 "ntp_parser.c" /* yacc.c:1646 */
+#line 2957 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 239:
-#line 1242 "ntp_parser.y" /* yacc.c:1646 */
+ case 241:
+#line 1246 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
-#line 2957 "ntp_parser.c" /* yacc.c:1646 */
+#line 2963 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 241:
-#line 1248 "ntp_parser.y" /* yacc.c:1646 */
+ case 243:
+#line 1252 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 2963 "ntp_parser.c" /* yacc.c:1646 */
+#line 2969 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 242:
-#line 1253 "ntp_parser.y" /* yacc.c:1646 */
+ case 244:
+#line 1257 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2969 "ntp_parser.c" /* yacc.c:1646 */
+#line 2975 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 243:
-#line 1255 "ntp_parser.y" /* yacc.c:1646 */
+ case 245:
+#line 1259 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2978 "ntp_parser.c" /* yacc.c:1646 */
+#line 2984 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 244:
-#line 1263 "ntp_parser.y" /* yacc.c:1646 */
+ case 246:
+#line 1267 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2984 "ntp_parser.c" /* yacc.c:1646 */
+#line 2990 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 245:
-#line 1265 "ntp_parser.y" /* yacc.c:1646 */
+ case 247:
+#line 1269 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
destroy_address_node((yyvsp[0].Address_node));
}
-#line 2993 "ntp_parser.c" /* yacc.c:1646 */
+#line 2999 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 246:
-#line 1273 "ntp_parser.y" /* yacc.c:1646 */
+ case 248:
+#line 1277 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3002 "ntp_parser.c" /* yacc.c:1646 */
+#line 3008 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 247:
-#line 1278 "ntp_parser.y" /* yacc.c:1646 */
+ case 249:
+#line 1282 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3011 "ntp_parser.c" /* yacc.c:1646 */
+#line 3017 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 248:
-#line 1286 "ntp_parser.y" /* yacc.c:1646 */
+ case 250:
+#line 1290 "ntp_parser.y" /* yacc.c:1646 */
{
char prefix;
char * type;
@@ -3033,141 +3039,141 @@ yyreduce:
(yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
YYFREE((yyvsp[0].String));
}
-#line 3037 "ntp_parser.c" /* yacc.c:1646 */
+#line 3043 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 249:
-#line 1311 "ntp_parser.y" /* yacc.c:1646 */
+ case 251:
+#line 1315 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3048 "ntp_parser.c" /* yacc.c:1646 */
+#line 3054 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 250:
-#line 1318 "ntp_parser.y" /* yacc.c:1646 */
+ case 252:
+#line 1322 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3059 "ntp_parser.c" /* yacc.c:1646 */
+#line 3065 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 260:
-#line 1346 "ntp_parser.y" /* yacc.c:1646 */
+ case 262:
+#line 1350 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
-#line 3065 "ntp_parser.c" /* yacc.c:1646 */
+#line 3071 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 261:
-#line 1351 "ntp_parser.y" /* yacc.c:1646 */
+ case 263:
+#line 1355 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3074 "ntp_parser.c" /* yacc.c:1646 */
+#line 3080 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 262:
-#line 1356 "ntp_parser.y" /* yacc.c:1646 */
+ case 264:
+#line 1360 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3083 "ntp_parser.c" /* yacc.c:1646 */
+#line 3089 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 270:
-#line 1380 "ntp_parser.y" /* yacc.c:1646 */
+ case 272:
+#line 1384 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3092 "ntp_parser.c" /* yacc.c:1646 */
+#line 3098 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 271:
-#line 1385 "ntp_parser.y" /* yacc.c:1646 */
+ case 273:
+#line 1389 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3101 "ntp_parser.c" /* yacc.c:1646 */
+#line 3107 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 272:
-#line 1393 "ntp_parser.y" /* yacc.c:1646 */
+ case 274:
+#line 1397 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3110 "ntp_parser.c" /* yacc.c:1646 */
+#line 3116 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 273:
-#line 1398 "ntp_parser.y" /* yacc.c:1646 */
+ case 275:
+#line 1402 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3119 "ntp_parser.c" /* yacc.c:1646 */
+#line 3125 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 274:
-#line 1406 "ntp_parser.y" /* yacc.c:1646 */
+ case 276:
+#line 1410 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
-#line 3125 "ntp_parser.c" /* yacc.c:1646 */
+#line 3131 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 276:
-#line 1412 "ntp_parser.y" /* yacc.c:1646 */
+ case 278:
+#line 1416 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
-#line 3131 "ntp_parser.c" /* yacc.c:1646 */
+#line 3137 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 277:
-#line 1417 "ntp_parser.y" /* yacc.c:1646 */
+ case 279:
+#line 1421 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = (yyvsp[-1].String_fifo);
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3140 "ntp_parser.c" /* yacc.c:1646 */
+#line 3146 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 278:
-#line 1422 "ntp_parser.y" /* yacc.c:1646 */
+ case 280:
+#line 1426 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = NULL;
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3149 "ntp_parser.c" /* yacc.c:1646 */
+#line 3155 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 279:
-#line 1430 "ntp_parser.y" /* yacc.c:1646 */
+ case 281:
+#line 1434 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3158 "ntp_parser.c" /* yacc.c:1646 */
+#line 3164 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 280:
-#line 1435 "ntp_parser.y" /* yacc.c:1646 */
+ case 282:
+#line 1439 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = NULL;
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3167 "ntp_parser.c" /* yacc.c:1646 */
+#line 3173 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 281:
-#line 1443 "ntp_parser.y" /* yacc.c:1646 */
+ case 283:
+#line 1447 "ntp_parser.y" /* yacc.c:1646 */
{
if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
yyerror(ip_file, "Integer value is not boolean (0 or 1). Assuming 1");
@@ -3176,29 +3182,29 @@ yyreduce:
(yyval.Integer) = (yyvsp[0].Integer);
}
}
-#line 3180 "ntp_parser.c" /* yacc.c:1646 */
- break;
-
- case 282:
-#line 1451 "ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = 1; }
#line 3186 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 283:
-#line 1452 "ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = 0; }
+ case 284:
+#line 1455 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Integer) = 1; }
#line 3192 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 284:
+ case 285:
#line 1456 "ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Double) = (double)(yyvsp[0].Integer); }
+ { (yyval.Integer) = 0; }
#line 3198 "ntp_parser.c" /* yacc.c:1646 */
break;
case 286:
-#line 1467 "ntp_parser.y" /* yacc.c:1646 */
+#line 1460 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Double) = (double)(yyvsp[0].Integer); }
+#line 3204 "ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 288:
+#line 1471 "ntp_parser.y" /* yacc.c:1646 */
{
sim_node *sn;
@@ -3208,125 +3214,125 @@ yyreduce:
/* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
-#line 3212 "ntp_parser.c" /* yacc.c:1646 */
+#line 3218 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 287:
-#line 1484 "ntp_parser.y" /* yacc.c:1646 */
+ case 289:
+#line 1488 "ntp_parser.y" /* yacc.c:1646 */
{ old_config_style = 0; }
-#line 3218 "ntp_parser.c" /* yacc.c:1646 */
+#line 3224 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 288:
-#line 1489 "ntp_parser.y" /* yacc.c:1646 */
+ case 290:
+#line 1493 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3227 "ntp_parser.c" /* yacc.c:1646 */
+#line 3233 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 289:
-#line 1494 "ntp_parser.y" /* yacc.c:1646 */
+ case 291:
+#line 1498 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3236 "ntp_parser.c" /* yacc.c:1646 */
+#line 3242 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 290:
-#line 1502 "ntp_parser.y" /* yacc.c:1646 */
+ case 292:
+#line 1506 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3242 "ntp_parser.c" /* yacc.c:1646 */
+#line 3248 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 293:
-#line 1512 "ntp_parser.y" /* yacc.c:1646 */
+ case 295:
+#line 1516 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3251 "ntp_parser.c" /* yacc.c:1646 */
+#line 3257 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 294:
-#line 1517 "ntp_parser.y" /* yacc.c:1646 */
+ case 296:
+#line 1521 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3260 "ntp_parser.c" /* yacc.c:1646 */
+#line 3266 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 295:
-#line 1525 "ntp_parser.y" /* yacc.c:1646 */
+ case 297:
+#line 1529 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
-#line 3266 "ntp_parser.c" /* yacc.c:1646 */
+#line 3272 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 296:
-#line 1530 "ntp_parser.y" /* yacc.c:1646 */
+ case 298:
+#line 1534 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (yyvsp[-1].Double); }
-#line 3272 "ntp_parser.c" /* yacc.c:1646 */
+#line 3278 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 297:
-#line 1535 "ntp_parser.y" /* yacc.c:1646 */
+ case 299:
+#line 1539 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = (yyvsp[0].Address_node); }
-#line 3278 "ntp_parser.c" /* yacc.c:1646 */
+#line 3284 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 298:
-#line 1540 "ntp_parser.y" /* yacc.c:1646 */
+ case 300:
+#line 1544 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3287 "ntp_parser.c" /* yacc.c:1646 */
+#line 3293 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 299:
-#line 1545 "ntp_parser.y" /* yacc.c:1646 */
+ case 301:
+#line 1549 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3296 "ntp_parser.c" /* yacc.c:1646 */
+#line 3302 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 300:
-#line 1553 "ntp_parser.y" /* yacc.c:1646 */
+ case 302:
+#line 1557 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
-#line 3302 "ntp_parser.c" /* yacc.c:1646 */
+#line 3308 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 301:
-#line 1558 "ntp_parser.y" /* yacc.c:1646 */
+ case 303:
+#line 1562 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3311 "ntp_parser.c" /* yacc.c:1646 */
+#line 3317 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 302:
-#line 1563 "ntp_parser.y" /* yacc.c:1646 */
+ case 304:
+#line 1567 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3320 "ntp_parser.c" /* yacc.c:1646 */
+#line 3326 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 303:
-#line 1571 "ntp_parser.y" /* yacc.c:1646 */
+ case 305:
+#line 1575 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3326 "ntp_parser.c" /* yacc.c:1646 */
+#line 3332 "ntp_parser.c" /* yacc.c:1646 */
break;
-#line 3330 "ntp_parser.c" /* yacc.c:1646 */
+#line 3336 "ntp_parser.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3554,7 +3560,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1582 "ntp_parser.y" /* yacc.c:1906 */
+#line 1586 "ntp_parser.y" /* yacc.c:1906 */
void
diff --git a/ntpd/ntp_parser.h b/ntpd/ntp_parser.h
index fc2e971ce0a9..2804e544973c 100644
--- a/ntpd/ntp_parser.h
+++ b/ntpd/ntp_parser.h
@@ -194,44 +194,46 @@ extern int yydebug;
T_Stats = 404,
T_Statsdir = 405,
T_Step = 406,
- T_Stepout = 407,
- T_Stratum = 408,
- T_String = 409,
- T_Sys = 410,
- T_Sysstats = 411,
- T_Tick = 412,
- T_Time1 = 413,
- T_Time2 = 414,
- T_Timer = 415,
- T_Timingstats = 416,
- T_Tinker = 417,
- T_Tos = 418,
- T_Trap = 419,
- T_True = 420,
- T_Trustedkey = 421,
- T_Ttl = 422,
- T_Type = 423,
- T_U_int = 424,
- T_Unconfig = 425,
- T_Unpeer = 426,
- T_Version = 427,
- T_WanderThreshold = 428,
- T_Week = 429,
- T_Wildcard = 430,
- T_Xleave = 431,
- T_Year = 432,
- T_Flag = 433,
- T_EOC = 434,
- T_Simulate = 435,
- T_Beep_Delay = 436,
- T_Sim_Duration = 437,
- T_Server_Offset = 438,
- T_Duration = 439,
- T_Freq_Offset = 440,
- T_Wander = 441,
- T_Jitter = 442,
- T_Prop_Delay = 443,
- T_Proc_Delay = 444
+ T_Stepback = 407,
+ T_Stepfwd = 408,
+ T_Stepout = 409,
+ T_Stratum = 410,
+ T_String = 411,
+ T_Sys = 412,
+ T_Sysstats = 413,
+ T_Tick = 414,
+ T_Time1 = 415,
+ T_Time2 = 416,
+ T_Timer = 417,
+ T_Timingstats = 418,
+ T_Tinker = 419,
+ T_Tos = 420,
+ T_Trap = 421,
+ T_True = 422,
+ T_Trustedkey = 423,
+ T_Ttl = 424,
+ T_Type = 425,
+ T_U_int = 426,
+ T_Unconfig = 427,
+ T_Unpeer = 428,
+ T_Version = 429,
+ T_WanderThreshold = 430,
+ T_Week = 431,
+ T_Wildcard = 432,
+ T_Xleave = 433,
+ T_Year = 434,
+ T_Flag = 435,
+ T_EOC = 436,
+ T_Simulate = 437,
+ T_Beep_Delay = 438,
+ T_Sim_Duration = 439,
+ T_Server_Offset = 440,
+ T_Duration = 441,
+ T_Freq_Offset = 442,
+ T_Wander = 443,
+ T_Jitter = 444,
+ T_Prop_Delay = 445,
+ T_Proc_Delay = 446
};
#endif
/* Tokens. */
@@ -384,44 +386,46 @@ extern int yydebug;
#define T_Stats 404
#define T_Statsdir 405
#define T_Step 406
-#define T_Stepout 407
-#define T_Stratum 408
-#define T_String 409
-#define T_Sys 410
-#define T_Sysstats 411
-#define T_Tick 412
-#define T_Time1 413
-#define T_Time2 414
-#define T_Timer 415
-#define T_Timingstats 416
-#define T_Tinker 417
-#define T_Tos 418
-#define T_Trap 419
-#define T_True 420
-#define T_Trustedkey 421
-#define T_Ttl 422
-#define T_Type 423
-#define T_U_int 424
-#define T_Unconfig 425
-#define T_Unpeer 426
-#define T_Version 427
-#define T_WanderThreshold 428
-#define T_Week 429
-#define T_Wildcard 430
-#define T_Xleave 431
-#define T_Year 432
-#define T_Flag 433
-#define T_EOC 434
-#define T_Simulate 435
-#define T_Beep_Delay 436
-#define T_Sim_Duration 437
-#define T_Server_Offset 438
-#define T_Duration 439
-#define T_Freq_Offset 440
-#define T_Wander 441
-#define T_Jitter 442
-#define T_Prop_Delay 443
-#define T_Proc_Delay 444
+#define T_Stepback 407
+#define T_Stepfwd 408
+#define T_Stepout 409
+#define T_Stratum 410
+#define T_String 411
+#define T_Sys 412
+#define T_Sysstats 413
+#define T_Tick 414
+#define T_Time1 415
+#define T_Time2 416
+#define T_Timer 417
+#define T_Timingstats 418
+#define T_Tinker 419
+#define T_Tos 420
+#define T_Trap 421
+#define T_True 422
+#define T_Trustedkey 423
+#define T_Ttl 424
+#define T_Type 425
+#define T_U_int 426
+#define T_Unconfig 427
+#define T_Unpeer 428
+#define T_Version 429
+#define T_WanderThreshold 430
+#define T_Week 431
+#define T_Wildcard 432
+#define T_Xleave 433
+#define T_Year 434
+#define T_Flag 435
+#define T_EOC 436
+#define T_Simulate 437
+#define T_Beep_Delay 438
+#define T_Sim_Duration 439
+#define T_Server_Offset 440
+#define T_Duration 441
+#define T_Freq_Offset 442
+#define T_Wander 443
+#define T_Jitter 444
+#define T_Prop_Delay 445
+#define T_Proc_Delay 446
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -447,7 +451,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 451 "ntp_parser.h" /* yacc.c:1909 */
+#line 455 "ntp_parser.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
diff --git a/ntpd/ntp_parser.y b/ntpd/ntp_parser.y
index c55e0697dee4..e878e794d269 100644
--- a/ntpd/ntp_parser.y
+++ b/ntpd/ntp_parser.y
@@ -220,6 +220,8 @@
%token <Integer> T_Stats
%token <Integer> T_Statsdir
%token <Integer> T_Step
+%token <Integer> T_Stepback
+%token <Integer> T_Stepfwd
%token <Integer> T_Stepout
%token <Integer> T_Stratum
%token <String> T_String /* not a token */
@@ -1109,6 +1111,8 @@ tinker_option_keyword
| T_Huffpuff
| T_Panic
| T_Step
+ | T_Stepback
+ | T_Stepfwd
| T_Stepout
| T_Tick
;
diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c
index 495ee30af1a1..d42d804d444d 100644
--- a/ntpd/ntp_peer.c
+++ b/ntpd/ntp_peer.c
@@ -92,6 +92,7 @@ int peer_free_count; /* count of free structures */
* value every time an association is mobilized.
*/
static associd_t current_association_ID; /* association ID */
+static associd_t initial_association_ID; /* association ID */
/*
* Memory allocation watermarks.
@@ -147,6 +148,7 @@ init_peer(void)
do
current_association_ID = ntp_random() & ASSOCID_MAX;
while (!current_association_ID);
+ initial_association_ID = current_association_ID;
}
@@ -1036,3 +1038,21 @@ findmanycastpeer(
return peer;
}
+
+/* peer_cleanup - clean peer list prior to shutdown */
+void peer_cleanup(void)
+{
+ struct peer *peer;
+ associd_t assoc;
+
+ for (assoc = initial_association_ID; assoc != current_association_ID; assoc++) {
+ if (assoc != 0U) {
+ peer = findpeerbyassoc(assoc);
+ if (peer != NULL)
+ unpeer(peer);
+ }
+ }
+ peer = findpeerbyassoc(current_association_ID);
+ if (peer != NULL)
+ unpeer(peer);
+}
diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
index 37c3f0325e07..577b5fb0af5a 100644
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -245,7 +245,7 @@ transmit(
/*
* Update the reachability status. If not heard for
* three consecutive polls, stuff infinity in the clock
- * filter.
+ * filter.
*/
oreach = peer->reach;
peer->outdate = current_time;
@@ -290,7 +290,7 @@ transmit(
* If preemptible and we have more peers than maxclock,
* and this peer has the minimum score of preemptibles,
* demobilize.
- */
+ */
if (peer->unreach >= NTP_UNREACH) {
hpoll++;
/* ephemeral: no FLAG_CONFIG nor FLAG_PREEMPT */
@@ -335,7 +335,7 @@ transmit(
peer->retry--;
/*
- * Do not transmit if in broadcast client mode.
+ * Do not transmit if in broadcast client mode.
*/
if (peer->hmode != MODE_BCLIENT)
peer_xmit(peer);
@@ -442,7 +442,7 @@ receive(
return; /* no flakeway */
}
}
-
+
/*
* Version check must be after the query packets, since they
* intentionally use an early version.
@@ -659,7 +659,7 @@ receive(
* If the signature is 20 bytes long, the last 16 of
* which are zero, then this is a Microsoft client
* wanting AD-style authentication of the server's
- * reply.
+ * reply.
*
* This is described in Microsoft's WSPP docs, in MS-SNTP:
* http://msdn.microsoft.com/en-us/library/cc212930.aspx
@@ -680,7 +680,7 @@ receive(
* broadcast or unicast address as appropriate.
*/
if (crypto_flags && skeyid > NTP_MAXKEY) {
-
+
/*
* More on the autokey dance (AKD). A cookie is
* constructed from public and private values.
@@ -874,7 +874,7 @@ receive(
* curious and could be an intruder attempting to clog, so we
* just ignore it.
*
- * If the packet is authentic and the manycastclient or pool
+ * If the packet is authentic and the manycastclient or pool
* association is found, we mobilize a client association and
* copy pertinent variables from the manycastclient or pool
* association to the new client association. If not, just
@@ -1256,16 +1256,6 @@ receive(
}
/*
- * Update the state variables.
- */
- if (peer->flip == 0) {
- if (hismode != MODE_BROADCAST)
- peer->rec = p_xmt;
- peer->dst = rbufp->recv_time;
- }
- peer->xmt = p_xmt;
-
- /*
* If this is a crypto_NAK, the server cannot authenticate a
* client packet. The server might have just changed keys. Clear
* the association and restart the protocol.
@@ -1284,19 +1274,21 @@ receive(
#endif /* AUTOKEY */
return;
- /*
- * If the digest fails, the client cannot authenticate a server
+ /*
+ * If the digest fails or it's missing for authenticated
+ * associations, the client cannot authenticate a server
* reply to a client packet previously sent. The loopback check
* is designed to avoid a bait-and-switch attack, which was
* possible in past versions. If symmetric modes, return a
* crypto-NAK. The peer should restart the protocol.
*/
- } else if (!AUTH(has_mac || (restrict_mask & RES_DONTTRUST),
- is_authentic)) {
+ } else if (!AUTH(peer->keyid || has_mac ||
+ (restrict_mask & RES_DONTTRUST), is_authentic)) {
report_event(PEVNT_AUTH, peer, "digest");
peer->flash |= TEST5; /* bad auth */
peer->badauth++;
- if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)
+ if (has_mac &&
+ (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE))
fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask);
if (peer->flags & FLAG_PREEMPT) {
unpeer(peer);
@@ -1310,6 +1302,16 @@ receive(
}
/*
+ * Update the state variables.
+ */
+ if (peer->flip == 0) {
+ if (hismode != MODE_BROADCAST)
+ peer->rec = p_xmt;
+ peer->dst = rbufp->recv_time;
+ }
+ peer->xmt = p_xmt;
+
+ /*
* Set the peer ppoll to the maximum of the packet ppoll and the
* peer minpoll. If a kiss-o'-death, set the peer minpoll to
* this maximum and advance the headway to give the sender some
@@ -1577,7 +1579,7 @@ process_packet(
/*
* If the peer was previously unreachable, raise a trap. In any
* case, mark it reachable.
- */
+ */
if (!peer->reach) {
report_event(PEVNT_REACH, peer, NULL);
peer->timereachable = current_time;
@@ -1644,8 +1646,8 @@ process_packet(
* Interleaved broadcast mode. Use interleaved timestamps.
* t1 = peer->borg, t2 = p_org, t3 = p_org, t4 = aorg
*/
- if (peer->flags & FLAG_XB) {
- ci = p_org; /* delay */
+ if (peer->flags & FLAG_XB) {
+ ci = p_org; /* delay */
L_SUB(&ci, &peer->aorg);
LFPTOD(&ci, t34);
ci = p_org; /* t2 - t1 */
@@ -1774,7 +1776,7 @@ process_packet(
p_del, peer->r21 / 1e3, peer->r34 / 1e3,
td);
#endif
- }
+ }
#endif /* ASSYM */
/*
@@ -2240,7 +2242,7 @@ clock_filter(
for (i = NTP_SHIFT - 1; i >= 0; i--) {
if (i != 0)
peer->filter_disp[j] += dtemp;
- if (peer->filter_disp[j] >= MAXDISPERSE) {
+ if (peer->filter_disp[j] >= MAXDISPERSE) {
peer->filter_disp[j] = MAXDISPERSE;
dst[i] = MAXDISPERSE;
} else if (peer->update - peer->filter_epoch[j] >
@@ -2255,7 +2257,7 @@ clock_filter(
}
/*
- * If the clock has stabilized, sort the samples by distance.
+ * If the clock has stabilized, sort the samples by distance.
*/
if (freq_cnt == 0) {
for (i = 1; i < NTP_SHIFT; i++) {
@@ -2289,7 +2291,7 @@ clock_filter(
continue;
m++;
}
-
+
/*
* Compute the dispersion and jitter. The dispersion is weighted
* exponentially by NTP_FWEIGHT (0.5) so it is normalized close
@@ -2493,9 +2495,9 @@ clock_select(void)
/*
* If this peer could have the orphan parent
* as a synchronization ancestor, exclude it
- * from selection to avoid forming a
+ * from selection to avoid forming a
* synchronization loop within the orphan mesh,
- * triggering stratum climb to infinity
+ * triggering stratum climb to infinity
* instability. Peers at stratum higher than
* the orphan stratum could have the orphan
* parent in ancestry so are excluded.
@@ -2603,7 +2605,7 @@ clock_select(void)
for (allow = 0; 2 * allow < nlist; allow++) {
/*
- * Bound the interval (low, high) as the smallest
+ * Bound the interval (low, high) as the smallest
* interval containing points from the most sources.
*/
n = 0;
@@ -2639,7 +2641,7 @@ clock_select(void)
* We assert the correct time is contained in the interval, but
* the best offset estimate for the interval might not be
* contained in the interval. For this purpose, a truechimer is
- * defined as the midpoint of an interval that overlaps the
+ * defined as the midpoint of an interval that overlaps the
* intersection interval.
*/
j = 0;
@@ -2659,9 +2661,10 @@ clock_select(void)
* include any of them in the cluster population.
*/
if (peer->flags & FLAG_PPS) {
- if (typepps == NULL)
+ if (typepps == NULL)
typepps = peer;
- continue;
+ if (!(peer->flags & FLAG_TSTAMP_PPS))
+ continue;
}
#endif /* REFCLOCK */
@@ -2672,7 +2675,7 @@ clock_select(void)
nlist = j;
/*
- * If no survivors remain at this point, check if the modem
+ * If no survivors remain at this point, check if the modem
* driver, local driver or orphan parent in that order. If so,
* nominate the first one found as the only survivor.
* Otherwise, give up and leave the island to the rats.
@@ -2709,7 +2712,7 @@ clock_select(void)
* by root distance. Continue voting as long as there are more
* than sys_minclock survivors and the select jitter of the peer
* with the worst metric is greater than the minimum peer
- * jitter. Stop if we are about to discard a TRUE or PREFER
+ * jitter. Stop if we are about to discard a TRUE or PREFER
* peer, who of course have the immunity idol.
*/
while (1) {
@@ -2815,7 +2818,7 @@ clock_select(void)
typesystem = peers[speer].peer;
if (osys_peer == NULL || osys_peer == typesystem) {
- sys_clockhop = 0;
+ sys_clockhop = 0;
} else if ((x = fabs(typesystem->offset -
osys_peer->offset)) < sys_mindisp) {
if (sys_clockhop == 0)
@@ -3113,7 +3116,7 @@ peer_xmit(
* the session key is generated.
*/
while (1) {
-
+
/*
* Allocate and initialize a keylist if not
* already done. Then, use the list in inverse
@@ -3165,7 +3168,7 @@ peer_xmit(
break;
/*
- * In symmetric modes the parameter, certificate,
+ * In symmetric modes the parameter, certificate,
* identity, cookie and autokey exchanges are
* required. The leapsecond exchange is optional. But, a
* peer will not believe the other peer until the other
@@ -3324,7 +3327,7 @@ peer_xmit(
session_key(&peer->dstadr->sin, &peer->srcadr,
xkeyid, 0, 2);
}
- }
+ }
#endif /* AUTOKEY */
/*
@@ -3619,7 +3622,7 @@ pool_xmit(
return; /* out of addresses, re-query DNS next poll */
restrict_mask = restrictions(rmtadr);
if (RES_FLAGS & restrict_mask)
- restrict_source(rmtadr, 0,
+ restrict_source(rmtadr, 0,
current_time + POOL_SOLICIT_WINDOW + 1);
lcladr = findinterface(rmtadr);
memset(&xpkt, 0, sizeof(xpkt));
diff --git a/ntpd/ntpd-opts.c b/ntpd/ntpd-opts.c
index 953f39750de6..910689d1ea97 100644
--- a/ntpd/ntpd-opts.c
+++ b/ntpd/ntpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed February 4, 2015 at 02:39:17 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:23:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -74,8 +74,8 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpd options
*/
-static char const ntpd_opt_strs[3061] =
-/* 0 */ "ntpd 4.2.8p1\n"
+static char const ntpd_opt_strs[3129] =
+/* 0 */ "ntpd 4.2.8p2\n"
"Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
@@ -122,92 +122,95 @@ static char const ntpd_opt_strs[3061] =
/* 1460 */ "Allow the first adjustment to be Big\0"
/* 1497 */ "PANICGATE\0"
/* 1507 */ "panicgate\0"
-/* 1517 */ "Jail directory\0"
-/* 1532 */ "JAILDIR\0"
-/* 1540 */ "jaildir\0"
-/* 1548 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
-/* 1627 */ "Listen on an interface name or address\0"
-/* 1666 */ "INTERFACE\0"
-/* 1676 */ "interface\0"
-/* 1686 */ "path to symmetric keys\0"
-/* 1709 */ "KEYFILE\0"
-/* 1717 */ "keyfile\0"
-/* 1725 */ "path to the log file\0"
-/* 1746 */ "LOGFILE\0"
-/* 1754 */ "logfile\0"
-/* 1762 */ "Do not listen to virtual interfaces\0"
-/* 1798 */ "NOVIRTUALIPS\0"
-/* 1811 */ "novirtualips\0"
-/* 1824 */ "Modify Multimedia Timer (Windows only)\0"
-/* 1863 */ "MODIFYMMTIMER\0"
-/* 1877 */ "modifymmtimer\0"
-/* 1891 */ "Do not fork\0"
-/* 1903 */ "NOFORK\0"
-/* 1910 */ "nofork\0"
-/* 1917 */ "Run at high priority\0"
-/* 1938 */ "NICE\0"
-/* 1943 */ "nice\0"
-/* 1948 */ "path to the PID file\0"
-/* 1969 */ "PIDFILE\0"
-/* 1977 */ "pidfile\0"
-/* 1985 */ "Process priority\0"
-/* 2002 */ "PRIORITY\0"
-/* 2011 */ "priority\0"
-/* 2020 */ "Set the time and quit\0"
-/* 2042 */ "QUIT\0"
-/* 2047 */ "quit\0"
-/* 2052 */ "Broadcast/propagation delay\0"
-/* 2080 */ "PROPAGATIONDELAY\0"
-/* 2097 */ "propagationdelay\0"
-/* 2114 */ "Save parsed configuration and quit\0"
-/* 2149 */ "SAVECONFIGQUIT\0"
-/* 2164 */ "saveconfigquit\0"
-/* 2179 */ "Statistics file location\0"
-/* 2204 */ "STATSDIR\0"
-/* 2213 */ "statsdir\0"
-/* 2222 */ "Trusted key number\0"
-/* 2241 */ "TRUSTEDKEY\0"
-/* 2252 */ "trustedkey\0"
-/* 2263 */ "Run as userid (or userid:groupid)\0"
-/* 2297 */ "USER\0"
-/* 2302 */ "user\0"
-/* 2307 */ "interval in seconds between scans for new or dropped interfaces\0"
-/* 2371 */ "UPDATEINTERVAL\0"
-/* 2386 */ "updateinterval\0"
-/* 2401 */ "make ARG an ntp variable (RW)\0"
-/* 2431 */ "VAR\0"
-/* 2435 */ "var\0"
-/* 2439 */ "make ARG an ntp variable (RW|DEF)\0"
-/* 2473 */ "DVAR\0"
-/* 2478 */ "dvar\0"
-/* 2483 */ "Seconds to wait for first clock sync\0"
-/* 2520 */ "WAIT_SYNC\0"
-/* 2530 */ "wait-sync\0"
-/* 2540 */ "Slew up to 600 seconds\0"
-/* 2563 */ "SLEW\0"
-/* 2568 */ "slew\0"
-/* 2573 */ "Use CPU cycle counter (Windows only)\0"
-/* 2610 */ "USEPCC\0"
-/* 2617 */ "usepcc\0"
-/* 2624 */ "Force CPU cycle counter use (Windows only)\0"
-/* 2667 */ "PCCFREQ\0"
-/* 2675 */ "pccfreq\0"
-/* 2683 */ "Register with mDNS as a NTP server\0"
-/* 2718 */ "MDNS\0"
-/* 2723 */ "mdns\0"
-/* 2728 */ "display extended usage information and exit\0"
-/* 2772 */ "help\0"
-/* 2777 */ "extended usage information passed thru pager\0"
-/* 2822 */ "more-help\0"
-/* 2832 */ "output version information and exit\0"
-/* 2868 */ "version\0"
-/* 2876 */ "NTPD\0"
-/* 2881 */ "ntpd - NTP daemon program - Ver. 4.2.8p1\n"
+/* 1517 */ "Step any initial offset correction.\0"
+/* 1553 */ "FORCE_STEP_ONCE\0"
+/* 1569 */ "force-step-once\0"
+/* 1585 */ "Jail directory\0"
+/* 1600 */ "JAILDIR\0"
+/* 1608 */ "jaildir\0"
+/* 1616 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
+/* 1695 */ "Listen on an interface name or address\0"
+/* 1734 */ "INTERFACE\0"
+/* 1744 */ "interface\0"
+/* 1754 */ "path to symmetric keys\0"
+/* 1777 */ "KEYFILE\0"
+/* 1785 */ "keyfile\0"
+/* 1793 */ "path to the log file\0"
+/* 1814 */ "LOGFILE\0"
+/* 1822 */ "logfile\0"
+/* 1830 */ "Do not listen to virtual interfaces\0"
+/* 1866 */ "NOVIRTUALIPS\0"
+/* 1879 */ "novirtualips\0"
+/* 1892 */ "Modify Multimedia Timer (Windows only)\0"
+/* 1931 */ "MODIFYMMTIMER\0"
+/* 1945 */ "modifymmtimer\0"
+/* 1959 */ "Do not fork\0"
+/* 1971 */ "NOFORK\0"
+/* 1978 */ "nofork\0"
+/* 1985 */ "Run at high priority\0"
+/* 2006 */ "NICE\0"
+/* 2011 */ "nice\0"
+/* 2016 */ "path to the PID file\0"
+/* 2037 */ "PIDFILE\0"
+/* 2045 */ "pidfile\0"
+/* 2053 */ "Process priority\0"
+/* 2070 */ "PRIORITY\0"
+/* 2079 */ "priority\0"
+/* 2088 */ "Set the time and quit\0"
+/* 2110 */ "QUIT\0"
+/* 2115 */ "quit\0"
+/* 2120 */ "Broadcast/propagation delay\0"
+/* 2148 */ "PROPAGATIONDELAY\0"
+/* 2165 */ "propagationdelay\0"
+/* 2182 */ "Save parsed configuration and quit\0"
+/* 2217 */ "SAVECONFIGQUIT\0"
+/* 2232 */ "saveconfigquit\0"
+/* 2247 */ "Statistics file location\0"
+/* 2272 */ "STATSDIR\0"
+/* 2281 */ "statsdir\0"
+/* 2290 */ "Trusted key number\0"
+/* 2309 */ "TRUSTEDKEY\0"
+/* 2320 */ "trustedkey\0"
+/* 2331 */ "Run as userid (or userid:groupid)\0"
+/* 2365 */ "USER\0"
+/* 2370 */ "user\0"
+/* 2375 */ "interval in seconds between scans for new or dropped interfaces\0"
+/* 2439 */ "UPDATEINTERVAL\0"
+/* 2454 */ "updateinterval\0"
+/* 2469 */ "make ARG an ntp variable (RW)\0"
+/* 2499 */ "VAR\0"
+/* 2503 */ "var\0"
+/* 2507 */ "make ARG an ntp variable (RW|DEF)\0"
+/* 2541 */ "DVAR\0"
+/* 2546 */ "dvar\0"
+/* 2551 */ "Seconds to wait for first clock sync\0"
+/* 2588 */ "WAIT_SYNC\0"
+/* 2598 */ "wait-sync\0"
+/* 2608 */ "Slew up to 600 seconds\0"
+/* 2631 */ "SLEW\0"
+/* 2636 */ "slew\0"
+/* 2641 */ "Use CPU cycle counter (Windows only)\0"
+/* 2678 */ "USEPCC\0"
+/* 2685 */ "usepcc\0"
+/* 2692 */ "Force CPU cycle counter use (Windows only)\0"
+/* 2735 */ "PCCFREQ\0"
+/* 2743 */ "pccfreq\0"
+/* 2751 */ "Register with mDNS as a NTP server\0"
+/* 2786 */ "MDNS\0"
+/* 2791 */ "mdns\0"
+/* 2796 */ "display extended usage information and exit\0"
+/* 2840 */ "help\0"
+/* 2845 */ "extended usage information passed thru pager\0"
+/* 2890 */ "more-help\0"
+/* 2900 */ "output version information and exit\0"
+/* 2936 */ "version\0"
+/* 2944 */ "NTPD\0"
+/* 2949 */ "ntpd - NTP daemon program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
-/* 3012 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 3046 */ "\n\0"
-/* 3048 */ "ntpd 4.2.8p1";
+/* 3080 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 3114 */ "\n\0"
+/* 3116 */ "ntpd 4.2.8p2";
/**
* ipv4 option description with
@@ -349,15 +352,27 @@ static int const aAuthnoreqCantList[] = {
#define PANICGATE_FLAGS (OPTST_DISABLED)
/**
+ * force_step_once option description:
+ */
+/** Descriptive text for the force_step_once option */
+#define FORCE_STEP_ONCE_DESC (ntpd_opt_strs+1517)
+/** Upper-cased name for the force_step_once option */
+#define FORCE_STEP_ONCE_NAME (ntpd_opt_strs+1553)
+/** Name string for the force_step_once option */
+#define FORCE_STEP_ONCE_name (ntpd_opt_strs+1569)
+/** Compiled in flag settings for the force_step_once option */
+#define FORCE_STEP_ONCE_FLAGS (OPTST_DISABLED)
+
+/**
* jaildir option description:
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the jaildir option */
-#define JAILDIR_DESC (ntpd_opt_strs+1517)
+#define JAILDIR_DESC (ntpd_opt_strs+1585)
/** Upper-cased name for the jaildir option */
-#define JAILDIR_NAME (ntpd_opt_strs+1532)
+#define JAILDIR_NAME (ntpd_opt_strs+1600)
/** Name string for the jaildir option */
-#define JAILDIR_name (ntpd_opt_strs+1540)
+#define JAILDIR_name (ntpd_opt_strs+1608)
/** Compiled in flag settings for the jaildir option */
#define JAILDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -366,19 +381,19 @@ static int const aAuthnoreqCantList[] = {
#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define JAILDIR_NAME NULL
/** Descriptive text for the jaildir option */
-#define JAILDIR_DESC (ntpd_opt_strs+1548)
-#define JAILDIR_name (ntpd_opt_strs+1540)
+#define JAILDIR_DESC (ntpd_opt_strs+1616)
+#define JAILDIR_name (ntpd_opt_strs+1608)
#endif /* HAVE_DROPROOT */
/**
* interface option description:
*/
/** Descriptive text for the interface option */
-#define INTERFACE_DESC (ntpd_opt_strs+1627)
+#define INTERFACE_DESC (ntpd_opt_strs+1695)
/** Upper-cased name for the interface option */
-#define INTERFACE_NAME (ntpd_opt_strs+1666)
+#define INTERFACE_NAME (ntpd_opt_strs+1734)
/** Name string for the interface option */
-#define INTERFACE_name (ntpd_opt_strs+1676)
+#define INTERFACE_name (ntpd_opt_strs+1744)
/** Compiled in flag settings for the interface option */
#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -387,11 +402,11 @@ static int const aAuthnoreqCantList[] = {
* keyfile option description:
*/
/** Descriptive text for the keyfile option */
-#define KEYFILE_DESC (ntpd_opt_strs+1686)
+#define KEYFILE_DESC (ntpd_opt_strs+1754)
/** Upper-cased name for the keyfile option */
-#define KEYFILE_NAME (ntpd_opt_strs+1709)
+#define KEYFILE_NAME (ntpd_opt_strs+1777)
/** Name string for the keyfile option */
-#define KEYFILE_name (ntpd_opt_strs+1717)
+#define KEYFILE_name (ntpd_opt_strs+1785)
/** Compiled in flag settings for the keyfile option */
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -400,11 +415,11 @@ static int const aAuthnoreqCantList[] = {
* logfile option description:
*/
/** Descriptive text for the logfile option */
-#define LOGFILE_DESC (ntpd_opt_strs+1725)
+#define LOGFILE_DESC (ntpd_opt_strs+1793)
/** Upper-cased name for the logfile option */
-#define LOGFILE_NAME (ntpd_opt_strs+1746)
+#define LOGFILE_NAME (ntpd_opt_strs+1814)
/** Name string for the logfile option */
-#define LOGFILE_name (ntpd_opt_strs+1754)
+#define LOGFILE_name (ntpd_opt_strs+1822)
/** Compiled in flag settings for the logfile option */
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -413,11 +428,11 @@ static int const aAuthnoreqCantList[] = {
* novirtualips option description:
*/
/** Descriptive text for the novirtualips option */
-#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1762)
+#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1830)
/** Upper-cased name for the novirtualips option */
-#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1798)
+#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1866)
/** Name string for the novirtualips option */
-#define NOVIRTUALIPS_name (ntpd_opt_strs+1811)
+#define NOVIRTUALIPS_name (ntpd_opt_strs+1879)
/** Compiled in flag settings for the novirtualips option */
#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
@@ -426,11 +441,11 @@ static int const aAuthnoreqCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the modifymmtimer option */
-#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1824)
+#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1892)
/** Upper-cased name for the modifymmtimer option */
-#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1863)
+#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1931)
/** Name string for the modifymmtimer option */
-#define MODIFYMMTIMER_name (ntpd_opt_strs+1877)
+#define MODIFYMMTIMER_name (ntpd_opt_strs+1945)
/** Compiled in flag settings for the modifymmtimer option */
#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
@@ -446,11 +461,11 @@ static int const aAuthnoreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the nofork option */
-#define NOFORK_DESC (ntpd_opt_strs+1891)
+#define NOFORK_DESC (ntpd_opt_strs+1959)
/** Upper-cased name for the nofork option */
-#define NOFORK_NAME (ntpd_opt_strs+1903)
+#define NOFORK_NAME (ntpd_opt_strs+1971)
/** Name string for the nofork option */
-#define NOFORK_name (ntpd_opt_strs+1910)
+#define NOFORK_name (ntpd_opt_strs+1978)
/** Other options that appear in conjunction with the nofork option */
static int const aNoforkCantList[] = {
INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
@@ -461,11 +476,11 @@ static int const aNoforkCantList[] = {
* nice option description:
*/
/** Descriptive text for the nice option */
-#define NICE_DESC (ntpd_opt_strs+1917)
+#define NICE_DESC (ntpd_opt_strs+1985)
/** Upper-cased name for the nice option */
-#define NICE_NAME (ntpd_opt_strs+1938)
+#define NICE_NAME (ntpd_opt_strs+2006)
/** Name string for the nice option */
-#define NICE_name (ntpd_opt_strs+1943)
+#define NICE_name (ntpd_opt_strs+2011)
/** Compiled in flag settings for the nice option */
#define NICE_FLAGS (OPTST_DISABLED)
@@ -473,11 +488,11 @@ static int const aNoforkCantList[] = {
* pidfile option description:
*/
/** Descriptive text for the pidfile option */
-#define PIDFILE_DESC (ntpd_opt_strs+1948)
+#define PIDFILE_DESC (ntpd_opt_strs+2016)
/** Upper-cased name for the pidfile option */
-#define PIDFILE_NAME (ntpd_opt_strs+1969)
+#define PIDFILE_NAME (ntpd_opt_strs+2037)
/** Name string for the pidfile option */
-#define PIDFILE_name (ntpd_opt_strs+1977)
+#define PIDFILE_name (ntpd_opt_strs+2045)
/** Compiled in flag settings for the pidfile option */
#define PIDFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -486,11 +501,11 @@ static int const aNoforkCantList[] = {
* priority option description:
*/
/** Descriptive text for the priority option */
-#define PRIORITY_DESC (ntpd_opt_strs+1985)
+#define PRIORITY_DESC (ntpd_opt_strs+2053)
/** Upper-cased name for the priority option */
-#define PRIORITY_NAME (ntpd_opt_strs+2002)
+#define PRIORITY_NAME (ntpd_opt_strs+2070)
/** Name string for the priority option */
-#define PRIORITY_name (ntpd_opt_strs+2011)
+#define PRIORITY_name (ntpd_opt_strs+2079)
/** Compiled in flag settings for the priority option */
#define PRIORITY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -500,11 +515,11 @@ static int const aNoforkCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the quit option */
-#define QUIT_DESC (ntpd_opt_strs+2020)
+#define QUIT_DESC (ntpd_opt_strs+2088)
/** Upper-cased name for the quit option */
-#define QUIT_NAME (ntpd_opt_strs+2042)
+#define QUIT_NAME (ntpd_opt_strs+2110)
/** Name string for the quit option */
-#define QUIT_name (ntpd_opt_strs+2047)
+#define QUIT_name (ntpd_opt_strs+2115)
/** Other options that appear in conjunction with the quit option */
static int const aQuitCantList[] = {
INDEX_OPT_SAVECONFIGQUIT,
@@ -516,11 +531,11 @@ static int const aQuitCantList[] = {
* propagationdelay option description:
*/
/** Descriptive text for the propagationdelay option */
-#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+2052)
+#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+2120)
/** Upper-cased name for the propagationdelay option */
-#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2080)
+#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2148)
/** Name string for the propagationdelay option */
-#define PROPAGATIONDELAY_name (ntpd_opt_strs+2097)
+#define PROPAGATIONDELAY_name (ntpd_opt_strs+2165)
/** Compiled in flag settings for the propagationdelay option */
#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -531,11 +546,11 @@ static int const aQuitCantList[] = {
*/
#ifdef SAVECONFIG
/** Descriptive text for the saveconfigquit option */
-#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2114)
+#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2182)
/** Upper-cased name for the saveconfigquit option */
-#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2149)
+#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2217)
/** Name string for the saveconfigquit option */
-#define SAVECONFIGQUIT_name (ntpd_opt_strs+2164)
+#define SAVECONFIGQUIT_name (ntpd_opt_strs+2232)
/** Other options that appear in conjunction with the saveconfigquit option */
static int const aSaveconfigquitCantList[] = {
INDEX_OPT_QUIT,
@@ -556,11 +571,11 @@ static int const aSaveconfigquitCantList[] = {
* statsdir option description:
*/
/** Descriptive text for the statsdir option */
-#define STATSDIR_DESC (ntpd_opt_strs+2179)
+#define STATSDIR_DESC (ntpd_opt_strs+2247)
/** Upper-cased name for the statsdir option */
-#define STATSDIR_NAME (ntpd_opt_strs+2204)
+#define STATSDIR_NAME (ntpd_opt_strs+2272)
/** Name string for the statsdir option */
-#define STATSDIR_name (ntpd_opt_strs+2213)
+#define STATSDIR_name (ntpd_opt_strs+2281)
/** Compiled in flag settings for the statsdir option */
#define STATSDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -569,11 +584,11 @@ static int const aSaveconfigquitCantList[] = {
* trustedkey option description:
*/
/** Descriptive text for the trustedkey option */
-#define TRUSTEDKEY_DESC (ntpd_opt_strs+2222)
+#define TRUSTEDKEY_DESC (ntpd_opt_strs+2290)
/** Upper-cased name for the trustedkey option */
-#define TRUSTEDKEY_NAME (ntpd_opt_strs+2241)
+#define TRUSTEDKEY_NAME (ntpd_opt_strs+2309)
/** Name string for the trustedkey option */
-#define TRUSTEDKEY_name (ntpd_opt_strs+2252)
+#define TRUSTEDKEY_name (ntpd_opt_strs+2320)
/** Compiled in flag settings for the trustedkey option */
#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -583,11 +598,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the user option */
-#define USER_DESC (ntpd_opt_strs+2263)
+#define USER_DESC (ntpd_opt_strs+2331)
/** Upper-cased name for the user option */
-#define USER_NAME (ntpd_opt_strs+2297)
+#define USER_NAME (ntpd_opt_strs+2365)
/** Name string for the user option */
-#define USER_name (ntpd_opt_strs+2302)
+#define USER_name (ntpd_opt_strs+2370)
/** Compiled in flag settings for the user option */
#define USER_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -596,19 +611,19 @@ static int const aSaveconfigquitCantList[] = {
#define USER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define USER_NAME NULL
/** Descriptive text for the user option */
-#define USER_DESC (ntpd_opt_strs+1548)
-#define USER_name (ntpd_opt_strs+2302)
+#define USER_DESC (ntpd_opt_strs+1616)
+#define USER_name (ntpd_opt_strs+2370)
#endif /* HAVE_DROPROOT */
/**
* updateinterval option description:
*/
/** Descriptive text for the updateinterval option */
-#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2307)
+#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2375)
/** Upper-cased name for the updateinterval option */
-#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2371)
+#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2439)
/** Name string for the updateinterval option */
-#define UPDATEINTERVAL_name (ntpd_opt_strs+2386)
+#define UPDATEINTERVAL_name (ntpd_opt_strs+2454)
/** Compiled in flag settings for the updateinterval option */
#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -617,11 +632,11 @@ static int const aSaveconfigquitCantList[] = {
* var option description:
*/
/** Descriptive text for the var option */
-#define VAR_DESC (ntpd_opt_strs+2401)
+#define VAR_DESC (ntpd_opt_strs+2469)
/** Upper-cased name for the var option */
-#define VAR_NAME (ntpd_opt_strs+2431)
+#define VAR_NAME (ntpd_opt_strs+2499)
/** Name string for the var option */
-#define VAR_name (ntpd_opt_strs+2435)
+#define VAR_name (ntpd_opt_strs+2503)
/** Compiled in flag settings for the var option */
#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -630,11 +645,11 @@ static int const aSaveconfigquitCantList[] = {
* dvar option description:
*/
/** Descriptive text for the dvar option */
-#define DVAR_DESC (ntpd_opt_strs+2439)
+#define DVAR_DESC (ntpd_opt_strs+2507)
/** Upper-cased name for the dvar option */
-#define DVAR_NAME (ntpd_opt_strs+2473)
+#define DVAR_NAME (ntpd_opt_strs+2541)
/** Name string for the dvar option */
-#define DVAR_name (ntpd_opt_strs+2478)
+#define DVAR_name (ntpd_opt_strs+2546)
/** Compiled in flag settings for the dvar option */
#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -645,11 +660,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_WORKING_FORK
/** Descriptive text for the wait-sync option */
-#define WAIT_SYNC_DESC (ntpd_opt_strs+2483)
+#define WAIT_SYNC_DESC (ntpd_opt_strs+2551)
/** Upper-cased name for the wait-sync option */
-#define WAIT_SYNC_NAME (ntpd_opt_strs+2520)
+#define WAIT_SYNC_NAME (ntpd_opt_strs+2588)
/** Name string for the wait-sync option */
-#define WAIT_SYNC_name (ntpd_opt_strs+2530)
+#define WAIT_SYNC_name (ntpd_opt_strs+2598)
/** Other options that appear in conjunction with the wait-sync option */
static int const aWait_SyncCantList[] = {
INDEX_OPT_NOFORK,
@@ -671,11 +686,11 @@ static int const aWait_SyncCantList[] = {
* slew option description:
*/
/** Descriptive text for the slew option */
-#define SLEW_DESC (ntpd_opt_strs+2540)
+#define SLEW_DESC (ntpd_opt_strs+2608)
/** Upper-cased name for the slew option */
-#define SLEW_NAME (ntpd_opt_strs+2563)
+#define SLEW_NAME (ntpd_opt_strs+2631)
/** Name string for the slew option */
-#define SLEW_name (ntpd_opt_strs+2568)
+#define SLEW_name (ntpd_opt_strs+2636)
/** Compiled in flag settings for the slew option */
#define SLEW_FLAGS (OPTST_DISABLED)
@@ -684,11 +699,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the usepcc option */
-#define USEPCC_DESC (ntpd_opt_strs+2573)
+#define USEPCC_DESC (ntpd_opt_strs+2641)
/** Upper-cased name for the usepcc option */
-#define USEPCC_NAME (ntpd_opt_strs+2610)
+#define USEPCC_NAME (ntpd_opt_strs+2678)
/** Name string for the usepcc option */
-#define USEPCC_name (ntpd_opt_strs+2617)
+#define USEPCC_name (ntpd_opt_strs+2685)
/** Compiled in flag settings for the usepcc option */
#define USEPCC_FLAGS (OPTST_DISABLED)
@@ -704,11 +719,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the pccfreq option */
-#define PCCFREQ_DESC (ntpd_opt_strs+2624)
+#define PCCFREQ_DESC (ntpd_opt_strs+2692)
/** Upper-cased name for the pccfreq option */
-#define PCCFREQ_NAME (ntpd_opt_strs+2667)
+#define PCCFREQ_NAME (ntpd_opt_strs+2735)
/** Name string for the pccfreq option */
-#define PCCFREQ_name (ntpd_opt_strs+2675)
+#define PCCFREQ_name (ntpd_opt_strs+2743)
/** Compiled in flag settings for the pccfreq option */
#define PCCFREQ_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -725,11 +740,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef HAVE_DNSREGISTRATION
/** Descriptive text for the mdns option */
-#define MDNS_DESC (ntpd_opt_strs+2683)
+#define MDNS_DESC (ntpd_opt_strs+2751)
/** Upper-cased name for the mdns option */
-#define MDNS_NAME (ntpd_opt_strs+2718)
+#define MDNS_NAME (ntpd_opt_strs+2786)
/** Name string for the mdns option */
-#define MDNS_name (ntpd_opt_strs+2723)
+#define MDNS_name (ntpd_opt_strs+2791)
/** Compiled in flag settings for the mdns option */
#define MDNS_FLAGS (OPTST_DISABLED)
@@ -743,11 +758,11 @@ static int const aWait_SyncCantList[] = {
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpd_opt_strs+2728)
-#define HELP_name (ntpd_opt_strs+2772)
+#define HELP_DESC (ntpd_opt_strs+2796)
+#define HELP_name (ntpd_opt_strs+2840)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpd_opt_strs+2777)
-#define MORE_HELP_name (ntpd_opt_strs+2822)
+#define MORE_HELP_DESC (ntpd_opt_strs+2845)
+#define MORE_HELP_name (ntpd_opt_strs+2890)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -760,8 +775,8 @@ static int const aWait_SyncCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpd_opt_strs+2832)
-#define VER_name (ntpd_opt_strs+2868)
+#define VER_DESC (ntpd_opt_strs+2900)
+#define VER_name (ntpd_opt_strs+2936)
/**
* Declare option callback procedures
*/
@@ -901,8 +916,20 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PANICGATE_DESC, PANICGATE_NAME, PANICGATE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 10, VALUE_OPT_JAILDIR,
- /* equiv idx, value */ 10, VALUE_OPT_JAILDIR,
+ { /* entry idx, value */ 10, VALUE_OPT_FORCE_STEP_ONCE,
+ /* equiv idx, value */ 10, VALUE_OPT_FORCE_STEP_ONCE,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ FORCE_STEP_ONCE_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --force_step_once */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ FORCE_STEP_ONCE_DESC, FORCE_STEP_ONCE_NAME, FORCE_STEP_ONCE_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 11, VALUE_OPT_JAILDIR,
+ /* equiv idx, value */ 11, VALUE_OPT_JAILDIR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ JAILDIR_FLAGS, 0,
@@ -913,8 +940,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ JAILDIR_DESC, JAILDIR_NAME, JAILDIR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 11, VALUE_OPT_INTERFACE,
- /* equiv idx, value */ 11, VALUE_OPT_INTERFACE,
+ { /* entry idx, value */ 12, VALUE_OPT_INTERFACE,
+ /* equiv idx, value */ 12, VALUE_OPT_INTERFACE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ INTERFACE_FLAGS, 0,
@@ -925,8 +952,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ INTERFACE_DESC, INTERFACE_NAME, INTERFACE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 12, VALUE_OPT_KEYFILE,
- /* equiv idx, value */ 12, VALUE_OPT_KEYFILE,
+ { /* entry idx, value */ 13, VALUE_OPT_KEYFILE,
+ /* equiv idx, value */ 13, VALUE_OPT_KEYFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KEYFILE_FLAGS, 0,
@@ -937,8 +964,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 13, VALUE_OPT_LOGFILE,
- /* equiv idx, value */ 13, VALUE_OPT_LOGFILE,
+ { /* entry idx, value */ 14, VALUE_OPT_LOGFILE,
+ /* equiv idx, value */ 14, VALUE_OPT_LOGFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ LOGFILE_FLAGS, 0,
@@ -949,8 +976,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
- /* equiv idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
+ { /* entry idx, value */ 15, VALUE_OPT_NOVIRTUALIPS,
+ /* equiv idx, value */ 15, VALUE_OPT_NOVIRTUALIPS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOVIRTUALIPS_FLAGS, 0,
@@ -961,8 +988,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NOVIRTUALIPS_DESC, NOVIRTUALIPS_NAME, NOVIRTUALIPS_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
- /* equiv idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
+ { /* entry idx, value */ 16, VALUE_OPT_MODIFYMMTIMER,
+ /* equiv idx, value */ 16, VALUE_OPT_MODIFYMMTIMER,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MODIFYMMTIMER_FLAGS, 0,
@@ -973,8 +1000,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ MODIFYMMTIMER_DESC, MODIFYMMTIMER_NAME, MODIFYMMTIMER_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 16, VALUE_OPT_NOFORK,
- /* equiv idx, value */ 16, VALUE_OPT_NOFORK,
+ { /* entry idx, value */ 17, VALUE_OPT_NOFORK,
+ /* equiv idx, value */ 17, VALUE_OPT_NOFORK,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOFORK_FLAGS, 0,
@@ -985,8 +1012,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 17, VALUE_OPT_NICE,
- /* equiv idx, value */ 17, VALUE_OPT_NICE,
+ { /* entry idx, value */ 18, VALUE_OPT_NICE,
+ /* equiv idx, value */ 18, VALUE_OPT_NICE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NICE_FLAGS, 0,
@@ -997,8 +1024,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NICE_DESC, NICE_NAME, NICE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 18, VALUE_OPT_PIDFILE,
- /* equiv idx, value */ 18, VALUE_OPT_PIDFILE,
+ { /* entry idx, value */ 19, VALUE_OPT_PIDFILE,
+ /* equiv idx, value */ 19, VALUE_OPT_PIDFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PIDFILE_FLAGS, 0,
@@ -1009,8 +1036,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PIDFILE_DESC, PIDFILE_NAME, PIDFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 19, VALUE_OPT_PRIORITY,
- /* equiv idx, value */ 19, VALUE_OPT_PRIORITY,
+ { /* entry idx, value */ 20, VALUE_OPT_PRIORITY,
+ /* equiv idx, value */ 20, VALUE_OPT_PRIORITY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PRIORITY_FLAGS, 0,
@@ -1021,8 +1048,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 20, VALUE_OPT_QUIT,
- /* equiv idx, value */ 20, VALUE_OPT_QUIT,
+ { /* entry idx, value */ 21, VALUE_OPT_QUIT,
+ /* equiv idx, value */ 21, VALUE_OPT_QUIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ QUIT_FLAGS, 0,
@@ -1033,8 +1060,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ QUIT_DESC, QUIT_NAME, QUIT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
- /* equiv idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
+ { /* entry idx, value */ 22, VALUE_OPT_PROPAGATIONDELAY,
+ /* equiv idx, value */ 22, VALUE_OPT_PROPAGATIONDELAY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PROPAGATIONDELAY_FLAGS, 0,
@@ -1045,8 +1072,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PROPAGATIONDELAY_DESC, PROPAGATIONDELAY_NAME, PROPAGATIONDELAY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
- /* equiv idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
+ { /* entry idx, value */ 23, VALUE_OPT_SAVECONFIGQUIT,
+ /* equiv idx, value */ 23, VALUE_OPT_SAVECONFIGQUIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SAVECONFIGQUIT_FLAGS, 0,
@@ -1057,8 +1084,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ SAVECONFIGQUIT_DESC, SAVECONFIGQUIT_NAME, SAVECONFIGQUIT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 23, VALUE_OPT_STATSDIR,
- /* equiv idx, value */ 23, VALUE_OPT_STATSDIR,
+ { /* entry idx, value */ 24, VALUE_OPT_STATSDIR,
+ /* equiv idx, value */ 24, VALUE_OPT_STATSDIR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ STATSDIR_FLAGS, 0,
@@ -1069,8 +1096,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ STATSDIR_DESC, STATSDIR_NAME, STATSDIR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
- /* equiv idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
+ { /* entry idx, value */ 25, VALUE_OPT_TRUSTEDKEY,
+ /* equiv idx, value */ 25, VALUE_OPT_TRUSTEDKEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ TRUSTEDKEY_FLAGS, 0,
@@ -1081,8 +1108,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ TRUSTEDKEY_DESC, TRUSTEDKEY_NAME, TRUSTEDKEY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 25, VALUE_OPT_USER,
- /* equiv idx, value */ 25, VALUE_OPT_USER,
+ { /* entry idx, value */ 26, VALUE_OPT_USER,
+ /* equiv idx, value */ 26, VALUE_OPT_USER,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USER_FLAGS, 0,
@@ -1093,8 +1120,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ USER_DESC, USER_NAME, USER_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
- /* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
+ { /* entry idx, value */ 27, VALUE_OPT_UPDATEINTERVAL,
+ /* equiv idx, value */ 27, VALUE_OPT_UPDATEINTERVAL,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ UPDATEINTERVAL_FLAGS, 0,
@@ -1105,8 +1132,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ UPDATEINTERVAL_DESC, UPDATEINTERVAL_NAME, UPDATEINTERVAL_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 27, VALUE_OPT_VAR,
- /* equiv idx, value */ 27, VALUE_OPT_VAR,
+ { /* entry idx, value */ 28, VALUE_OPT_VAR,
+ /* equiv idx, value */ 28, VALUE_OPT_VAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ VAR_FLAGS, 0,
@@ -1117,8 +1144,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ VAR_DESC, VAR_NAME, VAR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 28, VALUE_OPT_DVAR,
- /* equiv idx, value */ 28, VALUE_OPT_DVAR,
+ { /* entry idx, value */ 29, VALUE_OPT_DVAR,
+ /* equiv idx, value */ 29, VALUE_OPT_DVAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ DVAR_FLAGS, 0,
@@ -1129,8 +1156,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ DVAR_DESC, DVAR_NAME, DVAR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 29, VALUE_OPT_WAIT_SYNC,
- /* equiv idx, value */ 29, VALUE_OPT_WAIT_SYNC,
+ { /* entry idx, value */ 30, VALUE_OPT_WAIT_SYNC,
+ /* equiv idx, value */ 30, VALUE_OPT_WAIT_SYNC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ WAIT_SYNC_FLAGS, 0,
@@ -1141,8 +1168,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ WAIT_SYNC_DESC, WAIT_SYNC_NAME, WAIT_SYNC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 30, VALUE_OPT_SLEW,
- /* equiv idx, value */ 30, VALUE_OPT_SLEW,
+ { /* entry idx, value */ 31, VALUE_OPT_SLEW,
+ /* equiv idx, value */ 31, VALUE_OPT_SLEW,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SLEW_FLAGS, 0,
@@ -1153,8 +1180,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 31, VALUE_OPT_USEPCC,
- /* equiv idx, value */ 31, VALUE_OPT_USEPCC,
+ { /* entry idx, value */ 32, VALUE_OPT_USEPCC,
+ /* equiv idx, value */ 32, VALUE_OPT_USEPCC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USEPCC_FLAGS, 0,
@@ -1165,8 +1192,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ USEPCC_DESC, USEPCC_NAME, USEPCC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 32, VALUE_OPT_PCCFREQ,
- /* equiv idx, value */ 32, VALUE_OPT_PCCFREQ,
+ { /* entry idx, value */ 33, VALUE_OPT_PCCFREQ,
+ /* equiv idx, value */ 33, VALUE_OPT_PCCFREQ,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PCCFREQ_FLAGS, 0,
@@ -1177,8 +1204,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PCCFREQ_DESC, PCCFREQ_NAME, PCCFREQ_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 33, VALUE_OPT_MDNS,
- /* equiv idx, value */ 33, VALUE_OPT_MDNS,
+ { /* entry idx, value */ 34, VALUE_OPT_MDNS,
+ /* equiv idx, value */ 34, VALUE_OPT_MDNS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MDNS_FLAGS, 0,
@@ -1231,21 +1258,21 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpd. */
-#define zPROGNAME (ntpd_opt_strs+2876)
+#define zPROGNAME (ntpd_opt_strs+2944)
/** Reference to the title line for ntpd usage. */
-#define zUsageTitle (ntpd_opt_strs+2881)
+#define zUsageTitle (ntpd_opt_strs+2949)
/** There is no ntpd configuration file. */
#define zRcName NULL
/** There are no directories to search for ntpd config files. */
#define apzHomeList NULL
/** The ntpd program bug email address. */
-#define zBugsAddr (ntpd_opt_strs+3012)
+#define zBugsAddr (ntpd_opt_strs+3080)
/** Clarification/explanation of what ntpd does. */
-#define zExplain (ntpd_opt_strs+3046)
+#define zExplain (ntpd_opt_strs+3114)
/** Extra detail explaining what ntpd does. */
#define zDetail (NULL)
/** The full version string for ntpd. */
-#define zFullVersion (ntpd_opt_strs+3048)
+#define zFullVersion (ntpd_opt_strs+3116)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -1367,7 +1394,7 @@ tOptions ntpdOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 37 /* full option count */, 34 /* user option count */,
+ 38 /* full option count */, 35 /* user option count */,
ntpd_full_usage, ntpd_short_usage,
NULL, NULL,
PKGDATADIR, ntpd_packager_info
@@ -1502,7 +1529,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.8p1\n\
+ puts(_("ntpd 4.2.8p2\n\
Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
@@ -1553,6 +1580,9 @@ implied warranty.\n"));
puts(_("Allow the first adjustment to be Big"));
/* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Step any initial offset correction."));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
puts(_("Jail directory"));
/* referenced via ntpdOptions.pOptDesc->pzText */
@@ -1640,7 +1670,7 @@ implied warranty.\n"));
puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */
- puts(_("ntpd - NTP daemon program - Ver. 4.2.8p1\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@@ -1648,7 +1678,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
- puts(_("ntpd 4.2.8p1"));
+ puts(_("ntpd 4.2.8p2"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpd/ntpd-opts.h b/ntpd/ntpd-opts.h
index f4eb47b8e355..682aebda41af 100644
--- a/ntpd/ntpd-opts.h
+++ b/ntpd/ntpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed February 4, 2015 at 02:39:16 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:23:13 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -74,40 +74,41 @@ typedef enum {
INDEX_OPT_SET_DEBUG_LEVEL = 7,
INDEX_OPT_DRIFTFILE = 8,
INDEX_OPT_PANICGATE = 9,
- INDEX_OPT_JAILDIR = 10,
- INDEX_OPT_INTERFACE = 11,
- INDEX_OPT_KEYFILE = 12,
- INDEX_OPT_LOGFILE = 13,
- INDEX_OPT_NOVIRTUALIPS = 14,
- INDEX_OPT_MODIFYMMTIMER = 15,
- INDEX_OPT_NOFORK = 16,
- INDEX_OPT_NICE = 17,
- INDEX_OPT_PIDFILE = 18,
- INDEX_OPT_PRIORITY = 19,
- INDEX_OPT_QUIT = 20,
- INDEX_OPT_PROPAGATIONDELAY = 21,
- INDEX_OPT_SAVECONFIGQUIT = 22,
- INDEX_OPT_STATSDIR = 23,
- INDEX_OPT_TRUSTEDKEY = 24,
- INDEX_OPT_USER = 25,
- INDEX_OPT_UPDATEINTERVAL = 26,
- INDEX_OPT_VAR = 27,
- INDEX_OPT_DVAR = 28,
- INDEX_OPT_WAIT_SYNC = 29,
- INDEX_OPT_SLEW = 30,
- INDEX_OPT_USEPCC = 31,
- INDEX_OPT_PCCFREQ = 32,
- INDEX_OPT_MDNS = 33,
- INDEX_OPT_VERSION = 34,
- INDEX_OPT_HELP = 35,
- INDEX_OPT_MORE_HELP = 36
+ INDEX_OPT_FORCE_STEP_ONCE = 10,
+ INDEX_OPT_JAILDIR = 11,
+ INDEX_OPT_INTERFACE = 12,
+ INDEX_OPT_KEYFILE = 13,
+ INDEX_OPT_LOGFILE = 14,
+ INDEX_OPT_NOVIRTUALIPS = 15,
+ INDEX_OPT_MODIFYMMTIMER = 16,
+ INDEX_OPT_NOFORK = 17,
+ INDEX_OPT_NICE = 18,
+ INDEX_OPT_PIDFILE = 19,
+ INDEX_OPT_PRIORITY = 20,
+ INDEX_OPT_QUIT = 21,
+ INDEX_OPT_PROPAGATIONDELAY = 22,
+ INDEX_OPT_SAVECONFIGQUIT = 23,
+ INDEX_OPT_STATSDIR = 24,
+ INDEX_OPT_TRUSTEDKEY = 25,
+ INDEX_OPT_USER = 26,
+ INDEX_OPT_UPDATEINTERVAL = 27,
+ INDEX_OPT_VAR = 28,
+ INDEX_OPT_DVAR = 29,
+ INDEX_OPT_WAIT_SYNC = 30,
+ INDEX_OPT_SLEW = 31,
+ INDEX_OPT_USEPCC = 32,
+ INDEX_OPT_PCCFREQ = 33,
+ INDEX_OPT_MDNS = 34,
+ INDEX_OPT_VERSION = 35,
+ INDEX_OPT_HELP = 36,
+ INDEX_OPT_MORE_HELP = 37
} teOptIndex;
/** count of all options for ntpd */
-#define OPTION_CT 37
+#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.2.8p1"
+#define NTPD_VERSION "4.2.8p2"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.8p1"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@@ -199,6 +200,10 @@ typedef enum {
# warning undefining PANICGATE due to option name conflict
# undef PANICGATE
# endif
+# ifdef FORCE_STEP_ONCE
+# warning undefining FORCE_STEP_ONCE due to option name conflict
+# undef FORCE_STEP_ONCE
+# endif
# ifdef JAILDIR
# warning undefining JAILDIR due to option name conflict
# undef JAILDIR
@@ -306,6 +311,7 @@ typedef enum {
# undef SET_DEBUG_LEVEL
# undef DRIFTFILE
# undef PANICGATE
+# undef FORCE_STEP_ONCE
# undef JAILDIR
# undef INTERFACE
# undef KEYFILE
@@ -348,6 +354,7 @@ typedef enum {
#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
#define VALUE_OPT_DRIFTFILE 'f'
#define VALUE_OPT_PANICGATE 'g'
+#define VALUE_OPT_FORCE_STEP_ONCE 'G'
#define VALUE_OPT_JAILDIR 'i'
#define VALUE_OPT_INTERFACE 'I'
#define VALUE_OPT_KEYFILE 'k'
diff --git a/ntpd/ntpd.1ntpdman b/ntpd/ntpd.1ntpdman
index 4b37913615d5..5ded89b0cac0 100644
--- a/ntpd/ntpd.1ntpdman
+++ b/ntpd/ntpd.1ntpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd 1ntpdman "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH ntpd 1ntpdman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-YYaqWo/ag-.YaiVo)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-TQays3/ag-5Qaqr3)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:41:54 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:45 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -175,7 +175,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.TP
@@ -196,6 +196,20 @@ See the
\fBtinker\fP
configuration file directive for other options.
.TP
+.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-force\-step\-once\f[]
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
+.TP
.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
Jail directory.
.sp
@@ -220,7 +234,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
path to symmetric keys.
diff --git a/ntpd/ntpd.1ntpdmdoc b/ntpd/ntpd.1ntpdmdoc
index 96d77e9fb0db..14b38e40a861 100644
--- a/ntpd/ntpd.1ntpdmdoc
+++ b/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:12 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:02 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -144,7 +144,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.It Fl g , Fl \-panicgate
@@ -163,6 +163,19 @@ options.
See the
\fBtinker\fP
configuration file directive for other options.
+.It Fl G , Fl \-force\-step\-once
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
Jail directory.
.sp
@@ -186,7 +199,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
path to symmetric keys.
.sp
diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c
index c017ef34d7db..529e6ce1b0cc 100644
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -1262,6 +1262,7 @@ finish(
if (mdns != NULL)
DNSServiceRefDeallocate(mdns);
# endif
+ peer_cleanup();
exit(0);
}
#endif /* !SIM && SIGDIE1 */
diff --git a/ntpd/ntpd.html b/ntpd/ntpd.html
index fe00030dde2b..8919ee90d241 100644
--- a/ntpd/ntpd.html
+++ b/ntpd/ntpd.html
@@ -39,7 +39,7 @@ The program can operate in any of several modes, including client/server,
symmetric and broadcast modes, and with both symmetric-key and public-key
cryptography.
- <p>This document applies to version 4.2.8p1 of <code>ntpd</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description
@@ -169,7 +169,8 @@ This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
<li><a accesskey="6" href="#ntpd-configfile">ntpd configfile</a>: configfile option (-c)
<li><a accesskey="7" href="#ntpd-driftfile">ntpd driftfile</a>: driftfile option (-f)
<li><a accesskey="8" href="#ntpd-panicgate">ntpd panicgate</a>: panicgate option (-g)
-<li><a accesskey="9" href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
+<li><a accesskey="9" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>: force-step-once option (-G)
+<li><a href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
<li><a href="#ntpd-interface">ntpd interface</a>: interface option (-I)
<li><a href="#ntpd-keyfile">ntpd keyfile</a>: keyfile option (-k)
<li><a href="#ntpd-logfile">ntpd logfile</a>: logfile option (-l)
@@ -219,7 +220,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p1-RC2
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p2-RC3
Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ &lt;server1&gt; ... &lt;serverN&gt; ]
Flg Arg Option-Name Description
@@ -240,6 +241,7 @@ Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ].
-f Str driftfile frequency drift file name
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
+ -G no force-step-once Step any initial offset correction.
-i Str jaildir Jail directory
-I Str interface Listen on an interface name or address
- may appear multiple times
@@ -413,7 +415,7 @@ configuration specification in the
file.
<div class="node">
<p><hr>
-<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
+<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-driftfile">ntpd driftfile</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<br>
@@ -443,15 +445,37 @@ See the
configuration file directive for other options.
<div class="node">
<p><hr>
-<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
+<a name="ntpd-force_002dstep_002donce"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-panicgate">ntpd panicgate</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<br>
</div>
+<h4 class="subsection">force-step-once option (-G)</h4>
+
+<p><a name="index-ntpd_002dforce_002dstep_002donce-11"></a>
+This is the &ldquo;step any initial offset correction.&rdquo; option.
+Normally,
+<code>ntpd</code>
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the <code>tinker</code> configuration file directive for other options.
+<div class="node">
+<p><hr>
+<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
<h4 class="subsection">jaildir option (-i)</h4>
-<p><a name="index-ntpd_002djaildir-11"></a>
+<p><a name="index-ntpd_002djaildir-12"></a>
This is the &ldquo;jail directory&rdquo; option.
This option takes a string argument.
@@ -482,7 +506,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">interface option (-I)</h4>
-<p><a name="index-ntpd_002dinterface-12"></a>
+<p><a name="index-ntpd_002dinterface-13"></a>
This is the &ldquo;listen on an interface name or address&rdquo; option.
This option takes a string argument <span class="file">iface</span>.
@@ -506,7 +530,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">keyfile option (-k)</h4>
-<p><a name="index-ntpd_002dkeyfile-13"></a>
+<p><a name="index-ntpd_002dkeyfile-14"></a>
This is the &ldquo;path to symmetric keys&rdquo; option.
This option takes a string argument.
Specify the name and path of the symmetric key file.
@@ -525,7 +549,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">logfile option (-l)</h4>
-<p><a name="index-ntpd_002dlogfile-14"></a>
+<p><a name="index-ntpd_002dlogfile-15"></a>
This is the &ldquo;path to the log file&rdquo; option.
This option takes a string argument.
Specify the name and path of the log file.
@@ -543,7 +567,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">novirtualips option (-L)</h4>
-<p><a name="index-ntpd_002dnovirtualips-15"></a>
+<p><a name="index-ntpd_002dnovirtualips-16"></a>
This is the &ldquo;do not listen to virtual interfaces&rdquo; option.
Do not listen to virtual interfaces, defined as those with
names containing a colon. This option is deprecated. Please
@@ -559,7 +583,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">modifymmtimer option (-M)</h4>
-<p><a name="index-ntpd_002dmodifymmtimer-16"></a>
+<p><a name="index-ntpd_002dmodifymmtimer-17"></a>
This is the &ldquo;modify multimedia timer (windows only)&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@@ -580,7 +604,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">nice option (-N)</h4>
-<p><a name="index-ntpd_002dnice-17"></a>
+<p><a name="index-ntpd_002dnice-18"></a>
This is the &ldquo;run at high priority&rdquo; option.
To the extent permitted by the operating system, run
<code>ntpd</code>
@@ -595,7 +619,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">pidfile option (-p)</h4>
-<p><a name="index-ntpd_002dpidfile-18"></a>
+<p><a name="index-ntpd_002dpidfile-19"></a>
This is the &ldquo;path to the pid file&rdquo; option.
This option takes a string argument.
Specify the name and path of the file used to record
@@ -614,7 +638,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">priority option (-P)</h4>
-<p><a name="index-ntpd_002dpriority-19"></a>
+<p><a name="index-ntpd_002dpriority-20"></a>
This is the &ldquo;process priority&rdquo; option.
This option takes a number argument.
To the extent permitted by the operating system, run
@@ -632,7 +656,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">quit option (-q)</h4>
-<p><a name="index-ntpd_002dquit-20"></a>
+<p><a name="index-ntpd_002dquit-21"></a>
This is the &ldquo;set the time and quit&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@@ -662,7 +686,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">propagationdelay option (-r)</h4>
-<p><a name="index-ntpd_002dpropagationdelay-21"></a>
+<p><a name="index-ntpd_002dpropagationdelay-22"></a>
This is the &ldquo;broadcast/propagation delay&rdquo; option.
This option takes a string argument.
Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
@@ -676,7 +700,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">saveconfigquit option</h4>
-<p><a name="index-ntpd_002dsaveconfigquit-22"></a>
+<p><a name="index-ntpd_002dsaveconfigquit-23"></a>
This is the &ldquo;save parsed configuration and quit&rdquo; option.
This option takes a string argument.
@@ -700,7 +724,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">statsdir option (-s)</h4>
-<p><a name="index-ntpd_002dstatsdir-23"></a>
+<p><a name="index-ntpd_002dstatsdir-24"></a>
This is the &ldquo;statistics file location&rdquo; option.
This option takes a string argument.
Specify the directory path for files created by the statistics facility.
@@ -717,7 +741,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">trustedkey option (-t)</h4>
-<p><a name="index-ntpd_002dtrustedkey-24"></a>
+<p><a name="index-ntpd_002dtrustedkey-25"></a>
This is the &ldquo;trusted key number&rdquo; option.
This option takes a string argument <span class="file">tkey</span>.
@@ -737,7 +761,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">user option (-u)</h4>
-<p><a name="index-ntpd_002duser-25"></a>
+<p><a name="index-ntpd_002duser-26"></a>
This is the &ldquo;run as userid (or userid:groupid)&rdquo; option.
This option takes a string argument.
@@ -762,7 +786,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">updateinterval option (-U)</h4>
-<p><a name="index-ntpd_002dupdateinterval-26"></a>
+<p><a name="index-ntpd_002dupdateinterval-27"></a>
This is the &ldquo;interval in seconds between scans for new or dropped interfaces&rdquo; option.
This option takes a number argument.
Give the time in seconds between two scans for new or dropped interfaces.
@@ -779,7 +803,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">wait-sync option (-w)</h4>
-<p><a name="index-ntpd_002dwait_002dsync-27"></a>
+<p><a name="index-ntpd_002dwait_002dsync-28"></a>
This is the &ldquo;seconds to wait for first clock sync&rdquo; option.
This option takes a number argument.
@@ -808,7 +832,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">slew option (-x)</h4>
-<p><a name="index-ntpd_002dslew-28"></a>
+<p><a name="index-ntpd_002dslew-29"></a>
This is the &ldquo;slew up to 600 seconds&rdquo; option.
Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
@@ -833,7 +857,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">usepcc option</h4>
-<p><a name="index-ntpd_002dusepcc-29"></a>
+<p><a name="index-ntpd_002dusepcc-30"></a>
This is the &ldquo;use cpu cycle counter (windows only)&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@@ -855,7 +879,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">pccfreq option</h4>
-<p><a name="index-ntpd_002dpccfreq-30"></a>
+<p><a name="index-ntpd_002dpccfreq-31"></a>
This is the &ldquo;force cpu cycle counter use (windows only)&rdquo; option.
This option takes a string argument.
@@ -877,7 +901,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">mdns option (-m)</h4>
-<p><a name="index-ntpd_002dmdns-31"></a>
+<p><a name="index-ntpd_002dmdns-32"></a>
This is the &ldquo;register with mdns as a ntp server&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
diff --git a/ntpd/ntpd.man.in b/ntpd/ntpd.man.in
index a5403086ae83..d9497a3ec46c 100644
--- a/ntpd/ntpd.man.in
+++ b/ntpd/ntpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd @NTPD_MS@ "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH ntpd @NTPD_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-YYaqWo/ag-.YaiVo)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-TQays3/ag-5Qaqr3)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:41:54 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:45 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -175,7 +175,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.TP
@@ -196,6 +196,20 @@ See the
\fBtinker\fP
configuration file directive for other options.
.TP
+.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-force\-step\-once\f[]
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
+.TP
.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
Jail directory.
.sp
@@ -220,7 +234,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
path to symmetric keys.
diff --git a/ntpd/ntpd.mdoc.in b/ntpd/ntpd.mdoc.in
index 3017dc8d54d4..445853284887 100644
--- a/ntpd/ntpd.mdoc.in
+++ b/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:12 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:02 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -144,7 +144,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.It Fl g , Fl \-panicgate
@@ -163,6 +163,19 @@ options.
See the
\fBtinker\fP
configuration file directive for other options.
+.It Fl G , Fl \-force\-step\-once
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
Jail directory.
.sp
@@ -186,7 +199,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
path to symmetric keys.
.sp
diff --git a/ntpd/ntpdbase-opts.def b/ntpd/ntpdbase-opts.def
index 110504e5c076..66b953528c7a 100644
--- a/ntpd/ntpdbase-opts.def
+++ b/ntpd/ntpdbase-opts.def
@@ -87,7 +87,7 @@ flag = {
by default.
This is the same operation as the
@code{driftfile} @kbd{driftfile}
- configuration specification in the
+ configuration specification in the
@file{/etc/ntp.conf}
file.
_EndOfDoc_;
@@ -115,6 +115,24 @@ flag = {
};
flag = {
+ name = force_step_once;
+ value = G;
+ descrip = "Step any initial offset correction.";
+ doc = <<- _EndOfDoc_
+ Normally,
+ @code{ntpd}
+ steps the time if the time offset exceeds the step threshold,
+ which is 128 ms by default, and otherwise slews the time.
+ This option forces the initial offset correction to be stepped,
+ so the highest time accuracy can be achieved quickly.
+ However, this may also cause the time to be stepped back
+ so this option must not be used if
+ applications requiring monotonic time are running.
+ See the @code{tinker} configuration file directive for other options.
+ _EndOfDoc_;
+};
+
+flag = {
ifdef = HAVE_DROPROOT;
name = jaildir;
value = i;
@@ -150,7 +168,7 @@ flag = {
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
- @code{interface} command, which is more versatile.
+ @code{interface} command, which is more versatile.
_EndOfDoc_;
};
diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c
index 2b396d8a51a1..0520311d1bc7 100644
--- a/ntpd/refclock_palisade.c
+++ b/ntpd/refclock_palisade.c
@@ -584,7 +584,10 @@ TSIP_decode (
break;
}
- if (up->leap_status & PALISADE_LEAP_PENDING) {
+ up->month = mb(15);
+ if ( (up->leap_status & PALISADE_LEAP_PENDING) &&
+ /* Avoid early announce: https://bugs.ntp.org/2773 */
+ (6 == up->month || 12 == up->month) ) {
if (up->leap_status & PALISADE_UTC_TIME)
pp->leap = LEAP_ADDSECOND;
else
@@ -615,6 +618,7 @@ TSIP_decode (
pp->hour = mb(11);
pp->minute = mb(12);
pp->second = mb(13);
+ up->month = mb(14); /* Save for LEAP check */
#ifdef DEBUG
if (debug > 1)
@@ -645,7 +649,9 @@ TSIP_decode (
printf("TSIP_decode: unit %d\n", up->unit);
}
#endif
- if (getint((u_char *) &mb(10)) & 0x80)
+ if ( (getint((u_char *) &mb(10)) & 0x80) &&
+ /* Avoid early announce: https://bugs.ntp.org/2773 */
+ (6 == up->month || 12 == up->month) )
pp->leap = LEAP_ADDSECOND; /* we ASSUME addsecond */
else
pp->leap = LEAP_NOWARNING;
diff --git a/ntpd/refclock_palisade.h b/ntpd/refclock_palisade.h
index 4f1ab266eef3..3782a5eb92c7 100644
--- a/ntpd/refclock_palisade.h
+++ b/ntpd/refclock_palisade.h
@@ -169,6 +169,7 @@ struct palisade_unit {
short rpt_cnt; /* TSIP packet length so far */
char rpt_buf[BMAX]; /* packet assembly buffer */
int type; /* Clock mode type */
+ int month; /* for LEAP filter */
};
/*
diff --git a/ntpd/refclock_parse.c b/ntpd/refclock_parse.c
index aa4be6063c1d..195ec39cb4f0 100644
--- a/ntpd/refclock_parse.c
+++ b/ntpd/refclock_parse.c
@@ -54,36 +54,36 @@
/*
* This driver currently provides the support for
- * - Meinberg receiver DCF77 PZF 535 (TCXO version) (DCF)
- * - Meinberg receiver DCF77 PZF 535 (OCXO version) (DCF)
- * - Meinberg receiver DCF77 PZF 509 (DCF)
+ * - Meinberg receiver DCF77 PZF535 (TCXO version) (DCF)
+ * - Meinberg receiver DCF77 PZF535 (OCXO version) (DCF)
+ * - Meinberg receiver DCF77 PZF509 (DCF)
* - Meinberg receiver DCF77 AM receivers (e.g. C51) (DCF)
* - IGEL CLOCK (DCF)
* - ELV DCF7000 (DCF)
* - Schmid clock (DCF)
* - Conrad DCF77 receiver module (DCF)
* - FAU DCF77 NTP receiver (TimeBrick) (DCF)
- * - WHARTON 400A Series clock (DCF)
+ * - WHARTON 400A Series clock (DCF)
*
- * - Meinberg GPS166/GPS167 (GPS)
+ * - Meinberg GPS receivers (GPS)
* - Trimble (TSIP and TAIP protocol) (GPS)
*
* - RCC8000 MSF Receiver (MSF)
- * - VARITEXT clock (MSF)
+ * - VARITEXT clock (MSF)
*/
/*
* Meinberg receivers are usually connected via a
- * 9600 baud serial line
+ * 9600/7E1 or 19200/8N1 serial line.
*
* The Meinberg GPS receivers also have a special NTP time stamp
* format. The firmware release is Uni-Erlangen.
*
* Meinberg generic receiver setup:
- * output time code every second
- * Baud rate 9600 7E2S
+ * output time code every second
+ * Baud rate 9600 7E2S
*
- * Meinberg GPS16x setup:
+ * Meinberg GPS receiver setup:
* output time code every second
* Baudrate 19200 8N1
*
@@ -91,7 +91,9 @@
* in Meinberg receivers.
*
* Special software versions are only sensible for the
- * GPS 16x family of receivers.
+ * oldest GPS receiver, GPS16x. For newer receiver types
+ * the output string format can be configured at the device,
+ * and the device name is generally GPSxxx instead of GPS16x.
*
* Meinberg can be reached via: http://www.meinberg.de/
*/
@@ -156,13 +158,13 @@
# endif
#endif
-#define BUFFER_SIZE(_BUF, _PTR) ((_BUF) + sizeof(_BUF) - (_PTR))
-#define BUFFER_SIZES(_BUF, _PTR, _SZ) ((_BUF) + (_SZ) - (_PTR))
+# define BUFFER_SIZE(_BUF, _PTR) ((int)((_BUF) + sizeof(_BUF) - (_PTR)))
+# define BUFFER_SIZES(_BUF, _PTR, _SZ) ((int)((_BUF) + (_SZ) - (_PTR)))
/*
* document type of PPS interfacing - copy of ifdef mechanism in local_input()
*/
-#undef PPS_METHOD
+#undef PPS_METHOD
#ifdef HAVE_PPSAPI
#define PPS_METHOD "PPS API"
@@ -181,6 +183,18 @@
#endif /* TIOCDCDTIMESTAMP */
#endif /* HAVE_PPSAPI */
+/*
+ * COND_DEF can be conditionally defined as DEF or 0. If defined as DEF
+ * then some more parse-specific variables are flagged to be printed with
+ * "ntpq -c cv <assid>". This can be lengthy, so by default COND_DEF
+ * should be defined as 0.
+ */
+#if 0
+# define COND_DEF DEF // enable this for testing
+#else
+# define COND_DEF 0 // enable this by default
+#endif
+
#include "ntp_io.h"
#include "ntp_stdlib.h"
@@ -382,7 +396,7 @@ struct parseunit
* PARSE io
*/
bind_t *binding; /* io handling binding */
-
+
/*
* parse state
*/
@@ -450,23 +464,23 @@ typedef struct poll_info
#define DCF_P_ID "DCFp" /* psuedo random phase shift */
#define GPS_ID "GPS" /* GPS receiver */
-#define NOCLOCK_ROOTDELAY 0.0
-#define NOCLOCK_BASEDELAY 0.0
-#define NOCLOCK_DESCRIPTION 0
+#define NOCLOCK_ROOTDELAY 0.0
+#define NOCLOCK_BASEDELAY 0.0
+#define NOCLOCK_DESCRIPTION 0
#define NOCLOCK_MAXUNSYNC 0
#define NOCLOCK_CFLAG 0
#define NOCLOCK_IFLAG 0
#define NOCLOCK_OFLAG 0
#define NOCLOCK_LFLAG 0
-#define NOCLOCK_ID "TILT"
-#define NOCLOCK_POLL NO_POLL
-#define NOCLOCK_INIT NO_INIT
-#define NOCLOCK_END NO_END
-#define NOCLOCK_DATA NO_LCLDATA
-#define NOCLOCK_FORMAT ""
-#define NOCLOCK_TYPE CTL_SST_TS_UNSPEC
-#define NOCLOCK_SAMPLES 0
-#define NOCLOCK_KEEP 0
+#define NOCLOCK_ID "TILT"
+#define NOCLOCK_POLL NO_POLL
+#define NOCLOCK_INIT NO_INIT
+#define NOCLOCK_END NO_END
+#define NOCLOCK_DATA NO_LCLDATA
+#define NOCLOCK_FORMAT ""
+#define NOCLOCK_TYPE CTL_SST_TS_UNSPEC
+#define NOCLOCK_SAMPLES 0
+#define NOCLOCK_KEEP 0
#define DCF_TYPE CTL_SST_TS_LF
#define GPS_TYPE CTL_SST_TS_UHF
@@ -536,14 +550,14 @@ typedef struct poll_info
#define DCFPZF535OCXO_FORMAT "Meinberg Standard"
/*
- * Meinberg GPS16X receiver
+ * Meinberg GPS receivers
*/
static void gps16x_message (struct parseunit *, parsetime_t *);
static int gps16x_poll_init (struct parseunit *);
#define GPS16X_ROOTDELAY 0.0 /* nothing here */
#define GPS16X_BASEDELAY 0.001968 /* XXX to be fixed ! 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define GPS16X_DESCRIPTION "Meinberg GPS16x receiver"
+#define GPS16X_DESCRIPTION "Meinberg GPS receiver"
#define GPS16X_MAXUNSYNC 60*60*96 /* only trust clock for 4 days
* @ 5e-9df/f we have accumulated
* at most an error of 1.73 ms
@@ -745,9 +759,9 @@ static void trimbletsip_event (struct parseunit *, int);
#define TRIMBLETAIP_INIT trimbletaip_init
#define TRIMBLETSIP_INIT trimbletsip_init
-#define TRIMBLETAIP_EVENT trimbletaip_event
+#define TRIMBLETAIP_EVENT trimbletaip_event
-#define TRIMBLETSIP_EVENT trimbletsip_event
+#define TRIMBLETSIP_EVENT trimbletsip_event
#define TRIMBLETSIP_MESSAGE trimbletsip_message
#define TRIMBLETAIP_END 0
@@ -804,7 +818,7 @@ static poll_info_t rcc8000_pollinfo = { RCC_POLLRATE, RCC_POLLCMD, RCC_CMDSIZE }
#define RCC8000_KEEP 3
/*
- * Hopf Radio clock 6021 Format
+ * Hopf Radio clock 6021 Format
*
*/
#define HOPF6021_ROOTDELAY 0.0
@@ -1200,7 +1214,7 @@ static struct parse_clockinfo
},
{ /* mode 12 */
HOPF6021_FLAGS,
- NO_POLL,
+ NO_POLL,
NO_INIT,
NO_EVENT,
NO_END,
@@ -1576,7 +1590,7 @@ list_err(
if (do_it)
err->err_cnt++;
-
+
if (err->err_stage->err_count &&
(err->err_cnt >= err->err_stage->err_count))
{
@@ -1600,7 +1614,7 @@ list_err(
l_mktime(current_time - err->err_started));
err->err_suppressed = 0;
}
-
+
return do_it;
}
@@ -1715,7 +1729,7 @@ static int stream_setfmt (struct parseunit *, parsectl_t *);
static int stream_timecode (struct parseunit *, parsectl_t *);
static void stream_receive (struct recvbuf *);
#endif
-
+
static int local_init (struct parseunit *);
static void local_end (struct parseunit *);
static int local_nop (struct parseunit *);
@@ -1796,7 +1810,7 @@ ppsclock_init(
{
static char m1[] = "ppsclocd";
static char m2[] = "ppsclock";
-
+
/*
* now push the parse streams module
* it will ensure exclusive access to the device
@@ -1885,7 +1899,7 @@ stream_setcs(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_SETCS;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1908,7 +1922,7 @@ stream_enable(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_ENABLE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)0;
@@ -1932,7 +1946,7 @@ stream_disable(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_DISABLE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)0;
@@ -1957,7 +1971,7 @@ stream_getfmt(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_GETFMT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1980,7 +1994,7 @@ stream_setfmt(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_SETFMT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -2005,12 +2019,12 @@ stream_timecode(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_TIMECODE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
strioc.ic_len = sizeof (*tcl);
-
+
if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
{
ERR(ERR_INTERNAL)
@@ -2045,7 +2059,7 @@ stream_receive(
return;
}
clear_err(parse, ERR_BADIO);
-
+
memmove((caddr_t)&parsetime,
(caddr_t)rbufp->recv_buffer,
sizeof(parsetime_t));
@@ -2211,7 +2225,7 @@ local_input(
{
struct timespec pps_timeout;
pps_info_t pps_info;
-
+
pps_timeout.tv_sec = 0;
pps_timeout.tv_nsec = 0;
@@ -2232,9 +2246,9 @@ local_input(
else
pts = pps_info.assert_timestamp;
- parse->parseio.parse_dtime.parse_ptime.fp.l_ui = pts.tv_sec + JAN_1970;
+ parse->parseio.parse_dtime.parse_ptime.fp.l_ui = (uint32_t) (pts.tv_sec + JAN_1970);
- dtemp = pts.tv_nsec / 1e9;
+ dtemp = (double) pts.tv_nsec / 1e9;
if (dtemp < 0.) {
dtemp += 1;
parse->parseio.parse_dtime.parse_ptime.fp.l_ui--;
@@ -2243,9 +2257,9 @@ local_input(
dtemp -= 1;
parse->parseio.parse_dtime.parse_ptime.fp.l_ui++;
}
- parse->parseio.parse_dtime.parse_ptime.fp.l_uf = dtemp * FRAC;
+ parse->parseio.parse_dtime.parse_ptime.fp.l_uf = (uint32_t)(dtemp * FRAC);
- parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
+ parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
#ifdef DEBUG
if (debug > 3)
{
@@ -2287,11 +2301,11 @@ local_input(
#else
#ifdef TIOCDCDTIMESTAMP
struct timeval dcd_time;
-
+
if (ioctl(parse->ppsfd, TIOCDCDTIMESTAMP, &dcd_time) != -1)
{
l_fp tstmp;
-
+
TVTOTS(&dcd_time, &tstmp);
tstmp.l_ui += JAN_1970;
L_SUB(&ts.fp, &tstmp);
@@ -2413,7 +2427,7 @@ local_receive(
return;
}
clear_err(parse, ERR_BADIO);
-
+
memmove((caddr_t)&parsetime,
(caddr_t)rbufp->recv_buffer,
sizeof(parsetime_t));
@@ -2511,7 +2525,7 @@ parsestate(
{ PARSEB_LEAPADD, "LEAP ADD WARNING" },
{ PARSEB_LEAPDEL, "LEAP DELETE WARNING" },
{ PARSEB_LEAPSECOND, "LEAP SECOND" },
- { PARSEB_ALTERNATE, "ALTERNATE ANTENNA" },
+ { PARSEB_CALLBIT, "CALL BIT" },
{ PARSEB_TIMECODE, "TIME CODE" },
{ PARSEB_PPS, "PPS" },
{ PARSEB_POSITION, "POSITION" },
@@ -2566,7 +2580,7 @@ parsestate(
{
t = ap(buffer, size, t, "; ");
}
-
+
t = ap(buffer, size, t, "%s",
sflagstrings[i].name);
}
@@ -2808,7 +2822,7 @@ parse_shutdown(
{
parse->parse_type->cl_end(parse);
}
-
+
/*
* cleanup before leaving this world
*/
@@ -2821,7 +2835,7 @@ parse_shutdown(
io_closeclock(&parse->generic->io);
free_varlist(parse->kv);
-
+
NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
msyslog(LOG_INFO, "PARSE receiver #%d: reference clock \"%s\" removed",
CLK_UNIT(parse->peer), parse->parse_type->cl_description);
@@ -2847,14 +2861,14 @@ parse_hardpps(
if (CLK_PPS(parse->peer) && (parse->flags & PARSE_PPSKERNEL)) {
int i = 0;
- if (mode == PARSE_HARDPPS_ENABLE)
+ if (mode == PARSE_HARDPPS_ENABLE)
{
if (parse->flags & PARSE_CLEAR)
i = PPS_CAPTURECLEAR;
else
i = PPS_CAPTUREASSERT;
}
-
+
if (time_pps_kcbind(parse->atom.handle, PPS_KC_HARDPPS, i,
PPS_TSFMT_TSPEC) < 0) {
msyslog(LOG_ERR, "PARSE receiver #%d: time_pps_kcbind failed: %m",
@@ -2884,8 +2898,8 @@ parse_ppsapi(
{
int cap, mode_ppsoffset;
const char *cp;
-
- parse->flags &= ~PARSE_PPSCLOCK;
+
+ parse->flags &= (u_char) (~PARSE_PPSCLOCK);
/*
* collect PPSAPI offset capability - should move into generic handling
@@ -2893,7 +2907,7 @@ parse_ppsapi(
if (time_pps_getcap(parse->atom.handle, &cap) < 0) {
msyslog(LOG_ERR, "PARSE receiver #%d: parse_ppsapi: time_pps_getcap failed: %m",
CLK_UNIT(parse->peer));
-
+
return 0;
}
@@ -2927,19 +2941,19 @@ parse_ppsapi(
CLK_UNIT(parse->peer), cp, cap);
mode_ppsoffset = 0;
} else {
- if (mode_ppsoffset == PPS_OFFSETCLEAR)
- {
- parse->atom.pps_params.clear_offset.tv_sec = -parse->ppsphaseadjust;
- parse->atom.pps_params.clear_offset.tv_nsec = -1e9*(parse->ppsphaseadjust - (long)parse->ppsphaseadjust);
+ if (mode_ppsoffset == PPS_OFFSETCLEAR)
+ {
+ parse->atom.pps_params.clear_offset.tv_sec = (time_t)(-parse->ppsphaseadjust);
+ parse->atom.pps_params.clear_offset.tv_nsec = (long)(-1e9*(parse->ppsphaseadjust - (double)(long)parse->ppsphaseadjust));
}
-
+
if (mode_ppsoffset == PPS_OFFSETASSERT)
- {
- parse->atom.pps_params.assert_offset.tv_sec = -parse->ppsphaseadjust;
- parse->atom.pps_params.assert_offset.tv_nsec = -1e9*(parse->ppsphaseadjust - (long)parse->ppsphaseadjust);
+ {
+ parse->atom.pps_params.assert_offset.tv_sec = (time_t)(-parse->ppsphaseadjust);
+ parse->atom.pps_params.assert_offset.tv_nsec = (long)(-1e9*(parse->ppsphaseadjust - (double)(long)parse->ppsphaseadjust));
}
}
-
+
parse->atom.pps_params.mode |= mode_ppsoffset;
if (time_pps_setparams(parse->atom.handle, &parse->atom.pps_params) < 0) {
@@ -3043,9 +3057,9 @@ parse_start(
parse->kv = (struct ctl_var *)0;
clear_err(parse, ERR_ALL);
-
+
parse->parse_type = &parse_clockinfo[type];
-
+
parse->maxunsync = parse->parse_type->cl_maxunsync;
parse->generic->fudgetime1 = parse->parse_type->cl_basedelay;
@@ -3058,16 +3072,16 @@ parse_start(
peer->rootdelay = parse->parse_type->cl_rootdelay;
peer->sstclktype = parse->parse_type->cl_type;
peer->precision = sys_precision;
-
+
peer->stratum = STRATUM_REFCLOCK;
if (peer->stratum <= 1)
memmove((char *)&parse->generic->refid, parse->parse_type->cl_id, 4);
else
parse->generic->refid = htonl(PARSEHSREFID);
-
+
parse->generic->io.fd = fd232;
-
+
parse->peer = peer; /* marks it also as busy */
/*
@@ -3110,15 +3124,15 @@ parse_start(
}
#endif
- tio.c_cflag = parse_clockinfo[type].cl_cflag;
- tio.c_iflag = parse_clockinfo[type].cl_iflag;
- tio.c_oflag = parse_clockinfo[type].cl_oflag;
- tio.c_lflag = parse_clockinfo[type].cl_lflag;
-
+ tio.c_cflag = (tcflag_t) parse_clockinfo[type].cl_cflag;
+ tio.c_iflag = (tcflag_t) parse_clockinfo[type].cl_iflag;
+ tio.c_oflag = (tcflag_t) parse_clockinfo[type].cl_oflag;
+ tio.c_lflag = (tcflag_t) parse_clockinfo[type].cl_lflag;
+
#ifdef HAVE_TERMIOS
- if ((cfsetospeed(&tio, parse_clockinfo[type].cl_speed) == -1) ||
- (cfsetispeed(&tio, parse_clockinfo[type].cl_speed) == -1))
+ if ((cfsetospeed(&tio, (speed_t) parse_clockinfo[type].cl_speed) == -1) ||
+ (cfsetispeed(&tio, (speed_t) parse_clockinfo[type].cl_speed) == -1))
{
msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcset{i,o}speed(&tio, speed): %m", unit);
parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
@@ -3178,7 +3192,7 @@ parse_start(
if (CLK_PPS(parse->peer))
{
int i = 1;
-
+
if (ioctl(parse->ppsfd, TIOCSPPS, (caddr_t)&i) == 0)
{
parse->flags |= PARSE_PPSCLOCK;
@@ -3217,7 +3231,7 @@ parse_start(
*/
parse->generic->io.srcclock = peer;
parse->generic->io.datalen = 0;
-
+
parse->binding = init_iobinding(parse);
if (parse->binding == (bind_t *)0)
@@ -3263,9 +3277,9 @@ parse_start(
parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
return 0; /* well, ok - special initialisation broke */
}
-
+
strlcpy(tmp_ctl.parseformat.parse_buffer, parse->parse_type->cl_format, sizeof(tmp_ctl.parseformat.parse_buffer));
- tmp_ctl.parseformat.parse_count = strlen(tmp_ctl.parseformat.parse_buffer);
+ tmp_ctl.parseformat.parse_count = (u_short) strlen(tmp_ctl.parseformat.parse_buffer);
if (!PARSE_SETFMT(parse, &tmp_ctl))
{
@@ -3273,7 +3287,7 @@ parse_start(
parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
return 0; /* well, ok - special initialisation broke */
}
-
+
/*
* get rid of all IO accumulated so far
*/
@@ -3300,7 +3314,7 @@ parse_start(
return 0; /* well, ok - special initialisation broke */
}
}
-
+
/*
* Insert in async io device list.
*/
@@ -3365,8 +3379,8 @@ parse_ctl(
{
if (in->haveflags & (CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4))
{
- parse->flags = (parse->flags & ~(CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4)) |
- (in->flags & (CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4));
+ u_char mask = CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4;
+ parse->flags = (parse->flags & (u_char)(~mask)) | (in->flags & mask);
#if defined(HAVE_PPSAPI)
if (CLK_PPS(parse->peer))
{
@@ -3374,7 +3388,7 @@ parse_ctl(
}
#endif
}
-
+
if (in->haveflags & CLK_HAVETIME1)
{
parse->generic->fudgetime1 = in->fudgetime1;
@@ -3382,11 +3396,11 @@ parse_ctl(
CLK_UNIT(parse->peer),
parse->generic->fudgetime1);
}
-
+
if (in->haveflags & CLK_HAVETIME2)
{
parse->generic->fudgetime2 = in->fudgetime2;
- if (parse->flags & PARSE_TRUSTTIME)
+ if (parse->flags & PARSE_TRUSTTIME)
{
parse->maxunsync = (u_long)ABS(in->fudgetime2);
msyslog(LOG_INFO, "PARSE receiver #%d: new trust time %s",
@@ -3434,7 +3448,7 @@ parse_poll(
*/
parse->generic->polls++;
- if (parse->pollneeddata &&
+ if (parse->pollneeddata &&
((int)(current_time - parse->pollneeddata) > (1<<(max(min(parse->peer->hpoll, parse->peer->ppoll), parse->peer->minpoll)))))
{
/*
@@ -3443,7 +3457,7 @@ parse_poll(
*/
parse->lastmissed = current_time;
parse_event(parse, CEVNT_TIMEOUT);
-
+
ERR(ERR_NODATA)
msyslog(LOG_WARNING, "PARSE receiver #%d: no data from device within poll interval (check receiver / wiring)", CLK_UNIT(parse->peer));
}
@@ -3501,7 +3515,7 @@ parse_control(
* handle changes
*/
parse_ctl(parse, in);
-
+
/*
* supply data
*/
@@ -3587,9 +3601,9 @@ parse_control(
tmpctl.parsegettc.parse_buffer, (unsigned)(tmpctl.parsegettc.parse_count));
}
-
+
tmpctl.parseformat.parse_format = tmpctl.parsegettc.parse_format;
-
+
if (!PARSE_GETFMT(parse, &tmpctl))
{
ERR(ERR_INTERNAL)
@@ -3603,7 +3617,7 @@ parse_control(
tt = ap(start, 80, tt, "refclock_format=\"");
if (count > 0) {
- tt = ap(start, 80, tt, "%*.*s",
+ tt = ap(start, 80, tt, "%*.*s",
count,
count,
tmpctl.parseformat.parse_buffer);
@@ -3632,7 +3646,7 @@ parse_control(
percent /= 10;
d /= 10;
}
-
+
if (d)
percent = (percent * 10000) / d;
else
@@ -3642,14 +3656,14 @@ parse_control(
{
char item[80];
int count;
-
+
snprintf(item, 80, "%s%s%s: %s (%d.%02d%%)",
sum ? "; " : "",
(parse->generic->currentstatus == i) ? "*" : "",
clockstatus((unsigned int)i),
l_mktime(s_time),
(int)(percent / 100), (int)(percent % 100));
- if ((count = strlen(item)) < (LEN_STATES - 40 - (tt - start)))
+ if ((count = (int) strlen(item)) < (LEN_STATES - 40 - (tt - start)))
{
tt = ap(start, LEN_STATES, tt,
"%s", item);
@@ -3657,22 +3671,22 @@ parse_control(
sum += s_time;
}
}
-
+
tt = ap(start, LEN_STATES, tt,
"; running time: %s\"", l_mktime(sum));
-
+
tt = add_var(&out->kv_list, 32, RO);
snprintf(tt, 32, "refclock_id=\"%s\"", parse->parse_type->cl_id);
-
+
tt = add_var(&out->kv_list, 80, RO);
snprintf(tt, 80, "refclock_iomode=\"%s\"", parse->binding->bd_description);
tt = add_var(&out->kv_list, 128, RO);
snprintf(tt, 128, "refclock_driver_version=\"%s\"", rcsid);
-
+
{
struct ctl_var *k;
-
+
k = parse->kv;
while (k && !(k->flags & EOV))
{
@@ -3680,8 +3694,8 @@ parse_control(
k++;
}
}
-
- out->lencode = strlen(outstatus);
+
+ out->lencode = (u_short) strlen(outstatus);
out->p_lastcode = outstatus;
}
}
@@ -3730,7 +3744,7 @@ parse_process(
{
l_fp off, rectime, reftime;
double fudge;
-
+
/* silence warning: 'off.Ul_i.Xl_i' may be used uninitialized in this function */
ZERO(off);
@@ -3743,11 +3757,11 @@ parse_process(
(parse->timedata.parse_status != parsetime->parse_status))
{
char buffer[400];
-
+
NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
msyslog(LOG_WARNING, "PARSE receiver #%d: conversion status \"%s\"",
CLK_UNIT(parse->peer), parsestatus(parsetime->parse_status, buffer, sizeof(buffer)));
-
+
if ((parsetime->parse_status & CVT_MASK) == CVT_FAIL)
{
/*
@@ -3756,7 +3770,7 @@ parse_process(
* the time code might be overwritten by the next packet
*/
parsectl_t tmpctl;
-
+
if (!PARSE_GETTIMECODE(parse, &tmpctl))
{
ERR(ERR_INTERNAL)
@@ -3794,7 +3808,7 @@ parse_process(
parse->timedata.parse_ptime = parsetime->parse_ptime;
}
break; /* well, still waiting - timeout is handled at higher levels */
-
+
case CVT_FAIL:
if (parsetime->parse_status & CVT_BADFMT)
{
@@ -3825,7 +3839,7 @@ parse_process(
if (parse->lastformat != parsetime->parse_format)
{
parsectl_t tmpctl;
-
+
tmpctl.parseformat.parse_format = parsetime->parse_format;
if (!PARSE_GETFMT(parse, &tmpctl))
@@ -3853,10 +3867,10 @@ parse_process(
/*
* something happend - except for PPS events
*/
-
+
(void) parsestate(parsetime->parse_state, tmp1, sizeof(tmp1));
(void) parsestate(parse->timedata.parse_state, tmp2, sizeof(tmp2));
-
+
NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
msyslog(LOG_INFO,"PARSE receiver #%d: STATE CHANGE: %s -> %s",
CLK_UNIT(parse->peer), tmp2, tmp1);
@@ -3959,12 +3973,12 @@ parse_process(
}
fudge = parse->generic->fudgetime1; /* standard RS232 Fudgefactor */
-
+
if (PARSE_TIMECODE(parsetime->parse_state))
{
rectime = parsetime->parse_stime.fp;
off = reftime = parsetime->parse_time.fp;
-
+
L_SUB(&off, &rectime); /* prepare for PPS adjustments logic */
#ifdef DEBUG
@@ -4009,7 +4023,7 @@ parse_process(
M_ISGEQ(0, 0x7fffffff, off.l_i, off.l_uf))
{
fudge = ppsphaseadjust; /* pick PPS fudge factor */
-
+
/*
* RS232 offsets within [-0.5..0.5[ - take PPS offsets
*/
@@ -4021,7 +4035,7 @@ parse_process(
reftime.l_ui++;
reftime.l_uf = 0;
-
+
/*
* implied on second offset
*/
@@ -4087,7 +4101,7 @@ parse_process(
rectime = reftime;
L_SUB(&rectime, &off); /* just to keep the ntp interface happy */
-
+
#ifdef DEBUG
if (debug > 3)
printf("PARSE receiver #%d: calculated Reftime %s, Recvtime %s\n",
@@ -4112,14 +4126,14 @@ parse_process(
clear_err(parse, ERR_BADDATA);
clear_err(parse, ERR_NODATA);
clear_err(parse, ERR_INTERNAL);
-
+
/*
* and now stick it into the clock machine
* samples are only valid iff lastsync is not too old and
* we have seen the clock in sync at least once
* after the last time we didn't see an expected data telegram
* at startup being not in sync is also bad just like
- * POWERUP state unless PARSE_F_POWERUPTRUST is set
+ * POWERUP state unless PARSE_F_POWERUPTRUST is set
* see the clock states section above for more reasoning
*/
if (((current_time - parse->lastsync) > parse->maxunsync) ||
@@ -4159,9 +4173,9 @@ parse_process(
* only good/trusted samples are interesting
*/
#ifdef DEBUG
- if (debug > 2)
- {
- printf("PARSE receiver #%d: refclock_process_offset(reftime=%s, rectime=%s, Fudge=%f)\n",
+ if (debug > 2)
+ {
+ printf("PARSE receiver #%d: refclock_process_offset(reftime=%s, rectime=%s, Fudge=%f)\n",
CLK_UNIT(parse->peer),
prettydate(&reftime),
prettydate(&rectime),
@@ -4169,7 +4183,7 @@ parse_process(
}
#endif
parse->generic->lastref = reftime;
-
+
refclock_process_offset(parse->generic, reftime, rectime, fudge);
#ifdef HAVE_PPSAPI
@@ -4177,18 +4191,18 @@ parse_process(
* pass PPS information on to PPS clock
*/
if (PARSE_PPS(parsetime->parse_state) && CLK_PPS(parse->peer))
- {
- parse->peer->flags |= FLAG_PPS;
+ {
+ parse->peer->flags |= (FLAG_PPS | FLAG_TSTAMP_PPS);
parse_hardpps(parse, PARSE_HARDPPS_ENABLE);
}
#endif
} else {
- parse_hardpps(parse, PARSE_HARDPPS_DISABLE);
- parse->peer->flags &= ~FLAG_PPS;
+ parse_hardpps(parse, PARSE_HARDPPS_DISABLE);
+ parse->peer->flags &= ~(FLAG_PPS | FLAG_TSTAMP_PPS);
}
/*
- * ready, unless the machine wants a sample or
+ * ready, unless the machine wants a sample or
* we are in fast startup mode (peer->dist > MAXDISTANCE)
*/
if (!parse->pollneeddata && parse->peer->disp <= MAXDISTANCE)
@@ -4200,56 +4214,71 @@ parse_process(
refclock_receive(parse->peer);
}
-
+
/**===========================================================================
** special code for special clocks
**/
static void
mk_utcinfo(
- char *t,
+ char *t, // pointer to the output string buffer
int wnt,
int wnlsf,
int dn,
int dtls,
int dtlsf,
- int size
+ int size // size of the output string buffer
)
{
- l_fp leapdate;
- char *start = t;
-
- snprintf(t, size, "current correction %d sec", dtls);
- t += strlen(t);
-
- if (wnlsf < 990)
- wnlsf += 1024;
-
- if (wnt < 990)
- wnt += 1024;
-
- gpstolfp((unsigned short)wnlsf, (unsigned short)dn, 0, &leapdate);
-
- if ((dtlsf != dtls) &&
- ((wnlsf - wnt) < 52))
- {
- snprintf(t, BUFFER_SIZES(start, t, size), ", next correction %d sec on %s, new GPS-UTC offset %d",
- dtlsf - dtls, gmprettydate(&leapdate), dtlsf);
- }
- else
- {
- snprintf(t, BUFFER_SIZES(start, t, size), ", last correction on %s",
- gmprettydate(&leapdate));
- }
+ /*
+ * The week number transmitted by the GPS satellites for the leap date
+ * is truncated to 8 bits only. If the nearest leap second date is off
+ * the current date by more than +/- 128 weeks then conversion to a
+ * calendar date is ambiguous. On the other hand, if a leap second is
+ * currently being announced (i.e. dtlsf != dtls) then the week number
+ * wnlsf is close enough, and we can unambiguously determine the date
+ * for which the leap second is scheduled.
+ */
+ if ( dtlsf != dtls )
+ {
+ time_t t_ls;
+ struct tm *tm;
+ int n = 0;
+
+ if (wnlsf < GPSWRAP)
+ wnlsf += GPSWEEKS;
+
+ if (wnt < GPSWRAP)
+ wnt += GPSWEEKS;
+
+ t_ls = (time_t) wnlsf * SECSPERWEEK
+ + (time_t) dn * SECSPERDAY
+ + GPS_SEC_BIAS - 1;
+
+ tm = gmtime( &t_ls );
+ if (tm == NULL) // gmtime() failed
+ {
+ snprintf( t, size, "** (gmtime() failed in mk_utcinfo())" );
+ return;
+ }
+
+ n += snprintf( t, size, "UTC offset transition from %is to %is due to leap second %s",
+ dtls, dtlsf, ( dtls < dtlsf ) ? "insertion" : "deletion" );
+ n += snprintf( t + n, size - n, " at UTC midnight at the end of %s, %04i-%02i-%02i",
+ daynames[tm->tm_wday], tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday );
+ }
+ else
+ snprintf( t, size, "UTC offset parameter: %is, no leap second announced.\n", dtls );
+
}
#ifdef CLOCK_MEINBERG
/**===========================================================================
- ** Meinberg GPS166/GPS167 support
+ ** Meinberg GPS receiver support
**/
/*------------------------------------------------------------
- * gps16x_message - process GPS16x messages
+ * gps16x_message - process messages from Meinberg GPS receiver
*/
static void
gps16x_message(
@@ -4261,12 +4290,12 @@ gps16x_message(
{
GPS_MSG_HDR header;
unsigned char *bufp = (unsigned char *)parsetime->parse_msg + 1;
-
+
#ifdef DEBUG
if (debug > 2)
{
char msgbuffer[600];
-
+
mkreadable(msgbuffer, sizeof(msgbuffer), (char *)parsetime->parse_msg, parsetime->parse_msglen, 1);
printf("PARSE receiver #%d: received message (%d bytes) >%s<\n",
CLK_UNIT(parse->peer),
@@ -4275,21 +4304,21 @@ gps16x_message(
}
#endif
get_mbg_header(&bufp, &header);
- if (header.gps_hdr_csum == mbg_csum(parsetime->parse_msg + 1, 6) &&
- (header.gps_len == 0 ||
- (header.gps_len < sizeof(parsetime->parse_msg) &&
- header.gps_data_csum == mbg_csum(bufp, header.gps_len))))
+ if (header.hdr_csum == mbg_csum(parsetime->parse_msg + 1, 6) &&
+ (header.len == 0 ||
+ (header.len < sizeof(parsetime->parse_msg) &&
+ header.data_csum == mbg_csum(bufp, header.len))))
{
/*
* clean message
*/
- switch (header.gps_cmd)
+ switch (header.cmd)
{
case GPS_SW_REV:
{
char buffer[64];
SW_REV gps_sw_rev;
-
+
get_mbg_sw_rev(&bufp, &gps_sw_rev);
snprintf(buffer, sizeof(buffer), "meinberg_gps_version=\"%x.%02x%s%s\"",
(gps_sw_rev.code >> 8) & 0xFF,
@@ -4300,33 +4329,35 @@ gps16x_message(
}
break;
- case GPS_STAT:
+ case GPS_BVAR_STAT:
{
static struct state
{
- unsigned short flag; /* status flag */
- unsigned const char *string; /* bit name */
+ BVAR_STAT flag; /* status flag */
+ const char *string; /* bit name */
} states[] =
{
- { TM_ANT_DISCONN, (const unsigned char *)"ANTENNA FAULTY" },
- { TM_SYN_FLAG, (const unsigned char *)"NO SYNC SIGNAL" },
- { TM_NO_SYNC, (const unsigned char *)"NO SYNC POWERUP" },
- { TM_NO_POS, (const unsigned char *)"NO POSITION" },
- { 0, (const unsigned char *)"" }
+ { BVAR_CFGH_INVALID, "Configuration/Health" },
+ { BVAR_ALM_NOT_COMPLETE, "Almanachs" },
+ { BVAR_UTC_INVALID, "UTC Correction" },
+ { BVAR_IONO_INVALID, "Ionospheric Correction" },
+ { BVAR_RCVR_POS_INVALID, "Receiver Position" },
+ { 0, "" }
};
- unsigned short status;
+ BVAR_STAT status;
struct state *s = states;
char buffer[512];
char *p, *b;
-
- status = get_lsb_short(&bufp);
+
+ status = (BVAR_STAT) get_lsb_short(&bufp);
p = b = buffer;
p = ap(buffer, sizeof(buffer), p,
"meinberg_gps_status=\"[0x%04x] ",
status);
-
+
if (status)
{
+ p = ap(buffer, sizeof(buffer), p, "incomplete buffered data: ");
b = p;
while (s->flag)
{
@@ -4336,7 +4367,7 @@ gps16x_message(
{
p = ap(buffer, sizeof(buffer), p, ", ");
}
-
+
p = ap(buffer, sizeof(buffer), p, "%s", (const char *)s->string);
}
s++;
@@ -4345,9 +4376,9 @@ gps16x_message(
}
else
{
- p = ap(buffer, sizeof(buffer), p, "<OK>\"");
+ p = ap(buffer, sizeof(buffer), p, "<all buffered data complete>\"");
}
-
+
set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
}
break;
@@ -4356,228 +4387,204 @@ gps16x_message(
{
XYZ xyz;
char buffer[256];
-
+
get_mbg_xyz(&bufp, xyz);
snprintf(buffer, sizeof(buffer), "gps_position(XYZ)=\"%s m, %s m, %s m\"",
mfptoa(xyz[XP].l_ui, xyz[XP].l_uf, 1),
mfptoa(xyz[YP].l_ui, xyz[YP].l_uf, 1),
mfptoa(xyz[ZP].l_ui, xyz[ZP].l_uf, 1));
-
+
set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_POS_LLA:
{
LLA lla;
char buffer[256];
-
+
get_mbg_lla(&bufp, lla);
-
+
snprintf(buffer, sizeof(buffer), "gps_position(LLA)=\"%s deg, %s deg, %s m\"",
mfptoa(lla[LAT].l_ui, lla[LAT].l_uf, 4),
- mfptoa(lla[LON].l_ui, lla[LON].l_uf, 4),
+ mfptoa(lla[LON].l_ui, lla[LON].l_uf, 4),
mfptoa(lla[ALT].l_ui, lla[ALT].l_uf, 1));
-
+
set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_TZDL:
break;
-
+
case GPS_PORT_PARM:
break;
-
+
case GPS_SYNTH:
break;
-
+
case GPS_ANT_INFO:
{
ANT_INFO antinfo;
char buffer[512];
char *p, *q;
-
+
get_mbg_antinfo(&bufp, &antinfo);
p = buffer;
p = ap(buffer, sizeof(buffer), p, "meinberg_antenna_status=\"");
switch (antinfo.status)
{
- case ANT_INVALID:
+ case ANT_INVALID: // No other fields valid since antenna has not yet been disconnected
p = ap(buffer, sizeof(buffer),
p, "<OK>");
break;
-
- case ANT_DISCONN:
+
+ case ANT_DISCONN: // Antenna is disconnected, tm_reconn and delta_t not yet set
q = ap(buffer, sizeof(buffer),
p, "DISCONNECTED since ");
NLOG(NLOG_CLOCKSTATUS)
ERR(ERR_BADSTATUS)
msyslog(LOG_ERR,"PARSE receiver #%d: ANTENNA FAILURE: %s",
CLK_UNIT(parse->peer), p);
-
+
p = q;
- mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p));
+ mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p), 0);
*p = '\0';
break;
-
- case ANT_RECONN:
+
+ case ANT_RECONN: // Antenna had been disconnect, but receiver sync. after reconnect, so all fields valid
p = ap(buffer, sizeof(buffer),
- p, "RECONNECTED on ");
- mbg_tm_str(&p, &antinfo.tm_reconn, BUFFER_SIZE(buffer, p));
+ p, "SYNC AFTER RECONNECT on ");
+ mbg_tm_str(&p, &antinfo.tm_reconn, BUFFER_SIZE(buffer, p), 0);
p = ap(buffer, sizeof(buffer),
- p, ", reconnect clockoffset %c%ld.%07ld s, disconnect time ",
+ p, ", clock offset at reconnect %c%ld.%07ld s, disconnect time ",
(antinfo.delta_t < 0) ? '-' : '+',
- ABS(antinfo.delta_t) / 10000,
- ABS(antinfo.delta_t) % 10000);
- mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p));
+ (long) ABS(antinfo.delta_t) / 10000,
+ (long) ABS(antinfo.delta_t) % 10000);
+ mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p), 0);
*p = '\0';
break;
-
+
default:
p = ap(buffer, sizeof(buffer),
p, "bad status 0x%04x",
antinfo.status);
break;
}
-
+
p = ap(buffer, sizeof(buffer), p, "\"");
-
+
set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_UCAP:
break;
-
+
case GPS_CFGH:
{
CFGH cfgh;
char buffer[512];
char *p;
-
+
get_mbg_cfgh(&bufp, &cfgh);
if (cfgh.valid)
{
+ const char *cp;
+ uint16_t tmp_val;
int i;
-
+
p = buffer;
p = ap(buffer, sizeof(buffer),
p, "gps_tot_51=\"");
mbg_tgps_str(&p, &cfgh.tot_51, BUFFER_SIZE(buffer, p));
p = ap(buffer, sizeof(buffer),
p, "\"");
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
-
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
+
p = buffer;
p = ap(buffer, sizeof(buffer),
p, "gps_tot_63=\"");
mbg_tgps_str(&p, &cfgh.tot_63, BUFFER_SIZE(buffer, p));
p = ap(buffer, sizeof(buffer),
p, "\"");
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
-
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
+
p = buffer;
p = ap(buffer, sizeof(buffer),
p, "gps_t0a=\"");
mbg_tgps_str(&p, &cfgh.t0a, BUFFER_SIZE(buffer, p));
p = ap(buffer, sizeof(buffer),
p, "\"");
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
-
- for (i = MIN_SVNO; i < MAX_SVNO; i++)
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
+
+ for (i = 0; i < N_SVNO_GPS; i++)
{
p = buffer;
- p = ap(buffer, sizeof(buffer), p, "gps_cfg[%d]=\"[0x%x] ", i, cfgh.cfg[i]);
- switch (cfgh.cfg[i] & 0x7)
- {
- case 0:
- p = ap(buffer, sizeof(buffer), p, "BLOCK I");
- break;
- case 1:
- p = ap(buffer, sizeof(buffer), p, "BLOCK II");
- break;
- default:
- p = ap(buffer, sizeof(buffer), p, "bad CFG");
- break;
- }
- p = ap(buffer, sizeof(buffer), p, "\"");
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
-
- p = buffer;
- p = ap(buffer, sizeof(buffer), p, "gps_health[%d]=\"[0x%x] ", i, cfgh.health[i]);
- switch ((cfgh.health[i] >> 5) & 0x7 )
- {
- case 0:
- p = ap(buffer, sizeof(buffer), p, "OK;");
- break;
- case 1:
- p = ap(buffer, sizeof(buffer), p, "PARITY;");
- break;
- case 2:
- p = ap(buffer, sizeof(buffer), p, "TLM/HOW;");
- break;
- case 3:
- p = ap(buffer, sizeof(buffer), p, "Z-COUNT;");
- break;
- case 4:
- p = ap(buffer, sizeof(buffer), p, "SUBFRAME 1,2,3;");
- break;
- case 5:
- p = ap(buffer, sizeof(buffer), p, "SUBFRAME 4,5;");
- break;
- case 6:
- p = ap(buffer, sizeof(buffer), p, "UPLOAD BAD;");
- break;
- case 7:
- p = ap(buffer, sizeof(buffer), p, "DATA BAD;");
- break;
+ p = ap(buffer, sizeof(buffer), p, "sv_info[%d]=\"PRN%d", i, i + N_SVNO_GPS);
+
+ tmp_val = cfgh.health[i]; /* a 6 bit SV health code */
+ p = ap(buffer, sizeof(buffer), p, "; health=0x%02x (", tmp_val);
+ /* "All Ones" has a special meaning" */
+ if (tmp_val == 0x3F) /* satellite is unusable or doesn't even exist */
+ cp = "SV UNAVAILABLE";
+ else {
+ /* The MSB contains a summary of the 3 MSBs of the 8 bit health code,
+ * indicating if the data sent by the satellite is OK or not. */
+ p = ap(buffer, sizeof(buffer), p, "DATA %s, ", (tmp_val & 0x20) ? "BAD" : "OK" );
+
+ /* The 5 LSBs contain the status of the different signals sent by the satellite. */
+ switch (tmp_val & 0x1F)
+ {
+ case 0x00: cp = "SIGNAL OK"; break;
+ /* codes 0x01 through 0x1B indicate that one or more
+ * specific signal components are weak or dead.
+ * We don't decode this here in detail. */
+ case 0x1C: cp = "SV IS TEMP OUT"; break;
+ case 0x1D: cp = "SV WILL BE TEMP OUT"; break;
+ default: cp = "TRANSMISSION PROBLEMS"; break;
+ }
}
-
- switch (cfgh.health[i] & 0x1F)
+ p = ap(buffer, sizeof(buffer), p, "%s)", cp );
+
+ tmp_val = cfgh.cfg[i]; /* a 4 bit SV configuration/type code */
+ p = ap(buffer, sizeof(buffer), p, "; cfg=0x%02x (", tmp_val);
+ switch (tmp_val & 0x7)
{
- case 0:
- p = ap(buffer, sizeof(buffer), p, "SIGNAL OK");
- break;
- case 0x1C:
- p = ap(buffer, sizeof(buffer), p, "SV TEMP OUT");
- break;
- case 0x1D:
- p = ap(buffer, sizeof(buffer), p, "SV WILL BE TEMP OUT");
- break;
- case 0x1E:
- break;
- case 0x1F:
- p = ap(buffer, sizeof(buffer), p, "MULTIPLE ERRS");
- break;
- default:
- p = ap(buffer, sizeof(buffer), p, "TRANSMISSION PROBLEMS");
- break;
+ case 0x00: cp = "(reserved)"; break;
+ case 0x01: cp = "BLOCK II/IIA/IIR"; break;
+ case 0x02: cp = "BLOCK IIR-M"; break;
+ case 0x03: cp = "BLOCK IIF"; break;
+ case 0x04: cp = "BLOCK III"; break;
+ default: cp = "unknown SV type"; break;
}
-
- p = ap(buffer, sizeof(buffer), p, "\"");
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
+ p = ap(buffer, sizeof(buffer), p, "%s", cp );
+ if (tmp_val & 0x08) /* A-S is on, P-code is encrypted */
+ p = ap( buffer, sizeof(buffer), p, ", A-S on" );
+
+ p = ap(buffer, sizeof(buffer), p, ")\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
}
}
}
break;
-
+
case GPS_ALM:
break;
-
+
case GPS_EPH:
break;
-
+
case GPS_UTC:
{
UTC utc;
char buffer[512];
char *p;
-
+
p = buffer;
-
+
get_mbg_utc(&bufp, &utc);
-
+
if (utc.valid)
{
p = ap(buffer, sizeof(buffer), p, "gps_utc_correction=\"");
@@ -4592,46 +4599,47 @@ gps16x_message(
set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_IONO:
break;
-
+
case GPS_ASCII_MSG:
{
ASCII_MSG gps_ascii_msg;
char buffer[128];
-
+
get_mbg_ascii_msg(&bufp, &gps_ascii_msg);
-
+
if (gps_ascii_msg.valid)
{
char buffer1[128];
mkreadable(buffer1, sizeof(buffer1), gps_ascii_msg.s, strlen(gps_ascii_msg.s), (int)0);
-
+
snprintf(buffer, sizeof(buffer), "gps_message=\"%s\"", buffer1);
}
else
snprintf(buffer, sizeof(buffer), "gps_message=<NONE>");
-
+
set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
-
+
break;
-
+
default:
break;
}
}
else
{
- msyslog(LOG_DEBUG, "PARSE receiver #%d: gps16x_message: message checksum error: hdr_csum = 0x%x (expected 0x%lx), data_len = %d, data_csum = 0x%x (expected 0x%lx)",
+ msyslog(LOG_DEBUG, "PARSE receiver #%d: gps16x_message: message checksum error: hdr_csum = 0x%x (expected 0x%x), "
+ "data_len = %d, data_csum = 0x%x (expected 0x%x)",
CLK_UNIT(parse->peer),
- header.gps_hdr_csum, mbg_csum(parsetime->parse_msg + 1, 6),
- header.gps_len,
- header.gps_data_csum, mbg_csum(bufp, (unsigned)((header.gps_len < sizeof(parsetime->parse_msg)) ? header.gps_len : 0)));
+ header.hdr_csum, mbg_csum(parsetime->parse_msg + 1, 6),
+ header.len,
+ header.data_csum, mbg_csum(bufp, (unsigned)((header.len < sizeof(parsetime->parse_msg)) ? header.len : 0)));
}
}
-
+
return;
}
@@ -4644,11 +4652,11 @@ gps16x_poll(
)
{
struct parseunit *parse = peer->procptr->unitptr;
-
- static GPS_MSG_HDR sequence[] =
+
+ static GPS_MSG_HDR sequence[] =
{
{ GPS_SW_REV, 0, 0, 0 },
- { GPS_STAT, 0, 0, 0 },
+ { GPS_BVAR_STAT, 0, 0, 0 },
{ GPS_UTC, 0, 0, 0 },
{ GPS_ASCII_MSG, 0, 0, 0 },
{ GPS_ANT_INFO, 0, 0, 0 },
@@ -4662,41 +4670,41 @@ gps16x_poll(
unsigned char cmd_buffer[64];
unsigned char *outp = cmd_buffer;
GPS_MSG_HDR *header;
-
+
if (((poll_info_t *)parse->parse_type->cl_data)->rate)
{
parse->peer->procptr->nextaction = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
}
- if (sequence[parse->localstate].gps_cmd == (unsigned short)~0)
+ if (sequence[parse->localstate].cmd == (unsigned short)~0)
parse->localstate = 0;
-
+
header = sequence + parse->localstate++;
-
+
*outp++ = SOH; /* start command */
-
+
put_mbg_header(&outp, header);
outp = cmd_buffer + 1;
-
- header->gps_hdr_csum = (short)mbg_csum(outp, 6);
+
+ header->hdr_csum = (short)mbg_csum(outp, 6);
put_mbg_header(&outp, header);
-
+
#ifdef DEBUG
if (debug > 2)
{
char buffer[128];
-
+
mkreadable(buffer, sizeof(buffer), (char *)cmd_buffer, (unsigned)(outp - cmd_buffer), 1);
printf("PARSE receiver #%d: transmitted message #%ld (%d bytes) >%s<\n",
CLK_UNIT(parse->peer),
parse->localstate - 1,
(int)(outp - cmd_buffer),
- buffer);
+ buffer);
}
#endif
-
- rtc = write(parse->generic->io.fd, cmd_buffer, (unsigned long)(outp - cmd_buffer));
-
+
+ rtc = (int) write(parse->generic->io.fd, cmd_buffer, (unsigned long)(outp - cmd_buffer));
+
if (rtc < 0)
{
ERR(ERR_BADIO)
@@ -4745,7 +4753,7 @@ gps16x_poll_init(
return 1;
}
#endif /* CLOCK_MEINBERG */
-
+
/**===========================================================================
** clock polling support
**/
@@ -4758,11 +4766,11 @@ poll_dpoll(
struct parseunit *parse
)
{
- int rtc;
+ long rtc;
const char *ps = ((poll_info_t *)parse->parse_type->cl_data)->string;
- int ct = ((poll_info_t *)parse->parse_type->cl_data)->count;
+ long ct = ((poll_info_t *)parse->parse_type->cl_data)->count;
- rtc = write(parse->generic->io.fd, ps, (unsigned long)ct);
+ rtc = write(parse->generic->io.fd, ps, ct);
if (rtc < 0)
{
ERR(ERR_BADIO)
@@ -4772,7 +4780,7 @@ poll_dpoll(
if (rtc != ct)
{
ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd incomplete (%d of %d bytes sent)", CLK_UNIT(parse->peer), rtc, ct);
+ msyslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd incomplete (%ld of %ld bytes sent)", CLK_UNIT(parse->peer), rtc, ct);
}
clear_err(parse, ERR_BADIO);
}
@@ -4786,7 +4794,7 @@ poll_poll(
)
{
struct parseunit *parse = peer->procptr->unitptr;
-
+
if (parse->parse_type->cl_poll)
parse->parse_type->cl_poll(parse);
@@ -4812,7 +4820,7 @@ poll_init(
return 0;
}
-
+
/**===========================================================================
** Trimble support
**/
@@ -4842,7 +4850,7 @@ trimbletaip_init(
else
{
tio.c_cc[VEOL] = TRIMBLETAIP_EOL;
-
+
if (TTY_SETATTR(parse->generic->io.fd, &tio) == -1)
{
msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_init: tcsetattr(fd, &tio): %m", CLK_UNIT(parse->peer));
@@ -4861,7 +4869,7 @@ static const char *taipinit[] = {
">FTM00020001<",
(char *)0
};
-
+
static void
trimbletaip_event(
struct parseunit *parse,
@@ -4878,7 +4886,7 @@ trimbletaip_event(
iv = taipinit;
while (*iv)
{
- int rtc = write(parse->generic->io.fd, *iv, strlen(*iv));
+ int rtc = (int) write(parse->generic->io.fd, *iv, strlen(*iv));
if (rtc < 0)
{
msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_event: failed to send cmd to clock: %m", CLK_UNIT(parse->peer));
@@ -5006,19 +5014,19 @@ union uval {
float fv;
double dv;
};
-
+
struct txbuf
{
short idx; /* index to first unused byte */
u_char *txt; /* pointer to actual data buffer */
};
-void sendcmd (struct txbuf *buf, int c);
-void sendbyte (struct txbuf *buf, int b);
-void sendetx (struct txbuf *buf, struct parseunit *parse);
-void sendint (struct txbuf *buf, int a);
-void sendflt (struct txbuf *buf, double a);
-
+void sendcmd (struct txbuf *buf, int c);
+void sendbyte (struct txbuf *buf, int b);
+void sendetx (struct txbuf *buf, struct parseunit *parse);
+void sendint (struct txbuf *buf, int a);
+void sendflt (struct txbuf *buf, double a);
+
void
sendcmd(
struct txbuf *buf,
@@ -5030,12 +5038,12 @@ sendcmd(
buf->idx = 2;
}
-void sendcmd (struct txbuf *buf, int c);
-void sendbyte (struct txbuf *buf, int b);
-void sendetx (struct txbuf *buf, struct parseunit *parse);
-void sendint (struct txbuf *buf, int a);
-void sendflt (struct txbuf *buf, double a);
-
+void sendcmd (struct txbuf *buf, int c);
+void sendbyte (struct txbuf *buf, int b);
+void sendetx (struct txbuf *buf, struct parseunit *parse);
+void sendint (struct txbuf *buf, int a);
+void sendflt (struct txbuf *buf, double a);
+
void
sendbyte(
struct txbuf *buf,
@@ -5067,18 +5075,18 @@ sendetx(
if (debug > 2)
{
char buffer[256];
-
+
mkreadable(buffer, sizeof(buffer), (char *)buf->txt, (unsigned)buf->idx, 1);
printf("PARSE receiver #%d: transmitted message (%d bytes) >%s<\n",
CLK_UNIT(parse->peer),
- buf->idx, buffer);
+ buf->idx, buffer);
}
#endif
clear_err(parse, ERR_BADIO);
}
}
-void
+void
sendint(
struct txbuf *buf,
int a
@@ -5098,7 +5106,7 @@ sendflt(
int i;
union uval uval;
- uval.fv = a;
+ uval.fv = (float) a;
#ifdef WORDS_BIGENDIAN
for (i=0; i<=3; i++)
#else
@@ -5130,12 +5138,12 @@ trimbletsip_setup(
if (t)
t->last_reset = current_time;
-
+
buf.txt = buffer;
-
+
sendcmd(&buf, CMD_CVERSION); /* request software versions */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_COPERPARAM); /* set operating parameters */
sendbyte(&buf, 4); /* static */
sendflt(&buf, 5.0*D2R); /* elevation angle mask = 10 deg XXX */
@@ -5143,25 +5151,25 @@ trimbletsip_setup(
sendflt(&buf, 12.0); /* PDOP mask = 12 */
sendflt(&buf, 8.0); /* PDOP switch level = 8 */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CMODESEL); /* fix mode select */
sendbyte(&buf, 1); /* time transfer mode */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CMESSAGE); /* request system message */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CSUPER); /* superpacket fix */
sendbyte(&buf, 0x2); /* binary mode */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CIOOPTIONS); /* set I/O options */
sendbyte(&buf, TRIM_POS_OPT); /* position output */
sendbyte(&buf, 0x00); /* no velocity output */
sendbyte(&buf, TRIM_TIME_OPT); /* UTC, compute on seconds */
sendbyte(&buf, 0x00); /* no raw measurements */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CUTCPARAM); /* request UTC correction data */
sendetx(&buf, parse);
@@ -5185,7 +5193,7 @@ trimble_check(
u_char buffer[256];
struct txbuf buf;
buf.txt = buffer;
-
+
if (t)
{
if (current_time > t->last_msg + TRIMBLETSIP_IDLE_TIME)
@@ -5193,18 +5201,18 @@ trimble_check(
}
poll_poll(parse->peer); /* emit query string and re-arm timer */
-
+
if (t && t->qtracking)
{
u_long oldsats = t->ltrack & ~t->ctrack;
-
+
t->qtracking = 0;
t->ltrack = t->ctrack;
-
+
if (oldsats)
{
int i;
-
+
for (i = 0; oldsats; i++) {
if (oldsats & (1 << i))
{
@@ -5215,7 +5223,7 @@ trimble_check(
oldsats &= ~(1 << i);
}
}
-
+
sendcmd(&buf, CMD_CSTATTRACK);
sendbyte(&buf, 0x00); /* current tracking set */
sendetx(&buf, parse);
@@ -5230,7 +5238,7 @@ trimbletsip_end(
struct parseunit *parse
)
{ trimble_t *t = parse->localdata;
-
+
if (t)
{
free(t);
@@ -5261,9 +5269,9 @@ trimbletsip_init(
if (!parse->localdata)
{
trimble_t *t;
-
+
t = (trimble_t *)(parse->localdata = emalloc(sizeof(trimble_t)));
-
+
if (t)
{
memset((char *)t, 0, sizeof(trimble_t));
@@ -5343,7 +5351,7 @@ getflt(
)
{
union uval uval;
-
+
#ifdef WORDS_BIGENDIAN
uval.bd[0] = *bp++;
uval.bd[1] = *bp++;
@@ -5364,7 +5372,7 @@ getdbl(
)
{
union uval uval;
-
+
#ifdef WORDS_BIGENDIAN
uval.bd[0] = *bp++;
uval.bd[1] = *bp++;
@@ -5392,7 +5400,7 @@ getshort(
unsigned char *p
)
{
- return get_msb_short(&p);
+ return (int) get_msb_short(&p);
}
/*--------------------------------------------------
@@ -5409,7 +5417,7 @@ trimbletsip_message(
{
unsigned char *buffer = parsetime->parse_msg;
unsigned int size = parsetime->parse_msglen;
-
+
if ((size < 4) ||
(buffer[0] != DLE) ||
(buffer[size-1] != ETX) ||
@@ -5431,13 +5439,13 @@ trimbletsip_message(
}
else
{
- int var_flag;
+ u_short var_flag;
trimble_t *tr = parse->localdata;
unsigned int cmd = buffer[1];
char pbuffer[200];
char *t = pbuffer;
cmd_info_t *s;
-
+
#ifdef DEBUG
if (debug > 3) {
size_t i;
@@ -5453,9 +5461,9 @@ trimbletsip_message(
if (tr)
tr->last_msg = current_time;
-
+
s = trimble_convert(cmd, trimble_rcmds);
-
+
if (s)
{
t = ap(pbuffer, sizeof(pbuffer), t, "%s=\"", s->varname);
@@ -5466,7 +5474,7 @@ trimbletsip_message(
return;
}
- var_flag = s->varmode;
+ var_flag = (u_short) s->varmode;
switch(cmd)
{
@@ -5475,7 +5483,7 @@ trimbletsip_message(
getflt((unsigned char *)&mb(0)), getshort((unsigned char *)&mb(4)),
getflt((unsigned char *)&mb(6)));
break;
-
+
case CMD_RBEST4:
t = ap(pbuffer, sizeof(pbuffer), t, "mode: ");
switch (mb(0) & 0xF)
@@ -5488,11 +5496,11 @@ trimbletsip_message(
case 1:
t = ap(pbuffer, sizeof(pbuffer), t, "0D");
break;
-
+
case 3:
t = ap(pbuffer, sizeof(pbuffer), t, "2D");
break;
-
+
case 4:
t = ap(pbuffer, sizeof(pbuffer), t, "3D");
break;
@@ -5501,7 +5509,7 @@ trimbletsip_message(
t = ap(pbuffer, sizeof(pbuffer), t, "-MANUAL, ");
else
t = ap(pbuffer, sizeof(pbuffer), t, "-AUTO, ");
-
+
t = ap(pbuffer, sizeof(pbuffer), t, "satellites %02d %02d %02d %02d, PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f",
mb(1), mb(2), mb(3), mb(4),
getflt((unsigned char *)&mb(5)),
@@ -5510,12 +5518,12 @@ trimbletsip_message(
getflt((unsigned char *)&mb(17)));
break;
-
+
case CMD_RVERSION:
t = ap(pbuffer, sizeof(pbuffer), t, "%d.%d (%d/%d/%d)",
mb(0)&0xff, mb(1)&0xff, 1900+(mb(4)&0xff), mb(2)&0xff, mb(3)&0xff);
break;
-
+
case CMD_RRECVHEALTH:
{
static const char *msgs[] =
@@ -5529,9 +5537,9 @@ trimbletsip_message(
"<BIT 6>",
"<BIT 7>"
};
-
+
int i, bits;
-
+
switch (mb(0) & 0xFF)
{
default:
@@ -5564,7 +5572,7 @@ trimbletsip_message(
}
bits = mb(1) & 0xFF;
-
+
for (i = 0; i < 8; i++)
if (bits & (0x1<<i))
{
@@ -5572,11 +5580,11 @@ trimbletsip_message(
}
}
break;
-
+
case CMD_RMESSAGE:
mkreadable(t, (int)BUFFER_SIZE(pbuffer, t), (char *)&mb(0), (unsigned)(size - 2 - (&mb(0) - buffer)), 0);
break;
-
+
case CMD_RMACHSTAT:
{
static const char *msgs[] =
@@ -5590,12 +5598,12 @@ trimbletsip_message(
"<BIT 6>",
"<BIT 7>"
};
-
+
int i, bits;
t = ap(pbuffer, sizeof(pbuffer), t, "machine id 0x%02x", mb(0) & 0xFF);
bits = mb(1) & 0xFF;
-
+
for (i = 0; i < 8; i++)
if (bits & (0x1<<i))
{
@@ -5605,21 +5613,21 @@ trimbletsip_message(
t = ap(pbuffer, sizeof(pbuffer), t, ", Superpackets %ssupported", (mb(2) & 0xFF) ? "" :"un" );
}
break;
-
+
case CMD_ROPERPARAM:
t = ap(pbuffer, sizeof(pbuffer), t, "%2x %.1f %.1f %.1f %.1f",
mb(0), getflt((unsigned char *)&mb(1)), getflt((unsigned char *)&mb(5)),
getflt((unsigned char *)&mb(9)), getflt((unsigned char *)&mb(13)));
break;
-
+
case CMD_RUTCPARAM:
{
float t0t = getflt((unsigned char *)&mb(14));
- short wnt = getshort((unsigned char *)&mb(18));
- short dtls = getshort((unsigned char *)&mb(12));
- short wnlsf = getshort((unsigned char *)&mb(20));
- short dn = getshort((unsigned char *)&mb(22));
- short dtlsf = getshort((unsigned char *)&mb(24));
+ short wnt = (short) getshort((unsigned char *)&mb(18));
+ short dtls = (short) getshort((unsigned char *)&mb(12));
+ short wnlsf = (short) getshort((unsigned char *)&mb(20));
+ short dn = (short) getshort((unsigned char *)&mb(22));
+ short dtlsf = (short) getshort((unsigned char *)&mb(24));
if ((int)t0t != 0)
{
@@ -5648,14 +5656,14 @@ trimbletsip_message(
}
}
break;
-
+
case CMD_RSPOSXYZ:
{
double x = getflt((unsigned char *)&mb(0));
double y = getflt((unsigned char *)&mb(4));
double z = getflt((unsigned char *)&mb(8));
double f = getflt((unsigned char *)&mb(12));
-
+
if (f > 0.0)
t = ap(pbuffer, sizeof(pbuffer), t, "x= %.1fm, y= %.1fm, z= %.1fm, time_of_fix= %f sec",
x, y, z,
@@ -5670,7 +5678,7 @@ trimbletsip_message(
double lat = getflt((unsigned char *)&mb(0));
double lng = getflt((unsigned char *)&mb(4));
double f = getflt((unsigned char *)&mb(12));
-
+
if (f > 0.0)
t = ap(pbuffer, sizeof(pbuffer), t, "lat %f %c, long %f %c, alt %.2fm",
((lat < 0.0) ? (-lat) : (lat))*RTOD, (lat < 0.0 ? 'S' : 'N'),
@@ -5690,7 +5698,7 @@ trimbletsip_message(
x, y, z);
}
break;
-
+
case CMD_RDOUBLELLA:
{
double lat = getdbl((unsigned char *)&mb(0));
@@ -5705,7 +5713,7 @@ trimbletsip_message(
case CMD_RALLINVIEW:
{
int i, sats;
-
+
t = ap(pbuffer, sizeof(pbuffer), t, "mode: ");
switch (mb(0) & 0x7)
{
@@ -5716,7 +5724,7 @@ trimbletsip_message(
case 3:
t = ap(pbuffer, sizeof(pbuffer), t, "2D");
break;
-
+
case 4:
t = ap(pbuffer, sizeof(pbuffer), t, "3D");
break;
@@ -5725,9 +5733,9 @@ trimbletsip_message(
t = ap(pbuffer, sizeof(pbuffer), t, "-MANUAL, ");
else
t = ap(pbuffer, sizeof(pbuffer), t, "-AUTO, ");
-
+
sats = (mb(0)>>4) & 0xF;
-
+
t = ap(pbuffer, sizeof(pbuffer), t, "PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f, %d satellite%s in view: ",
getflt((unsigned char *)&mb(1)),
getflt((unsigned char *)&mb(5)),
@@ -5748,17 +5756,17 @@ trimbletsip_message(
}
}
break;
-
+
case CMD_RSTATTRACK:
{
t = ap(pbuffer, sizeof(pbuffer), t-2, "[%02d]=\"", mb(0)); /* add index to var name */
if (getflt((unsigned char *)&mb(4)) < 0.0)
{
t = ap(pbuffer, sizeof(pbuffer), t, "<NO MEASUREMENTS>");
- var_flag &= ~DEF;
+ var_flag &= (u_short)(~DEF);
}
else
- {
+ {
t = ap(pbuffer, sizeof(pbuffer), t, "ch=%d, acq=%s, eph=%d, signal_level= %5.2f, elevation= %5.2f, azimuth= %6.2f",
(mb(1) & 0xFF)>>3,
mb(2) ? ((mb(2) == 1) ? "ACQ" : "SRCH") : "NEVER",
@@ -5768,7 +5776,7 @@ trimbletsip_message(
getflt((unsigned char *)&mb(16)) * RTOD);
if (mb(20))
{
- var_flag &= ~DEF;
+ var_flag &= (u_short)(~DEF);
t = ap(pbuffer, sizeof(pbuffer), t, ", OLD");
}
if (mb(22))
@@ -5784,18 +5792,18 @@ trimbletsip_message(
}
}
break;
-
+
default:
t = ap(pbuffer, sizeof(pbuffer), t, "<UNDECODED>");
break;
}
- t = ap(pbuffer, sizeof(pbuffer), t,"\"");
+ t = ap(pbuffer, sizeof(pbuffer), t, "\"");
set_var(&parse->kv, pbuffer, sizeof(pbuffer), var_flag);
}
}
-
+
/**============================================================
** RAWDCF support
**/
diff --git a/ntpdate/Makefile.in b/ntpdate/Makefile.in
index e0e0ec2d02ea..0dcac192e7cf 100644
--- a/ntpdate/Makefile.in
+++ b/ntpdate/Makefile.in
@@ -48,8 +48,7 @@ subdir = ntpdate
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -78,6 +77,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -329,6 +330,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpdc/Makefile.in b/ntpdc/Makefile.in
index 0837bac4b93d..0bb1e30e9488 100644
--- a/ntpdc/Makefile.in
+++ b/ntpdc/Makefile.in
@@ -50,8 +50,7 @@ subdir = ntpdc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -80,6 +79,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -363,6 +364,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpdc/invoke-ntpdc.texi b/ntpdc/invoke-ntpdc.texi
index 8a9eb270d862..246e51ec8ac8 100644
--- a/ntpdc/invoke-ntpdc.texi
+++ b/ntpdc/invoke-ntpdc.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:42:41 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:26:32 AM by AutoGen 5.18.5pre4
# From the definitions ntpdc-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -76,7 +76,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p1
+ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2
Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpdc/ntpdc-opts.c b/ntpdc/ntpdc-opts.c
index 070501d00e6c..94ccea7570ac 100644
--- a/ntpdc/ntpdc-opts.c
+++ b/ntpdc/ntpdc-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed February 4, 2015 at 02:42:23 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -69,7 +69,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpdc options
*/
static char const ntpdc_opt_strs[1911] =
-/* 0 */ "ntpdc 4.2.8p1\n"
+/* 0 */ "ntpdc 4.2.8p2\n"
"Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
@@ -128,14 +128,14 @@ static char const ntpdc_opt_strs[1911] =
/* 1694 */ "no-load-opts\0"
/* 1707 */ "no\0"
/* 1710 */ "NTPDC\0"
-/* 1716 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p1\n"
+/* 1716 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
/* 1846 */ "$HOME\0"
/* 1852 */ ".\0"
/* 1854 */ ".ntprc\0"
/* 1861 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 1895 */ "\n\0"
-/* 1897 */ "ntpdc 4.2.8p1";
+/* 1897 */ "ntpdc 4.2.8p2";
/**
* ipv4 option description with
@@ -796,7 +796,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdcOptions.pzCopyright */
- puts(_("ntpdc 4.2.8p1\n\
+ puts(_("ntpdc 4.2.8p2\n\
Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
@@ -862,14 +862,14 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpdcOptions.pzUsageTitle */
- puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p1\n\
+ puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpdcOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpdcOptions.pzFullVersion */
- puts(_("ntpdc 4.2.8p1"));
+ puts(_("ntpdc 4.2.8p2"));
/* referenced via ntpdcOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpdc/ntpdc-opts.h b/ntpdc/ntpdc-opts.h
index e9a3f2c8ee8e..84763592b2f3 100644
--- a/ntpdc/ntpdc-opts.h
+++ b/ntpdc/ntpdc-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed February 4, 2015 at 02:42:23 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -83,9 +83,9 @@ typedef enum {
/** count of all options for ntpdc */
#define OPTION_CT 15
/** ntpdc version */
-#define NTPDC_VERSION "4.2.8p1"
+#define NTPDC_VERSION "4.2.8p2"
/** Full ntpdc version text */
-#define NTPDC_FULL_VERSION "ntpdc 4.2.8p1"
+#define NTPDC_FULL_VERSION "ntpdc 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpdc/ntpdc.1ntpdcman b/ntpdc/ntpdc.1ntpdcman
index 5a9e25354190..ecff16b0c8d7 100644
--- a/ntpdc/ntpdc.1ntpdcman
+++ b/ntpdc/ntpdc.1ntpdcman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc 1ntpdcman "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH ntpdc 1ntpdcman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-DnaiLq/ag-QnaaKq)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-dXaWh5/ag-rXaOg5)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:37 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:27 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/ntpdc/ntpdc.1ntpdcmdoc b/ntpdc/ntpdc.1ntpdcmdoc
index c1681b026a50..7f0c3634456e 100644
--- a/ntpdc/ntpdc.1ntpdcmdoc
+++ b/ntpdc/ntpdc.1ntpdcmdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPDC 1ntpdcmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:44 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:34 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/ntpdc/ntpdc.html b/ntpdc/ntpdc.html
index 1b6260bf1e03..37e195c4f626 100644
--- a/ntpdc/ntpdc.html
+++ b/ntpdc/ntpdc.html
@@ -36,7 +36,7 @@ display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
- <p>This document applies to version 4.2.8p1 of <code>ntpdc</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpdc</code>.
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
@@ -152,7 +152,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p1
+<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2
Usage: ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpdc/ntpdc.man.in b/ntpdc/ntpdc.man.in
index 281727e4e24b..71aa128acd6b 100644
--- a/ntpdc/ntpdc.man.in
+++ b/ntpdc/ntpdc.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc @NTPDC_MS@ "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH ntpdc @NTPDC_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-DnaiLq/ag-QnaaKq)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-dXaWh5/ag-rXaOg5)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:37 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:27 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/ntpdc/ntpdc.mdoc.in b/ntpdc/ntpdc.mdoc.in
index d6f3feb6cef1..8a89e48377cd 100644
--- a/ntpdc/ntpdc.mdoc.in
+++ b/ntpdc/ntpdc.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPDC @NTPDC_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:44 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:34 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/ntpq/Makefile.in b/ntpq/Makefile.in
index a58363ca8c7c..fad90018b761 100644
--- a/ntpq/Makefile.in
+++ b/ntpq/Makefile.in
@@ -50,8 +50,7 @@ subdir = ntpq
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -80,6 +79,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -370,6 +371,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpq/invoke-ntpq.texi b/ntpq/invoke-ntpq.texi
index 7a1b8950222b..505bb23d8c3c 100644
--- a/ntpq/invoke-ntpq.texi
+++ b/ntpq/invoke-ntpq.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:43:17 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:27:07 AM by AutoGen 5.18.5pre4
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -835,7 +835,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.8p1
+ntpq - standard NTP query program - Ver. 4.2.8p2
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpq/ntpq-opts.c b/ntpq/ntpq-opts.c
index 9c4de559130f..74f3d3d8e51a 100644
--- a/ntpq/ntpq-opts.c
+++ b/ntpq/ntpq-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed February 4, 2015 at 02:42:46 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:37 AM by AutoGen 5.18.5pre4
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -69,7 +69,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpq options
*/
static char const ntpq_opt_strs[1925] =
-/* 0 */ "ntpq 4.2.8p1\n"
+/* 0 */ "ntpq 4.2.8p2\n"
"Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
@@ -129,13 +129,13 @@ static char const ntpq_opt_strs[1925] =
/* 1723 */ "no-load-opts\0"
/* 1736 */ "no\0"
/* 1739 */ "NTPQ\0"
-/* 1744 */ "ntpq - standard NTP query program - Ver. 4.2.8p1\n"
+/* 1744 */ "ntpq - standard NTP query program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
/* 1863 */ "$HOME\0"
/* 1869 */ ".\0"
/* 1871 */ ".ntprc\0"
/* 1878 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1912 */ "ntpq 4.2.8p1";
+/* 1912 */ "ntpq 4.2.8p2";
/**
* ipv4 option description with
@@ -786,7 +786,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpqOptions.pzCopyright */
- puts(_("ntpq 4.2.8p1\n\
+ puts(_("ntpq 4.2.8p2\n\
Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
@@ -852,11 +852,11 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpqOptions.pzUsageTitle */
- puts(_("ntpq - standard NTP query program - Ver. 4.2.8p1\n\
+ puts(_("ntpq - standard NTP query program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */
- puts(_("ntpq 4.2.8p1"));
+ puts(_("ntpq 4.2.8p2"));
/* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpq/ntpq-opts.h b/ntpq/ntpq-opts.h
index 0dfe3dd6e734..43301b9a69f5 100644
--- a/ntpq/ntpq-opts.h
+++ b/ntpq/ntpq-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed February 4, 2015 at 02:42:46 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:37 AM by AutoGen 5.18.5pre4
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -83,9 +83,9 @@ typedef enum {
/** count of all options for ntpq */
#define OPTION_CT 15
/** ntpq version */
-#define NTPQ_VERSION "4.2.8p1"
+#define NTPQ_VERSION "4.2.8p2"
/** Full ntpq version text */
-#define NTPQ_FULL_VERSION "ntpq 4.2.8p1"
+#define NTPQ_FULL_VERSION "ntpq 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c
index 56bc2280223f..8bd4fdbbcf4e 100644
--- a/ntpq/ntpq-subs.c
+++ b/ntpq/ntpq-subs.c
@@ -330,7 +330,7 @@ typedef struct var_display_collection_tag {
l_fp lfp; /* NTP_LFP */
} v; /* retrieved value */
} vdc;
-#if !defined(MISSING_C99_STYLE_INIT)
+#if !defined(MISSING_C99_STRUCT_INIT)
# define VDC_INIT(a, b, c) { .tag = a, .display = b, .type = c }
#else
# define VDC_INIT(a, b, c) { a, b, c }
diff --git a/ntpq/ntpq.1ntpqman b/ntpq/ntpq.1ntpqman
index a92f61ec3d7f..444a91f4e9a2 100644
--- a/ntpq/ntpq.1ntpqman
+++ b/ntpq/ntpq.1ntpqman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH ntpq 1ntpqman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-oaaWVr/ag-CaaOUr)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-SOays6/ag-4Oaqr6)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:13 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:03 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/ntpq/ntpq.1ntpqmdoc b/ntpq/ntpq.1ntpqmdoc
index c55a5329c788..d28b09eadbde 100644
--- a/ntpq/ntpq.1ntpqmdoc
+++ b/ntpq/ntpq.1ntpqmdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPQ 1ntpqmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:19 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:09 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/ntpq/ntpq.html b/ntpq/ntpq.html
index 757dd2baa338..5d7a8f3c54bd 100644
--- a/ntpq/ntpq.html
+++ b/ntpq/ntpq.html
@@ -44,7 +44,7 @@ monitor the operational status
and determine the performance of
<code>ntpd</code>, the NTP daemon.
- <p>This document applies to version 4.2.8p1 of <code>ntpq</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpq</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
@@ -759,7 +759,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p1-RC2
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p2-RC3
Usage: ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpq/ntpq.man.in b/ntpq/ntpq.man.in
index f6d28cc95241..c5b9fb560a3e 100644
--- a/ntpq/ntpq.man.in
+++ b/ntpq/ntpq.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH ntpq @NTPQ_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-oaaWVr/ag-CaaOUr)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-SOays6/ag-4Oaqr6)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:13 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:03 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/ntpq/ntpq.mdoc.in b/ntpq/ntpq.mdoc.in
index 23fe10242d78..32224f2bb6e9 100644
--- a/ntpq/ntpq.mdoc.in
+++ b/ntpq/ntpq.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPQ @NTPQ_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:19 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:09 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/ntpsnmpd/Makefile.in b/ntpsnmpd/Makefile.in
index 2532f0782468..de2a81c80fd1 100644
--- a/ntpsnmpd/Makefile.in
+++ b/ntpsnmpd/Makefile.in
@@ -48,8 +48,7 @@ subdir = ntpsnmpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -78,6 +77,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -358,6 +359,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpsnmpd/invoke-ntpsnmpd.texi b/ntpsnmpd/invoke-ntpsnmpd.texi
index 513d70cfc965..addadab55bd0 100644
--- a/ntpsnmpd/invoke-ntpsnmpd.texi
+++ b/ntpsnmpd/invoke-ntpsnmpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsnmpd.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:43:32 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:27:22 AM by AutoGen 5.18.5pre4
# From the definitions ntpsnmpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -47,7 +47,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p1
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p2
Usage: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-n no nofork Do not fork
diff --git a/ntpsnmpd/ntpsnmpd-opts.c b/ntpsnmpd/ntpsnmpd-opts.c
index 0f8622e7aa5f..7e0d34ce7454 100644
--- a/ntpsnmpd/ntpsnmpd-opts.c
+++ b/ntpsnmpd/ntpsnmpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
*
- * It has been AutoGen-ed February 4, 2015 at 02:43:22 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:27:12 AM by AutoGen 5.18.5pre4
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
@@ -61,7 +61,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpsnmpd options
*/
static char const ntpsnmpd_opt_strs[1610] =
-/* 0 */ "ntpsnmpd 4.2.8p1\n"
+/* 0 */ "ntpsnmpd 4.2.8p2\n"
"Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
@@ -101,14 +101,14 @@ static char const ntpsnmpd_opt_strs[1610] =
/* 1414 */ "no-load-opts\0"
/* 1427 */ "no\0"
/* 1430 */ "NTPSNMPD\0"
-/* 1439 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p1\n"
+/* 1439 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
/* 1542 */ "$HOME\0"
/* 1548 */ ".\0"
/* 1550 */ ".ntprc\0"
/* 1557 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 1591 */ "\n\0"
-/* 1593 */ "ntpsnmpd 4.2.8p1";
+/* 1593 */ "ntpsnmpd 4.2.8p2";
/**
* nofork option description:
@@ -554,7 +554,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpsnmpdOptions.pzCopyright */
- puts(_("ntpsnmpd 4.2.8p1\n\
+ puts(_("ntpsnmpd 4.2.8p2\n\
Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
@@ -599,14 +599,14 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpsnmpdOptions.pzUsageTitle */
- puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p1\n\
+ puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntpsnmpdOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpsnmpdOptions.pzFullVersion */
- puts(_("ntpsnmpd 4.2.8p1"));
+ puts(_("ntpsnmpd 4.2.8p2"));
/* referenced via ntpsnmpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpsnmpd/ntpsnmpd-opts.h b/ntpsnmpd/ntpsnmpd-opts.h
index 9b9204133ecf..54696153edee 100644
--- a/ntpsnmpd/ntpsnmpd-opts.h
+++ b/ntpsnmpd/ntpsnmpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
*
- * It has been AutoGen-ed February 4, 2015 at 02:43:21 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:27:12 AM by AutoGen 5.18.5pre4
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
@@ -76,9 +76,9 @@ typedef enum {
/** count of all options for ntpsnmpd */
#define OPTION_CT 8
/** ntpsnmpd version */
-#define NTPSNMPD_VERSION "4.2.8p1"
+#define NTPSNMPD_VERSION "4.2.8p2"
/** Full ntpsnmpd version text */
-#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p1"
+#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpsnmpd/ntpsnmpd.1ntpsnmpdman b/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
index 1c44243be1a3..9724e26e3519 100644
--- a/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
+++ b/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd 1ntpsnmpdman "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH ntpsnmpd 1ntpsnmpdman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-T1aO3s/ag-51aG2s)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-wFai4a/ag-JFaa3a)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:29 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:19 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc b/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
index 9374142cb83e..7326bee98960 100644
--- a/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
+++ b/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPSNMPD 1ntpsnmpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:34 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:25 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/ntpsnmpd/ntpsnmpd.html b/ntpsnmpd/ntpsnmpd.html
index 983b6dee87aa..9d570bb6b046 100644
--- a/ntpsnmpd/ntpsnmpd.html
+++ b/ntpsnmpd/ntpsnmpd.html
@@ -42,7 +42,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>The <code>ntpsnmpd</code> utility program is used to monitor NTP daemon <code>ntpd</code>
operations and determine performance. It uses the standard NTP mode 6 control
- <p>This document applies to version 4.2.8p1 of <code>ntpsnmpd</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpsnmpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpsnmpd-Description">ntpsnmpd Description</a>: Description
diff --git a/ntpsnmpd/ntpsnmpd.man.in b/ntpsnmpd/ntpsnmpd.man.in
index f0de336492b3..15ee8a20286c 100644
--- a/ntpsnmpd/ntpsnmpd.man.in
+++ b/ntpsnmpd/ntpsnmpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd @NTPSNMPD_MS@ "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH ntpsnmpd @NTPSNMPD_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-T1aO3s/ag-51aG2s)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-wFai4a/ag-JFaa3a)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:29 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:19 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/ntpsnmpd/ntpsnmpd.mdoc.in b/ntpsnmpd/ntpsnmpd.mdoc.in
index d8d183d63657..5bf8bb998e7b 100644
--- a/ntpsnmpd/ntpsnmpd.mdoc.in
+++ b/ntpsnmpd/ntpsnmpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPSNMPD @NTPSNMPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:34 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:25 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/packageinfo.sh b/packageinfo.sh
index f3b727e61a51..81106fe40be6 100644
--- a/packageinfo.sh
+++ b/packageinfo.sh
@@ -41,7 +41,7 @@
# To see what UpdatePoint will do without modifying packageinfo.sh as it
# does by default, use the -t/--test option before the repo type:
#
-# shell# scripts/UpdatePoint -t stable
+# shell# scripts/build/UpdatePoint -t stable
#
# repotype must be stable or dev
@@ -83,7 +83,7 @@ CLTAG=NTP_4_2_0
# - Numeric values increment
# - empty 'increments' to 1
# - NEW 'increments' to empty
-point=1
+point=2
### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint)
diff --git a/parseutil/Makefile.in b/parseutil/Makefile.in
index e741a93e1a02..999f4f1cc0fd 100644
--- a/parseutil/Makefile.in
+++ b/parseutil/Makefile.in
@@ -41,8 +41,7 @@ subdir = parseutil
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -71,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -324,6 +325,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/parseutil/dcfd.c b/parseutil/dcfd.c
index 0db94c0be973..652b375f78d7 100644
--- a/parseutil/dcfd.c
+++ b/parseutil/dcfd.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/REPOSITORY/ntp4-dev/parseutil/dcfd.c,v 4.18 2005/10/07 22:08:18 kardel RELEASE_20051008_A
- *
+ *
* dcfd.c,v 4.18 2005/10/07 22:08:18 kardel RELEASE_20051008_A
*
* DCF77 100/200ms pulse synchronisation daemon program (via 50Baud serial line)
@@ -14,7 +14,7 @@
* Leap second handling (at that level you should switch to NTP Version 4 - really!)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -198,7 +198,7 @@ static char skip_adjust = 1; /* discard first adjustment (bad samples) */
#define DCFB_ANNOUNCE 0x0001 /* switch time zone warning (DST switch) */
#define DCFB_DST 0x0002 /* DST in effect */
#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurrence) */
-#define DCFB_ALTERNATE 0x0008 /* alternate antenna used */
+#define DCFB_CALLBIT 0x0008 /* "call bit" used to signalize irregularities in the control facilities */
struct clocktime /* clock time broken up from time code */
{
@@ -219,9 +219,16 @@ typedef struct clocktime clocktime_t;
/*
* (usually) quick constant multiplications
*/
+#ifndef TIMES10
#define TIMES10(_X_) (((_X_) << 3) + ((_X_) << 1)) /* *8 + *2 */
+#endif
+#ifndef TIMES24
#define TIMES24(_X_) (((_X_) << 4) + ((_X_) << 3)) /* *16 + *8 */
+#endif
+#ifndef TIMES60
#define TIMES60(_X_) ((((_X_) << 4) - (_X_)) << 2) /* *(16 - 1) *4 */
+#endif
+
/*
* generic l_abs() function
*/
@@ -260,7 +267,8 @@ typedef struct clocktime clocktime_t;
* Second Contents
* 0 - 10 AM: free, FM: 0
* 11 - 14 free
- * 15 R - alternate antenna
+ * 15 R - "call bit" used to signalize irregularities in the control facilities
+ * (until 2003 indicated transmission via alternate antenna)
* 16 A1 - expect zone change (1 hour before)
* 17 - 18 Z1,Z2 - time zone
* 0 0 illegal
@@ -294,7 +302,7 @@ typedef struct clocktime clocktime_t;
* while the length is given as the difference between the start index and
* the start index of the following field.
*/
-static struct rawdcfcode
+static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@@ -361,7 +369,7 @@ static struct dcfparam
{
unsigned char onebits[60];
unsigned char zerobits[60];
-} dcfparam =
+} dcfparam =
{
"###############RADMLS1248124P124812P1248121241248112481248P", /* 'ONE' representation */
"--------------------s-------p------p----------------------p" /* 'ZERO' representation */
@@ -384,7 +392,7 @@ ext_bf(
register int i, first;
first = rawdcfcode[idx].offset;
-
+
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@@ -438,7 +446,7 @@ convert_rawdcf(
PRINTF("%-30s", "*** INCOMPLETE");
return CVT_NONE;
}
-
+
/*
* check Start and Parity bits
*/
@@ -495,7 +503,7 @@ convert_rawdcf(
clock_time->flags |= DCFB_LEAP;
if (ext_bf(buffer, DCF_R))
- clock_time->flags |= DCFB_ALTERNATE;
+ clock_time->flags |= DCFB_CALLBIT;
return CVT_OK;
}
@@ -739,7 +747,7 @@ cvt_rawdcf(
* if everything went well so far return the result of the symbolic
* conversion routine else just the accumulated errors
*/
- if (rtc != CVT_NONE)
+ if (rtc != CVT_NONE)
{
PRINTF("%-30s", "*** BAD DATA");
}
@@ -758,13 +766,13 @@ dcf_to_unixtime(
)
{
#define SETRTC(_X_) { if (cvtrtc) *cvtrtc = (_X_); }
- static int days_of_month[] =
+ static int days_of_month[] =
{
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
register int i;
time_t t;
-
+
/*
* map 2 digit years to 19xx (DCF77 is a 20th century item)
*/
@@ -847,7 +855,7 @@ dcf_to_unixtime(
*/
t = TIMES60(t) + clock_time->minute;
/* sec */
-
+
/*
* calculate UTC in minutes
*/
@@ -1247,7 +1255,7 @@ usage(
*/
static int
check_y2k( void )
-{
+{
int year; /* current working year */
int year0 = 1900; /* sarting year for NTP time */
int yearend; /* ending year we test for NTP time.
@@ -1306,7 +1314,7 @@ check_y2k( void )
* *a minor difference to arg2 type */
if ( ct.year != year )
{
- fprintf( stdout,
+ fprintf( stdout,
"%04d: dcf_to_unixtime(,%d) CORRUPTED ct.year: was %d\n",
(int)year, (int)Flag, (int)ct.year );
Error(year);
@@ -1316,9 +1324,9 @@ check_y2k( void )
Expected = t * 24 * 60 * 60;
if ( Observed != Expected || Flag )
{ /* time difference */
- fprintf( stdout,
+ fprintf( stdout,
"%04d: dcf_to_unixtime(,%d) FAILURE: was=%lu s/b=%lu (%ld)\n",
- year, (int)Flag,
+ year, (int)Flag,
(unsigned long)Observed, (unsigned long)Expected,
((long)Observed - (long)Expected) );
Error(year);
@@ -1344,7 +1352,7 @@ rawdcf_init(
* Here a voltage between the DTR and the RTS line is used. Unfortunately
* the name has changed from CIOCM_DTR to TIOCM_DTR recently.
*/
-
+
#ifdef TIOCM_DTR
int sl232 = TIOCM_DTR; /* turn on DTR for power supply */
#else
@@ -1438,7 +1446,7 @@ main(
errs=1;
}
break;
-
+
case 'd':
if (ac > 1)
{
@@ -1451,8 +1459,8 @@ main(
errs=1;
}
break;
-
- case 'Y':
+
+ case 'Y':
errs=check_y2k();
exit( errs ? 1 : 0 );
@@ -1519,7 +1527,7 @@ main(
unsigned int rtc = CVT_NONE;
rawdcf_init(fd);
-
+
timeout.tv_sec = 1;
timeout.tv_usec = 500000;
@@ -1560,7 +1568,7 @@ main(
*/
if (!interactive)
detach();
-
+
/*
* get syslog() initialized
*/
@@ -1618,7 +1626,7 @@ main(
it.it_interval.tv_usec = 0;
it.it_value.tv_sec = 1<<ADJINTERVAL;
it.it_value.tv_usec = 0;
-
+
if (setitimer(ITIMER_REAL, &it, (struct itimerval *)0) == -1)
{
syslog(LOG_ERR, "setitimer: %m");
@@ -1797,7 +1805,7 @@ main(
wday[clock_time.wday],
clock_time.hour, clock_time.minute, i, clock_time.day, clock_time.month,
clock_time.year,
- (clock_time.flags & DCFB_ALTERNATE) ? "R" : "_",
+ (clock_time.flags & DCFB_CALLBIT) ? "R" : "_",
(clock_time.flags & DCFB_ANNOUNCE) ? "A" : "_",
(clock_time.flags & DCFB_DST) ? "D" : "_",
(clock_time.flags & DCFB_LEAP) ? "L" : "_",
@@ -1829,7 +1837,7 @@ main(
fflush(stdout);
}
} while ((rrc == -1) && (errno == EINTR));
-
+
/*
* lost IO - sorry guys
*/
@@ -1839,7 +1847,7 @@ main(
}
closelog();
-
+
return 0;
}
diff --git a/parseutil/testdcf.c b/parseutil/testdcf.c
index c78c2424eb2f..00bf05937fab 100644
--- a/parseutil/testdcf.c
+++ b/parseutil/testdcf.c
@@ -2,11 +2,11 @@
* /src/NTP/ntp4-dev/parseutil/testdcf.c,v 4.10 2005/08/06 14:18:43 kardel RELEASE_20050806_A
*
* testdcf.c,v 4.10 2005/08/06 14:18:43 kardel RELEASE_20050806_A
- *
+ *
* simple DCF77 100/200ms pulse test program (via 50Baud serial line)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -46,10 +46,10 @@
/*
* state flags
*/
-#define DCFB_ANNOUNCE 0x0001 /* switch time zone warning (DST switch) */
-#define DCFB_DST 0x0002 /* DST in effect */
-#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurrence) */
-#define DCFB_ALTERNATE 0x0008 /* alternate antenna used */
+#define DCFB_ANNOUNCE 0x0001 /* switch time zone warning (DST switch) */
+#define DCFB_DST 0x0002 /* DST in effect */
+#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurrence) */
+#define DCFB_CALLBIT 0x0008 /* "call bit" used to signalize irregularities in the control facilities */
struct clocktime /* clock time broken up from time code */
{
@@ -102,7 +102,8 @@ static char type(unsigned int);
* Second Contents
* 0 - 10 AM: free, FM: 0
* 11 - 14 free
- * 15 R - alternate antenna
+ * 15 R - "call bit" used to signalize irregularities in the control facilities
+ * (until 2003 indicated transmission via alternate antenna)
* 16 A1 - expect zone change (1 hour before)
* 17 - 18 Z1,Z2 - time zone
* 0 0 illegal
@@ -130,7 +131,7 @@ static char type(unsigned int);
static char revision[] = "4.10";
-static struct rawdcfcode
+static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@@ -185,7 +186,7 @@ ext_bf(
register int i, first;
first = rawdcfcode[idx].offset;
-
+
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@@ -223,7 +224,7 @@ convert_rawdcf(
printf("%-30s", "*** INCOMPLETE");
return CVT_NONE;
}
-
+
/*
* check Start and Parity bits
*/
@@ -274,7 +275,7 @@ convert_rawdcf(
clock_time->flags |= DCFB_LEAP;
if (ext_bf(buffer, DCF_R))
- clock_time->flags |= DCFB_ALTERNATE;
+ clock_time->flags |= DCFB_CALLBIT;
return CVT_OK;
}
@@ -490,7 +491,7 @@ main(
wday[clock_time.wday],
(int)clock_time.hour, (int)clock_time.minute, (int)i, (int)clock_time.day, (int)clock_time.month,
(int)clock_time.year,
- (clock_time.flags & DCFB_ALTERNATE) ? "R" : "_",
+ (clock_time.flags & DCFB_CALLBIT) ? "R" : "_",
(clock_time.flags & DCFB_ANNOUNCE) ? "A" : "_",
(clock_time.flags & DCFB_DST) ? "D" : "_",
(clock_time.flags & DCFB_LEAP) ? "L" : "_"
diff --git a/ports/winnt/include/config.h b/ports/winnt/include/config.h
index 6de8857c1fed..f56df9d0b574 100644
--- a/ports/winnt/include/config.h
+++ b/ports/winnt/include/config.h
@@ -457,7 +457,7 @@ typedef unsigned long uintptr_t;
#if defined(_MSC_VER) && _MSC_VER<1800
# define MISSING_INTTYPES_H 1 /* not provided by VS2012 and earlier */
# define MISSING_STDBOOL_H 1 /* not provided by VS2012 and earlier */
-# define MISSING_C99_STYLE_INIT 1 /* see [Bug 2728] */
+# define MISSING_C99_STRUCT_INIT 1 /* see [Bug 2728] */
#else
#if defined(_MSC_VER) && _MSC_VER>=1800
/* VS2013 and above support C99 types */
diff --git a/ports/winnt/include/termios.h b/ports/winnt/include/termios.h
index 9c1cc625cd40..94331afca57e 100644
--- a/ports/winnt/include/termios.h
+++ b/ports/winnt/include/termios.h
@@ -205,7 +205,7 @@ struct termios
#define cfsetispeed(dcb, spd) (0)
extern int closeserial (int);
-extern int ioctl (int, int, int *);
+extern int ioctl (int, int, void *);
extern int tcsetattr (int, int, const struct termios *);
extern int tcgetattr (int, struct termios *);
extern int tcflush (int, int);
diff --git a/ports/winnt/libntp/arc4wrap.c b/ports/winnt/libntp/arc4wrap.c
new file mode 100644
index 000000000000..9513d154a048
--- /dev/null
+++ b/ports/winnt/libntp/arc4wrap.c
@@ -0,0 +1,84 @@
+/*
+ * arc4wrap.c - wrapper for libevent's ARCFOUR random number generator
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ * --------------------------------------------------------------------
+ * This is an inclusion wrapper for the ARCFOUR implementation in
+ * libevent. It's main usage is to enable a openSSL-free build on Win32
+ * without a full integration of libevent. This provides Win32 specific
+ * glue to make the PRNG working. Porting to POSIX should be easy, but
+ * on most POSIX systems using openSSL is no problem and falling back to
+ * using ARCFOUR instead of the openSSL PRNG is not necessary. And even
+ * if it is, there's a good chance that ARCFOUR is a system library.
+ */
+#include <config.h>
+#ifdef _WIN32
+# include <wincrypt.h>
+# include <process.h>
+#else
+# error this is currently a pure windows port
+#endif
+
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include "ntp_types.h"
+#include "ntp_stdlib.h"
+
+/* ARCFOUR implementation glue */
+/* export type is empty, since this goes into a static library*/
+#define ARC4RANDOM_EXPORT
+/* we use default uint32_t as UINT32 */
+#define ARC4RANDOM_UINT32 uint32_t
+/* do not use ARCFOUR's default includes - we gobble it all up here. */
+#define ARC4RANDOM_NO_INCLUDES
+/* And the locking. Could probably be left empty. */
+#define ARC4_LOCK_() private_lock_()
+#define ARC4_UNLOCK_() private_unlock_()
+
+/* support code */
+
+static void
+evutil_memclear_(
+ void *buf,
+ size_t len)
+{
+ memset(buf, 0, len);
+}
+
+/* locking uses a manual thread-safe ONCE pattern. There's no static
+ * initialiser pattern that can be used for critical sections, and
+ * we must make sure we do the creation exactly once on the first call.
+ */
+
+static long once_ = 0;
+static CRITICAL_SECTION csec_;
+
+static void
+private_lock_(void)
+{
+again:
+ switch (InterlockedCompareExchange(&once_, 1, 0)) {
+ case 0:
+ InitializeCriticalSection(&csec_);
+ InterlockedExchange(&once_, 2);
+ case 2:
+ EnterCriticalSection(&csec_);
+ break;
+
+ default:
+ YieldProcessor();
+ goto again;
+ }
+}
+
+static void
+private_unlock_(void)
+{
+ if (InterlockedExchangeAdd(&once_, 0) == 2)
+ LeaveCriticalSection(&csec_);
+}
+
+#pragma warning(disable : 4244)
+#include "../../../sntp/libevent/arc4random.c"
diff --git a/ports/winnt/libntp/getclock.c b/ports/winnt/libntp/getclock.c
index 68496bd53078..0fdcb69ba7e8 100644
--- a/ports/winnt/libntp/getclock.c
+++ b/ports/winnt/libntp/getclock.c
@@ -33,6 +33,8 @@ getclock(
return -1;
}
+ if (NULL == get_sys_time_as_filetime)
+ init_win_precise_time();
(*get_sys_time_as_filetime)(&uNow.ft);
/*
diff --git a/ports/winnt/libntp/termios.c b/ports/winnt/libntp/termios.c
index 3fe4e4859c01..5ac017dcd035 100644
--- a/ports/winnt/libntp/termios.c
+++ b/ports/winnt/libntp/termios.c
@@ -468,12 +468,13 @@ int
ioctl(
int fd,
int op,
- int *pi
+ void *pv
)
{
HANDLE h;
int result;
int modctl;
+ int *pi = (int *) pv;
h = (HANDLE)_get_osfhandle(fd);
diff --git a/ports/winnt/ntpd/nt_clockstuff.c b/ports/winnt/ntpd/nt_clockstuff.c
index 907c9f4ee3e0..dc2f150b726a 100644
--- a/ports/winnt/ntpd/nt_clockstuff.c
+++ b/ports/winnt/ntpd/nt_clockstuff.c
@@ -824,6 +824,10 @@ init_winnt_time(void)
msyslog(LOG_INFO, "MM timer resolution: %u..%u msec, set to %u msec",
tc.wPeriodMin, tc.wPeriodMax, wTimerRes );
+
+ /* Pause briefly before measuring the clock precision, see [Bug 2790] */
+ Sleep( 33 );
+
} else {
msyslog(LOG_ERR, "Multimedia timer unavailable");
}
diff --git a/ports/winnt/vs2005/libntp.vcproj b/ports/winnt/vs2005/libntp.vcproj
index f2d0b9e714df..fdc33744a18d 100644
--- a/ports/winnt/vs2005/libntp.vcproj
+++ b/ports/winnt/vs2005/libntp.vcproj
@@ -181,6 +181,10 @@
>
</File>
<File
+ RelativePath="..\libntp\arc4wrap.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\lib\isc\assertions.c"
>
</File>
diff --git a/ports/winnt/vs2008/libntp/libntp.vcproj b/ports/winnt/vs2008/libntp/libntp.vcproj
index 354a8ac64db2..b87d1782d206 100644
--- a/ports/winnt/vs2008/libntp/libntp.vcproj
+++ b/ports/winnt/vs2008/libntp/libntp.vcproj
@@ -193,6 +193,10 @@
>
</File>
<File
+ RelativePath="..\..\libntp\arc4wrap.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\..\lib\isc\assertions.c"
>
</File>
@@ -874,7 +878,7 @@
>
</File>
<File
- RelativePath="..\..\include\sys\time.h"
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
>
</File>
<File
@@ -882,7 +886,7 @@
>
</File>
<File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+ RelativePath="..\..\include\sys\time.h"
>
</File>
<File
diff --git a/ports/winnt/vs2013/libntp/libntp.vcxproj b/ports/winnt/vs2013/libntp/libntp.vcxproj
index 2e20c71b4ce9..1289c2d77dcf 100644
--- a/ports/winnt/vs2013/libntp/libntp.vcxproj
+++ b/ports/winnt/vs2013/libntp/libntp.vcxproj
@@ -544,6 +544,7 @@
<ClCompile Include="..\..\..\..\lib\isc\error.c" />
<ClCompile Include="..\..\..\..\lib\isc\event.c" />
<ClCompile Include="..\..\..\..\libntp\findconfig.c" />
+ <ClCompile Include="..\..\libntp\arc4wrap.c" />
<ClCompile Include="..\..\libntp\getclock.c" />
<ClCompile Include="..\..\..\..\libntp\getopt.c" />
<ClCompile Include="..\..\..\..\libntp\hextoint.c" />
diff --git a/ports/winnt/vs2013/libntp/libntp.vcxproj.filters b/ports/winnt/vs2013/libntp/libntp.vcxproj.filters
index 4eefad71149d..10596c6863af 100644
--- a/ports/winnt/vs2013/libntp/libntp.vcxproj.filters
+++ b/ports/winnt/vs2013/libntp/libntp.vcxproj.filters
@@ -317,6 +317,12 @@
<ClCompile Include="..\..\..\..\libntp\vint64ops.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ntp_crypto_rnd.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\arc4wrap.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\sntp\libopts\ag-char-map.h">
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 7ddf4247bf47..2664bef4def8 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS= \
ntpsweep \
ntptrace \
lib \
+ update-leap \
$(NULL)
man1_MANS=
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 2222f3bc5f06..c0ff722108e0 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -42,8 +42,7 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -72,6 +71,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -356,6 +357,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
@@ -422,6 +428,7 @@ SUBDIRS = \
ntpsweep \
ntptrace \
lib \
+ update-leap \
$(NULL)
man1_MANS =
diff --git a/scripts/build/Makefile.in b/scripts/build/Makefile.in
index 13e9011bd054..2f6b0260d065 100644
--- a/scripts/build/Makefile.in
+++ b/scripts/build/Makefile.in
@@ -40,8 +40,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -70,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -287,6 +288,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/calc_tickadj/Makefile.in b/scripts/calc_tickadj/Makefile.in
index 197f48460f3c..154e4a3a0493 100644
--- a/scripts/calc_tickadj/Makefile.in
+++ b/scripts/calc_tickadj/Makefile.in
@@ -42,8 +42,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -72,6 +71,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -318,6 +319,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
index 4d3ce1a18db4..e5008ccc700a 100644
--- a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
+++ b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-1GaySe/ag-cHaGRe)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_1aOBS/ag-n2aWAS)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:11 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:04 AM by AutoGen 5.18.5pre4
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
index ac992ab7a1b3..7135beb2bdba 100644
--- a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
+++ b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:14 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:08 AM by AutoGen 5.18.5pre4
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/calc_tickadj/calc_tickadj.html b/scripts/calc_tickadj/calc_tickadj.html
index 0b68e58a6247..b64096d9269e 100644
--- a/scripts/calc_tickadj/calc_tickadj.html
+++ b/scripts/calc_tickadj/calc_tickadj.html
@@ -31,7 +31,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<h2 class="unnumbered">calc_tickadj User's Manual</h2>
<p>This document describes the use of the NTP Project's <code>calc_tickadj</code> program.
-This document applies to version 4.2.8p1 of <code>calc_tickadj</code>.
+This document applies to version 4.2.8p2 of <code>calc_tickadj</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/scripts/calc_tickadj/calc_tickadj.man.in b/scripts/calc_tickadj/calc_tickadj.man.in
index 4d3ce1a18db4..e5008ccc700a 100644
--- a/scripts/calc_tickadj/calc_tickadj.man.in
+++ b/scripts/calc_tickadj/calc_tickadj.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-1GaySe/ag-cHaGRe)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_1aOBS/ag-n2aWAS)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:11 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:04 AM by AutoGen 5.18.5pre4
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/calc_tickadj/calc_tickadj.mdoc.in b/scripts/calc_tickadj/calc_tickadj.mdoc.in
index ac992ab7a1b3..7135beb2bdba 100644
--- a/scripts/calc_tickadj/calc_tickadj.mdoc.in
+++ b/scripts/calc_tickadj/calc_tickadj.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:14 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:08 AM by AutoGen 5.18.5pre4
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/calc_tickadj/invoke-calc_tickadj.texi b/scripts/calc_tickadj/invoke-calc_tickadj.texi
index 163380103dbd..c9e44b82ca93 100644
--- a/scripts/calc_tickadj/invoke-calc_tickadj.texi
+++ b/scripts/calc_tickadj/invoke-calc_tickadj.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-calc_tickadj.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:16 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:09 AM by AutoGen 5.18.5pre4
# From the definitions calc_tickadj-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
diff --git a/scripts/invoke-plot_summary.texi b/scripts/invoke-plot_summary.texi
index 6f482f844142..48ea5b48e1e7 100644
--- a/scripts/invoke-plot_summary.texi
+++ b/scripts/invoke-plot_summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:53 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:51 AM by AutoGen 5.18.5pre4
# From the definitions plot_summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -41,7 +41,7 @@ with a status code of 0.
@exampleindent 0
@example
-plot_summary - plot statistics generated by summary script - Ver. 4.2.8p1
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p2
USAGE: plot_summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Where the summary files are
diff --git a/scripts/invoke-summary.texi b/scripts/invoke-summary.texi
index cfac1b1dfb88..16fc2220a82e 100644
--- a/scripts/invoke-summary.texi
+++ b/scripts/invoke-summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-summary.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:59 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:57 AM by AutoGen 5.18.5pre4
# From the definitions summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -42,7 +42,7 @@ with a status code of 0.
@exampleindent 0
@example
-summary - compute various stastics from NTP stat files - Ver. 4.2.8p1
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p2
USAGE: summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Directory containing stat files
diff --git a/scripts/lib/Makefile.in b/scripts/lib/Makefile.in
index c1437a49d88e..2b0f097ad839 100644
--- a/scripts/lib/Makefile.in
+++ b/scripts/lib/Makefile.in
@@ -39,8 +39,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -69,6 +68,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -308,6 +309,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/lib/NTP/Util.pm b/scripts/lib/NTP/Util.pm
index 66f2453bf0cf..cd2f9e5a7a5d 100644
--- a/scripts/lib/NTP/Util.pm
+++ b/scripts/lib/NTP/Util.pm
@@ -93,18 +93,27 @@ sub do_dns {
sub ntp_peers {
my ($host) = @_;
- my $cmd = "$ntpq_path -np $host |";
+ $host ||= '';
+ my $cmd = "$ntpq_path -npw $host |";
open my $fh, $cmd or croak "Could not start ntpq: $!";
<$fh> for 1 .. 2;
- my @columns = qw(remote refid st t when poll reach delay offset jitter);
+ my @columns = qw(tally host refid st t when poll reach delay offset jitter);
my @peers;
while (<$fh>) {
- if (/(?:[\w\.\*-]+\s*){10}/) {
+ if (/^([ x+#*o-])((?:[\w.*:-]+\s+){10}|([\w.*:-]+\s+))$/) {
my $col = 0;
- push @peers, { map {; $columns[ $col++ ] => $_ } split /(?<=.)\s+/ };
+ my @line = ($1, split /\s+/, $2);
+ if( @line == 2 ) {
+ defined ($_ = <$fh>) or last;
+ s/^\s+//;
+ push @line, split /\s+/;
+ }
+ my $r = { map {; $columns[ $col++ ] => $_ } @line };
+ $r->{remote} = $r->{tally} . $r->{host};
+ push @peers, $r;
}
else {
#TODO return error (but not needed anywhere now)
@@ -135,3 +144,5 @@ sub ntp_sntp_line {
close $fh or croak "running sntp failed: $! (exit status $?)";
return ($offset, $stratum);
}
+
+1;
diff --git a/scripts/ntp-wait/Makefile.in b/scripts/ntp-wait/Makefile.in
index 4b2c58f2521e..a18414da0912 100644
--- a/scripts/ntp-wait/Makefile.in
+++ b/scripts/ntp-wait/Makefile.in
@@ -41,8 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -71,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -317,6 +318,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/ntp-wait/invoke-ntp-wait.texi b/scripts/ntp-wait/invoke-ntp-wait.texi
index 19f3953f7dc3..9053e8af9f54 100644
--- a/scripts/ntp-wait/invoke-ntp-wait.texi
+++ b/scripts/ntp-wait/invoke-ntp-wait.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-wait.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:23 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:17 AM by AutoGen 5.18.5pre4
# From the definitions ntp-wait-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -61,7 +61,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p1
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p2
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/scripts/ntp-wait/ntp-wait-opts b/scripts/ntp-wait/ntp-wait-opts
index b8f832585f24..ff99fe57db35 100644
--- a/scripts/ntp-wait/ntp-wait-opts
+++ b/scripts/ntp-wait/ntp-wait-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntp-wait-opts)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:18 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:11 AM by AutoGen 5.18.5pre4
# From the definitions ntp-wait-opts.def
# and the template file perlopt
@@ -40,7 +40,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p1
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p2
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/scripts/ntp-wait/ntp-wait.1ntp-waitman b/scripts/ntp-wait/ntp-wait.1ntp-waitman
index 4d41ede4a259..65a97fd18c27 100644
--- a/scripts/ntp-wait/ntp-wait.1ntp-waitman
+++ b/scripts/ntp-wait/ntp-wait.1ntp-waitman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait 1ntp-waitman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH ntp-wait 1ntp-waitman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-yXaGgg/ag-LXaOfg)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-CkaW1T/ag-Oka40T)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:20 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:13 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc b/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
index 9720e45a43fe..1340e5a22203 100644
--- a/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
+++ b/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTP_WAIT 1ntp-waitmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:26 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:20 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntp-wait/ntp-wait.html b/scripts/ntp-wait/ntp-wait.html
index 01840fde5649..7cc8b992a1bf 100644
--- a/scripts/ntp-wait/ntp-wait.html
+++ b/scripts/ntp-wait/ntp-wait.html
@@ -39,7 +39,7 @@ until the system's time has stabilized and synchronized,
and only then start any applicaitons (like database servers) that require
accurate and stable time.
- <p>This document applies to version 4.2.8p1 of <code>ntp-wait</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp-wait</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -114,7 +114,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p1
+<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p2
USAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/scripts/ntp-wait/ntp-wait.man.in b/scripts/ntp-wait/ntp-wait.man.in
index 8d569c0cd4a5..a4edec4dc6e2 100644
--- a/scripts/ntp-wait/ntp-wait.man.in
+++ b/scripts/ntp-wait/ntp-wait.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait @NTP_WAIT_MS@ "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH ntp-wait @NTP_WAIT_MS@ "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-yXaGgg/ag-LXaOfg)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-CkaW1T/ag-Oka40T)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:20 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:13 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntp-wait/ntp-wait.mdoc.in b/scripts/ntp-wait/ntp-wait.mdoc.in
index 43514a03017b..c61340d0528b 100644
--- a/scripts/ntp-wait/ntp-wait.mdoc.in
+++ b/scripts/ntp-wait/ntp-wait.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTP_WAIT @NTP_WAIT_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:26 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:20 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntpsweep/Makefile.in b/scripts/ntpsweep/Makefile.in
index e0d1dc6eb881..38af36a85869 100644
--- a/scripts/ntpsweep/Makefile.in
+++ b/scripts/ntpsweep/Makefile.in
@@ -41,8 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -71,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -318,6 +319,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/ntpsweep/invoke-ntpsweep.texi b/scripts/ntpsweep/invoke-ntpsweep.texi
index fef89ae402ad..207577a436d7 100644
--- a/scripts/ntpsweep/invoke-ntpsweep.texi
+++ b/scripts/ntpsweep/invoke-ntpsweep.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:33 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:23 AM by AutoGen 5.18.5pre4
# From the definitions ntpsweep-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -45,7 +45,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p1
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p2
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/scripts/ntpsweep/ntpsweep-opts b/scripts/ntpsweep/ntpsweep-opts
index cacc78bc13df..b833b08dca4d 100644
--- a/scripts/ntpsweep/ntpsweep-opts
+++ b/scripts/ntpsweep/ntpsweep-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntpsweep-opts)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:31 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:21 AM by AutoGen 5.18.5pre4
# From the definitions ntpsweep-opts.def
# and the template file perlopt
@@ -43,7 +43,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p1
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p2
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/scripts/ntpsweep/ntpsweep.1ntpsweepman b/scripts/ntpsweep/ntpsweep.1ntpsweepman
index 624884435584..9ba96830b845 100644
--- a/scripts/ntpsweep/ntpsweep.1ntpsweepman
+++ b/scripts/ntpsweep/ntpsweep.1ntpsweepman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH ntpsweep 1ntpsweepman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-8JaOIh/ag-jKaWHh)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-pka4rV/ag-CkaarV)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:35 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:25 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc b/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
index d51cd4540d88..d933c83a1d0f 100644
--- a/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
+++ b/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:39 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:29 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntpsweep/ntpsweep.html b/scripts/ntpsweep/ntpsweep.html
index 453899bd72e2..1fc5f54b39a7 100644
--- a/scripts/ntpsweep/ntpsweep.html
+++ b/scripts/ntpsweep/ntpsweep.html
@@ -30,7 +30,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the use of the NTP Project's <code>ntpsweep</code> program.
- <p>This document applies to version 4.2.8p1 of <code>ntpsweep</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpsweep</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -90,7 +90,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p1
+<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p2
USAGE: ntpsweep [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/scripts/ntpsweep/ntpsweep.man.in b/scripts/ntpsweep/ntpsweep.man.in
index 624884435584..9ba96830b845 100644
--- a/scripts/ntpsweep/ntpsweep.man.in
+++ b/scripts/ntpsweep/ntpsweep.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH ntpsweep 1ntpsweepman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-8JaOIh/ag-jKaWHh)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-pka4rV/ag-CkaarV)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:35 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:25 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntpsweep/ntpsweep.mdoc.in b/scripts/ntpsweep/ntpsweep.mdoc.in
index d51cd4540d88..d933c83a1d0f 100644
--- a/scripts/ntpsweep/ntpsweep.mdoc.in
+++ b/scripts/ntpsweep/ntpsweep.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:39 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:29 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntptrace/Makefile.in b/scripts/ntptrace/Makefile.in
index f123f16dd267..8d7db402d832 100644
--- a/scripts/ntptrace/Makefile.in
+++ b/scripts/ntptrace/Makefile.in
@@ -41,8 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -71,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -317,6 +318,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/ntptrace/invoke-ntptrace.texi b/scripts/ntptrace/invoke-ntptrace.texi
index b3792dd0cddb..58548c11e748 100644
--- a/scripts/ntptrace/invoke-ntptrace.texi
+++ b/scripts/ntptrace/invoke-ntptrace.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:46 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:36 AM by AutoGen 5.18.5pre4
# From the definitions ntptrace-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -62,7 +62,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntptrace - Trace peers of an NTP server - Ver. 4.2.8p1
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p2
USAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/scripts/ntptrace/ntptrace-opts b/scripts/ntptrace/ntptrace-opts
index 7bbdeb3532eb..3012392b38ac 100644
--- a/scripts/ntptrace/ntptrace-opts
+++ b/scripts/ntptrace/ntptrace-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntptrace-opts)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:40 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:31 AM by AutoGen 5.18.5pre4
# From the definitions ntptrace-opts.def
# and the template file perlopt
@@ -40,7 +40,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntptrace - Trace peers of an NTP server - Ver. 4.2.8p1
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p2
USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/scripts/ntptrace/ntptrace.1ntptraceman b/scripts/ntptrace/ntptrace.1ntptraceman
index 82bc037e86c6..ff02de0e6279 100644
--- a/scripts/ntptrace/ntptrace.1ntptraceman
+++ b/scripts/ntptrace/ntptrace.1ntptraceman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace 1ntptraceman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH ntptrace 1ntptraceman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-nrai1i/ag-Araq0i)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-j_aqKW/ag-w_ayJW)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:42 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:33 AM by AutoGen 5.18.5pre4
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntptrace/ntptrace.1ntptracemdoc b/scripts/ntptrace/ntptrace.1ntptracemdoc
index 5528eea74a12..352b659931ae 100644
--- a/scripts/ntptrace/ntptrace.1ntptracemdoc
+++ b/scripts/ntptrace/ntptrace.1ntptracemdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPTRACE 1ntptracemdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:48 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:38 AM by AutoGen 5.18.5pre4
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntptrace/ntptrace.html b/scripts/ntptrace/ntptrace.html
index 291b9e91d6fe..86e1a9b4684a 100644
--- a/scripts/ntptrace/ntptrace.html
+++ b/scripts/ntptrace/ntptrace.html
@@ -31,7 +31,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
<p>This document describes the use of the NTP Project's <code>ntptrace</code> program.
-This document applies to version 4.2.8p1 of <code>ntptrace</code>.
+This document applies to version 4.2.8p2 of <code>ntptrace</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -107,7 +107,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p1
+<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p2
USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/scripts/ntptrace/ntptrace.man.in b/scripts/ntptrace/ntptrace.man.in
index c30859799753..f48a071b56d8 100644
--- a/scripts/ntptrace/ntptrace.man.in
+++ b/scripts/ntptrace/ntptrace.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace @NTPTRACE_MS@ "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH ntptrace @NTPTRACE_MS@ "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-nrai1i/ag-Araq0i)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-j_aqKW/ag-w_ayJW)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:42 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:33 AM by AutoGen 5.18.5pre4
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntptrace/ntptrace.mdoc.in b/scripts/ntptrace/ntptrace.mdoc.in
index c8fffcf1381f..c06e718c02b5 100644
--- a/scripts/ntptrace/ntptrace.mdoc.in
+++ b/scripts/ntptrace/ntptrace.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTPTRACE @NTPTRACE_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:48 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:38 AM by AutoGen 5.18.5pre4
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/plot_summary-opts b/scripts/plot_summary-opts
index ed27025d829f..3f0389098652 100644
--- a/scripts/plot_summary-opts
+++ b/scripts/plot_summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (plot_summary-opts)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:49 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:47 AM by AutoGen 5.18.5pre4
# From the definitions plot_summary-opts.def
# and the template file perlopt
@@ -46,7 +46,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-plot_summary - plot statistics generated by summary script - Ver. 4.2.8p1
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p2
USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Where the summary files are
diff --git a/scripts/plot_summary.1plot_summaryman b/scripts/plot_summary.1plot_summaryman
index dd3d842128ee..03dc6c54ed8a 100644
--- a/scripts/plot_summary.1plot_summaryman
+++ b/scripts/plot_summary.1plot_summaryman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH plot_summary 1plot_summaryman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-GxaG3k/ag-VxaO2k)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-48aGzZ/ag-f9aOyZ)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:55 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:53 AM by AutoGen 5.18.5pre4
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/plot_summary.1plot_summarymdoc b/scripts/plot_summary.1plot_summarymdoc
index 1d6ba70c415c..4d7f49228982 100644
--- a/scripts/plot_summary.1plot_summarymdoc
+++ b/scripts/plot_summary.1plot_summarymdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:57 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:55 AM by AutoGen 5.18.5pre4
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/plot_summary.html b/scripts/plot_summary.html
index d4a023539b57..b2fbc66cf6d7 100644
--- a/scripts/plot_summary.html
+++ b/scripts/plot_summary.html
@@ -31,7 +31,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<h2 class="unnumbered">Plot_summary User Manual</h2>
<p>This document describes the use of the NTP Project's <code>plot_summary</code> program.
-This document applies to version 4.2.8p1 of <code>plot_summary</code>.
+This document applies to version 4.2.8p2 of <code>plot_summary</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -89,7 +89,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p1
+<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p2
USAGE: plot_summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
--directory=str Where the summary files are
diff --git a/scripts/plot_summary.man.in b/scripts/plot_summary.man.in
index dd3d842128ee..03dc6c54ed8a 100644
--- a/scripts/plot_summary.man.in
+++ b/scripts/plot_summary.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH plot_summary 1plot_summaryman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-GxaG3k/ag-VxaO2k)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-48aGzZ/ag-f9aOyZ)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:55 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:53 AM by AutoGen 5.18.5pre4
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/plot_summary.mdoc.in b/scripts/plot_summary.mdoc.in
index 1d6ba70c415c..4d7f49228982 100644
--- a/scripts/plot_summary.mdoc.in
+++ b/scripts/plot_summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:37:57 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:55 AM by AutoGen 5.18.5pre4
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/summary-opts b/scripts/summary-opts
index 5f6921b5aa93..adb228dcb288 100644
--- a/scripts/summary-opts
+++ b/scripts/summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (summary-opts)
#
-# It has been AutoGen-ed February 4, 2015 at 02:37:51 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:49 AM by AutoGen 5.18.5pre4
# From the definitions summary-opts.def
# and the template file perlopt
@@ -44,7 +44,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-summary - compute various stastics from NTP stat files - Ver. 4.2.8p1
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p2
USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Directory containing stat files
diff --git a/scripts/summary.1summaryman b/scripts/summary.1summaryman
index 5f3cf6b649d8..d1eeb4898aaa 100644
--- a/scripts/summary.1summaryman
+++ b/scripts/summary.1summaryman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH summary 1summaryman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-kPaifl/ag-xPaqel)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-jpaiNZ/ag-wpaqMZ)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:38:00 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:58 AM by AutoGen 5.18.5pre4
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/summary.1summarymdoc b/scripts/summary.1summarymdoc
index 8fc7836f63f2..3c77a8cceea9 100644
--- a/scripts/summary.1summarymdoc
+++ b/scripts/summary.1summarymdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:38:02 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:22:00 AM by AutoGen 5.18.5pre4
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/summary.html b/scripts/summary.html
index 81080966e140..5326c6a6ce0f 100644
--- a/scripts/summary.html
+++ b/scripts/summary.html
@@ -31,7 +31,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<h2 class="unnumbered">Summary User Manual</h2>
<p>This document describes the use of the NTP Project's <code>summary</code> program.
-This document applies to version 4.2.8p1 of <code>summary</code>.
+This document applies to version 4.2.8p2 of <code>summary</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -88,7 +88,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p1
+<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p2
USAGE: summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
--directory=str Directory containing stat files
diff --git a/scripts/summary.man.in b/scripts/summary.man.in
index 5f3cf6b649d8..d1eeb4898aaa 100644
--- a/scripts/summary.man.in
+++ b/scripts/summary.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH summary 1summaryman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-kPaifl/ag-xPaqel)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-jpaiNZ/ag-wpaqMZ)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:38:00 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:58 AM by AutoGen 5.18.5pre4
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/summary.mdoc.in b/scripts/summary.mdoc.in
index 8fc7836f63f2..3c77a8cceea9 100644
--- a/scripts/summary.mdoc.in
+++ b/scripts/summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:38:02 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:22:00 AM by AutoGen 5.18.5pre4
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/update-leap/Makefile.am b/scripts/update-leap/Makefile.am
new file mode 100644
index 000000000000..163810233b19
--- /dev/null
+++ b/scripts/update-leap/Makefile.am
@@ -0,0 +1,97 @@
+NULL=
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS= $(UPDATE_LEAP_DB)
+sbin_SCRIPTS= $(UPDATE_LEAP_DS)
+libexec_SCRIPTS= $(UPDATE_LEAP_DL)
+noinst_SCRIPTS= $(UPDATE_LEAP_NI)
+EXTRA_SCRIPTS= update-leap
+
+man1_MANS=
+man8_MANS=
+if INSTALL_UPDATE_LEAP
+man_MANS= update-leap.$(UPDATE_LEAP_MS)
+else
+noinst_MANS= update-leap.$(UPDATE_LEAP_MS)
+endif
+
+EXTRA_DIST = \
+ invoke-update-leap.menu \
+ invoke-update-leap.texi \
+ update-leap \
+ update-leap-opts.def \
+ update-leap-opts \
+ update-leap.1update-leapman \
+ update-leap.1update-leapmdoc \
+ update-leap.man.in \
+ update-leap.mdoc.in \
+ update-leap.texi \
+ update-leap.html \
+ $(NULL)
+
+html_DATA = update-leap.html
+
+#CLEANFILES = update-leap.1
+DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS)
+
+noinst_DATA = \
+ invoke-update-leap.menu \
+ invoke-update-leap.texi \
+ update-leap.man.in \
+ update-leap.mdoc.in \
+ update-leap-opts \
+ $(NULL)
+
+$(srcdir)/update-leap: $(srcdir)/update-leap-opts
+ @: do-nothing action to avoid default SCCS get
+
+$(srcdir)/update-leap-opts: update-leap-opts.def $(std_def_list)
+ $(run_ag) update-leap-opts.def
+
+### Man
+
+$(srcdir)/update-leap.1update-leapman: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
+
+$(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapman > $(srcdir)/update-leap.man.in+
+ mv $(srcdir)/update-leap.man.in+ $(srcdir)/update-leap.man.in
+
+### Mdoc
+
+$(srcdir)/update-leap.1update-leapmdoc: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
+
+$(srcdir)/update-leap.mdoc.in: $(srcdir)/update-leap.1update-leapmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapmdoc > $(srcdir)/update-leap.mdoc.in+
+ mv $(srcdir)/update-leap.mdoc.in+ $(srcdir)/update-leap.mdoc.in
+
+### Manpage
+
+update-leap.$(UPDATE_LEAP_MS): $(srcdir)/update-leap.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=update-leap.$(UPDATE_LEAP_MS)+:$(srcdir)/update-leap.$(MANTAGFMT).in
+ mv update-leap.$(UPDATE_LEAP_MS)+ update-leap.$(UPDATE_LEAP_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-update-leap.menu: $(srcdir)/invoke-update-leap.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-update-leap.texi: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/update-leap.html: $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o update-leap.html update-leap.texi || true )
diff --git a/scripts/update-leap/Makefile.in b/scripts/update-leap/Makefile.in
new file mode 100644
index 000000000000..3ac6ac6949dd
--- /dev/null
+++ b/scripts/update-leap/Makefile.in
@@ -0,0 +1,887 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scripts/update-leap
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+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'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(noinst_SCRIPTS) \
+ $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBEVENT = @LDADD_LIBEVENT@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_LIBUTIL = @LDADD_LIBUTIL@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
+MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+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_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+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@
+NULL =
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS = $(UPDATE_LEAP_DB)
+sbin_SCRIPTS = $(UPDATE_LEAP_DS)
+libexec_SCRIPTS = $(UPDATE_LEAP_DL)
+noinst_SCRIPTS = $(UPDATE_LEAP_NI)
+EXTRA_SCRIPTS = update-leap
+man1_MANS =
+man8_MANS =
+@INSTALL_UPDATE_LEAP_TRUE@man_MANS = update-leap.$(UPDATE_LEAP_MS)
+@INSTALL_UPDATE_LEAP_FALSE@noinst_MANS = update-leap.$(UPDATE_LEAP_MS)
+EXTRA_DIST = \
+ invoke-update-leap.menu \
+ invoke-update-leap.texi \
+ update-leap \
+ update-leap-opts.def \
+ update-leap-opts \
+ update-leap.1update-leapman \
+ update-leap.1update-leapmdoc \
+ update-leap.man.in \
+ update-leap.mdoc.in \
+ update-leap.texi \
+ update-leap.html \
+ $(NULL)
+
+html_DATA = update-leap.html
+
+#CLEANFILES = update-leap.1
+DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS)
+noinst_DATA = \
+ invoke-update-leap.menu \
+ invoke-update-leap.texi \
+ update-leap.man.in \
+ update-leap.mdoc.in \
+ update-leap-opts \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( 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 scripts/update-leap/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/update-leap/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(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):
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || 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"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | 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; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$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_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || 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"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | 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; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$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_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || 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"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | 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; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$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_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; 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 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)'; 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; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[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,^[^8][0-9a-z]*$$,8,;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)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @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; \
+ 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 -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+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:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-htmlDATA \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-htmlDATA uninstall-libexecSCRIPTS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinSCRIPTS
+
+
+$(srcdir)/update-leap: $(srcdir)/update-leap-opts
+ @: do-nothing action to avoid default SCCS get
+
+$(srcdir)/update-leap-opts: update-leap-opts.def $(std_def_list)
+ $(run_ag) update-leap-opts.def
+
+### Man
+
+$(srcdir)/update-leap.1update-leapman: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
+
+$(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapman > $(srcdir)/update-leap.man.in+
+ mv $(srcdir)/update-leap.man.in+ $(srcdir)/update-leap.man.in
+
+### Mdoc
+
+$(srcdir)/update-leap.1update-leapmdoc: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
+
+$(srcdir)/update-leap.mdoc.in: $(srcdir)/update-leap.1update-leapmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapmdoc > $(srcdir)/update-leap.mdoc.in+
+ mv $(srcdir)/update-leap.mdoc.in+ $(srcdir)/update-leap.mdoc.in
+
+### Manpage
+
+update-leap.$(UPDATE_LEAP_MS): $(srcdir)/update-leap.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=update-leap.$(UPDATE_LEAP_MS)+:$(srcdir)/update-leap.$(MANTAGFMT).in
+ mv update-leap.$(UPDATE_LEAP_MS)+ update-leap.$(UPDATE_LEAP_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-update-leap.menu: $(srcdir)/invoke-update-leap.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-update-leap.texi: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/update-leap.html: $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o update-leap.html update-leap.texi || true )
+
+# 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/scripts/update-leap/invoke-update-leap.menu b/scripts/update-leap/invoke-update-leap.menu
new file mode 100644
index 000000000000..e27e34925faa
--- /dev/null
+++ b/scripts/update-leap/invoke-update-leap.menu
@@ -0,0 +1 @@
+* update-leap Invocation:: Invoking update-leap
diff --git a/scripts/update-leap/invoke-update-leap.texi b/scripts/update-leap/invoke-update-leap.texi
new file mode 100644
index 000000000000..8fc25dbe9a6d
--- /dev/null
+++ b/scripts/update-leap/invoke-update-leap.texi
@@ -0,0 +1,170 @@
+@node update-leap Invocation
+@section Invoking update-leap
+@pindex update-leap
+@cindex leap-seconds file manager/updater
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-update-leap.texi)
+#
+# It has been AutoGen-ed April 7, 2015 at 04:21:44 AM by AutoGen 5.18.5pre4
+# From the definitions update-leap-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+@code{update-leap}
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+
+Ordinarily, the file is found using the "leapfile" directive in
+@code{ntp.conf(5)}.
+However, an alternate location can be specified on the command line.
+
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+
+If the current file is acceptable, no download or restart occurs.
+
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{update-leap} program.
+
+@menu
+* update-leap usage:: update-leap help/usage (@option{--help})
+* update-leap source-url:: source-url option (-s)
+* update-leap ipv4:: ipv4 option (-4)
+* update-leap destination:: destination option (-d)
+* update-leap expiration:: expiration option (-e)
+* update-leap ntp-conf-file:: ntp-conf-file option (-f)
+* update-leap force-update:: force-update option (-F)
+* update-leap exit status:: exit status
+* update-leap Usage:: Usage
+* update-leap Authors:: Authors
+@end menu
+
+@node update-leap usage
+@subsection update-leap help/usage (@option{--help})
+@cindex update-leap help
+
+This is the automatically generated usage text for update-leap.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+/bin/bash: line 136: ./update-leap: Permission denied
+@end example
+@exampleindent 4
+
+@node update-leap source-url
+@subsection source-url option (-s)
+@cindex update-leap-source-url
+
+This is the ``the url of the master copy of the leapseconds file'' option.
+This option takes a string argument.
+Specify the URL of the master copy to download
+$LEAPSRC
+@node update-leap ipv4
+@subsection ipv4 option (-4)
+@cindex update-leap-ipv4
+
+This is the ``use only ipv4 addresses for dns name resolution'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+ipv6.
+@end itemize
+
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+@node update-leap destination
+@subsection destination option (-d)
+@cindex update-leap-destination
+
+This is the ``filename on the local system'' option.
+This option takes a string argument @file{float}.
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+@node update-leap expiration
+@subsection expiration option (-e)
+@cindex update-leap-expiration
+
+This is the ``refresh the leapfile this long before it expires'' option.
+This option takes a string argument.
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+@node update-leap ntp-conf-file
+@subsection ntp-conf-file option (-f)
+@cindex update-leap-ntp-conf-file
+
+This is the ``location of the ntp.conf file'' option.
+This option takes a string argument.
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+@node update-leap force-update
+@subsection force-update option (-F)
+@cindex update-leap-force-update
+
+This is the ``force update of the leapfile'' option.
+Force update even if current file is OK and not close to expiring.
+@node update-leap exit status
+@subsection update-leap exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
+@node update-leap Usage
+@subsection update-leap Usage
+@node update-leap Authors
+@subsection update-leap Authors
diff --git a/scripts/update-leap/update-leap b/scripts/update-leap/update-leap
new file mode 100644
index 000000000000..2dab4eca3224
--- /dev/null
+++ b/scripts/update-leap/update-leap
@@ -0,0 +1,434 @@
+#!/bin/bash
+
+# Copyright (C) 2014 Timothe Litt litt at acm dot org
+
+# This script may be freely copied, used and modified providing that
+# this notice and the copyright statement are included in all copies
+# and derivative works. No warranty is offered, and use is entirely at
+# your own risk. Bugfixes and improvements would be appreciated by the
+# author.
+
+VERSION="1.003"
+
+# leap-seconds file manager/updater
+
+# Depends on:
+# wget sed, tr, shasum, logger
+
+# ########## Default configuration ##########
+#
+# Where to get the file
+LEAPSRC="ftp://time.nist.gov/pub/leap-seconds.list"
+
+# How many times to try to download new file
+MAXTRIES=6
+INTERVAL=10
+
+# Where to find ntp config file
+NTPCONF=/etc/ntp.conf
+
+# How long before expiration to get updated file
+PREFETCH="60 days"
+
+# How to restart NTP - older NTP: service ntpd? try-restart | condrestart
+# Recent NTP checks for new file daily, so there's nothing to do
+RESTART=
+
+# Where to put temporary copy before it's validated
+TMPFILE="/tmp/leap-seconds.$$.tmp"
+
+# Syslog facility
+LOGFAC=daemon
+# ###########################################
+
+# Places to look for commands. Allows for CRON having path to
+# old utilities on embedded systems
+
+PATHLIST="/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:"
+
+REQUIREDCMDS=" wget logger tr sed shasum"
+
+SELF="`basename $0`"
+
+function displayHelp {
+ cat <<EOF
+Usage: $SELF [options] [leapfile]
+
+Verifies and if necessary, updates leap-second definition file
+
+All arguments are optional: Default (or current value) shown:
+ -s Specify the URL of the master copy to download
+ $LEAPSRC
+ -4 Use only IPv4
+ -6 Use only IPv6
+ -p 4|6
+ Prefer IPv4 or IPv6 (as specified) addresses, but use either
+ -d Specify the filename on the local system
+ $LEAPFILE
+ -e Specify how long before expiration the file is to be refreshed
+ Units are required, e.g. "-e 60 days" Note that larger values
+ imply more frequent refreshes.
+ "$PREFETCH"
+ -f Specify location of ntp.conf (used to make sure leapfile directive is
+ present and to default leapfile)
+ $NTPCONF
+ -F Force update even if current file is OK and not close to expiring.
+ -c Command to restart NTP after installing a new file
+ <none> - ntpd checks file daily
+ -r Specify number of times to retry on get failure
+ $MAXTRIES
+ -i Specify number of minutes between retries
+ $INTERVAL
+ -l Use syslog for output (Implied if CRONJOB is set)
+ -L Don't use syslog for output
+ -P Specify the syslog facility for logging
+ $LOGFAC
+ -t Name of temporary file used in validation
+ $TMPFILE
+ -q Only report errors to stdout
+ -v Verbose output
+ -z Specify path for utilities
+ $PATHLIST
+ -Z Only use system path
+
+$SELF will validate the file currently on the local system
+
+Ordinarily, the file is found using the "leapfile" directive in $NTPCONF.
+However, an alternate location can be specified on the command line.
+
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+
+If the current file is acceptable, no download or restart occurs.
+
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+
+This script depends on$REQUIREDCMDS
+
+Version $VERSION
+EOF
+ return 0
+}
+
+# Default: Use syslog for logging if running under cron
+
+SYSLOG="$CRONJOB"
+
+if [ "$1" = "--help" ]; then
+ displayHelp
+ exit 0
+fi
+
+# Parse options
+
+while getopts 46p:P:s:e:f:Fc:r:i:lLt:hqvz:Z opt; do
+ case $opt in
+ 4)
+ PROTO="-4"
+ ;;
+ 6)
+ PROTO="-6"
+ ;;
+ p)
+ if [ "$OPTARG" = '4' -o "$OPTARG" = '6' ]; then
+ PREFER="--prefer-family=IPv$OPTARG"
+ else
+ echo "Invalid -p $OPTARG" >&2
+ exit 1;
+ fi
+ ;;
+ P)
+ LOGFAC="$OPTARG"
+ ;;
+ s)
+ LEAPSRC="$OPTARG"
+ ;;
+ e)
+ PREFETCH="$OPTARG"
+ ;;
+ f)
+ NTPCONF="$OPTARG"
+ ;;
+ F)
+ FORCE="Y"
+ ;;
+ c)
+ RESTART="$OPTARG"
+ ;;
+ r)
+ MAXTRIES="$OPTARG"
+ ;;
+ i)
+ INTERVAL="$OPTARG"
+ ;;
+ t)
+ TMPFILE="$OPTARG"
+ ;;
+ l)
+ SYSLOG="y"
+ ;;
+ L)
+ SYSLOG=
+ ;;
+ h)
+ displayHelp
+ exit 0
+ ;;
+ q)
+ QUIET="Y"
+ ;;
+ v)
+ VERBOSE="Y"
+ ;;
+ z)
+ PATHLIST="$OPTARG:"
+ ;;
+ Z)
+ PATHLIST=
+ ;;
+ *)
+ echo "$SELF -h for usage" >&2
+ exit 1
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
+export PATH="$PATHLIST$PATH"
+
+# Add to path to deal with embedded systems
+#
+for P in $REQUIREDCMDS ; do
+ if >/dev/null 2>&1 which "$P" ; then
+ continue
+ fi
+ [ "$P" = "logger" ] && continue
+ echo "FATAL: missing $P command, please install"
+ exit 1
+done
+
+# Handle logging
+
+if ! LOGGER="`2>/dev/null which logger`" ; then
+ LOGGER=
+fi
+
+function log {
+ # "priority" "message"
+ #
+ # Stdout unless syslog specified or logger isn't available
+ #
+ if [ -z "$SYSLOG" -o -z "$LOGGER" ]; then
+ if [ -n "$QUIET" -a \( "$1" = "info" -o "$1" = "notice" -o "$1" = "debug" \) ]; then
+ return 0
+ fi
+ echo "`echo \"$1\" | tr a-z A-Z`: $2"
+ return 0
+ fi
+
+ # Also log to stdout if cron job && notice or higher
+ local S
+ if [ -n "$CRONJOB" -a \( "$1" != "info" \) -a \( "$1" != "debug" \) ] || [ -n "$VERBOSE" ]; then
+ S="-s"
+ fi
+ $LOGGER $S -t "$SELF[$$]" -p "$LOGFAC.$1" "$2"
+}
+
+# Verify interval
+INTERVAL=$(( $INTERVAL *1 ))
+
+# Validate a leap-seconds file checksum
+#
+# File format: (full description in files)
+# # marks comments, except:
+# #$ number : the NTP date of the last update
+# #@ number : the NTP date that the file expires
+# Date (seconds since 1900) leaps : leaps is the # of seconds to add for times >= Date
+# Date lines have comments.
+# #h hex hex hex hex hex is the SHA-1 checksum of the data & dates, excluding whitespace w/o leading zeroes
+
+function verifySHA {
+
+ if [ ! -f "$1" ]; then
+ return 1
+ fi
+
+ # Remove comments, except those that are markers for last update, expires and hash
+
+ local RAW="`sed $1 -e'/^\\([0-9]\\|#[\$@h]\)/!d' -e'/^#[\$@h]/!s/#.*\$//g'`"
+
+ # Extract just the data, removing all whitespace
+
+ local DATA="`echo \"$RAW\" | sed -e'/^#h/d' -e's/^#[\$@]//g' | tr -d '[:space:]'`"
+
+ # Compute the SHA hash of the data, removing the marker and filename
+ # Computed in binary mode, which shouldn't matter since whitespace has been removed
+ # shasum comes in several flavors; a portable one is available in Perl (with Digest::SHA)
+
+ local DSHA="`echo -n \"$DATA\" | shasum | sed -e's/[? *].*$//'`"
+
+ # Extract the file's hash. Restore any leading zeroes in hash segments.
+
+ # The sed [] includes a tab (\t) and space; #h is followed by a tab and space
+ local FSHA="`echo \"$RAW\" | sed -e'/^#h/!d' -e's/^#h//' -e's/[ ] */ 0x/g'`"
+ FSHA=`printf '%08x%08x%08x%08x%08x' $FSHA`
+
+ if [ -n "$FSHA" -a \( "$FSHA" = "$DSHA" \) ]; then
+ if [ -n "$2" ]; then
+ log "info" "Checksum of $1 validated"
+ fi
+ else
+ log "error" "Checksum of $1 is invalid:"
+ [ -z "$FSHA" ] && FSHA="(no checksum record found in file)"
+ log "error" "EXPECTED: $FSHA"
+ log "error" "COMPUTED: $DSHA"
+ return 1
+ fi
+
+ # Check the expiration date, converting NTP epoch to Unix epoch used by date
+
+ EXPIRES="`echo \"$RAW\" | sed -e'/^#@/!d' -e's/^#@//' | tr -d '[:space:]'`"
+ EXPIRES="$(($EXPIRES - 2208988800 ))"
+
+ if [ $EXPIRES -lt `date -u +%s` ]; then
+ log "notice" "File expired on `date -u -d \"Jan 1, 1970 00:00:00 +0000 + $EXPIRES seconds\"`"
+ return 2
+ fi
+
+}
+
+# Verify ntp.conf
+
+if ! [ -f "$NTPCONF" ]; then
+ log "critical" "Missing ntp configuration $NTPCONF"
+ exit 1
+fi
+
+# Parse ntp.conf for leapfile directive
+
+LEAPFILE="`sed $NTPCONF -e'/^ *leapfile *.*$/!d' -e's/^ *leapfile *//'`"
+if [ -z "$LEAPFILE" ]; then
+ log "error" "$NTPCONF does not specify a leapfile"
+fi
+
+# Allow placing the file someplace else - testing
+
+if [ -n "$1" ]; then
+ if [ "$1" != "$LEAPFILE" ]; then
+ log "notice" "Requested install to $1, but $NTPCONF specifies $LEAPFILE"
+ fi
+ LEAPFILE="$1"
+fi
+
+# Verify the current file
+# If it is missing, doesn't validate or expired
+# Or is expiring soon
+# Download a new one
+
+if [ -n "$FORCE" ] || ! verifySHA $LEAPFILE "$VERBOSE" || [ $EXPIRES -lt `date -d "NOW + $PREFETCH" +%s` ] ; then
+ TRY=0
+ while true; do
+ TRY=$(( $TRY + 1 ))
+ if [ -n "$VERBOSE" ]; then
+ log "info" "Attempting download from $LEAPSRC, try $TRY.."
+ fi
+ if wget $PROTO $PREFER -o ${TMPFILE}.log $LEAPSRC -O $TMPFILE ; then
+ log "info" "Download of $LEAPSRC succeeded"
+ if [ -n "$VERBOSE" ]; then
+ cat ${TMPFILE}.log
+ fi
+
+ if ! verifySHA $TMPFILE "$VERBOSE" ; then
+ # There is no point in retrying, as the file on the server is almost
+ # certainly corrupt.
+
+ log "warning" "Downloaded file $TMPFILE rejected -- saved for diagnosis"
+ cat ${TMPFILE}.log
+ rm -f ${TMPFILE}.log
+ exit 1
+ fi
+ rm -f ${TMPFILE}.log
+
+ # Set correct permissions on temporary file
+
+ REFFILE="$LEAPFILE"
+ if [ ! -f $LEAPFILE ]; then
+ log "notice" "$LEAPFILE was missing, creating new copy - check permissions"
+ touch $LEAPFILE
+ # Can't copy permissions from old file, copy from NTPCONF instead
+ REFFILE="$NTPCONF"
+ fi
+ chmod --reference $REFFILE $TMPFILE
+ chown --reference $REFFILE $TMPFILE
+ ( which selinuxenabled && selinuxenabled && which chcon ) >/dev/null 2>&1
+ if [ $? == 0 ] ; then
+ chcon --reference $REFFILE $TMPFILE
+ fi
+
+ # Replace current file with validated new one
+
+ if mv -f $TMPFILE $LEAPFILE ; then
+ log "notice" "Installed new $LEAPFILE from $LEAPSRC"
+ else
+ log "error" "Install $TMPFILE => $LEAPFILE failed -- saved for diagnosis"
+ exit 1
+ fi
+
+ # Restart NTP (or whatever else is specified)
+
+ if [ -n "$RESTART" ]; then
+ if [ -n "$VERBOSE" ]; then
+ log "info" "Attempting restart action: $RESTART"
+ fi
+ R="$( 2>&1 $RESTART )"
+ if [ $? -eq 0 ]; then
+ log "notice" "Restart action succeeded"
+ if [ -n "$VERBOSE" -a -n "$R" ]; then
+ log "info" "$R"
+ fi
+ else
+ log "error" "Restart action failed"
+ if [ -n "$R" ]; then
+ log "error" "$R"
+ fi
+ exit 2
+ fi
+ fi
+ exit 0
+ fi
+
+ # Failed to download. See about trying again
+
+ rm -f $TMPFILE
+ if [ $TRY -ge $MAXTRIES ]; then
+ break;
+ fi
+ if [ -n "$VERBOSE" ]; then
+ cat ${TMPFILE}.log
+ log "info" "Waiting $INTERVAL minutes before retrying..."
+ fi
+ sleep $(( $INTERVAL * 60))
+ done
+
+ # Failed and out of retries
+
+ log "warning" "Download from $LEAPSRC failed after $TRY attempts"
+ if [ -f ${TMPFILE}.log ]; then
+ cat ${TMPFILE}.log
+ rm -f ${TMPFILE}.log $TMPFILE
+ fi
+ exit 1
+fi
+log "info" "Not time to replace $LEAPFILE"
+
+exit 0
+
+# EOF \ No newline at end of file
diff --git a/scripts/update-leap/update-leap-opts b/scripts/update-leap/update-leap-opts
new file mode 100644
index 000000000000..69dba650b8c5
--- /dev/null
+++ b/scripts/update-leap/update-leap-opts
@@ -0,0 +1,72 @@
+# EDIT THIS FILE WITH CAUTION (update-leap-opts)
+#
+# It has been AutoGen-ed April 7, 2015 at 04:21:40 AM by AutoGen 5.18.5pre4
+# From the definitions update-leap-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'source-url' => '',
+ 'ipv4' => '',
+ 'destination' => '',
+ 'expiration' => '',
+ 'ntp-conf-file' => '',
+ 'force-update' => '',
+ 'dont-wait' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'source-url|s=s', 'ipv4|4', 'destination|d=f',
+ 'expiration|e=s', 'ntp-conf-file|f=s', 'force-update|F',
+ 'dont-wait',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+update-leap - leap-seconds file manager/updater - Ver. 4.2.8p2
+USAGE: update-leap [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ -s, --source-url=str The URL of the master copy of the leapseconds file
+ -4, --ipv4 Use only IPv4 addresses for DNS name resolution
+ -d, --destination=float Filename on the local system
+ -e, --expiration=str Refresh the leapfile this long before it expires
+ -f, --ntp-conf-file=str Location of the ntp.conf file
+ -F, --force-update Force update of the leapfile
+ --dont-wait Don't wait for keystroke between plots
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/update-leap/update-leap-opts.def b/scripts/update-leap/update-leap-opts.def
new file mode 100644
index 000000000000..9e73916ba119
--- /dev/null
+++ b/scripts/update-leap/update-leap-opts.def
@@ -0,0 +1,163 @@
+/* -*- Mode: Text -*- */
+autogen definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = 'update-leap';
+prog-title = 'leap-seconds file manager/updater';
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = source-url;
+ value = s;
+ arg-type = string;
+ descrip = 'The URL of the master copy of the leapseconds file';
+ doc = <<- _EndOfDoc_
+ Specify the URL of the master copy to download
+ $LEAPSRC
+ _EndOfDoc_;
+};
+flag = {
+ name = ipv4;
+ flags-cant = ipv6;
+ value = 4;
+ descrip = "Use only IPv4 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<- _EndOfDoc_
+ Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = destination;
+ value = d;
+ arg-type = string;
+ arg-name = float;
+ descrip = 'Filename on the local system';
+ doc = <<- _EndOfDoc_
+ The name to use to store the leapfile on the local system.
+ $LEAPFILE
+ _EndOfDoc_;
+};
+
+flag = {
+ name = expiration;
+ value = e;
+ arg-type = string;
+ descrip = 'Refresh the leapfile this long before it expires';
+ doc = <<- _EndOfDoc_
+ Specify how long before expiration the file is to be refreshed
+ Units are required, e.g. "-e 60 days" Note that larger values
+ imply more frequent refreshes.
+ "$PREFETCH"
+ _EndOfDoc_;
+};
+
+flag = {
+ name = ntp-conf-file;
+ value = f;
+ arg-type = string;
+ descrip = 'Location of the ntp.conf file';
+ doc = <<- _EndOfDoc_
+ Specify location of ntp.conf (used to make sure leapfile directive is
+ present and to default leapfile)
+ /etc/ntp.conf
+ _EndOfDoc_;
+};
+
+flag = {
+ name = force-update;
+ value = F;
+ descrip = 'Force update of the leapfile';
+ doc = <<- _EndOfDoc_
+ Force update even if current file is OK and not close to expiring.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = dont-wait;
+ descrip = "Don't wait for keystroke between plots";
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
+
+/* explain: Additional information whenever the usage routine is invoked */
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+.Nm
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+.Pp
+Ordinarily, the file is found using the "leapfile" directive in
+.Xr ntp.conf 5 .
+However, an alternate location can be specified on the command line.
+.Pp
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.Pp
+If the current file is acceptable, no download or restart occurs.
+.Pp
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+ _END_PROG_MDOC_DESCRIP;
+};
+
+
+doc-section = {
+ ds-type = 'USAGE';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_USAGE
+
+Usage stuff
+
+ _END_MDOC_USAGE;
+};
+
+doc-section = {
+ ds-type = 'AUTHORS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_AUTHORS
+.An "Timothe Litt"
+ _END_MDOC_AUTHORS;
+};
diff --git a/scripts/update-leap/update-leap.1update-leapman b/scripts/update-leap/update-leap.1update-leapman
new file mode 100644
index 000000000000..a16434777fd3
--- /dev/null
+++ b/scripts/update-leap/update-leap.1update-leapman
@@ -0,0 +1,169 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH update-leap 1update-leapman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E0ayAX/ag-R0aGzX)
+.\"
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:40 AM by AutoGen 5.18.5pre4
+.\" From the definitions update-leap-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]update-leap\fP
+\- leap-seconds file manager/updater
+.SH SYNOPSIS
+\f\*[B-Font]update-leap\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]update-leap\fP
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+.sp \n(Ppu
+.ne 2
+
+Ordinarily, the file is found using the "leapfile" directive in
+\fCntp.conf\fR(5)\f[].
+However, an alternate location can be specified on the command line.
+.sp \n(Ppu
+.ne 2
+
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.sp \n(Ppu
+.ne 2
+
+If the current file is acceptable, no download or restart occurs.
+.sp \n(Ppu
+.ne 2
+
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-source\-url\f[]=\f\*[I-Font]string\f[]
+The URL of the master copy of the leapseconds file.
+.sp
+Specify the URL of the master copy to download
+$LEAPSRC
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Use only IPv4 addresses for DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+.TP
+.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]float\f[], \f\*[B-Font]\-\-destination\f[]=\f\*[I-Font]float\f[]
+Filename on the local system.
+.sp
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+.TP
+.NOP \f\*[B-Font]\-e\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-expiration\f[]=\f\*[I-Font]string\f[]
+Refresh the leapfile this long before it expires.
+.sp
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+.TP
+.NOP \f\*[B-Font]\-f\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-ntp\-conf\-file\f[]=\f\*[I-Font]string\f[]
+Location of the ntp.conf file.
+.sp
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+.TP
+.NOP \f\*[B-Font]\-F\f[], \f\*[B-Font]\-\-force\-update\f[]
+Force update of the leapfile.
+.sp
+Force update even if current file is OK and not close to expiring.
+.TP
+.NOP \f\*[B-Font]\-\-dont\-wait\f[]
+Don't wait for keystroke between plots.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH USAGE
+Usage stuff
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Timothe Litt"
+.br
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBupdate-leap\fP
+option definitions.
diff --git a/scripts/update-leap/update-leap.1update-leapmdoc b/scripts/update-leap/update-leap.1update-leapmdoc
new file mode 100644
index 000000000000..9fb3a1201334
--- /dev/null
+++ b/scripts/update-leap/update-leap.1update-leapmdoc
@@ -0,0 +1,134 @@
+.Dd April 7 2015
+.Dt UPDATE_LEAP 1update-leapmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:46 AM by AutoGen 5.18.5pre4
+.\" From the definitions update-leap-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm update-leap
+.Nd leap-seconds file manager/updater
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+will validate the file currently on the local system
+and if necessary, updates leap\-second definition file.
+.Pp
+Ordinarily, the file is found using the "leapfile" directive in
+.Xr ntp.conf 5 .
+However, an alternate location can be specified on the command line.
+.Pp
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.Pp
+If the current file is acceptable, no download or restart occurs.
+.Pp
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron\-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl s Ar string , Fl \-source\-url Ns = Ns Ar string
+The URL of the master copy of the leapseconds file.
+.sp
+Specify the URL of the master copy to download
+$LEAPSRC
+.It Fl 4 , Fl \-ipv4
+Use only IPv4 addresses for DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = ipv6;
+ flags\-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<\- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = prefer;
+ flags\-cant = ipv4, ipv6;
+ value = p;
+ arg\-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<\- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+.It Fl d Ar float , Fl \-destination Ns = Ns Ar float
+Filename on the local system.
+.sp
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+.It Fl e Ar string , Fl \-expiration Ns = Ns Ar string
+Refresh the leapfile this long before it expires.
+.sp
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "\-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+.It Fl f Ar string , Fl \-ntp\-conf\-file Ns = Ns Ar string
+Location of the ntp.conf file.
+.sp
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+.It Fl F , Fl \-force\-update
+Force update of the leapfile.
+.sp
+Force update even if current file is OK and not close to expiring.
+.It Fl \-dont\-wait
+Don't wait for keystroke between plots.
+.sp
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh USAGE
+Usage stuff
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Timothe Litt"
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBupdate\-leap\fP
+option definitions.
diff --git a/scripts/update-leap/update-leap.html b/scripts/update-leap/update-leap.html
new file mode 100644
index 000000000000..3a731ac76066
--- /dev/null
+++ b/scripts/update-leap/update-leap.html
@@ -0,0 +1,274 @@
+<html lang="en">
+<head>
+<title>update-leap User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="update-leap User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">update-leap User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-Description">update-leap Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+ <p>This document describes the use of the NTP Project's <code>update-leap</code> program.
+
+ <p>This document applies to version 4.2.8p2 of <code>update-leap</code>.
+
+<div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#update_002dleap-Description">update-leap Description</a>: Description
+<li><a accesskey="2" href="#update_002dleap-Invocation">update-leap Invocation</a>: Invoking update-leap
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="update_002dleap-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">0.1 Invoking update-leap</h3>
+
+<p><a name="index-update_002dleap-1"></a><a name="index-leap_002dseconds-file-manager_002fupdater-2"></a>
+
+ <p><code>update-leap</code>
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+
+ <p>Ordinarily, the file is found using the "leapfile" directive in
+<code>ntp.conf(5)</code>.
+However, an alternate location can be specified on the command line.
+
+ <p>If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+
+ <p>If the current file is acceptable, no download or restart occurs.
+
+ <p>-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>update-leap</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#update_002dleap-usage">update-leap usage</a>: update-leap help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#update_002dleap-source_002durl">update-leap source-url</a>: source-url option (-s)
+<li><a accesskey="3" href="#update_002dleap-ipv4">update-leap ipv4</a>: ipv4 option (-4)
+<li><a accesskey="4" href="#update_002dleap-destination">update-leap destination</a>: destination option (-d)
+<li><a accesskey="5" href="#update_002dleap-expiration">update-leap expiration</a>: expiration option (-e)
+<li><a accesskey="6" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>: ntp-conf-file option (-f)
+<li><a accesskey="7" href="#update_002dleap-force_002dupdate">update-leap force-update</a>: force-update option (-F)
+<li><a accesskey="8" href="#update_002dleap-exit-status">update-leap exit status</a>: exit status
+<li><a accesskey="9" href="#update_002dleap-Usage">update-leap Usage</a>: Usage
+<li><a href="#update_002dleap-Authors">update-leap Authors</a>: Authors
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="update_002dleap-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-source_002durl">update-leap source-url</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.1 update-leap help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-update_002dleap-help-3"></a>
+This is the automatically generated usage text for update-leap.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">/bin/bash: line 136: ./update-leap: Permission denied
+</pre>
+ <div class="node">
+<p><hr>
+<a name="update_002dleap-source_002durl"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-ipv4">update-leap ipv4</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-usage">update-leap usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.2 source-url option (-s)</h4>
+
+<p><a name="index-update_002dleap_002dsource_002durl-4"></a>
+This is the &ldquo;the url of the master copy of the leapseconds file&rdquo; option.
+This option takes a string argument.
+Specify the URL of the master copy to download
+$LEAPSRC
+<div class="node">
+<p><hr>
+<a name="update_002dleap-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-destination">update-leap destination</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-source_002durl">update-leap source-url</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.3 ipv4 option (-4)</h4>
+
+<p><a name="index-update_002dleap_002dipv4-5"></a>
+This is the &ldquo;use only ipv4 addresses for dns name resolution&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv6.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+;
+
+ <p>flag =
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = &lt;&lt;- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+;
+
+ <p>flag =
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = &lt;&lt;- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+<div class="node">
+<p><hr>
+<a name="update_002dleap-destination"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-expiration">update-leap expiration</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-ipv4">update-leap ipv4</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.4 destination option (-d)</h4>
+
+<p><a name="index-update_002dleap_002ddestination-6"></a>
+This is the &ldquo;filename on the local system&rdquo; option.
+This option takes a string argument <span class="file">float</span>.
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+<div class="node">
+<p><hr>
+<a name="update_002dleap-expiration"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-destination">update-leap destination</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.5 expiration option (-e)</h4>
+
+<p><a name="index-update_002dleap_002dexpiration-7"></a>
+This is the &ldquo;refresh the leapfile this long before it expires&rdquo; option.
+This option takes a string argument.
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+<div class="node">
+<p><hr>
+<a name="update_002dleap-ntp_002dconf_002dfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-expiration">update-leap expiration</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.6 ntp-conf-file option (-f)</h4>
+
+<p><a name="index-update_002dleap_002dntp_002dconf_002dfile-8"></a>
+This is the &ldquo;location of the ntp.conf file&rdquo; option.
+This option takes a string argument.
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+<div class="node">
+<p><hr>
+<a name="update_002dleap-force_002dupdate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-exit-status">update-leap exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.7 force-update option (-F)</h4>
+
+<p><a name="index-update_002dleap_002dforce_002dupdate-9"></a>
+This is the &ldquo;force update of the leapfile&rdquo; option.
+Force update even if current file is OK and not close to expiring.
+<div class="node">
+<p><hr>
+<a name="update_002dleap-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-Usage">update-leap Usage</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.8 update-leap exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+ <div class="node">
+<p><hr>
+<a name="update_002dleap-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-Authors">update-leap Authors</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-exit-status">update-leap exit status</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.9 update-leap Usage</h4>
+
+<div class="node">
+<p><hr>
+<a name="update_002dleap-Authors"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-Usage">update-leap Usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.10 update-leap Authors</h4>
+
+</body></html>
+
diff --git a/scripts/update-leap/update-leap.man.in b/scripts/update-leap/update-leap.man.in
new file mode 100644
index 000000000000..a16434777fd3
--- /dev/null
+++ b/scripts/update-leap/update-leap.man.in
@@ -0,0 +1,169 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH update-leap 1update-leapman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E0ayAX/ag-R0aGzX)
+.\"
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:40 AM by AutoGen 5.18.5pre4
+.\" From the definitions update-leap-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]update-leap\fP
+\- leap-seconds file manager/updater
+.SH SYNOPSIS
+\f\*[B-Font]update-leap\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]update-leap\fP
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+.sp \n(Ppu
+.ne 2
+
+Ordinarily, the file is found using the "leapfile" directive in
+\fCntp.conf\fR(5)\f[].
+However, an alternate location can be specified on the command line.
+.sp \n(Ppu
+.ne 2
+
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.sp \n(Ppu
+.ne 2
+
+If the current file is acceptable, no download or restart occurs.
+.sp \n(Ppu
+.ne 2
+
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-source\-url\f[]=\f\*[I-Font]string\f[]
+The URL of the master copy of the leapseconds file.
+.sp
+Specify the URL of the master copy to download
+$LEAPSRC
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Use only IPv4 addresses for DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+.TP
+.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]float\f[], \f\*[B-Font]\-\-destination\f[]=\f\*[I-Font]float\f[]
+Filename on the local system.
+.sp
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+.TP
+.NOP \f\*[B-Font]\-e\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-expiration\f[]=\f\*[I-Font]string\f[]
+Refresh the leapfile this long before it expires.
+.sp
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+.TP
+.NOP \f\*[B-Font]\-f\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-ntp\-conf\-file\f[]=\f\*[I-Font]string\f[]
+Location of the ntp.conf file.
+.sp
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+.TP
+.NOP \f\*[B-Font]\-F\f[], \f\*[B-Font]\-\-force\-update\f[]
+Force update of the leapfile.
+.sp
+Force update even if current file is OK and not close to expiring.
+.TP
+.NOP \f\*[B-Font]\-\-dont\-wait\f[]
+Don't wait for keystroke between plots.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH USAGE
+Usage stuff
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Timothe Litt"
+.br
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBupdate-leap\fP
+option definitions.
diff --git a/scripts/update-leap/update-leap.mdoc.in b/scripts/update-leap/update-leap.mdoc.in
new file mode 100644
index 000000000000..9fb3a1201334
--- /dev/null
+++ b/scripts/update-leap/update-leap.mdoc.in
@@ -0,0 +1,134 @@
+.Dd April 7 2015
+.Dt UPDATE_LEAP 1update-leapmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:46 AM by AutoGen 5.18.5pre4
+.\" From the definitions update-leap-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm update-leap
+.Nd leap-seconds file manager/updater
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+will validate the file currently on the local system
+and if necessary, updates leap\-second definition file.
+.Pp
+Ordinarily, the file is found using the "leapfile" directive in
+.Xr ntp.conf 5 .
+However, an alternate location can be specified on the command line.
+.Pp
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.Pp
+If the current file is acceptable, no download or restart occurs.
+.Pp
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron\-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl s Ar string , Fl \-source\-url Ns = Ns Ar string
+The URL of the master copy of the leapseconds file.
+.sp
+Specify the URL of the master copy to download
+$LEAPSRC
+.It Fl 4 , Fl \-ipv4
+Use only IPv4 addresses for DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = ipv6;
+ flags\-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<\- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = prefer;
+ flags\-cant = ipv4, ipv6;
+ value = p;
+ arg\-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<\- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+.It Fl d Ar float , Fl \-destination Ns = Ns Ar float
+Filename on the local system.
+.sp
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+.It Fl e Ar string , Fl \-expiration Ns = Ns Ar string
+Refresh the leapfile this long before it expires.
+.sp
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "\-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+.It Fl f Ar string , Fl \-ntp\-conf\-file Ns = Ns Ar string
+Location of the ntp.conf file.
+.sp
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+.It Fl F , Fl \-force\-update
+Force update of the leapfile.
+.sp
+Force update even if current file is OK and not close to expiring.
+.It Fl \-dont\-wait
+Don't wait for keystroke between plots.
+.sp
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh USAGE
+Usage stuff
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Timothe Litt"
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBupdate\-leap\fP
+option definitions.
diff --git a/scripts/update-leap/update-leap.texi b/scripts/update-leap/update-leap.texi
new file mode 100644
index 000000000000..1a96ae09b3ee
--- /dev/null
+++ b/scripts/update-leap/update-leap.texi
@@ -0,0 +1,43 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename update-leap.info
+@settitle update-leap User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{update-leap},
+a program from
+the NTP Project,
+that is used to wait until @code{ntpd} has been able to
+synchronize and stabilize the time on the current host.
+@end ifinfo
+
+@direntry
+* update-leap: (update-leap). Check the leapfile and update it if needed.
+@end direntry
+
+@titlepage
+@title update-leap User's Manual
+@subtitle update-leap, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, update-leap Description, (dir), (dir)
+
+This document describes the use of the NTP Project's @code{update-leap} program.
+
+This document applies to version @value{VERSION} of @code{update-leap}.
+
+@shortcontents
+
+@menu
+* update-leap Description:: Description
+* update-leap Invocation:: Invoking update-leap
+@end menu
+
+@include invoke-update-leap.texi
diff --git a/sntp/Makefile.in b/sntp/Makefile.in
index f58700593da3..fac19cc2a50b 100644
--- a/sntp/Makefile.in
+++ b/sntp/Makefile.in
@@ -61,8 +61,6 @@ subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -82,8 +80,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -394,6 +394,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/sntp/aclocal.m4 b/sntp/aclocal.m4
index aff791b83646..5d30c4211d88 100644
--- a/sntp/aclocal.m4
+++ b/sntp/aclocal.m4
@@ -1132,8 +1132,6 @@ AC_SUBST([am__untar])
m4_include([libopts/m4/libopts.m4])
m4_include([libopts/m4/stdnoreturn.m4])
-m4_include([libevent/m4/openldap-thread-check.m4])
-m4_include([libevent/m4/openldap.m4])
m4_include([m4/hms_search_lib.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
@@ -1159,5 +1157,7 @@ m4_include([m4/ntp_prog_cc.m4])
m4_include([m4/ntp_sntp.m4])
m4_include([m4/ntp_sysexits.m4])
m4_include([m4/ntp_ver_suffix.m4])
+m4_include([m4/openldap-thread-check.m4])
+m4_include([m4/openldap.m4])
m4_include([m4/os_cflags.m4])
m4_include([m4/snprintf.m4])
diff --git a/sntp/configure b/sntp/configure
index b4c66f743b5e..76bdd28f9c70 100755
--- a/sntp/configure
+++ b/sntp/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for sntp 4.2.8p1.
+# Generated by GNU Autoconf 2.68 for sntp 4.2.8p2.
#
# Report bugs to <http://bugs.ntp.org./>.
#
@@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sntp'
PACKAGE_TARNAME='sntp'
-PACKAGE_VERSION='4.2.8p1'
-PACKAGE_STRING='sntp 4.2.8p1'
+PACKAGE_VERSION='4.2.8p2'
+PACKAGE_STRING='sntp 4.2.8p2'
PACKAGE_BUGREPORT='http://bugs.ntp.org./'
PACKAGE_URL='http://www.ntp.org./'
@@ -686,6 +686,13 @@ SED
LDADD_LIBNTP
NTP_CROSSCOMPILE_FALSE
NTP_CROSSCOMPILE_TRUE
+INSTALL_UPDATE_LEAP_FALSE
+INSTALL_UPDATE_LEAP_TRUE
+UPDATE_LEAP_NI
+UPDATE_LEAP_MS
+UPDATE_LEAP_DS
+UPDATE_LEAP_DL
+UPDATE_LEAP_DB
TIMETRIM_NI
TIMETRIM_MS
TIMETRIM_DS
@@ -1457,7 +1464,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sntp 4.2.8p1 to adapt to many kinds of systems.
+\`configure' configures sntp 4.2.8p2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1527,7 +1534,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sntp 4.2.8p1:";;
+ short | recursive ) echo "Configuration of sntp 4.2.8p2:";;
esac
cat <<\_ACEOF
@@ -1670,7 +1677,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sntp configure 4.2.8p1
+sntp configure 4.2.8p2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2495,7 +2502,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sntp $as_me 4.2.8p1, which was
+It was created by sntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -3438,7 +3445,7 @@ fi
# Define the identity of the package.
PACKAGE='sntp'
- VERSION='4.2.8p1'
+ VERSION='4.2.8p2'
cat >>confdefs.h <<_ACEOF
@@ -7032,6 +7039,19 @@ fi
+ if test -z "$UPDATE_LEAP_NI" ; then
+ INSTALL_UPDATE_LEAP_TRUE=
+ INSTALL_UPDATE_LEAP_FALSE='#'
+else
+ INSTALL_UPDATE_LEAP_TRUE='#'
+ INSTALL_UPDATE_LEAP_FALSE=
+fi
+
+
+
+
+
+
# Expose a cross-compilation indicator to makefiles
@@ -30185,6 +30205,10 @@ if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; th
as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -30630,7 +30654,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sntp $as_me 4.2.8p1, which was
+This file was extended by sntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -30697,7 +30721,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-sntp config.status 4.2.8p1
+sntp config.status 4.2.8p2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/sntp/include/Makefile.in b/sntp/include/Makefile.in
index 9f5c92a83a76..31db061256cb 100644
--- a/sntp/include/Makefile.in
+++ b/sntp/include/Makefile.in
@@ -40,8 +40,6 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -61,8 +59,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -249,6 +249,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/sntp/include/version.def b/sntp/include/version.def
index 47e57c8c3bbc..c315fe80be27 100644
--- a/sntp/include/version.def
+++ b/sntp/include/version.def
@@ -1 +1 @@
-version = '4.2.8p1';
+version = '4.2.8p2';
diff --git a/sntp/include/version.texi b/sntp/include/version.texi
index bc3cc0638b96..d5ea0c033919 100644
--- a/sntp/include/version.texi
+++ b/sntp/include/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 04 February 2015
-@set EDITION 4.2.8p1
-@set VERSION 4.2.8p1
+@set UPDATED 07 April 2015
+@set EDITION 4.2.8p2
+@set VERSION 4.2.8p2
diff --git a/sntp/invoke-sntp.texi b/sntp/invoke-sntp.texi
index e9be80c17f15..bed49ec2cacc 100644
--- a/sntp/invoke-sntp.texi
+++ b/sntp/invoke-sntp.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-sntp.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:34:17 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:18:04 AM by AutoGen 5.18.5pre4
# From the definitions sntp-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -56,7 +56,8 @@ Otherwise, only the
is displayed.
Finally, the
@emph{stratum}
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
This section was generated by @strong{AutoGen},
using the @code{agtexi-cmd} template and the option descriptions for the @code{sntp} program.
@@ -100,7 +101,7 @@ with a status code of 0.
@exampleindent 0
@example
-sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p1
+sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p2
Usage: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
diff --git a/sntp/libevent/ChangeLog b/sntp/libevent/ChangeLog
index 8bb76cafff4e..149963750496 100644
--- a/sntp/libevent/ChangeLog
+++ b/sntp/libevent/ChangeLog
@@ -1,23 +1,282 @@
-Changes in version 2.1.4-beta (?? Dec 2013)
+Changes in version 2.1.5-beta (5 January 2015)
- (As of 735d838b0a537ae04f1e6a2e9cbc5f3f45ebb541)
+ Security Fixes (evbuffers)
+ o Avoid integer overflow bugs in evbuffer_add() and related functions. See CVE-2014-6272 advisory for more information. (d49bc0e88b81a5812116074dc007f1db0ca1eecd)
+ New APIs (evconnlistener)
+ o Provide support for SO_REUSEPORT through LEV_OPT_REUSABLE_PORT (b625361 Maciej Soltysiak)
+
+ Bugfixes (core)
+ o Fix use-after-free error in EV_CLOSURE_EVENT callback (3cc0eac John Ohl)
+ o Fix race caused by event_active (3c7d6fc vjpai)
+
+ Bugfixes (evbuffer)
+ o Fix evbuffer_peek() with len==-1 and start_at non-NULL. (ba59923)
+ o Consistently check for failure from evbuffer_pullup() (60f8f72)
+ o Fix evbuffer_peek() with len==-1 and start_at non-NULL. (fb7e76a)
+
+ Bugfixes (windows, IOCP)
+ o be async: avoid double close() (f133b86 Azat Khuzhin)
+
+ Bugfixes (bufferevents)
+ o Fix issue #127, double free for filterevents that use BEV_OPT_CLOSE_ON_FREE (2c82aa0 John Ohl)
+ o make bufferevent_getwatermark api more robust (a21e510 ufo2243)
+ o [Bugfix] fix bufferevent setwatermark suspend_read (b34e4ac ufo2243)
+ o bufferevent_openssl: reset fd_is_set when setfd with -1 is called (3da84c2 Azat Khuzhin)
+ o Fix compilation for older OpenSSL versions. (5c7282f Joakim Soderberg)
+
+ New APIs (evhttp)
+ o Add evhttp_connection_set_family() to set addrinfo->family for DNS requests (12c29b0 Azat Khuzhin)
+ o Implement interface that provides the ability to have an outbound evhttp_connection free itself once all requests have completed (2b9ec4c,10fe4f John Ohl)
+
+ New APIs (core)
+ o Implement new/free for struct evutil_monotonic_timer and export monotonic time functions (f2645f8 Andrea Shepard)
+
+ Bugfixes (evdns)
+ o Load hosts file on Windows. (a0b247c Vilmos Nebehaj)
+ o Don't truncate hosts file path on Windows. (d0dc861 Vilmos Nebehaj)
+ o Fix a crash in evdns related to shutting down evdns (9f39c88,e8fe749)
+ o evdns: avoid read-after-free in evdns_request_timeout_callback() (61262a0 Azat Khuzhin)
+ o Correctly handle allocation failures in evdns_getaddrinfo (6a53d15)
+ o evdns: fix EVDNS_BASE_DISABLE_WHEN_INACTIVE in case retransmit/retry (74d0eee Azat Khuzhin)
+ o evdns: add retry/reissue tests for EVDNS_BASE_DISABLE_WHEN_INACTIVE (3ca9d43 Azat Khuzhin)
+ o evdns: fail ns after we are failing/retrasmitting request (97c750d Azat Khuzhin)
+
+ Bugfixes (evhttp)
+ o http: reset connection before installing retry timer (fix http retries handling) (bc79cc5 Azat Khuzhin)
+
+
+ Testing
+ o regress_dns: fix leaks in getaddrinfo_async{,_cancel_stress} tests (2fdc5f2 Azat Khuzhin)
+ o test: add family argument for http_connection_test_() (177b8a7 Azat Khuzhin)
+ o test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC (42aefeb Azat Khuzhin)
+ o test/http: add regress test for set family to AF_INET6 (3fbf3cc Azat Khuzhin)
+ o Update to a more recent tinytest_macros. (8da5a18)
+ o test/regress: add simplestsignal: to track reorder bugs separately (b897bef Azat Khuzhin)
+ o test/evbuffer_peek: add regress in case we have first buffer greater (e2d139d Azat Khuzhin)
+ o More evbuffer_peek() test cases (154006a)
+ o use correct tt macro for pointer compare (08c88ea)
+ o regress_buffer: fix 'memcmp' compare size (79800df Maks Naumov)
+ o Fix a use-after-free in unit tests. CID 752027 (3739057)
+ o Fix a dead-code warning in unit tests. CID 1193548 (c119f24)
+ o Use evutil_weakrand() in unit tests. (a677b72, 364c110)
+ o Use a more precise calculation for max in time-ratelim.c (ca5b5c7)
+ o Make a buffer larger in the tests to avoid a scary evbuffer_copyout_from() (fb57b8b)
+ o Fix several memory leaks in the unit tests. (89c1a3b)
+ o Add test for evhttp_connection_free_on_completion (b0e9924 John Ohl)
+ o Fix annoying heisenbug in test-time.c (cb73704)
+
+ Sample code
+ o Make http-server.c output into good html5 (6d72bdc)
+ o Use FindClose for handle from FindFirstFile in http-server.c (6466e88)
+ o https-client: add -retries argument, for connection retries (d9da844 Azat Khuzhin)
+
+ Bugfixes (build)
+ o Add missing headerfile for cmake (15d90cc Trond Norbye)
+ o ignore one more test binary (b6593aa Michael Richardson)
+ o ignore config.cache/test-driver files (c83f333 Mike Frysinger)
+ o add a --disable-samples configure flag (0c492b3 Mike Frysinger)
+ o Add a few files created by "make verify" to .gitignore. (1a8295a Pierre Phaneuf)
+ o updates in cmake build (27bd9fa Sergey Nikulov)
+ o Fix cmake error when the Module path has more than one entry. (befbd13 Acer Yang)
+ o Fix CMake shared library build (e69d910 Nobuaki Sukegawa)
+ o Fix warnings when compiling with clang 3.5 (f5b4765 John Ohl)
+ o Fix mixed declarations and code (forbidden by ISO C90) (8afbdbc Thomas Bernard)
+
+ Bugfixes (miscellaneous)
+ o tree.h: drop duplicated content of tree.h (6193187 Azat Khuzhin)
+ o evdns: disable probing with EVDNS_BASE_DISABLE_WHEN_INACTIVE (610410b,ad0493e,fea86a6,d83b337,5ca9e97 Azat Khuzhin)
+ o [Bugfix] fix grammer error (3a4d249 ufo2243)
+ o Change return type of evutil_load_windows_system_library_ to HMODULE (f691389)
+ o Fix a c90 warning (76643dd)
+ o Fix a typo in a doxygen comment. Reported by 亦得. (be1aeff)
+ o remove trailing comma from enum (b361b8a Jean-Philippe Ouellet)
+
+ Bugfixes (FreeBSD)
+ o Handle ENOTCAPABLE from FreeBSD - this is returned if an event in the changelist is for an FD that has been closed. (6fd7394 Adrian Chadd)
+
+
+
+Changes in version 2.1.4-alpha (21 Mar 2014)
+
+ Libevent 2.1.4-alpha adds a number of new miscellaneous APIs to make
+ Libevent more useful, including support for early close detection with
+ epoll via EPOLLRDHUP, triggering bufferevent callbacks, adding more
+ evhttp callbacks, and more. There are also numerous bugfixes, including
+ a number for finalize-related issues from 2.1.3-alpha; and an
+ alternative (non-primary!) cmake-based build mechanism.
+
+ New APIs (core)
+ o Added event_base_get_num_events() (0fa107d Mobai Zhang)
+ o New event_base_active_by_fd API (865a142 Greg Hazel, 5c9da9a, 87fa2b0)
+ o Add event_base_active_by_signal by analogy (4865943)
+ o Add access to max event count stats (5173bef, efbd3dc, 26230a2
+ Andrew Sweeney)
+ o Implemented EV_CLOSED event for epoll backend
+ (EPOLLRDHUP). (b1b69ac Diego Giagio, 53d2793, 43ffcf6, dfe1e52
+ Marcin Juszkiewicz, ff26633 Joakim Soderberg, 3908a5e)
+
+ New APIs (evutil_secure_rng)
+ o Add evutil_secure_rng_set_urandom_device_file (2bbb5d7)
+
+ New APIs (bufferevents)
+ o Add function to fetch underlying ratelimit cfg (4b3d5af Mark Ellzey)
+ o Pass and return const for bufferevent_get_token_bucket_cfg (1c77fbb
+ Mark Ellzey)
+ o Add watermark introspection (4ce242b Ondřej Kuzník)
+ o Add an option to trigger bufferevent I/O callbacks (61ee18b Ondřej Kuzník)
+ o Add an option to trigger bufferevent event callbacks (a7384c7
+ Ondřej Kuzník)
+ o Clarifications in response to merge req. comments (bd41947 Ondřej
+ Kuzník)
+ o Minor optimizations on bufferevent_trigger options (a3172a4)
+
+ New APIs (evhttp)
+ o Add evhttp_connection_get_server(). (a7f82a3 Maxime Henrion)
+ o add a http default content type option (5a5acd9 Nicolas Martyanoff)
+ o http: implement new evhttp_connection_get_addr() api. (0c7f040 Azat
+ Khuzhin)
+ o Add a variant of evhttp_send_reply_chunk() with a callback on
+ evhttp_write_buffer() (8d8decf Julien BLACHE)
+ o Allow registering callback for parsing HTTP headers (b0bd7fe Balint Reczey)
+ o Provide on request complete callback facility (b083ca0 Andrew Sweeney)
+ o evhttp_request_set_on_complete_cb to be more specific about what
+ the function actually does and usage (da86dda Andrew Sweeney)
+ o Update unit test to make sure that the callback happens after the
+ output data is written (b85f398 Andrew Sweeney)
+
+ Features (evdns)
+ o bug fix for issues #293 evdns_base_load_hosts doesn't remove
+ outdated addresses (954d2f9, f03d353, 45eba6f Kuldeep Gupta)
+
+ Features: (cmake build support)
+ o Initial CMake commit. (e415196 Joakim Soderberg)
+ o Add all tests and benchmarks to CMake project. (e9fc014 Joakim Soderberg)
+ o More work on adding tests to CMake project (99c1dc3 Joakim Soderberg)
+ o Generate a dummy evconfig-private.h so things build
+ properly. (ce14def Joakim Soderberg)
+ o Link libm on unix platforms. (58fcd42 Joakim Soderberg)
+ o Added some GCC specific options. (19222e5 Joakim Soderberg)
+ o Use evutil_closesocket instead. (dbf2b51 Joakim Soderberg)
+ o Add copyright and licensing files for CMake modules. (c259d53
+ Joakim Soderberg)
+ o Only include WIN32 getopt where it is used. (9bbce0b Joakim Soderberg)
+ o Fix bench_cascade program on Windows. (78da644 Joakim Soderberg)
+ o Don't segfault on no found event backend. (8f2af50 Joakim Soderberg)
+ o Only test the event backends available on the system. (7ea4159
+ Joakim Soderberg)
+ o Added a "make verify" target. (e053c4f Joakim Soderberg)
+ o Fix the make "verify" target on Windows. (67e5d74 Joakim Soderberg)
+ o Get rid of deprecation warnings for OpenSSL on OSX 10.7+ (69c3516
+ Joakim Söderberg)
+ o Fix kqueue support. (a831f2f Joakim Söderberg)
+ o Added a test for testing if kqueue works with pipes. (2799b35
+ Joakim Söderberg)
+ o Change the BSD license from 4 to 3-clause. (86df3ed Joakim Soderberg)
+ o Minimum required python version is 2.4. (968e97b Joakim Soderberg)
+ o Get rid of unknown pragma warnings. (0ef1d04 Joakim Soderberg)
+ o Add a "make verify_coverage" target generation coverage
+ info. (f2483f8 Joakim Soderberg)
+ o Fix the "make verify" target on NetBSD (4ac086a Joakim Soderberg)
+ o Only look for ZLib when it is used (if tests are
+ included). (f780593 Joakim Soderberg)
+ o Added EVENT__ENABLE_GCC_WARNINGS, turns all warnings into
+ errors. (dd413bd Joakim Soderberg)
+ o Add CMake config and install targets. (f3446ed Joakim Soderberg)
+ o Fix typo (4b754df Joakim Soderberg)
+ o Some work on making it possible to simply do add_subdirectory() on
+ the project. (49ab363 Joakim Soderberg)
+ o Set USE_DEBUG=1 on EVENT__ENABLE_VERBOSE_DEBUG (fd42e70 Joakim Soderberg)
+ o Fix so that old nmake project still builds. (24d6466 Joakim
+ Soderberg)
+ o Rename README to README.md and use markdown to format. (d2bc39a
+ Joakim Soderberg)
+ o Update README with CMake build instructions. (604b8cc Joakim Soderberg)
+ o Clean up the README some. (8d4cb35 JoakimSoderberg)
+ o Forgotten headers for old nmake project compatability. (8697b99
+ Joakim Soderberg)
+ o Change all uses of WIN32 to _WIN32 (4e14395 Joakim Söderberg)
+ o Fix include bug. (2024467 Joakim Söderberg)
+ o Check if we're on OSX before disabling deprecation in le-proxy
+ (8b40a5b Joakim Söderberg)
+ o Fix broken autotools build. (ae1bd82 Joakim Söderberg)
+ o Disclaimerize cmake a little in the README (d03b5bf)
+ o Fix CMake compile when OpenSSL is disabled. (e423d42 Joakim
+ Söderberg)
+ o CMake: Get rid of python not found warning when regress tests
+ turned off. (d38d798 Joakim Söderberg)
+ o Fix https-client compilation on Windows. (d7be788 Joakim Soderberg)
+ o Guard against EVENT_NOWIN32 being set during testing. (f1715b4
+ Joakim Soderberg)
+ o Check for OSX when checking for clang. (e212c54 Joakim Soderberg)
+ o Added a Travis-CI configuration file. (8c0f0a9 Joakim Soderberg)
+ o Added -Qunused-arguments for clang on macosx (ed99d92 Trond Norbye)
+ o Rename event_extras to event_extra (a0dd5df Trond Norbye)
+ o Add option to build shared library (4545fa9 Trond Norbye)
+ o Add -Qunused-arguments for clang on macos (b56611d Trond Norbye)
+ o Add cmake-related files to .gitignore (e061321 Trond Norbye)
+ o Export event_extra not event_extras. (2b41bcf Joakim Söderberg)
+
+ Bugfixes (core)
+ o If evsel->del() fails, don't leave the evmap in an inconsistent
+ state (9b5a527 Maxime Henrion)
+ o Move event_debug_note_teardown_ before mm_free. (69b5c64)
+ o Check CLOCK_MONOTONIC_* at runtime if needed. (911abf3)
+ o Fix reinit of fds with EV_WRITE but not EV_READ. (ebfd8a8 maksqwe)
+ o Tweaked callbacks to prevent race condition
+ (https://github.com/libevent/libevent/issues/104) (40830f1, 2ea15ed
+ John Ohl)
+ o Move assert(ev) to before we use ev in EV_CLOSURE_EVENT_FINALIZE
+ case (9805972)
+
+ Bugfixes (evhttp)
+ o Fix a double close() bug in evhttp when the underlying bufferevent uses
+ BEV_OPT_CLOSE_ON_FREE. (31db8a0 Maxime Henrion)
+ o Fix an unlikely but possible error case for http connections (f22049e)
+ o Avoid racy bufferevent activation (5eb1788 Nate Rosenblum)
+
+ Bugfixes on 2.0 (Windows)
+ o Use windows vsnprintf fixup logic on all windows environments (e826f19)
+ o libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer)
+ (b8f5980 Frank Denis)
+
+ Bugfixes (evutil_secure_rng)
+ o When we seed from /proc/sys/kernel/random/uuid, count it as success
+ (e35b540)
+ o We should return after arc4random_buf() (1ea1f26 Makoto Kato)
+ o Avoid other RNG initialization FS reads when urandom file is
+ specified (9695e9c)
+ o Really remove RNG seeds from the stack (f5ced88)
+ o Fix another arc4random_buf-related warning (e64a2b0)
+
+ Bugfixes (bufferevents)
+ o Initialize async bufferevent timeout CBs unconditionally (af9b2a7)
Bugfixes (evdns)
o Checking request nameserver for NULL, before using it. (5c710c0
Belobrov Andrey)
- o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (14971a8
- Azat Khuzhin)
+ o Fix SEGFAULT after evdns_base_resume if no nameservers
+ installed. (14971a8 Azat Khuzhin)
o Actually use the log facility for reporting evdns problems. (e1766a1)
- o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (f8d7df8 Azat Khuzhin)
+ o Fix SEGFAULT after evdns_base_resume if no nameservers
+ installed. (f8d7df8 Azat Khuzhin)
+ o fix for ServFail from RIPE Atlas release (62f596b Antony Antony)
- Bugfixes (compilatin)
+ Bugfixes (compilation)
o Fix test compilation with nmake: add the gdi.lib dependency (5ba8ab7)
o Whoops. It is gdi.lib, not gdi32.lib. (github issue #61) (8ab612e)
- o Don't use return since return type is void and build error occurs using clang (838161d Makoto Kato)
+ o Don't use return since return type is void and build error occurs
+ using clang (838161d Makoto Kato)
o Use void casts to suppress some "unchecked return value" warns (7080d55)
- o rpcgen: Generate regress.gen.[c,h] in build rather than src dir (243386c Ross Lagerwall)
- o Fix a compiler warning when checking for arc4random_buf linker breakage. (5cb3865)
+ o rpcgen: Generate regress.gen.[c,h] in build rather than src dir
+ (243386c Ross Lagerwall)
+ o Fix a compiler warning when checking for arc4random_buf linker
+ breakage. (5cb3865)
+ o Fix 'make distcheck' by adding regress.gen.[ch] to DISTCLEANFILES
+ (239d834)
+
+ o Fix a c90 warning (c207682)
+ o Fix consts in WIN32-Code/getopt*.[ch] (57abb35)
Bugfixes (locks, synchronization)
o Missed lock acquire/release in event_base_cancel_single_callback_()
@@ -30,7 +289,8 @@ Changes in version 2.1.4-beta (?? Dec 2013)
Testing
o Add tests for evdns_base_resume(). (1cd9ff5 Azat Khuzhin)
o Fix dns/leak_resume_send_err test. (7e876df Azat Khuzhin)
- o Add checks for evhttp_connection_get_server() in unit tests. (fbc323b Maxime Henrion)
+ o Add checks for evhttp_connection_get_server() in unit
+ tests. (fbc323b Maxime Henrion)
o Fix a (failure-only) null dereference in the unit tests (1104d0b)
o Fix a logic error in test_evbuffer_freeze (7765884)
o Add missing check to test_evbuffer_file_segment_add_cleanup_cb (eba4506)
@@ -38,15 +298,12 @@ Changes in version 2.1.4-beta (?? Dec 2013)
o DNS tests: add a missing check (f314900)
o Finalize tests: add a missing check (82b6956)
o test_evutil_rtrim: add another missing check. (e193c95)
- o regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset (611e28b Azat Khuzhin)
- o regress_http: add tests for evhttp_connection_get_addr() (4dd500c Azat Khuzhin)
-
- Bugfixes (core)
- o If evsel->del() fails, don't leave the evmap in an inconsistent state
- (9b5a527 Maxime Henrion)
- o Move event_debug_note_teardown_ before mm_free. (69b5c64)
- o Check CLOCK_MONOTONIC_* at runtime if needed. (911abf3)
- o Fix reinit of fds with EV_WRITE but not EV_READ. (ebfd8a8 maksqwe)
+ o regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset
+ (611e28b Azat Khuzhin)
+ o regress_http: add tests for evhttp_connection_get_addr() (4dd500c
+ Azat Khuzhin)
+ o Update to the latest version of tinytest (7a80476)
+ o Heap-allocate zlib data structure in regress_zlib tests (4947c18)
Performance tweaks (core)
o Avoid redundant syscall to make a nonblocking socket nonblocking
@@ -54,56 +311,42 @@ Changes in version 2.1.4-beta (?? Dec 2013)
o Avoid redundant syscall if making a socket cloexec twice (1f29b18)
o Avoid redundant invocations of init_extension_functions for IOCP (3b77d62)
- Bugfixes (evhttp)
- o Fix a double close() bug in evhttp when the underlying bufferevent uses
- BEV_OPT_CLOSE_ON_FREE. (31db8a0 Maxime Henrion)
- o Fix an unlikely but possible error case for http connections (f22049e)
- o Avoid racy bufferevent activation (5eb1788 Nate Rosenblum)
-
- Bugfixes on 2.0 (Windows)
- o Use windows vsnprintf fixup logic on all windows environments (e826f19)
- o libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer) (b8f5980 Frank Denis)
-
- Bugfixes (evutil_secure_rng)
- o When we seed from /proc/sys/kernel/random/uuid, count it as success (e35b540)
- o We should return after arc4random_buf() (1ea1f26 Makoto Kato)
- o Avoid other RNG initialization FS reads when urandom file is specified (9695e9c)
- o Really remove RNG seeds from the stack (f5ced88)
- o Fix another arc4random_buf-related warning (e64a2b0)
-
- New APIs (core)
- o Added event_base_get_num_events() (0fa107d Mobai Zhang)
- o Add function to fetch underlying ratelimit cfg (4b3d5af Mark Ellzey)
- o Pass and return const for bufferevent_get_token_bucket_cfg (1c77fbb Mark Ellzey)
-
- New APIs (evhttp)
- o Add evhttp_connection_get_server(). (a7f82a3 Maxime Henrion)
- o add a http default content type option (5a5acd9 Nicolas Martyanoff)
- o http: implement new evhttp_connection_get_addr() api. (0c7f040 Azat Khuzhin)
-
-
Documentation
o Document that arc4random is not a great cryptographic PRNG. (6e49696)
o Small doxygen tweaks (6e67b51)
o Try another doxygen tweak (ccf432b)
-
- New APIs (evutil_secure_rng)
- o Add evutil_secure_rng_set_urandom_device_file (2bbb5d7)
+ o Clarify event_base_loop exit conditions (031a803)
+ o Fix a typo (be7bf2c Ondřej Kuzník)
+ o Document deferred eventcb behaviour (13a9a02 Ondřej Kuzník)
+ o Typo fixes from Linus Nordberg (cec62cb, 8cd695b)
+ o Fix duplicate paragraph in evbuffer_ptr documentation (58408ee)
+
+ Code Improvements (coverity)
+ o Fix a pile of coverity warnings in the unit tests (867f401)
+ o Fix coverity warnings in benchmark tools. (ff7f739)
+ o Whoops; fix compilation in bench.c (544cf88)
+ o Remove spurious checks in evrpc.c error cases (coverity) (991b362)
+ o Fix a couple of compilation warnings in regress_http.c (860767e)
+ o Fix even more coverity warnings. (d240328)
+ o Stop checking for inet_aton; we don't use it. (f665d5c)
+ o Add an include to evrpc-internal to fix openbsd compilation warning
+ (5e161c6)
Cleanups
o Remove an unreachable return statement in minheap-internal.h (e639a9e)
+ o Refactor evmap_{io,signal}_active_() to tolerate bad inputs (974c60e)
+ o Fix needless bufferevent includes in evdns.c (254c04e)
+ o Fix a couple of "#ifdef WIN32" instances (88ecda3)
+ o Remove unneeded declaration in bufferevent-internal.h (4c8ebcd)
Sample code
- o sample/le-proxy: Fail more gracefully if opening listener fails (44b2491)
- o sample: drop uri_root from base_url in http-server. (6171e1c Azat Khuzhin)
-
-
-
-
-
-
-
-
+ o le-proxy: Fail more gracefully if opening listener fails (44b2491)
+ o http-server: drop uri_root from base_url in http-server. (6171e1c Azat Khuzhin)
+ o https-client: POST supported, args supported (c5887f7 Alexey Ozeritsky)
+ o https-client: code cleanup (29af65e Alexey Ozeritsky)
+ o https-client: Small tweaks to https-client.c (90786eb)
+ o https-client: Set hostname for SNI extension (by f69m) (d1976f8)
+ o https-client: add a cast to https-client.c (462e6b6)
@@ -377,6 +620,429 @@ INFRASTRUCTURE (Active-later events):
o Refactor event_persist_closure: raise and extract some common logic
(bec22b4)
o Remove the unused bits from EVLIST_ALL (9889a3d)
+||||||| merged common ancestors
+Changes in version 2.0.22-stable (?? Dec 2013)
+
+ (As of 3b77d62829c4393bda6f9105a5d3b73b48a64b71.)
+
+BUGFIXES (evhttp)
+ o fix #73 and fix http_connection_fail_test to catch it (crash fix) (b618204 Greg Hazel)
+ o Avoid racy bufferevent activation (5eb1788 Nate Rosenblum)
+
+BUGFIXES (compilation and portability)
+ o Fix compilation with WIN32_HAVE_CONDITION_VARIABLES enabled (7e45739)
+ o Fix missing AC_PROG_SED on older Autoconfs (9ab2b3f Tay Ray Chuan)
+ o Backport libevent to vanilla Autoconf 2.59 (as used in RHEL5) (74d4c44 Kevin Bowling)
+ o Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13 compat (817ea36)
+ o Rename configure.in to configure.ac to appease newer autoconfs (0c79787)
+ o Avoid using top_srcdir in TESTS: new automakes do not like this (a55514e)
+ o Use windows vsnprintf fixup logic on all windows environments (e826f19)
+ o Fix a compiler warning when checking for arc4random_buf linker breakage. (5cb3865)
+ o Fix another arc4random_buf-related warning (e64a2b0)
+
+BUGFIXES (resource leaks/lock errors on error)
+ o Avoid leaking fds on evconnlistener with no callback set (69db261)
+ o Avoid double-close on getsockname error in evutil_ersatz_socketpair (0a822a6)
+ o Fix a locking error in bufferevent_socket_get_dns_error. (0a5eb2e)
+ o libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer) (b8f5980 Frank Denis)
+
+BUGFIXES (miscellaneous)
+ o Avoid other RNG initialization FS reads when urandom file is specified (9695e9c, bb52471)
+ o Avoid redundant invocations of init_extension_functions for IOCP (3b77d62)
+
+BUFGIXES (evdns)
+ o Checking request nameserver for NULL, before using it. (5c710c0 Belobrov Andrey)
+ o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (f8d7df8 Azat Khuzhin)
+
+BUGFIXES (evutil_secure_random)
+ o When we seed from /proc/sys/kernel/random/uuid, count it as success (e35b540)
+ o Document that arc4random is not a great cryptographic PRNG. (6e49696)
+ o Add evutil_secure_rng_set_urandom_device_file (2bbb5d7)
+ o Really remove RNG seeds from the stack (f5ced88)
+
+
+DOCUMENTATION FIXES
+ o Fix a mistake in evbuffer_remove() arguments in example http server code (c322c20 Gyepi Sam)
+ o Fix a typo in a comment in buffer.h. Spotted by Alt_F4 (773b0a5)
+
+
+
+Changes in version 2.0.21-stable (18 Nov 2012)
+BUGFIXES:
+ o ssl: Don't discard SSL read event when timeout and read come close together (576b29f)
+ o ssl: Stop looping in "consider_reading" if reading is suspended. (f719b8a Joachim Bauch)
+ o ssl: No need to reserve space if reading is suspended. (1acf2eb Joachim Bauch)
+ o dns: Avoid a memory-leak on OOM in evdns. (73e85dd, f2bff75 George Danchev)
+ o build: Use python2 rather than python (0eb0109 Ross Lagerwall)
+ o build: Compile without warnings on mingw64 (94866c2)
+ o build: Fix compilation on mingw64 with -DUSE_DEBUG (62bd2c4)
+ o build: Make rpcgen_wrapper.sh work on systems without a "python2" binary (f3009e4)
+ o iocp: Close IOCP listener socket on free when LEV_OPT_CLOSE_ON_FREE is set (cb853ea Juan Pablo Fernandez)
+ o core: Avoid crash when event_pending() called with no event_base set on event (e3cccf3)
+ o misc: remove stray 'x' so print_err will compile when uncommented (ac35650 Patrick Pelletier)
+ o tests: Fix renegotiation test to work around openssl 1.0.1 bug (c2f3086)
+ o tests: Warn when openssl version in unit test mismatches compiled version. (ac009f9)
+
+
+Changes in version 2.0.20-stable (23 Aug 2012)
+BUGFIXES:
+ o core: Make event_pending() threadsafe. (be7a95c Simon Liu)
+ o win32: avoid crash when waiting forever on zero fds. (160e58b)
+ o evhttp: Fix a memory leak on error in evhttp_uriencode (11c8b31)
+ o evbuffer: Avoid possible needless call to writev. Found by coverity. (6a4ec5c)
+ o evdns: memset sockaddr_in before using it. Found by coverity. (a1a0e67)
+ o evhttp: Check more setsockopt return values when binding sockets. Found by coverity (a0912e3)
+ o evdns: Avoid segfault on weird timeout during name lookup. (dc32077 Greg Hazel)
+ o bufferevent_ssl: Correctly invoke callbacks when a SSL bufferevent reads some and then blocks. (606ac43)
+
+
+PORTABILITY FIXES:
+ o check for arc4random_buf at runtime, on OS X (bff5f94 Greg Hazel)
+ o Correctly check for arc4random_buf (fcec3e8 Sebastian Hahn)
+ o Add explicit AC_PROG_SED to configure.in so all autoconfs will expose $(SED) (ca80ea6)
+
+BUILD FIXES:
+ o Add GCC annotations so that the vsprintf functions get checked properly (117e327)
+ o Fix an unused variable warning on *BSD. (c0720c1)
+
+UNIT TEST FIXES:
+ o Fix a couple of memory leaks (found with Valgrind). (3b2529a Ross Lagerwall)
+ o Remove deadcode in http regression tests. Found by coverity. (5553346)
+ o Fix possible uninitialized read in dns regression tests. Found by coverity. (2259777)
+ o Set umask before calling mkstemp in unit tests. Found by coverity (f1ce15d)
+ o Fix various check-after-dereference issues in unit tests: found by coverity (4f3732d)
+ o Fix resource leaks in the unit tests; found by coverity (270f279)
+ o Add some missing null checks to unit tests; found by coverity (f021c3d)
+ o Avoid more crashes/bad calls in unit tests; found by coverity (3cde5bf)
+ o Remove unused variable; spotted by coverity (6355b2a)
+ o Add checks to various return values in unit tests. Found by coverity (b9e7329)
+ o Move assignment outside tt_assert in ssl unit tests. Appeases coverity. (a2006c0)
+
+
+
+Changes in version 2.0.19-stable (3 May 2012)
+BUGFIXES (CORE):
+ o Refactor event_persist_closure: raise and extract some common logic (bec22b4)
+ o If time has jumped so we'd reschedule a periodic event in the past, schedule it for the future instead (dfd808c)
+ o If a higher-priority event becomes active, don't continue running events of the current priority. (2bfda40)
+
+BUGFIXES (SSL):
+ o Fixed potential double-readcb execution with openssl bufferevents. (4e62cd1 Mark Ellzey)
+
+BUGFIXES (DNS):
+ o Cancel a probe request when the server is freed, and ignore cancelled probe callbacks (94d2336 Greg Hazel)
+ o Remove redundant DNS_ERR_CANCEL check, move comment (46b8060 Greg Hazel)
+ o When retransmitting a timed-out DNS request, pick a fresh nameserver. (3d9e52a)
+
+DOCUMENTATION FIXES:
+ o Fix a typo in the bufferevent documentation (98e9119)
+ o Add missing ) to changelog; spotted by rransom (4c7ee6b)
+ o Fix the website URL in the readme (f775521)
+
+COMPILATION FIXES:
+ o Fix a compilation error with MSVC 2005 due to use of mode_t (336dcae)
+ o Configure with gcc older than 2.95 (4a6fd43 Sebastian Hahn)
+ o Generate event-config.h with a single sed script (30b6f88 Zack Weinberg)
+
+FORWARD-COMPATIBILITY:
+ o Backport: provide EVENT_LOG_* names, and deprecate _EVENT_LOG_* (d1a03b2)
+
+TESTING/DEBUGGING SUPPORT:
+ o dns-example.c can now take a resolv.conf file on the commandline (6610fa5)
+ o Make some evdns.c debug logs more verbose (d873d67)
+ o Work-around a stupid gcov-breaking bug in OSX 10.6 (b3887cd)
+
+
+
+Changes in version 2.0.18-stable (22 Mar 2012)
+BUGFIXES (core):
+ o Make uses of open() close-on-exec safe by introducing an internal evutil_open_closeonexec. (d2b5f72 Ross Lagerwall, 03dce42)
+
+BUGFIXES (kqueue):
+ o Properly zero the kevent in kq_setup_kevent() (c2c7b39 Sebastian Hahn)
+
+BUILD FIXES:
+ o Added OPENSSL_LDFLAGS env variable which is appended to SSL checks. (9278196 Mark Ellzey)
+ o Changed OPENSSL_LDFLAGS to OPENSSL_LIBADD (2d67b63 Mark Ellzey)
+ o Don't do clang version detection when disabling some flags (083296b Sebastian Hahn)
+
+BUGFIXES (dns):
+ o Stop crashing in evdns when nameserver probes give a weird error (bec5068)
+
+
+Changes in version 2.0.17-stable (10 Feb 2012)
+
+BUGFIXES (core):
+ o Be absolutely sure to clear pncalls before leaving event_signal_closure (11f36a5)
+ o check for sysctl before we use it (358c745 Mike Frysinger)
+ o Remove bogus casts of socket to int before calling ev_callback (f032516)
+ o Make evconnlistener work around bug in older Linux when getting nmapped (ecfc720)
+ o Fix a list corruption bug when using event_reinit() with signals present (6e41cdc)
+ o Fix a fd leak in event_reinit() (3f18ad1)
+ o Do a memberwise comparison of threading function tables (c94a5f2 Nate R)
+ o Use C-style comments in C source files (for compatibility with compilers such as xlc on AIX). (d84d917 Greg Hewgill)
+ o Avoid crash when freeing event_iocp and using event_set_mem_functions (19715a6)
+ o In the kqueue backend, do not report EBADF as an EV_READ (5d7bfa1 Nicholas Marriott)
+
+BUGFIXES (evbuffer and bufferevents):
+ o Fix behavior of evbuffer_peek(buf,-1,NULL,NULL,0) (c986f23 Zack Weinberg)
+ o Loop on filtering SSL reads until we are blocked or exhausted. (5b4b812)
+
+BUGFIXES (evhttp):
+ o Force strict validation of HTTP version in response. (790f6b3 Catalin Patulea)
+
+BUGFIXES (evdns):
+ o evdns: fix a bug in circular-queue implementation (d6094b1)
+
+BUILD FIXES:
+ o Fix a silly compilation error with the sun compiler (1927776 Colin Watt)
+ o Suppress a gcc warning from ignoring fwrite return in http-sample.c (7206e8c)
+
+DOCUMENTATION FIXES:
+ o Slightly clarify evbuffer_peek documentation (7bbf6ca)
+ o Update copyright notices to 2012 (e49e289)
+
+NEW APIS:
+ o Backport evhttp_connection_get_bufferevent to Libevent 2.0 (da70fa7 Arno Bakker)
+
+TESTS AND TEST FIXES:
+ o Fix a race condition in the dns/bufferevent_connect_hostname test. (cba48c7)
+ o Add function to check referential integrity of an event_base (27737d5)
+ o Check event_base correctness at end of each unit test (3312b02)
+ o Workaround in the unit tests for an apparent epoll bug in Linux 3.2 (dab9187)
+ o Better workaround for Linux 3.2 edge-triggered epoll bug (9f9e259)
+
+Changes in version 2.0.16-stable (18 Nov 2011)
+BUGFIXES (core):
+ o More detailed message in case of libevent self-debugging failure. (9e6a4ef Leonid Evdokimov)
+ o epoll: close fd on alloc fail at initialization (1aee718 Jamie Iles)
+ o Fix compile warning from saying event2/*.h inside a comment (447b0ba)
+ o Warn when unable to construct base because of failing make_base_notifiable (4e797f3)
+ o Don't try to make notifiable event_base when no threading fns are configured (e787413)
+
+BUGFIXES (evbuffer):
+ o unit test for remove_buffer bug (90bd620 Greg Hazel)
+ o Fix an evbuffer crash in evbuffer_remove_buffer() (c37069c)
+
+BUGFIXES (bufferevent_openssl):
+ o Refactor amount-to-read calculations in buffervent_ssl consider_reading() (a186e73 Mark Ellzey)
+ o Move SSL rate-limit enforcement into bytes_to_read() (96c562f)
+ o Avoid spinning on OpenSSL reads (2aa036f Mark Ellzey)
+
+BUGFIXES (dns)
+ o Empty DNS reply with OK status is another way to say NODATA. (21a08d6 Leonid Evdokimov)
+
+TESTING:
+ o Tests for 94fba5b and f72e8f6 (d58c15e Leonid Evdokimov)
+ o Test for commit aff6ba1 (f7841bf Leonid Evdokimov)
+ o Style and comment tweaks for dns/leak* tests (5e42202)
+ o improve test to remove at least one buffer from src (7eb52eb Greg Hazel)
+
+DOCUMENTATION:
+ o Add note about evhttp_send_reply_end to its doxygen (724bfb5)
+ o Update copyright dates to 2011. (3c824bd)
+ o Fix typo in whatsnew-2.0.txt (674bc6a Mansour Moufid)
+ o Improve win32 behavior of dns-sample.c code (a3f320e Gisle Vanem)
+
+
+
+Changes in version 2.0.15-stable (12 Oct 2011)
+BUGFIXES (DNS):
+ o DNS: add ttl for negative answers using RFC 2308 idea. (f72e8f6 Leonid Evdokimov)
+ o Add DNS_ERR_NODATA error code to handle empty replies. (94fba5b Leonid Evdokimov)
+
+BUFGIXES (bufferevents and evbuffers):
+ o Make evbuffer callbacks get the right n_added value after evbuffer_add (1ef1f68 Alex)
+ o Prefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work with SSL. (0ba0af9)
+
+BUGFIXES (event loop):
+ o When a signal callback is activated to run multiple times, allow event_base_loopbreak to work even before they all have run. (4e8eb6a)
+
+DOCUMENTATION FIXES:
+ o Fix docstring in dns.h (2b6eae5 Leonid Evdokimov)
+ o refer to non-deprecated evdns functions in comments (ba5c27d Greg Hazel)
+
+BUILD AND TESTING FIXES:
+ o le-proxy and regress depend on openssl directly (9ae061a Sergey Avseyev)
+ o Use _SOURCES, not _sources, in sample/Makefile.am (7f82382)
+ o Fixed compiler warnings for unchecked read/write calls. (c3b62fd Mark Ellzey)
+ o Make write-checking fixes use tt_fail_perror (2b76847)
+ o Fix some "value never used" warnings with gcc 4.6.1 (39c0cf7)
+
+
+
+Changes in version 2.0.14-stable (31 Aug 2011)
+BUGFIXES (bufferevents and evbuffers):
+ o Propagate errors on the underlying bufferevent to the user. (4a34394 Joachim Bauch)
+ o Ignore OpenSSL deprecation warnings on OS X (5d1b255 Sebastian Hahn)
+ o Fix handling of group rate limits under 64 bytes of burst (6d5440e)
+ o Solaris sendfile: correctly detect amount of data sent (643922e Michael Herf)
+ o Make rate limiting work with common_timeout logic (5b18f13)
+ o clear read watermark on underlying bufferevent when creating filtering bev to fix potentially failing fragmented ssl handshakes (54f7e61 Joachim Bauch)
+
+BUGFIXES (IOCP):
+ o IOCP: don't launch reads or writes on an unconnected socket (495c227)
+ o Make IOCP rate-limiting group support stricter and less surprising. (a98da7b)
+ o Have test-ratelim.c support IOCP (0ff2c5a)
+ o Make overlapped reads result in evbuffer callbacks getting invoked (6acfbdd)
+ o Correctly terminate IO on an async bufferevent on bufferevent_free (e6af35d)
+
+BUGFIXES (other):
+ o Fix evsig_dealloc memory leak with debugging turned on. (9b724b2 Leonid Evdokimov)
+ o Fix request_finished memory leak with debugging turned on. (aff6ba1 Leonid Evdokimov)
+
+BUILD AND TESTING FIXES:
+ o Allow OS-neutral builds for platforms where some versions have arc4random_buf (b442302 Mitchell Livingston)
+ o Try to fix 'make distcheck' errors when building out-of-tree (04656ea Dave Hart)
+ o Clean up some problems identified by Coverity. (7c11e51 Harlan Stenn)
+
+
+Changes in version 2.0.13-stable (18 Jul 2011)
+BUGFIXES
+ o Avoid race-condition when initializing global locks (b683cae)
+ o Fix bug in SSL bufferevents backed by a bev with a write high-watermarks (e050703 Joachim Bauch)
+ o Speed up invoke_callbacks on evbuffers when there are no callbacks (f87f568 Mark Ellzey)
+ o Avoid a segfault when all methods are disabled or broken (27ce38b)
+ o Fix incorrect results from evbuffer_search_eol(EOL_LF) (4461f1a)
+ o Add some missing checks for mm_calloc failures (89d5e09)
+ o Replace an assertion for event_base_free(NULL) with a check-and-warn (09fe97d)
+ o Report kqueue ebadf, epipe, and eperm as EV_READ events (1fd34ab)
+ o Check if the `evhttp_new_object' function in `http.c' returns NULL. (446cc7a Mansour Moufid)
+ o Use the correct printf args when formatting size_t (3203f88)
+ o Complain if the caller tries to change threading cbs after setting them (cb6ecee)
+
+DOCUMENTATION FIXES AND IMPROVEMENTS
+ o Revise the event/evbuffer/bufferevent doxygen for clarity and accuracy (2888fac)
+ o Update Doxyfile to produce more useful output (aea0555)
+
+TEST FIXES
+ o Fix up test_evutil_snprintf (caf695a)
+ o Fix tinytest invocation from windows shell (57def34 Ed Day)
+
+BUILD FIXES
+ o Use AM_CPPFLAGS in sample/Makefile.am, not AM_CFLAGS (4a5c82d)
+ o Fix select.c compilation on systems with no NFDBITS (49d1136)
+ o Fix a few warnings on OpenBSD (8ee9f9c Nicholas Marriott)
+ o Don't break when building tests from git without python installed (b031adf)
+ o Don't install event_rpcgen.py when --disable-libevent-install is used (e23cda3 Harlan Stenn)
+ o Fix AIX build issue with TAILQ_FOREACH definition (e934096)
+
+
+Changes in version 2.0.12-stable (4 Jun 2011)
+BUGFIXES
+ o Fix a warn-and-fail bug in kqueue by providing kevent() room to report errors (28317a0)
+ o Fix an assert-inducing fencepost bug in the select backend (d90149d)
+ o Fix failing http assertion introducd in commit 0d6622e (0848814 Kevin Ko)
+ o Fix a bug that prevented us from configuring IPv6 nameservers. (74760f1)
+ o Prevent size_t overflow in evhttp_htmlescape. (06c51cd Mansour Moufid)
+ o Added several checks for under/overflow conditions in evhttp_handle_chunked_read (a279272 Mark Ellzey)
+ o Added overflow checks in evhttp_read_body and evhttp_get_body (84560fc Mark Ellzey)
+
+DOCUMENTATION:
+ o Add missing words to EVLOOP_NONBLOCK documentation (9556a7d)
+
+BUILD FIXES
+ o libssl depends on libcrypto, not the other way around. (274dd03 Peter Rosin)
+ o Libtool brings in the dependencies of libevent_openssl.la automatically (7b819f2 Peter Rosin)
+ o Use OPENSSL_LIBS in Makefile.am (292092e Sebastian Hahn)
+ o Move the win32 detection in configure.in (ceb03b9 Sebastian Hahn)
+ o Correctly detect openssl on windows (6619385 Sebastian Hahn)
+ o Fix a compile warning with zlib 1.2.4 and 1.2.5 (5786b91 Sebastian Hahn)
+ o Fix compilation with GCC 2, which had no __builtin_expect (09d39a1 Dave Hart)
+ o Fix new warnings from GCC 4.6 (06a714f)
+ o Link with -lshell32 and -ladvapi32 on Win32. (86090ee Peter Rosin)
+ o Make the tests build when OpenSSL is not available. (07c41be Peter Rosin)
+ o Bring in the compile script from automake, if needed. (f3c7a4c Peter Rosin)
+ o MSVC does not provide S_ISDIR, so provide it manually. (70be7d1 Peter Rosin)
+ o unistd.h and sys/time.h might not exist. (fe93022 Peter Rosin)
+ o Make sure TINYTEST_LOCAL is defined when building tinytest.c (8fa030c Peter Rosin)
+ o Fix winsock2.h #include issues with MSVC (3d768dc Peter Rosin)
+ o Use evutil_gettimeofday instead of relying on the system gettimeofday. (0de87fe Peter Rosin)
+ o Always use evutil_snprintf, even if OS provides it (d1b2d11 Sebastian Hahn)
+ o InitializeCriticalSectionAndSpinCount requires _WIN32_WINNT >= 0x0403. (816115a Peter Rosin)
+ o cygwin: make it possible to build DLLs (d54d3fc)
+
+
+
+Changes in version 2.0.11-stable (27 Apr 2011)
+ [Autogenerated from the Git log, sorted and cleaned by hand.]
+BUGFIXES:
+ o Fix evport handling of POLLHUP and POLLERR (b42ce4b)
+ o Fix compilation on Windows with NDEBUG (cb8059d)
+ o Check for POLLERR, POLLHUP and POLLNVAL for Solaris event ports (0144886 Trond Norbye)
+ o Detect and handle more allocation failures. (666b096 Jardel Weyrich)
+ o Use event_err() only if the failure is truly unrecoverable. (3f8d22a Jardel Weyrich)
+ o Handle resize failures in the select backend better. (83e805a)
+ o Correctly free selectop fields when select_resize fails in select_init (0c0ec0b)
+ o Make --enable-gcc-warnings a no-op if not using gcc (3267703)
+ o Fix a type error in our (unused) arc4random_stir() (f736198)
+ o Correctly detect and stop non-chunked http requests when the body is too long (63a715e)
+ o Have event_base_gettimeofday_cached() always return wall-clock time (a459ef7)
+ o Workaround for http crash bug 3078187 (5dc5662 Tomash Brechko)
+ o Fix incorrect assertions and possible use-after-free in evrpc_free() (4b8f02f Christophe Fillot)
+ o Reset outgoing http connection when read data in idle state. (272823f Tomash Brechko)
+ o Fix subtle recursion in evhttp_connection_cb_cleanup(). (218cf19 Tomash Brechko)
+ o Fix the case when failed evhttp_make_request() leaved request in the queue. (0d6622e Tomash Brechko)
+ o Fix a crash bug in evdns server circular list code (00e91b3)
+ o Handle calloc failure in evdns. (Found by Dave Hart) (364291e)
+ o Fix a memory leak on win32 socket->event map. (b4f89f0)
+ o Add a forgotten NULL check to evhttp_parse_headers (12311ff Sebastian Hahn)
+ o Fix possible NULL-deref in evdns_cancel_request (5208544 Sebastian Hahn)
+
+PORTABILITY:
+ o Fall back to sscanf if we have no other way to implement strtoll (453317b)
+ o Build correctly on platforms without sockaddr_storage (9184563)
+ o Try to build correctly on platforms with no IPv6 support (713c254)
+ o Build on systems without AI_PASSIVE (cb92113)
+ o Fix http unit test on non-windows platforms without getaddrinfo (6092f12)
+ o Do not check for gethostbyname_r versions if we have getaddrinfo (c1260b0)
+ o Include arpa/inet.h as needed on HPUX (10c834c Harlan Stenn)
+ o Include util-internal.h as needed to build on platforms with no sockaddr_storage (bbf5515 Harlan Stenn)
+ o Check for getservbyname even if not on win32. (af08a94 Harlan Stenn)
+ o Add -D_OSF_SOURCE to fix hpux builds (0b33479 Harlan Stenn)
+ o Check for allocation failures in apply_socktype_protocol_hack (637d17a)
+ o Fix the check for multicast or broadcast addresses in evutil_check_interfaces (1a21d7b)
+ o Avoid a free(NULL) if out-of-memory in evdns_getaddrinfo. Found by Dave Hart (3417f68)
+
+DEFENSIVE PROGRAMMING:
+ o Add compile-time check for AF_UNSPEC==PF_UNSPEC (3c8f4e7)
+
+BUGS IN TESTS:
+ o Fix test.sh output on solaris (b4f89b6 Dave Hart)
+ o Make test-eof fail with a timeout if we never get an eof. (05a2c22 Harlan Stenn)
+ o Use %s with printf in test.sh (039b9bd)
+ o Add an assert to appease clang's static analyzer (b0ff7eb Sebastian Hahn)
+ o Add a forgotten return value check in the unit tests (3819b62 Sebastian Hahn)
+ o Actually send NULL request in http_bad_request_test (b693c32 Sebastian Hahn)
+ o add some (void) casts for unused variables (65707d7 Sebastian Hahn)
+ o Refactor test_getaddrinfo_async_cancel_stress() (48c44a6 Sebastian Hahn)
+ o Be nice and "handle" error return values in sample code (4bac793 Sebastian Hahn)
+ o Check return value of evbuffer_add_cb in tests (93a1abb Sebastian Hahn)
+ o Remote some dead code from dns-example.c (744c745 Sebastian Hahn)
+ o Zero a struct sockaddr_in before using it (646f9fe Sebastian Hahn)
+
+BUILD FIXES:
+ o Fix warnings about AC_LANG_PROGRAM usage (f663112 Sebastian Hahn)
+ o Skip check for zlib if we have no zlib.h (a317c06 Harlan Stenn)
+ o Fix autoconf bracket issues; make check for getaddrinfo include netdb.h (833e5e9 Harlan Stenn)
+ o Correct an AM_CFLAGS to an AM_CPPFLAGS in test/Makefile.am (9c469db Dave Hart)
+ o Fix make distcheck & installation of libevent 1 headers (b5a1f9f Dave Hart)
+ o Fix compilation under LLVM/clang with --enable-gcc-warnings (ad9ff58 Sebastian Hahn)
+
+FEATURES:
+ o Make URI parser able to tolerate nonconformant URIs. (95060b5)
+
+DOCUMENTATION:
+ o Clarify event_set_mem_functions doc (926f816)
+ o Correct evhttp_del_accept_socket documentation on whether socket is closed (f665924)
+ o fix spelling mistake in whatsnew-2.0.txt (deb2f73)
+ o Fix sample/http-server ipv6 fixes (eb692be)
+ o Comment internal headers used in sample code. (4eb281c)
+ o Be explicit about how long event loops run in event.h documentation (f95bafb)
+ o Add comment to configure.in to explain gc-sections test logic (c621359)
+ o Fix a couple of memory leaks in samples/http-server.c. Found by Dave Hart. (2e9f665)
+
+
BUILD IMPROVEMENTS:
Libevent 2.1.2-alpha modernizes Libevent's use of autotools, and makes
diff --git a/sntp/libevent/Makefile.am b/sntp/libevent/Makefile.am
index 58f1f016a81d..3053cc016a52 100644
--- a/sntp/libevent/Makefile.am
+++ b/sntp/libevent/Makefile.am
@@ -38,7 +38,7 @@ RELEASE = -release 2.1
#
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
# UNLESS YOU REALLY REALLY HAVE TO.
-VERSION_INFO = 3:0:0
+VERSION_INFO = 5:0:0
# History: RELEASE VERSION_INFO
# 2.0.1-alpha -- 2.0 1:0:0
@@ -67,6 +67,8 @@ VERSION_INFO = 3:0:0
# 2.1.1-alpha -- 2.1 1:0:0
# 2.1.2-alpha -- 2.1 1:0:0 (should have been 2:0:1)
# 2.1.3-alpha -- 2.1 3:0:0 (ABI changed slightly)
+# 2.1.4-alpha -- 2.1 4:0:0 (ABI changed slightly)
+# 2.1.5-beta -- 2.1 5:0:0 (ABI changed slightly)
# ABI version history for this package effectively restarts every time
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
diff --git a/sntp/libevent/Makefile.in b/sntp/libevent/Makefile.in
index 463ae8cb82d8..4caff8facefb 100644
--- a/sntp/libevent/Makefile.in
+++ b/sntp/libevent/Makefile.in
@@ -66,15 +66,14 @@ host_triplet = @host@
@PTHREADS_TRUE@am__append_2 = libevent_pthreads.pc
@OPENSSL_TRUE@am__append_3 = libevent_openssl.la
@OPENSSL_TRUE@am__append_4 = libevent_openssl.pc
-noinst_PROGRAMS = $(am__EXEEXT_3) $(am__EXEEXT_5)
+noinst_PROGRAMS = $(am__EXEEXT_4) $(am__EXEEXT_6)
EXTRA_PROGRAMS = $(am__EXEEXT_1)
-DIST_COMMON = README $(am__configure_deps) \
- $(am__dist_bin_SCRIPTS_DIST) $(am__include_HEADERS_DIST) \
- $(am__include_event2_HEADERS_DIST) $(am__noinst_HEADERS_DIST) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.h.in $(srcdir)/evconfig-private.h.in \
- $(srcdir)/include/include.am $(srcdir)/libevent.pc.in \
- $(srcdir)/libevent_openssl.pc.in \
+DIST_COMMON = $(am__configure_deps) $(am__dist_bin_SCRIPTS_DIST) \
+ $(am__include_HEADERS_DIST) $(am__include_event2_HEADERS_DIST) \
+ $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(srcdir)/evconfig-private.h.in $(srcdir)/include/include.am \
+ $(srcdir)/libevent.pc.in $(srcdir)/libevent_openssl.pc.in \
$(srcdir)/libevent_pthreads.pc.in $(srcdir)/sample/include.am \
$(srcdir)/test/include.am $(top_srcdir)/configure ChangeLog \
build-aux/compile build-aux/config.guess build-aux/config.sub \
@@ -86,33 +85,33 @@ DIST_COMMON = README $(am__configure_deps) \
@OPENSSL_TRUE@ sample/hostcheck.h \
@OPENSSL_TRUE@ sample/openssl_hostname_validation.h
-@BUILD_REGRESS_TRUE@am__append_8 = $(TESTPROGRAMS)
-@BUILD_REGRESS_TRUE@am__append_9 = test/regress
-@BUILD_REGRESS_TRUE@am__append_10 = test/regress.gen.c test/regress.gen.h
-@PTHREADS_TRUE@am__append_11 = libevent_pthreads.la
-@BUILD_WIN32_TRUE@am__append_12 = test/regress_iocp.c
-@OPENSSL_TRUE@am__append_13 = test/regress_ssl.c
-@OPENSSL_TRUE@am__append_14 = $(OPENSSL_INCS)
-@OPENSSL_TRUE@am__append_15 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
-@STRLCPY_IMPL_TRUE@am__append_16 = strlcpy.c
-@SELECT_BACKEND_TRUE@am__append_17 = select.c
-@POLL_BACKEND_TRUE@am__append_18 = poll.c
-@DEVPOLL_BACKEND_TRUE@am__append_19 = devpoll.c
-@KQUEUE_BACKEND_TRUE@am__append_20 = kqueue.c
-@EPOLL_BACKEND_TRUE@am__append_21 = epoll.c
-@EVPORT_BACKEND_TRUE@am__append_22 = evport.c
-@SIGNAL_SUPPORT_TRUE@am__append_23 = signal.c
-@INSTALL_LIBEVENT_FALSE@am__append_24 = $(EVENT1_HDRS)
+@BUILD_SAMPLES_TRUE@am__append_8 = $(SAMPLES)
+@BUILD_REGRESS_TRUE@am__append_9 = $(TESTPROGRAMS)
+@BUILD_REGRESS_TRUE@am__append_10 = test/regress
+@BUILD_REGRESS_TRUE@am__append_11 = test/regress.gen.c test/regress.gen.h
+@PTHREADS_TRUE@am__append_12 = libevent_pthreads.la
+@BUILD_WIN32_TRUE@am__append_13 = test/regress_iocp.c
+@OPENSSL_TRUE@am__append_14 = test/regress_ssl.c
+@OPENSSL_TRUE@am__append_15 = $(OPENSSL_INCS)
+@OPENSSL_TRUE@am__append_16 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
+@STRLCPY_IMPL_TRUE@am__append_17 = strlcpy.c
+@SELECT_BACKEND_TRUE@am__append_18 = select.c
+@POLL_BACKEND_TRUE@am__append_19 = poll.c
+@DEVPOLL_BACKEND_TRUE@am__append_20 = devpoll.c
+@KQUEUE_BACKEND_TRUE@am__append_21 = kqueue.c
+@EPOLL_BACKEND_TRUE@am__append_22 = epoll.c
+@EVPORT_BACKEND_TRUE@am__append_23 = evport.c
+@SIGNAL_SUPPORT_TRUE@am__append_24 = signal.c
+@INSTALL_LIBEVENT_FALSE@am__append_25 = $(EVENT1_HDRS)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_backport_259_ssizet.m4 \
+ $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/libevent_openssl.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_pkg_config.m4 \
- $(top_srcdir)/m4/openldap-thread-check.m4 \
- $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ntp_pkg_config.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -250,14 +249,15 @@ am__EXEEXT_3 = sample/dns-example$(EXEEXT) \
sample/event-read-fifo$(EXEEXT) sample/hello-world$(EXEEXT) \
sample/http-server$(EXEEXT) sample/signal-test$(EXEEXT) \
sample/time-test$(EXEEXT) $(am__EXEEXT_2)
-am__EXEEXT_4 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
+@BUILD_SAMPLES_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3)
+am__EXEEXT_5 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
test/bench_http$(EXEEXT) test/bench_httpclient$(EXEEXT) \
test/test-changelist$(EXEEXT) test/test-dumpevents$(EXEEXT) \
test/test-eof$(EXEEXT) test/test-closed$(EXEEXT) \
test/test-fdleak$(EXEEXT) test/test-init$(EXEEXT) \
test/test-ratelim$(EXEEXT) test/test-time$(EXEEXT) \
test/test-weof$(EXEEXT) test/regress$(EXEEXT)
-@BUILD_REGRESS_TRUE@am__EXEEXT_5 = $(am__EXEEXT_4)
+@BUILD_REGRESS_TRUE@am__EXEEXT_6 = $(am__EXEEXT_5)
PROGRAMS = $(noinst_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am_sample_dns_example_OBJECTS = sample/dns-example.$(OBJEXT)
@@ -343,7 +343,7 @@ am_test_regress_OBJECTS = test/test_regress-regress.$(OBJEXT) \
test/test_regress-tinytest.$(OBJEXT) $(am__objects_12) \
$(am__objects_13) $(am__objects_14) $(am__objects_15)
test_regress_OBJECTS = $(am_test_regress_OBJECTS)
-am__DEPENDENCIES_3 = $(am__append_11)
+am__DEPENDENCIES_3 = $(am__append_12)
@OPENSSL_TRUE@am__DEPENDENCIES_4 = libevent_openssl.la \
@OPENSSL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
test_regress_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la \
@@ -568,8 +568,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_11)
+PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_12)
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -584,6 +585,7 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -663,7 +665,7 @@ RELEASE = -release 2.1
#
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
# UNLESS YOU REALLY REALLY HAVE TO.
-VERSION_INFO = 3:0:0
+VERSION_INFO = 5:0:0
# History: RELEASE VERSION_INFO
# 2.0.1-alpha -- 2.0 1:0:0
@@ -692,6 +694,8 @@ VERSION_INFO = 3:0:0
# 2.1.1-alpha -- 2.1 1:0:0
# 2.1.2-alpha -- 2.1 1:0:0 (should have been 2:0:1)
# 2.1.3-alpha -- 2.1 3:0:0 (ABI changed slightly)
+# 2.1.4-alpha -- 2.1 4:0:0 (ABI changed slightly)
+# 2.1.5-beta -- 2.1 5:0:0 (ABI changed slightly)
# ABI version history for this package effectively restarts every time
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
@@ -744,12 +748,12 @@ noinst_HEADERS = $(am__append_5) $(am__append_7) test/regress.h \
iocp-internal.h ipv6-internal.h kqueue-internal.h \
log-internal.h minheap-internal.h mm-internal.h \
ratelim-internal.h ratelim-internal.h strlcpy-internal.h \
- time-internal.h util-internal.h $(am__append_24)
+ time-internal.h util-internal.h $(am__append_25)
CLEANFILES = test/rpcgen-attempted
DISTCLEANFILES = test/test-script.sh test/regress.gen.c \
test/regress.gen.h *~ libevent.pc \
./include/event2/event-config.h
-BUILT_SOURCES = $(am__append_10) include/event2/event-config.h
+BUILT_SOURCES = $(am__append_11) include/event2/event-config.h
include_event2dir = $(includedir)/event2
EVENT2_EXPORT = \
include/event2/buffer.h \
@@ -853,14 +857,14 @@ test_regress_SOURCES = test/regress.c test/regress.gen.c \
test/regress_minheap.c test/regress_rpc.c \
test/regress_testutils.c test/regress_testutils.h \
test/regress_util.c test/tinytest.c $(regress_thread_SOURCES) \
- $(regress_zlib_SOURCES) $(am__append_12) $(am__append_13)
+ $(regress_zlib_SOURCES) $(am__append_13) $(am__append_14)
@BUILD_WIN32_TRUE@regress_thread_SOURCES = test/regress_thread.c
@PTHREADS_TRUE@regress_thread_SOURCES = test/regress_thread.c
@ZLIB_REGRESS_TRUE@regress_zlib_SOURCES = test/regress_zlib.c
test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la \
- $(PTHREAD_LIBS) $(ZLIB_LIBS) $(am__append_15)
+ $(PTHREAD_LIBS) $(ZLIB_LIBS) $(am__append_16)
test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) \
- $(ZLIB_CFLAGS) -Itest $(am__append_14)
+ $(ZLIB_CFLAGS) -Itest $(am__append_15)
test_regress_LDFLAGS = $(PTHREAD_CFLAGS)
test_bench_SOURCES = test/bench.c
test_bench_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
@@ -872,17 +876,17 @@ test_bench_httpclient_SOURCES = test/bench_httpclient.c
test_bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la
@BUILD_WIN32_FALSE@SYS_LIBS =
@BUILD_WIN32_TRUE@SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
-@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_16) $(am__append_17) \
-@BUILD_WIN32_FALSE@ $(am__append_18) $(am__append_19) \
-@BUILD_WIN32_FALSE@ $(am__append_20) $(am__append_21) \
-@BUILD_WIN32_FALSE@ $(am__append_22) $(am__append_23)
+@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_17) $(am__append_18) \
+@BUILD_WIN32_FALSE@ $(am__append_19) $(am__append_20) \
+@BUILD_WIN32_FALSE@ $(am__append_21) $(am__append_22) \
+@BUILD_WIN32_FALSE@ $(am__append_23) $(am__append_24)
@BUILD_WIN32_TRUE@SYS_SRC = win32select.c evthread_win32.c \
@BUILD_WIN32_TRUE@ buffer_iocp.c event_iocp.c \
-@BUILD_WIN32_TRUE@ bufferevent_async.c $(am__append_16) \
-@BUILD_WIN32_TRUE@ $(am__append_17) $(am__append_18) \
-@BUILD_WIN32_TRUE@ $(am__append_19) $(am__append_20) \
-@BUILD_WIN32_TRUE@ $(am__append_21) $(am__append_22) \
-@BUILD_WIN32_TRUE@ $(am__append_23)
+@BUILD_WIN32_TRUE@ bufferevent_async.c $(am__append_17) \
+@BUILD_WIN32_TRUE@ $(am__append_18) $(am__append_19) \
+@BUILD_WIN32_TRUE@ $(am__append_20) $(am__append_21) \
+@BUILD_WIN32_TRUE@ $(am__append_22) $(am__append_23) \
+@BUILD_WIN32_TRUE@ $(am__append_24)
@BUILD_WIN32_FALSE@SYS_INCLUDES =
@BUILD_WIN32_TRUE@SYS_INCLUDES = -IWIN32-Code -IWIN32-Code/nmake
CORE_SRC = \
diff --git a/sntp/libevent/README b/sntp/libevent/README
deleted file mode 100644
index 2723a2cac0c3..000000000000
--- a/sntp/libevent/README
+++ /dev/null
@@ -1,218 +0,0 @@
-0. BUILDING AND INSTALLATION (Briefly)
-
-$ ./configure
-$ make
-$ make verify # (optional)
-$ sudo make install
-
-1. BUILDING AND INSTALLATION (In Depth)
-
-To build libevent, type
-
-$ ./configure && make
-
- (If you got libevent from the git repository, you will
- first need to run the included "autogen.sh" script in order to
- generate the configure script.)
-
-You can run the regression tests by running
-
-$ make verify
-
-Install as root via
-
-# make install
-
-Before reporting any problems, please run the regression tests.
-
-To enable the low-level tracing build the library as:
-
- CFLAGS=-DUSE_DEBUG ./configure [...]
-
-Standard configure flags should work. In particular, see:
-
- --disable-shared Only build static libraries
- --prefix Install all files relative to this directory.
-
-
-The configure script also supports the following flags:
-
- --enable-gcc-warnings Enable extra compiler checking with GCC.
- --disable-malloc-replacement
- Don't let applications replace our memory
- management functions
- --disable-openssl Disable support for OpenSSL encryption.
- --disable-thread-support Don't support multithreaded environments.
-
-2. USEFUL LINKS:
-
-For the latest released version of Libevent, see the official website at
-http://libevent.org/ .
-
-There's a pretty good work-in-progress manual up at
- http://www.wangafu.net/~nickm/libevent-book/ .
-
-For the latest development versions of Libevent, access our Git repository
-via
- "git clone git://levent.git.sourceforge.net/gitroot/levent/libevent"
-
-You can browse the git repository online at
-http://levent.git.sourceforge.net/git/gitweb-index.cgi .
-
-To report bugs, request features, or submit patches to Libevent,
-use the Sourceforge trackers at
-https://sourceforge.net/tracker/?group_id=50884 .
-
-There's also a libevent-users mailing list for talking about Libevent
-use and development: http://archives.seul.org/libevent/users/
-
-3. ACKNOWLEDGMENTS
-
-The following people have helped with suggestions, ideas, code or
-fixing bugs:
-
- Samy Al Bahra
- Jacob Appelbaum
- Arno Bakker
- Weston Andros Adamson
- William Ahern
- Ivan Andropov
- Sergey Avseyev
- Avi Bab
- Joachim Bauch
- Gilad Benjamini
- Stas Bekman
- Denis Bilenko
- Julien Blache
- Kevin Bowling
- Tomash Brechko
- Kelly Brock
- Ralph Castain
- Adrian Chadd
- Lawnstein Chan
- Shuo Chen
- Ka-Hing Cheung
- Andrew Cox
- Paul Croome
- George Danchev
- Andrew Danforth
- Ed Day
- Christopher Davis
- Mike Davis
- Antony Dovgal
- Mihai Draghicioiu
- Alexander Drozdov
- Mark Ellzey
- Shie Erlich
- Leonid Evdokimov
- Juan Pablo Fernandez
- Christophe Fillot
- Mike Frysinger
- Remi Gacogne
- Artem Germanov
- Alexander von Gernler
- Artur Grabowski
- Diwaker Gupta
- Sebastian Hahn
- Dave Hart
- Greg Hazel
- Michael Herf
- Sebastian Hahn
- Savg He
- Mark Heily
- Michael Herf
- Greg Hewgill
- Andrew Hochhaus
- Aaron Hopkins
- Tani Hosokawa
- Jamie Iles
- Claudio Jeker
- Evan Jones
- George Kadianakis
- Phua Keat
- Azat Khuzhin
- Alexander Klauer
- Kevin Ko
- Brian Koehmstedt
- Marko Kreen
- Valery Kyholodov
- Ross Lagerwall
- Scott Lamb
- Christopher Layne
- Adam Langley
- Graham Leggett
- Philip Lewis
- Zhou Li
- David Libenzi
- Yan Lin
- Moshe Litvin
- Simon Liu
- Mitchell Livingston
- Hagne Mahre
- Lubomir Marinov
- Abilio Marques
- Abel Mathew
- Nick Mathewson
- James Mansion
- Nicholas Marriott
- Andrey Matveev
- Caitlin Mercer
- Dagobert Michelsen
- Andrea Montefusco
- Mansour Moufid
- Mina Naguib
- Felix Nawothnig
- Trond Norbye
- Linus Nordberg
- Richard Nyberg
- Jon Oberheide
- Phil Oleson
- Dave Pacheco
- Derrick Pallas
- Tassilo von Parseval
- Catalin Patulea
- Patrick Pelletier
- Simon Perreault
- Pierre Phaneuf
- Amarin Phaosawasdi
- Ryan Phillips
- Dimitre Piskyulev
- Pavel Plesov
- Jon Poland
- Roman Puls
- Nate R
- Robert Ransom
- Bert JW Regeer
- Peter Rosin
- Maseeb Abdul Qadir
- Wang Qin
- Alex S
- Hanna Schroeter
- Ralf Schmitt
- Mike Smellie
- Kevin Springborn
- Nir Soffer
- Harlan Stenn
- Steve Snyder
- Dug Song
- Dongsheng Song
- Hannes Sowa
- Ferenc Szalai
- Brodie Thiesfield
- Jason Toffaletti
- Gisle Vanem
- Bas Verhoeven
- Constantine Verutin
- Colin Watt
- Zack Weinberg
- Jardel Weyrich
- Jay R. Wren
- Zack Weinberg
- Alejo
- Alex
- Taral
- propanbutan
- mmadia
- yangacer
-
-If we have forgotten your name, please contact us.
diff --git a/sntp/libevent/WIN32-Code/nmake/event2/event-config.h b/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
index da550283adf4..8cbf1902891f 100644
--- a/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
+++ b/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
@@ -274,7 +274,7 @@
/* #undef EVENT__HAVE_WORKING_KQUEUE */
/* Numeric representation of the version */
-#define EVENT__NUMERIC_VERSION 0x02010301
+#define EVENT__NUMERIC_VERSION 0x02010500
/* Name of package */
#define EVENT__PACKAGE "libevent"
@@ -331,7 +331,7 @@
#define EVENT__TIME_WITH_SYS_TIME 1
/* Version number of package */
-#define EVENT__VERSION "2.1.3-alpha-dev"
+#define EVENT__VERSION "2.1.5-beta"
/* Define to appropriate substitue if compiler doesnt have __func__ */
#define EVENT____func__ __FUNCTION__
diff --git a/sntp/libevent/WIN32-Code/tree.h b/sntp/libevent/WIN32-Code/tree.h
index 585618dde0c0..2ccfbf20ac91 100644
--- a/sntp/libevent/WIN32-Code/tree.h
+++ b/sntp/libevent/WIN32-Code/tree.h
@@ -675,680 +675,3 @@ name##_RB_MINMAX(struct name *head, int val) \
(x) = name##_RB_NEXT(x))
#endif /* _SYS_TREE_H_ */
-/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
-/*
- * Copyright 2002 Niels Provos <provos@citi.umich.edu>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SYS_TREE_H_
-#define _SYS_TREE_H_
-
-/*
- * This file defines data structures for different types of trees:
- * splay trees and red-black trees.
- *
- * A splay tree is a self-organizing data structure. Every operation
- * on the tree causes a splay to happen. The splay moves the requested
- * node to the root of the tree and partly rebalances it.
- *
- * This has the benefit that request locality causes faster lookups as
- * the requested nodes move to the top of the tree. On the other hand,
- * every lookup causes memory writes.
- *
- * The Balance Theorem bounds the total access time for m operations
- * and n inserts on an initially empty tree as O((m + n)lg n). The
- * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
- *
- * A red-black tree is a binary search tree with the node color as an
- * extra attribute. It fulfills a set of conditions:
- * - every search path from the root to a leaf consists of the
- * same number of black nodes,
- * - each red node (except for the root) has a black parent,
- * - each leaf node is black.
- *
- * Every operation on a red-black tree is bounded as O(lg n).
- * The maximum height of a red-black tree is 2lg (n+1).
- */
-
-#define SPLAY_HEAD(name, type) \
-struct name { \
- struct type *sph_root; /* root of the tree */ \
-}
-
-#define SPLAY_INITIALIZER(root) \
- { NULL }
-
-#define SPLAY_INIT(root) do { \
- (root)->sph_root = NULL; \
-} while (0)
-
-#define SPLAY_ENTRY(type) \
-struct { \
- struct type *spe_left; /* left element */ \
- struct type *spe_right; /* right element */ \
-}
-
-#define SPLAY_LEFT(elm, field) (elm)->field.spe_left
-#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right
-#define SPLAY_ROOT(head) (head)->sph_root
-#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL)
-
-/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
-#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
- (head)->sph_root = tmp; \
-} while (0)
-
-#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
- (head)->sph_root = tmp; \
-} while (0)
-
-#define SPLAY_LINKLEFT(head, tmp, field) do { \
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
- tmp = (head)->sph_root; \
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
-} while (0)
-
-#define SPLAY_LINKRIGHT(head, tmp, field) do { \
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
- tmp = (head)->sph_root; \
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
-} while (0)
-
-#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \
- SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
- SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
-} while (0)
-
-/* Generates prototypes and inline functions */
-
-#define SPLAY_PROTOTYPE(name, type, field, cmp) \
-void name##_SPLAY(struct name *, struct type *); \
-void name##_SPLAY_MINMAX(struct name *, int); \
-struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
-struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
- \
-/* Finds the node with the same key as elm */ \
-static __inline struct type * \
-name##_SPLAY_FIND(struct name *head, struct type *elm) \
-{ \
- if (SPLAY_EMPTY(head)) \
- return(NULL); \
- name##_SPLAY(head, elm); \
- if ((cmp)(elm, (head)->sph_root) == 0) \
- return (head->sph_root); \
- return (NULL); \
-} \
- \
-static __inline struct type * \
-name##_SPLAY_NEXT(struct name *head, struct type *elm) \
-{ \
- name##_SPLAY(head, elm); \
- if (SPLAY_RIGHT(elm, field) != NULL) { \
- elm = SPLAY_RIGHT(elm, field); \
- while (SPLAY_LEFT(elm, field) != NULL) { \
- elm = SPLAY_LEFT(elm, field); \
- } \
- } else \
- elm = NULL; \
- return (elm); \
-} \
- \
-static __inline struct type * \
-name##_SPLAY_MIN_MAX(struct name *head, int val) \
-{ \
- name##_SPLAY_MINMAX(head, val); \
- return (SPLAY_ROOT(head)); \
-}
-
-/* Main splay operation.
- * Moves node close to the key of elm to top
- */
-#define SPLAY_GENERATE(name, type, field, cmp) \
-struct type * \
-name##_SPLAY_INSERT(struct name *head, struct type *elm) \
-{ \
- if (SPLAY_EMPTY(head)) { \
- SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \
- } else { \
- int __comp; \
- name##_SPLAY(head, elm); \
- __comp = (cmp)(elm, (head)->sph_root); \
- if(__comp < 0) { \
- SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
- SPLAY_RIGHT(elm, field) = (head)->sph_root; \
- SPLAY_LEFT((head)->sph_root, field) = NULL; \
- } else if (__comp > 0) { \
- SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
- SPLAY_LEFT(elm, field) = (head)->sph_root; \
- SPLAY_RIGHT((head)->sph_root, field) = NULL; \
- } else \
- return ((head)->sph_root); \
- } \
- (head)->sph_root = (elm); \
- return (NULL); \
-} \
- \
-struct type * \
-name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
-{ \
- struct type *__tmp; \
- if (SPLAY_EMPTY(head)) \
- return (NULL); \
- name##_SPLAY(head, elm); \
- if ((cmp)(elm, (head)->sph_root) == 0) { \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
- } else { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
- name##_SPLAY(head, elm); \
- SPLAY_RIGHT((head)->sph_root, field) = __tmp; \
- } \
- return (elm); \
- } \
- return (NULL); \
-} \
- \
-void \
-name##_SPLAY(struct name *head, struct type *elm) \
-{ \
- struct type __node, *__left, *__right, *__tmp; \
- int __comp; \
-\
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
- __left = __right = &__node; \
-\
- while ((__comp = (cmp)(elm, (head)->sph_root))) { \
- if (__comp < 0) { \
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if ((cmp)(elm, __tmp) < 0){ \
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKLEFT(head, __right, field); \
- } else if (__comp > 0) { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if ((cmp)(elm, __tmp) > 0){ \
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKRIGHT(head, __left, field); \
- } \
- } \
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
-} \
- \
-/* Splay with either the minimum or the maximum element \
- * Used to find minimum or maximum element in tree. \
- */ \
-void name##_SPLAY_MINMAX(struct name *head, int __comp) \
-{ \
- struct type __node, *__left, *__right, *__tmp; \
-\
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
- __left = __right = &__node; \
-\
- while (1) { \
- if (__comp < 0) { \
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if (__comp < 0){ \
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKLEFT(head, __right, field); \
- } else if (__comp > 0) { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if (__comp > 0) { \
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKRIGHT(head, __left, field); \
- } \
- } \
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
-}
-
-#define SPLAY_NEGINF -1
-#define SPLAY_INF 1
-
-#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
-#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
-#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
-#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
-#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
- : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
-#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
- : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
-
-#define SPLAY_FOREACH(x, name, head) \
- for ((x) = SPLAY_MIN(name, head); \
- (x) != NULL; \
- (x) = SPLAY_NEXT(name, head, x))
-
-/* Macros that define a red-back tree */
-#define RB_HEAD(name, type) \
-struct name { \
- struct type *rbh_root; /* root of the tree */ \
-}
-
-#define RB_INITIALIZER(root) \
- { NULL }
-
-#define RB_INIT(root) do { \
- (root)->rbh_root = NULL; \
-} while (0)
-
-#define RB_BLACK 0
-#define RB_RED 1
-#define RB_ENTRY(type) \
-struct { \
- struct type *rbe_left; /* left element */ \
- struct type *rbe_right; /* right element */ \
- struct type *rbe_parent; /* parent element */ \
- int rbe_color; /* node color */ \
-}
-
-#define RB_LEFT(elm, field) (elm)->field.rbe_left
-#define RB_RIGHT(elm, field) (elm)->field.rbe_right
-#define RB_PARENT(elm, field) (elm)->field.rbe_parent
-#define RB_COLOR(elm, field) (elm)->field.rbe_color
-#define RB_ROOT(head) (head)->rbh_root
-#define RB_EMPTY(head) (RB_ROOT(head) == NULL)
-
-#define RB_SET(elm, parent, field) do { \
- RB_PARENT(elm, field) = parent; \
- RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \
- RB_COLOR(elm, field) = RB_RED; \
-} while (0)
-
-#define RB_SET_BLACKRED(black, red, field) do { \
- RB_COLOR(black, field) = RB_BLACK; \
- RB_COLOR(red, field) = RB_RED; \
-} while (0)
-
-#ifndef RB_AUGMENT
-#define RB_AUGMENT(x)
-#endif
-
-#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \
- (tmp) = RB_RIGHT(elm, field); \
- if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) { \
- RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \
- } \
- RB_AUGMENT(elm); \
- if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \
- if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
- RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
- else \
- RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
- } else \
- (head)->rbh_root = (tmp); \
- RB_LEFT(tmp, field) = (elm); \
- RB_PARENT(elm, field) = (tmp); \
- RB_AUGMENT(tmp); \
- if ((RB_PARENT(tmp, field))) \
- RB_AUGMENT(RB_PARENT(tmp, field)); \
-} while (0)
-
-#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \
- (tmp) = RB_LEFT(elm, field); \
- if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) { \
- RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \
- } \
- RB_AUGMENT(elm); \
- if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \
- if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
- RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
- else \
- RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
- } else \
- (head)->rbh_root = (tmp); \
- RB_RIGHT(tmp, field) = (elm); \
- RB_PARENT(elm, field) = (tmp); \
- RB_AUGMENT(tmp); \
- if ((RB_PARENT(tmp, field))) \
- RB_AUGMENT(RB_PARENT(tmp, field)); \
-} while (0)
-
-/* Generates prototypes and inline functions */
-#define RB_PROTOTYPE(name, type, field, cmp) \
-void name##_RB_INSERT_COLOR(struct name *, struct type *); \
-void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
-struct type *name##_RB_REMOVE(struct name *, struct type *); \
-struct type *name##_RB_INSERT(struct name *, struct type *); \
-struct type *name##_RB_FIND(struct name *, struct type *); \
-struct type *name##_RB_NEXT(struct type *); \
-struct type *name##_RB_MINMAX(struct name *, int); \
- \
-
-/* Main rb operation.
- * Moves node close to the key of elm to top
- */
-#define RB_GENERATE(name, type, field, cmp) \
-void \
-name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
-{ \
- struct type *parent, *gparent, *tmp; \
- while ((parent = RB_PARENT(elm, field)) && \
- RB_COLOR(parent, field) == RB_RED) { \
- gparent = RB_PARENT(parent, field); \
- if (parent == RB_LEFT(gparent, field)) { \
- tmp = RB_RIGHT(gparent, field); \
- if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
- RB_COLOR(tmp, field) = RB_BLACK; \
- RB_SET_BLACKRED(parent, gparent, field);\
- elm = gparent; \
- continue; \
- } \
- if (RB_RIGHT(parent, field) == elm) { \
- RB_ROTATE_LEFT(head, parent, tmp, field);\
- tmp = parent; \
- parent = elm; \
- elm = tmp; \
- } \
- RB_SET_BLACKRED(parent, gparent, field); \
- RB_ROTATE_RIGHT(head, gparent, tmp, field); \
- } else { \
- tmp = RB_LEFT(gparent, field); \
- if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
- RB_COLOR(tmp, field) = RB_BLACK; \
- RB_SET_BLACKRED(parent, gparent, field);\
- elm = gparent; \
- continue; \
- } \
- if (RB_LEFT(parent, field) == elm) { \
- RB_ROTATE_RIGHT(head, parent, tmp, field);\
- tmp = parent; \
- parent = elm; \
- elm = tmp; \
- } \
- RB_SET_BLACKRED(parent, gparent, field); \
- RB_ROTATE_LEFT(head, gparent, tmp, field); \
- } \
- } \
- RB_COLOR(head->rbh_root, field) = RB_BLACK; \
-} \
- \
-void \
-name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
-{ \
- struct type *tmp; \
- while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \
- elm != RB_ROOT(head)) { \
- if (RB_LEFT(parent, field) == elm) { \
- tmp = RB_RIGHT(parent, field); \
- if (RB_COLOR(tmp, field) == RB_RED) { \
- RB_SET_BLACKRED(tmp, parent, field); \
- RB_ROTATE_LEFT(head, parent, tmp, field);\
- tmp = RB_RIGHT(parent, field); \
- } \
- if ((RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
- (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
- RB_COLOR(tmp, field) = RB_RED; \
- elm = parent; \
- parent = RB_PARENT(elm, field); \
- } else { \
- if (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
- struct type *oleft; \
- if ((oleft = RB_LEFT(tmp, field)))\
- RB_COLOR(oleft, field) = RB_BLACK;\
- RB_COLOR(tmp, field) = RB_RED; \
- RB_ROTATE_RIGHT(head, tmp, oleft, field);\
- tmp = RB_RIGHT(parent, field); \
- } \
- RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
- RB_COLOR(parent, field) = RB_BLACK; \
- if (RB_RIGHT(tmp, field)) \
- RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
- RB_ROTATE_LEFT(head, parent, tmp, field);\
- elm = RB_ROOT(head); \
- break; \
- } \
- } else { \
- tmp = RB_LEFT(parent, field); \
- if (RB_COLOR(tmp, field) == RB_RED) { \
- RB_SET_BLACKRED(tmp, parent, field); \
- RB_ROTATE_RIGHT(head, parent, tmp, field);\
- tmp = RB_LEFT(parent, field); \
- } \
- if ((RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
- (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
- RB_COLOR(tmp, field) = RB_RED; \
- elm = parent; \
- parent = RB_PARENT(elm, field); \
- } else { \
- if (RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
- struct type *oright; \
- if ((oright = RB_RIGHT(tmp, field)))\
- RB_COLOR(oright, field) = RB_BLACK;\
- RB_COLOR(tmp, field) = RB_RED; \
- RB_ROTATE_LEFT(head, tmp, oright, field);\
- tmp = RB_LEFT(parent, field); \
- } \
- RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
- RB_COLOR(parent, field) = RB_BLACK; \
- if (RB_LEFT(tmp, field)) \
- RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
- RB_ROTATE_RIGHT(head, parent, tmp, field);\
- elm = RB_ROOT(head); \
- break; \
- } \
- } \
- } \
- if (elm) \
- RB_COLOR(elm, field) = RB_BLACK; \
-} \
- \
-struct type * \
-name##_RB_REMOVE(struct name *head, struct type *elm) \
-{ \
- struct type *child, *parent, *old = elm; \
- int color; \
- if (RB_LEFT(elm, field) == NULL) \
- child = RB_RIGHT(elm, field); \
- else if (RB_RIGHT(elm, field) == NULL) \
- child = RB_LEFT(elm, field); \
- else { \
- struct type *left; \
- elm = RB_RIGHT(elm, field); \
- while ((left = RB_LEFT(elm, field))) \
- elm = left; \
- child = RB_RIGHT(elm, field); \
- parent = RB_PARENT(elm, field); \
- color = RB_COLOR(elm, field); \
- if (child) \
- RB_PARENT(child, field) = parent; \
- if (parent) { \
- if (RB_LEFT(parent, field) == elm) \
- RB_LEFT(parent, field) = child; \
- else \
- RB_RIGHT(parent, field) = child; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = child; \
- if (RB_PARENT(elm, field) == old) \
- parent = elm; \
- (elm)->field = (old)->field; \
- if (RB_PARENT(old, field)) { \
- if (RB_LEFT(RB_PARENT(old, field), field) == old)\
- RB_LEFT(RB_PARENT(old, field), field) = elm;\
- else \
- RB_RIGHT(RB_PARENT(old, field), field) = elm;\
- RB_AUGMENT(RB_PARENT(old, field)); \
- } else \
- RB_ROOT(head) = elm; \
- RB_PARENT(RB_LEFT(old, field), field) = elm; \
- if (RB_RIGHT(old, field)) \
- RB_PARENT(RB_RIGHT(old, field), field) = elm; \
- if (parent) { \
- left = parent; \
- do { \
- RB_AUGMENT(left); \
- } while ((left = RB_PARENT(left, field))); \
- } \
- goto color; \
- } \
- parent = RB_PARENT(elm, field); \
- color = RB_COLOR(elm, field); \
- if (child) \
- RB_PARENT(child, field) = parent; \
- if (parent) { \
- if (RB_LEFT(parent, field) == elm) \
- RB_LEFT(parent, field) = child; \
- else \
- RB_RIGHT(parent, field) = child; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = child; \
-color: \
- if (color == RB_BLACK) \
- name##_RB_REMOVE_COLOR(head, parent, child); \
- return (old); \
-} \
- \
-/* Inserts a node into the RB tree */ \
-struct type * \
-name##_RB_INSERT(struct name *head, struct type *elm) \
-{ \
- struct type *tmp; \
- struct type *parent = NULL; \
- int comp = 0; \
- tmp = RB_ROOT(head); \
- while (tmp) { \
- parent = tmp; \
- comp = (cmp)(elm, parent); \
- if (comp < 0) \
- tmp = RB_LEFT(tmp, field); \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- RB_SET(elm, parent, field); \
- if (parent != NULL) { \
- if (comp < 0) \
- RB_LEFT(parent, field) = elm; \
- else \
- RB_RIGHT(parent, field) = elm; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = elm; \
- name##_RB_INSERT_COLOR(head, elm); \
- return (NULL); \
-} \
- \
-/* Finds the node with the same key as elm */ \
-struct type * \
-name##_RB_FIND(struct name *head, struct type *elm) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- int comp; \
- while (tmp) { \
- comp = cmp(elm, tmp); \
- if (comp < 0) \
- tmp = RB_LEFT(tmp, field); \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- return (NULL); \
-} \
- \
-struct type * \
-name##_RB_NEXT(struct type *elm) \
-{ \
- if (RB_RIGHT(elm, field)) { \
- elm = RB_RIGHT(elm, field); \
- while (RB_LEFT(elm, field)) \
- elm = RB_LEFT(elm, field); \
- } else { \
- if (RB_PARENT(elm, field) && \
- (elm == RB_LEFT(RB_PARENT(elm, field), field))) \
- elm = RB_PARENT(elm, field); \
- else { \
- while (RB_PARENT(elm, field) && \
- (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
- elm = RB_PARENT(elm, field); \
- elm = RB_PARENT(elm, field); \
- } \
- } \
- return (elm); \
-} \
- \
-struct type * \
-name##_RB_MINMAX(struct name *head, int val) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- struct type *parent = NULL; \
- while (tmp) { \
- parent = tmp; \
- if (val < 0) \
- tmp = RB_LEFT(tmp, field); \
- else \
- tmp = RB_RIGHT(tmp, field); \
- } \
- return (parent); \
-}
-
-#define RB_NEGINF -1
-#define RB_INF 1
-
-#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
-#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
-#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
-#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
-#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
-#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
-
-#define RB_FOREACH(x, name, head) \
- for ((x) = RB_MIN(name, head); \
- (x) != NULL; \
- (x) = name##_RB_NEXT(x))
-
-#endif /* _SYS_TREE_H_ */
diff --git a/sntp/libevent/aclocal.m4 b/sntp/libevent/aclocal.m4
index 3bba48699b70..4c1c84934719 100644
--- a/sntp/libevent/aclocal.m4
+++ b/sntp/libevent/aclocal.m4
@@ -1131,6 +1131,7 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/ac_backport_259_ssizet.m4])
+m4_include([m4/acx_pthread.m4])
m4_include([m4/libevent_openssl.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
@@ -1138,5 +1139,3 @@ m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
m4_include([m4/ntp_pkg_config.m4])
-m4_include([m4/openldap-thread-check.m4])
-m4_include([m4/openldap.m4])
diff --git a/sntp/libevent/buffer.c b/sntp/libevent/buffer.c
index e603be863f01..a1a2b988c13a 100644
--- a/sntp/libevent/buffer.c
+++ b/sntp/libevent/buffer.c
@@ -158,12 +158,20 @@ evbuffer_chain_new(size_t size)
struct evbuffer_chain *chain;
size_t to_alloc;
+ if (size > EVBUFFER_CHAIN_MAX - EVBUFFER_CHAIN_SIZE)
+ return (NULL);
+
size += EVBUFFER_CHAIN_SIZE;
/* get the next largest memory that can hold the buffer */
- to_alloc = MIN_BUFFER_SIZE;
- while (to_alloc < size)
- to_alloc <<= 1;
+ if (size < EVBUFFER_CHAIN_MAX / 2) {
+ to_alloc = MIN_BUFFER_SIZE;
+ while (to_alloc < size) {
+ to_alloc <<= 1;
+ }
+ } else {
+ to_alloc = size;
+ }
/* we get everything in one chunk */
if ((chain = mm_malloc(to_alloc)) == NULL)
@@ -1133,6 +1141,7 @@ evbuffer_drain(struct evbuffer *buf, size_t len)
}
buf->first = chain;
+ EVUTIL_ASSERT(chain && remaining <= chain->off);
chain->misalign += remaining;
chain->off -= remaining;
}
@@ -1181,6 +1190,10 @@ evbuffer_copyout_from(struct evbuffer *buf, const struct evbuffer_ptr *pos,
EVBUFFER_LOCK(buf);
if (pos) {
+ if (datlen > (size_t)(EV_SSIZE_MAX - pos->pos)) {
+ result = -1;
+ goto done;
+ }
chain = pos->internal_.chain;
pos_in_chain = pos->internal_.pos_in_chain;
if (datlen + pos->pos > buf->total_len)
@@ -1218,6 +1231,8 @@ evbuffer_copyout_from(struct evbuffer *buf, const struct evbuffer_ptr *pos,
if (datlen) {
EVUTIL_ASSERT(chain);
+ EVUTIL_ASSERT(datlen+pos_in_chain <= chain->off);
+
memcpy(data, chain->buffer + chain->misalign + pos_in_chain,
datlen);
}
@@ -1712,6 +1727,10 @@ evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen)
if (buf->freeze_end) {
goto done;
}
+ /* Prevent buf->total_len overflow */
+ if (datlen > EV_SIZE_MAX - buf->total_len) {
+ goto done;
+ }
chain = buf->last;
@@ -1725,7 +1744,10 @@ evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen)
}
if ((chain->flags & EVBUFFER_IMMUTABLE) == 0) {
- remain = (size_t)(chain->buffer_len - chain->misalign - chain->off);
+ /* Always true for mutable buffers */
+ EVUTIL_ASSERT(chain->misalign >= 0 &&
+ (ev_uint64_t)chain->misalign <= EVBUFFER_CHAIN_MAX);
+ remain = chain->buffer_len - (size_t)chain->misalign - chain->off;
if (remain >= datlen) {
/* there's enough space to hold all the data in the
* current last chain */
@@ -1796,6 +1818,9 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
if (buf->freeze_start) {
goto done;
}
+ if (datlen > EV_SIZE_MAX - buf->total_len) {
+ goto done;
+ }
chain = buf->first;
@@ -1808,6 +1833,10 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
/* we cannot touch immutable buffers */
if ((chain->flags & EVBUFFER_IMMUTABLE) == 0) {
+ /* Always true for mutable buffers */
+ EVUTIL_ASSERT(chain->misalign >= 0 &&
+ (ev_uint64_t)chain->misalign <= EVBUFFER_CHAIN_MAX);
+
/* If this chain is empty, we can treat it as
* 'empty at the beginning' rather than 'empty at the end' */
if (chain->off == 0)
@@ -1845,6 +1874,7 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
tmp->next = chain;
tmp->off = datlen;
+ EVUTIL_ASSERT(datlen <= tmp->buffer_len);
tmp->misalign = tmp->buffer_len - datlen;
memcpy(tmp->buffer + tmp->misalign, data, datlen);
@@ -1943,7 +1973,9 @@ evbuffer_expand_singlechain(struct evbuffer *buf, size_t datlen)
/* Would expanding this chunk be affordable and worthwhile? */
if (CHAIN_SPACE_LEN(chain) < chain->buffer_len / 8 ||
- chain->off > MAX_TO_COPY_IN_EXPAND) {
+ chain->off > MAX_TO_COPY_IN_EXPAND ||
+ (datlen < EVBUFFER_CHAIN_MAX &&
+ EVBUFFER_CHAIN_MAX - datlen >= chain->off)) {
/* It's not worth resizing this chain. Can the next one be
* used? */
if (chain->next && CHAIN_SPACE_LEN(chain->next) >= datlen) {
@@ -2071,6 +2103,8 @@ evbuffer_expand_fast_(struct evbuffer *buf, size_t datlen, int n)
rmv_all = 1;
avail = 0;
} else {
+ /* can't overflow, since only mutable chains have
+ * huge misaligns. */
avail = (size_t) CHAIN_SPACE_LEN(chain);
chain = chain->next;
}
@@ -2081,6 +2115,7 @@ evbuffer_expand_fast_(struct evbuffer *buf, size_t datlen, int n)
EVUTIL_ASSERT(chain->off == 0);
evbuffer_chain_free(chain);
}
+ EVUTIL_ASSERT(datlen >= avail);
tmp = evbuffer_chain_new(datlen - avail);
if (tmp == NULL) {
if (rmv_all) {
@@ -2210,6 +2245,7 @@ get_n_bytes_readable_on_socket(evutil_socket_t fd)
unsigned long lng = EVBUFFER_MAX_READ;
if (ioctlsocket(fd, FIONREAD, &lng) < 0)
return -1;
+ /* Can overflow, but mostly harmlessly. XXXX */
return (int)lng;
#elif defined(FIONREAD)
int n = EVBUFFER_MAX_READ;
@@ -2322,8 +2358,14 @@ evbuffer_read(struct evbuffer *buf, evutil_socket_t fd, int howmuch)
#ifdef USE_IOVEC_IMPL
remaining = n;
for (i=0; i < nvecs; ++i) {
- ev_ssize_t space = (ev_ssize_t) CHAIN_SPACE_LEN(*chainp);
- if (space < remaining) {
+ /* can't overflow, since only mutable chains have
+ * huge misaligns. */
+ size_t space = (size_t) CHAIN_SPACE_LEN(*chainp);
+ /* XXXX This is a kludge that can waste space in perverse
+ * situations. */
+ if (space > EVBUFFER_CHAIN_MAX)
+ space = EVBUFFER_CHAIN_MAX;
+ if ((ev_ssize_t)space < remaining) {
(*chainp)->off += space;
remaining -= (int)space;
} else {
@@ -2485,9 +2527,11 @@ evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd,
/* XXX(nickm) Don't disable this code until we know if
* the WSARecv code above works. */
void *p = evbuffer_pullup(buffer, howmuch);
+ EVUTIL_ASSERT(p || !howmuch);
n = send(fd, p, howmuch, 0);
#else
void *p = evbuffer_pullup(buffer, howmuch);
+ EVUTIL_ASSERT(p || !howmuch);
n = write(fd, p, howmuch);
#endif
#ifdef USE_SENDFILE
@@ -2538,6 +2582,8 @@ static int
evbuffer_ptr_subtract(struct evbuffer *buf, struct evbuffer_ptr *pos,
size_t howfar)
{
+ if (pos->pos < 0)
+ return -1;
if (howfar > (size_t)pos->pos)
return -1;
if (pos->internal_.chain && howfar <= pos->internal_.pos_in_chain) {
@@ -2571,12 +2617,17 @@ evbuffer_ptr_set(struct evbuffer *buf, struct evbuffer_ptr *pos,
case EVBUFFER_PTR_ADD:
/* this avoids iterating over all previous chains if
we just want to advance the position */
+ if (pos->pos < 0 || EV_SIZE_MAX - position < (size_t)pos->pos) {
+ EVBUFFER_UNLOCK(buf);
+ return -1;
+ }
chain = pos->internal_.chain;
pos->pos += position;
position = pos->internal_.pos_in_chain;
break;
}
+ EVUTIL_ASSERT(EV_SIZE_MAX - left >= position);
while (chain && position + left >= chain->off) {
left -= chain->off - position;
chain = chain->next;
@@ -2613,7 +2664,9 @@ evbuffer_ptr_memcmp(const struct evbuffer *buf, const struct evbuffer_ptr *pos,
ASSERT_EVBUFFER_LOCKED(buf);
- if (pos->pos + len > buf->total_len)
+ if (pos->pos < 0 ||
+ EV_SIZE_MAX - len < (size_t)pos->pos ||
+ pos->pos + len > buf->total_len)
return -1;
chain = pos->internal_.chain;
@@ -2740,7 +2793,10 @@ evbuffer_peek(struct evbuffer *buffer, ev_ssize_t len,
if (n_vec == 0 && len < 0) {
/* If no vectors are provided and they asked for "everything",
* pretend they asked for the actual available amount. */
- len = buffer->total_len - len_so_far;
+ len = buffer->total_len;
+ if (start_at) {
+ len -= start_at->pos;
+ }
}
while (chain) {
@@ -2804,6 +2860,9 @@ evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap)
if (sz < 0)
goto done;
+ if (INT_MAX >= EVBUFFER_CHAIN_MAX &&
+ (size_t)sz >= EVBUFFER_CHAIN_MAX)
+ goto done;
if ((size_t)sz < space) {
chain->off += sz;
buf->total_len += sz;
@@ -2913,6 +2972,11 @@ evbuffer_file_segment_new(
}
seg->length = length;
+ if (offset < 0 || length < 0 ||
+ ((ev_uint64_t)length > EVBUFFER_CHAIN_MAX) ||
+ (ev_uint64_t)offset > (ev_uint64_t)(EVBUFFER_CHAIN_MAX - length))
+ goto err;
+
#if defined(USE_SENDFILE)
if (!(flags & EVBUF_FS_DISABLE_SENDFILE)) {
seg->can_sendfile = 1;
@@ -3201,7 +3265,7 @@ evbuffer_add_file_segment(struct evbuffer *buf,
return 0;
err:
EVBUFFER_UNLOCK(buf);
- evbuffer_file_segment_free(seg);
+ evbuffer_file_segment_free(seg); /* Lowers the refcount */
return -1;
}
diff --git a/sntp/libevent/bufferevent.c b/sntp/libevent/bufferevent.c
index 588461a33e1a..d298d0b3f013 100644
--- a/sntp/libevent/bufferevent.c
+++ b/sntp/libevent/bufferevent.c
@@ -599,7 +599,7 @@ bufferevent_setwatermark(struct bufferevent *bufev, short events,
bufev_private->read_watermarks_cb,
EVBUFFER_CB_ENABLED|EVBUFFER_CB_NODEFER);
- if (evbuffer_get_length(bufev->input) > highmark)
+ if (evbuffer_get_length(bufev->input) >= highmark)
bufferevent_wm_suspend_read(bufev);
else if (evbuffer_get_length(bufev->input) < highmark)
bufferevent_wm_unsuspend_read(bufev);
@@ -615,25 +615,30 @@ bufferevent_setwatermark(struct bufferevent *bufev, short events,
BEV_UNLOCK(bufev);
}
-void
+int
bufferevent_getwatermark(struct bufferevent *bufev, short events,
size_t *lowmark, size_t *highmark)
{
- BEV_LOCK(bufev);
if (events == EV_WRITE) {
+ BEV_LOCK(bufev);
if (lowmark)
*lowmark = bufev->wm_write.low;
if (highmark)
*highmark = bufev->wm_write.high;
+ BEV_UNLOCK(bufev);
+ return 0;
}
if (events == EV_READ) {
+ BEV_LOCK(bufev);
if (lowmark)
*lowmark = bufev->wm_read.low;
if (highmark)
*highmark = bufev->wm_read.high;
+ BEV_UNLOCK(bufev);
+ return 0;
}
- BEV_UNLOCK(bufev);
+ return -1;
}
int
diff --git a/sntp/libevent/bufferevent_async.c b/sntp/libevent/bufferevent_async.c
index 137ad24797fe..6395e57a9f0c 100644
--- a/sntp/libevent/bufferevent_async.c
+++ b/sntp/libevent/bufferevent_async.c
@@ -381,9 +381,10 @@ be_async_destruct(struct bufferevent *bev)
bev_async_del_write(bev_async);
fd = evbuffer_overlapped_get_fd_(bev->input);
- if (bev_p->options & BEV_OPT_CLOSE_ON_FREE) {
- /* XXXX possible double-close */
+ if (fd != (evutil_socket_t)INVALID_SOCKET &&
+ (bev_p->options & BEV_OPT_CLOSE_ON_FREE)) {
evutil_closesocket(fd);
+ evbuffer_overlapped_set_fd_(bev->input, INVALID_SOCKET);
}
}
@@ -564,9 +565,9 @@ bufferevent_async_new_(struct event_base *base,
event_overlapped_init_(&bev_a->read_overlapped, read_complete);
event_overlapped_init_(&bev_a->write_overlapped, write_complete);
+ bufferevent_init_generic_timeout_cbs_(bev);
+
bev_a->ok = fd >= 0;
- if (bev_a->ok)
- bufferevent_init_generic_timeout_cbs_(bev);
return bev;
err:
@@ -671,6 +672,7 @@ be_async_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
if (fd != (evutil_socket_t)INVALID_SOCKET &&
(bev_a->bev.options & BEV_OPT_CLOSE_ON_FREE)) {
closesocket(fd);
+ evbuffer_overlapped_set_fd_(bev->input, INVALID_SOCKET);
}
bev_a->ok = 0;
return 0;
diff --git a/sntp/libevent/bufferevent_filter.c b/sntp/libevent/bufferevent_filter.c
index af71ebeeae91..4d9be43e25db 100644
--- a/sntp/libevent/bufferevent_filter.c
+++ b/sntp/libevent/bufferevent_filter.c
@@ -425,26 +425,34 @@ be_filter_readcb(struct bufferevent *underlying, void *me_)
enum bufferevent_filter_result res;
enum bufferevent_flush_mode state;
struct bufferevent *bufev = downcast(bevf);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
int processed_any = 0;
- bufferevent_incref_and_lock_(bufev);
+ BEV_LOCK(bufev);
- if (bevf->got_eof)
- state = BEV_FINISHED;
- else
- state = BEV_NORMAL;
+ // It's possible our refcount is 0 at this point if another thread free'd our filterevent
+ EVUTIL_ASSERT(bufev_private->refcnt >= 0);
- /* XXXX use return value */
- res = be_filter_process_input(bevf, state, &processed_any);
- (void)res;
+ // If our refcount is > 0
+ if (bufev_private->refcnt > 0) {
- /* XXX This should be in process_input, not here. There are
- * other places that can call process-input, and they should
- * force readcb calls as needed. */
- if (processed_any)
- bufferevent_trigger_nolock_(bufev, EV_READ, 0);
+ if (bevf->got_eof)
+ state = BEV_FINISHED;
+ else
+ state = BEV_NORMAL;
- bufferevent_decref_and_unlock_(bufev);
+ /* XXXX use return value */
+ res = be_filter_process_input(bevf, state, &processed_any);
+ (void)res;
+
+ /* XXX This should be in process_input, not here. There are
+ * other places that can call process-input, and they should
+ * force readcb calls as needed. */
+ if (processed_any)
+ bufferevent_trigger_nolock_(bufev, EV_READ, 0);
+ }
+
+ BEV_UNLOCK(bufev);
}
/* Called when the underlying socket has drained enough that we can write to
@@ -454,11 +462,20 @@ be_filter_writecb(struct bufferevent *underlying, void *me_)
{
struct bufferevent_filtered *bevf = me_;
struct bufferevent *bev = downcast(bevf);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bev);
int processed_any = 0;
- bufferevent_incref_and_lock_(bev);
- be_filter_process_output(bevf, BEV_NORMAL, &processed_any);
- bufferevent_decref_and_unlock_(bev);
+ BEV_LOCK(bev);
+
+ // It's possible our refcount is 0 at this point if another thread free'd our filterevent
+ EVUTIL_ASSERT(bufev_private->refcnt >= 0);
+
+ // If our refcount is > 0
+ if (bufev_private->refcnt > 0) {
+ be_filter_process_output(bevf, BEV_NORMAL, &processed_any);
+ }
+
+ BEV_UNLOCK(bev);
}
/* Called when the underlying socket has given us an error */
@@ -467,11 +484,21 @@ be_filter_eventcb(struct bufferevent *underlying, short what, void *me_)
{
struct bufferevent_filtered *bevf = me_;
struct bufferevent *bev = downcast(bevf);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bev);
+
+ BEV_LOCK(bev);
+
+ // It's possible our refcount is 0 at this point if another thread free'd our filterevent
+ EVUTIL_ASSERT(bufev_private->refcnt >= 0);
+
+ // If our refcount is > 0
+ if (bufev_private->refcnt > 0) {
+
+ /* All we can really to is tell our own eventcb. */
+ bufferevent_run_eventcb_(bev, what, 0);
+ }
- bufferevent_incref_and_lock_(bev);
- /* All we can really to is tell our own eventcb. */
- bufferevent_run_eventcb_(bev, what, 0);
- bufferevent_decref_and_unlock_(bev);
+ BEV_UNLOCK(bev);
}
static int
diff --git a/sntp/libevent/bufferevent_openssl.c b/sntp/libevent/bufferevent_openssl.c
index 423b34f10097..b30f90ff2e94 100644
--- a/sntp/libevent/bufferevent_openssl.c
+++ b/sntp/libevent/bufferevent_openssl.c
@@ -1276,6 +1276,8 @@ be_openssl_ctrl(struct bufferevent *bev,
SSL_set_bio(bev_ssl->ssl, bio, bio);
bev_ssl->fd_is_set = 1;
}
+ if (data->fd == -1)
+ bev_ssl->fd_is_set = 0;
if (bev_ssl->state == BUFFEREVENT_SSL_OPEN)
return set_open_callbacks(bev_ssl, data->fd);
else {
diff --git a/sntp/libevent/bufferevent_pair.c b/sntp/libevent/bufferevent_pair.c
index 4340f23723c0..8154e17be732 100644
--- a/sntp/libevent/bufferevent_pair.c
+++ b/sntp/libevent/bufferevent_pair.c
@@ -45,6 +45,8 @@
struct bufferevent_pair {
struct bufferevent_private bev;
struct bufferevent_pair *partner;
+ /* For ->destruct() lock checking */
+ struct bufferevent_pair *unlinked_partner;
};
@@ -265,11 +267,40 @@ be_pair_unlink(struct bufferevent *bev)
struct bufferevent_pair *bev_p = upcast(bev);
if (bev_p->partner) {
+ bev_p->unlinked_partner = bev_p->partner;
bev_p->partner->partner = NULL;
bev_p->partner = NULL;
}
}
+/* Free *shared* lock in the latest be (since we share it between two of them). */
+static void
+be_pair_destruct(struct bufferevent *bev)
+{
+ struct bufferevent_pair *bev_p = upcast(bev);
+
+ /* Transfer ownership of the lock into partner, otherwise we will use
+ * already free'd lock during freeing second bev, see next example:
+ *
+ * bev1->own_lock = 1
+ * bev2->own_lock = 0
+ * bev2->lock = bev1->lock
+ *
+ * bufferevent_free(bev1) # refcnt == 0 -> unlink
+ * bufferevent_free(bev2) # refcnt == 0 -> unlink
+ *
+ * event_base_free() -> finilizers -> EVTHREAD_FREE_LOCK(bev1->lock)
+ * -> BEV_LOCK(bev2->lock) <-- already freed
+ *
+ * Where bev1 == pair[0], bev2 == pair[1].
+ */
+ if (bev_p->unlinked_partner && bev_p->bev.own_lock) {
+ bev_p->unlinked_partner->bev.own_lock = 1;
+ bev_p->bev.own_lock = 0;
+ }
+ bev_p->unlinked_partner = NULL;
+}
+
static int
be_pair_flush(struct bufferevent *bev, short iotype,
enum bufferevent_flush_mode mode)
@@ -320,7 +351,7 @@ const struct bufferevent_ops bufferevent_ops_pair = {
be_pair_enable,
be_pair_disable,
be_pair_unlink,
- NULL, /* be_pair_destruct, */
+ be_pair_destruct,
bufferevent_generic_adj_timeouts_,
be_pair_flush,
NULL, /* ctrl */
diff --git a/sntp/libevent/config.h.in b/sntp/libevent/config.h.in
index 74466761e9f4..946b11a118b4 100644
--- a/sntp/libevent/config.h.in
+++ b/sntp/libevent/config.h.in
@@ -24,9 +24,6 @@
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
-/* Define to 1 if you have the <cthreads.h> header file. */
-#undef HAVE_CTHREADS_H
-
/* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you
don't. */
#undef HAVE_DECL_CTL_KERN
@@ -109,9 +106,6 @@
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
-/* if you have GNU Pth */
-#undef HAVE_GNU_PTH
-
/* Define to 1 if you have the <ifaddrs.h> header file. */
#undef HAVE_IFADDRS_H
@@ -133,24 +127,9 @@
/* Define if the system has zlib */
#undef HAVE_LIBZ
-/* if you have LinuxThreads */
-#undef HAVE_LINUX_THREADS
-
-/* if you have SunOS LWP package */
-#undef HAVE_LWP
-
-/* Define to 1 if you have the <lwp/lwp.h> header file. */
-#undef HAVE_LWP_LWP_H
-
/* Define to 1 if you have the `mach_absolute_time' function. */
#undef HAVE_MACH_ABSOLUTE_TIME
-/* define if you have Mach Cthreads */
-#undef HAVE_MACH_CTHREADS
-
-/* Define to 1 if you have the <mach/cthreads.h> header file. */
-#undef HAVE_MACH_CTHREADS_H
-
/* Define to 1 if you have the <mach/mach_time.h> header file. */
#undef HAVE_MACH_MACH_TIME_H
@@ -175,15 +154,6 @@
/* Define to 1 if you have the <netinet/tcp.h> header file. */
#undef HAVE_NETINET_TCP_H
-/* if you have NT Event Log */
-#undef HAVE_NT_EVENT_LOG
-
-/* if you have NT Service Manager */
-#undef HAVE_NT_SERVICE_MANAGER
-
-/* if you have NT Threads */
-#undef HAVE_NT_THREADS
-
/* Define if the system has openssl */
#undef HAVE_OPENSSL
@@ -208,48 +178,15 @@
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
-/* define to pthreads API spec revision */
+/* Define if we have pthreads on this system */
#undef HAVE_PTHREADS
-/* define if you have pthread_detach function */
-#undef HAVE_PTHREAD_DETACH
-
-/* Define to 1 if you have the `pthread_getconcurrency' function. */
-#undef HAVE_PTHREAD_GETCONCURRENCY
-
-/* Define to 1 if you have the <pthread.h> header file. */
-#undef HAVE_PTHREAD_H
-
-/* Define to 1 if you have the `pthread_kill' function. */
-#undef HAVE_PTHREAD_KILL
-
-/* Define to 1 if you have the `pthread_kill_other_threads_np' function. */
-#undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP
-
-/* define if you have pthread_rwlock_destroy function */
-#undef HAVE_PTHREAD_RWLOCK_DESTROY
-
-/* Define to 1 if you have the `pthread_setconcurrency' function. */
-#undef HAVE_PTHREAD_SETCONCURRENCY
-
-/* Define to 1 if you have the `pthread_yield' function. */
-#undef HAVE_PTHREAD_YIELD
-
-/* Define to 1 if you have the <pth.h> header file. */
-#undef HAVE_PTH_H
-
/* Define to 1 if you have the `putenv' function. */
#undef HAVE_PUTENV
/* Define to 1 if the system has the type `sa_family_t'. */
#undef HAVE_SA_FAMILY_T
-/* Define to 1 if you have the <sched.h> header file. */
-#undef HAVE_SCHED_H
-
-/* Define to 1 if you have the `sched_yield' function. */
-#undef HAVE_SCHED_YIELD
-
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
@@ -337,9 +274,6 @@
/* Define to 1 if the system has the type `struct so_linger'. */
#undef HAVE_STRUCT_SO_LINGER
-/* Define to 1 if you have the <synch.h> header file. */
-#undef HAVE_SYNCH_H
-
/* Define to 1 if you have the `sysctl' function. */
#undef HAVE_SYSCTL
@@ -403,21 +337,6 @@
/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
#undef HAVE_TAILQFOREACH
-/* if you have Solaris LWP (thr) package */
-#undef HAVE_THR
-
-/* Define to 1 if you have the <thread.h> header file. */
-#undef HAVE_THREAD_H
-
-/* Define to 1 if you have the `thr_getconcurrency' function. */
-#undef HAVE_THR_GETCONCURRENCY
-
-/* Define to 1 if you have the `thr_setconcurrency' function. */
-#undef HAVE_THR_SETCONCURRENCY
-
-/* Define to 1 if you have the `thr_yield' function. */
-#undef HAVE_THR_YIELD
-
/* Define if timeradd is defined in <sys/time.h> */
#undef HAVE_TIMERADD
@@ -466,15 +385,9 @@
/* Define if kqueue works correctly with pipes */
#undef HAVE_WORKING_KQUEUE
-/* define if select implicitly yields */
-#undef HAVE_YIELDING_SELECT
-
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
-/* define to 1 if library is thread safe */
-#undef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
-
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
@@ -482,9 +395,6 @@
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
-/* define if you have (or want) no threads */
-#undef NO_THREADS
-
/* Numeric representation of the version */
#undef NUMERIC_VERSION
@@ -509,11 +419,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* enable thread safety */
-#undef REENTRANT
-
-/* define if sched_yield yields the entire process */
-#undef REPLACE_BROKEN_YIELD
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+#undef PTHREAD_CREATE_JOINABLE
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
@@ -542,12 +450,6 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
-/* enable thread safety */
-#undef THREADSAFE
-
-/* enable thread safety */
-#undef THREAD_SAFE
-
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
@@ -570,18 +472,6 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
-/* enable thread safety */
-#undef _REENTRANT
-
-/* enable thread safety */
-#undef _SGI_MP_SOURCE
-
-/* enable thread safety */
-#undef _THREADSAFE
-
-/* enable thread safety */
-#undef _THREAD_SAFE
-
/* Define to 500 only on HP-UX. */
#undef _XOPEN_SOURCE
diff --git a/sntp/libevent/configure b/sntp/libevent/configure
index 09d6eedb5cd0..d2c07801dfe7 100755
--- a/sntp/libevent/configure
+++ b/sntp/libevent/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for libevent 2.1.3-alpha-dev.
+# Generated by GNU Autoconf 2.68 for libevent 2.1.5-beta.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libevent'
PACKAGE_TARNAME='libevent'
-PACKAGE_VERSION='2.1.3-alpha-dev'
-PACKAGE_STRING='libevent 2.1.3-alpha-dev'
+PACKAGE_VERSION='2.1.5-beta'
+PACKAGE_STRING='libevent 2.1.5-beta'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -619,6 +619,8 @@ PTHREADS_FALSE
PTHREADS_TRUE
PTHREAD_CFLAGS
PTHREAD_LIBS
+PTHREAD_CC
+acx_pthread_config
SIGNAL_SUPPORT_FALSE
SIGNAL_SUPPORT_TRUE
EVPORT_BACKEND_FALSE
@@ -655,6 +657,8 @@ ZLIB_REGRESS_TRUE
ZLIB_LIBS
BUILD_REGRESS_FALSE
BUILD_REGRESS_TRUE
+BUILD_SAMPLES_FALSE
+BUILD_SAMPLES_TRUE
LIBTOOL_DEPS
OTOOL64
OTOOL
@@ -778,6 +782,7 @@ enable_openssl
enable_debug_mode
enable_libevent_install
enable_libevent_regress
+enable_samples
enable_function_sections
enable_verbose_debug
enable_shared
@@ -788,8 +793,6 @@ with_gnu_ld
with_sysroot
enable_libtool_lock
enable_largefile
-with_threads
-with_yielding_select
'
ac_precious_vars='build_alias
host_alias
@@ -1342,7 +1345,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libevent 2.1.3-alpha-dev to adapt to many kinds of systems.
+\`configure' configures libevent 2.1.5-beta to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1412,7 +1415,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libevent 2.1.3-alpha-dev:";;
+ short | recursive ) echo "Configuration of libevent 2.1.5-beta:";;
esac
cat <<\_ACEOF
@@ -1437,6 +1440,8 @@ Optional Features:
--disable-libevent-regress, skip regress in make check
+ --disable-samples, skip building of sample programs
+
--enable-function-sections, make static library allow smaller binaries with --gc-sections
--enable-verbose-debug, verbose debug logging
@@ -1456,8 +1461,6 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot=DIR Search for dependent libraries within DIR
(or the compiler's sysroot if not specified).
- --with-threads with threads [auto]
- --with-yielding-select with yielding select [auto]
Some influential environment variables:
CC C compiler command
@@ -1535,7 +1538,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libevent configure 2.1.3-alpha-dev
+libevent configure 2.1.5-beta
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2235,7 +2238,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libevent $as_me 2.1.3-alpha-dev, which was
+It was created by libevent $as_me 2.1.5-beta, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2616,7 +2619,6 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
am__api_version='1.11'
# Find a good install program. We prefer a C program (faster),
@@ -3055,7 +3057,7 @@ fi
# Define the identity of the package.
PACKAGE='libevent'
- VERSION='2.1.3-alpha-dev'
+ VERSION='2.1.5-beta'
cat >>confdefs.h <<_ACEOF
@@ -3110,7 +3112,7 @@ AM_BACKSLASH='\'
ac_config_headers="$ac_config_headers config.h evconfig-private.h:evconfig-private.h.in"
-$as_echo "#define NUMERIC_VERSION 0x02010301" >>confdefs.h
+$as_echo "#define NUMERIC_VERSION 0x02010500" >>confdefs.h
if test "$prefix" = "NONE"; then
@@ -5004,6 +5006,13 @@ else
enable_libevent_regress=yes
fi
+# Check whether --enable-samples was given.
+if test "${enable_samples+set}" = set; then :
+ enableval=$enable_samples;
+else
+ enable_samples=yes
+fi
+
# Check whether --enable-function-sections was given.
if test "${enable_function_sections+set}" = set; then :
enableval=$enable_function_sections;
@@ -12071,6 +12080,14 @@ CC="$lt_save_CC"
+ if test "$enable_samples" = "yes"; then
+ BUILD_SAMPLES_TRUE=
+ BUILD_SAMPLES_FALSE='#'
+else
+ BUILD_SAMPLES_TRUE='#'
+ BUILD_SAMPLES_FALSE=
+fi
+
if test "$enable_libevent_regress" = "yes"; then
BUILD_REGRESS_TRUE=
BUILD_REGRESS_FALSE='#'
@@ -14825,58 +14842,127 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# OpenLDAP --with-threads
-
-# Check whether --with-threads was given.
-if test "${with_threads+set}" = set; then :
- withval=$with_threads;
- ol_arg=invalid
- for ol_val in auto nt posix mach pth lwp yes no manual ; do
- if test "$withval" = "$ol_val" ; then
- ol_arg="$ol_val"
- fi
- done
- if test "$ol_arg" = "invalid" ; then
- as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
- fi
- ol_with_threads="$ol_arg"
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-else
- ol_with_threads="auto"
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_join ();
+int
+main ()
+{
+return pthread_join ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ acx_pthread_ok=yes
fi
-# end --with-threads
-
-
-case "$ol_with_threads$host" in
- auto*-*-solaris2.[0-6])
- ol_with_threads=no
- ;;
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+ *solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
esac
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
-ol_aix_threads=no
-case "$host" in
-*-*-aix*) if test -z "$CC" ; then
- case "$ol_with_threads" in
- auto | yes | posix) ol_aix_threads=yes ;;
- esac
- fi
-;;
-esac
+ case $flag in
+ none)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+ ;;
-if test $ol_aix_threads = yes ; then
- if test -z "${CC}" ; then
- for ac_prog in cc_r xlc_r cc
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+ -*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
+if ${ac_cv_prog_acx_pthread_config+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
+ if test -n "$acx_pthread_config"; then
+ ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -14885,7 +14971,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_prog"
+ ac_cv_prog_acx_pthread_config="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -14893,4378 +14979,210 @@ done
done
IFS=$as_save_IFS
+ test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
fi
fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+acx_pthread_config=$ac_cv_prog_acx_pthread_config
+if test -n "$acx_pthread_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
+$as_echo "$acx_pthread_config" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
- test -n "$CC" && break
-done
-
-
- if test "$CC" = cc ; then
- if test $ol_with_threads != auto ; then
- as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
-$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
- fi
- ol_with_threads=no
- fi
- fi
-
- case ${CC} in cc_r | xlc_r)
- ol_with_threads=posix
- ol_cv_pthread_create=yes
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
- esac
-fi
-
-ol_link_threads=no
-# OpenLDAP --with-yielding_select
-
-# Check whether --with-yielding_select was given.
-if test "${with_yielding_select+set}" = set; then :
- withval=$with_yielding_select;
- ol_arg=invalid
- for ol_val in auto yes no manual ; do
- if test "$withval" = "$ol_val" ; then
- ol_arg="$ol_val"
- fi
- done
- if test "$ol_arg" = "invalid" ; then
- as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
- fi
- ol_with_yielding_select="$ol_arg"
-
-else
- ol_with_yielding_select="auto"
-fi
-# end --with-yielding_select
-
-
-case $ol_with_threads in auto | yes | nt)
-
-
- ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
-if test "x$ac_cv_func__beginthread" = xyes; then :
-
-fi
-
-
- if test $ac_cv_func__beginthread = yes ; then
-
-$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
-
- ol_cv_nt_threads=yes
- fi
-
-
- if test "$ol_cv_nt_threads" = yes ; then
- ol_link_threads=nt
- ol_with_threads=found
- ol_with_yielding_select=yes
-
-
-$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
-
- fi
-
- if test $ol_with_threads = nt ; then
- as_fn_error $? "could not locate NT Threads" "$LINENO" 5
- fi
- ;;
-esac
-
-case $ol_with_threads in auto | yes | posix)
-
- for ac_header in pthread.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_H 1
-_ACEOF
-
-fi
-
-done
-
-
- if test $ac_cv_header_pthread_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
-$as_echo_n "checking POSIX thread version... " >&6; }
-if ${ol_cv_pthread_version+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# include <pthread.h>
-
-int
-main ()
-{
-
- int i = PTHREAD_CREATE_JOINABLE;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_detach" >/dev/null 2>&1; then :
- ol_cv_pthread_version=10
-else
- ol_cv_pthread_version=8
-fi
-rm -f conftest*
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# include <pthread.h>
-# ifdef PTHREAD_CREATE_UNDETACHED
- draft7
-# endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "draft7" >/dev/null 2>&1; then :
- ol_cv_pthread_version=7
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
- ol_cv_pthread_version=6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# include <pthread.h>
-#ifdef PTHREAD_MUTEX_INITIALIZER
- draft5
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "draft5" >/dev/null 2>&1; then :
- ol_cv_pthread_version=5
-else
- ol_cv_pthread_version=4
-fi
-rm -f conftest*
-
-fi
-rm -f conftest*
-
-fi
-rm -f conftest*
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
-$as_echo "$ol_cv_pthread_version" >&6; }
-
-
- if test $ol_cv_pthread_version != 0 ; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREADS $ol_cv_pthread_version
-_ACEOF
-
- else
- as_fn_error $? "unknown pthread version" "$LINENO" 5
- fi
-
- # consider threads found
- ol_with_threads=found
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
-$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
-if ${ol_cv_header_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
- ol_cv_header_linux_threads=yes
-else
- ol_cv_header_linux_threads=no
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
-$as_echo "$ol_cv_header_linux_threads" >&6; }
- if test $ol_cv_header_linux_threads = yes; then
-
-$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
-
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
-$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
-if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-#ifdef _POSIX_THREAD_IS_GNU_PTH
- __gnu_pth__;
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
- ol_cv_header_gnu_pth_pthread_h=yes
-else
- ol_cv_header_gnu_pth_pthread_h=no
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
-$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
-
-
- if test $ol_cv_header_gnu_pth_pthread_h = no ; then
- for ac_header in sched.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
-if test "x$ac_cv_header_sched_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SCHED_H 1
-_ACEOF
-
-fi
-
-done
-
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
-$as_echo_n "checking for pthread_create in default libraries... " >&6; }
-if ${ol_cv_pthread_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_create=yes
-else
- ol_cv_pthread_create=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_create=yes
-else
- ol_cv_pthread_create=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
-$as_echo "$ol_cv_pthread_create" >&6; }
-
- if test $ol_cv_pthread_create != no ; then
- ol_link_threads=posix
- ol_link_pthreads=""
- fi
-
- # Pthread try link: -kthread (ol_cv_pthread_kthread)
-if test "$ol_link_threads" = no ; then
- # try -kthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
-$as_echo_n "checking for pthread link with -kthread... " >&6; }
-if ${ol_cv_pthread_kthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-kthread $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_kthread=yes
-else
- ol_cv_pthread_kthread=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_kthread=yes
-else
- ol_cv_pthread_kthread=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
-$as_echo "$ol_cv_pthread_kthread" >&6; }
-
- if test $ol_cv_pthread_kthread = yes ; then
- ol_link_pthreads="-kthread"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -pthread (ol_cv_pthread_pthread)
-if test "$ol_link_threads" = no ; then
- # try -pthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
-$as_echo_n "checking for pthread link with -pthread... " >&6; }
-if ${ol_cv_pthread_pthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-pthread $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_pthread=yes
-else
- ol_cv_pthread_pthread=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_pthread=yes
-else
- ol_cv_pthread_pthread=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
-$as_echo "$ol_cv_pthread_pthread" >&6; }
-
- if test $ol_cv_pthread_pthread = yes ; then
- ol_link_pthreads="-pthread"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
-if test "$ol_link_threads" = no ; then
- # try -pthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
-$as_echo_n "checking for pthread link with -pthreads... " >&6; }
-if ${ol_cv_pthread_pthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-pthreads $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_pthreads=yes
-else
- ol_cv_pthread_pthreads=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_pthreads=yes
-else
- ol_cv_pthread_pthreads=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
-$as_echo "$ol_cv_pthread_pthreads" >&6; }
-
- if test $ol_cv_pthread_pthreads = yes ; then
- ol_link_pthreads="-pthreads"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
-if test "$ol_link_threads" = no ; then
- # try -mthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
-$as_echo_n "checking for pthread link with -mthreads... " >&6; }
-if ${ol_cv_pthread_mthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-mthreads $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_mthreads=yes
-else
- ol_cv_pthread_mthreads=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_mthreads=yes
-else
- ol_cv_pthread_mthreads=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
-$as_echo "$ol_cv_pthread_mthreads" >&6; }
-
- if test $ol_cv_pthread_mthreads = yes ; then
- ol_link_pthreads="-mthreads"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -thread (ol_cv_pthread_thread)
-if test "$ol_link_threads" = no ; then
- # try -thread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
-$as_echo_n "checking for pthread link with -thread... " >&6; }
-if ${ol_cv_pthread_thread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-thread $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-/* pthread test headers */
#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
int
main ()
{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
+pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_thread=yes
-else
- ol_cv_pthread_thread=no
+ acx_pthread_ok=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_thread=yes
-else
- ol_cv_pthread_thread=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
-$as_echo "$ol_cv_pthread_thread" >&6; }
-
- if test $ol_cv_pthread_thread = yes ; then
- ol_link_pthreads="-thread"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
-if test "$ol_link_threads" = no ; then
- # try -lpthread -lmach -lexc -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
-$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
-if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
-else
- ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
-else
- ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
-$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
-
- if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
- ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
-if test "$ol_link_threads" = no ; then
- # try -lpthread -lmach -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
-if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthread -lmach -lexc $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthread_lmach_lexc=yes
-else
- ol_cv_pthread_lpthread_lmach_lexc=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthread_lmach_lexc=yes
-else
- ol_cv_pthread_lpthread_lmach_lexc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
-
- if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
- ol_link_pthreads="-lpthread -lmach -lexc"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
-if test "$ol_link_threads" = no ; then
- # try -lpthread -Wl,-woff,85
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
-$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
-if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthread -Wl,-woff,85 $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lib_lpthread_woff=yes
-else
- ol_cv_pthread_lib_lpthread_woff=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lib_lpthread_woff=yes
-else
- ol_cv_pthread_lib_lpthread_woff=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
-$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
-
- if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
- ol_link_pthreads="-lpthread -Wl,-woff,85"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
-if test "$ol_link_threads" = no ; then
- # try -lpthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
-$as_echo_n "checking for pthread link with -lpthread... " >&6; }
-if ${ol_cv_pthread_lpthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthread $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthread=yes
-else
- ol_cv_pthread_lpthread=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthread=yes
-else
- ol_cv_pthread_lpthread=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
-$as_echo "$ol_cv_pthread_lpthread" >&6; }
-
- if test $ol_cv_pthread_lpthread = yes ; then
- ol_link_pthreads="-lpthread"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
-if test "$ol_link_threads" = no ; then
- # try -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
-$as_echo_n "checking for pthread link with -lc_r... " >&6; }
-if ${ol_cv_pthread_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lc_r $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lc_r=yes
-else
- ol_cv_pthread_lc_r=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lc_r=yes
-else
- ol_cv_pthread_lc_r=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
-$as_echo "$ol_cv_pthread_lc_r" >&6; }
-
- if test $ol_cv_pthread_lc_r = yes ; then
- ol_link_pthreads="-lc_r"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -threads (ol_cv_pthread_threads)
-if test "$ol_link_threads" = no ; then
- # try -threads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
-$as_echo_n "checking for pthread link with -threads... " >&6; }
-if ${ol_cv_pthread_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-threads $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_threads=yes
-else
- ol_cv_pthread_threads=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_threads=yes
-else
- ol_cv_pthread_threads=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
-$as_echo "$ol_cv_pthread_threads" >&6; }
-
- if test $ol_cv_pthread_threads = yes ; then
- ol_link_pthreads="-threads"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
-if test "$ol_link_threads" = no ; then
- # try -lpthreads -lmach -lexc -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
-if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
-else
- ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
-else
- ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
-
- if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
- ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
-if test "$ol_link_threads" = no ; then
- # try -lpthreads -lmach -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
-if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthreads -lmach -lexc $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthreads_lmach_lexc=yes
-else
- ol_cv_pthread_lpthreads_lmach_lexc=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthreads_lmach_lexc=yes
-else
- ol_cv_pthread_lpthreads_lmach_lexc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
-
- if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
- ol_link_pthreads="-lpthreads -lmach -lexc"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
-if test "$ol_link_threads" = no ; then
- # try -lpthreads -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
-if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthreads -lexc $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthreads_lexc=yes
-else
- ol_cv_pthread_lpthreads_lexc=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthreads_lexc=yes
-else
- ol_cv_pthread_lpthreads_lexc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
-
- if test $ol_cv_pthread_lpthreads_lexc = yes ; then
- ol_link_pthreads="-lpthreads -lexc"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
-if test "$ol_link_threads" = no ; then
- # try -lpthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
-$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
-if ${ol_cv_pthread_lib_lpthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthreads $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lib_lpthreads=yes
-else
- ol_cv_pthread_lib_lpthreads=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lib_lpthreads=yes
-else
- ol_cv_pthread_lib_lpthreads=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
-$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
-
- if test $ol_cv_pthread_lib_lpthreads = yes ; then
- ol_link_pthreads="-lpthreads"
- ol_link_threads=posix
- fi
-fi
-
-
- if test $ol_link_threads != no ; then
- LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
-
- save_CPPFLAGS="$CPPFLAGS"
- save_LIBS="$LIBS"
- LIBS="$LTHREAD_LIBS $LIBS"
-
- for ac_func in sched_yield pthread_yield thr_yield
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- if test $ac_cv_func_sched_yield = no &&
- test $ac_cv_func_pthread_yield = no &&
- test $ac_cv_func_thr_yield = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
-$as_echo_n "checking for sched_yield in -lrt... " >&6; }
-if ${ac_cv_lib_rt_sched_yield+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sched_yield ();
-int
-main ()
-{
-return sched_yield ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_rt_sched_yield=yes
-else
- ac_cv_lib_rt_sched_yield=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
-$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
-if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
- LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
-
-$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
-
- ac_cv_func_sched_yield=yes
-else
- ac_cv_func_sched_yield=no
-fi
-
- fi
- if test $ac_cv_func_sched_yield = no &&
- test $ac_cv_func_pthread_yield = no &&
- test "$ac_cv_func_thr_yield" = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
-$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
- fi
-
- for ac_func in pthread_kill
-do :
- ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
-if test "x$ac_cv_func_pthread_kill" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_KILL 1
-_ACEOF
-
-fi
-done
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
-$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
-if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <pthread.h>
-pthread_rwlock_t rwlock;
-
-int
-main ()
-{
-pthread_rwlock_destroy(&rwlock);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_func_pthread_rwlock_destroy=yes
-else
- ol_cv_func_pthread_rwlock_destroy=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
-$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
- if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
-
-$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
-
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
-$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
-if ${ol_cv_func_pthread_detach+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <pthread.h>
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-int
-main ()
-{
-pthread_detach(NULL);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_func_pthread_detach=yes
-else
- ol_cv_func_pthread_detach=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
-$as_echo "$ol_cv_func_pthread_detach" >&6; }
-
- if test $ol_cv_func_pthread_detach = no ; then
- as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
- fi
-
-
-$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
-
-
- for ac_func in \
- pthread_setconcurrency \
- pthread_getconcurrency \
- thr_setconcurrency \
- thr_getconcurrency \
-
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
- for ac_func in pthread_kill_other_threads_np
-do :
- ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
-if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
-_ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+ if test "x$acx_pthread_ok" = xyes; then
+ break;
+ fi
-fi
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
-$as_echo_n "checking for LinuxThreads implementation... " >&6; }
-if ${ol_cv_sys_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
-$as_echo "$ol_cv_sys_linux_threads" >&6; }
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
-$as_echo_n "checking for LinuxThreads consistency... " >&6; }
-if ${ol_cv_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test $ol_cv_header_linux_threads = yes &&
- test $ol_cv_sys_linux_threads = yes; then
- ol_cv_linux_threads=yes
- elif test $ol_cv_header_linux_threads = no &&
- test $ol_cv_sys_linux_threads = no; then
- ol_cv_linux_threads=no
- else
- ol_cv_linux_threads=error
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
-$as_echo "$ol_cv_linux_threads" >&6; }
-
-
- if test $ol_cv_linux_threads = error; then
- as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
-$as_echo_n "checking if pthread_create() works... " >&6; }
-if ${ol_cv_pthread_create_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
- ol_cv_pthread_create_works=yes
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_create_works=yes
-else
- ol_cv_pthread_create_works=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
-$as_echo "$ol_cv_pthread_create_works" >&6; }
-
- if test $ol_cv_pthread_create_works = no ; then
- as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
- fi
-
- ol_replace_broken_yield=no
-
- if test $ol_replace_broken_yield = yes ; then
-
-$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
- fi
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- if test x$ol_with_yielding_select = xauto ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
-$as_echo_n "checking if select yields when using pthreads... " >&6; }
-if ${ol_cv_pthread_select_yields+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
- ol_cv_pthread_select_yields=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <unistd.h>
#include <pthread.h>
-#ifndef NULL
-#define NULL (void*) 0
-#endif
-
-static int fildes[2];
-
-static void *task(p)
- void *p;
-{
- int i;
- struct timeval tv;
-
- fd_set rfds;
-
- tv.tv_sec=10;
- tv.tv_usec=0;
-
- FD_ZERO(&rfds);
- FD_SET(fildes[0], &rfds);
-
- /* we're not interested in any fds */
- i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
-
- if(i < 0) {
- perror("select");
- exit(10);
- }
-
- exit(0); /* if we exit here, the select blocked the whole process */
-}
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
- pthread_t t;
-
- /* create a pipe to select */
- if(pipe(&fildes[0])) {
- perror("select");
- exit(1);
- }
-
-#ifdef HAVE_PTHREAD_SETCONCURRENCY
- (void) pthread_setconcurrency(2);
-#else
-#ifdef HAVE_THR_SETCONCURRENCY
- /* Set Solaris LWP concurrency to 2 */
- thr_setconcurrency(2);
-#endif
-#endif
-
-#if HAVE_PTHREADS < 6
- pthread_create(&t, pthread_attr_default, task, NULL);
-#else
- pthread_create(&t, NULL, task, NULL);
-#endif
-
- /* make sure task runs first */
-#ifdef HAVE_THR_YIELD
- thr_yield();
-#elif defined( HAVE_SCHED_YIELD )
- sched_yield();
-#elif defined( HAVE_PTHREAD_YIELD )
- pthread_yield();
-#endif
-
- exit(2);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_select_yields=no
-else
- ol_cv_pthread_select_yields=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
-$as_echo "$ol_cv_pthread_select_yields" >&6; }
-
- if test $ol_cv_pthread_select_yields = cross ; then
- as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
- fi
-
- if test $ol_cv_pthread_select_yields = yes ; then
- ol_with_yielding_select=yes
- fi
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LIBS="$save_LIBS"
- else
- as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
- fi
- fi
-
- if test $ol_with_threads = posix ; then
- as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
- fi
- ;;
-esac
-
-case $ol_with_threads in auto | yes | mach)
-
- for ac_header in mach/cthreads.h cthreads.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- if test $ac_cv_header_mach_cthreads_h = yes ; then
- ol_with_threads=found
-
- ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
-if test "x$ac_cv_func_cthread_fork" = xyes; then :
- ol_link_threads=yes
-fi
-
-
- if test $ol_link_threads = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
-$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
-if ${ol_cv_cthread_all_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- save_LIBS="$LIBS"
- LIBS="-all_load $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <mach/cthreads.h>
int
main ()
{
-
- cthread_fork((void *)0, (void *)0);
-
+int attr=$attr; return attr;
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_cthread_all_load=yes
-else
- ol_cv_cthread_all_load=no
+ attr_name=$attr; break
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LIBS="$save_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
-$as_echo "$ol_cv_cthread_all_load" >&6; }
-
- if test $ol_cv_cthread_all_load = yes ; then
- LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
- ol_link_threads=mach
- ol_with_threads=found
- fi
- fi
-
- elif test $ac_cv_header_cthreads_h = yes ; then
-
- ol_with_threads=found
-
- save_LIBS="$LIBS"
- LIBS="$LIBS -lthreads"
- ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
-if test "x$ac_cv_func_cthread_fork" = xyes; then :
- ol_link_threads=yes
-fi
-
- LIBS="$save_LIBS"
-
- if test $ol_link_threads = yes ; then
- LTHREAD_LIBS="-lthreads"
- ol_link_threads=mach
- ol_with_threads=found
- else
- as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
- fi
-
- elif test $ol_with_threads = mach ; then
- as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
- fi
-
- if test $ol_link_threads = mach ; then
-
-$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
-
- elif test $ol_with_threads = found ; then
- as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
- fi
- ;;
-esac
-
-case $ol_with_threads in auto | yes | pth)
-
- for ac_header in pth.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
-if test "x$ac_cv_header_pth_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTH_H 1
-_ACEOF
-
-fi
-
-done
-
-
- if test $ac_cv_header_pth_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
-$as_echo_n "checking for pth_version in -lpth... " >&6; }
-if ${ac_cv_lib_pth_pth_version+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpth $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pth_version ();
-int
-main ()
-{
-return pth_version ();
- ;
- return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pth_pth_version=yes
-else
- ac_cv_lib_pth_pth_version=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
-$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
-if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
- have_pth=yes
-else
- have_pth=no
-fi
-
-
- if test $have_pth = yes ; then
-$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
-
- LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
- ol_link_threads=pth
- ol_with_threads=found
-
- if test x$ol_with_yielding_select = xauto ; then
- ol_with_yielding_select=yes
- fi
- fi
- fi
- ;;
-esac
-
-case $ol_with_threads in auto | yes | lwp)
-
- for ac_header in thread.h synch.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ fi
-fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+ flag=no
+ case "${host_cpu}-${host_os}" in
+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
+$as_echo "${flag}" >&6; }
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
-done
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
- if test $ac_cv_header_thread_h = yes &&
- test $ac_cv_header_synch_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
-$as_echo_n "checking for thr_create in -lthread... " >&6; }
-if ${ac_cv_lib_thread_thr_create+:} false; then :
+ # More AIX lossage: must compile with xlc_r or cc_r
+ if test x"$GCC" != xyes; then
+ for ac_prog in xlc_r cc_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PTHREAD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lthread $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char thr_create ();
-int
-main ()
-{
-return thr_create ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_thread_thr_create=yes
-else
- ac_cv_lib_thread_thr_create=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
-$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
-if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
- have_thr=yes
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
else
- have_thr=no
-fi
-
-
- if test $have_thr = yes ; then
-
-$as_echo "#define HAVE_THR 1" >>confdefs.h
-
- LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
- ol_link_threads=thr
-
- if test x$ol_with_yielding_select = xauto ; then
- ol_with_yielding_select=yes
- fi
-
- for ac_func in \
- thr_setconcurrency \
- thr_getconcurrency \
-
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- fi
- fi
-
- for ac_header in lwp/lwp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
-if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LWP_LWP_H 1
-_ACEOF
-
-fi
-
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PTHREAD_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
+ done
+IFS=$as_save_IFS
- if test $ac_cv_header_lwp_lwp_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
-$as_echo_n "checking for lwp_create in -llwp... " >&6; }
-if ${ac_cv_lib_lwp_lwp_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-llwp $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char lwp_create ();
-int
-main ()
-{
-return lwp_create ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_lwp_lwp_create=yes
-else
- ac_cv_lib_lwp_lwp_create=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
-$as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
-if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
- have_lwp=yes
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
else
- have_lwp=no
-fi
-
-
- if test $have_lwp = yes ; then
-
-$as_echo "#define HAVE_LWP 1" >>confdefs.h
-
- LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
- ol_link_threads=lwp
-
- if test x$ol_with_yielding_select = xauto ; then
- ol_with_yielding_select=no
- fi
- fi
- fi
- ;;
-esac
-
-if test $ol_with_yielding_select = yes ; then
-
-$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
-
-fi
-
-if test $ol_with_threads = manual ; then
- ol_link_threads=yes
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
-$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
-
- for ac_header in pthread.h sched.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-done
-
- for ac_func in sched_yield pthread_yield
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-fi
+ test -n "$PTHREAD_CC" && break
done
+test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
-$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
-if ${ol_cv_header_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
- ol_cv_header_linux_threads=yes
-else
- ol_cv_header_linux_threads=no
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
-$as_echo "$ol_cv_header_linux_threads" >&6; }
- if test $ol_cv_header_linux_threads = yes; then
-
-$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
-
+ else
+ PTHREAD_CC=$CC
fi
-
-
- for ac_header in mach/cthreads.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
-if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MACH_CTHREADS_H 1
-_ACEOF
-
-fi
-
-done
-
- for ac_header in lwp/lwp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
-if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LWP_LWP_H 1
-_ACEOF
-
-fi
-
-done
-
- for ac_header in thread.h synch.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-fi
-
-if test $ol_link_threads != no && test $ol_link_threads != nt ; then
-
-$as_echo "#define REENTRANT 1" >>confdefs.h
-
-
-$as_echo "#define _REENTRANT 1" >>confdefs.h
-
-
-$as_echo "#define THREAD_SAFE 1" >>confdefs.h
-
-
-$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
-
-
-$as_echo "#define THREADSAFE 1" >>confdefs.h
-
-
-$as_echo "#define _THREADSAFE 1" >>confdefs.h
-
-
-$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
-$as_echo_n "checking for thread specific errno... " >&6; }
-if ${ol_cv_errno_thread_specific+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <errno.h>
-int
-main ()
-{
-errno = 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_errno_thread_specific=yes
else
- ol_cv_errno_thread_specific=no
+ PTHREAD_CC="$CC"
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
-$as_echo "$ol_cv_errno_thread_specific" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
-$as_echo_n "checking for thread specific h_errno... " >&6; }
-if ${ol_cv_h_errno_thread_specific+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <netdb.h>
-int
-main ()
-{
-h_errno = 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_h_errno_thread_specific=yes
-else
- ol_cv_h_errno_thread_specific=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
-$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
- if test $ol_cv_errno_thread_specific != yes ||
- test $ol_cv_h_errno_thread_specific != yes ; then
- LIBS="$LTHREAD_LIBS $LIBS"
- LTHREAD_LIBS=""
- fi
-fi
-if test $ol_link_threads = no ; then
- if test $ol_with_threads = yes ; then
- as_fn_error $? "no suitable thread support" "$LINENO" 5
- fi
- if test $ol_with_threads = auto ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
-$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
- ol_with_threads=no
- fi
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
-$as_echo "#define NO_THREADS 1" >>confdefs.h
+$as_echo "#define HAVE_PTHREADS 1" >>confdefs.h
- LTHREAD_LIBS=""
- BUILD_THREAD=no
+ have_pthreads=yes
+ :
else
- BUILD_THREAD=yes
-fi
-
-if test $ol_link_threads != no ; then
-
-$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
+ acx_pthread_ok=no
fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-case "$ol_with_threads" in
- no)
- ol_pthread_ok=no
-
- ;;
- *)
- have_pthreads=yes
- PTHREAD_LIBS="$LTHREAD_LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- # The cast to long int works around a bug in the HP C Compiler
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
@@ -19273,10 +15191,8 @@ $as_echo_n "checking size of pthread_t... " >&6; }
if ${ac_cv_sizeof_pthread_t+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
- $ac_includes_default
- #include <pthread.h>
-
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "$ac_includes_default
+ #include <pthread.h>
"; then :
@@ -19302,20 +15218,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-
- ;;
-esac
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
fi
-
-
if test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"; then
PTHREADS_TRUE=
PTHREADS_FALSE='#'
@@ -19712,6 +15615,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${BUILD_SAMPLES_TRUE}" && test -z "${BUILD_SAMPLES_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_SAMPLES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${BUILD_REGRESS_TRUE}" && test -z "${BUILD_REGRESS_FALSE}"; then
as_fn_error $? "conditional \"BUILD_REGRESS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -20189,7 +16096,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libevent $as_me 2.1.3-alpha-dev, which was
+This file was extended by libevent $as_me 2.1.5-beta, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20255,7 +16162,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libevent config.status 2.1.3-alpha-dev
+libevent config.status 2.1.5-beta
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/sntp/libevent/configure.ac b/sntp/libevent/configure.ac
index c60c7ace87f6..2cdc74f16d82 100644
--- a/sntp/libevent/configure.ac
+++ b/sntp/libevent/configure.ac
@@ -5,18 +5,17 @@ dnl See LICENSE for copying information.
dnl
dnl Original version Dug Song <dugsong@monkey.org>
-AC_INIT(libevent,2.1.3-alpha-dev)
+AC_INIT(libevent,2.1.5-beta)
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR(event.c)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
-
AM_INIT_AUTOMAKE
dnl AM_SILENT_RULES req. automake 1.11. [no] defaults V=1
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_HEADERS(config.h evconfig-private.h:evconfig-private.h.in)
-AC_DEFINE(NUMERIC_VERSION, 0x02010301, [Numeric representation of the version])
+AC_DEFINE(NUMERIC_VERSION, 0x02010500, [Numeric representation of the version])
dnl Initialize prefix.
if test "$prefix" = "NONE"; then
@@ -113,6 +112,9 @@ AC_ARG_ENABLE([libevent-install],
AC_ARG_ENABLE([libevent-regress],
AS_HELP_STRING([--disable-libevent-regress, skip regress in make check]),
[], [enable_libevent_regress=yes])
+AC_ARG_ENABLE([samples],
+ AS_HELP_STRING([--disable-samples, skip building of sample programs]),
+ [], [enable_samples=yes])
AC_ARG_ENABLE([function-sections],
AS_HELP_STRING([--enable-function-sections, make static library allow smaller binaries with --gc-sections]),
[], [enable_function_sections=no])
@@ -129,6 +131,7 @@ dnl the command line with --enable-shared and --disable-shared.
dnl AC_DISABLE_SHARED
AC_SUBST(LIBTOOL_DEPS)
+AM_CONDITIONAL([BUILD_SAMPLES], [test "$enable_samples" = "yes"])
AM_CONDITIONAL([BUILD_REGRESS], [test "$enable_libevent_regress" = "yes"])
dnl Checks for libraries.
@@ -724,22 +727,16 @@ AC_TRY_COMPILE([],
# check if we can compile with pthreads
have_pthreads=no
if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then
- OL_THREAD_CHECK([
- have_pthreads=yes
- PTHREAD_LIBS="$LTHREAD_LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- AC_CHECK_SIZEOF(
- [pthread_t],
- [],
- [
- AC_INCLUDES_DEFAULT()
- #include <pthread.h>
- ]
- )
- ])
+ ACX_PTHREAD([
+ AC_DEFINE(HAVE_PTHREADS, 1,
+ [Define if we have pthreads on this system])
+ have_pthreads=yes])
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ AC_CHECK_SIZEOF(pthread_t, ,
+ [AC_INCLUDES_DEFAULT()
+ #include <pthread.h> ]
+ )
fi
-AC_SUBST([PTHREAD_LIBS])
-AC_SUBST([PTHREAD_CFLAGS])
AM_CONDITIONAL([PTHREADS], [test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"])
# check if we should compile locking into the library
diff --git a/sntp/libevent/evbuffer-internal.h b/sntp/libevent/evbuffer-internal.h
index fb67ec095725..cf4bddc80ea8 100644
--- a/sntp/libevent/evbuffer-internal.h
+++ b/sntp/libevent/evbuffer-internal.h
@@ -155,6 +155,18 @@ struct evbuffer {
struct bufferevent *parent;
};
+#if EVENT__SIZEOF_OFF_T < EVENT__SIZEOF_SIZE_T
+typedef ev_ssize_t ev_misalign_t;
+#define EVBUFFER_CHAIN_MAX ((size_t)EV_SSIZE_MAX)
+#else
+typedef ev_off_t ev_misalign_t;
+#if EVENT__SIZEOF_OFF_T > EVENT__SIZEOF_SIZE_T
+#define EVBUFFER_CHAIN_MAX EV_SIZE_MAX
+#else
+#define EVBUFFER_CHAIN_MAX ((size_t)EV_SSIZE_MAX)
+#endif
+#endif
+
/** A single item in an evbuffer. */
struct evbuffer_chain {
/** points to next buffer in the chain */
@@ -165,7 +177,7 @@ struct evbuffer_chain {
/** unused space at the beginning of buffer or an offset into a
* file for sendfile buffers. */
- ev_off_t misalign;
+ ev_misalign_t misalign;
/** Offset into buffer + misalign at which to start writing.
* In other words, the total number of bytes actually stored
diff --git a/sntp/libevent/evdns.c b/sntp/libevent/evdns.c
index 59c3abe18655..60f4db5c5fba 100644
--- a/sntp/libevent/evdns.c
+++ b/sntp/libevent/evdns.c
@@ -541,6 +541,17 @@ nameserver_probe_failed(struct nameserver *const ns) {
}
}
+static void
+request_swap_ns(struct request *req, struct nameserver *ns) {
+ if (ns && req->ns != ns) {
+ EVUTIL_ASSERT(req->ns->requests_inflight > 0);
+ req->ns->requests_inflight--;
+ ns->requests_inflight++;
+
+ req->ns = ns;
+ }
+}
+
/* called when a nameserver has been deemed to have failed. For example, too */
/* many packets have timed out etc */
static void
@@ -595,7 +606,7 @@ nameserver_failed(struct nameserver *const ns, const char *msg) {
if (req->tx_count == 0 && req->ns == ns) {
/* still waiting to go out, can be moved */
/* to another server */
- req->ns = nameserver_pick(base);
+ request_swap_ns(req, nameserver_pick(base));
}
req = req->next;
} while (req != started_at);
@@ -659,6 +670,7 @@ request_finished(struct request *const req, struct request **head, int free_hand
req->ns->requests_inflight == 0 &&
req->base->disable_when_inactive) {
event_del(&req->ns->event);
+ evtimer_del(&req->ns->timeout_event);
}
if (!req->request_appended) {
@@ -707,7 +719,7 @@ request_reissue(struct request *req) {
/* the last nameserver should have been marked as failing */
/* by the caller of this function, therefore pick will try */
/* not to return it */
- req->ns = nameserver_pick(req->base);
+ request_swap_ns(req, nameserver_pick(req->base));
if (req->ns == last_ns) {
/* ... but pick did return it */
/* not a lot of point in trying again with the */
@@ -2158,29 +2170,30 @@ evdns_request_timeout_callback(evutil_socket_t fd, short events, void *arg) {
log(EVDNS_LOG_DEBUG, "Request %p timed out", arg);
EVDNS_LOCK(base);
- req->ns->timedout++;
- if (req->ns->timedout > req->base->global_max_nameserver_timeout) {
- req->ns->timedout = 0;
- nameserver_failed(req->ns, "request timed out.");
- }
-
if (req->tx_count >= req->base->global_max_retransmits) {
+ struct nameserver *ns = req->ns;
/* this request has failed */
log(EVDNS_LOG_DEBUG, "Giving up on request %p; tx_count==%d",
arg, req->tx_count);
reply_schedule_callback(req, 0, DNS_ERR_TIMEOUT, NULL);
+
request_finished(req, &REQ_HEAD(req->base, req->trans_id), 1);
+ nameserver_failed(ns, "request timed out.");
} else {
/* retransmit it */
- struct nameserver *new_ns;
log(EVDNS_LOG_DEBUG, "Retransmitting request %p; tx_count==%d",
arg, req->tx_count);
(void) evtimer_del(&req->timeout_event);
- new_ns = nameserver_pick(base);
- if (new_ns)
- req->ns = new_ns;
+ request_swap_ns(req, nameserver_pick(base));
evdns_request_transmit(req);
+
+ req->ns->timedout++;
+ if (req->ns->timedout > req->base->global_max_nameserver_timeout) {
+ req->ns->timedout = 0;
+ nameserver_failed(req->ns, "request timed out.");
+ }
}
+
EVDNS_UNLOCK(base);
}
@@ -2639,6 +2652,34 @@ evdns_base_nameserver_sockaddr_add(struct evdns_base *base,
return res;
}
+int
+evdns_base_get_nameserver_addr(struct evdns_base *base, int idx,
+ struct sockaddr *sa, ev_socklen_t len)
+{
+ int result = -1;
+ int i;
+ struct nameserver *server;
+ EVDNS_LOCK(base);
+ server = base->server_head;
+ for (i = 0; i < idx && server; ++i, server = server->next) {
+ if (server->next == base->server_head)
+ goto done;
+ }
+ if (! server)
+ goto done;
+
+ if (server->addrlen > len) {
+ result = (int) server->addrlen;
+ goto done;
+ }
+
+ memcpy(sa, &server->address, server->addrlen);
+ result = (int) server->addrlen;
+done:
+ EVDNS_UNLOCK(base);
+ return result;
+}
+
/* remove from the queue */
static void
evdns_request_remove(struct request *req, struct request **head)
@@ -3311,7 +3352,7 @@ strtoint(const char *const str)
/* Parse a number of seconds into a timeval; return -1 on error. */
static int
-strtotimeval(const char *const str, struct timeval *out)
+evdns_strtotimeval(const char *const str, struct timeval *out)
{
double d;
char *endptr;
@@ -3414,13 +3455,13 @@ evdns_base_set_option_impl(struct evdns_base *base,
base->global_search_state->ndots = ndots;
} else if (str_matches_option(option, "timeout:")) {
struct timeval tv;
- if (strtotimeval(val, &tv) == -1) return -1;
+ if (evdns_strtotimeval(val, &tv) == -1) return -1;
if (!(flags & DNS_OPTION_MISC)) return 0;
log(EVDNS_LOG_DEBUG, "Setting timeout to %s", val);
memcpy(&base->global_timeout, &tv, sizeof(struct timeval));
} else if (str_matches_option(option, "getaddrinfo-allow-skew:")) {
struct timeval tv;
- if (strtotimeval(val, &tv) == -1) return -1;
+ if (evdns_strtotimeval(val, &tv) == -1) return -1;
if (!(flags & DNS_OPTION_MISC)) return 0;
log(EVDNS_LOG_DEBUG, "Setting getaddrinfo-allow-skew to %s",
val);
@@ -3462,7 +3503,7 @@ evdns_base_set_option_impl(struct evdns_base *base,
base->global_outgoing_addrlen = len;
} else if (str_matches_option(option, "initial-probe-timeout:")) {
struct timeval tv;
- if (strtotimeval(val, &tv) == -1) return -1;
+ if (evdns_strtotimeval(val, &tv) == -1) return -1;
if (tv.tv_sec > 3600)
tv.tv_sec = 3600;
if (!(flags & DNS_OPTION_MISC)) return 0;
@@ -3555,8 +3596,8 @@ evdns_get_default_hosts_filename(void)
if (! SHGetSpecialFolderPathA(NULL, path, CSIDL_SYSTEM, 0))
return NULL;
- len_out = strlen(path)+strlen(hostfile);
- path_out = mm_malloc(len_out+1);
+ len_out = strlen(path)+strlen(hostfile)+1;
+ path_out = mm_malloc(len_out);
evutil_snprintf(path_out, len_out, "%s%s", path, hostfile);
return path_out;
#else
@@ -3826,17 +3867,18 @@ evdns_base_config_windows_nameservers(struct evdns_base *base)
if (base == NULL)
return -1;
EVDNS_LOCK(base);
+ fname = evdns_get_default_hosts_filename();
+ log(EVDNS_LOG_DEBUG, "Loading hosts entries from %s", fname);
+ evdns_base_load_hosts(base, fname);
+ if (fname)
+ mm_free(fname);
+
if (load_nameservers_with_getnetworkparams(base) == 0) {
EVDNS_UNLOCK(base);
return 0;
}
r = load_nameservers_from_registry(base);
- fname = evdns_get_default_hosts_filename();
- evdns_base_load_hosts(base, fname);
- if (fname)
- mm_free(fname);
-
EVDNS_UNLOCK(base);
return r;
}
@@ -3973,6 +4015,10 @@ evdns_nameserver_free(struct nameserver *server)
event_debug_unassign(&server->event);
if (server->state == 0)
(void) event_del(&server->timeout_event);
+ if (server->probe_request) {
+ evdns_cancel_request(server->base, server->probe_request);
+ server->probe_request = NULL;
+ }
event_debug_unassign(&server->timeout_event);
mm_free(server);
}
@@ -3988,6 +4034,15 @@ evdns_base_free_and_unlock(struct evdns_base *base, int fail_requests)
/* TODO(nickm) we might need to refcount here. */
+ for (server = base->server_head; server; server = server_next) {
+ server_next = server->next;
+ evdns_nameserver_free(server);
+ if (server_next == base->server_head)
+ break;
+ }
+ base->server_head = NULL;
+ base->global_good_nameservers = 0;
+
for (i = 0; i < base->n_req_heads; ++i) {
while (base->req_heads[i]) {
if (fail_requests)
@@ -4002,14 +4057,6 @@ evdns_base_free_and_unlock(struct evdns_base *base, int fail_requests)
}
base->global_requests_inflight = base->global_requests_waiting = 0;
- for (server = base->server_head; server; server = server_next) {
- server_next = server->next;
- evdns_nameserver_free(server);
- if (server_next == base->server_head)
- break;
- }
- base->server_head = NULL;
- base->global_good_nameservers = 0;
if (base->global_search_state) {
for (dom = base->global_search_state->head; dom; dom = dom_next) {
@@ -4663,7 +4710,7 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
data->ipv4_request.r = evdns_base_resolve_ipv4(dns_base,
nodename, 0, evdns_getaddrinfo_gotresolve,
&data->ipv4_request);
- if (want_cname)
+ if (want_cname && data->ipv4_request.r)
data->ipv4_request.r->current_req->put_cname_in_ptr =
&data->cname_result;
}
@@ -4674,7 +4721,7 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
data->ipv6_request.r = evdns_base_resolve_ipv6(dns_base,
nodename, 0, evdns_getaddrinfo_gotresolve,
&data->ipv6_request);
- if (want_cname)
+ if (want_cname && data->ipv6_request.r)
data->ipv6_request.r->current_req->put_cname_in_ptr =
&data->cname_result;
}
diff --git a/sntp/libevent/event.c b/sntp/libevent/event.c
index 01f0e14226c9..af4a6e05e677 100644
--- a/sntp/libevent/event.c
+++ b/sntp/libevent/event.c
@@ -526,22 +526,24 @@ event_enable_debug_mode(void)
#endif
}
-#if 0
void
event_disable_debug_mode(void)
{
+#ifndef EVENT__DISABLE_DEBUG_MODE
struct event_debug_entry **ent, *victim;
EVLOCK_LOCK(event_debug_map_lock_, 0);
for (ent = HT_START(event_debug_map, &global_debug_map); ent; ) {
victim = *ent;
- ent = HT_NEXT_RMV(event_debug_map,&global_debug_map, ent);
+ ent = HT_NEXT_RMV(event_debug_map, &global_debug_map, ent);
mm_free(victim);
}
HT_CLEAR(event_debug_map, &global_debug_map);
EVLOCK_UNLOCK(event_debug_map_lock_ , 0);
-}
+
+ event_debug_mode_on_ = 0;
#endif
+}
struct event_base *
event_base_new_with_config(const struct event_config *cfg)
@@ -993,6 +995,21 @@ done:
return (res);
}
+/* Get the monotonic time for this event_base' timer */
+int
+event_gettime_monotonic(struct event_base *base, struct timeval *tv)
+{
+ int rv = -1;
+
+ if (base && tv) {
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ rv = evutil_gettime_monotonic_(&(base->monotonic_timer), tv);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ }
+
+ return rv;
+}
+
const char **
event_get_supported_methods(void)
{
@@ -1454,10 +1471,13 @@ done:
static inline void
event_persist_closure(struct event_base *base, struct event *ev)
{
-
- // Define our callback, we use this to store our callback before it's executed
void (*evcb_callback)(evutil_socket_t, short, void *);
+ // Other fields of *ev that must be stored before executing
+ evutil_socket_t evcb_fd;
+ short evcb_res;
+ void *evcb_arg;
+
/* reschedule the persistent event if we have a timeout. */
if (ev->ev_io_timeout.tv_sec || ev->ev_io_timeout.tv_usec) {
/* If there was a timeout, we want it to run at an interval of
@@ -1501,13 +1521,16 @@ event_persist_closure(struct event_base *base, struct event *ev)
}
// Save our callback before we release the lock
- evcb_callback = *ev->ev_callback;
+ evcb_callback = ev->ev_callback;
+ evcb_fd = ev->ev_fd;
+ evcb_res = ev->ev_res;
+ evcb_arg = ev->ev_arg;
// Release the lock
EVBASE_RELEASE_LOCK(base, th_base_lock);
// Execute the callback
- (evcb_callback)(ev->ev_fd, ev->ev_res, ev->ev_arg);
+ (evcb_callback)(evcb_fd, evcb_res, evcb_arg);
}
/*
@@ -1569,8 +1592,9 @@ event_process_active_single_queue(struct event_base *base,
event_persist_closure(base, ev);
break;
case EV_CLOSURE_EVENT: {
+ void (*evcb_callback)(evutil_socket_t, short, void *);
EVUTIL_ASSERT(ev != NULL);
- void (*evcb_callback)(evutil_socket_t, short, void *) = *ev->ev_callback;
+ evcb_callback = *ev->ev_callback;
EVBASE_RELEASE_LOCK(base, th_base_lock);
evcb_callback(ev->ev_fd, ev->ev_res, ev->ev_arg);
}
@@ -1583,14 +1607,16 @@ event_process_active_single_queue(struct event_base *base,
break;
case EV_CLOSURE_EVENT_FINALIZE:
case EV_CLOSURE_EVENT_FINALIZE_FREE: {
+ void (*evcb_evfinalize)(struct event *, void *);
+ int evcb_closure = evcb->evcb_closure;
EVUTIL_ASSERT(ev != NULL);
- void (*evcb_evfinalize)(struct event *, void *) = ev->ev_evcallback.evcb_cb_union.evcb_evfinalize;
base->current_event = NULL;
+ evcb_evfinalize = ev->ev_evcallback.evcb_cb_union.evcb_evfinalize;
EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_FINALIZING));
EVBASE_RELEASE_LOCK(base, th_base_lock);
evcb_evfinalize(ev, ev->ev_arg);
event_debug_note_teardown_(ev);
- if (evcb->evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE)
+ if (evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE)
mm_free(ev);
}
break;
@@ -3739,6 +3765,7 @@ event_free_debug_globals_locks(void)
if (event_debug_map_lock_ != NULL) {
EVTHREAD_FREE_LOCK(event_debug_map_lock_, 0);
event_debug_map_lock_ = NULL;
+ evthreadimpl_disable_lock_debugging_();
}
#endif /* EVENT__DISABLE_DEBUG_MODE */
#endif /* EVENT__DISABLE_THREAD_SUPPORT */
@@ -3774,6 +3801,7 @@ event_free_globals(void)
void
libevent_global_shutdown(void)
{
+ event_disable_debug_mode();
event_free_globals();
}
diff --git a/sntp/libevent/event_tagging.c b/sntp/libevent/event_tagging.c
index 7edd3da5d956..64b100b82510 100644
--- a/sntp/libevent/event_tagging.c
+++ b/sntp/libevent/event_tagging.c
@@ -207,10 +207,19 @@ decode_tag_internal(ev_uint32_t *ptag, struct evbuffer *evbuf, int dodrain)
*/
data = evbuffer_pullup(
evbuf, len < sizeof(number) + 1 ? len : sizeof(number) + 1);
+ if (!data)
+ return (-1);
while (count++ < len) {
ev_uint8_t lower = *data++;
- number |= (lower & 0x7f) << shift;
+ if (shift >= 28) {
+ /* Make sure it fits into 32 bits */
+ if (shift > 28)
+ return (-1);
+ if ((lower & 0x7f) > 15)
+ return (-1);
+ }
+ number |= (lower & (unsigned)0x7f) << shift;
shift += 7;
if (!(lower & 0x80)) {
@@ -313,6 +322,8 @@ do { \
\
/* XXX(niels): faster? */ \
data = evbuffer_pullup(evbuf, offset + 1) + offset; \
+ if (!data) \
+ return (-1); \
\
nibbles = ((data[0] & 0xf0) >> 4) + 1; \
if (nibbles > maxnibbles || (nibbles >> 1) + 1 > len) \
@@ -320,6 +331,8 @@ do { \
len = (nibbles >> 1) + 1; \
\
data = evbuffer_pullup(evbuf, offset + len) + offset; \
+ if (!data) \
+ return (-1); \
\
while (nibbles > 0) { \
number <<= 4; \
diff --git a/sntp/libevent/evrpc-internal.h b/sntp/libevent/evrpc-internal.h
index e53d06e0f40c..9eb376386de4 100644
--- a/sntp/libevent/evrpc-internal.h
+++ b/sntp/libevent/evrpc-internal.h
@@ -27,6 +27,7 @@
#ifndef EVRPC_INTERNAL_H_INCLUDED_
#define EVRPC_INTERNAL_H_INCLUDED_
+#include "event2/http.h"
#include "http-internal.h"
struct evrpc;
diff --git a/sntp/libevent/evthread-internal.h b/sntp/libevent/evthread-internal.h
index 346b2bb92774..efdecf81e7cd 100644
--- a/sntp/libevent/evthread-internal.h
+++ b/sntp/libevent/evthread-internal.h
@@ -376,6 +376,13 @@ int evsig_global_setup_locks_(const int enable_locks);
int evutil_global_setup_locks_(const int enable_locks);
int evutil_secure_rng_global_setup_locks_(const int enable_locks);
+/** Return current evthread_lock_callbacks */
+struct evthread_lock_callbacks *evthread_get_lock_callbacks(void);
+/** Return current evthread_condition_callbacks */
+struct evthread_condition_callbacks *evthread_get_condition_callbacks(void);
+/** Disable locking for internal usage (like global shutdown) */
+void evthreadimpl_disable_lock_debugging_(void);
+
#endif
#ifdef __cplusplus
diff --git a/sntp/libevent/evthread.c b/sntp/libevent/evthread.c
index 4da5d24e8040..02dab7a8057e 100644
--- a/sntp/libevent/evthread.c
+++ b/sntp/libevent/evthread.c
@@ -69,12 +69,25 @@ evthread_set_id_callback(unsigned long (*id_fn)(void))
evthread_id_fn_ = id_fn;
}
+struct evthread_lock_callbacks *evthread_get_lock_callbacks()
+{
+ return evthread_lock_debugging_enabled_
+ ? &original_lock_fns_ : &evthread_lock_fns_;
+}
+struct evthread_condition_callbacks *evthread_get_condition_callbacks()
+{
+ return evthread_lock_debugging_enabled_
+ ? &original_cond_fns_ : &evthread_cond_fns_;
+}
+void evthreadimpl_disable_lock_debugging_(void)
+{
+ evthread_lock_debugging_enabled_ = 0;
+}
+
int
evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs)
{
- struct evthread_lock_callbacks *target =
- evthread_lock_debugging_enabled_
- ? &original_lock_fns_ : &evthread_lock_fns_;
+ struct evthread_lock_callbacks *target = evthread_get_lock_callbacks();
if (!cbs) {
if (target->alloc)
@@ -109,9 +122,7 @@ evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs)
int
evthread_set_condition_callbacks(const struct evthread_condition_callbacks *cbs)
{
- struct evthread_condition_callbacks *target =
- evthread_lock_debugging_enabled_
- ? &original_cond_fns_ : &evthread_cond_fns_;
+ struct evthread_condition_callbacks *target = evthread_get_condition_callbacks();
if (!cbs) {
if (target->alloc_condition)
diff --git a/sntp/libevent/evutil.c b/sntp/libevent/evutil.c
index c28caded59ca..3d72e4032450 100644
--- a/sntp/libevent/evutil.c
+++ b/sntp/libevent/evutil.c
@@ -368,6 +368,20 @@ evutil_make_listen_socket_reuseable(evutil_socket_t sock)
}
int
+evutil_make_listen_socket_reuseable_port(evutil_socket_t sock)
+{
+#if defined __linux__ && defined(SO_REUSEPORT)
+ int one = 1;
+ /* REUSEPORT on Linux 3.9+ means, "Multiple servers (processes or
+ * threads) can bind to the same port if they each set the option. */
+ return setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, (void*) &one,
+ (ev_socklen_t)sizeof(one));
+#else
+ return 0;
+#endif
+}
+
+int
evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock)
{
#if defined(EVENT__HAVE_NETINET_TCP_H) && defined(TCP_DEFER_ACCEPT)
@@ -652,7 +666,7 @@ evutil_check_ifaddrs(void)
"GetAdaptersInfo", but that's deprecated; let's just try
GetAdaptersAddresses and fall back to connect+getsockname.
*/
- HANDLE lib = evutil_load_windows_system_library_(TEXT("ihplapi.dll"));
+ HMODULE lib = evutil_load_windows_system_library_(TEXT("ihplapi.dll"));
GetAdaptersAddresses_fn_t fn;
ULONG size, res;
IP_ADAPTER_ADDRESSES *addresses = NULL, *address;
@@ -1918,15 +1932,15 @@ evutil_inet_pton(int af, const char *src, void *dst)
return inet_pton(af, src, dst);
#else
if (af == AF_INET) {
- int a,b,c,d;
+ unsigned a,b,c,d;
char more;
struct in_addr *addr = dst;
- if (sscanf(src, "%d.%d.%d.%d%c", &a,&b,&c,&d,&more) != 4)
+ if (sscanf(src, "%u.%u.%u.%u%c", &a,&b,&c,&d,&more) != 4)
return 0;
- if (a < 0 || a > 255) return 0;
- if (b < 0 || b > 255) return 0;
- if (c < 0 || c > 255) return 0;
- if (d < 0 || d > 255) return 0;
+ if (a > 255) return 0;
+ if (b > 255) return 0;
+ if (c > 255) return 0;
+ if (d > 255) return 0;
addr->s_addr = htonl((a<<24) | (b<<16) | (c<<8) | d);
return 1;
#ifdef AF_INET6
@@ -1941,7 +1955,7 @@ evutil_inet_pton(int af, const char *src, void *dst)
else if (!dot)
eow = src+strlen(src);
else {
- int byte1,byte2,byte3,byte4;
+ unsigned byte1,byte2,byte3,byte4;
char more;
for (eow = dot-1; eow >= src && EVUTIL_ISDIGIT_(*eow); --eow)
;
@@ -1949,14 +1963,14 @@ evutil_inet_pton(int af, const char *src, void *dst)
/* We use "scanf" because some platform inet_aton()s are too lax
* about IPv4 addresses of the form "1.2.3" */
- if (sscanf(eow, "%d.%d.%d.%d%c",
+ if (sscanf(eow, "%u.%u.%u.%u%c",
&byte1,&byte2,&byte3,&byte4,&more) != 4)
return 0;
- if (byte1 > 255 || byte1 < 0 ||
- byte2 > 255 || byte2 < 0 ||
- byte3 > 255 || byte3 < 0 ||
- byte4 > 255 || byte4 < 0)
+ if (byte1 > 255 ||
+ byte2 > 255 ||
+ byte3 > 255 ||
+ byte4 > 255)
return 0;
words[6] = (byte1<<8) | byte2;
@@ -2453,7 +2467,7 @@ evutil_hex_char_to_int_(char c)
}
#ifdef _WIN32
-HANDLE
+HMODULE
evutil_load_windows_system_library_(const TCHAR *library_name)
{
TCHAR path[MAX_PATH];
diff --git a/sntp/libevent/evutil_time.c b/sntp/libevent/evutil_time.c
index e433043e4d2b..8f53c66b68c0 100644
--- a/sntp/libevent/evutil_time.c
+++ b/sntp/libevent/evutil_time.c
@@ -54,6 +54,7 @@
#include "event2/util.h"
#include "util-internal.h"
#include "log-internal.h"
+#include "mm-internal.h"
#ifndef EVENT__HAVE_GETTIMEOFDAY
/* No gettimeofday; this must be windows. */
@@ -160,6 +161,55 @@ adjust_monotonic_time(struct evutil_monotonic_timer *base,
base->last_time = *tv;
}
+/*
+ Allocate a new struct evutil_monotonic_timer
+ */
+struct evutil_monotonic_timer *
+evutil_monotonic_timer_new(void)
+{
+ struct evutil_monotonic_timer *p = NULL;
+
+ p = mm_malloc(sizeof(*p));
+ if (!p) goto done;
+
+ memset(p, 0, sizeof(*p));
+
+ done:
+ return p;
+}
+
+/*
+ Free a struct evutil_monotonic_timer
+ */
+void
+evutil_monotonic_timer_free(struct evutil_monotonic_timer *timer)
+{
+ if (timer) {
+ mm_free(timer);
+ }
+}
+
+/*
+ Set up a struct evutil_monotonic_timer for initial use
+ */
+int
+evutil_configure_monotonic_time(struct evutil_monotonic_timer *timer,
+ int flags)
+{
+ return evutil_configure_monotonic_time_(timer, flags);
+}
+
+/*
+ Query the current monotonic time
+ */
+int
+evutil_gettime_monotonic(struct evutil_monotonic_timer *timer,
+ struct timeval *tp)
+{
+ return evutil_gettime_monotonic_(timer, tp);
+}
+
+
#if defined(HAVE_POSIX_MONOTONIC)
/* =====
The POSIX clock_gettime() interface provides a few ways to get at a
diff --git a/sntp/libevent/ht-internal.h b/sntp/libevent/ht-internal.h
index 8842f4cd75b2..50375bbaa94c 100644
--- a/sntp/libevent/ht-internal.h
+++ b/sntp/libevent/ht-internal.h
@@ -380,7 +380,6 @@ ht_string_hash_(const char *s)
{ \
if (head->hth_table) \
freefn(head->hth_table); \
- head->hth_table_length = 0; \
name##_HT_INIT(head); \
} \
/* Debugging helper: return false iff the representation of 'head' is \
diff --git a/sntp/libevent/http-internal.h b/sntp/libevent/http-internal.h
index 82dd402a0626..a83160c8341b 100644
--- a/sntp/libevent/http-internal.h
+++ b/sntp/libevent/http-internal.h
@@ -74,6 +74,7 @@ struct evhttp_connection {
#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */
#define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */
#define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */
+#define EVHTTP_CON_AUTOFREE 0x0008 /* set when we want to auto free the connection */
struct timeval timeout; /* timeout for events */
int retry_cnt; /* retry count */
@@ -99,6 +100,7 @@ struct evhttp_connection {
struct event_base *base;
struct evdns_base *dns_base;
+ int ai_family;
/* Saved conn_addr, to extract IP address from it.
*
diff --git a/sntp/libevent/http.c b/sntp/libevent/http.c
index 51470225e9bb..dd8c9cffddfc 100644
--- a/sntp/libevent/http.c
+++ b/sntp/libevent/http.c
@@ -769,6 +769,7 @@ evhttp_connection_done(struct evhttp_connection *evcon)
{
struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
int con_outgoing = evcon->flags & EVHTTP_CON_OUTGOING;
+ int free_evcon = 0;
if (con_outgoing) {
/* idle or close the connection */
@@ -801,6 +802,12 @@ evhttp_connection_done(struct evhttp_connection *evcon)
* need to detect if the other side closes it.
*/
evhttp_connection_start_detectclose(evcon);
+ } else if ((evcon->flags & EVHTTP_CON_AUTOFREE)) {
+ /*
+ * If we have no more requests that need completion
+ * and we're not waiting for the connection to close
+ */
+ free_evcon = 1;
}
} else {
/*
@@ -819,6 +826,16 @@ evhttp_connection_done(struct evhttp_connection *evcon)
if (con_outgoing && ((req->flags & EVHTTP_USER_OWNED) == 0)) {
evhttp_request_free(req);
}
+
+ /* If this was the last request of an outgoing connection and we're
+ * not waiting to receive a connection close event and we want to
+ * automatically free the connection. We check to ensure our request
+ * list is empty one last time just in case our callback added a
+ * new request.
+ */
+ if (free_evcon && TAILQ_FIRST(&evcon->requests) == NULL) {
+ evhttp_connection_free(evcon);
+ }
}
/*
@@ -1175,6 +1192,11 @@ evhttp_connection_free(struct evhttp_connection *evcon)
}
void
+evhttp_connection_free_on_completion(struct evhttp_connection *evcon) {
+ evcon->flags |= EVHTTP_CON_AUTOFREE;
+}
+
+void
evhttp_connection_set_local_address(struct evhttp_connection *evcon,
const char *address)
{
@@ -1243,6 +1265,7 @@ evhttp_connection_reset_(struct evhttp_connection *evcon)
shutdown(evcon->fd, EVUTIL_SHUT_WR);
evutil_closesocket(evcon->fd);
+ bufferevent_setfd(evcon->bufev, -1);
evcon->fd = -1;
}
@@ -1285,6 +1308,7 @@ evhttp_connection_cb_cleanup(struct evhttp_connection *evcon)
{
struct evcon_requestq requests;
+ evhttp_connection_reset_(evcon);
if (evcon->retry_max < 0 || evcon->retry_cnt < evcon->retry_max) {
struct timeval tv_retry = evcon->initial_retry_timeout;
int i;
@@ -1306,7 +1330,6 @@ evhttp_connection_cb_cleanup(struct evhttp_connection *evcon)
evcon->retry_cnt++;
return;
}
- evhttp_connection_reset_(evcon);
/*
* User callback can do evhttp_make_request() on the same
@@ -1385,6 +1408,17 @@ evhttp_error_cb(struct bufferevent *bufev, short what, void *arg)
*/
EVUTIL_ASSERT(evcon->state == EVCON_IDLE);
evhttp_connection_reset_(evcon);
+
+ /*
+ * If we have no more requests that need completion
+ * and we want to auto-free the connection when all
+ * requests have been completed.
+ */
+ if (TAILQ_FIRST(&evcon->requests) == NULL
+ && (evcon->flags & EVHTTP_CON_OUTGOING)
+ && (evcon->flags & EVHTTP_CON_AUTOFREE)) {
+ evhttp_connection_free(evcon);
+ }
return;
}
@@ -2267,6 +2301,7 @@ evhttp_connection_base_bufferevent_new(struct event_base *base, struct evdns_bas
evhttp_deferred_read_cb, evcon);
evcon->dns_base = dnsbase;
+ evcon->ai_family = AF_UNSPEC;
return (evcon);
@@ -2294,6 +2329,12 @@ evhttp_connection_base_new(struct event_base *base, struct evdns_base *dnsbase,
return evhttp_connection_base_bufferevent_new(base, dnsbase, NULL, address, port);
}
+void evhttp_connection_set_family(struct evhttp_connection *evcon,
+ int family)
+{
+ evcon->ai_family = family;
+}
+
void
evhttp_connection_set_base(struct evhttp_connection *evcon,
struct event_base *base)
@@ -2419,7 +2460,7 @@ evhttp_connection_connect_(struct evhttp_connection *evcon)
evcon->state = EVCON_CONNECTING;
if (bufferevent_socket_connect_hostname(evcon->bufev, evcon->dns_base,
- AF_UNSPEC, evcon->address, evcon->port) < 0) {
+ evcon->ai_family, evcon->address, evcon->port) < 0) {
evcon->state = old_state;
event_sock_warn(evcon->fd, "%s: connection to \"%s\" failed",
__func__, evcon->address);
@@ -4289,6 +4330,8 @@ parse_port(const char *s, const char *eos)
portnum = (portnum * 10) + (*s - '0');
if (portnum < 0)
return -1;
+ if (portnum > 65535)
+ return -1;
++s;
}
return portnum;
diff --git a/sntp/libevent/include/event2/buffer.h b/sntp/libevent/include/event2/buffer.h
index 839d6e7ca4c5..468588b9f141 100644
--- a/sntp/libevent/include/event2/buffer.h
+++ b/sntp/libevent/include/event2/buffer.h
@@ -105,13 +105,8 @@ struct evbuffer
Used when repeatedly searching through a buffer. Calling any function
that modifies or re-packs the buffer contents may invalidate all
- evbuffer_ptrs for that buffer. Do not modify these values except with
- evbuffer_ptr_set.
-
- Used when repeatedly searching through a buffer. Calls to any function
- that modifies or re-packs the buffer contents may invalidate all
- evbuffer_ptrs for that buffer. Do not modify these values except with
- evbuffer_ptr_set.
+ evbuffer_ptrs for that buffer. Do not modify or contruct these values
+ except with evbuffer_ptr_set.
An evbuffer_ptr can represent any position from the start of a buffer up
to a position immediately after the end of a buffer.
@@ -787,7 +782,7 @@ enum evbuffer_ptr_how {
There are two ways to use this function: you can call
evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_SET)
to move 'pos' to a position 'N' bytes after the start of the buffer, or
- evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_SET)
+ evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_ADD)
to move 'pos' forward by 'N' bytes.
If evbuffer_ptr is not initialized, this function can only be called
diff --git a/sntp/libevent/include/event2/bufferevent.h b/sntp/libevent/include/event2/bufferevent.h
index 46203b04f596..fe8a74d348c6 100644
--- a/sntp/libevent/include/event2/bufferevent.h
+++ b/sntp/libevent/include/event2/bufferevent.h
@@ -535,8 +535,9 @@ void bufferevent_setwatermark(struct bufferevent *bufev, short events,
size_t lowmark, size_t highmark);
/**
- Retrieves the watermarks for read or write events. Result is undefined if
- events contains both EV_READ and EV_WRITE.
+ Retrieves the watermarks for read or write events.
+ Returns non-zero if events contains not only EV_READ or EV_WRITE.
+ Returns zero if events equal EV_READ or EV_WRITE
@param bufev the bufferevent to be examined
@param events EV_READ or EV_WRITE
@@ -544,7 +545,7 @@ void bufferevent_setwatermark(struct bufferevent *bufev, short events,
@param highmark receives the high watermark if not NULL
*/
EVENT2_EXPORT_SYMBOL
-void bufferevent_getwatermark(struct bufferevent *bufev, short events,
+int bufferevent_getwatermark(struct bufferevent *bufev, short events,
size_t *lowmark, size_t *highmark);
/**
@@ -598,7 +599,7 @@ enum bufferevent_trigger_options {
BEV_TRIG_IGNORE_WATERMARKS = (1<<16),
/** defer even if the callbacks are not */
- BEV_TRIG_DEFER_CALLBACKS = BEV_OPT_DEFER_CALLBACKS,
+ BEV_TRIG_DEFER_CALLBACKS = BEV_OPT_DEFER_CALLBACKS
/* (Note: for internal reasons, these need to be disjoint from
* bufferevent_options, except when they mean the same thing. */
diff --git a/sntp/libevent/include/event2/dns.h b/sntp/libevent/include/event2/dns.h
index a00c83e6a373..17cd86a2ec2d 100644
--- a/sntp/libevent/include/event2/dns.h
+++ b/sntp/libevent/include/event2/dns.h
@@ -453,7 +453,7 @@ int evdns_base_set_option(struct evdns_base *base, const char *option, const cha
@param base the evdns_base to which to apply this operation
@param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC|
- DNS_OPTIONS_HOSTSFILE|DNS_OPTIONS_ALL
+ DNS_OPTION_HOSTSFILE|DNS_OPTIONS_ALL
@param filename the path to the resolv.conf file
@return 0 if successful, or various positive error codes if an error
occurred (see above)
@@ -694,6 +694,22 @@ struct evdns_getaddrinfo_request *evdns_getaddrinfo(
EVENT2_EXPORT_SYMBOL
void evdns_getaddrinfo_cancel(struct evdns_getaddrinfo_request *req);
+/**
+ Retrieve the address of the 'idx'th configured nameserver.
+
+ @param base The evdns_base to examine.
+ @param idx The index of the nameserver to get the address of.
+ @param sa A location to receive the server's address.
+ @param len The number of bytes available at sa.
+
+ @return the number of bytes written into sa on success. On failure, returns
+ -1 if idx is greater than the number of configured nameservers, or a
+ value greater than 'len' if len was not high enough.
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_base_get_nameserver_addr(struct evdns_base *base, int idx,
+ struct sockaddr *sa, ev_socklen_t len);
+
#ifdef __cplusplus
}
#endif
diff --git a/sntp/libevent/include/event2/event.h b/sntp/libevent/include/event2/event.h
index 6e2b884d440d..570031f264b0 100644
--- a/sntp/libevent/include/event2/event.h
+++ b/sntp/libevent/include/event2/event.h
@@ -396,6 +396,12 @@ const char *event_base_get_method(const struct event_base *);
EVENT2_EXPORT_SYMBOL
const char **event_get_supported_methods(void);
+/** Query the current monotonic time from a the timer for a struct
+ * event_base.
+ */
+EVENT2_EXPORT_SYMBOL
+int event_gettime_monotonic(struct event_base *base, struct timeval *tp);
+
/**
@name event type flag
@@ -771,6 +777,10 @@ void event_set_fatal_callback(event_fatal_cb cb);
EVENT2_EXPORT_SYMBOL
void event_enable_debug_logging(ev_uint32_t which);
+EVENT2_EXPORT_SYMBOL
+void
+event_disable_debug_mode(void);
+
/**
Associate a different event base with an event.
diff --git a/sntp/libevent/include/event2/http.h b/sntp/libevent/include/event2/http.h
index 81f44b855231..4284d5fc32bc 100644
--- a/sntp/libevent/include/event2/http.h
+++ b/sntp/libevent/include/event2/http.h
@@ -630,6 +630,12 @@ struct evhttp_connection *evhttp_connection_base_new(
struct event_base *base, struct evdns_base *dnsbase,
const char *address, unsigned short port);
+/**
+ * Set family hint for DNS requests.
+ */
+void evhttp_connection_set_family(struct evhttp_connection *evcon,
+ int family);
+
/** Takes ownership of the request object
*
* Can be used in a request callback to keep onto the request until
@@ -669,6 +675,14 @@ void evhttp_connection_set_max_body_size(struct evhttp_connection* evcon,
EVENT2_EXPORT_SYMBOL
void evhttp_connection_free(struct evhttp_connection *evcon);
+/** Disowns a given connection object
+ *
+ * Can be used to tell libevent to free the connection object after
+ * the last request has completed or failed.
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_free_on_completion(struct evhttp_connection *evcon);
+
/** sets the ip address from which http connections are made */
EVENT2_EXPORT_SYMBOL
void evhttp_connection_set_local_address(struct evhttp_connection *evcon,
diff --git a/sntp/libevent/include/event2/listener.h b/sntp/libevent/include/event2/listener.h
index 8c77803d6d84..84b4da055d8d 100644
--- a/sntp/libevent/include/event2/listener.h
+++ b/sntp/libevent/include/event2/listener.h
@@ -88,6 +88,15 @@ typedef void (*evconnlistener_errorcb)(struct evconnlistener *, void *);
* to use the option before it is actually bound.
*/
#define LEV_OPT_DEFERRED_ACCEPT (1u<<6)
+/** Flag: Indicates that we ask to allow multiple servers (processes or
+ * threads) to bind to the same port if they each set the option.
+ *
+ * SO_REUSEPORT is what most people would expect SO_REUSEADDR to be, however
+ * SO_REUSEPORT does not imply SO_REUSEADDR.
+ *
+ * This is only available on Linux and kernel 3.9+
+ */
+#define LEV_OPT_REUSEABLE_PORT (1u<<7)
/**
Allocate a new evconnlistener object to listen for incoming TCP connections
diff --git a/sntp/libevent/include/event2/util.h b/sntp/libevent/include/event2/util.h
index 14c6a25d7a86..b152a4b40b51 100644
--- a/sntp/libevent/include/event2/util.h
+++ b/sntp/libevent/include/event2/util.h
@@ -292,6 +292,62 @@ extern "C" {
#define evutil_socket_t int
#endif
+/**
+ * Structure to hold information about a monotonic timer
+ *
+ * Use this with evutil_configure_monotonic_time() and
+ * evutil_gettime_monotonic().
+ *
+ * This is an opaque structure; you can allocate one using
+ * evutil_monotonic_timer_new().
+ *
+ * @see evutil_monotonic_timer_new(), evutil_monotonic_timer_free(),
+ * evutil_configure_monotonic_time(), evutil_gettime_monotonic()
+ */
+struct evutil_monotonic_timer
+#ifdef EVENT_IN_DOXYGEN_
+{/*Empty body so that doxygen will generate documentation here.*/}
+#endif
+;
+
+#define EV_MONOT_PRECISE 1
+#define EV_MONOT_FALLBACK 2
+
+/** Allocate a new struct evutil_monotonic_timer for use with the
+ * evutil_configure_monotonic_time() and evutil_gettime_monotonic()
+ * functions. You must configure the timer with
+ * evutil_configure_monotonic_time() before using it.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evutil_monotonic_timer * evutil_monotonic_timer_new(void);
+
+/** Free a struct evutil_monotonic_timer that was allocated using
+ * evutil_monotonic_timer_new().
+ */
+EVENT2_EXPORT_SYMBOL
+void evutil_monotonic_timer_free(struct evutil_monotonic_timer *timer);
+
+/** Set up a struct evutil_monotonic_timer; flags can include
+ * EV_MONOT_PRECISE and EV_MONOT_FALLBACK.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_configure_monotonic_time(struct evutil_monotonic_timer *timer,
+ int flags);
+
+/** Query the current monotonic time from a struct evutil_monotonic_timer
+ * previously configured with evutil_configure_monotonic_time(). Monotonic
+ * time is guaranteed never to run in reverse, but is not necessarily epoch-
+ * based, or relative to any other definite point. Use it to make reliable
+ * measurements of elapsed time between events even when the system time
+ * may be changed.
+ *
+ * It is not safe to use this funtion on the same timer from multiple
+ * threads.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_gettime_monotonic(struct evutil_monotonic_timer *timer,
+ struct timeval *tp);
+
/** Create two new sockets that are connected to each other.
On Unix, this simply calls socketpair(). On Windows, it uses the
@@ -327,6 +383,19 @@ int evutil_make_socket_nonblocking(evutil_socket_t sock);
EVENT2_EXPORT_SYMBOL
int evutil_make_listen_socket_reuseable(evutil_socket_t sock);
+/** Do platform-specific operations to make a listener port reusable.
+
+ Specifically, we want to make sure that multiple programs which also
+ set the same socket option will be able to bind, listen at the same time.
+
+ This is a feature available only to Linux 3.9+
+
+ @param sock The socket to make reusable
+ @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_make_listen_socket_reuseable_port(evutil_socket_t sock);
+
/** Do platform-specific operations as needed to close a socket upon a
successful execution of one of the exec*() functions.
diff --git a/sntp/libevent/kqueue.c b/sntp/libevent/kqueue.c
index 39334674244b..a6578dfe1a57 100644
--- a/sntp/libevent/kqueue.c
+++ b/sntp/libevent/kqueue.c
@@ -332,6 +332,23 @@ kq_dispatch(struct event_base *base, struct timeval *tv)
* on FreeBSD. */
case EINVAL:
continue;
+#if defined(__FreeBSD__) && defined(ENOTCAPABLE)
+ /*
+ * This currently occurs if an FD is closed
+ * before the EV_DELETE makes it out via kevent().
+ * The FreeBSD capabilities code sees the blank
+ * capability set and rejects the request to
+ * modify an event.
+ *
+ * To be strictly correct - when an FD is closed,
+ * all the registered events are also removed.
+ * Queuing EV_DELETE to a closed FD is wrong.
+ * The event(s) should just be deleted from
+ * the pending changelist.
+ */
+ case ENOTCAPABLE:
+ continue;
+#endif
/* Can occur on a delete if the fd is closed. */
case EBADF:
diff --git a/sntp/libevent/listener.c b/sntp/libevent/listener.c
index 3272c405ce6e..172d2927c0c3 100644
--- a/sntp/libevent/listener.c
+++ b/sntp/libevent/listener.c
@@ -235,6 +235,11 @@ evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb,
goto err;
}
+ if (flags & LEV_OPT_REUSEABLE_PORT) {
+ if (evutil_make_listen_socket_reuseable_port(fd) < 0)
+ goto err;
+ }
+
if (flags & LEV_OPT_DEFERRED_ACCEPT) {
if (evutil_make_tcp_listen_socket_deferred(fd) < 0)
goto err;
diff --git a/sntp/libevent/m4/acx_pthread.m4 b/sntp/libevent/m4/acx_pthread.m4
new file mode 100644
index 000000000000..d2b116945f9f
--- /dev/null
+++ b/sntp/libevent/m4/acx_pthread.m4
@@ -0,0 +1,279 @@
+##### http://autoconf-archive.cryp.to/acx_pthread.html
+#
+# SYNOPSIS
+#
+# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads.
+# It sets the PTHREAD_LIBS output variable to the threads library and
+# linker flags, and the PTHREAD_CFLAGS output variable to any special
+# C compiler flags that are needed. (The user can also force certain
+# compiler flags/libs to be tested by setting these environment
+# variables.)
+#
+# Also sets PTHREAD_CC to any special C compiler that is needed for
+# multi-threaded programs (defaults to the value of CC otherwise).
+# (This is necessary on AIX to use the special cc_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these
+# flags, but also link it with them as well. e.g. you should link
+# with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
+# $LIBS
+#
+# If you are only building threads programs, you may wish to use
+# these variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
+# constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
+# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads
+# library is found, and ACTION-IF-NOT-FOUND is a list of commands to
+# run it if it is not found. If ACTION-IF-FOUND is not specified, the
+# default action will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or
+# if you have any other suggestions or comments. This macro was based
+# on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/)
+# (with help from M. Frigo), as well as ac_pthread and hb_pthread
+# macros posted by Alejandro Forero Cuervo to the autoconf macro
+# repository. We are also grateful for the helpful feedback of
+# numerous users.
+#
+# LAST MODIFICATION
+#
+# 2007-07-29
+#
+# COPYLEFT
+#
+# Copyright (c) 2007 Steven G. Johnson <stevenj@alum.mit.edu>
+#
+# This program is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright
+# owner gives unlimited permission to copy, distribute and modify the
+# configure scripts that are the output of Autoconf when processing
+# the Macro. You need not follow the terms of the GNU General Public
+# License when using or distributing such scripts, even though
+# portions of the text of the Macro appear in them. The GNU General
+# Public License (GPL) does govern all other use of the material that
+# constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the
+# Autoconf Macro released by the Autoconf Macro Archive. When you
+# make and distribute a modified version of the Autoconf Macro, you
+# may extend this special exception to the GPL to apply to your
+# modified version as well.
+
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+ AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+ *solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+ case $flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $flag])
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ AC_MSG_CHECKING([for the pthreads library -l$flag])
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+ [acx_pthread_ok=yes])
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test "x$acx_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_MSG_CHECKING([for joinable pthread attribute])
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
+ [attr_name=$attr; break])
+ done
+ AC_MSG_RESULT($attr_name)
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ fi
+
+ AC_MSG_CHECKING([if more special flags are required for pthreads])
+ flag=no
+ case "${host_cpu}-${host_os}" in
+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ esac
+ AC_MSG_RESULT(${flag})
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # More AIX lossage: must compile with xlc_r or cc_r
+ if test x"$GCC" != xyes; then
+ AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
+ else
+ PTHREAD_CC=$CC
+ fi
+else
+ PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+ :
+else
+ acx_pthread_ok=no
+ $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
diff --git a/sntp/libevent/sample/http-server.c b/sntp/libevent/sample/http-server.c
index 1cb89bc91b04..cbb9c914dd8f 100644
--- a/sntp/libevent/sample/http-server.c
+++ b/sntp/libevent/sample/http-server.c
@@ -246,7 +246,10 @@ send_document_cb(struct evhttp_request *req, void *arg)
goto err;
#endif
- evbuffer_add_printf(evb, "<html>\n <head>\n"
+ evbuffer_add_printf(evb,
+ "<!DOCTYPE html>\n"
+ "<html>\n <head>\n"
+ " <meta charset='utf-8'>\n"
" <title>%s</title>\n"
" <base href='%s%s'>\n"
" </head>\n"
@@ -274,7 +277,7 @@ send_document_cb(struct evhttp_request *req, void *arg)
#endif
evbuffer_add_printf(evb, "</ul></body></html>\n");
#ifdef _WIN32
- CloseHandle(d);
+ FindClose(d);
#else
closedir(d);
#endif
diff --git a/sntp/libevent/sample/https-client.c b/sntp/libevent/sample/https-client.c
index e13ac4bd342f..fbd5de8c59c2 100644
--- a/sntp/libevent/sample/https-client.c
+++ b/sntp/libevent/sample/https-client.c
@@ -96,7 +96,7 @@ static void
syntax(void)
{
fputs("Syntax:\n", stderr);
- fputs(" https-client -url <https-url> [-data data-file.bin] [-ignore-cert]\n", stderr);
+ fputs(" https-client -url <https-url> [-data data-file.bin] [-ignore-cert] [-retries num]\n", stderr);
fputs("Example:\n", stderr);
fputs(" https-client -url https://ip.appspot.com/\n", stderr);
@@ -195,6 +195,7 @@ main(int argc, char **argv)
const char *scheme, *host, *path, *query;
char uri[256];
int port;
+ int retries = 0;
SSL_CTX *ssl_ctx;
SSL *ssl;
@@ -221,6 +222,12 @@ main(int argc, char **argv)
} else {
syntax();
}
+ } else if (!strcmp("-retries", argv[i])) {
+ if (i < argc - 1) {
+ retries = atoi(argv[i + 1]);
+ } else {
+ syntax();
+ }
} else if (!strcmp("-help", argv[i])) {
syntax();
}
@@ -346,8 +353,10 @@ main(int argc, char **argv)
die_openssl("SSL_new()");
}
+ #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
// Set hostname for SNI extension
SSL_set_tlsext_host_name(ssl, host);
+ #endif
if (strcasecmp(scheme, "http") == 0) {
bev = bufferevent_socket_new(base, -1, BEV_OPT_CLOSE_ON_FREE);
@@ -373,6 +382,10 @@ main(int argc, char **argv)
return 1;
}
+ if (retries > 0) {
+ evhttp_connection_set_retries(evcon, retries);
+ }
+
// Fire off the request
req = evhttp_request_new(http_request_done, bev);
if (req == NULL) {
@@ -402,7 +415,7 @@ main(int argc, char **argv)
evbuffer_add(output_buffer, buf, s);
bytes += s;
}
- evutil_snprintf(buf, sizeof(buf)-1, "%lu", bytes);
+ evutil_snprintf(buf, sizeof(buf)-1, "%lu", (unsigned long)bytes);
evhttp_add_header(output_headers, "Content-Length", buf);
fclose(f);
}
diff --git a/sntp/libevent/sample/include.am b/sntp/libevent/sample/include.am
index 81980ac51e1d..75f87c70d961 100644
--- a/sntp/libevent/sample/include.am
+++ b/sntp/libevent/sample/include.am
@@ -30,7 +30,9 @@ noinst_HEADERS += \
sample/openssl_hostname_validation.h
endif
+if BUILD_SAMPLES
noinst_PROGRAMS += $(SAMPLES)
+endif
$(SAMPLES) : libevent.la
diff --git a/sntp/libevent/test/include.am b/sntp/libevent/test/include.am
index ca36da46e271..4cd49ef6306f 100644
--- a/sntp/libevent/test/include.am
+++ b/sntp/libevent/test/include.am
@@ -49,7 +49,8 @@ TESTS = test/test-script.sh
test/test-script.sh: test/test.sh
cp $(top_srcdir)/test/test.sh $@
-DISTCLEANFILES += test/test-script.sh test/regress.gen.c test/regress.gen.h
+DISTCLEANFILES += test/test-script.sh
+DISTCLEANFILES += test/regress.gen.c test/regress.gen.h
if BUILD_REGRESS
BUILT_SOURCES += test/regress.gen.c test/regress.gen.h
diff --git a/sntp/libevent/test/regress.c b/sntp/libevent/test/regress.c
index 4d17b6780b04..399ba2fbd8d7 100644
--- a/sntp/libevent/test/regress.c
+++ b/sntp/libevent/test/regress.c
@@ -944,17 +944,18 @@ signal_cb(evutil_socket_t fd, short event, void *arg)
}
static void
-test_simplesignal(void)
+test_simplesignal_impl(int find_reorder)
{
struct event ev;
struct itimerval itv;
- setup_test("Simple signal: ");
evsignal_set(&ev, SIGALRM, signal_cb, &ev);
evsignal_add(&ev, NULL);
/* find bugs in which operations are re-ordered */
- evsignal_del(&ev);
- evsignal_add(&ev, NULL);
+ if (find_reorder) {
+ evsignal_del(&ev);
+ evsignal_add(&ev, NULL);
+ }
memset(&itv, 0, sizeof(itv));
itv.it_value.tv_sec = 0;
@@ -971,6 +972,20 @@ test_simplesignal(void)
}
static void
+test_simplestsignal(void)
+{
+ setup_test("Simplest one signal: ");
+ test_simplesignal_impl(0);
+}
+
+static void
+test_simplesignal(void)
+{
+ setup_test("Simple signal: ");
+ test_simplesignal_impl(1);
+}
+
+static void
test_multiplesignal(void)
{
struct event ev_one, ev_two;
@@ -1658,7 +1673,7 @@ static void
test_active_later(void *ptr)
{
struct basic_test_data *data = ptr;
- struct event *ev1, *ev2;
+ struct event *ev1 = NULL, *ev2 = NULL;
struct event ev3, ev4;
struct timeval qsec = {0, 100000};
ev1 = event_new(data->base, data->pair[0], EV_READ|EV_PERSIST, read_and_drain_cb, NULL);
@@ -1693,10 +1708,15 @@ test_active_later(void *ptr)
* it. */
event_active_later_(&ev3, EV_READ);
event_base_assert_ok_(data->base);
+
+end:
+ if (ev1)
+ event_free(ev1);
+ if (ev2)
+ event_free(ev2);
+
event_base_free(data->base);
data->base = NULL;
-end:
- ;
}
@@ -2281,7 +2301,7 @@ evtag_fuzz(void *ptr)
for (j = 0; j < 100; j++) {
for (i = 0; i < (int)sizeof(buffer); i++)
- buffer[i] = rand();
+ buffer[i] = test_weakrand();
evbuffer_drain(tmp, -1);
evbuffer_add(tmp, buffer, sizeof(buffer));
@@ -3294,6 +3314,7 @@ struct testcase_t evtag_testcases[] = {
struct testcase_t signal_testcases[] = {
#ifndef _WIN32
+ LEGACY(simplestsignal, TT_ISOLATED),
LEGACY(simplesignal, TT_ISOLATED),
LEGACY(multiplesignal, TT_ISOLATED),
LEGACY(immediatesignal, TT_ISOLATED),
diff --git a/sntp/libevent/test/regress.h b/sntp/libevent/test/regress.h
index a9892b0ef7c8..bbfefe6739e4 100644
--- a/sntp/libevent/test/regress.h
+++ b/sntp/libevent/test/regress.h
@@ -53,6 +53,10 @@ extern struct testcase_t listener_testcases[];
extern struct testcase_t listener_iocp_testcases[];
extern struct testcase_t thread_testcases[];
+extern struct evutil_weakrand_state test_weakrand_state;
+
+#define test_weakrand() (evutil_weakrand_(&test_weakrand_state))
+
void regress_threads(void *);
void test_bufferevent_zlib(void *);
@@ -114,7 +118,7 @@ int test_ai_eq_(const struct evutil_addrinfo *ai, const char *sockaddr_port,
} while (0)
#define test_timeval_diff_leq(tv1, tv2, diff, tolerance) \
- tt_int_op(abs(timeval_msec_diff((tv1), (tv2)) - diff), <=, tolerance)
+ tt_int_op(labs(timeval_msec_diff((tv1), (tv2)) - diff), <=, tolerance)
#define test_timeval_diff_eq(tv1, tv2, diff) \
test_timeval_diff_leq((tv1), (tv2), (diff), 50)
diff --git a/sntp/libevent/test/regress_buffer.c b/sntp/libevent/test/regress_buffer.c
index ccb14870a5be..4d6a5de20b33 100644
--- a/sntp/libevent/test/regress_buffer.c
+++ b/sntp/libevent/test/regress_buffer.c
@@ -246,7 +246,7 @@ test_evbuffer(void *ptr)
if (memcmp(evbuffer_pullup(
evb, -1), buffer, sizeof(buffer) / 2) != 0 ||
memcmp(evbuffer_pullup(
- evb_two, -1), buffer, sizeof(buffer) != 0))
+ evb_two, -1), buffer, sizeof(buffer)) != 0)
tt_abort_msg("Pullup did not preserve content");
evbuffer_validate(evb);
@@ -863,6 +863,10 @@ test_evbuffer_add_file(void *ptr)
evutil_closesocket(pair[0]);
if (pair[1] >= 0)
evutil_closesocket(pair[1]);
+ if (wev)
+ event_free(wev);
+ if (rev)
+ event_free(rev);
if (tmpfilename) {
unlink(tmpfilename);
free(tmpfilename);
@@ -1534,9 +1538,9 @@ test_evbuffer_callbacks(void *ptr)
tt_assert(!evbuffer_remove_cb(buf, log_change_callback, buf_out2));
evbuffer_validate(buf);
- tt_str_op(evbuffer_pullup(buf_out1, -1), ==,
+ tt_str_op((const char *) evbuffer_pullup(buf_out1, -1), ==,
"0->36; 36->26; 26->31; 31->38; ");
- tt_str_op(evbuffer_pullup(buf_out2, -1), ==,
+ tt_str_op((const char *) evbuffer_pullup(buf_out2, -1), ==,
"0->36; 31->38; 38->0; 0->1; ");
evbuffer_drain(buf_out1, evbuffer_get_length(buf_out1));
evbuffer_drain(buf_out2, evbuffer_get_length(buf_out2));
@@ -1552,7 +1556,7 @@ test_evbuffer_callbacks(void *ptr)
tt_uint_op(evbuffer_get_length(buf_out2), ==, 0);
evbuffer_setcb(buf, NULL, NULL);
evbuffer_add_printf(buf, "This will not.");
- tt_str_op(evbuffer_pullup(buf, -1), ==, "This will not.");
+ tt_str_op((const char *) evbuffer_pullup(buf, -1), ==, "This will not.");
evbuffer_validate(buf);
evbuffer_drain(buf, evbuffer_get_length(buf));
evbuffer_validate(buf);
@@ -1660,7 +1664,7 @@ test_evbuffer_add_reference(void *ptr)
evbuffer_add(buf1, "You shake and shake the ", 24);
evbuffer_add_reference(buf1, "ketchup bottle", 14, ref_done_cb,
(void*)3333);
- evbuffer_add(buf1, ". Nothing comes and then a lot'll.", 42);
+ evbuffer_add(buf1, ". Nothing comes and then a lot'll.", 35);
evbuffer_free(buf1);
buf1 = NULL;
tt_int_op(ref_done_cb_called_count, ==, 3);
@@ -1840,6 +1844,42 @@ end:
}
static void
+test_evbuffer_peek_first_gt(void *info)
+{
+ struct evbuffer *buf = NULL, *tmp_buf = NULL;
+ struct evbuffer_ptr ptr;
+ struct evbuffer_iovec v[2];
+
+ buf = evbuffer_new();
+ tmp_buf = evbuffer_new();
+ evbuffer_add_printf(tmp_buf, "Contents of chunk 100\n");
+ evbuffer_add_buffer(buf, tmp_buf);
+ evbuffer_add_printf(tmp_buf, "Contents of chunk 1\n");
+ evbuffer_add_buffer(buf, tmp_buf);
+
+ evbuffer_ptr_set(buf, &ptr, 0, EVBUFFER_PTR_SET);
+
+ /** The only case that matters*/
+ tt_int_op(evbuffer_peek(buf, -1, &ptr, NULL, 0), ==, 2);
+ /** Just in case */
+ tt_int_op(evbuffer_peek(buf, -1, &ptr, v, 2), ==, 2);
+
+ evbuffer_ptr_set(buf, &ptr, 20, EVBUFFER_PTR_ADD);
+ tt_int_op(evbuffer_peek(buf, -1, &ptr, NULL, 0), ==, 2);
+ tt_int_op(evbuffer_peek(buf, -1, &ptr, v, 2), ==, 2);
+ tt_int_op(evbuffer_peek(buf, 2, &ptr, NULL, 0), ==, 1);
+ tt_int_op(evbuffer_peek(buf, 2, &ptr, v, 2), ==, 1);
+ tt_int_op(evbuffer_peek(buf, 3, &ptr, NULL, 0), ==, 2);
+ tt_int_op(evbuffer_peek(buf, 3, &ptr, v, 2), ==, 2);
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+ if (tmp_buf)
+ evbuffer_free(tmp_buf);
+}
+
+static void
test_evbuffer_peek(void *info)
{
struct evbuffer *buf = NULL, *tmp_buf = NULL;
@@ -2096,7 +2136,7 @@ test_evbuffer_copyout(void *dummy)
"When the rich Allobrogenses never kept amanuenses, "
"And our only plots were piled in lakes at Berne.";
/* -- Kipling, "In The Neolithic Age" */
- char tmp[256];
+ char tmp[1024];
struct evbuffer_ptr ptr;
struct evbuffer *buf;
@@ -2206,6 +2246,7 @@ struct testcase_t evbuffer_testcases[] = {
{ "multicast_drain", test_evbuffer_multicast_drain, 0, NULL, NULL },
{ "prepend", test_evbuffer_prepend, TT_FORK, NULL, NULL },
{ "peek", test_evbuffer_peek, 0, NULL, NULL },
+ { "peek_first_gt", test_evbuffer_peek_first_gt, 0, NULL, NULL },
{ "freeze_start", test_evbuffer_freeze, 0, &nil_setup, (void*)"start" },
{ "freeze_end", test_evbuffer_freeze, 0, &nil_setup, (void*)"end" },
{ "add_iovec", test_evbuffer_add_iovec, 0, NULL, NULL},
diff --git a/sntp/libevent/test/regress_bufferevent.c b/sntp/libevent/test/regress_bufferevent.c
index 4ec2dccf43e9..a1998ba62cd1 100644
--- a/sntp/libevent/test/regress_bufferevent.c
+++ b/sntp/libevent/test/regress_bufferevent.c
@@ -75,6 +75,7 @@
#include "event2/util.h"
#include "bufferevent-internal.h"
+#include "evthread-internal.h"
#include "util-internal.h"
#ifdef _WIN32
#include "iocp-internal.h"
@@ -173,9 +174,9 @@ test_bufferevent_impl(int use_pair)
event_dispatch();
- bufferevent_free(bev1);
- tt_ptr_op(bufferevent_pair_get_partner(bev2), ==, NULL);
bufferevent_free(bev2);
+ tt_ptr_op(bufferevent_pair_get_partner(bev1), ==, NULL);
+ bufferevent_free(bev1);
if (test_ok != 2)
test_ok = 0;
@@ -195,6 +196,143 @@ test_bufferevent_pair(void)
test_bufferevent_impl(1);
}
+#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED)
+/**
+ * Trace lock/unlock/alloc/free for locks.
+ * (More heavier then evthread_debug*)
+ */
+typedef struct
+{
+ void *lock;
+ enum {
+ ALLOC, FREE,
+ } status;
+ size_t locked /** allow recursive locking */;
+} lock_wrapper;
+struct lock_unlock_base
+{
+ /* Original callbacks */
+ struct evthread_lock_callbacks cbs;
+ /* Map of locks */
+ lock_wrapper *locks;
+ size_t nr_locks;
+} lu_base = {
+ .locks = NULL,
+};
+
+static lock_wrapper *lu_find(void *lock_)
+{
+ size_t i;
+ for (i = 0; i < lu_base.nr_locks; ++i) {
+ lock_wrapper *lock = &lu_base.locks[i];
+ if (lock->lock == lock_)
+ return lock;
+ }
+ return NULL;
+}
+
+static void *trace_lock_alloc(unsigned locktype)
+{
+ ++lu_base.nr_locks;
+ lu_base.locks = realloc(lu_base.locks,
+ sizeof(lock_wrapper) * lu_base.nr_locks);
+ void *lock = lu_base.cbs.alloc(locktype);
+ lu_base.locks[lu_base.nr_locks - 1] = (lock_wrapper){ lock, ALLOC, 0 };
+ return lock;
+}
+static void trace_lock_free(void *lock_, unsigned locktype)
+{
+ lock_wrapper *lock = lu_find(lock_);
+ if (!lock || lock->status == FREE || lock->locked) {
+ __asm__("int3");
+ TT_FAIL(("lock: free error"));
+ } else {
+ lock->status = FREE;
+ lu_base.cbs.free(lock_, locktype);
+ }
+}
+static int trace_lock_lock(unsigned mode, void *lock_)
+{
+ lock_wrapper *lock = lu_find(lock_);
+ if (!lock || lock->status == FREE) {
+ TT_FAIL(("lock: lock error"));
+ return -1;
+ } else {
+ ++lock->locked;
+ return lu_base.cbs.lock(mode, lock_);
+ }
+}
+static int trace_lock_unlock(unsigned mode, void *lock_)
+{
+ lock_wrapper *lock = lu_find(lock_);
+ if (!lock || lock->status == FREE || !lock->locked) {
+ TT_FAIL(("lock: unlock error"));
+ return -1;
+ } else {
+ --lock->locked;
+ return lu_base.cbs.unlock(mode, lock_);
+ }
+}
+static void lock_unlock_free_thread_cbs()
+{
+ event_base_free(NULL);
+
+ /** drop immutable flag */
+ evthread_set_lock_callbacks(NULL);
+ /** avoid calling of event_global_setup_locks_() for new cbs */
+ libevent_global_shutdown();
+ /** drop immutable flag for non-debug ops (since called after shutdown) */
+ evthread_set_lock_callbacks(NULL);
+}
+
+static int use_lock_unlock_profiler(void)
+{
+ struct evthread_lock_callbacks cbs = {
+ EVTHREAD_LOCK_API_VERSION,
+ EVTHREAD_LOCKTYPE_RECURSIVE,
+ trace_lock_alloc,
+ trace_lock_free,
+ trace_lock_lock,
+ trace_lock_unlock,
+ };
+ memcpy(&lu_base.cbs, evthread_get_lock_callbacks(),
+ sizeof(lu_base.cbs));
+ {
+ lock_unlock_free_thread_cbs();
+
+ evthread_set_lock_callbacks(&cbs);
+ /** re-create debug locks correctly */
+ evthread_enable_lock_debugging();
+
+ event_init();
+ }
+ return 0;
+}
+static void free_lock_unlock_profiler(struct basic_test_data *data)
+{
+ lock_unlock_free_thread_cbs();
+ free(lu_base.locks);
+ data->base = NULL;
+}
+
+static void test_bufferevent_pair_release_lock(void *arg)
+{
+ struct basic_test_data *data = arg;
+ use_lock_unlock_profiler();
+ {
+ struct bufferevent *pair[2];
+ if (!bufferevent_pair_new(NULL, BEV_OPT_THREADSAFE, pair)) {
+ bufferevent_free(pair[0]);
+ bufferevent_free(pair[1]);
+ } else
+ tt_abort_perror("bufferevent_pair_new");
+ }
+ free_lock_unlock_profiler(data);
+end:
+ ;
+}
+#endif
+
/*
* test watermarks and bufferevent
*/
@@ -287,6 +425,11 @@ test_bufferevent_watermarks_impl(int use_pair)
tt_int_op(low, ==, 100);
tt_int_op(high, ==, 2000);
+ {
+ int r = bufferevent_getwatermark(bev1, EV_WRITE | EV_READ, &low, &high);
+ tt_int_op(r, !=, 0);
+ }
+
bufferevent_write(bev1, buffer, sizeof(buffer));
event_dispatch();
@@ -944,6 +1087,11 @@ struct testcase_t bufferevent_testcases[] = {
LEGACY(bufferevent, TT_ISOLATED),
LEGACY(bufferevent_pair, TT_ISOLATED),
+#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED)
+ { "bufferevent_pair_release_lock", test_bufferevent_pair_release_lock,
+ TT_FORK|TT_ISOLATED|TT_NEED_THREADS|TT_NEED_BASE|TT_LEGACY,
+ &basic_setup, NULL },
+#endif
LEGACY(bufferevent_watermarks, TT_ISOLATED),
LEGACY(bufferevent_pair_watermarks, TT_ISOLATED),
LEGACY(bufferevent_filters, TT_ISOLATED),
diff --git a/sntp/libevent/test/regress_dns.c b/sntp/libevent/test/regress_dns.c
index 338c4ee8fd54..6d6b48443df5 100644
--- a/sntp/libevent/test/regress_dns.c
+++ b/sntp/libevent/test/regress_dns.c
@@ -406,6 +406,22 @@ dns_server(void)
* the only nameserver. */
evdns_base_nameserver_sockaddr_add(base, (struct sockaddr*)&ss, slen, 0);
tt_int_op(evdns_base_count_nameservers(base), ==, 1);
+ {
+ struct sockaddr_storage ss2;
+ int slen2;
+
+ memset(&ss2, 0, sizeof(ss2));
+
+ slen2 = evdns_base_get_nameserver_addr(base, 0, (struct sockaddr *)&ss2, 3);
+ tt_int_op(slen2, ==, slen);
+ tt_int_op(ss2.ss_family, ==, 0);
+ slen2 = evdns_base_get_nameserver_addr(base, 0, (struct sockaddr *)&ss2, sizeof(ss2));
+ tt_int_op(slen2, ==, slen);
+ tt_mem_op(&ss2, ==, &ss, slen);
+
+ slen2 = evdns_base_get_nameserver_addr(base, 1, (struct sockaddr *)&ss2, sizeof(ss2));
+ tt_int_op(-1, ==, slen2);
+ }
/* Send some queries. */
evdns_base_resolve_ipv4(base, "zz.example.com", DNS_QUERY_NO_SEARCH,
@@ -443,6 +459,7 @@ end:
static int n_replies_left;
static struct event_base *exit_base;
+static struct evdns_server_port *exit_port;
struct generic_dns_callback_result {
int result;
@@ -483,8 +500,14 @@ generic_dns_callback(int result, char type, int count, int ttl, void *addresses,
res->addrs = res->addrs_buf;
}
- if (--n_replies_left == 0)
- event_base_loopexit(exit_base, NULL);
+ --n_replies_left;
+ if (n_replies_left == 0) {
+ if (exit_port) {
+ evdns_close_server_port(exit_port);
+ exit_port = NULL;
+ } else
+ event_base_loopexit(exit_base, NULL);
+ }
}
static struct regress_dns_server_table search_table[] = {
@@ -664,7 +687,7 @@ end:
}
static void
-dns_retry_test(void *arg)
+dns_retry_test_impl(void *arg, int flags)
{
struct basic_test_data *data = arg;
struct event_base *base = data->base;
@@ -681,7 +704,7 @@ dns_retry_test(void *arg)
tt_assert(port);
evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
- dns = evdns_base_new(base, 0);
+ dns = evdns_base_new(base, flags);
tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
tt_assert(! evdns_base_set_option(dns, "timeout", "0.2"));
tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "10"));
@@ -736,6 +759,16 @@ end:
if (port)
evdns_close_server_port(port);
}
+static void
+dns_retry_test(void *arg)
+{
+ dns_retry_test_impl(arg, 0);
+}
+static void
+dns_retry_disable_when_inactive_test(void *arg)
+{
+ dns_retry_test_impl(arg, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+}
static struct regress_dns_server_table internal_error_table[] = {
/* Error 4 (NOTIMPL) makes us reissue the request to another server
@@ -753,7 +786,7 @@ static struct regress_dns_server_table reissue_table[] = {
};
static void
-dns_reissue_test(void *arg)
+dns_reissue_test_impl(void *arg, int flags)
{
struct basic_test_data *data = arg;
struct event_base *base = data->base;
@@ -772,7 +805,7 @@ dns_reissue_test(void *arg)
evutil_snprintf(buf1, sizeof(buf1), "127.0.0.1:%d", (int)portnum1);
evutil_snprintf(buf2, sizeof(buf2), "127.0.0.1:%d", (int)portnum2);
- dns = evdns_base_new(base, 0);
+ dns = evdns_base_new(base, flags);
tt_assert(!evdns_base_nameserver_ip_add(dns, buf1));
tt_assert(! evdns_base_set_option(dns, "timeout:", "0.3"));
tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "2"));
@@ -805,6 +838,16 @@ end:
if (port2)
evdns_close_server_port(port2);
}
+static void
+dns_reissue_test(void *arg)
+{
+ dns_reissue_test_impl(arg, 0);
+}
+static void
+dns_reissue_disable_when_inactive_test(void *arg)
+{
+ dns_reissue_test_impl(arg, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+}
#if 0
static void
@@ -819,21 +862,29 @@ dumb_bytes_fn(char *p, size_t n)
#endif
static void
-dns_inflight_test(void *arg)
+dns_inflight_test_impl(void *arg, int flags)
{
struct basic_test_data *data = arg;
struct event_base *base = data->base;
struct evdns_base *dns = NULL;
+ struct evdns_server_port *dns_port = NULL;
ev_uint16_t portnum = 0;
char buf[64];
+ int disable_when_inactive = flags & EVDNS_BASE_DISABLE_WHEN_INACTIVE;
struct generic_dns_callback_result r[20];
int i;
- tt_assert(regress_dnsserver(base, &portnum, reissue_table));
+ dns_port = regress_get_dnsserver(base, &portnum, NULL,
+ regress_dns_server_cb, reissue_table);
+ tt_assert(dns_port);
+ if (disable_when_inactive) {
+ exit_port = dns_port;
+ }
+
evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
- dns = evdns_base_new(base, 0);
+ dns = evdns_base_new(base, flags);
tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
tt_assert(! evdns_base_set_option(dns, "max-inflight:", "3"));
tt_assert(! evdns_base_set_option(dns, "randomize-case:", "0"));
@@ -855,7 +906,65 @@ dns_inflight_test(void *arg)
end:
if (dns)
evdns_base_free(dns, 0);
+ if (exit_port) {
+ evdns_close_server_port(exit_port);
+ exit_port = NULL;
+ } else if (! disable_when_inactive) {
+ evdns_close_server_port(dns_port);
+ }
+}
+
+static void
+dns_inflight_test(void *arg)
+{
+ dns_inflight_test_impl(arg, 0);
+}
+
+static void
+dns_disable_when_inactive_test(void *arg)
+{
+ dns_inflight_test_impl(arg, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+}
+
+static void
+dns_disable_when_inactive_no_ns_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base, *inactive_base;
+ struct evdns_base *dns = NULL;
+ ev_uint16_t portnum = 0;
+ char buf[64];
+ struct generic_dns_callback_result r;
+
+ inactive_base = event_base_new();
+ tt_assert(inactive_base);
+
+ /** Create dns server with inactive base, to avoid replying to clients */
+ tt_assert(regress_dnsserver(inactive_base, &portnum, search_table));
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
+
+ dns = evdns_base_new(base, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
+ tt_assert(! evdns_base_set_option(dns, "timeout:", "0.1"));
+
+ evdns_base_resolve_ipv4(dns, "foof.example.com", 0, generic_dns_callback, &r);
+ n_replies_left = 1;
+ exit_base = base;
+
+ event_base_dispatch(base);
+
+ tt_int_op(n_replies_left, ==, 0);
+
+ tt_int_op(r.result, ==, DNS_ERR_TIMEOUT);
+ tt_int_op(r.count, ==, 0);
+ tt_ptr_op(r.addrs, ==, NULL);
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
regress_clean_dnsserver();
+ if (inactive_base)
+ event_base_free(inactive_base);
}
/* === Test for bufferevent_socket_connect_hostname */
@@ -1563,7 +1672,8 @@ test_getaddrinfo_async(void *arg)
end:
if (local_outcome.ai)
evutil_freeaddrinfo(local_outcome.ai);
- for (i=0;i<10;++i) {
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+ for (i=0;i<(int)ARRAY_SIZE(a_out);++i) {
if (a_out[i].ai)
evutil_freeaddrinfo(a_out[i].ai);
}
@@ -1694,9 +1804,15 @@ testleak_setup(const struct testcase_t *testcase)
struct testleak_env_t *env;
allocated_chunks = 0;
+
+ /* Reset allocation counter, to start allocations from the very beginning.
+ * (this will avoid false-positive negative numbers for allocated_chunks)
+ */
+ libevent_global_shutdown();
+
event_set_mem_functions(cnt_malloc, cnt_realloc, cnt_free);
- if (!libevent_tests_running_in_debug_mode)
- event_enable_debug_mode();
+
+ event_enable_debug_mode();
/* not mm_calloc: we don't want to mess with the count. */
env = calloc(1, sizeof(struct testleak_env_t));
@@ -1717,8 +1833,8 @@ testleak_cleanup(const struct testcase_t *testcase, void *env_)
#ifdef EVENT__DISABLE_DEBUG_MODE
tt_int_op(allocated_chunks, ==, 0);
#else
- /* FIXME: that's `1' because of event_debug_map_HT_GROW */
- tt_int_op(allocated_chunks, ==, 1);
+ libevent_global_shutdown();
+ tt_int_op(allocated_chunks, ==, 0);
#endif
ok = 1;
end:
@@ -1791,6 +1907,7 @@ dbg_leak_resume(void *env_, int cancel, int send_err_shutdown)
end:
evdns_base_free(env->dns_base, send_err_shutdown);
env->dns_base = 0;
+
event_base_free(env->base);
env->base = 0;
}
@@ -1875,6 +1992,8 @@ end:
evdns_base_free(dns_base, 1);
if (server)
evdns_close_server_port(server);
+ if (base)
+ event_base_free(base);
if (fd >= 0)
evutil_closesocket(fd);
}
@@ -1894,10 +2013,18 @@ struct testcase_t dns_testcases[] = {
{ "search_cancel", dns_search_cancel_test,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "retry", dns_retry_test, TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+ { "retry_disable_when_inactive", dns_retry_disable_when_inactive_test,
+ TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
{ "reissue", dns_reissue_test, TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+ { "reissue_disable_when_inactive", dns_reissue_disable_when_inactive_test,
+ TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
{ "inflight", dns_inflight_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "bufferevent_connect_hostname", test_bufferevent_connect_hostname,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "disable_when_inactive", dns_disable_when_inactive_test,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "disable_when_inactive_no_ns", dns_disable_when_inactive_no_ns_test,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "getaddrinfo_async", test_getaddrinfo_async,
TT_FORK|TT_NEED_BASE, &basic_setup, (char*)"" },
diff --git a/sntp/libevent/test/regress_finalize.c b/sntp/libevent/test/regress_finalize.c
index 61a6313f1b3b..552210fe9d01 100644
--- a/sntp/libevent/test/regress_finalize.c
+++ b/sntp/libevent/test/regress_finalize.c
@@ -25,6 +25,7 @@
*/
#include "event2/event-config.h"
+#include "evconfig-private.h"
#include "tinytest.h"
#include "tinytest_macros.h"
#include <stdlib.h>
diff --git a/sntp/libevent/test/regress_http.c b/sntp/libevent/test/regress_http.c
index ca7d5155bf14..35f6dd768961 100644
--- a/sntp/libevent/test/regress_http.c
+++ b/sntp/libevent/test/regress_http.c
@@ -105,8 +105,12 @@ http_bind(struct evhttp *myhttp, ev_uint16_t *pport, int ipv6)
else
sock = evhttp_bind_socket_with_handle(myhttp, "127.0.0.1", *pport);
- if (sock == NULL)
- event_errx(1, "Could not start web server");
+ if (sock == NULL) {
+ if (ipv6)
+ return -1;
+ else
+ event_errx(1, "Could not start web server");
+ }
port = regress_get_socket_port(evhttp_bound_socket_get_fd(sock));
if (port < 0)
@@ -395,7 +399,7 @@ http_basic_test(void *arg)
{
struct basic_test_data *data = arg;
struct timeval tv;
- struct bufferevent *bev;
+ struct bufferevent *bev = NULL;
evutil_socket_t fd;
const char *http_request;
ev_uint16_t port = 0, port2 = 0;
@@ -480,7 +484,8 @@ http_basic_test(void *arg)
evhttp_free(http);
end:
- ;
+ if (bev)
+ bufferevent_free(bev);
}
@@ -714,6 +719,7 @@ http_delete_test(void *arg)
http = http_setup(&port, data->base, 0);
+ tt_assert(http);
fd = http_connect("127.0.0.1", port);
tt_int_op(fd, >=, 0);
@@ -734,6 +740,7 @@ http_delete_test(void *arg)
bufferevent_free(bev);
evutil_closesocket(fd);
+ fd = -1;
evhttp_free(http);
@@ -953,7 +960,8 @@ static void http_request_done(struct evhttp_request *, void *);
static void http_request_empty_done(struct evhttp_request *, void *);
static void
-http_connection_test_(struct basic_test_data *data, int persistent, const char *address, struct evdns_base *dnsbase, int ipv6)
+http_connection_test_(struct basic_test_data *data, int persistent,
+ const char *address, struct evdns_base *dnsbase, int ipv6, int family)
{
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
@@ -962,9 +970,14 @@ http_connection_test_(struct basic_test_data *data, int persistent, const char *
test_ok = 0;
http = http_setup(&port, data->base, ipv6);
+ if (!http && ipv6) {
+ tt_skip();
+ }
+ tt_assert(http);
evcon = evhttp_connection_base_new(data->base, dnsbase, address, port);
tt_assert(evcon);
+ evhttp_connection_set_family(evcon, family);
tt_assert(evhttp_connection_get_base(evcon) == data->base);
@@ -1038,12 +1051,12 @@ http_connection_test_(struct basic_test_data *data, int persistent, const char *
static void
http_connection_test(void *arg)
{
- http_connection_test_(arg, 0, "127.0.0.1", NULL, 0);
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC);
}
static void
http_persist_connection_test(void *arg)
{
- http_connection_test_(arg, 1, "127.0.0.1", NULL, 0);
+ http_connection_test_(arg, 1, "127.0.0.1", NULL, 0, AF_UNSPEC);
}
static struct regress_dns_server_table search_table[] = {
@@ -1147,6 +1160,63 @@ http_connection_async_test(void *arg)
}
static void
+http_autofree_connection_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req[2] = { NULL };
+
+ test_ok = 0;
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule two request to the HTTP
+ * server using our make request method.
+ */
+ req[0] = evhttp_request_new(http_request_empty_done, data->base);
+ req[1] = evhttp_request_new(http_request_empty_done, data->base);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req[0]), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req[0]), "Connection", "close");
+ evhttp_add_header(evhttp_request_get_output_headers(req[0]), "Empty", "itis");
+ evhttp_add_header(evhttp_request_get_output_headers(req[1]), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req[1]), "Connection", "close");
+ evhttp_add_header(evhttp_request_get_output_headers(req[1]), "Empty", "itis");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req[0], EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("couldn't make request");
+ }
+ if (evhttp_make_request(evcon, req[1], EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("couldn't make request");
+ }
+
+ /*
+ * Tell libevent to free the connection when the request completes
+ * We then set the evcon pointer to NULL since we don't want to free it
+ * when this function ends.
+ */
+ evhttp_connection_free_on_completion(evcon);
+ evcon = NULL;
+
+ event_base_dispatch(data->base);
+
+ /* at this point, the http server should have no connection */
+ tt_assert(TAILQ_FIRST(&http->connections) == NULL);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
http_request_never_call(struct evhttp_request *req, void *arg)
{
fprintf(stdout, "FAILED\n");
@@ -2743,6 +2813,7 @@ http_incomplete_test_(struct basic_test_data *data, int use_timeout)
bufferevent_free(bev);
if (use_timeout) {
evutil_closesocket(fd);
+ fd = -1;
}
evhttp_free(http);
@@ -3748,7 +3819,7 @@ static struct regress_dns_server_table ipv6_search_table[] = {
};
static void
-http_ipv6_for_domain_test(void *arg)
+http_ipv6_for_domain_test_impl(void *arg, int family)
{
struct basic_test_data *data = arg;
struct evdns_base *dns_base = NULL;
@@ -3765,13 +3836,19 @@ http_ipv6_for_domain_test(void *arg)
evutil_snprintf(address, sizeof(address), "127.0.0.1:%d", portnum);
evdns_base_nameserver_ip_add(dns_base, address);
- http_connection_test_(arg, 0 /* not persistent */, "localhost", dns_base, 1 /* ipv6 */);
+ http_connection_test_(arg, 0 /* not persistent */, "localhost", dns_base,
+ 1 /* ipv6 */, family);
end:
if (dns_base)
evdns_base_free(dns_base, 0);
regress_clean_dnsserver();
}
+static void
+http_ipv6_for_domain_test(void *arg)
+{
+ http_ipv6_for_domain_test_impl(arg, AF_UNSPEC);
+}
static void
http_request_get_addr_on_close(struct evhttp_connection *evcon, void *arg)
@@ -3836,6 +3913,22 @@ http_get_addr_test(void *arg)
evhttp_free(http);
}
+static void
+http_set_family_test(void *arg)
+{
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC);
+}
+static void
+http_set_family_ipv4_test(void *arg)
+{
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_INET);
+}
+static void
+http_set_family_ipv6_test(void *arg)
+{
+ http_ipv6_for_domain_test_impl(arg, AF_INET6);
+}
+
#define HTTP_LEGACY(name) \
{ #name, run_legacy_test_fn, TT_ISOLATED|TT_LEGACY, &legacy_setup, \
http_##name##_test }
@@ -3861,6 +3954,7 @@ struct testcase_t http_testcases[] = {
HTTP(failure),
HTTP(connection),
HTTP(persist_connection),
+ HTTP(autofree_connection),
HTTP(connection_async),
HTTP(close_detection),
HTTP(close_detection_delay),
@@ -3888,6 +3982,10 @@ struct testcase_t http_testcases[] = {
HTTP(ipv6_for_domain),
HTTP(get_addr),
+ HTTP(set_family),
+ HTTP(set_family_ipv4),
+ HTTP(set_family_ipv6),
+
END_OF_TESTCASES
};
diff --git a/sntp/libevent/test/regress_main.c b/sntp/libevent/test/regress_main.c
index 58cbe5fe2741..3198ced1da35 100644
--- a/sntp/libevent/test/regress_main.c
+++ b/sntp/libevent/test/regress_main.c
@@ -90,6 +90,8 @@
#include "../iocp-internal.h"
#include "../event-internal.h"
+struct evutil_weakrand_state test_weakrand_state;
+
long
timeval_msec_diff(const struct timeval *start, const struct timeval *end)
{
@@ -452,6 +454,8 @@ main(int argc, const char **argv)
tinytest_set_aliases(testaliases);
+ evutil_weakrand_seed_(&test_weakrand_state, 0);
+
if (tinytest_main(argc,argv,testgroups))
return 1;
diff --git a/sntp/libevent/test/regress_minheap.c b/sntp/libevent/test/regress_minheap.c
index a1f554ebbe8f..05db32e26f4d 100644
--- a/sntp/libevent/test/regress_minheap.c
+++ b/sntp/libevent/test/regress_minheap.c
@@ -30,12 +30,13 @@
#include "tinytest.h"
#include "tinytest_macros.h"
+#include "regress.h"
static void
set_random_timeout(struct event *ev)
{
- ev->ev_timeout.tv_sec = rand();
- ev->ev_timeout.tv_usec = rand() & 0xfffff;
+ ev->ev_timeout.tv_sec = test_weakrand();
+ ev->ev_timeout.tv_usec = test_weakrand() & 0xfffff;
ev->ev_timeout_pos.min_heap_idx = -1;
}
diff --git a/sntp/libevent/test/regress_ssl.c b/sntp/libevent/test/regress_ssl.c
index c2113414cc63..bf9b46b1ef88 100644
--- a/sntp/libevent/test/regress_ssl.c
+++ b/sntp/libevent/test/regress_ssl.c
@@ -194,6 +194,7 @@ respond_to_number(struct bufferevent *bev, void *ctx)
n = atoi(line);
if (n <= 0)
TT_FAIL(("Bad number: %s", line));
+ free(line);
TT_BLATHER(("The number was %d", n));
if (n == 1001) {
++test_is_done;
diff --git a/sntp/libevent/test/regress_thread.c b/sntp/libevent/test/regress_thread.c
index 612bf1d6111f..c42668ea8839 100644
--- a/sntp/libevent/test/regress_thread.c
+++ b/sntp/libevent/test/regress_thread.c
@@ -361,7 +361,7 @@ thread_conditions_simple(void *arg)
&tv_signal);
diff2 = timeval_msec_diff(&actual_delay,
&tv_broadcast);
- if (abs(diff1) < abs(diff2)) {
+ if (labs(diff1) < labs(diff2)) {
TT_BLATHER(("%d looks like a signal\n", i));
target_delay = &tv_signal;
++n_signal;
@@ -382,7 +382,8 @@ thread_conditions_simple(void *arg)
tt_int_op(n_signal, ==, 1);
end:
- ;
+ EVTHREAD_FREE_LOCK(cond.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ EVTHREAD_FREE_COND(cond.cond);
}
#define CB_COUNT 128
diff --git a/sntp/libevent/test/regress_util.c b/sntp/libevent/test/regress_util.c
index d64d002495ab..60f085bf1db3 100644
--- a/sntp/libevent/test/regress_util.c
+++ b/sntp/libevent/test/regress_util.c
@@ -179,10 +179,10 @@ regress_ipv6_parse(void *ptr)
for (j = 0; j < 4; ++j) {
/* Can't use s6_addr32 here; some don't have it. */
ev_uint32_t u =
- (in6.s6_addr[j*4 ] << 24) |
- (in6.s6_addr[j*4+1] << 16) |
- (in6.s6_addr[j*4+2] << 8) |
- (in6.s6_addr[j*4+3]);
+ ((ev_uint32_t)in6.s6_addr[j*4 ] << 24) |
+ ((ev_uint32_t)in6.s6_addr[j*4+1] << 16) |
+ ((ev_uint32_t)in6.s6_addr[j*4+2] << 8) |
+ ((ev_uint32_t)in6.s6_addr[j*4+3]);
if (u != ent->res[j]) {
TT_FAIL(("%s did not parse as expected.", ent->addr));
continue;
@@ -726,46 +726,48 @@ test_evutil_integers(void *arg)
tt_assert(u64 > 0);
tt_assert(i64 > 0);
u64++;
- i64++;
+/* i64++; */
tt_assert(u64 == 0);
- tt_assert(i64 == EV_INT64_MIN);
- tt_assert(i64 < 0);
+/* tt_assert(i64 == EV_INT64_MIN); */
+/* tt_assert(i64 < 0); */
u32 = EV_UINT32_MAX;
i32 = EV_INT32_MAX;
tt_assert(u32 > 0);
tt_assert(i32 > 0);
u32++;
- i32++;
+/* i32++; */
tt_assert(u32 == 0);
- tt_assert(i32 == EV_INT32_MIN);
- tt_assert(i32 < 0);
+/* tt_assert(i32 == EV_INT32_MIN); */
+/* tt_assert(i32 < 0); */
u16 = EV_UINT16_MAX;
i16 = EV_INT16_MAX;
tt_assert(u16 > 0);
tt_assert(i16 > 0);
u16++;
- i16++;
+/* i16++; */
tt_assert(u16 == 0);
- tt_assert(i16 == EV_INT16_MIN);
- tt_assert(i16 < 0);
+/* tt_assert(i16 == EV_INT16_MIN); */
+/* tt_assert(i16 < 0); */
u8 = EV_UINT8_MAX;
i8 = EV_INT8_MAX;
tt_assert(u8 > 0);
tt_assert(i8 > 0);
u8++;
- i8++;
+/* i8++;*/
tt_assert(u8 == 0);
- tt_assert(i8 == EV_INT8_MIN);
- tt_assert(i8 < 0);
+/* tt_assert(i8 == EV_INT8_MIN); */
+/* tt_assert(i8 < 0); */
+/*
ssize = EV_SSIZE_MAX;
tt_assert(ssize > 0);
ssize++;
tt_assert(ssize < 0);
tt_assert(ssize == EV_SSIZE_MIN);
+*/
ptr = &ssize;
iptr = (ev_intptr_t)ptr;
@@ -1119,7 +1121,7 @@ end:
static void
test_evutil_loadsyslib(void *arg)
{
- HANDLE h=NULL;
+ HMODULE h=NULL;
h = evutil_load_windows_system_library_(TEXT("kernel32.dll"));
tt_assert(h);
diff --git a/sntp/libevent/test/regress_zlib.c b/sntp/libevent/test/regress_zlib.c
index 9339397c93b6..8406676932ed 100644
--- a/sntp/libevent/test/regress_zlib.c
+++ b/sntp/libevent/test/regress_zlib.c
@@ -56,6 +56,7 @@
#include "event2/bufferevent.h"
#include "regress.h"
+#include "mm-internal.h"
/* zlib 1.2.4 and 1.2.5 do some "clever" things with macros. Instead of
saying "(defined(FOO) ? FOO : 0)" they like to say "FOO-0", on the theory
@@ -95,6 +96,7 @@ zlib_deflate_free(void *ctx)
z_streamp p = ctx;
assert(deflateEnd(p) == Z_OK);
+ mm_free(p);
}
static void
@@ -103,6 +105,7 @@ zlib_inflate_free(void *ctx)
z_streamp p = ctx;
assert(inflateEnd(p) == Z_OK);
+ mm_free(p);
}
static int
@@ -275,7 +278,7 @@ test_bufferevent_zlib(void *arg)
{
struct bufferevent *bev1=NULL, *bev2=NULL;
char buffer[8333];
- z_stream z_input, z_output;
+ z_stream *z_input, *z_output;
int i, r;
evutil_socket_t pair[2] = {-1, -1};
(void)arg;
@@ -293,18 +296,18 @@ test_bufferevent_zlib(void *arg)
bev1 = bufferevent_socket_new(NULL, pair[0], 0);
bev2 = bufferevent_socket_new(NULL, pair[1], 0);
- memset(&z_output, 0, sizeof(z_output));
- r = deflateInit(&z_output, Z_DEFAULT_COMPRESSION);
+ z_output = mm_calloc(sizeof(*z_output), 1);
+ r = deflateInit(z_output, Z_DEFAULT_COMPRESSION);
tt_int_op(r, ==, Z_OK);
- memset(&z_input, 0, sizeof(z_input));
- r = inflateInit(&z_input);
+ z_input = mm_calloc(sizeof(*z_input), 1);
+ r = inflateInit(z_input);
tt_int_op(r, ==, Z_OK);
/* initialize filters */
bev1 = bufferevent_filter_new(bev1, NULL, zlib_output_filter,
- BEV_OPT_CLOSE_ON_FREE, zlib_deflate_free, &z_output);
+ BEV_OPT_CLOSE_ON_FREE, zlib_deflate_free, z_output);
bev2 = bufferevent_filter_new(bev2, zlib_input_filter,
- NULL, BEV_OPT_CLOSE_ON_FREE, zlib_inflate_free, &z_input);
+ NULL, BEV_OPT_CLOSE_ON_FREE, zlib_inflate_free, z_input);
bufferevent_setcb(bev1, readcb, writecb, errorcb, NULL);
bufferevent_setcb(bev2, readcb, writecb, errorcb, NULL);
diff --git a/sntp/libevent/test/test-fdleak.c b/sntp/libevent/test/test-fdleak.c
index ee2432b71317..4c4eba25e70e 100644
--- a/sntp/libevent/test/test-fdleak.c
+++ b/sntp/libevent/test/test-fdleak.c
@@ -57,7 +57,7 @@
#endif
/* Provide storage for the address, both for the server & the clients */
-static struct sockaddr_in sin;
+static struct sockaddr_in saddr;
/* Number of sucessful requests so far */
static int num_requests;
@@ -131,7 +131,7 @@ start_loop(void)
listener = evconnlistener_new_bind(base, listener_accept_cb, NULL,
LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE,
- -1, (struct sockaddr *)&sin, sizeof(sin));
+ -1, (struct sockaddr *)&saddr, sizeof(saddr));
if (listener == NULL) {
my_perror("Could not create listener!");
exit(1);
@@ -145,8 +145,8 @@ start_loop(void)
my_perror("getsockname()");
exit(1);
}
- memcpy(&sin, &ss, sizeof(sin));
- if (sin.sin_family != AF_INET) {
+ memcpy(&saddr, &ss, sizeof(saddr));
+ if (saddr.sin_family != AF_INET) {
puts("AF mismatch from getsockname().");
exit(1);
}
@@ -208,8 +208,8 @@ start_client(struct event_base *base)
BEV_OPT_CLOSE_ON_FREE);
bufferevent_setcb(bev, client_read_cb, NULL, client_event_cb, NULL);
- if (bufferevent_socket_connect(bev, (struct sockaddr *)&sin,
- sizeof(sin)) < 0) {
+ if (bufferevent_socket_connect(bev, (struct sockaddr *)&saddr,
+ sizeof(saddr)) < 0) {
my_perror("Could not connect!");
bufferevent_free(bev);
exit(2);
@@ -236,10 +236,10 @@ main(int argc, char **argv)
#endif
/* Set up an address, used by both client & server. */
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = htonl(0x7f000001);
- sin.sin_port = 0; /* Tell the implementation to pick a port. */
+ memset(&saddr, 0, sizeof(saddr));
+ saddr.sin_family = AF_INET;
+ saddr.sin_addr.s_addr = htonl(0x7f000001);
+ saddr.sin_port = 0; /* Tell the implementation to pick a port. */
start_loop();
diff --git a/sntp/libevent/test/test-ratelim.c b/sntp/libevent/test/test-ratelim.c
index 27649b8490e0..17babfdcbcf5 100644
--- a/sntp/libevent/test/test-ratelim.c
+++ b/sntp/libevent/test/test-ratelim.c
@@ -50,6 +50,7 @@
#include "event2/listener.h"
#include "event2/thread.h"
+static struct evutil_weakrand_state weakrand_state;
static int cfg_verbose = 0;
static int cfg_help = 0;
@@ -113,11 +114,7 @@ loud_writecb(struct bufferevent *bev, void *ctx)
struct client_state *cs = ctx;
struct evbuffer *output = bufferevent_get_output(bev);
char buf[1024];
-#ifdef _WIN32
- int r = rand() % 256;
-#else
- int r = random() % 256;
-#endif
+ int r = evutil_weakrand_(&weakrand_state);
memset(buf, r, sizeof(buf));
while (evbuffer_get_length(output) < 8192) {
evbuffer_add(output, buf, sizeof(buf));
@@ -223,7 +220,7 @@ check_bucket_levels_cb(evutil_socket_t fd, short events, void *arg)
#undef B
total_n_bev_checks++;
- if (total_n_bev_checks >= .8 * (cfg_duration / cfg_tick_msec) * cfg_n_connections) {
+ if (total_n_bev_checks >= .8 * ((double)cfg_duration / cfg_tick_msec) * cfg_n_connections) {
event_free(event_base_get_running_event(bufferevent_get_base(bev)));
}
}
@@ -553,6 +550,8 @@ main(int argc, char **argv)
(void) WSAStartup(wVersionRequested, &wsaData);
#endif
+ evutil_weakrand_seed_(&weakrand_state, 0);
+
#ifndef _WIN32
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
return 1;
diff --git a/sntp/libevent/test/test-time.c b/sntp/libevent/test/test-time.c
index dcd6639a56fb..bcc7086df7ed 100644
--- a/sntp/libevent/test/test-time.c
+++ b/sntp/libevent/test/test-time.c
@@ -41,6 +41,7 @@
#include "event2/event.h"
#include "event2/event_compat.h"
#include "event2/event_struct.h"
+#include "util-internal.h"
int called = 0;
@@ -48,14 +49,12 @@ int called = 0;
struct event *ev[NEVENT];
+struct evutil_weakrand_state weakrand_state;
+
static int
rand_int(int n)
{
-#ifdef _WIN32
- return (int)(rand() % n);
-#else
- return (int)(random() % n);
-#endif
+ return evutil_weakrand_(&weakrand_state) % n;
}
static void
@@ -71,7 +70,7 @@ time_cb(evutil_socket_t fd, short event, void *arg)
j = rand_int(NEVENT);
tv.tv_sec = 0;
tv.tv_usec = rand_int(50000);
- if (tv.tv_usec % 2)
+ if (tv.tv_usec % 2 || called < NEVENT)
evtimer_add(ev[j], &tv);
else
evtimer_del(ev[j]);
@@ -93,6 +92,8 @@ main(int argc, char **argv)
(void) WSAStartup(wVersionRequested, &wsaData);
#endif
+ evutil_weakrand_seed_(&weakrand_state, 0);
+
/* Initalize the event library */
event_init();
@@ -108,6 +109,8 @@ main(int argc, char **argv)
event_dispatch();
+
+ printf("%d, %d\n", called, NEVENT);
return (called < NEVENT);
}
diff --git a/sntp/libevent/test/tinytest.c b/sntp/libevent/test/tinytest.c
index 36b3a627c48b..3a8e33105501 100644
--- a/sntp/libevent/test/tinytest.c
+++ b/sntp/libevent/test/tinytest.c
@@ -31,6 +31,8 @@
#include <string.h>
#include <assert.h>
+#ifndef NO_FORKING
+
#ifdef _WIN32
#include <windows.h>
#else
@@ -48,6 +50,8 @@
#endif
#endif
+#endif /* !NO_FORKING */
+
#ifndef __GNUC__
#define __attribute__(x)
#endif
@@ -111,6 +115,8 @@ testcase_run_bare_(const struct testcase_t *testcase)
#define MAGIC_EXITCODE 42
+#ifndef NO_FORKING
+
static enum outcome
testcase_run_forked_(const struct testgroup_t *group,
const struct testcase_t *testcase)
@@ -211,6 +217,8 @@ testcase_run_forked_(const struct testgroup_t *group,
#endif
}
+#endif /* !NO_FORKING */
+
int
testcase_run_one(const struct testgroup_t *group,
const struct testcase_t *testcase)
@@ -234,9 +242,13 @@ testcase_run_one(const struct testgroup_t *group,
cur_test_name = testcase->name;
}
+#ifndef NO_FORKING
if ((testcase->flags & TT_FORK) && !(opt_forked||opt_nofork)) {
outcome = testcase_run_forked_(group, testcase);
} else {
+#else
+ {
+#endif
outcome = testcase_run_bare_(testcase);
}
@@ -411,7 +423,9 @@ tinytest_main(int c, const char **v, struct testgroup_t *groups)
if (!n)
tinytest_set_flag_(groups, "..", 1, TT_ENABLED_);
+#ifdef _IONBF
setvbuf(stdout, NULL, _IONBF, 0);
+#endif
++in_tinytest_main;
for (i=0; groups[i].prefix; ++i)
@@ -458,3 +472,22 @@ tinytest_set_test_skipped_(void)
cur_test_outcome = SKIP;
}
+char *
+tinytest_format_hex_(const void *val_, unsigned long len)
+{
+ const unsigned char *val = val_;
+ char *result, *cp;
+ size_t i;
+
+ if (!val)
+ return strdup("null");
+ if (!(result = malloc(len*2+1)))
+ return strdup("<allocation failure>");
+ cp = result;
+ for (i=0;i<len;++i) {
+ *cp++ = "0123456789ABCDEF"[val[i] >> 4];
+ *cp++ = "0123456789ABCDEF"[val[i] & 0x0f];
+ }
+ *cp = 0;
+ return result;
+}
diff --git a/sntp/libevent/test/tinytest.h b/sntp/libevent/test/tinytest.h
index dff440e3190e..ed07b26bc006 100644
--- a/sntp/libevent/test/tinytest.h
+++ b/sntp/libevent/test/tinytest.h
@@ -81,6 +81,8 @@ int tinytest_get_verbosity_(void);
/** Implementation: Set a flag on tests matching a name; returns number
* of tests that matched. */
int tinytest_set_flag_(struct testgroup_t *, const char *, int set, unsigned long);
+/** Implementation: Put a chunk of memory into hex. */
+char *tinytest_format_hex_(const void *, unsigned long);
/** Set all tests in 'groups' matching the name 'named' to be skipped. */
#define tinytest_skip(groups, named) \
diff --git a/sntp/libevent/test/tinytest_macros.h b/sntp/libevent/test/tinytest_macros.h
index 9ff69b1d506d..c3728d1fdd61 100644
--- a/sntp/libevent/test/tinytest_macros.h
+++ b/sntp/libevent/test/tinytest_macros.h
@@ -113,8 +113,8 @@
#define tt_assert_test_fmt_type(a,b,str_test,type,test,printf_type,printf_fmt, \
setup_block,cleanup_block,die_on_fail) \
TT_STMT_BEGIN \
- type val1_ = (type)(a); \
- type val2_ = (type)(b); \
+ type val1_ = (a); \
+ type val2_ = (b); \
int tt_status_ = (test); \
if (!tt_status_ || tinytest_get_verbosity_()>1) { \
printf_type print_; \
@@ -144,6 +144,10 @@
tt_assert_test_fmt_type(a,b,str_test,type,test,type,fmt, \
{print_=value_;},{},die_on_fail)
+#define tt_assert_test_type_opt(a,b,str_test,type,test,fmt,die_on_fail) \
+ tt_assert_test_fmt_type(a,b,str_test,type,test,type,fmt, \
+ {print_=value_?value_:"<NULL>";},{},die_on_fail)
+
/* Helper: assert that a op b, when cast to type. Format the values with
* printf format fmt on failure. */
#define tt_assert_op_type(a,op,b,type,fmt) \
@@ -159,12 +163,23 @@
(val1_ op val2_),"%lu",TT_EXIT_TEST_FUNCTION)
#define tt_ptr_op(a,op,b) \
- tt_assert_test_type(a,b,#a" "#op" "#b,void*, \
+ tt_assert_test_type(a,b,#a" "#op" "#b,const void*, \
(val1_ op val2_),"%p",TT_EXIT_TEST_FUNCTION)
#define tt_str_op(a,op,b) \
- tt_assert_test_type(a,b,#a" "#op" "#b,const char *, \
- (strcmp(val1_,val2_) op 0),"<%s>",TT_EXIT_TEST_FUNCTION)
+ tt_assert_test_type_opt(a,b,#a" "#op" "#b,const char *, \
+ (val1_ && val2_ && strcmp(val1_,val2_) op 0),"<%s>", \
+ TT_EXIT_TEST_FUNCTION)
+
+#define tt_mem_op(expr1, op, expr2, len) \
+ tt_assert_test_fmt_type(expr1,expr2,#expr1" "#op" "#expr2, \
+ const void *, \
+ (val1_ && val2_ && memcmp(val1_, val2_, len) op 0), \
+ char *, "%s", \
+ { print_ = tinytest_format_hex_(value_, (len)); }, \
+ { if (print_) free(print_); }, \
+ TT_EXIT_TEST_FUNCTION \
+ );
#define tt_want_int_op(a,op,b) \
tt_assert_test_type(a,b,#a" "#op" "#b,long,(val1_ op val2_),"%ld",(void)0)
@@ -174,7 +189,7 @@
(val1_ op val2_),"%lu",(void)0)
#define tt_want_ptr_op(a,op,b) \
- tt_assert_test_type(a,b,#a" "#op" "#b,void*, \
+ tt_assert_test_type(a,b,#a" "#op" "#b,const void*, \
(val1_ op val2_),"%p",(void)0)
#define tt_want_str_op(a,op,b) \
diff --git a/sntp/libevent/time-internal.h b/sntp/libevent/time-internal.h
index daf20f47a30e..2c584fa75263 100644
--- a/sntp/libevent/time-internal.h
+++ b/sntp/libevent/time-internal.h
@@ -86,9 +86,6 @@ struct evutil_monotonic_timer {
struct timeval last_time;
};
-#define EV_MONOT_PRECISE 1
-#define EV_MONOT_FALLBACK 2
-
int evutil_configure_monotonic_time_(struct evutil_monotonic_timer *mt,
int flags);
int evutil_gettime_monotonic_(struct evutil_monotonic_timer *mt, struct timeval *tv);
diff --git a/sntp/libevent/util-internal.h b/sntp/libevent/util-internal.h
index 5866dbc518bd..4fdedeaf93c5 100644
--- a/sntp/libevent/util-internal.h
+++ b/sntp/libevent/util-internal.h
@@ -392,7 +392,7 @@ void evutil_free_secure_rng_globals_(void);
void evutil_free_globals_(void);
#ifdef _WIN32
-HANDLE evutil_load_windows_system_library_(const TCHAR *library_name);
+HMODULE evutil_load_windows_system_library_(const TCHAR *library_name);
#endif
#ifndef EV_SIZE_FMT
diff --git a/sntp/libevent/whatsnew-2.1.txt b/sntp/libevent/whatsnew-2.1.txt
index c0ee7cf7dc02..0be54ae11b50 100644
--- a/sntp/libevent/whatsnew-2.1.txt
+++ b/sntp/libevent/whatsnew-2.1.txt
@@ -41,7 +41,7 @@
We don't try to do binary compatibility except within stable release
series, so binaries linked against any version of Libevent 2.0 will
- probably need to be recompiled against Libevent 2.1.3-alpha if you
+ probably need to be recompiled against Libevent 2.1.4-alpha if you
want to use it. It is probable that we'll break binary compatibility
again before Libevent 2.1 is stable.
@@ -63,6 +63,9 @@
surrounded with appropriate #ifdef lines to keep your IDE from getting
upset.
+ There is now an alternative cmake-based build process; cmake users
+ should see the relevant sections in the README.
+
1.2. New functions for events and the event loop
@@ -146,6 +149,19 @@
that's a no-op in past versions of Libevent, and we don't want to
break compatibility.)
+ You can use the new event_base_get_num_events() function to find the
+ number of events active or pending on an event_base. To find the
+ largest number of events that there have been since the last call, use
+ event_base_get_max_events().
+
+ You can now activate all the events waiting for a given fd or signal
+ using the event_base_active_by_fd() and event_base_active_by_signal()
+ APIs.
+
+ On backends that support it (currently epoll), there is now an
+ EV_CLOSED flag that programs can use to detect when a socket has
+ closed without having to read all the bytes until receiving an EOF.
+
1.3. Event finalization
[NOTE: This is an experimental feature in Libevent 2.1.3-alpha. Though
@@ -325,6 +341,13 @@
You can find the priority at which a bufferevent runs with
bufferevent_get_priority().
+ The function bufferevent_get_token_bucket_cfg() can retrieve the
+ rate-limit settings for a bufferevent; bufferevent_getwatermark() can
+ return a bufferevent's current watermark settings.
+
+ You can manually trigger a bufferevent's callbacks via
+ bufferevent_trigger() and bufferevent_trigger_event().
+
1.7. New functions and features: evdns
The previous evdns interface used an "open a test UDP socket" trick in
@@ -340,6 +363,9 @@
flag, which tells the evdns_base that it should not prevent Libevent from
exiting while it has no DNS requests in progress.
+ There is a new evdns_base_clear_host_addresses() function to remove
+ all the /etc/hosts addresses registered with an evdns instance.
+
1.8. New functions and features: evconnlistener
Libevent 2.1 adds the following evconnlistener flags:
@@ -392,6 +418,31 @@
and actually reports the error code and lets you figure out which request
failed.
+ You can navigate from an evhttp_connection back to its evhttp with the
+ new evhttp_connection_get_server() function.
+
+ You can override the default HTTP Content-Type with the new
+ evhttp_set_default_content_type() function
+
+ There's a new evhttp_connection_get_addr() API to return the peer
+ address of an evhttp_connection.
+
+ The new evhttp_send_reply_chunk_with_cb() is a variant of
+ evhttp_send_reply_chunk() with a callback to be invoked when the
+ chunk is sent.
+
+ The evhttp_request_set_header_cb() facility adds a callback to be
+ invoked while parsing headers.
+
+ The evhttp_request_set_on_complete_cb() facility adds a callback to be
+ invoked on request completion.
+
+1.10. New functions and features: evutil
+
+ There's a function "evutil_secure_rng_set_urandom_device_file()" that
+ you can use to override the default file that Libevent uses to seed
+ its (sort-of) secure RNG.
+
2. Cross-platform performance improvements
2.1. Better data structures
diff --git a/sntp/libopts/Makefile.in b/sntp/libopts/Makefile.in
index 3b107c7a73e3..feb2e0f5c822 100644
--- a/sntp/libopts/Makefile.in
+++ b/sntp/libopts/Makefile.in
@@ -39,8 +39,6 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -60,8 +58,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -303,6 +303,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4
index 4a4ca181bcce..352098b808c6 100644
--- a/sntp/libopts/m4/libopts.m4
+++ b/sntp/libopts/m4/libopts.m4
@@ -216,7 +216,7 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
LIBREGEX_LIBS=""
AC_MSG_CHECKING([whether libregex functions properly])
AC_CACHE_VAL([libopts_cv_with_libregex],[
- AC_RUN_IFELSE([@%:@include <stdio.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
@%:@include <stdlib.h>
@%:@include <sys/types.h>
@%:@include REGEX_HEADER
@@ -235,7 +235,7 @@ int main() {
fputs( "error: regex -->.<-- did not match\n", stderr );
return 1;
}
- return 0; }],
+ return 0; }])],
[libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
[libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
@@ -260,12 +260,12 @@ libopts_cv_with_libregex=no
AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
AC_MSG_CHECKING([whether pathfind(3) works])
AC_CACHE_VAL([libopts_cv_run_pathfind],[
- AC_RUN_IFELSE([@%:@include <string.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <string.h>
@%:@include <stdlib.h>
int main (int argc, char** argv) {
char* pz = pathfind( getenv( "PATH" ), "sh", "x" );
return (pz == 0) ? 1 : 0;
-}],
+}])],
[libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
@@ -303,7 +303,7 @@ echo ${dzero}`
AC_DEFUN([LIBOPTS_RUN_REALPATH],[
AC_MSG_CHECKING([whether we have a functional realpath(3C)])
AC_CACHE_VAL([libopts_cv_run_realpath],[
- AC_RUN_IFELSE([@%:@include <limits.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <limits.h>
@%:@include <stdlib.h>
int main (int argc, char** argv) {
@%:@ifndef PATH_MAX
@@ -313,7 +313,7 @@ choke me!!
@%:@endif
char *pz = realpath(argv@<:@0@:>@, zPath);
return (pz == zPath) ? 0 : 1;
-}],
+}])],
[libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
@@ -330,7 +330,7 @@ choke me!!
AC_DEFUN([LIBOPTS_RUN_STRFTIME],[
AC_MSG_CHECKING([whether strftime() works])
AC_CACHE_VAL([libopts_cv_run_strftime],[
- AC_RUN_IFELSE([@%:@include <time.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <time.h>
@%:@include <string.h>
char t_buf@<:@ 64 @:>@;
int main() {
@@ -346,7 +346,7 @@ int main() {
tm.tm_yday = 239; /* days since January 1 @<:@0, 365@:>@ */
tm.tm_isdst = 1; /* flag for daylight savings time */
strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
- return (strcmp( t_buf, z ) != 0); }],
+ return (strcmp( t_buf, z ) != 0); }])],
[libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
@@ -363,10 +363,10 @@ int main() {
AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
AC_MSG_CHECKING([whether fopen accepts "b" mode])
AC_CACHE_VAL([libopts_cv_run_fopen_binary],[
- AC_RUN_IFELSE([@%:@include <stdio.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
int main (int argc, char** argv) {
FILE* fp = fopen("conftest.@S|@ac_ext", "rb");
-return (fp == NULL) ? 1 : fclose(fp); }],
+return (fp == NULL) ? 1 : fclose(fp); }])],
[libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
@@ -386,10 +386,10 @@ return (fp == NULL) ? 1 : fclose(fp); }],
AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
AC_MSG_CHECKING([whether fopen accepts "t" mode])
AC_CACHE_VAL([libopts_cv_run_fopen_text],[
- AC_RUN_IFELSE([@%:@include <stdio.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
int main (int argc, char** argv) {
FILE* fp = fopen("conftest.@S|@ac_ext", "rt");
-return (fp == NULL) ? 1 : fclose(fp); }],
+return (fp == NULL) ? 1 : fclose(fp); }])],
[libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
diff --git a/sntp/loc/darwin b/sntp/loc/darwin
index c902860b6a07..37d2dcac7a9b 100644
--- a/sntp/loc/darwin
+++ b/sntp/loc/darwin
@@ -12,3 +12,4 @@ ntpsweep,noinst,8
ntptime,sbin,8
ntptrace,sbin,8
sntp,bin,8
+update-leap,sbin,8
diff --git a/sntp/loc/debian b/sntp/loc/debian
index 7bc895ae010b..1242fdf97311 100644
--- a/sntp/loc/debian
+++ b/sntp/loc/debian
@@ -15,3 +15,4 @@ ntptrace,bin,1
sntp,bin,1
tickadj,sbin,8
timetrim,sbin,8
+update-leap,sbin,8
diff --git a/sntp/loc/freebsd b/sntp/loc/freebsd
index 7759e315693a..587f998c153b 100644
--- a/sntp/loc/freebsd
+++ b/sntp/loc/freebsd
@@ -12,3 +12,4 @@ ntptime,sbin,8
ntpsweep,noinst,8
ntptrace,sbin,8
sntp,sbin,8
+update-leap,sbin,8
diff --git a/sntp/loc/legacy b/sntp/loc/legacy
index 46c63a2831a6..5412971b265a 100644
--- a/sntp/loc/legacy
+++ b/sntp/loc/legacy
@@ -15,3 +15,4 @@ ntptrace,bin,1
sntp,bin,1
tickadj,bin,1
timetrim,bin,1
+update-leap,bin,1
diff --git a/sntp/loc/netbsd b/sntp/loc/netbsd
index fa79340db23e..200de2b59620 100644
--- a/sntp/loc/netbsd
+++ b/sntp/loc/netbsd
@@ -12,3 +12,4 @@ ntpsweep,noinst,8
ntptime,sbin,8
ntptrace,sbin,8
sntp,sbin,1
+update-leap,sbin,8
diff --git a/sntp/loc/solaris b/sntp/loc/solaris
index eca143843c4d..a9b3853018bc 100644
--- a/sntp/loc/solaris
+++ b/sntp/loc/solaris
@@ -14,3 +14,4 @@ ntptime,sbin,1m
ntptrace,sbin,1m
sntp,sbin,1m
tickadj,sbin,1m
+update-leap,sbin,1m
diff --git a/sntp/m4/ax_c99_struct_init.m4 b/sntp/m4/ax_c99_struct_init.m4
new file mode 100644
index 000000000000..44a2db3cf8ba
--- /dev/null
+++ b/sntp/m4/ax_c99_struct_init.m4
@@ -0,0 +1,59 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_c99_struct_init.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_C99_STRUCT_INIT
+#
+# DESCRIPTION
+#
+# This macro defines MISSING_C99_STRUCT_INIT if the C compiler does not
+# supports the C99 tagged structure initialization.
+#
+# Given: struct foo_s {int i1; int i2; int i3;};
+# one can write:
+# #if !define(MISSING_C99_STRUCT_INIT)
+# # define FOO_INIT(a, b, c) { .i1 = a, .i2 = b, .i3 = c }
+# #else
+# # define FOO_INIT(a, b, c) { a, b, c }
+#
+# static struct foo_s foo[] = {
+# FOO_INIT(1, 1, 1),
+# FOO_INIT(2, 2, 2),
+# FOO_INIT(0, 0, 0)
+# };
+#
+# LICENSE
+#
+# Copyright (c) 2015 Network Time Foundation
+#
+# Author: Harlan Stenn <stenn@nwtime.org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([AX_C99_STRUCT_INIT], [
+ AC_MSG_CHECKING([whether the compiler supports C99 structure initialization])
+ AC_REQUIRE([AC_PROG_CC_C99])
+
+ AC_LANG_PUSH([C])
+
+ dnl AC_LINK_IFELSE?
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+ struct foo_s {int i1; int i2;};
+ int main() { struct foo_s foo[] = { { .i1 = 1, .i2 = 1 }, { .i1 = 2, .i2 = 2 }, { .i1 = 0, .i2 = 0 } }; }
+ ]])],
+ AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
+ AC_DEFINE([MISSING_C99_STRUCT_INIT], [1],
+ [Define to 1 if the compiler does not support C99's structure initialization.]),
+ )
+
+ AC_LANG_POP([C])
+ ]);
diff --git a/sntp/m4/ntp_libntp.m4 b/sntp/m4/ntp_libntp.m4
index 8842c4a81125..3aa3dff563a4 100644
--- a/sntp/m4/ntp_libntp.m4
+++ b/sntp/m4/ntp_libntp.m4
@@ -878,13 +878,13 @@ AC_CACHE_CHECK(
[for SIGIO],
[ntp_cv_hdr_def_sigio],
[AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <signal.h>
#ifndef SIGIO
# error
#endif
- ],
+ ])],
[ntp_cv_hdr_def_sigio=yes],
[ntp_cv_hdr_def_sigio=no]
)]
@@ -947,13 +947,13 @@ AC_CACHE_CHECK(
[for SIGPOLL],
[ntp_cv_hdr_def_sigpoll],
[AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <signal.h>
#ifndef SIGPOLL
# error
#endif
- ],
+ ])],
[ntp_cv_hdr_def_sigpoll=yes],
[ntp_cv_hdr_def_sigpoll=no]
)]
diff --git a/sntp/m4/ntp_locinfo.m4 b/sntp/m4/ntp_locinfo.m4
index f045ac2609d5..6701ba028b60 100644
--- a/sntp/m4/ntp_locinfo.m4
+++ b/sntp/m4/ntp_locinfo.m4
@@ -124,6 +124,12 @@ AC_SUBST([TIMETRIM_DL])
AC_SUBST([TIMETRIM_DS])
AC_SUBST([TIMETRIM_MS])
AC_SUBST([TIMETRIM_NI])
+AC_SUBST([UPDATE_LEAP_DB])
+AC_SUBST([UPDATE_LEAP_DL])
+AC_SUBST([UPDATE_LEAP_DS])
+AC_SUBST([UPDATE_LEAP_MS])
+AC_SUBST([UPDATE_LEAP_NI])
+AM_CONDITIONAL([INSTALL_UPDATE_LEAP], [test -z "$UPDATE_LEAP_NI" ])
])dnl
dnl ======================================================================
diff --git a/sntp/libevent/m4/openldap-thread-check.m4 b/sntp/m4/openldap-thread-check.m4
index 33f9199ff300..33f9199ff300 100644
--- a/sntp/libevent/m4/openldap-thread-check.m4
+++ b/sntp/m4/openldap-thread-check.m4
diff --git a/sntp/libevent/m4/openldap.m4 b/sntp/m4/openldap.m4
index 49ffb87058ac..49ffb87058ac 100644
--- a/sntp/libevent/m4/openldap.m4
+++ b/sntp/m4/openldap.m4
diff --git a/sntp/m4/version.m4 b/sntp/m4/version.m4
index 06f967692061..945d9cb0cad4 100644
--- a/sntp/m4/version.m4
+++ b/sntp/m4/version.m4
@@ -1 +1 @@
-m4_define([VERSION_NUMBER],[4.2.8p1])
+m4_define([VERSION_NUMBER],[4.2.8p2])
diff --git a/sntp/main.c b/sntp/main.c
index c271c8c457f5..20e27f0fec30 100644
--- a/sntp/main.c
+++ b/sntp/main.c
@@ -1161,6 +1161,7 @@ handle_pkt(
int stratum;
char * ref;
char * ts_str;
+ char * leaptxt;
double offset;
double precision;
double synch_distance;
@@ -1256,9 +1257,28 @@ handle_pkt(
disptxt[0] = '\0';
}
- msyslog(LOG_INFO, "%s %+.*f%s %s s%d%s", ts_str,
+ switch (PKT_LEAP(rpkt->li_vn_mode)) {
+ case LEAP_NOWARNING:
+ leaptxt = "no-leap";
+ break;
+ case LEAP_ADDSECOND:
+ leaptxt = "add-leap";
+ break;
+ case LEAP_DELSECOND:
+ leaptxt = "del-leap";
+ break;
+ case LEAP_NOTINSYNC:
+ leaptxt = "unsync";
+ break;
+ default:
+ leaptxt = "LEAP-ERROR";
+ break;
+ }
+
+ msyslog(LOG_INFO, "%s %+.*f%s %s s%d %s%s", ts_str,
digits, offset, disptxt,
hostnameaddr(hostname, host), stratum,
+ leaptxt,
(time_adjusted)
? " [excess]"
: "");
diff --git a/sntp/scripts/Makefile.in b/sntp/scripts/Makefile.in
index 26c3591bfa33..73025d0bb8ba 100644
--- a/sntp/scripts/Makefile.in
+++ b/sntp/scripts/Makefile.in
@@ -38,8 +38,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -59,8 +57,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -246,6 +246,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/sntp/sntp-opts.c b/sntp/sntp-opts.c
index a9e36457ad13..ce28d653d71c 100644
--- a/sntp/sntp-opts.c
+++ b/sntp/sntp-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed February 4, 2015 at 02:33:35 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:17:23 AM by AutoGen 5.18.5pre4
* From the definitions sntp-opts.def
* and the template file options
*
@@ -70,7 +70,7 @@ extern FILE * option_usage_fp;
* static const strings for sntp options
*/
static char const sntp_opt_strs[2549] =
-/* 0 */ "sntp 4.2.8p1\n"
+/* 0 */ "sntp 4.2.8p2\n"
"Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
@@ -155,7 +155,7 @@ static char const sntp_opt_strs[2549] =
/* 2298 */ "LOAD_OPTS\0"
/* 2308 */ "no-load-opts\0"
/* 2321 */ "SNTP\0"
-/* 2326 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p1\n"
+/* 2326 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ hostname-or-IP ...]\n\0"
/* 2485 */ "$HOME\0"
@@ -163,7 +163,7 @@ static char const sntp_opt_strs[2549] =
/* 2493 */ ".ntprc\0"
/* 2500 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 2534 */ "\n\0"
-/* 2536 */ "sntp 4.2.8p1";
+/* 2536 */ "sntp 4.2.8p2";
/**
* ipv4 option description with
@@ -1173,7 +1173,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via sntpOptions.pzCopyright */
- puts(_("sntp 4.2.8p1\n\
+ puts(_("sntp 4.2.8p2\n\
Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
@@ -1263,7 +1263,7 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via sntpOptions.pzUsageTitle */
- puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p1\n\
+ puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ hostname-or-IP ...]\n"));
@@ -1271,7 +1271,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via sntpOptions.pzFullVersion */
- puts(_("sntp 4.2.8p1"));
+ puts(_("sntp 4.2.8p2"));
/* referenced via sntpOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/sntp/sntp-opts.def b/sntp/sntp-opts.def
index c94d5e96e55b..fcfeaaf6c6b7 100644
--- a/sntp/sntp-opts.def
+++ b/sntp/sntp-opts.def
@@ -281,7 +281,8 @@ Otherwise, only the
is displayed.
Finally, the
.Em stratum
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
_END_PROG_MDOC_DESCRIP;
};
diff --git a/sntp/sntp-opts.h b/sntp/sntp-opts.h
index d0407aa8d3d7..8f1a5df5675a 100644
--- a/sntp/sntp-opts.h
+++ b/sntp/sntp-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed February 4, 2015 at 02:33:34 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:17:22 AM by AutoGen 5.18.5pre4
* From the definitions sntp-opts.def
* and the template file options
*
@@ -91,9 +91,9 @@ typedef enum {
/** count of all options for sntp */
#define OPTION_CT 23
/** sntp version */
-#define SNTP_VERSION "4.2.8p1"
+#define SNTP_VERSION "4.2.8p2"
/** Full sntp version text */
-#define SNTP_FULL_VERSION "sntp 4.2.8p1"
+#define SNTP_FULL_VERSION "sntp 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/sntp/sntp.1sntpman b/sntp/sntp.1sntpman
index 36bdfbd42c9f..1b636e9843b0 100644
--- a/sntp/sntp.1sntpman
+++ b/sntp/sntp.1sntpman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp 1sntpman "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH sntp 1sntpman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-apayaT/ag-zpaq_S)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E6aqmA/ag-76ailA)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:34:13 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:18:00 AM by AutoGen 5.18.5pre4
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -72,7 +72,8 @@ Otherwise, only the
is displayed.
Finally, the
\fIstratum\f[]
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
diff --git a/sntp/sntp.1sntpmdoc b/sntp/sntp.1sntpmdoc
index 26444f5aff2e..5a84a80ff4ce 100644
--- a/sntp/sntp.1sntpmdoc
+++ b/sntp/sntp.1sntpmdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt SNTP 1sntpmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:34:20 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:18:06 AM by AutoGen 5.18.5pre4
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -57,7 +57,8 @@ Otherwise, only the
is displayed.
Finally, the
.Em stratum
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
.Sh "OPTIONS"
.Bl -tag
.It Fl 4 , Fl \-ipv4
diff --git a/sntp/sntp.html b/sntp/sntp.html
index cac641afb391..5b41a7f4d2a2 100644
--- a/sntp/sntp.html
+++ b/sntp/sntp.html
@@ -36,7 +36,7 @@ display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
- <p>This document applies to version 4.2.8p1 of <code>sntp</code>.
+ <p>This document applies to version 4.2.8p2 of <code>sntp</code>.
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
@@ -127,7 +127,8 @@ Otherwise, only the
is displayed.
Finally, the
<em>stratum</em>
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
<p>This section was generated by <strong>AutoGen</strong>,
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>sntp</code> program.
@@ -175,7 +176,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p1
+<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p2
Usage: sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
diff --git a/sntp/sntp.man.in b/sntp/sntp.man.in
index 3a6f9c5e9539..a1a3e0719fa3 100644
--- a/sntp/sntp.man.in
+++ b/sntp/sntp.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp @SNTP_MS@ "04 Feb 2015" "4.2.8p1" "User Commands"
+.TH sntp @SNTP_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-apayaT/ag-zpaq_S)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E6aqmA/ag-76ailA)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:34:13 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:18:00 AM by AutoGen 5.18.5pre4
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -72,7 +72,8 @@ Otherwise, only the
is displayed.
Finally, the
\fIstratum\f[]
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
diff --git a/sntp/sntp.mdoc.in b/sntp/sntp.mdoc.in
index 9b66208f171b..31a42685c0be 100644
--- a/sntp/sntp.mdoc.in
+++ b/sntp/sntp.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt SNTP @SNTP_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:34:20 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:18:06 AM by AutoGen 5.18.5pre4
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -57,7 +57,8 @@ Otherwise, only the
is displayed.
Finally, the
.Em stratum
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
.Sh "OPTIONS"
.Bl -tag
.It Fl 4 , Fl \-ipv4
diff --git a/sntp/tests/Makefile.in b/sntp/tests/Makefile.in
index 73b78daf6bb9..194af0f7754c 100644
--- a/sntp/tests/Makefile.in
+++ b/sntp/tests/Makefile.in
@@ -44,8 +44,6 @@ subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -65,8 +63,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -295,6 +295,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 664785610be9..0b88e406c5e2 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -42,8 +42,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -72,6 +71,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -328,6 +329,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/tests/libntp/Makefile.in b/tests/libntp/Makefile.in
index b5b667b61fb1..233c3ef19353 100644
--- a/tests/libntp/Makefile.in
+++ b/tests/libntp/Makefile.in
@@ -44,8 +44,7 @@ subdir = tests/libntp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -74,6 +73,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -342,6 +343,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/tests/ntpd/Makefile.in b/tests/ntpd/Makefile.in
index a9975b497777..bb51457a5c6c 100644
--- a/tests/ntpd/Makefile.in
+++ b/tests/ntpd/Makefile.in
@@ -44,8 +44,7 @@ subdir = tests/ntpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -74,6 +73,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -345,6 +346,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/util/Makefile.am b/util/Makefile.am
index 88bf7cb022be..8a47a3c554a3 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -112,7 +112,7 @@ $(srcdir)/ntp-keygen.html: $(srcdir)/ntp-keygen.texi $(top_srcdir)/sntp/include/
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp-keygen.html ntp-keygen.texi || true )
-jitter_SOURCES= jitter.c jitter.h
+jitter_SOURCES= jitter.c
jitter_LDADD=
kern.o: kern.c
diff --git a/util/Makefile.in b/util/Makefile.in
index 0325e445d648..f4fc7124331a 100644
--- a/util/Makefile.in
+++ b/util/Makefile.in
@@ -52,8 +52,7 @@ subdir = util
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -82,6 +81,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -436,6 +437,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
@@ -554,7 +560,7 @@ std_def_list = \
$(top_srcdir)/sntp/include/version.def \
$(NULL)
-jitter_SOURCES = jitter.c jitter.h
+jitter_SOURCES = jitter.c
jitter_LDADD =
NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
-I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
diff --git a/util/invoke-ntp-keygen.texi b/util/invoke-ntp-keygen.texi
index 808757dc94c2..0412485d4883 100644
--- a/util/invoke-ntp-keygen.texi
+++ b/util/invoke-ntp-keygen.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-keygen.texi)
#
-# It has been AutoGen-ed February 4, 2015 at 02:43:59 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:27:46 AM by AutoGen 5.18.5pre4
# From the definitions ntp-keygen-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -886,7 +886,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p2
Usage: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
diff --git a/util/jitter.c b/util/jitter.c
index 62a84ade3d59..c0050fca262a 100644
--- a/util/jitter.c
+++ b/util/jitter.c
@@ -14,10 +14,9 @@
#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
-#include "jitter.h"
+#include "ntp_fp.h"
#define NBUF 800002
-#define FRAC 4294967296. /* a bbbbillion */
#define JAN_1970 2208988800UL /* Unix base epoch */
#define CLOCK_GETTIME /* Solaris hires clock */
diff --git a/util/jitter.h b/util/jitter.h
deleted file mode 100644
index 14314063b59a..000000000000
--- a/util/jitter.h
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * ntp_types.h - defines how int32 and u_int32 are treated.
- * For 64 bit systems like the DEC Alpha, they have to be defined
- * as int and u_int.
- * For 32 bit systems, define them as long and u_long
- */
-#define SIZEOF_INT 4
-
-/*
- * VMS DECC (v4.1), {u_char,u_short,u_long} are only in SOCKET.H,
- * and u_int isn't defined anywhere
- */
-#if defined(VMS)
-#include <socket.h>
-typedef unsigned int u_int;
-/*
- * Note: VMS DECC has long == int (even on __alpha),
- * so the distinction below doesn't matter
- */
-#endif /* VMS */
-
-#if (SIZEOF_INT == 4)
-# ifndef int32
-# define int32 int
-# endif
-# ifndef u_int32
-# define u_int32 unsigned int
-# endif
-#else /* not sizeof(int) == 4 */
-# if (SIZEOF_LONG == 4)
-# else /* not sizeof(long) == 4 */
-# ifndef int32
-# define int32 long
-# endif
-# ifndef u_int32
-# define u_int32 unsigned long
-# endif
-# endif /* not sizeof(long) == 4 */
-# include "Bletch: what's 32 bits on this machine?"
-#endif /* not sizeof(int) == 4 */
-
-typedef unsigned short associd_t; /* association ID */
-typedef u_int32 keyid_t; /* cryptographic key ID */
-typedef u_int32 tstamp_t; /* NTP seconds timestamp */
-
-/*
- * NTP uses two fixed point formats. The first (l_fp) is the "long"
- * format and is 64 bits long with the decimal between bits 31 and 32.
- * This is used for time stamps in the NTP packet header (in network
- * byte order) and for internal computations of offsets (in local host
- * byte order). We use the same structure for both signed and unsigned
- * values, which is a big hack but saves rewriting all the operators
- * twice. Just to confuse this, we also sometimes just carry the
- * fractional part in calculations, in both signed and unsigned forms.
- * Anyway, an l_fp looks like:
- *
- * 0 1 2 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Integral Part |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Fractional Part |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *
- */
-typedef struct {
- union {
- u_int32 Xl_ui;
- int32 Xl_i;
- } Ul_i;
- union {
- u_int32 Xl_uf;
- int32 Xl_f;
- } Ul_f;
-} l_fp;
-
-#define l_ui Ul_i.Xl_ui /* unsigned integral part */
-#define l_i Ul_i.Xl_i /* signed integral part */
-#define l_uf Ul_f.Xl_uf /* unsigned fractional part */
-#define l_f Ul_f.Xl_f /* signed fractional part */
-
-/*
- * Fractional precision (of an l_fp) is actually the number of
- * bits in a long.
- */
-#define FRACTION_PREC (32)
-
-
-/*
- * The second fixed point format is 32 bits, with the decimal between
- * bits 15 and 16. There is a signed version (s_fp) and an unsigned
- * version (u_fp). This is used to represent synchronizing distance
- * and synchronizing dispersion in the NTP packet header (again, in
- * network byte order) and internally to hold both distance and
- * dispersion values (in local byte order). In network byte order
- * it looks like:
- *
- * 0 1 2 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Integer Part | Fraction Part |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *
- */
-typedef int32 s_fp;
-typedef u_int32 u_fp;
-
-/*
- * A unit second in fp format. Actually 2**(half_the_bits_in_a_long)
- */
-#define FP_SECOND (0x10000)
-
-/*
- * Byte order conversions
- */
-#define HTONS_FP(x) (htonl(x))
-#define HTONL_FP(h, n) do { (n)->l_ui = htonl((h)->l_ui); \
- (n)->l_uf = htonl((h)->l_uf); } while (0)
-#define NTOHS_FP(x) (ntohl(x))
-#define NTOHL_FP(n, h) do { (h)->l_ui = ntohl((n)->l_ui); \
- (h)->l_uf = ntohl((n)->l_uf); } while (0)
-#define NTOHL_MFP(ni, nf, hi, hf) \
- do { (hi) = ntohl(ni); (hf) = ntohl(nf); } while (0)
-#define HTONL_MFP(hi, hf, ni, nf) \
- do { (ni) = ntohl(hi); (nf) = ntohl(hf); } while (0)
-
-/* funny ones. Converts ts fractions to net order ts */
-#define HTONL_UF(uf, nts) \
- do { (nts)->l_ui = 0; (nts)->l_uf = htonl(uf); } while (0)
-#define HTONL_F(f, nts) do { (nts)->l_uf = htonl(f); \
- if ((f) & 0x80000000) \
- (nts)->l_i = -1; \
- else \
- (nts)->l_i = 0; \
- } while (0)
-
-/*
- * Conversions between the two fixed point types
- */
-#define MFPTOFP(x_i, x_f) (((int)(x_i) >= 0x00010000) ? 0x7fffffff : \
- (((int)(x_i) <= -0x00010000) ? 0x80000000 : \
- (u_int)(((x_i)<<16) | (((x_f)>>16)&0xffff))))
-#define LFPTOFP(v) MFPTOFP((v)->l_i, (v)->l_f)
-
-#define UFPTOLFP(x, v) ((v)->l_ui = (u_fp)(x)>>16, (v)->l_uf = (x)<<16)
-#define FPTOLFP(x, v) (UFPTOLFP((x), (v)), (x) < 0 ? (v)->l_ui -= 0x10000 : 0)
-
-#define MAXLFP(v) ((v)->l_ui = 0x7fffffff, (v)->l_uf = 0xffffffff)
-#define MINLFP(v) ((v)->l_ui = 0x80000000, (v)->l_uf = 0)
-
-/*
- * Primitive operations on long fixed point values. If these are
- * reminiscent of assembler op codes it's only because some may
- * be replaced by inline assembler for particular machines someday.
- * These are the (kind of inefficient) run-anywhere versions.
- */
-#define M_NEG(v_i, v_f) /* v = -v */ \
- do { \
- if ((v_f) == 0) \
- (v_i) = -((s_fp)(v_i)); \
- else { \
- (v_f) = -((s_fp)(v_f)); \
- (v_i) = ~(v_i); \
- } \
- } while(0)
-
-#define M_NEGM(r_i, r_f, a_i, a_f) /* r = -a */ \
- do { \
- if ((a_f) == 0) { \
- (r_f) = 0; \
- (r_i) = -(a_i); \
- } else { \
- (r_f) = -(a_f); \
- (r_i) = ~(a_i); \
- } \
- } while(0)
-
-#define M_ADD(r_i, r_f, a_i, a_f) /* r += a */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- lo_tmp = ((r_f) & 0xffff) + ((a_f) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) + (((a_f) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_i) += (a_i); \
- if (hi_tmp & 0x10000) \
- (r_i)++; \
- } while (0)
-
-#define M_ADD3(r_ovr, r_i, r_f, a_ovr, a_i, a_f) /* r += a, three word */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- lo_tmp = ((r_f) & 0xffff) + ((a_f) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) + (((a_f) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- lo_tmp = ((r_i) & 0xffff) + ((a_i) & 0xffff); \
- if (hi_tmp & 0x10000) \
- lo_tmp++; \
- hi_tmp = (((r_i) >> 16) & 0xffff) + (((a_i) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_i) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_ovr) += (a_ovr); \
- if (hi_tmp & 0x10000) \
- (r_ovr)++; \
- } while (0)
-
-#define M_SUB(r_i, r_f, a_i, a_f) /* r -= a */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- if ((a_f) == 0) { \
- (r_i) -= (a_i); \
- } else { \
- lo_tmp = ((r_f) & 0xffff) + ((-((s_fp)(a_f))) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) \
- + (((-((s_fp)(a_f))) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_i) += ~(a_i); \
- if (hi_tmp & 0x10000) \
- (r_i)++; \
- } \
- } while (0)
-
-#define M_RSHIFTU(v_i, v_f) /* v >>= 1, v is unsigned */ \
- do { \
- (v_f) = (u_int32)(v_f) >> 1; \
- if ((v_i) & 01) \
- (v_f) |= 0x80000000; \
- (v_i) = (u_int32)(v_i) >> 1; \
- } while (0)
-
-#define M_RSHIFT(v_i, v_f) /* v >>= 1, v is signed */ \
- do { \
- (v_f) = (u_int32)(v_f) >> 1; \
- if ((v_i) & 01) \
- (v_f) |= 0x80000000; \
- if ((v_i) & 0x80000000) \
- (v_i) = ((v_i) >> 1) | 0x80000000; \
- else \
- (v_i) = (v_i) >> 1; \
- } while (0)
-
-#define M_LSHIFT(v_i, v_f) /* v <<= 1 */ \
- do { \
- (v_i) <<= 1; \
- if ((v_f) & 0x80000000) \
- (v_i) |= 0x1; \
- (v_f) <<= 1; \
- } while (0)
-
-#define M_LSHIFT3(v_ovr, v_i, v_f) /* v <<= 1, with overflow */ \
- do { \
- (v_ovr) <<= 1; \
- if ((v_i) & 0x80000000) \
- (v_ovr) |= 0x1; \
- (v_i) <<= 1; \
- if ((v_f) & 0x80000000) \
- (v_i) |= 0x1; \
- (v_f) <<= 1; \
- } while (0)
-
-#define M_ADDUF(r_i, r_f, uf) /* r += uf, uf is u_int32 fraction */ \
- M_ADD((r_i), (r_f), 0, (uf)) /* let optimizer worry about it */
-
-#define M_SUBUF(r_i, r_f, uf) /* r -= uf, uf is u_int32 fraction */ \
- M_SUB((r_i), (r_f), 0, (uf)) /* let optimizer worry about it */
-
-#define M_ADDF(r_i, r_f, f) /* r += f, f is a int32 fraction */ \
- do { \
- if ((f) > 0) \
- M_ADD((r_i), (r_f), 0, (f)); \
- else if ((f) < 0) \
- M_ADD((r_i), (r_f), (-1), (f));\
- } while(0)
-
-#define M_ISNEG(v_i, v_f) /* v < 0 */ \
- (((v_i) & 0x80000000) != 0)
-
-#define M_ISHIS(a_i, a_f, b_i, b_f) /* a >= b unsigned */ \
- (((u_int32)(a_i)) > ((u_int32)(b_i)) || \
- ((a_i) == (b_i) && ((u_int32)(a_f)) >= ((u_int32)(b_f))))
-
-#define M_ISGEQ(a_i, a_f, b_i, b_f) /* a >= b signed */ \
- (((int32)(a_i)) > ((int32)(b_i)) || \
- ((a_i) == (b_i) && ((u_int32)(a_f)) >= ((u_int32)(b_f))))
-
-#define M_ISEQU(a_i, a_f, b_i, b_f) /* a == b unsigned */ \
- ((a_i) == (b_i) && (a_f) == (b_f))
-
-/*
- * Operations on the long fp format
- */
-#define L_ADD(r, a) M_ADD((r)->l_ui, (r)->l_uf, (a)->l_ui, (a)->l_uf)
-#define L_SUB(r, a) M_SUB((r)->l_ui, (r)->l_uf, (a)->l_ui, (a)->l_uf)
-#define L_NEG(v) M_NEG((v)->l_ui, (v)->l_uf)
-#define L_ADDUF(r, uf) M_ADDUF((r)->l_ui, (r)->l_uf, (uf))
-#define L_SUBUF(r, uf) M_SUBUF((r)->l_ui, (r)->l_uf, (uf))
-#define L_ADDF(r, f) M_ADDF((r)->l_ui, (r)->l_uf, (f))
-#define L_RSHIFT(v) M_RSHIFT((v)->l_i, (v)->l_uf)
-#define L_RSHIFTU(v) M_RSHIFT((v)->l_ui, (v)->l_uf)
-#define L_LSHIFT(v) M_LSHIFT((v)->l_ui, (v)->l_uf)
-#define L_CLR(v) ((v)->l_ui = (v)->l_uf = 0)
-
-#define L_ISNEG(v) (((v)->l_ui & 0x80000000) != 0)
-#define L_ISZERO(v) ((v)->l_ui == 0 && (v)->l_uf == 0)
-#define L_ISHIS(a, b) ((a)->l_ui > (b)->l_ui || \
- ((a)->l_ui == (b)->l_ui && (a)->l_uf >= (b)->l_uf))
-#define L_ISGEQ(a, b) ((a)->l_i > (b)->l_i || \
- ((a)->l_i == (b)->l_i && (a)->l_uf >= (b)->l_uf))
-#define L_ISEQU(a, b) M_ISEQU((a)->l_ui, (a)->l_uf, (b)->l_ui, (b)->l_uf)
-
-/*
- * s_fp/double and u_fp/double conversions
- */
-#define FRIC 65536. /* 2^16 as a double */
-#define DTOFP(r) ((s_fp)((r) * FRIC))
-#define DTOUFP(r) ((u_fp)((r) * FRIC))
-#define FPTOD(r) ((double)(r) / FRIC)
-
-/*
- * l_fp/double conversions
- */
-#define FRAC 4294967296. /* 2^32 as a double */
-#define M_DTOLFP(d, r_i, r_uf) /* double to l_fp */ \
- do { \
- register double d_tmp; \
- \
- d_tmp = (d); \
- if (d_tmp < 0) { \
- d_tmp = -d_tmp; \
- (r_i) = (int32)(d_tmp); \
- (r_uf) = (u_int32)(((d_tmp) - (double)(r_i)) * FRAC); \
- M_NEG((r_i), (r_uf)); \
- } else { \
- (r_i) = (int32)(d_tmp); \
- (r_uf) = (u_int32)(((d_tmp) - (double)(r_i)) * FRAC); \
- } \
- } while (0)
-#define M_LFPTOD(r_i, r_uf, d) /* l_fp to double */ \
- do { \
- register l_fp l_tmp; \
- \
- l_tmp.l_i = (r_i); \
- l_tmp.l_f = (r_uf); \
- if (l_tmp.l_i < 0) { \
- M_NEG(l_tmp.l_i, l_tmp.l_uf); \
- (d) = -((double)l_tmp.l_i + ((double)l_tmp.l_uf) / FRAC); \
- } else { \
- (d) = (double)l_tmp.l_i + ((double)l_tmp.l_uf) / FRAC; \
- } \
- } while (0)
-#define DTOLFP(d, v) M_DTOLFP((d), (v)->l_ui, (v)->l_uf)
-#define LFPTOD(v, d) M_LFPTOD((v)->l_ui, (v)->l_uf, (d))
-
-/*
- * Prototypes
- */
-#if 0
-extern char * dofptoa (u_fp, int, short, int);
-extern char * dolfptoa (u_long, u_long, int, short, int);
-#endif
-
-extern int atolfp (const char *, l_fp *);
-extern int buftvtots (const char *, l_fp *);
-extern char * fptoa (s_fp, short);
-extern char * fptoms (s_fp, short);
-extern int hextolfp (const char *, l_fp *);
-extern void gpstolfp (int, int, unsigned long, l_fp *);
-extern int mstolfp (const char *, l_fp *);
-extern char * prettydate (l_fp *);
-extern char * gmprettydate (l_fp *);
-extern char * uglydate (l_fp *);
-extern void mfp_mul (int32 *, u_int32 *, int32, u_int32, int32, u_int32);
-
-extern void get_systime (l_fp *);
-extern int step_systime (double);
-extern int adj_systime (double);
-
-#define lfptoa(_fpv, _ndec) mfptoa((_fpv)->l_ui, (_fpv)->l_uf, (_ndec))
-#define lfptoms(_fpv, _ndec) mfptoms((_fpv)->l_ui, (_fpv)->l_uf, (_ndec))
-
-#define ufptoa(_fpv, _ndec) dofptoa((_fpv), 0, (_ndec), 0)
-#define ufptoms(_fpv, _ndec) dofptoa((_fpv), 0, (_ndec), 1)
-#define ulfptoa(_fpv, _ndec) dolfptoa((_fpv)->l_ui, (_fpv)->l_uf, 0, (_ndec), 0)
-#define ulfptoms(_fpv, _ndec) dolfptoa((_fpv)->l_ui, (_fpv)->l_uf, 0, (_ndec), 1)
-#define umfptoa(_fpi, _fpf, _ndec) dolfptoa((_fpi), (_fpf), 0, (_ndec), 0)
diff --git a/util/ntp-keygen-opts.c b/util/ntp-keygen-opts.c
index aff2d01de3ab..8521861ebbbb 100644
--- a/util/ntp-keygen-opts.c
+++ b/util/ntp-keygen-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed February 4, 2015 at 02:43:42 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:27:30 AM by AutoGen 5.18.5pre4
* From the definitions ntp-keygen-opts.def
* and the template file options
*
@@ -72,7 +72,7 @@ extern FILE * option_usage_fp;
* static const strings for ntp-keygen options
*/
static char const ntp_keygen_opt_strs[2419] =
-/* 0 */ "ntp-keygen (ntp) 4.2.8p1\n"
+/* 0 */ "ntp-keygen (ntp) 4.2.8p2\n"
"Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
@@ -164,14 +164,14 @@ static char const ntp_keygen_opt_strs[2419] =
/* 2202 */ "no-load-opts\0"
/* 2215 */ "no\0"
/* 2218 */ "NTP_KEYGEN\0"
-/* 2229 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1\n"
+/* 2229 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
/* 2343 */ "$HOME\0"
/* 2349 */ ".\0"
/* 2351 */ ".ntprc\0"
/* 2358 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 2392 */ "\n\0"
-/* 2394 */ "ntp-keygen (ntp) 4.2.8p1";
+/* 2394 */ "ntp-keygen (ntp) 4.2.8p2";
/**
* imbits option description:
@@ -1309,7 +1309,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntp_keygenOptions.pzCopyright */
- puts(_("ntp-keygen (ntp) 4.2.8p1\n\
+ puts(_("ntp-keygen (ntp) 4.2.8p2\n\
Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
@@ -1408,14 +1408,14 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntp_keygenOptions.pzUsageTitle */
- puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1\n\
+ puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntp_keygenOptions.pzExplain */
puts(_("\n"));
/* referenced via ntp_keygenOptions.pzFullVersion */
- puts(_("ntp-keygen (ntp) 4.2.8p1"));
+ puts(_("ntp-keygen (ntp) 4.2.8p2"));
/* referenced via ntp_keygenOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/util/ntp-keygen-opts.h b/util/ntp-keygen-opts.h
index 48489999dda5..54f1ac400794 100644
--- a/util/ntp-keygen-opts.h
+++ b/util/ntp-keygen-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed February 4, 2015 at 02:43:41 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:27:29 AM by AutoGen 5.18.5pre4
* From the definitions ntp-keygen-opts.def
* and the template file options
*
@@ -94,9 +94,9 @@ typedef enum {
/** count of all options for ntp-keygen */
#define OPTION_CT 26
/** ntp-keygen version */
-#define NTP_KEYGEN_VERSION "4.2.8p1"
+#define NTP_KEYGEN_VERSION "4.2.8p2"
/** Full ntp-keygen version text */
-#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p1"
+#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/util/ntp-keygen.1ntp-keygenman b/util/ntp-keygen.1ntp-keygenman
index 46bbad8294f6..b600ed4b830f 100644
--- a/util/ntp-keygen.1ntp-keygenman
+++ b/util/ntp-keygen.1ntp-keygenman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen 1ntp-keygenman "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH ntp-keygen 1ntp-keygenman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Xkaqsu/ag-9kairu)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Kfaqzc/ag-Wfaiyc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:55 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/util/ntp-keygen.1ntp-keygenmdoc b/util/ntp-keygen.1ntp-keygenmdoc
index d70ca2c4e5e5..ad8a96d786ea 100644
--- a/util/ntp-keygen.1ntp-keygenmdoc
+++ b/util/ntp-keygen.1ntp-keygenmdoc
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:44:02 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:49 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/util/ntp-keygen.c b/util/ntp-keygen.c
index c16902161297..494bedb19d24 100644
--- a/util/ntp-keygen.c
+++ b/util/ntp-keygen.c
@@ -827,24 +827,24 @@ gen_md5(
str = fheader("MD5key", id, groupname);
for (i = 1; i <= MD5KEYS; i++) {
for (j = 0; j < MD5SIZE; j++) {
- int temp;
+ u_char temp;
while (1) {
int rc;
- rc = ntp_crypto_random_buf(&temp, 1);
+ rc = ntp_crypto_random_buf(
+ &temp, sizeof(temp));
if (-1 == rc) {
fprintf(stderr, "ntp_crypto_random_buf() failed.\n");
exit (-1);
}
- temp &= 0xff;
if (temp == '#')
continue;
if (temp > 0x20 && temp < 0x7f)
break;
}
- md5key[j] = (u_char)temp;
+ md5key[j] = temp;
}
md5key[j] = '\0';
fprintf(str, "%2d MD5 %s # MD5 key\n", i,
@@ -2170,15 +2170,29 @@ fheader (
FILE *str; /* file handle */
char linkname[MAXFILENAME]; /* link name */
int temp;
-
+#ifdef HAVE_UMASK
+ mode_t orig_umask;
+#endif
+
snprintf(filename, sizeof(filename), "ntpkey_%s_%s.%u", file,
owner, fstamp);
- if ((str = fopen(filename, "w")) == NULL) {
+#ifdef HAVE_UMASK
+ orig_umask = umask( S_IWGRP | S_IRWXO );
+ str = fopen(filename, "w");
+ (void) umask(orig_umask);
+#else
+ str = fopen(filename, "w");
+#endif
+ if (str == NULL) {
perror("Write");
exit (-1);
}
- snprintf(linkname, sizeof(linkname), "ntpkey_%s_%s", ulink,
- hostname);
+ if (strcmp(ulink, "md5") == 0) {
+ strcpy(linkname,"ntp.keys");
+ } else {
+ snprintf(linkname, sizeof(linkname), "ntpkey_%s_%s", ulink,
+ hostname);
+ }
(void)remove(linkname); /* The symlink() line below matters */
temp = symlink(filename, linkname);
if (temp < 0)
diff --git a/util/ntp-keygen.html b/util/ntp-keygen.html
index 3b950ec843eb..1aad39b3d396 100644
--- a/util/ntp-keygen.html
+++ b/util/ntp-keygen.html
@@ -70,7 +70,7 @@ All other files are in PEM-encoded
printable ASCII format so they can be embedded as MIME attachments in
mail to other sites.
- <p>This document applies to version 4.2.8p1 of <code>ntp-keygen</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp-keygen</code>.
<div class="node">
<p><hr>
@@ -1085,7 +1085,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1-RC2
+<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p2-RC3
Usage: ntp-keygen [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
diff --git a/util/ntp-keygen.man.in b/util/ntp-keygen.man.in
index 6242382b020c..b47691b9eabc 100644
--- a/util/ntp-keygen.man.in
+++ b/util/ntp-keygen.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen @NTP_KEYGEN_MS@ "04 Feb 2015" "ntp (4.2.8p1)" "User Commands"
+.TH ntp-keygen @NTP_KEYGEN_MS@ "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Xkaqsu/ag-9kairu)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Kfaqzc/ag-Wfaiyc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:55 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/util/ntp-keygen.mdoc.in b/util/ntp-keygen.mdoc.in
index da99a8deb64f..540ff4f36b7f 100644
--- a/util/ntp-keygen.mdoc.in
+++ b/util/ntp-keygen.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 4 2015
+.Dd April 7 2015
.Dt NTP_KEYGEN @NTP_KEYGEN_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:44:02 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:49 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME