summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPDATING3
-rw-r--r--contrib/ntp/ChangeLog155
-rw-r--r--contrib/ntp/CommitLog4981
-rw-r--r--contrib/ntp/FREEBSD-Xlist2
-rw-r--r--contrib/ntp/FREEBSD-upgrade55
-rw-r--r--contrib/ntp/Makefile.am2
-rw-r--r--contrib/ntp/Makefile.in6
-rw-r--r--contrib/ntp/NEWS495
-rw-r--r--contrib/ntp/aclocal.m41
-rw-r--r--contrib/ntp/adjtimed/Makefile.in4
-rw-r--r--contrib/ntp/adjtimed/adjtimed.c2
-rw-r--r--contrib/ntp/clockstuff/Makefile.in4
-rw-r--r--contrib/ntp/clockstuff/chutest.c2
-rw-r--r--contrib/ntp/clockstuff/propdelay.c2
-rwxr-xr-xcontrib/ntp/configure243
-rw-r--r--contrib/ntp/configure.ac58
-rw-r--r--contrib/ntp/html/decode.html4
-rw-r--r--contrib/ntp/html/miscopt.html4
-rw-r--r--contrib/ntp/html/stats.html48
-rw-r--r--contrib/ntp/include/Makefile.am1
-rw-r--r--contrib/ntp/include/Makefile.in5
-rw-r--r--contrib/ntp/include/isc/Makefile.in4
-rw-r--r--contrib/ntp/include/ntp_assert.h4
-rw-r--r--contrib/ntp/include/ntp_calendar.h13
-rw-r--r--contrib/ntp/include/ntp_config.h4
-rw-r--r--contrib/ntp/include/ntp_control.h2
-rw-r--r--contrib/ntp/include/ntp_lists.h6
-rw-r--r--contrib/ntp/include/ntp_stdlib.h1
-rw-r--r--contrib/ntp/include/ntp_syslog.h1
-rw-r--r--contrib/ntp/include/ntp_types.h3
-rw-r--r--contrib/ntp/include/rc_cmdlength.h2
-rw-r--r--contrib/ntp/kernel/Makefile.in4
-rw-r--r--contrib/ntp/kernel/sys/Makefile.in4
-rw-r--r--contrib/ntp/libntp/Makefile.in4
-rw-r--r--contrib/ntp/libntp/atolfp.c2
-rw-r--r--contrib/ntp/libntp/audio.c13
-rw-r--r--contrib/ntp/libntp/authkeys.c12
-rw-r--r--contrib/ntp/libntp/authreadkeys.c89
-rw-r--r--contrib/ntp/libntp/caljulian.c2
-rw-r--r--contrib/ntp/libntp/caltontp.c14
-rw-r--r--contrib/ntp/libntp/decodenetnum.c9
-rw-r--r--contrib/ntp/libntp/emalloc.c2
-rw-r--r--contrib/ntp/libntp/icom.c28
-rw-r--r--contrib/ntp/libntp/machines.c6
-rw-r--r--contrib/ntp/libntp/msyslog.c24
-rw-r--r--contrib/ntp/libntp/ntp_calendar.c786
-rw-r--r--contrib/ntp/libntp/ntp_intres.c24
-rw-r--r--contrib/ntp/libntp/ntp_lineedit.c2
-rw-r--r--contrib/ntp/libntp/ntp_rfc2553.c2
-rw-r--r--contrib/ntp/libntp/ntp_worker.c2
-rw-r--r--contrib/ntp/libntp/prettydate.c2
-rw-r--r--contrib/ntp/libntp/recvbuff.c2
-rw-r--r--contrib/ntp/libntp/socket.c4
-rw-r--r--contrib/ntp/libntp/socktohost.c2
-rw-r--r--contrib/ntp/libntp/statestr.c2
-rw-r--r--contrib/ntp/libparse/Makefile.in4
-rw-r--r--contrib/ntp/ntpd/Makefile.am3
-rw-r--r--contrib/ntp/ntpd/Makefile.in7
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.conf.texi15
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.keys.texi2
-rw-r--r--contrib/ntp/ntpd/invoke-ntpd.texi4
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5man19
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5mdoc17
-rw-r--r--contrib/ntp/ntpd/ntp.conf.def13
-rw-r--r--contrib/ntp/ntpd/ntp.conf.html15
-rw-r--r--contrib/ntp/ntpd/ntp.conf.man.in19
-rw-r--r--contrib/ntp/ntpd/ntp.conf.mdoc.in17
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5man4
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5mdoc4
-rw-r--r--contrib/ntp/ntpd/ntp.keys.html2
-rw-r--r--contrib/ntp/ntpd/ntp.keys.man.in4
-rw-r--r--contrib/ntp/ntpd/ntp.keys.mdoc.in4
-rw-r--r--contrib/ntp/ntpd/ntp_config.c59
-rw-r--r--contrib/ntp/ntpd/ntp_control.c88
-rw-r--r--contrib/ntp/ntpd/ntp_crypto.c134
-rw-r--r--contrib/ntp/ntpd/ntp_io.c105
-rw-r--r--contrib/ntp/ntpd/ntp_loopfilter.c8
-rw-r--r--contrib/ntp/ntpd/ntp_monitor.c6
-rw-r--r--contrib/ntp/ntpd/ntp_parser.c2399
-rw-r--r--contrib/ntp/ntpd/ntp_parser.h442
-rw-r--r--contrib/ntp/ntpd/ntp_peer.c13
-rw-r--r--contrib/ntp/ntpd/ntp_proto.c297
-rw-r--r--contrib/ntp/ntpd/ntp_refclock.c2
-rw-r--r--contrib/ntp/ntpd/ntp_request.c10
-rw-r--r--contrib/ntp/ntpd/ntp_restrict.c28
-rw-r--r--contrib/ntp/ntpd/ntp_timer.c6
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.c14
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.def6
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.h6
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdman12
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdmdoc10
-rw-r--r--contrib/ntp/ntpd/ntpd.c104
-rw-r--r--contrib/ntp/ntpd/ntpd.html4
-rw-r--r--contrib/ntp/ntpd/ntpd.man.in12
-rw-r--r--contrib/ntp/ntpd/ntpd.mdoc.in10
-rw-r--r--contrib/ntp/ntpd/rc_cmdlength.c1
-rw-r--r--contrib/ntp/ntpd/refclock_arc.c2
-rw-r--r--contrib/ntp/ntpd/refclock_chu.c2
-rw-r--r--contrib/ntp/ntpd/refclock_gpsdjson.c18
-rw-r--r--contrib/ntp/ntpd/refclock_local.c18
-rw-r--r--contrib/ntp/ntpd/refclock_nmea.c7
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.c4
-rw-r--r--contrib/ntp/ntpd/refclock_parse.c3
-rw-r--r--contrib/ntp/ntpd/refclock_wwv.c6
-rw-r--r--contrib/ntp/ntpdate/Makefile.in4
-rw-r--r--contrib/ntp/ntpdate/ntpdate.c2
-rw-r--r--contrib/ntp/ntpdc/Makefile.in4
-rw-r--r--contrib/ntp/ntpdc/invoke-ntpdc.texi4
-rw-r--r--contrib/ntp/ntpdc/ntpdc-opts.c14
-rw-r--r--contrib/ntp/ntpdc/ntpdc-opts.h6
-rw-r--r--contrib/ntp/ntpdc/ntpdc.1ntpdcman6
-rw-r--r--contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc4
-rw-r--r--contrib/ntp/ntpdc/ntpdc.c4
-rw-r--r--contrib/ntp/ntpdc/ntpdc.html4
-rw-r--r--contrib/ntp/ntpdc/ntpdc.man.in6
-rw-r--r--contrib/ntp/ntpdc/ntpdc.mdoc.in4
-rw-r--r--contrib/ntp/ntpq/Makefile.in4
-rw-r--r--contrib/ntp/ntpq/invoke-ntpq.texi4
-rw-r--r--contrib/ntp/ntpq/libntpq.h2
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.c14
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.h6
-rw-r--r--contrib/ntp/ntpq/ntpq-subs.c16
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqman6
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqmdoc4
-rw-r--r--contrib/ntp/ntpq/ntpq.c24
-rw-r--r--contrib/ntp/ntpq/ntpq.html4
-rw-r--r--contrib/ntp/ntpq/ntpq.man.in6
-rw-r--r--contrib/ntp/ntpq/ntpq.mdoc.in4
-rw-r--r--contrib/ntp/ntpsnmpd/Makefile.in4
-rw-r--r--contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi4
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c14
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h6
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman6
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc4
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.html2
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.man.in6
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in4
-rw-r--r--contrib/ntp/packageinfo.sh2
-rw-r--r--contrib/ntp/parseutil/Makefile.in4
-rw-r--r--contrib/ntp/scripts/Makefile.in4
-rw-r--r--contrib/ntp/scripts/build/Makefile.in4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/Makefile.in4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman6
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.html2
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in6
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi2
-rw-r--r--contrib/ntp/scripts/invoke-plot_summary.texi4
-rw-r--r--contrib/ntp/scripts/invoke-summary.texi4
-rw-r--r--contrib/ntp/scripts/lib/Makefile.in4
-rw-r--r--contrib/ntp/scripts/lib/NTP/Util.pm9
-rw-r--r--contrib/ntp/scripts/ntp-wait/Makefile.in4
-rw-r--r--contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait-opts4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman6
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.html4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.man.in6
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in4
-rw-r--r--contrib/ntp/scripts/ntpsweep/Makefile.in4
-rw-r--r--contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep-opts4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman6
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.html4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.in3
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.man.in6
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in4
-rw-r--r--contrib/ntp/scripts/ntptrace/Makefile.in4
-rw-r--r--contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace-opts4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman6
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.html4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.man.in6
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in4
-rw-r--r--contrib/ntp/scripts/plot_summary-opts4
-rw-r--r--contrib/ntp/scripts/plot_summary.1plot_summaryman6
-rw-r--r--contrib/ntp/scripts/plot_summary.1plot_summarymdoc4
-rw-r--r--contrib/ntp/scripts/plot_summary.html4
-rw-r--r--contrib/ntp/scripts/plot_summary.man.in6
-rw-r--r--contrib/ntp/scripts/plot_summary.mdoc.in4
-rw-r--r--contrib/ntp/scripts/summary-opts4
-rw-r--r--contrib/ntp/scripts/summary.1summaryman6
-rw-r--r--contrib/ntp/scripts/summary.1summarymdoc4
-rw-r--r--contrib/ntp/scripts/summary.html4
-rw-r--r--contrib/ntp/scripts/summary.man.in6
-rw-r--r--contrib/ntp/scripts/summary.mdoc.in4
-rw-r--r--contrib/ntp/scripts/update-leap/Makefile.in4
-rw-r--r--contrib/ntp/scripts/update-leap/invoke-update-leap.texi2
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap-opts4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.1update-leapman6
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.html2
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.man.in6
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.mdoc.in4
-rw-r--r--contrib/ntp/sntp/Makefile.am41
-rw-r--r--contrib/ntp/sntp/Makefile.in36
-rwxr-xr-xcontrib/ntp/sntp/configure131
-rw-r--r--contrib/ntp/sntp/configure.ac1
-rw-r--r--contrib/ntp/sntp/include/Makefile.in3
-rw-r--r--contrib/ntp/sntp/include/version.def2
-rw-r--r--contrib/ntp/sntp/include/version.texi6
-rw-r--r--contrib/ntp/sntp/invoke-sntp.texi4
-rw-r--r--contrib/ntp/sntp/libevent/Makefile.am2
-rw-r--r--contrib/ntp/sntp/libevent/Makefile.in277
-rw-r--r--contrib/ntp/sntp/libevent/sample/dns-example.c248
-rw-r--r--contrib/ntp/sntp/libevent/sample/event-read-fifo.c162
-rw-r--r--contrib/ntp/sntp/libevent/sample/hello-world.c141
-rw-r--r--contrib/ntp/sntp/libevent/sample/hostcheck.c217
-rw-r--r--contrib/ntp/sntp/libevent/sample/hostcheck.h30
-rw-r--r--contrib/ntp/sntp/libevent/sample/http-server.c418
-rw-r--r--contrib/ntp/sntp/libevent/sample/https-client.c439
-rw-r--r--contrib/ntp/sntp/libevent/sample/include.am53
-rw-r--r--contrib/ntp/sntp/libevent/sample/le-proxy.c288
-rw-r--r--contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.c172
-rw-r--r--contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.h56
-rw-r--r--contrib/ntp/sntp/libevent/sample/signal-test.c75
-rw-r--r--contrib/ntp/sntp/libevent/sample/time-test.c107
-rw-r--r--contrib/ntp/sntp/libevent/test/bench_httpclient.c4
-rw-r--r--contrib/ntp/sntp/libevent/test/regress.c4
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_dns.c5
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_http.c4
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_minheap.c1
-rw-r--r--contrib/ntp/sntp/libevent/test/test-ratelim.c4
-rw-r--r--contrib/ntp/sntp/libevent/test/test-time.c1
-rw-r--r--contrib/ntp/sntp/libopts/Makefile.in3
-rw-r--r--contrib/ntp/sntp/libopts/compat/pathfind.c13
-rw-r--r--contrib/ntp/sntp/log.c21
-rw-r--r--contrib/ntp/sntp/log.h2
-rw-r--r--contrib/ntp/sntp/m4/ntp_libevent.m421
-rw-r--r--contrib/ntp/sntp/m4/ntp_libntp.m415
-rw-r--r--contrib/ntp/sntp/m4/ntp_problemtests.m456
-rw-r--r--contrib/ntp/sntp/m4/ntp_rlimit.m461
-rw-r--r--contrib/ntp/sntp/m4/openldap-thread-check.m49
-rw-r--r--contrib/ntp/sntp/m4/os_cflags.m434
-rw-r--r--contrib/ntp/sntp/m4/version.m42
-rw-r--r--contrib/ntp/sntp/networking.c2
-rw-r--r--contrib/ntp/sntp/scripts/Makefile.in3
-rw-r--r--contrib/ntp/sntp/sntp-opts.c14
-rw-r--r--contrib/ntp/sntp/sntp-opts.h6
-rw-r--r--contrib/ntp/sntp/sntp.1sntpman6
-rw-r--r--contrib/ntp/sntp/sntp.1sntpmdoc4
-rw-r--r--contrib/ntp/sntp/sntp.html4
-rw-r--r--contrib/ntp/sntp/sntp.man.in6
-rw-r--r--contrib/ntp/sntp/sntp.mdoc.in4
-rw-r--r--contrib/ntp/sntp/tests/Makefile.am169
-rw-r--r--contrib/ntp/sntp/tests/Makefile.in698
-rw-r--r--contrib/ntp/sntp/tests/crypto.c31
-rw-r--r--contrib/ntp/sntp/tests/fileHandlingTest.c74
-rw-r--r--contrib/ntp/sntp/tests/fileHandlingTest.h100
-rw-r--r--contrib/ntp/sntp/tests/fileHandlingTest.h.in87
-rw-r--r--contrib/ntp/sntp/tests/g_fileHandlingTest.h64
-rw-r--r--contrib/ntp/sntp/tests/g_networking.cpp5
-rw-r--r--contrib/ntp/sntp/tests/g_packetHandling.cpp264
-rw-r--r--contrib/ntp/sntp/tests/g_packetProcessing.cpp334
-rw-r--r--contrib/ntp/sntp/tests/g_sntptest.h35
-rw-r--r--contrib/ntp/sntp/tests/keyFile.c63
-rw-r--r--contrib/ntp/sntp/tests/kodDatabase.c73
-rw-r--r--contrib/ntp/sntp/tests/kodFile.c74
-rw-r--r--contrib/ntp/sntp/tests/packetHandling.c92
-rw-r--r--contrib/ntp/sntp/tests/packetProcessing.c118
-rw-r--r--contrib/ntp/sntp/tests/run-crypto.c23
-rw-r--r--contrib/ntp/sntp/tests/run-keyFile.c31
-rw-r--r--contrib/ntp/sntp/tests/run-kodDatabase.c33
-rw-r--r--contrib/ntp/sntp/tests/run-kodFile.c35
-rw-r--r--contrib/ntp/sntp/tests/run-networking.c9
-rw-r--r--contrib/ntp/sntp/tests/run-packetHandling.c36
-rw-r--r--contrib/ntp/sntp/tests/run-packetProcessing.c47
-rw-r--r--contrib/ntp/sntp/tests/run-t-log.c57
-rw-r--r--contrib/ntp/sntp/tests/run-utilities.c41
-rw-r--r--contrib/ntp/sntp/tests/sntptest.c33
-rw-r--r--contrib/ntp/sntp/tests/sntptest.h26
-rw-r--r--contrib/ntp/sntp/tests/t-log.c68
-rw-r--r--contrib/ntp/sntp/tests/utilities.c70
-rw-r--r--contrib/ntp/sntp/tests_main.cpp29
-rw-r--r--contrib/ntp/sntp/tests_main.h22
-rw-r--r--contrib/ntp/sntp/unity/Makefile.am4
-rw-r--r--contrib/ntp/sntp/unity/Makefile.in7
-rw-r--r--contrib/ntp/sntp/unity/auto/generate_test_runner.rb311
-rwxr-xr-xcontrib/ntp/sntp/unity/auto/parseOutput.rb191
-rwxr-xr-xcontrib/ntp/sntp/unity/auto/type_sanitizer.rb8
-rwxr-xr-xcontrib/ntp/sntp/unity/auto/unity_test_summary.py135
-rw-r--r--contrib/ntp/sntp/unity/auto/unity_test_summary.rb73
-rw-r--r--contrib/ntp/sntp/unity/unity.c4
-rw-r--r--contrib/ntp/sntp/unity/unity_config.h12
-rw-r--r--contrib/ntp/sntp/unity/unity_internals.h12
-rw-r--r--contrib/ntp/sntp/version.c2
-rw-r--r--contrib/ntp/tests/Makefile.am14
-rw-r--r--contrib/ntp/tests/Makefile.in12
-rw-r--r--contrib/ntp/tests/bug-2803/Makefile.am2
-rw-r--r--contrib/ntp/tests/bug-2803/Makefile.in7
-rw-r--r--contrib/ntp/tests/bug-2803/run-bug-2803.c12
-rw-r--r--contrib/ntp/tests/libntp/Makefile.am631
-rw-r--r--contrib/ntp/tests/libntp/Makefile.in2426
-rw-r--r--contrib/ntp/tests/libntp/a_md5encrypt.c54
-rw-r--r--contrib/ntp/tests/libntp/atoint.c9
-rw-r--r--contrib/ntp/tests/libntp/atouint.c18
-rw-r--r--contrib/ntp/tests/libntp/authkeys.c59
-rw-r--r--contrib/ntp/tests/libntp/buftvtots.c35
-rw-r--r--contrib/ntp/tests/libntp/calendar.c521
-rw-r--r--contrib/ntp/tests/libntp/caljulian.c86
-rw-r--r--contrib/ntp/tests/libntp/caltontp.c7
-rw-r--r--contrib/ntp/tests/libntp/calyearstart.c17
-rw-r--r--contrib/ntp/tests/libntp/clocktime.c85
-rw-r--r--contrib/ntp/tests/libntp/decodenetnum.c54
-rw-r--r--contrib/ntp/tests/libntp/g_a_md5encrypt.cpp89
-rw-r--r--contrib/ntp/tests/libntp/g_atoint.cpp48
-rw-r--r--contrib/ntp/tests/libntp/g_atouint.cpp40
-rw-r--r--contrib/ntp/tests/libntp/g_authkeys.cpp100
-rw-r--r--contrib/ntp/tests/libntp/g_buftvtots.cpp61
-rw-r--r--contrib/ntp/tests/libntp/g_calendar.cpp337
-rw-r--r--contrib/ntp/tests/libntp/g_caljulian.cpp94
-rw-r--r--contrib/ntp/tests/libntp/g_caltontp.cpp49
-rw-r--r--contrib/ntp/tests/libntp/g_calyearstart.cpp43
-rw-r--r--contrib/ntp/tests/libntp/g_clocktime.cpp187
-rw-r--r--contrib/ntp/tests/libntp/g_decodenetnum.cpp93
-rw-r--r--contrib/ntp/tests/libntp/g_hextoint.cpp42
-rw-r--r--contrib/ntp/tests/libntp/g_hextolfp.cpp58
-rw-r--r--contrib/ntp/tests/libntp/g_humandate.cpp41
-rw-r--r--contrib/ntp/tests/libntp/g_lfpfunc.cpp547
-rw-r--r--contrib/ntp/tests/libntp/g_lfptest.h32
-rw-r--r--contrib/ntp/tests/libntp/g_lfptostr.cpp103
-rw-r--r--contrib/ntp/tests/libntp/g_libntptest.cpp27
-rw-r--r--contrib/ntp/tests/libntp/g_libntptest.h15
-rw-r--r--contrib/ntp/tests/libntp/g_modetoa.cpp16
-rw-r--r--contrib/ntp/tests/libntp/g_msyslog.cpp137
-rw-r--r--contrib/ntp/tests/libntp/g_netof.cpp69
-rw-r--r--contrib/ntp/tests/libntp/g_numtoa.cpp18
-rw-r--r--contrib/ntp/tests/libntp/g_numtohost.cpp15
-rw-r--r--contrib/ntp/tests/libntp/g_octtoint.cpp57
-rw-r--r--contrib/ntp/tests/libntp/g_prettydate.cpp16
-rw-r--r--contrib/ntp/tests/libntp/g_recvbuff.cpp38
-rw-r--r--contrib/ntp/tests/libntp/g_refnumtoa.cpp52
-rw-r--r--contrib/ntp/tests/libntp/g_sfptostr.cpp71
-rw-r--r--contrib/ntp/tests/libntp/g_sockaddrtest.h59
-rw-r--r--contrib/ntp/tests/libntp/g_socktoa.cpp100
-rw-r--r--contrib/ntp/tests/libntp/g_ssl_init.cpp50
-rw-r--r--contrib/ntp/tests/libntp/g_statestr.cpp28
-rw-r--r--contrib/ntp/tests/libntp/g_strtolfp.cpp107
-rw-r--r--contrib/ntp/tests/libntp/g_timespecops.cpp475
-rw-r--r--contrib/ntp/tests/libntp/g_timestructs.cpp156
-rw-r--r--contrib/ntp/tests/libntp/g_timestructs.h185
-rw-r--r--contrib/ntp/tests/libntp/g_timevalops.cpp480
-rw-r--r--contrib/ntp/tests/libntp/g_tstotv.cpp57
-rw-r--r--contrib/ntp/tests/libntp/g_tvtots.cpp54
-rw-r--r--contrib/ntp/tests/libntp/g_uglydate.cpp18
-rw-r--r--contrib/ntp/tests/libntp/g_vi64ops.cpp64
-rw-r--r--contrib/ntp/tests/libntp/g_ymd2yd.cpp23
-rw-r--r--contrib/ntp/tests/libntp/hextoint.c6
-rw-r--r--contrib/ntp/tests/libntp/hextolfp.c44
-rw-r--r--contrib/ntp/tests/libntp/humandate.c22
-rw-r--r--contrib/ntp/tests/libntp/lfpfunc.c397
-rw-r--r--contrib/ntp/tests/libntp/lfptest.c11
-rw-r--r--contrib/ntp/tests/libntp/lfptest.h20
-rw-r--r--contrib/ntp/tests/libntp/lfptostr.c76
-rw-r--r--contrib/ntp/tests/libntp/modetoa.c13
-rw-r--r--contrib/ntp/tests/libntp/msyslog.c22
-rw-r--r--contrib/ntp/tests/libntp/netof.c8
-rw-r--r--contrib/ntp/tests/libntp/numtoa.c30
-rw-r--r--contrib/ntp/tests/libntp/numtohost.c9
-rw-r--r--contrib/ntp/tests/libntp/octtoint.c10
-rw-r--r--contrib/ntp/tests/libntp/prettydate.c5
-rw-r--r--contrib/ntp/tests/libntp/recvbuff.c4
-rw-r--r--contrib/ntp/tests/libntp/refidsmear.c9
-rw-r--r--contrib/ntp/tests/libntp/refnumtoa.c22
-rw-r--r--contrib/ntp/tests/libntp/run-a_md5encrypt.c29
-rw-r--r--contrib/ntp/tests/libntp/run-atoint.c19
-rw-r--r--contrib/ntp/tests/libntp/run-atouint.c28
-rw-r--r--contrib/ntp/tests/libntp/run-authkeys.c34
-rw-r--r--contrib/ntp/tests/libntp/run-buftvtots.c28
-rw-r--r--contrib/ntp/tests/libntp/run-calendar.c62
-rw-r--r--contrib/ntp/tests/libntp/run-caljulian.c28
-rw-r--r--contrib/ntp/tests/libntp/run-caltontp.c16
-rw-r--r--contrib/ntp/tests/libntp/run-calyearstart.c22
-rw-r--r--contrib/ntp/tests/libntp/run-clocktime.c42
-rw-r--r--contrib/ntp/tests/libntp/run-decodenetnum.c22
-rw-r--r--contrib/ntp/tests/libntp/run-hextoint.c20
-rw-r--r--contrib/ntp/tests/libntp/run-hextolfp.c23
-rw-r--r--contrib/ntp/tests/libntp/run-humandate.c11
-rw-r--r--contrib/ntp/tests/libntp/run-lfpfunc.c48
-rw-r--r--contrib/ntp/tests/libntp/run-lfptostr.c29
-rw-r--r--contrib/ntp/tests/libntp/run-modetoa.c12
-rw-r--r--contrib/ntp/tests/libntp/run-msyslog.c25
-rw-r--r--contrib/ntp/tests/libntp/run-netof.c19
-rw-r--r--contrib/ntp/tests/libntp/run-numtoa.c13
-rw-r--r--contrib/ntp/tests/libntp/run-numtohost.c11
-rw-r--r--contrib/ntp/tests/libntp/run-octtoint.c22
-rw-r--r--contrib/ntp/tests/libntp/run-prettydate.c12
-rw-r--r--contrib/ntp/tests/libntp/run-recvbuff.c14
-rw-r--r--contrib/ntp/tests/libntp/run-refidsmear.c14
-rw-r--r--contrib/ntp/tests/libntp/run-refnumtoa.c17
-rw-r--r--contrib/ntp/tests/libntp/run-sfptostr.c23
-rw-r--r--contrib/ntp/tests/libntp/run-socktoa.c24
-rw-r--r--contrib/ntp/tests/libntp/run-ssl_init.c28
-rw-r--r--contrib/ntp/tests/libntp/run-statestr.c18
-rw-r--r--contrib/ntp/tests/libntp/run-strtolfp.c22
-rw-r--r--contrib/ntp/tests/libntp/run-timespecops.c124
-rw-r--r--contrib/ntp/tests/libntp/run-timevalops.c123
-rw-r--r--contrib/ntp/tests/libntp/run-tstotv.c15
-rw-r--r--contrib/ntp/tests/libntp/run-tvtots.c14
-rw-r--r--contrib/ntp/tests/libntp/run-uglydate.c11
-rw-r--r--contrib/ntp/tests/libntp/run-vi64ops.c22
-rw-r--r--contrib/ntp/tests/libntp/run-ymd2yd.c16
-rw-r--r--contrib/ntp/tests/libntp/sfptostr.c10
-rw-r--r--contrib/ntp/tests/libntp/sockaddrtest.c51
-rw-r--r--contrib/ntp/tests/libntp/sockaddrtest.h50
-rw-r--r--contrib/ntp/tests/libntp/socktoa.c56
-rw-r--r--contrib/ntp/tests/libntp/ssl_init.c23
-rw-r--r--contrib/ntp/tests/libntp/statestr.c31
-rw-r--r--contrib/ntp/tests/libntp/strtolfp.c15
-rw-r--r--contrib/ntp/tests/libntp/test-libntp.c17
-rw-r--r--contrib/ntp/tests/libntp/test-libntp.h5
-rw-r--r--contrib/ntp/tests/libntp/timespecops.c259
-rw-r--r--contrib/ntp/tests/libntp/timevalops.c264
-rw-r--r--contrib/ntp/tests/libntp/tstotv.c11
-rw-r--r--contrib/ntp/tests/libntp/tvtots.c38
-rw-r--r--contrib/ntp/tests/libntp/uglydate.c4
-rw-r--r--contrib/ntp/tests/libntp/vi64ops.c42
-rw-r--r--contrib/ntp/tests/libntp/ymd2yd.c36
-rw-r--r--contrib/ntp/tests/ntpd/Makefile.am197
-rw-r--r--contrib/ntp/tests/ntpd/Makefile.in663
-rw-r--r--contrib/ntp/tests/ntpd/leapsec.c (renamed from contrib/ntp/tests/ntpd/leapsec.cpp)698
-rw-r--r--contrib/ntp/tests/ntpd/ntp_prio_q.c262
-rw-r--r--contrib/ntp/tests/ntpd/ntp_restrict.c198
-rw-r--r--contrib/ntp/tests/ntpd/ntpdtest.cpp27
-rw-r--r--contrib/ntp/tests/ntpd/ntpdtest.h15
-rw-r--r--contrib/ntp/tests/ntpd/rc_cmdlength.c38
-rw-r--r--contrib/ntp/tests/ntpd/run-leapsec.c122
-rw-r--r--contrib/ntp/tests/ntpd/run-ntp_prio_q.c69
-rw-r--r--contrib/ntp/tests/ntpd/run-ntp_restrict.c68
-rw-r--r--contrib/ntp/tests/ntpd/run-rc_cmdlength.c57
-rw-r--r--contrib/ntp/tests/ntpd/run-t-ntp_scanner.c72
-rw-r--r--contrib/ntp/tests/ntpd/run-t-ntp_signd.c66
-rw-r--r--contrib/ntp/tests/ntpd/t-ntp_scanner.c136
-rw-r--r--contrib/ntp/tests/ntpd/t-ntp_signd.c116
-rw-r--r--contrib/ntp/tests/ntpq/Makefile.am96
-rw-r--r--contrib/ntp/tests/ntpq/Makefile.in1286
-rw-r--r--contrib/ntp/tests/ntpq/run-t-ntpq.c54
-rw-r--r--contrib/ntp/tests/ntpq/t-ntpq.c37
-rw-r--r--contrib/ntp/tests/sandbox/Makefile.am25
-rw-r--r--contrib/ntp/tests/sandbox/Makefile.in42
-rw-r--r--contrib/ntp/tests/sandbox/run-modetoa.c11
-rw-r--r--contrib/ntp/tests/sandbox/run-uglydate.c13
-rw-r--r--contrib/ntp/tests/sandbox/run-ut-2803.c11
-rw-r--r--contrib/ntp/tests/sandbox/smeartest.c12
-rw-r--r--contrib/ntp/tests/sec-2853/Makefile.am2
-rw-r--r--contrib/ntp/tests/sec-2853/Makefile.in8
-rw-r--r--contrib/ntp/tests/sec-2853/run-sec-2853.c13
-rw-r--r--contrib/ntp/tests/sec-2853/sec-2853.c4
-rw-r--r--contrib/ntp/util/Makefile.in4
-rw-r--r--contrib/ntp/util/invoke-ntp-keygen.texi4
-rw-r--r--contrib/ntp/util/ntp-keygen-opts.c14
-rw-r--r--contrib/ntp/util/ntp-keygen-opts.h6
-rw-r--r--contrib/ntp/util/ntp-keygen.1ntp-keygenman6
-rw-r--r--contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc4
-rw-r--r--contrib/ntp/util/ntp-keygen.c6
-rw-r--r--contrib/ntp/util/ntp-keygen.html4
-rw-r--r--contrib/ntp/util/ntp-keygen.man.in6
-rw-r--r--contrib/ntp/util/ntp-keygen.mdoc.in4
-rw-r--r--contrib/ntp/util/ntptime.c4
-rw-r--r--usr.sbin/ntp/config.h10
-rw-r--r--usr.sbin/ntp/doc/ntp-keygen.84
-rw-r--r--usr.sbin/ntp/doc/ntp.conf.554
-rw-r--r--usr.sbin/ntp/doc/ntp.keys.56
-rw-r--r--usr.sbin/ntp/doc/ntpd.827
-rw-r--r--usr.sbin/ntp/doc/ntpdc.84
-rw-r--r--usr.sbin/ntp/doc/ntpq.816
-rw-r--r--usr.sbin/ntp/doc/sntp.87
-rw-r--r--usr.sbin/ntp/ntpdc/Makefile1
-rw-r--r--usr.sbin/ntp/ntpq/Makefile1
-rwxr-xr-xusr.sbin/ntp/scripts/mkver2
473 files changed, 17652 insertions, 16473 deletions
diff --git a/UPDATING b/UPDATING
index d8a2d6623a35..a87451bc8ce3 100644
--- a/UPDATING
+++ b/UPDATING
@@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of
stable/10, and then rebuild without this option. The bootstrap process from
older version of current is a bit fragile.
+20151026:
+ NTP has been upgraded to 4.2.8p4.
+
20151025:
ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support has been removed from
atf.test.mk (included from bsd.test.mk). Please upgrade devel/atf
diff --git a/contrib/ntp/ChangeLog b/contrib/ntp/ChangeLog
index 738ae225867d..5d8346b310b0 100644
--- a/contrib/ntp/ChangeLog
+++ b/contrib/ntp/ChangeLog
@@ -1,4 +1,159 @@
---
+(4.2.8p4) 2015/10/21 Released by Harlan Stenn <stenn@ntp.org>
+(4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Sec 2899] CVE-2014-9297 perlinger@ntp.org
+* [Sec 2901] Drop invalid packet before checking KoD. Check for all KoD's.
+ Danny Mayer. Log incoming packets that fail TEST2. Harlan Stenn.
+* [Sec 2902] configuration directives "pidfile" and "driftfile"
+ should be local-only. perlinger@ntp.org (patch by Miroslav Lichvar)
+* [Sec 2909] added missing call to 'free()' in ntp_crypto.c. perlinger@ntp.org
+* [Sec 2913] TALOS-CAN-0052: crash by loop counter underrun. perlinger@ntp.org
+* [Sec 2916] TALOS-CAN-0054: memory corruption in password store. JPerlinger
+* [Sec 2917] TALOS-CAN-0055: Infinite loop if extended logging enabled and
+ the logfile and keyfile are the same. perlinger@ntp.org
+* [Sec 1918] TALOS-CAN-0062: prevent directory traversal for VMS, too, when
+ using 'saveconfig' command. perlinger@ntp.org
+* [Bug 2919] TALOS-CAN-0063: avoid buffer overrun in ntpq. perlinger@ntp.org
+* [Sec 2020] TALOS-CAN-0064: signed/unsiged clash could lead to buffer overun
+ and memory corruption. perlinger@ntp.org
+* [Sec 2921] TALOS-CAN-0065: password length memory corruption. JPerlinger.
+* [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL
+ on some bogus values. Harlan Stenn.
+* [Sec 2941] NAK to the Future: Symmetric association authentication
+ bypass via crypto-NAK. Patch applied. perlinger@ntp.org
+* [Bug 2332] (reopened) Exercise thread cancellation once before dropping
+ privileges and limiting resources in NTPD removes the need to link
+ forcefully against 'libgcc_s' which does not always work. J.Perlinger
+* [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn.
+* [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn.
+* [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn.
+* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c. perlinger@ntp.org
+* [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn.
+* [Bug 2849] Systems with more than one default route may never
+ synchronize. Brian Utterback. Note that this patch might need to
+ be reverted once Bug 2043 has been fixed.
+* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger
+* [Bug 2866] segmentation fault at initgroups(). Harlan Stenn.
+* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger
+* [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn
+* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
+* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must
+ be configured for the distribution targets. Harlan Stenn.
+* [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar.
+* [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+* [Bug 2888] streamline calendar functions. perlinger@ntp.org
+* [Bug 2889] ntp-dev-4.3.67 does not build on Windows. perlinger@ntp.org
+* [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov.
+* [Bug 2906] make check needs better support for pthreads. Harlan Stenn.
+* [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn.
+* [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn.
+* libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn.
+* Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+* tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn.
+* Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn.
+* On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn.
+* top_srcdir can change based on ntp v. sntp. Harlan Stenn.
+* sntp/tests/ function parameter list cleanup. Damir Tomić.
+* tests/libntp/ function parameter list cleanup. Damir Tomić.
+* tests/ntpd/ function parameter list cleanup. Damir Tomić.
+* sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn.
+* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. H.Stenn.
+* tests/libntp/timevalops.c and timespecops.c fixed error printing. D.Tomić.
+* tests/libntp/ improvements in code and fixed error printing. Damir Tomić.
+* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
+ caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed
+ formatting; first declaration, then code (C90); deleted unnecessary comments;
+ changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich
+* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments,
+ fix formatting, cleanup. Tomasz Flendrich
+* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting.
+ Tomasz Flendrich
+* tests/libntp/statestr.c remove empty functions, remove unnecessary include,
+ fix formatting. Tomasz Flendrich
+* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich
+* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich
+* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting.
+ Tomasz Flendrich
+* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich
+* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich
+* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich
+* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich
+* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich
+* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting.
+* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include,
+fixed formatting. Tomasz Flendrich
+* tests/libntp/timespecops.c fixed formatting, fixed the order of includes,
+ removed unnecessary comments, cleanup. Tomasz Flendrich
+* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary
+ comments, cleanup. Tomasz Flendrich
+* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting.
+ Tomasz Flendrich
+* tests/libntp/lfptest.h cleanup. Tomasz Flendrich
+* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich
+* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting.
+ Tomasz Flendrich
+* sntp/tests/kodDatabase.c added consts, deleted empty function,
+ fixed formatting. Tomasz Flendrich
+* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich
+* sntp/tests/packetHandling.c is now using proper Unity's assertions,
+ fixed formatting, deleted unused variable. Tomasz Flendrich
+* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting.
+ Tomasz Flendrich
+* sntp/tests/packetProcessing.c changed from sprintf to snprintf,
+ fixed formatting. Tomasz Flendrich
+* sntp/tests/utilities.c is now using proper Unity's assertions, changed
+ the order of includes, fixed formatting, removed unnecessary comments.
+ Tomasz Flendrich
+* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich
+* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem,
+ made one function do its job, deleted unnecessary prints, fixed formatting.
+ Tomasz Flendrich
+* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich
+* sntp/unity/unity_config.h: Distribute it. Harlan Stenn.
+* sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn.
+* sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn.
+* sntp/unity/unity.c: Clean up a printf(). Harlan Stenn.
+* Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn.
+* Don't build sntp/libevent/sample/. Harlan Stenn.
+* tests/libntp/test_caltontp needs -lpthread. Harlan Stenn.
+* br-flock: --enable-local-libevent. Harlan Stenn.
+* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich
+* scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn.
+* Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+* Code cleanup. Harlan Stenn.
+* libntp/icom.c: Typo fix. Harlan Stenn.
+* util/ntptime.c: initialization nit. Harlan Stenn.
+* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn.
+* Add std_unity_tests to various Makefile.am files. Harlan Stenn.
+* ntpd/ntp_restrict.c: added a few assertions, created tests for this file.
+ Tomasz Flendrich
+* Changed progname to be const in many files - now it's consistent. Tomasz
+ Flendrich
+* Typo fix for GCC warning suppression. Harlan Stenn.
+* Added tests/ntpd/ntp_scanner.c test. Damir Tomić.
+* Added declarations to all Unity tests, and did minor fixes to them.
+ Reduced the number of warnings by half. Damir Tomić.
+* Updated generate_test_runner.rb and updated the sntp/unity/auto directory
+ with the latest Unity updates from Mark. Damir Tomić.
+* Retire google test - phase I. Harlan Stenn.
+* Unity test cleanup: move declaration of 'initializing'. Harlan Stenn.
+* Update the NEWS file. Harlan Stenn.
+* Autoconf cleanup. Harlan Stenn.
+* Unit test dist cleanup. Harlan Stenn.
+* Cleanup various test Makefile.am files. Harlan Stenn.
+* Pthread autoconf macro cleanup. Harlan Stenn.
+* Fix progname definition in unity runner scripts. Harlan Stenn.
+* Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn.
+* Update the patch for bug 2817. Harlan Stenn.
+* More updates for bug 2817. Harlan Stenn.
+* Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn.
+* gcc on older HPUX may need +allowdups. Harlan Stenn.
+* Adding missing MCAST protection. Harlan Stenn.
+* Disable certain test programs on certain platforms. Harlan Stenn.
+* Implement --enable-problem-tests (on by default). Harlan Stenn.
+* build system tweaks. Harlan Stenn.
+---
(4.2.8p3) 2015/06/29 Released by Harlan Stenn <stenn@ntp.org>
* [Sec 2853] Crafted remote config packet can crash some versions of
diff --git a/contrib/ntp/CommitLog b/contrib/ntp/CommitLog
index b1f2a30ffe14..3366f2ff17e8 100644
--- a/contrib/ntp/CommitLog
+++ b/contrib/ntp/CommitLog
@@ -1,3 +1,4916 @@
+ChangeSet@1.3577, 2015-10-21 12:42:02-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P4
+ TAG: NTP_4_2_8P4
+
+ ChangeLog@1.1757 +1 -0
+ NTP_4_2_8P4
+
+ ntpd/invoke-ntp.conf.texi@1.193 +1 -1
+ NTP_4_2_8P4
+
+ ntpd/invoke-ntp.keys.texi@1.185 +1 -1
+ NTP_4_2_8P4
+
+ ntpd/invoke-ntpd.texi@1.502 +2 -2
+ NTP_4_2_8P4
+
+ ntpd/ntp.conf.5man@1.227 +3 -3
+ NTP_4_2_8P4
+
+ ntpd/ntp.conf.5mdoc@1.227 +2 -2
+ NTP_4_2_8P4
+
+ ntpd/ntp.conf.html@1.181 +94 -107
+ NTP_4_2_8P4
+
+ ntpd/ntp.conf.man.in@1.227 +3 -3
+ NTP_4_2_8P4
+
+ ntpd/ntp.conf.mdoc.in@1.227 +2 -2
+ NTP_4_2_8P4
+
+ ntpd/ntp.keys.5man@1.219 +2 -2
+ NTP_4_2_8P4
+
+ ntpd/ntp.keys.5mdoc@1.219 +3 -3
+ NTP_4_2_8P4
+
+ ntpd/ntp.keys.html@1.181 +21 -33
+ NTP_4_2_8P4
+
+ ntpd/ntp.keys.man.in@1.219 +2 -2
+ NTP_4_2_8P4
+
+ ntpd/ntp.keys.mdoc.in@1.219 +3 -3
+ NTP_4_2_8P4
+
+ ntpd/ntpd-opts.c@1.524 +245 -245
+ NTP_4_2_8P4
+
+ ntpd/ntpd-opts.h@1.523 +3 -3
+ NTP_4_2_8P4
+
+ ntpd/ntpd.1ntpdman@1.331 +3 -3
+ NTP_4_2_8P4
+
+ ntpd/ntpd.1ntpdmdoc@1.331 +2 -2
+ NTP_4_2_8P4
+
+ ntpd/ntpd.html@1.175 +142 -186
+ NTP_4_2_8P4
+
+ ntpd/ntpd.man.in@1.331 +3 -3
+ NTP_4_2_8P4
+
+ ntpd/ntpd.mdoc.in@1.331 +2 -2
+ NTP_4_2_8P4
+
+ ntpdc/invoke-ntpdc.texi@1.499 +2 -2
+ NTP_4_2_8P4
+
+ ntpdc/ntpdc-opts.c@1.517 +107 -107
+ NTP_4_2_8P4
+
+ ntpdc/ntpdc-opts.h@1.516 +3 -3
+ NTP_4_2_8P4
+
+ ntpdc/ntpdc.1ntpdcman@1.330 +3 -3
+ NTP_4_2_8P4
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.330 +2 -2
+ NTP_4_2_8P4
+
+ ntpdc/ntpdc.html@1.343 +75 -95
+ NTP_4_2_8P4
+
+ ntpdc/ntpdc.man.in@1.330 +3 -3
+ NTP_4_2_8P4
+
+ ntpdc/ntpdc.mdoc.in@1.330 +2 -2
+ NTP_4_2_8P4
+
+ ntpq/invoke-ntpq.texi@1.506 +2 -2
+ NTP_4_2_8P4
+
+ ntpq/ntpq-opts.c@1.523 +106 -106
+ NTP_4_2_8P4
+
+ ntpq/ntpq-opts.h@1.521 +3 -3
+ NTP_4_2_8P4
+
+ ntpq/ntpq.1ntpqman@1.334 +3 -3
+ NTP_4_2_8P4
+
+ ntpq/ntpq.1ntpqmdoc@1.334 +2 -2
+ NTP_4_2_8P4
+
+ ntpq/ntpq.html@1.172 +132 -155
+ NTP_4_2_8P4
+
+ ntpq/ntpq.man.in@1.334 +3 -3
+ NTP_4_2_8P4
+
+ ntpq/ntpq.mdoc.in@1.334 +2 -2
+ NTP_4_2_8P4
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.501 +2 -2
+ NTP_4_2_8P4
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.519 +68 -68
+ NTP_4_2_8P4
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.518 +3 -3
+ NTP_4_2_8P4
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.330 +3 -3
+ NTP_4_2_8P4
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.330 +2 -2
+ NTP_4_2_8P4
+
+ ntpsnmpd/ntpsnmpd.html@1.170 +10 -14
+ NTP_4_2_8P4
+
+ ntpsnmpd/ntpsnmpd.man.in@1.330 +3 -3
+ NTP_4_2_8P4
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.330 +2 -2
+ NTP_4_2_8P4
+
+ packageinfo.sh@1.520 +3 -3
+ NTP_4_2_8P4
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.91 +3 -3
+ NTP_4_2_8P4
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.92 +2 -2
+ NTP_4_2_8P4
+
+ scripts/calc_tickadj/calc_tickadj.html@1.93 +30 -42
+ NTP_4_2_8P4
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.90 +3 -3
+ NTP_4_2_8P4
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.92 +2 -2
+ NTP_4_2_8P4
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.95 +1 -1
+ NTP_4_2_8P4
+
+ scripts/invoke-plot_summary.texi@1.112 +2 -2
+ NTP_4_2_8P4
+
+ scripts/invoke-summary.texi@1.112 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.322 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntp-wait/ntp-wait-opts@1.58 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.319 +3 -3
+ NTP_4_2_8P4
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.320 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntp-wait/ntp-wait.html@1.339 +41 -59
+ NTP_4_2_8P4
+
+ scripts/ntp-wait/ntp-wait.man.in@1.319 +3 -3
+ NTP_4_2_8P4
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.320 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.110 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntpsweep/ntpsweep-opts@1.60 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.98 +3 -3
+ NTP_4_2_8P4
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.98 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntpsweep/ntpsweep.html@1.111 +46 -57
+ NTP_4_2_8P4
+
+ scripts/ntpsweep/ntpsweep.man.in@1.98 +3 -3
+ NTP_4_2_8P4
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.99 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.111 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntptrace/ntptrace-opts@1.60 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.98 +3 -3
+ NTP_4_2_8P4
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.99 +2 -2
+ NTP_4_2_8P4
+
+ scripts/ntptrace/ntptrace.html@1.112 +38 -47
+ NTP_4_2_8P4
+
+ scripts/ntptrace/ntptrace.man.in@1.98 +3 -3
+ NTP_4_2_8P4
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.100 +2 -2
+ NTP_4_2_8P4
+
+ scripts/plot_summary-opts@1.60 +2 -2
+ NTP_4_2_8P4
+
+ scripts/plot_summary.1plot_summaryman@1.110 +3 -3
+ NTP_4_2_8P4
+
+ scripts/plot_summary.1plot_summarymdoc@1.110 +2 -2
+ NTP_4_2_8P4
+
+ scripts/plot_summary.html@1.113 +40 -58
+ NTP_4_2_8P4
+
+ scripts/plot_summary.man.in@1.110 +3 -3
+ NTP_4_2_8P4
+
+ scripts/plot_summary.mdoc.in@1.110 +2 -2
+ NTP_4_2_8P4
+
+ scripts/summary-opts@1.60 +2 -2
+ NTP_4_2_8P4
+
+ scripts/summary.1summaryman@1.110 +3 -3
+ NTP_4_2_8P4
+
+ scripts/summary.1summarymdoc@1.110 +2 -2
+ NTP_4_2_8P4
+
+ scripts/summary.html@1.113 +37 -49
+ NTP_4_2_8P4
+
+ scripts/summary.man.in@1.110 +3 -3
+ NTP_4_2_8P4
+
+ scripts/summary.mdoc.in@1.110 +2 -2
+ NTP_4_2_8P4
+
+ scripts/update-leap/invoke-update-leap.texi@1.11 +1 -1
+ NTP_4_2_8P4
+
+ scripts/update-leap/update-leap-opts@1.11 +2 -2
+ NTP_4_2_8P4
+
+ scripts/update-leap/update-leap.1update-leapman@1.11 +3 -3
+ NTP_4_2_8P4
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.11 +2 -2
+ NTP_4_2_8P4
+
+ scripts/update-leap/update-leap.html@1.11 +48 -72
+ NTP_4_2_8P4
+
+ scripts/update-leap/update-leap.man.in@1.11 +3 -3
+ NTP_4_2_8P4
+
+ scripts/update-leap/update-leap.mdoc.in@1.11 +2 -2
+ NTP_4_2_8P4
+
+ sntp/invoke-sntp.texi@1.499 +2 -2
+ NTP_4_2_8P4
+
+ sntp/sntp-opts.c@1.518 +159 -159
+ NTP_4_2_8P4
+
+ sntp/sntp-opts.h@1.516 +3 -3
+ NTP_4_2_8P4
+
+ sntp/sntp.1sntpman@1.334 +3 -3
+ NTP_4_2_8P4
+
+ sntp/sntp.1sntpmdoc@1.334 +2 -2
+ NTP_4_2_8P4
+
+ sntp/sntp.html@1.514 +111 -135
+ NTP_4_2_8P4
+
+ sntp/sntp.man.in@1.334 +3 -3
+ NTP_4_2_8P4
+
+ sntp/sntp.mdoc.in@1.334 +2 -2
+ NTP_4_2_8P4
+
+ util/invoke-ntp-keygen.texi@1.502 +2 -2
+ NTP_4_2_8P4
+
+ util/ntp-keygen-opts.c@1.520 +173 -173
+ NTP_4_2_8P4
+
+ util/ntp-keygen-opts.h@1.518 +3 -3
+ NTP_4_2_8P4
+
+ util/ntp-keygen.1ntp-keygenman@1.330 +3 -3
+ NTP_4_2_8P4
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.330 +2 -2
+ NTP_4_2_8P4
+
+ util/ntp-keygen.html@1.176 +157 -216
+ NTP_4_2_8P4
+
+ util/ntp-keygen.man.in@1.330 +3 -3
+ NTP_4_2_8P4
+
+ util/ntp-keygen.mdoc.in@1.330 +2 -2
+ NTP_4_2_8P4
+
+ChangeSet@1.3576, 2015-10-21 11:58:26-04:00, stenn@deacon.udel.edu
+ 4.2.8p4
+
+ packageinfo.sh@1.519 +1 -1
+ 4.2.8p4
+
+ChangeSet@1.3575, 2015-10-21 15:35:31+00:00, stenn@psp-deb1.ntp.org
+ Update severity information
+
+ NEWS@1.150 +2 -2
+ Update severity information
+
+ChangeSet@1.3574, 2015-10-20 08:00:43+00:00, stenn@psp-deb1.ntp.org
+ Update CVEs
+
+ NEWS@1.149 +16 -16
+ Update CVEs
+
+ChangeSet@1.3573, 2015-10-17 06:28:49+00:00, stenn@psp-deb1.ntp.org
+ ntp-4.2.8p4-sec-RC2
+
+ NEWS@1.148 +336 -4
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/invoke-ntp.conf.texi@1.192 +1 -1
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/invoke-ntp.keys.texi@1.184 +1 -1
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/invoke-ntpd.texi@1.501 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.conf.5man@1.226 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.conf.5mdoc@1.226 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.conf.html@1.180 +107 -94
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.conf.man.in@1.226 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.conf.mdoc.in@1.226 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.keys.5man@1.218 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.keys.5mdoc@1.218 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.keys.html@1.180 +33 -21
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.keys.man.in@1.218 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntp.keys.mdoc.in@1.218 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntpd-opts.c@1.523 +245 -245
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntpd-opts.h@1.522 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntpd.1ntpdman@1.330 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntpd.1ntpdmdoc@1.330 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntpd.html@1.174 +186 -142
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntpd.man.in@1.330 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpd/ntpd.mdoc.in@1.330 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpdc/invoke-ntpdc.texi@1.498 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpdc/ntpdc-opts.c@1.516 +107 -107
+ ntp-4.2.8p4-sec-RC2
+
+ ntpdc/ntpdc-opts.h@1.515 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpdc/ntpdc.1ntpdcman@1.329 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.329 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpdc/ntpdc.html@1.342 +95 -75
+ ntp-4.2.8p4-sec-RC2
+
+ ntpdc/ntpdc.man.in@1.329 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpdc/ntpdc.mdoc.in@1.329 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpq/invoke-ntpq.texi@1.505 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpq/ntpq-opts.c@1.522 +106 -106
+ ntp-4.2.8p4-sec-RC2
+
+ ntpq/ntpq-opts.h@1.520 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpq/ntpq.1ntpqman@1.333 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpq/ntpq.1ntpqmdoc@1.333 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpq/ntpq.html@1.171 +155 -132
+ ntp-4.2.8p4-sec-RC2
+
+ ntpq/ntpq.man.in@1.333 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpq/ntpq.mdoc.in@1.333 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.500 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.518 +68 -68
+ ntp-4.2.8p4-sec-RC2
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.517 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.329 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.329 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ ntpsnmpd/ntpsnmpd.html@1.169 +14 -10
+ ntp-4.2.8p4-sec-RC2
+
+ ntpsnmpd/ntpsnmpd.man.in@1.329 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.329 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ packageinfo.sh@1.518 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.90 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.91 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/calc_tickadj/calc_tickadj.html@1.92 +42 -30
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.89 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.91 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.94 +1 -1
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/invoke-plot_summary.texi@1.111 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/invoke-summary.texi@1.111 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.321 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntp-wait/ntp-wait-opts@1.57 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.318 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.319 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntp-wait/ntp-wait.html@1.338 +59 -41
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntp-wait/ntp-wait.man.in@1.318 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.319 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.109 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntpsweep/ntpsweep-opts@1.59 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.97 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.97 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntpsweep/ntpsweep.html@1.110 +57 -46
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntpsweep/ntpsweep.man.in@1.97 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.98 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.110 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntptrace/ntptrace-opts@1.59 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.97 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.98 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntptrace/ntptrace.html@1.111 +47 -38
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntptrace/ntptrace.man.in@1.97 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.99 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/plot_summary-opts@1.59 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/plot_summary.1plot_summaryman@1.109 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/plot_summary.1plot_summarymdoc@1.109 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/plot_summary.html@1.112 +58 -40
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/plot_summary.man.in@1.109 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/plot_summary.mdoc.in@1.109 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/summary-opts@1.59 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/summary.1summaryman@1.109 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/summary.1summarymdoc@1.109 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/summary.html@1.112 +49 -37
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/summary.man.in@1.109 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/summary.mdoc.in@1.109 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/update-leap/invoke-update-leap.texi@1.10 +1 -1
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/update-leap/update-leap-opts@1.10 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/update-leap/update-leap.1update-leapman@1.10 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.10 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/update-leap/update-leap.html@1.10 +72 -48
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/update-leap/update-leap.man.in@1.10 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ scripts/update-leap/update-leap.mdoc.in@1.10 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ sntp/invoke-sntp.texi@1.498 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ sntp/sntp-opts.c@1.517 +159 -159
+ ntp-4.2.8p4-sec-RC2
+
+ sntp/sntp-opts.h@1.515 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ sntp/sntp.1sntpman@1.333 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ sntp/sntp.1sntpmdoc@1.333 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ sntp/sntp.html@1.513 +135 -111
+ ntp-4.2.8p4-sec-RC2
+
+ sntp/sntp.man.in@1.333 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ sntp/sntp.mdoc.in@1.333 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ util/invoke-ntp-keygen.texi@1.501 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ util/ntp-keygen-opts.c@1.519 +173 -173
+ ntp-4.2.8p4-sec-RC2
+
+ util/ntp-keygen-opts.h@1.517 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ util/ntp-keygen.1ntp-keygenman@1.329 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.329 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ util/ntp-keygen.html@1.175 +216 -157
+ ntp-4.2.8p4-sec-RC2
+
+ util/ntp-keygen.man.in@1.329 +3 -3
+ ntp-4.2.8p4-sec-RC2
+
+ util/ntp-keygen.mdoc.in@1.329 +2 -2
+ ntp-4.2.8p4-sec-RC2
+
+ChangeSet@1.3572, 2015-10-17 03:10:01+00:00, stenn@psp-deb1.ntp.org
+ cleanup
+
+ ChangeLog@1.1756 +1 -5
+ cleanup
+
+ChangeSet@1.3571, 2015-10-17 01:39:22+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK
+
+ ChangeLog@1.1755 +4 -1
+ [Sec 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK
+
+ChangeSet@1.3558.3.3, 2015-10-11 08:10:20+02:00, jnperlin@hydra.localnet
+ [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK
+
+ ChangeLog@1.1743.3.3 +3 -0
+ [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK
+
+ ntpd/ntp_proto.c@1.364.1.1 +18 -0
+ [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK
+
+ChangeSet@1.3558.3.2, 2015-10-06 06:25:48-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P4_RC1
+ TAG: NTP_4_2_8P4_RC1
+
+ ChangeLog@1.1743.3.2 +1 -0
+ NTP_4_2_8P4_RC1
+
+ ntpd/invoke-ntp.conf.texi@1.191 +1 -1
+ NTP_4_2_8P4_RC1
+
+ ntpd/invoke-ntp.keys.texi@1.183 +1 -1
+ NTP_4_2_8P4_RC1
+
+ ntpd/invoke-ntpd.texi@1.500 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.conf.5man@1.225 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.conf.5mdoc@1.225 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.conf.html@1.179 +1196 -1524
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.conf.man.in@1.225 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.conf.mdoc.in@1.225 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.keys.5man@1.217 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.keys.5mdoc@1.217 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.keys.html@1.179 +1 -1
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.keys.man.in@1.217 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntp.keys.mdoc.in@1.217 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntpd-opts.c@1.522 +245 -245
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntpd-opts.h@1.521 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntpd.1ntpdman@1.329 +8 -4
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntpd.1ntpdmdoc@1.329 +7 -3
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntpd.html@1.173 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntpd.man.in@1.329 +8 -4
+ NTP_4_2_8P4_RC1
+
+ ntpd/ntpd.mdoc.in@1.329 +7 -3
+ NTP_4_2_8P4_RC1
+
+ ntpdc/invoke-ntpdc.texi@1.497 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpdc/ntpdc-opts.c@1.515 +107 -107
+ NTP_4_2_8P4_RC1
+
+ ntpdc/ntpdc-opts.h@1.514 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpdc/ntpdc.1ntpdcman@1.328 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.328 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpdc/ntpdc.html@1.341 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpdc/ntpdc.man.in@1.328 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpdc/ntpdc.mdoc.in@1.328 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpq/invoke-ntpq.texi@1.504 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpq/ntpq-opts.c@1.521 +106 -106
+ NTP_4_2_8P4_RC1
+
+ ntpq/ntpq-opts.h@1.519 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpq/ntpq.1ntpqman@1.332 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpq/ntpq.1ntpqmdoc@1.332 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpq/ntpq.html@1.170 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpq/ntpq.man.in@1.332 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpq/ntpq.mdoc.in@1.332 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.499 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.517 +68 -68
+ NTP_4_2_8P4_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.516 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.328 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.328 +2 -2
+ NTP_4_2_8P4_RC1
+
+ ntpsnmpd/ntpsnmpd.html@1.168 +1 -1
+ NTP_4_2_8P4_RC1
+
+ ntpsnmpd/ntpsnmpd.man.in@1.328 +3 -3
+ NTP_4_2_8P4_RC1
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.328 +2 -2
+ NTP_4_2_8P4_RC1
+
+ packageinfo.sh@1.517 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.89 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.90 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/calc_tickadj/calc_tickadj.html@1.91 +1 -1
+ NTP_4_2_8P4_RC1
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.88 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.90 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.93 +1 -1
+ NTP_4_2_8P4_RC1
+
+ scripts/invoke-plot_summary.texi@1.110 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/invoke-summary.texi@1.110 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.320 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntp-wait/ntp-wait-opts@1.56 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.317 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.318 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntp-wait/ntp-wait.html@1.337 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntp-wait/ntp-wait.man.in@1.317 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.318 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.108 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntpsweep/ntpsweep-opts@1.58 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.96 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.96 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntpsweep/ntpsweep.html@1.109 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntpsweep/ntpsweep.man.in@1.96 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.97 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.109 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntptrace/ntptrace-opts@1.58 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.96 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.97 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntptrace/ntptrace.html@1.110 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/ntptrace/ntptrace.man.in@1.96 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.98 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/plot_summary-opts@1.58 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/plot_summary.1plot_summaryman@1.108 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/plot_summary.1plot_summarymdoc@1.108 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/plot_summary.html@1.111 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/plot_summary.man.in@1.108 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/plot_summary.mdoc.in@1.108 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/summary-opts@1.58 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/summary.1summaryman@1.108 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/summary.1summarymdoc@1.108 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/summary.html@1.111 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/summary.man.in@1.108 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/summary.mdoc.in@1.108 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/update-leap/invoke-update-leap.texi@1.9 +1 -1
+ NTP_4_2_8P4_RC1
+
+ scripts/update-leap/update-leap-opts@1.9 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/update-leap/update-leap.1update-leapman@1.9 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.9 +2 -2
+ NTP_4_2_8P4_RC1
+
+ scripts/update-leap/update-leap.html@1.9 +1 -1
+ NTP_4_2_8P4_RC1
+
+ scripts/update-leap/update-leap.man.in@1.9 +3 -3
+ NTP_4_2_8P4_RC1
+
+ scripts/update-leap/update-leap.mdoc.in@1.9 +2 -2
+ NTP_4_2_8P4_RC1
+
+ sntp/invoke-sntp.texi@1.497 +2 -2
+ NTP_4_2_8P4_RC1
+
+ sntp/sntp-opts.c@1.516 +159 -159
+ NTP_4_2_8P4_RC1
+
+ sntp/sntp-opts.h@1.514 +3 -3
+ NTP_4_2_8P4_RC1
+
+ sntp/sntp.1sntpman@1.332 +3 -3
+ NTP_4_2_8P4_RC1
+
+ sntp/sntp.1sntpmdoc@1.332 +2 -2
+ NTP_4_2_8P4_RC1
+
+ sntp/sntp.html@1.512 +2 -2
+ NTP_4_2_8P4_RC1
+
+ sntp/sntp.man.in@1.332 +3 -3
+ NTP_4_2_8P4_RC1
+
+ sntp/sntp.mdoc.in@1.332 +2 -2
+ NTP_4_2_8P4_RC1
+
+ util/invoke-ntp-keygen.texi@1.500 +2 -2
+ NTP_4_2_8P4_RC1
+
+ util/ntp-keygen-opts.c@1.518 +173 -173
+ NTP_4_2_8P4_RC1
+
+ util/ntp-keygen-opts.h@1.516 +3 -3
+ NTP_4_2_8P4_RC1
+
+ util/ntp-keygen.1ntp-keygenman@1.328 +3 -3
+ NTP_4_2_8P4_RC1
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.328 +2 -2
+ NTP_4_2_8P4_RC1
+
+ util/ntp-keygen.html@1.174 +2 -2
+ NTP_4_2_8P4_RC1
+
+ util/ntp-keygen.man.in@1.328 +3 -3
+ NTP_4_2_8P4_RC1
+
+ util/ntp-keygen.mdoc.in@1.328 +2 -2
+ NTP_4_2_8P4_RC1
+
+ChangeSet@1.3558.3.1, 2015-10-06 05:40:23-04:00, stenn@deacon.udel.edu
+ Prepare for 4.2.8p4-RC1
+
+ ChangeLog@1.1743.3.1 +1 -0
+ Prepare for 4.2.8p4-RC1
+
+ NEWS@1.147 +143 -4
+ Prepare for 4.2.8p4-RC1
+
+ packageinfo.sh@1.516 +1 -1
+ Prepare for 4.2.8p4-RC1
+
+ChangeSet@1.3568, 2015-10-06 08:51:27+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL on some bogus values. Harlan Stenn.
+
+ ChangeLog@1.1752 +2 -0
+ [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL on some [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL on some bogus values. Harlan Stenn.
+
+ libntp/decodenetnum.c@1.18 +4 -1
+ [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL on some [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL on some bogus values. Harlan Stenn.
+
+ChangeSet@1.3567, 2015-10-06 08:02:23+00:00, stenn@psp-deb1.ntp.org
+ Log incoming packets that fail TEST2. Harlan Stenn.
+
+ ChangeLog@1.1751 +1 -1
+ Log incoming packets that fail TEST2. Harlan Stenn.
+
+ ntpd/ntp_proto.c@1.367 +7 -1
+ Log incoming packets that fail TEST2. Harlan Stenn.
+
+ChangeSet@1.3566, 2015-10-06 07:47:24+00:00, stenn@psp-deb1.ntp.org
+ cleanup
+
+ ChangeLog@1.1750 +2 -1
+ cleanup
+
+ ntpd/ntp_proto.c@1.366 +113 -95
+ cleanup
+
+ChangeSet@1.3564, 2015-10-06 03:56:29+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2921] TALOS-CAN-0065: password length memory corruption. JPerlinger.
+
+ ChangeLog@1.1748 +1 -0
+ [Sec 2921] TALOS-CAN-0065: password length memory corruption. JPerlinger.
+ Fixed as part of [Sec 2916] TALOS-CAN-0054: memory corruption in password store. JPerlinger.
+
+ChangeSet@1.3562, 2015-10-05 21:11:21+00:00, stenn@psp-deb1.ntp.org
+ typo
+
+ libntp/authreadkeys.c@1.22 +1 -1
+ typo
+
+ChangeSet@1.3552.9.2, 2015-10-05 11:11:54+00:00, stenn@psp-deb1.ntp.org
+ 2909 is a security bug
+
+ ChangeLog@1.1739.5.2 +1 -1
+ 2909 is a security bug
+
+ChangeSet@1.3558.2.2, 2015-10-05 11:03:39+00:00, stenn@psp-deb1.ntp.org
+ 2902 is a security bug
+
+ ChangeLog@1.1743.2.2 +2 -2
+ 2902 is a security bug
+
+ChangeSet@1.3558.1.4, 2015-10-05 10:49:30+00:00, stenn@psp-deb1.ntp.org
+ Update the ChangeLog for 2899
+
+ ChangeLog@1.1743.1.4 +1 -1
+ Update the ChangeLog for 2899
+
+ChangeSet@1.3552.4.2, 2015-10-05 10:32:02+00:00, stenn@psp-deb1.ntp.org
+ typos
+
+ ntpd/ntp_crypto.c@1.183 +4 -4
+ typos
+
+ChangeSet@1.3558.1.2, 2015-10-05 06:26:46+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn.
+
+ ChangeLog@1.1743.1.2 +1 -0
+ [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn.
+
+ ntpd/ntp_config.c@1.335 +4 -0
+ [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn.
+
+ChangeSet@1.3561, 2015-10-03 09:08:20+02:00, jnperlin@hydra.localnet
+ [TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same
+
+ ChangeLog@1.1746 +2 -0
+ [TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same
+
+ include/ntp_stdlib.h@1.79 +1 -0
+ [TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same
+ - add 'mvsyslog()' function to make wrapping calls to syslog easier
+
+ include/ntp_syslog.h@1.9 +1 -0
+ [TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same
+ - add 'mvsyslog()' function to make wrapping calls to syslog easier
+
+ libntp/authreadkeys.c@1.21 +71 -18
+ [TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same
+ - Avoid endless loop by logging only the first 5 errors explicitely, counting the next 10 silently, and aborting
+ the parsing of the file with proper diagnostic when more than 15 errors where encountered.
+
+ libntp/msyslog.c@1.53 +12 -0
+ [TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same
+ - add 'mvsyslog()' function to make wrapping calls to syslog easier
+
+ChangeSet@1.3558.1.1, 2015-10-01 03:27:35-04:00, stenn@deacon.udel.edu
+ build system tweaks. Harlan Stenn.
+
+ ChangeLog@1.1743.1.1 +2 -1
+ build system tweaks. Harlan Stenn.
+
+ Makefile.am@1.134 +1 -1
+ build system tweaks. Harlan Stenn.
+
+ sntp/m4/ntp_problemtests.m4@1.3 +14 -14
+ build system tweaks. Harlan Stenn.
+
+ChangeSet@1.3560, 2015-09-30 22:47:45+02:00, jnperlin@hydra.localnet
+ [TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command.
+
+ ChangeLog@1.1745 +2 -0
+ [TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command.
+
+ ntpd/ntp_control.c@1.204 +25 -9
+ [TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command.
+
+ChangeSet@1.3559, 2015-09-30 21:55:09+02:00, jnperlin@hydra.localnet
+ [TALOS-CAN-0064] signed/unsiged clash could lead to buffer overun
+
+ BitKeeper/etc/ignore@1.89 +4 -0
+ keep cscope files away from repo
+
+ ChangeLog@1.1744 +2 -0
+ [TALOS-CAN-0064] signed/unsiged clash could lead to buffer overun
+
+ ntpd/ntp_io.c@1.408 +9 -6
+ [TALOS-CAN-0064] signed/unsiged clash could lead to buffer overun
+
+ChangeSet@1.3552.11.4, 2015-09-30 20:15:13+02:00, jnperlin@hydra.localnet
+ [TALOS-CAN-0063] avoid buffer overrun in ntpq
+
+ ChangeLog@1.1739.7.3 +1 -0
+ [TALOS-CAN-0063] avoid buffer overrun in ntpq
+
+ ntpq/ntpq.c@1.162 +6 -1
+ [TALOS-CAN-0063] avoid buffer overrun in ntpq
+
+ChangeSet@1.3552.11.3, 2015-09-30 18:44:18+02:00, jnperlin@hydra.localnet
+ [TALOS-CAN-0054] memory corruption
+ - make sure there's *always* a new buffer for storing the key again
+
+ libntp/authkeys.c@1.27 +9 -5
+ [TALOS-CAN-0054] memory corruption
+ - make sure there's *always* a new buffer for storing the key again
+
+ChangeSet@1.3552.1.32, 2015-09-30 07:40:52+00:00, stenn@psp-deb1.ntp.org
+ formatting cleanup
+
+ ChangeLog@1.1739.1.18 +1 -1
+ formatting cleanup
+
+ChangeSet@1.3552.12.2, 2015-09-30 06:45:59+00:00, stenn@psp-deb1.ntp.org
+ Implement --disable-problem-tests (off by default). Harlan Stenn.
+
+ ChangeLog@1.1739.8.1 +1 -0
+ Implement --disable-problem-tests (off by default). Harlan Stenn.
+
+ sntp/m4/ntp_problemtests.m4@1.2 +20 -6
+ Implement --disable-problem-tests (off by default). Harlan Stenn.
+
+ChangeSet@1.3552.12.1, 2015-09-30 06:11:05+00:00, stenn@psp-deb1.ntp.org
+ whitespace cleanup
+
+ ntpd/ntp_io.c@1.407 +13 -13
+ whitespace cleanup
+
+ChangeSet@1.3552.11.2, 2015-09-29 23:13:13+02:00, jnperlin@hydra.localnet
+ [TALOS-CAN-0054] memory corruption in password store
+
+ ChangeLog@1.1739.7.2 +1 -0
+ [TALOS-CAN-0054] memory corruption in password store
+
+ libntp/authkeys.c@1.26 +4 -0
+ [TALOS-CAN-0054] memory corruption in password store
+ - make sure deallocated pointers are NULLed and new storage is allocated on demand
+
+ChangeSet@1.3552.11.1, 2015-09-29 22:00:10+02:00, jnperlin@hydra.localnet
+ [TALOS-CAN-0052] crash by loop counter underrun.
+
+ ChangeLog@1.1739.7.1 +1 -0
+ [TALOS-CAN-0052] crash by loop counter underrun.
+
+ ntpd/ntp_request.c@1.114 +7 -3
+ [TALOS-CAN-0052] crash by loop counter underrun.
+ - add missing reload of loop counter
+
+ChangeSet@1.3552.10.2, 2015-09-29 20:34:05+02:00, jnperlin@hydra.localnet
+ [Bug 2902] configuration directives "pidfile" and "driftfile" should be local-only.
+
+ ChangeLog@1.1739.6.2 +2 -0
+ [Bug 2902] configuration directives "pidfile" and "driftfile" should be local-only.
+
+ ntpd/ntp_parser.c@1.99 +235 -226
+ [Bug 2902] configuration directives "pidfile" and "driftfile" should be local-only.
+ - update bison-generated files
+
+ ntpd/ntp_parser.h@1.64 +3 -5
+ [Bug 2902] configuration directives "pidfile" and "driftfile" should be local-only.
+ - update bison-generated files
+
+ ntpd/ntp_parser.y@1.89 +26 -15
+ [Bug 2902] configuration directives "pidfile" and "driftfile" should be local-only.
+ - applied patch from Miroslav Lichvar, plus minor cosmetic changes
+
+ChangeSet@1.3552.10.1, 2015-09-29 06:10:38-04:00, stenn@pogo.udel.edu
+ Disable certain test programs on certain platforms. Harlan Stenn.
+
+ ChangeLog@1.1739.6.1 +1 -0
+ Disable certain test programs on certain platforms. Harlan Stenn.
+
+ configure.ac@1.602 +2 -0
+ Disable certain test programs on certain platforms. Harlan Stenn.
+
+ sntp/m4/ntp_problemtests.m4@1.1 +42 -0
+ BitKeeper file /pogo/users/stenn/ntp-stable/sntp/m4/ntp_problemtests.m4
+
+ sntp/m4/ntp_problemtests.m4@1.0 +0 -0
+
+ tests/ntpd/Makefile.am@1.28 +14 -3
+ Disable certain test programs on certain platforms. Harlan Stenn.
+
+ChangeSet@1.3552.9.1, 2015-09-28 18:22:06+02:00, jnperlin@hydra.localnet
+ [Bug 2909] - Slow memory leak in CRYPTO_ASSOC
+ - added missing call to 'free()' in ntp_crypto.c.
+
+ ChangeLog@1.1739.5.1 +1 -0
+ [Bug 2909] - Slow memory leak in CRYPTO_ASSOC
+ - added missing call to 'free()' in ntp_crypto.c.
+
+ ntpd/ntp_crypto.c@1.181.1.1 +1 -0
+ [Bug 2909] - Slow memory leak in CRYPTO_ASSOC
+ - added missing call to 'free()' in ntp_crypto.c.
+
+ChangeSet@1.3556, 2015-09-27 12:52:27+02:00, jnperlin@hydra.localnet
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/buftvtots.c@1.5 +7 -7
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/calendar.c@1.9 +45 -35
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/clocktime.c@1.8 +16 -16
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/hextolfp.c@1.9 +9 -9
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/lfptostr.c@1.7 +14 -14
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/prettydate.c@1.4 +1 -1
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/strtolfp.c@1.6 +3 -3
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/tstotv.c@1.4 +3 -3
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/tvtots.c@1.6 +10 -10
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ tests/libntp/uglydate.c@1.8 +1 -1
+ [Bug2888] Fixed compiler warnings, converted C++ comments to C comments
+
+ChangeSet@1.3552.8.1, 2015-09-27 02:30:13+00:00, mayer@psp-deb1.ntp.org
+ Drop invalid packet before checking KoD. Check for all KoD's
+
+ ChangeLog@1.1739.4.1 +1 -0
+ Drop invalid packet before checking KoD. Check for all KoD's
+
+ ntpd/ntp_proto.c@1.365 +66 -9
+ Drop invalid packet before checking KoD. Check for all KoD's
+
+ChangeSet@1.3552.1.29, 2015-09-26 13:17:13+00:00, perlinger@psp-deb1.ntp.org
+ [bug2332] Create & cancel a dummy thread to warm-up the pthread runtime
+ instead of linking against libgcc_s on Linux targets
+
+ ChangeLog@1.1739.1.15 +3 -0
+ [Bug2332](reopened) fixed
+
+ ntpd/ntpd.c@1.165 +74 -0
+ [bug2332] Create & cancel a dummy thread to warm-up the pthread runtime
+
+ sntp/m4/ntp_libntp.m4@1.32 +0 -14
+ [bug2332] Remove the forced link against 'libgcc_s' since it breaks other targets
+
+ChangeSet@1.3552.7.6, 2015-09-25 06:51:35+00:00, stenn@psp-deb1.ntp.org
+ gcc on older HPUX may need +allowdups. Harlan Stenn.
+
+ sntp/m4/os_cflags.m4@1.12 +1 -1
+ gcc on older HPUX may need +allowdups. Harlan Stenn.
+
+ChangeSet@1.3552.7.5, 2015-09-25 04:21:37+00:00, stenn@psp-deb1.ntp.org
+ Adding missing MCAST protection. Harlan Stenn.
+
+ ChangeLog@1.1739.1.14 +1 -0
+ Adding missing MCAST protection. Harlan Stenn.
+
+ ntpd/ntp_io.c@1.406 +2 -0
+ Adding missing MCAST protection. Harlan Stenn.
+
+ChangeSet@1.3552.7.4, 2015-09-25 04:13:23+00:00, stenn@psp-deb1.ntp.org
+ gcc on older HPUX may need +allowdups. Harlan Stenn.
+
+ ChangeLog@1.1739.1.13 +1 -0
+ gcc on older HPUX may need +allowdups. Harlan Stenn.
+
+ sntp/m4/os_cflags.m4@1.11 +32 -2
+ gcc on older HPUX may need +allowdups. Harlan Stenn.
+
+ChangeSet@1.3552.7.3, 2015-09-24 11:27:07+00:00, stenn@psp-deb1.ntp.org
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/ntpd.c@1.164 +1 -1
+ More updates for bug 2817. Harlan Stenn.
+
+ChangeSet@1.3552.7.2, 2015-09-24 10:27:51+00:00, stenn@psp-deb1.ntp.org
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/ntpd.c@1.163 +6 -3
+ More updates for bug 2817. Harlan Stenn.
+
+ChangeSet@1.3552.7.1, 2015-09-24 05:44:53+00:00, stenn@psp-deb1.ntp.org
+ Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn.
+
+ ChangeLog@1.1739.1.12 +1 -0
+ Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn.
+
+ tests/ntpd/ntp_prio_q.c@1.2 +8 -7
+ Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn.
+
+ChangeSet@1.3552.1.23, 2015-09-23 07:49:24-04:00, stenn@deacon.udel.edu
+ More updates for bug 2817. Harlan Stenn.
+
+ sntp/m4/ntp_rlimit.m4@1.5 +5 -5
+ More updates for bug 2817. Harlan Stenn.
+
+ChangeSet@1.3552.1.22, 2015-09-23 10:29:51+00:00, stenn@psp-deb1.ntp.org
+ More updates for bug 2817. Harlan Stenn.
+
+ ChangeLog@1.1739.1.11 +1 -0
+ More updates for bug 2817. Harlan Stenn.
+
+ html/miscopt.html@1.83 +2 -2
+ More updates for bug 2817. Harlan Stenn.
+
+ include/ntp_config.h@1.83 +2 -2
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/invoke-ntp.conf.texi@1.190 +8 -5
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/ntp.conf.5man@1.224 +9 -6
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/ntp.conf.5mdoc@1.224 +9 -6
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/ntp.conf.def@1.20 +6 -3
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/ntp.conf.man.in@1.224 +9 -6
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/ntp.conf.mdoc.in@1.224 +9 -6
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/ntp_config.c@1.334 +26 -4
+ More updates for bug 2817. Harlan Stenn.
+
+ ntpd/ntpd.c@1.162 +1 -1
+ More updates for bug 2817. Harlan Stenn.
+
+ sntp/m4/ntp_rlimit.m4@1.4 +2 -2
+ More updates for bug 2817. Harlan Stenn.
+
+ChangeSet@1.3552.1.21, 2015-09-21 10:53:44+00:00, stenn@psp-deb1.ntp.org
+ Update the patch for bug 2817. Harlan Stenn.
+
+ ChangeLog@1.1739.1.10 +1 -0
+ Update the patch for bug 2817. Harlan Stenn.
+
+ configure.ac@1.601 +0 -54
+ Update the patch for bug 2817. Harlan Stenn.
+
+ sntp/m4/ntp_rlimit.m4@1.3 +57 -2
+ Update the patch for bug 2817. Harlan Stenn.
+
+ChangeSet@1.3552.1.20, 2015-09-21 10:30:35+00:00, stenn@psp-deb1.ntp.org
+ Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn.
+
+ ChangeLog@1.1739.1.9 +1 -0
+ Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn.
+
+ tests/ntpd/Makefile.am@1.27 +5 -5
+ Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn.
+
+ChangeSet@1.3552.1.19, 2015-09-21 08:09:33+00:00, stenn@psp-deb1.ntp.org
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ ChangeLog@1.1739.1.8 +1 -0
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ sntp/tests/run-packetProcessing.c@1.9 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ sntp/tests/run-t-log.c@1.3 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ sntp/unity/auto/generate_test_runner.rb@1.10 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-a_md5encrypt.c@1.14 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-atoint.c@1.8 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-atouint.c@1.9 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-authkeys.c@1.11 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-buftvtots.c@1.6 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-calendar.c@1.8.1.1 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-caljulian.c@1.13 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-caltontp.c@1.5 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-calyearstart.c@1.7 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-clocktime.c@1.10 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-decodenetnum.c@1.9 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-hextoint.c@1.9 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-hextolfp.c@1.8 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-humandate.c@1.6 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-lfpfunc.c@1.17 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-lfptostr.c@1.7 +12 -12
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-modetoa.c@1.11 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-msyslog.c@1.8 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-netof.c@1.7 +2 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-numtoa.c@1.10 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-numtohost.c@1.10 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-octtoint.c@1.7 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-prettydate.c@1.5 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-recvbuff.c@1.5 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-refidsmear.c@1.6 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-refnumtoa.c@1.8 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-sfptostr.c@1.5 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-socktoa.c@1.12 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-ssl_init.c@1.9 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-statestr.c@1.10 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-strtolfp.c@1.5 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-timespecops.c@1.10 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-timevalops.c@1.12 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-tstotv.c@1.5 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-tvtots.c@1.6 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-uglydate.c@1.10 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-vi64ops.c@1.8 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/libntp/run-ymd2yd.c@1.11 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/ntpd/run-leapsec.c@1.5 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/ntpd/run-ntp_prio_q.c@1.4 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/ntpd/run-rc_cmdlength.c@1.3 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/ntpd/run-t-ntp_scanner.c@1.5 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/ntpd/run-t-ntp_signd.c@1.8 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ tests/ntpq/run-t-ntpq.c@1.3 +1 -1
+ Fix progname definition in unity runner scripts. Harlan Stenn.
+
+ChangeSet@1.3552.1.18, 2015-09-21 08:06:14+00:00, stenn@psp-deb1.ntp.org
+ Pthread autoconf macro cleanup. Harlan Stenn.
+
+ ChangeLog@1.1739.1.7 +1 -0
+ Pthread autoconf macro cleanup. Harlan Stenn.
+
+ sntp/m4/ntp_libevent.m4@1.15 +15 -19
+ Pthread autoconf macro cleanup. Harlan Stenn.
+
+ sntp/m4/ntp_libntp.m4@1.31 +5 -2
+ Pthread autoconf macro cleanup. Harlan Stenn.
+
+ sntp/m4/openldap-thread-check.m4@1.7 +6 -0
+ Pthread autoconf macro cleanup. Harlan Stenn.
+
+ChangeSet@1.3552.1.16, 2015-09-17 11:09:07+00:00, stenn@psp-deb1.ntp.org
+ Avoid spurious SCCS get
+
+ ntpd/Makefile.am@1.134 +3 -0
+ Avoid spurious SCCS get
+
+ChangeSet@1.3552.6.3, 2015-09-16 11:10:41+00:00, stenn@psp-deb1.ntp.org
+ Cleanup various test Makefile.am files. Harlan Stenn.
+
+ ChangeLog@1.1739.1.6 +1 -0
+ Cleanup various test Makefile.am files. Harlan Stenn.
+
+ sntp/tests/Makefile.am@1.64.1.3 +5 -5
+ Cleanup various test Makefile.am files. Harlan Stenn.
+
+ tests/libntp/Makefile.am@1.93 +23 -23
+ Cleanup various test Makefile.am files. Harlan Stenn.
+
+ tests/ntpd/Makefile.am@1.22.1.3 +7 -12
+ Cleanup various test Makefile.am files. Harlan Stenn.
+
+ tests/ntpq/Makefile.am@1.5.1.1 +3 -10
+ Cleanup various test Makefile.am files. Harlan Stenn.
+
+ChangeSet@1.3552.6.2, 2015-09-15 10:44:48+00:00, stenn@psp-deb1.ntp.org
+ Unit test dist cleanup. Harlan Stenn
+
+ ChangeLog@1.1739.1.5 +1 -0
+ Unit test dist cleanup. Harlan Stenn
+
+ sntp/configure.ac@1.82 +1 -0
+ Unit test dist cleanup. Harlan Stenn
+
+ sntp/tests/Makefile.am@1.64.1.2 +2 -0
+ Unit test dist cleanup. Harlan Stenn
+
+ tests/Makefile.am@1.17.1.1 +1 -0
+ Unit test dist cleanup. Harlan Stenn
+
+ tests/ntpd/Makefile.am@1.22.1.2 +0 -9
+ Unit test dist cleanup. Harlan Stenn
+
+ChangeSet@1.3552.5.6, 2015-09-15 07:45:39+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2906] make check needs better support for pthreads. Harlan Stenn.
+
+ sntp/m4/ntp_libevent.m4@1.14 +23 -0
+ [Bug 2906] make check needs better support for pthreads. Harlan Stenn.
+
+ChangeSet@1.3552.5.5, 2015-09-15 07:12:08+00:00, stenn@psp-deb1.ntp.org
+ documentation notes
+
+ sntp/m4/openldap-thread-check.m4@1.6 +3 -0
+ documentation notes
+
+ChangeSet@1.3552.5.4, 2015-09-14 06:36:37+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2906] "make check" needs better support for pthreads
+
+ ChangeLog@1.1739.3.4 +1 -0
+ [Bug 2906] "make check" needs better support for pthreads
+
+ sntp/m4/ntp_libevent.m4@1.13 +2 -0
+ [Bug 2906] "make check" needs better support for pthreads
+
+ sntp/tests/Makefile.am@1.62.2.1 +5 -0
+ [Bug 2906] "make check" needs better support for pthreads
+
+ tests/libntp/Makefile.am@1.90.1.1 +12 -12
+ [Bug 2906] "make check" needs better support for pthreads
+
+ tests/ntpd/Makefile.am@1.12.3.1 +4 -2
+ [Bug 2906] "make check" needs better support for pthreads
+
+ChangeSet@1.3552.5.3, 2015-09-14 05:50:02+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn.
+
+ ChangeLog@1.1739.3.3 +1 -0
+ [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn.
+
+ sntp/Makefile.am@1.86.1.1 +7 -4
+ [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn.
+
+ChangeSet@1.3552.5.2, 2015-09-13 22:11:31+00:00, stenn@psp-deb1.ntp.org
+ Autoconf cleanup
+
+ ChangeLog@1.1739.3.2 +1 -0
+ Autoconf cleanup
+
+ configure.ac@1.598.1.1 +1 -0
+ Autoconf cleanup
+
+ChangeSet@1.3552.5.1, 2015-09-13 22:10:03+00:00, stenn@psp-deb1.ntp.org
+ Update the NEWS file
+
+ ChangeLog@1.1739.3.1 +1 -0
+ Update the NEWS file
+
+ NEWS@1.146 +14 -0
+ Update the NEWS file
+
+ChangeSet@1.3552.1.15, 2015-08-20 17:13:37+02:00, viperus@ubuntu.(none)
+ t-ntp_scanner.c:
+ Rename: tests/ntpd/ntp_scanner.c -> tests/ntpd/t-ntp_scanner.c
+ new static functions tested
+ run-t-ntp_scanner.c:
+ Rename: tests/ntpd/run-ntp_scanner.c -> tests/ntpd/run-t-ntp_scanner.c
+ Makefile.am:
+ updates required for include *.c to work
+ run-t-ntp_scanner.c:
+ update
+
+ tests/ntpd/Makefile.am@1.25 +6 -5
+ updates required for include *.c to work
+
+ tests/ntpd/run-t-ntp_scanner.c@1.4 +18 -7
+ update
+
+ tests/ntpd/run-t-ntp_scanner.c@1.3 +0 -0
+ Rename: tests/ntpd/run-ntp_scanner.c -> tests/ntpd/run-t-ntp_scanner.c
+
+ tests/ntpd/t-ntp_scanner.c@1.5 +73 -2
+ new static functions tested
+
+ tests/ntpd/t-ntp_scanner.c@1.4 +0 -0
+ Rename: tests/ntpd/ntp_scanner.c -> tests/ntpd/t-ntp_scanner.c
+
+ChangeSet@1.3552.1.14, 2015-08-20 16:35:29+02:00, viperus@ubuntu.(none)
+ t-ntpq.c:
+ disabled for now, very trick to test static functions.
+ run-t-ntpq.c:
+ update
+ ntp_scanner.c:
+ added new test
+ Makefile.am:
+ added more include dirs
+
+ tests/ntpd/ntp_scanner.c@1.3 +11 -3
+ added new test
+
+ tests/ntpq/Makefile.am@1.7 +2 -3
+ added more include dirs
+
+ tests/ntpq/run-t-ntpq.c@1.2 +1 -2
+ update
+
+ tests/ntpq/t-ntpq.c@1.3 +25 -2
+ disabled for now, very trick to test static functions.
+
+ChangeSet@1.3552.1.13, 2015-08-20 10:15:12+02:00, viperus@ubuntu.(none)
+ http-server.c:
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+ Many files:
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+
+
+ sntp/libevent/sample/http-server.c@1.12 +6 -2
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+
+ sntp/libevent/test/bench_httpclient.c@1.8 +5 -1
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+
+
+ sntp/libevent/test/regress.c@1.8 +6 -2
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+
+
+ sntp/libevent/test/regress_dns.c@1.10 +6 -5
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+
+
+ sntp/libevent/test/regress_http.c@1.10 +8 -4
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+
+
+ sntp/libevent/test/regress_minheap.c@1.5 +2 -1
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+
+
+ sntp/libevent/test/test-ratelim.c@1.11 +6 -2
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+
+
+ sntp/libevent/test/test-time.c@1.7 +2 -1
+ reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here.
+
+
+ChangeSet@1.3552.1.12, 2015-08-20 01:10:57+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ added 2 more temp files to CLEANFILES and DISTCLEAN, because it prevented make distcheck from finishing properly
+ pathfind.c:
+ reverted emalloc to malloc with if(result == NULL)... because sntp/ doesn't link libntp...probably for a reason unknown to me.
+
+ sntp/libopts/compat/pathfind.c@1.13 +17 -6
+ reverted emalloc to malloc with if(result == NULL)... because sntp/ doesn't link libntp...probably for a reason unknown to me.
+
+ sntp/tests/Makefile.am@1.65 +4 -0
+ added 2 more temp files to CLEANFILES and DISTCLEAN, because it prevented make distcheck from finishing properly
+
+ChangeSet@1.3552.1.11, 2015-08-20 01:04:40+02:00, viperus@ubuntu.(none)
+ run-packetProcessing.c:
+ manually updated due to char / const char progname issues when autogenerating
+ Makefile.am:
+ re-enabled ntpq dir
+
+ sntp/tests/run-packetProcessing.c@1.8 +1 -1
+ manually updated due to char / const char progname issues when autogenerating
+
+ tests/Makefile.am@1.18 +1 -0
+ re-enabled ntpq dir
+
+ChangeSet@1.3552.1.10, 2015-08-20 00:23:42+02:00, viperus@ubuntu.(none)
+ machines.c:
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+ Many files:
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ libntp/machines.c@1.26 +3 -3
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+ ntpd/refclock_palisade.c@1.43 +2 -2
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ ntpq/ntpq.c@1.161 +7 -7
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/libevent/sample/http-server.c@1.11 +2 -2
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/libevent/test/bench_httpclient.c@1.7 +1 -1
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/libevent/test/regress.c@1.7 +2 -2
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/libevent/test/regress_dns.c@1.9 +4 -4
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/libevent/test/regress_http.c@1.9 +3 -3
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/libevent/test/regress_minheap.c@1.4 +1 -1
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/libevent/test/test-ratelim.c@1.10 +2 -2
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/libevent/test/test-time.c@1.6 +1 -1
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/libopts/compat/pathfind.c@1.12 +5 -5
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/tests/fileHandlingTest.c@1.3 +1 -1
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ sntp/tests/packetProcessing.c@1.8 +1 -1
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ tests/libntp/a_md5encrypt.c@1.12 +1 -1
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ tests/libntp/calendar.c@1.6.1.1 +4 -4
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ tests/libntp/caljulian.c@1.10 +1 -1
+ Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc.
+
+
+ChangeSet@1.3552.1.9, 2015-08-17 13:56:23+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ fixed minor typo which caused me a lot of headache
+ t-ntp_signd.c:
+ added a new test
+ run-t-ntp_signd.c:
+ autogen update
+ Makefile.am:
+ removed unnecessary CFLAG
+ t-ntp_signd.c:
+ minor update
+
+ tests/ntpd/Makefile.am@1.24 +2 -1
+ fixed minor typo which caused me a lot of headache
+
+ tests/ntpd/Makefile.am@1.23 +0 -3
+ removed unnecessary CFLAG
+
+ tests/ntpd/run-t-ntp_signd.c@1.7 +10 -5
+ autogen update
+
+ tests/ntpd/t-ntp_signd.c@1.10 +23 -14
+ added a new test
+
+ tests/ntpd/t-ntp_signd.c@1.9 +10 -3
+ minor update
+
+ChangeSet@1.3552.1.8, 2015-08-17 12:21:45+02:00, viperus@ubuntu.(none)
+ run-t-ntp_signd.c:
+ added more tests manually
+
+ tests/ntpd/run-t-ntp_signd.c@1.6 +2 -1
+ added more tests manually
+
+ tests/ntpd/t-ntp_signd.c@1.8 +0 -1
+
+ChangeSet@1.3552.1.7, 2015-08-17 12:15:56+02:00, viperus@ubuntu.(none)
+ t-ntp_signd.c:
+ adding more tests , added mocked functinos section
+
+ tests/ntpd/t-ntp_signd.c@1.7 +34 -0
+ adding more tests , added mocked functinos section
+
+ChangeSet@1.3552.1.6, 2015-08-17 11:28:21+02:00, viperus@ubuntu.(none)
+ t-ntp_signd.c:
+ new tests added
+ run-t-ntp_signd.c:
+ I had some issues with bk and this file
+ t-ntp_signd.c:
+ basic mocking concept added. connect() is mocked, and always returns 1
+
+ tests/ntpd/run-t-ntp_signd.c@1.5 +4 -2
+ I had some issues with bk and this file
+
+ tests/ntpd/t-ntp_signd.c@1.6 +13 -9
+ basic mocking concept added. connect() is mocked, and always returns 1
+
+ tests/ntpd/t-ntp_signd.c@1.5 +22 -2
+ new tests added
+
+ChangeSet@1.3552.4.1, 2015-08-17 07:54:01+02:00, jnperlin@hydra.(none)
+ CVE-2014-9297
+
+ ChangeLog@1.1739.2.1 +1 -0
+ CVE-2014-9297
+
+ ntpd/ntp_crypto.c@1.182 +78 -27
+ CVE-2014-9297: buffer overrun checks
+
+ChangeSet@1.3552.3.1, 2015-08-14 12:05:44+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ removed unnecessary CFLAGS
+
+ tests/ntpq/Makefile.am@1.6 +0 -5
+ removed unnecessary CFLAGS
+
+ChangeSet@1.3552.1.4, 2015-08-14 08:24:21+00:00, stenn@psp-at1.ntp.org
+ Unity test cleanup: move declaration of 'initializing'. Harlan Stenn.
+
+ ChangeLog@1.1739.1.3 +1 -0
+ Unity test cleanup: move declaration of 'initializing'. Harlan Stenn.
+
+ ntpd/ntp_timer.c@1.92 +6 -0
+ Unity test cleanup: move declaration of 'initializing'. Harlan Stenn.
+
+ ntpd/ntpd.c@1.161 +0 -6
+ Unity test cleanup: move declaration of 'initializing'. Harlan Stenn.
+
+ChangeSet@1.3552.1.3, 2015-08-10 13:15:13+02:00, viperus@ubuntu.(none)
+ run-ntp_util.c:
+ new file, I guess?
+ Makefile.am:
+ changes to harlan's makefile after merge
+ run-ntp_prio_q.c:
+ hopefully, fixes stuff. Why is this here? Did harlan pull something from tfendrich?
+
+ tests/ntpd/Makefile.am@1.22 +13 -13
+ changes to harlan's makefile after merge
+
+ tests/ntpd/run-ntp_prio_q.c@1.3 +1 -1
+ hopefully, fixes stuff. Why is this here? Did harlan pull something from tfendrich?
+
+ tests/ntpd/run-ntp_util.c@1.1 +60 -0
+ new file, I guess?
+
+ tests/ntpd/run-ntp_util.c@1.0 +0 -0
+
+ChangeSet@1.3552.2.1, 2015-08-10 09:50:16+00:00, stenn@psp-at1.ntp.org
+ Retire google test - phase I. Harlan Stenn.
+
+ BitKeeper/deleted/07/g_packetHandling.cpp~2e07085e82bde6c@1.2 +0 -0
+ Delete: sntp/tests/g_packetHandling.cpp
+
+ BitKeeper/deleted/09/tvtots.cpp~c58754a7b62dde1c@1.9 +0 -0
+ Delete: tests/libntp/g_tvtots.cpp
+
+ BitKeeper/deleted/0a/sntptest.h~c408c7764b75cd4f@1.7 +0 -0
+ Delete: sntp/tests/g_sntptest.h
+
+ BitKeeper/deleted/0a/utilities.cpp~2657edd0f94e49eb@1.12 +0 -0
+ Delete: sntp/tests/g_utilities.cpp
+
+ BitKeeper/deleted/0c/buftvtots.cpp~eababa3e59583108@1.6 +0 -0
+ Delete: tests/libntp/g_buftvtots.cpp
+
+ BitKeeper/deleted/0f/uglydate.cpp~a0fdfbbfdc636411@1.5 +0 -0
+ Delete: tests/libntp/g_uglydate.cpp
+
+ BitKeeper/deleted/10/sfptostr.cpp~cef5595e4f89eac8@1.4 +0 -0
+ Delete: tests/libntp/g_sfptostr.cpp
+
+ BitKeeper/deleted/13/g_lfptostr.cpp~386d730e91bb76de@1.3 +0 -0
+ Delete: tests/libntp/g_lfptostr.cpp
+
+ BitKeeper/deleted/14/humandate.cpp~c3b455ca717b631a@1.5 +0 -0
+ Delete: tests/libntp/g_humandate.cpp
+
+ BitKeeper/deleted/15/g_nameresolution.cpp~23956912aa26e0b9@1.2 +0 -0
+ Delete: sntp/tests/g_nameresolution.cpp
+
+ BitKeeper/deleted/17/a_md5encrypt.cpp~1013ff09a55a7336@1.8 +0 -0
+ Delete: tests/libntp/g_a_md5encrypt.cpp
+
+ BitKeeper/deleted/1c/crypto.cpp~77bbd0102246a5@1.7 +0 -0
+ Delete: sntp/tests/g_crypto.cpp
+
+ BitKeeper/deleted/24/atoint.cpp~533534d530ae4081@1.5 +0 -0
+ Delete: tests/libntp/g_atoint.cpp
+
+ BitKeeper/deleted/29/networking.cpp~a6f1b3f0b76192c9@1.11 +0 -0
+ Delete: sntp/tests/g_networking.cpp
+
+ BitKeeper/deleted/29/refnumtoa.cpp~ed3c5e075503bdf4@1.5 +0 -0
+ Delete: tests/libntp/g_refnumtoa.cpp
+
+ BitKeeper/deleted/2d/libntptest.h~1990ef7fb70295d6@1.6 +0 -0
+ Delete: tests/libntp/g_libntptest.h
+
+ BitKeeper/deleted/30/g_recvbuff.cpp~7b0d3114520a0616@1.3 +0 -0
+ Delete: tests/libntp/g_recvbuff.cpp
+
+ BitKeeper/deleted/30/main.cpp~62ec7f38f7d49413@1.10 +0 -0
+ Delete: sntp/tests_main.cpp
+
+ BitKeeper/deleted/37/statestr.cpp~65497a98bac68a52@1.5 +0 -0
+ Delete: tests/libntp/g_statestr.cpp
+
+ BitKeeper/deleted/3b/tvalops.cpp~fa0bb1554d1d08d4@1.11 +0 -0
+ Delete: tests/libntp/g_timevalops.cpp
+
+ BitKeeper/deleted/3c/g_octtoint.cpp~8124d76dd2b395e5@1.3 +0 -0
+ Delete: tests/libntp/g_octtoint.cpp
+
+ BitKeeper/deleted/3f/calendar.cpp~72447c9b8c0deced@1.4 +0 -0
+ Delete: tests/libntp/g_calendar.cpp
+
+ BitKeeper/deleted/4e/g_hextolfp.cpp~ba8561698c15b354@1.3 +0 -0
+ Delete: tests/libntp/g_hextolfp.cpp
+
+ BitKeeper/deleted/57/ntpdtest.h~25bdfa3eeda7b121@1.3 +0 -0
+ Delete: tests/ntpd/g_ntpdtest.h
+
+ BitKeeper/deleted/5b/sockaddrtest.h~4bf7e82961607bf0@1.6 +0 -0
+ Delete: tests/libntp/g_sockaddrtest.h
+
+ BitKeeper/deleted/5f/authkeys.cpp~24496a9d93173937@1.10 +0 -0
+ Delete: tests/libntp/g_authkeys.cpp
+
+ BitKeeper/deleted/62/g_strtolfp.cpp~5a50a9b282094e7f@1.3 +0 -0
+ Delete: tests/libntp/g_strtolfp.cpp
+
+ BitKeeper/deleted/77/lfpfunc.cpp~9ed51f8dc31368eb@1.5 +0 -0
+ Delete: tests/libntp/g_lfpfunc.cpp
+
+ BitKeeper/deleted/82/clocktime.cpp~7dd85c09c049ffd4@1.7 +0 -0
+ Delete: tests/libntp/g_clocktime.cpp
+
+ BitKeeper/deleted/8b/atouint.cpp~43abc72d64a1857a@1.4 +0 -0
+ Delete: tests/libntp/g_atouint.cpp
+
+ BitKeeper/deleted/8b/leapsec.cpp~11be64d438063292@1.17 +0 -0
+ Delete: tests/ntpd/g_leapsec.cpp
+
+ BitKeeper/deleted/93/g_vi64ops.cpp~e023cb72bff45261@1.3 +0 -0
+ Delete: tests/libntp/g_vi64ops.cpp
+
+ BitKeeper/deleted/96/numtoa.cpp~b3b85b1ebc36fc2b@1.5 +0 -0
+ Delete: tests/libntp/g_numtoa.cpp
+
+ BitKeeper/deleted/98/g_tstotv.cpp~37896736f73c48b0@1.3 +0 -0
+ Delete: tests/libntp/g_tstotv.cpp
+
+ BitKeeper/deleted/9a/packetProcessing.cpp~4822a1d49ca16be5@1.8 +0 -0
+ Delete: sntp/tests/g_packetProcessing.cpp
+
+ BitKeeper/deleted/9c/kodDatabase.cpp~f9244577ca9f0aa9@1.6 +0 -0
+ Delete: sntp/tests/g_kodDatabase.cpp
+
+ BitKeeper/deleted/a4/g_msyslog.cpp~ec51c9e8395b3e4b@1.3 +0 -0
+ Delete: tests/libntp/g_msyslog.cpp
+
+ BitKeeper/deleted/ae/lfptest.h~a452179b90fdedaa@1.8 +0 -0
+ Delete: tests/libntp/g_lfptest.h
+
+ BitKeeper/deleted/af/calyearstart.cpp~586f44f58a75b25e@1.6 +0 -0
+ Delete: tests/libntp/g_calyearstart.cpp
+
+ BitKeeper/deleted/b2/ntpdtest.cpp~d4e605db974f754d@1.4 +0 -0
+ Delete: tests/ntpd/g_ntpdtest.cpp
+
+ BitKeeper/deleted/b3/timestructs.cpp~2bc53cc52f6599d5@1.7 +0 -0
+ Delete: tests/libntp/g_timestructs.cpp
+
+ BitKeeper/deleted/c1/ssl_init.cpp~81ce47bbb0e4fbbc@1.6 +0 -0
+ Delete: tests/libntp/g_ssl_init.cpp
+
+ BitKeeper/deleted/c3/modetoa.cpp~50f2955120b0ed6f@1.4 +0 -0
+ Delete: tests/libntp/g_modetoa.cpp
+
+ BitKeeper/deleted/c6/kodFile.cpp~c593859a65c8e9e3@1.11 +0 -0
+ Delete: sntp/tests/g_kodFile.cpp
+
+ BitKeeper/deleted/c9/main.h~44cc5c4040b89c30@1.9 +0 -0
+ Delete: sntp/tests_main.h
+
+ BitKeeper/deleted/ce/timestructs.h~a7213e57006326f@1.6 +0 -0
+ Delete: tests/libntp/g_timestructs.h
+
+ BitKeeper/deleted/cf/libntptest.cpp~fb911e064fe18517@1.6 +0 -0
+ Delete: tests/libntp/g_libntptest.cpp
+
+ BitKeeper/deleted/d0/g_caltontp.cpp~ea2471ca2734873a@1.3 +0 -0
+ Delete: tests/libntp/g_caltontp.cpp
+
+ BitKeeper/deleted/d8/hextoint.cpp~78aeb35b2f896bed@1.6 +0 -0
+ Delete: tests/libntp/g_hextoint.cpp
+
+ BitKeeper/deleted/dd/keyFile.cpp~7ca67d971ffc97ae@1.9 +0 -0
+ Delete: sntp/tests/g_keyFile.cpp
+
+ BitKeeper/deleted/e0/g_socktoa.cpp~9f28a4451c7f0c1a@1.3 +0 -0
+ Delete: tests/libntp/g_socktoa.cpp
+
+ BitKeeper/deleted/eb/g_prettydate.cpp~7800800c1dbf9688@1.3 +0 -0
+ Delete: tests/libntp/g_prettydate.cpp
+
+ BitKeeper/deleted/ee/caljulian.cpp~4c368703107f888@1.8 +0 -0
+ Delete: tests/libntp/g_caljulian.cpp
+
+ BitKeeper/deleted/ef/fileHandlingTest.h~212fb01783c1dfd7@1.7 +0 -0
+ Delete: sntp/tests/g_fileHandlingTest.h
+
+ BitKeeper/deleted/f6/g_decodenetnum.cpp~5b151a58bf8417a2@1.3 +0 -0
+ Delete: tests/libntp/g_decodenetnum.cpp
+
+ BitKeeper/deleted/f8/g_netof.cpp~a772fe4f2f1b84e8@1.3 +0 -0
+ Delete: tests/libntp/g_netof.cpp
+
+ BitKeeper/deleted/fa/tspecops.cpp~fabae81f65cd8134@1.11 +0 -0
+ Delete: tests/libntp/g_timespecops.cpp
+
+ BitKeeper/deleted/fd/ymd2yd.cpp~eeb76d1d2a534b6@1.4 +0 -0
+ Delete: tests/libntp/g_ymd2yd.cpp
+
+ BitKeeper/deleted/ff/numtohost.cpp~c346ee31ae5ffefe@1.4 +0 -0
+ Delete: tests/libntp/g_numtohost.cpp
+
+ ChangeLog@1.1739.1.2 +1 -1
+ Retire google test - phase I. Harlan Stenn.
+
+ ChangeLog@1.1739.1.1 +1 -0
+ Retire google test - phase I
+
+ sntp/Makefile.am@1.87 +0 -1
+ Retire google test - phase I. Harlan Stenn.
+
+ sntp/tests/Makefile.am@1.62.1.1 +15 -28
+ Retire google test - phase I. Harlan Stenn.
+
+ tests/Makefile.am@1.12.1.1 +0 -13
+ Retire google test - phase I. Harlan Stenn.
+
+ tests/libntp/Makefile.am@1.91 +0 -63
+ Retire google test - phase I. Harlan Stenn.
+
+ tests/ntpd/Makefile.am@1.12.2.1 +32 -50
+ Retire google test - phase I. Harlan Stenn.
+
+ tests/sandbox/Makefile.am@1.7 +14 -5
+ Retire google test - phase I. Harlan Stenn.
+
+ChangeSet@1.3548.1.16, 2015-08-07 08:07:50+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ re-added ntpq, works now
+ run-t-ntpq.c:
+ added
+ Makefile.am:
+ minor cleanup
+ configure.ac:
+ added ntpq dir
+
+ configure.ac@1.599 +1 -0
+ added ntpq dir
+
+ tests/Makefile.am@1.16 +2 -0
+ re-added ntpq, works now
+
+ tests/ntpq/Makefile.am@1.5 +0 -1
+ minor cleanup
+
+ tests/ntpq/run-t-ntpq.c@1.1 +55 -0
+ added
+
+ tests/ntpq/run-t-ntpq.c@1.0 +0 -0
+
+ChangeSet@1.3548.1.15, 2015-08-06 21:42:18+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ removed ntpq becuase it doesnt work?!
+
+ tests/Makefile.am@1.15 +0 -2
+ removed ntpq becuase it doesnt work?!
+
+ChangeSet@1.3548.1.14, 2015-08-06 21:03:10+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ adding new Makefile
+ minor change
+ Makefile.am, t-ntpq.c:
+ update
+
+ tests/Makefile.am@1.14 +1 -0
+ update
+
+ tests/ntpq/Makefile.am@1.4 +3 -1
+ minor change
+
+ tests/ntpq/Makefile.am@1.3 +6 -15
+ adding new Makefile
+
+ tests/ntpq/t-ntpq.c@1.2 +1 -1
+ update
+
+ChangeSet@1.3548.1.13, 2015-08-06 20:41:02+02:00, viperus@ubuntu.(none)
+ socktoa.c:
+ fixed. Tests are skipped when you do ./build --disable-ipv6
+
+ t-ntpq.c:
+ new test file
+ decodenetnum.c:
+ fixed. Tests are skipped when you do ./build --disable-ipv6
+ Makefile.am:
+ changes
+ run-t-log.c:
+ updated
+
+ sntp/tests/run-t-log.c@1.2 +4 -3
+ updated
+
+ tests/libntp/decodenetnum.c@1.9 +3 -3
+ fixed. Tests are skipped when you do ./build --disable-ipv6
+
+ tests/libntp/socktoa.c@1.9 +2 -2
+ fixed. Tests are skipped when you do ./build --disable-ipv6
+
+
+ tests/ntpq/Makefile.am@1.2 +8 -37
+ changes
+
+ tests/ntpq/t-ntpq.c@1.1 +14 -0
+ new test file
+
+ tests/ntpq/t-ntpq.c@1.0 +0 -0
+
+ChangeSet@1.3548.1.12, 2015-08-06 20:24:05+02:00, viperus@ubuntu.(none)
+ log.c:
+ modified to allow calling of multiple atexit(cleanup_log) without causing a segfault.
+ t-log.c:
+ minor cleanup, fixes, stuff works (in combination with updated log.c)
+
+ sntp/log.c@1.24 +15 -6
+ modified to allow calling of multiple atexit(cleanup_log) without causing a segfault.
+
+ sntp/tests/t-log.c@1.2 +13 -11
+ minor cleanup, fixes, stuff works (in combination with updated log.c)
+
+ChangeSet@1.3548.1.11, 2015-08-06 10:27:35+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ small fix
+ socktoa.c, run-decodenetnum.c:
+ update
+ decodenetnum.c:
+ Minor changes due to the autogenerated ruby script
+ run-socktoa.c:
+ Minor changes due to the autogenerated ruby script
+
+
+ tests/libntp/decodenetnum.c@1.8 +22 -6
+ Minor changes due to the autogenerated ruby script
+
+ tests/libntp/run-decodenetnum.c@1.8 +4 -5
+ update
+
+ tests/libntp/run-socktoa.c@1.11 +7 -7
+ Minor changes due to the autogenerated ruby script
+
+
+ tests/libntp/socktoa.c@1.8 +22 -6
+ update
+
+ tests/ntpd/Makefile.am@1.20 +0 -1
+ small fix
+
+ChangeSet@1.3548.1.10, 2015-08-05 16:53:22+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ new file
+ added ntpq dir
+ added a new test, test-log
+ t-log.c:
+ removed the 2nd test because only one open_logfile per program can be used (segfault otherwise)
+ run-t-log.c:
+ new file, HAS ISSUES WITH CONST CHAR *progname.
+
+ sntp/tests/Makefile.am@1.63 +11 -0
+ added a new test, test-log
+
+ sntp/tests/run-t-log.c@1.1 +56 -0
+ new file, HAS ISSUES WITH CONST CHAR *progname.
+
+ sntp/tests/run-t-log.c@1.0 +0 -0
+
+ sntp/tests/t-log.c@1.1 +66 -0
+ removed the 2nd test because only one open_logfile per program can be used (segfault otherwise)
+
+ sntp/tests/t-log.c@1.0 +0 -0
+
+ tests/Makefile.am@1.13 +2 -0
+ added ntpq dir
+
+ tests/ntpq/Makefile.am@1.1 +146 -0
+ BitKeeper file /home/viperus/Desktop/ntp-stable-unity/tests/ntpq/Makefile.am
+
+ tests/ntpq/Makefile.am@1.0 +0 -0
+
+ChangeSet@1.3554, 2015-08-03 20:59:21+02:00, jnperlin@nemesis.localnet
+ [Bug 2888] streamline calendar functions
+ - MSVC compilation issue
+
+ libntp/ntp_calendar.c@1.17 +3 -1
+ [Bug 2888] streamline calendar functions
+ - 'uint' not known with MSVC; use u_int instead
+
+ChangeSet@1.3529.4.1, 2015-08-03 20:34:01+02:00, jnperlin@hydra.(none)
+ [Bug 2888] streamline calendar functions.
+
+ ChangeLog@1.1725.2.1 +1 -1
+ [Bug 2888] streamline calendar functions.
+
+ include/ntp_calendar.h@1.18 +13 -0
+ [Bug 2888] streamline calendar functions.
+
+ libntp/ntp_calendar.c@1.16 +495 -321
+ [Bug 2888] streamline calendar functions.
+ - reduce number of divisions for gregorian calendar
+ - rewrite divisions to use explicit 2's complement calculation via unsigned types
+ - avoid branches in calculations where possible
+
+ tests/libntp/calendar.c@1.7 +211 -132
+ [Bug 2888] streamline calendar functions.
+ - added tests for ISO8601 week calendar
+ - streamlined string formatting
+ - converted struct-by-value to struct-by-pointer in several cases
+ - fixed prototypes
+
+ tests/libntp/run-calendar.c@1.9 +19 -11
+ [Bug 2888] streamline calendar functions.
+ - update of test runner
+
+ChangeSet@1.3548.1.9, 2015-08-03 11:43:07+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ changed signdT -> t-ntp_signd. All tests files will from now on be named t-name.c , where name.c is the name of the tested file.
+ run-ntp_signdT.c~8aba306cc0dcbfc:
+ Delete: tests/ntpd/run-ntp_signdT.c
+ run-t-ntp_signd.c:
+ Rename: tests/ntpd/run-ntp_signd.c -> tests/ntpd/run-t-ntp_signd.c
+ t-ntp_signd.c:
+ Rename: tests/ntpd/ntp_signdT.c -> tests/ntpd/t-ntp_signd.c
+
+ BitKeeper/deleted/3a/run-ntp_signdT.c~8aba306cc0dcbfc@1.3 +0 -0
+ Delete: tests/ntpd/run-ntp_signdT.c
+
+ tests/ntpd/Makefile.am@1.19 +17 -17
+ changed signdT -> t-ntp_signd. All tests files will from now on be named t-name.c , where name.c is the name of the tested file.
+
+ tests/ntpd/run-t-ntp_signd.c@1.4 +0 -0
+ Rename: tests/ntpd/run-ntp_signd.c -> tests/ntpd/run-t-ntp_signd.c
+
+ tests/ntpd/t-ntp_signd.c@1.4 +0 -0
+ Rename: tests/ntpd/ntp_signdT.c -> tests/ntpd/t-ntp_signd.c
+
+ChangeSet@1.3548.1.8, 2015-08-03 08:48:00+00:00, viperus@psp-deb1.ntp.org
+ Makefile.am:
+ minor fixes, trying to link on psp-deb1
+
+ tests/ntpd/Makefile.am@1.18 +3 -4
+ minor fixes, trying to link on psp-deb1
+
+ChangeSet@1.3548.1.7, 2015-08-03 10:36:05+02:00, viperus@ubuntu.(none)
+ ntp_signdT.c:
+ added extern, hopefully, it will work
+
+ tests/ntpd/ntp_signdT.c@1.3 +1 -1
+ added extern, hopefully, it will work
+
+ChangeSet@1.3548.1.6, 2015-08-03 10:18:52+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ added rc_cmdlength.o
+
+ tests/ntpd/Makefile.am@1.17 +1 -0
+ added rc_cmdlength.o
+
+ChangeSet@1.3548.1.5, 2015-08-03 10:14:12+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ minor fix
+
+ tests/ntpd/Makefile.am@1.16 +1 -1
+ minor fix
+
+ChangeSet@1.3547.1.1, 2015-08-03 12:30:29+05:30, loki@dadasgift.(none)
+ ntp_util.c:
+ new file
+
+ tests/libntp/decodenetnum.c@1.7 +7 -1
+
+ tests/libntp/socktoa.c@1.7 +8 -1
+
+ tests/ntpd/Makefile.am@1.12.1.1 +23 -0
+
+ tests/ntpd/ntp_util.c@1.1 +74 -0
+ BitKeeper file /home/loki/ntp_gsoc/2_damir_code/ntp-stable-unity/tests/ntpd/ntp_util.c
+
+ tests/ntpd/ntp_util.c@1.0 +0 -0
+
+ChangeSet@1.3548.1.3, 2015-08-03 08:51:53+02:00, viperus@ubuntu.(none)
+ ntp_signd.c~736d4c4a37ef4b86:
+ Delete: tests/ntpd/ntp_signd.c
+
+ BitKeeper/deleted/7f/ntp_signd.c~736d4c4a37ef4b86@1.3 +0 -0
+ Delete: tests/ntpd/ntp_signd.c
+
+ChangeSet@1.3552, 2015-08-03 08:16:57+02:00, jnperlin@nemesis.localnet
+ [Bug 2889] ntp-dev-4.3.67 does not build on Windows
+
+ ChangeLog@1.1739 +1 -0
+ [Bug 2889] ntp-dev-4.3.67 does not build on Windows
+
+ libntp/msyslog.c@1.52 +2 -2
+ [Bug 2889] ntp-dev-4.3.67 does not build on Windows
+ - fixed a Windows-specific const clash in string processing
+
+ChangeSet@1.3548.1.2, 2015-08-01 22:40:51+02:00, viperus@ubuntu.(none)
+ ntp_signdT.c:
+ MUST ADD #define HAVE_NTP_NAME above the #include "ntp_NAME.c"
+ Makefile.am:
+
+
+ Added test ntp_singd again, renamed it to ntp_signdT (including the original ntp_signd.c doesn't work if you have 2 files with the same name).
+ I included the original ntp_signd.c, so static functions can be tested.
+ Additional .o objects had to be added for everyhting to work.
+
+
+ run-ntp_signdT.c:
+ autogenerated
+
+ tests/ntpd/Makefile.am@1.14 +7 -2
+
+
+ Added test ntp_singd again, renamed it to ntp_signdT (including the original ntp_signd.c doesn't work if you have 2 files with the same name).
+ I included the original ntp_signd.c, so static functions can be tested.
+ Additional .o objects had to be added for everyhting to work.
+
+
+
+ tests/ntpd/ntp_signdT.c@1.2 +17 -2
+ MUST ADD #define HAVE_NTP_NAME above the #include "ntp_NAME.c"
+
+ tests/ntpd/run-ntp_signdT.c@1.2 +2 -2
+ autogenerated
+
+ChangeSet@1.3548.1.1, 2015-08-01 20:49:22+02:00, viperus@ubuntu.(none)
+ Makefile.am:
+ added ntp_signdT
+ ntp_signdT.c, run-ntp_signdT.c:
+ new file
+
+ tests/ntpd/Makefile.am@1.13 +11 -9
+ added ntp_signdT
+
+ tests/ntpd/ntp_signdT.c@1.1 +28 -0
+ new file
+
+ tests/ntpd/ntp_signdT.c@1.0 +0 -0
+
+ tests/ntpd/run-ntp_signdT.c@1.1 +58 -0
+ new file
+
+ tests/ntpd/run-ntp_signdT.c@1.0 +0 -0
+
+ChangeSet@1.3549.1.1, 2015-07-31 07:58:11+00:00, stenn@psp-at1.ntp.org
+ [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov.
+
+ ChangeLog@1.1736.1.1 +1 -0
+ [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov.
+
+ ntpd/ntp_io.c@1.405 +9 -4
+ [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov.
+
+ChangeSet@1.3550, 2015-07-29 22:50:29+02:00, jnperlin@hydra.(none)
+ Bug 2821: minor build issues: fixed refclock_gpsdjson.c
+
+ ChangeLog@1.1737 +1 -0
+ Bug 2821: minor build issues: fixed refclock_gpsdjson.c
+
+ ntpd/refclock_gpsdjson.c@1.23 +9 -9
+ Bug 2821: minor build issues: fixed refclock_gpsdjson.c
+ - 'isprint()' is called with u_char argument
+ - unified 'unsigned char' and 'u_char' to 'u_char'
+
+ChangeSet@1.3549, 2015-07-29 10:04:53+00:00, stenn@psp-at1.ntp.org
+ ChangeLog cleanup
+
+ ChangeLog@1.1736 +5 -3
+ ChangeLog cleanup
+
+ChangeSet@1.3548, 2015-07-29 12:01:10+02:00, viperus@ubuntu.(none)
+ ChangeLog:
+ updated ChangeLog
+
+ ChangeLog@1.1735 +3 -1
+ updated ChangeLog
+
+ChangeSet@1.3529.3.1, 2015-07-29 13:18:47+05:30, loki@dadasgift.(none)
+ ntp_util
+
+ tests/ntpd/Makefile.am@1.6.2.1 +13 -10
+
+ChangeSet@1.3545, 2015-07-28 09:37:25+00:00, stenn@psp-at1.ntp.org
+ update tests/libntp/run-socktoa.c
+
+ tests/libntp/run-socktoa.c@1.8.1.1 +6 -6
+ update tests/libntp/run-socktoa.c
+
+ChangeSet@1.3544, 2015-07-28 09:36:24+00:00, stenn@psp-at1.ntp.org
+ Typo fix for GCC warning suppression. Harlan Stenn.
+
+ ChangeLog@1.1734 +1 -0
+ Typo fix for GCC warning suppression. Harlan Stenn.
+
+ ntpd/ntp_config.c@1.333 +5 -5
+ Typo fix for GCC warning suppression. Harlan Stenn.
+
+ ntpd/ntp_proto.c@1.364 +1 -1
+ Typo fix for GCC warning suppression. Harlan Stenn.
+
+ChangeSet@1.3529.1.18, 2015-07-27 19:46:25+02:00, viperus@ubuntu.(none)
+ Many files:
+ update
+
+ run-leapsec.c:
+ minor change
+ run-ntp_scanner.c, run-decodenetnum.c:
+ update
+ ntp_scanner.c:
+ Added more tests
+ lfptest.h:
+ minor move after merge with lokesh
+ Makefile.am:
+ Merge
+
+ tests/libntp/lfptest.h@1.5.1.2 +0 -16
+ minor move after merge with lokesh
+
+ tests/libntp/run-decodenetnum.c@1.7 +1 -0
+ update
+
+ tests/libntp/run-lfptostr.c@1.6 +11 -11
+ update
+
+
+ tests/libntp/run-netof.c@1.6 +0 -1
+ update
+
+
+ tests/libntp/run-socktoa.c@1.9 +6 -6
+ update
+
+
+ tests/ntpd/Makefile.am@1.6.1.4 +8 -3
+ Merge
+
+ tests/ntpd/ntp_scanner.c@1.2 +30 -2
+ Added more tests
+
+ tests/ntpd/run-leapsec.c@1.4 +9 -3
+ minor change
+
+ tests/ntpd/run-ntp_scanner.c@1.2 +7 -1
+ update
+
+ tests/ntpd/run-ntp_signd.c@1.3 +2 -2
+ update
+
+
+ tests/ntpd/run-rc_cmdlength.c@1.2 +8 -3
+ update
+
+
+ChangeSet@1.3543, 2015-07-27 04:11:08+00:00, stenn@psp-at1.ntp.org
+ [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn
+
+ ChangeLog@1.1733 +1 -0
+ [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn
+
+ ntpd/ntp.conf.def@1.19 +1 -1
+ [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn
+
+ ntpd/ntpd-opts.def@1.13 +5 -1
+ [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn
+
+ChangeSet@1.3542, 2015-07-27 03:16:04+00:00, stenn@psp-at1.ntp.org
+ [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn.
+
+ ChangeLog@1.1732 +1 -0
+ [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn.
+
+ ntpd/refclock_local.c@1.21 +2 -16
+ [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn.
+
+ChangeSet@1.3540, 2015-07-27 00:07:00+00:00, tflendrich@psp-at1.ntp.org
+ ChangeLog:
+ updated with info about progname and ntp_restrict.c
+
+ ChangeLog@1.1730 +4 -0
+ updated with info about progname and ntp_restrict.c
+
+ChangeSet@1.3529.2.1, 2015-07-26 22:04:07+00:00, stenn@psp-at1.ntp.org
+ [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn.
+
+ ChangeLog@1.1725.1.8 +1 -0
+ [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn.
+
+ sntp/m4/ntp_rlimit.m4@1.2 +5 -1
+ [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn.
+
+ChangeSet@1.3529.1.17, 2015-07-26 21:48:29+02:00, viperus@ubuntu.(none)
+ run-ntp_scanner.c, ntp_scanner.c:
+ new file
+
+ tests/ntpd/ntp_scanner.c@1.1 +29 -0
+ BitKeeper file /home/viperus/Desktop/ntp-stable-unity/tests/ntpd/ntp_scanner.c
+
+ tests/ntpd/ntp_scanner.c@1.0 +0 -0
+
+ tests/ntpd/run-ntp_scanner.c@1.1 +55 -0
+ BitKeeper file /home/viperus/Desktop/ntp-stable-unity/tests/ntpd/run-ntp_scanner.c
+
+ tests/ntpd/run-ntp_scanner.c@1.0 +0 -0
+
+ChangeSet@1.3529.1.16, 2015-07-26 21:34:45+02:00, viperus@ubuntu.(none)
+
+ tests/ntpd/Makefile.am@1.6.1.3 +20 -1
+
+ tests/ntpd/ntp_signd.c@1.2 +3 -1
+
+ tests/ntpd/run-ntp_signd.c@1.2 +9 -3
+
+ChangeSet@1.3529.1.14, 2015-07-26 07:23:22+00:00, stenn@psp-at1.ntp.org
+ update tests/sec-2853/run-sec-2853.
+
+ tests/sec-2853/run-sec-2853.c@1.3.1.1 +4 -5
+ update
+
+ChangeSet@1.3529.1.13, 2015-07-26 07:14:53+00:00, stenn@psp-at1.ntp.org
+ Add std_unity_tests to various Makefile.am files. Harlan Stenn.
+
+ ChangeLog@1.1725.1.7 +1 -0
+ Add std_unity_tests to various Makefile.am files. Harlan Stenn.
+
+ sntp/tests/Makefile.am@1.62 +4 -0
+ Add std_unity_tests to various Makefile.am files. Harlan Stenn.
+
+ tests/libntp/Makefile.am@1.85.1.4 +4 -0
+ Add std_unity_tests to various Makefile.am files. Harlan Stenn.
+
+ tests/ntpd/Makefile.am@1.4.1.1 +4 -0
+ Add std_unity_tests to various Makefile.am files. Harlan Stenn.
+
+ tests/sandbox/Makefile.am@1.6 +4 -0
+ Add std_unity_tests to various Makefile.am files. Harlan Stenn.
+
+ChangeSet@1.3529.1.12, 2015-07-26 06:43:54+00:00, stenn@psp-at1.ntp.org
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ NEWS@1.145 +10 -0
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ChangeSet@1.3529.1.11, 2015-07-26 06:37:30+00:00, stenn@psp-at1.ntp.org
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ChangeLog@1.1725.1.6 +1 -0
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ html/decode.html@1.26 +2 -2
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ html/stats.html@1.4 +24 -24
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ include/ntp_control.h@1.59 +1 -1
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ libntp/statestr.c@1.28 +1 -1
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpd/invoke-ntp.conf.texi@1.189 +2 -2
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpd/ntp.conf.5man@1.223 +4 -4
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpd/ntp.conf.5mdoc@1.223 +3 -3
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpd/ntp.conf.def@1.18 +1 -1
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpd/ntp.conf.html@1.178 +1522 -1191
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpd/ntp.conf.man.in@1.223 +4 -4
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpd/ntp.conf.mdoc.in@1.223 +3 -3
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpd/ntp_loopfilter.c@1.185 +4 -4
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpd/ntp_proto.c@1.363 +1 -1
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpq/libntpq.h@1.10 +1 -1
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ ntpq/ntpq-subs.c@1.111 +1 -1
+ [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+
+ChangeSet@1.3537, 2015-07-25 18:08:16+02:00, tomek@tomek-n56vz.(none)
+ Changed "char * progname;" variable to be "char const * progname;", so now it is consistent
+ Many files:
+ changed a variable to be const
+ autogenerated
+
+ adjtimed/adjtimed.c@1.5 +1 -1
+ changed a variable to be const
+
+ clockstuff/chutest.c@1.7 +1 -1
+ changed a variable to be const
+
+ clockstuff/propdelay.c@1.8 +1 -1
+ changed a variable to be const
+
+ libntp/msyslog.c@1.51 +3 -3
+ changed a variable to be const
+
+ libntp/ntp_lineedit.c@1.13 +1 -1
+ changed a variable to be const
+
+ ntpdate/ntpdate.c@1.94 +1 -1
+ changed a variable to be const
+
+ ntpdc/ntpdc.c@1.104 +1 -1
+ changed a variable to be const
+
+ ntpq/ntpq.c@1.160 +1 -1
+ changed a variable to be const
+
+ sntp/log.c@1.23 +1 -1
+ changed a variable to be const
+
+ sntp/log.h@1.12 +1 -1
+ changed a variable to be const
+
+ sntp/tests/run-crypto.c@1.6 +1 -1
+ autogenerated
+
+ sntp/tests/run-keyFile.c@1.9 +1 -1
+ autogenerated
+
+ sntp/tests/run-kodDatabase.c@1.7 +1 -1
+ autogenerated
+
+ sntp/tests/run-kodFile.c@1.7 +1 -1
+ autogenerated
+
+ sntp/tests/run-networking.c@1.3 +1 -1
+ autogenerated
+
+ sntp/tests/run-packetHandling.c@1.6 +1 -1
+ autogenerated
+
+ sntp/tests/run-packetProcessing.c@1.7 +1 -1
+ autogenerated
+
+ sntp/tests/run-utilities.c@1.6 +1 -1
+ autogenerated
+
+ tests/ntpd/run-ntp_restrict.c@1.4 +1 -1
+ autogenerated
+
+ tests/sandbox/run-modetoa.c@1.3 +7 -4
+ autogenerated
+
+ tests/sandbox/run-uglydate.c@1.3 +9 -4
+ autogenerated
+
+ tests/sandbox/run-ut-2803.c@1.2 +7 -4
+ autogenerated
+
+ util/ntp-keygen.c@1.106 +1 -1
+ changed a variable to be const
+
+ util/ntptime.c@1.27 +1 -1
+ changed a variable to be const
+
+ChangeSet@1.3529.1.10, 2015-07-25 16:54:29+02:00, viperus@ubuntu.(none)
+ Many files:
+ added declarations
+
+ lfpfunc.c:
+ adding declarations, reorganizing
+ Many files:
+ adding declarations
+
+ update
+
+ run-clocktime.c:
+ update
+ clocktime.c:
+ adding declarations
+ socktoa.c:
+ added declarations
+
+ tests/libntp/clocktime.c@1.7 +1 -0
+ adding declarations
+
+ tests/libntp/lfpfunc.c@1.13 +28 -7
+ adding declarations, reorganizing
+
+ tests/libntp/netof.c@1.3.1.1 +8 -0
+ adding declarations
+
+
+ tests/libntp/numtoa.c@1.6 +2 -0
+ adding declarations
+
+
+ tests/libntp/numtohost.c@1.5 +2 -0
+ adding declarations
+
+
+ tests/libntp/octtoint.c@1.3.1.1 +10 -0
+ adding declarations
+
+
+ tests/libntp/prettydate.c@1.3 +3 -0
+ adding declarations
+
+
+ tests/libntp/recvbuff.c@1.5 +4 -0
+ adding declarations
+
+
+ tests/libntp/refidsmear.c@1.5 +6 -3
+ adding declarations
+
+
+ tests/libntp/refnumtoa.c@1.5 +4 -0
+ adding declarations
+
+
+ tests/libntp/run-clocktime.c@1.9 +1 -1
+ update
+
+ tests/libntp/run-lfpfunc.c@1.16 +9 -9
+ update
+
+
+ tests/libntp/run-netof.c@1.5 +4 -4
+ update
+
+
+ tests/libntp/run-numtoa.c@1.9 +2 -2
+ update
+
+
+ tests/libntp/run-numtohost.c@1.9 +1 -1
+ update
+
+
+ tests/libntp/run-octtoint.c@1.6 +7 -7
+ update
+
+
+ tests/libntp/run-prettydate.c@1.4 +1 -1
+ update
+
+
+ tests/libntp/run-recvbuff.c@1.4 +3 -3
+ update
+
+
+ tests/libntp/run-refidsmear.c@1.5 +1 -1
+ update
+
+
+ tests/libntp/run-refnumtoa.c@1.7 +2 -2
+ update
+
+
+ tests/libntp/run-sfptostr.c@1.4 +7 -7
+ update
+
+
+ tests/libntp/run-socktoa.c@1.8 +6 -6
+ update
+
+
+ tests/libntp/run-ssl_init.c@1.8 +5 -5
+ update
+
+
+ tests/libntp/run-statestr.c@1.9 +4 -4
+ update
+
+
+ tests/libntp/run-strtolfp.c@1.4 +6 -6
+ update
+
+
+ tests/libntp/run-timespecops.c@1.9 +28 -28
+ update
+
+
+ tests/libntp/run-timevalops.c@1.11 +28 -28
+ update
+
+
+ tests/libntp/run-tstotv.c@1.4 +3 -3
+ update
+
+
+ tests/libntp/run-tvtots.c@1.5 +3 -3
+ update
+
+
+ tests/libntp/run-vi64ops.c@1.7 +3 -3
+ update
+
+
+ tests/libntp/run-ymd2yd.c@1.10 +4 -4
+ update
+
+
+ tests/libntp/sfptostr.c@1.3 +10 -0
+ update
+
+
+ tests/libntp/sockaddrtest.c@1.2 +1 -0
+ update
+
+
+ tests/libntp/socktoa.c@1.3.1.1 +6 -0
+ added declarations
+
+ tests/libntp/ssl_init.c@1.8 +6 -0
+ added declarations
+
+
+ tests/libntp/statestr.c@1.5 +4 -0
+ added declarations
+
+
+ tests/libntp/strtolfp.c@1.2.1.1 +9 -0
+ added declarations
+
+
+ tests/libntp/timespecops.c@1.8 +40 -1
+ added declarations
+
+
+ tests/libntp/timevalops.c@1.11 +37 -1
+ added declarations
+
+
+ tests/libntp/tstotv.c@1.3 +5 -0
+ added declarations
+
+
+ tests/libntp/tvtots.c@1.5 +3 -0
+ added declarations
+
+
+ tests/libntp/vi64ops.c@1.6 +6 -0
+ added declarations
+
+
+ tests/libntp/ymd2yd.c@1.6 +5 -0
+ added declarations
+
+
+ChangeSet@1.3536, 2015-07-25 02:08:32+02:00, tomek@tomek-n56vz.(none)
+ run-ntp_restrict.c:
+ autogenerated, but modified manually...
+ Makefile.am:
+ removed something not longer in use
+ ntp_restrict.c:
+ added another test
+ run-ntp_restrict.c, run-ntp_prio_q.c, run-sec-2853.c, run-bug-2803.c:
+ autogenerated
+
+ tests/bug-2803/run-bug-2803.c@1.8 +8 -4
+ autogenerated
+
+ tests/ntpd/Makefile.am@1.9 +0 -3
+ removed something not longer in use
+
+ tests/ntpd/ntp_restrict.c@1.2 +17 -4
+ added another test
+
+ tests/ntpd/run-ntp_prio_q.c@1.2 +9 -4
+ autogenerated
+
+ tests/ntpd/run-ntp_restrict.c@1.3 +1 -1
+ autogenerated, but modified manually...
+
+ tests/ntpd/run-ntp_restrict.c@1.2 +8 -4
+ autogenerated
+
+ tests/sec-2853/run-sec-2853.c@1.4 +5 -6
+ autogenerated
+
+ChangeSet@1.3529.1.9, 2015-07-24 18:38:05+02:00, viperus@ubuntu.(none)
+ calendar.c:
+ added function declarations + minor comment fixes
+
+ Many files:
+ added declarations
+
+ updated
+
+ run-buftvtots.c, run-calendar.c:
+ update
+ lfptest.c:
+ added #include
+ buftvtots.c:
+ added function declarations
+ caljulian.c:
+ added declarations
+ run-caljulian.c:
+ updated
+
+ tests/libntp/buftvtots.c@1.4 +4 -0
+ added function declarations
+
+ tests/libntp/calendar.c@1.6 +42 -18
+ added function declarations + minor comment fixes
+
+
+ tests/libntp/caljulian.c@1.9 +10 -0
+ added declarations
+
+ tests/libntp/caltontp.c@1.3 +5 -0
+ added declarations
+
+
+ tests/libntp/calyearstart.c@1.4 +5 -0
+ added declarations
+
+
+ tests/libntp/clocktime.c@1.6 +11 -0
+ added declarations
+
+
+ tests/libntp/decodenetnum.c@1.3.1.1 +7 -0
+ added declarations
+
+
+ tests/libntp/hextoint.c@1.4 +6 -0
+ added declarations
+
+
+ tests/libntp/hextolfp.c@1.5.1.1 +7 -0
+ added declarations
+
+
+ tests/libntp/humandate.c@1.5 +4 -0
+ added declarations
+
+
+ tests/libntp/lfpfunc.c@1.12 +13 -0
+ added declarations
+
+
+ tests/libntp/lfptest.c@1.2 +1 -0
+ added #include
+
+ tests/libntp/lfptostr.c@1.3.1.1 +15 -0
+ added declarations
+
+
+ tests/libntp/modetoa.c@1.7 +3 -0
+ added declarations
+
+
+ tests/libntp/msyslog.c@1.6 +10 -0
+ added declarations
+
+
+ tests/libntp/run-buftvtots.c@1.5 +10 -10
+ update
+
+ tests/libntp/run-calendar.c@1.8 +11 -11
+ update
+
+ tests/libntp/run-caljulian.c@1.12 +4 -4
+ updated
+
+ tests/libntp/run-caltontp.c@1.4 +4 -4
+ updated
+
+
+ tests/libntp/run-calyearstart.c@1.6 +3 -3
+ updated
+
+
+ tests/libntp/run-clocktime.c@1.8 +8 -8
+ updated
+
+
+ tests/libntp/run-decodenetnum.c@1.6 +6 -6
+ updated
+
+
+ tests/libntp/run-hextoint.c@1.8 +5 -5
+ updated
+
+
+ tests/libntp/run-hextolfp.c@1.7 +6 -6
+ updated
+
+
+ tests/libntp/run-humandate.c@1.5 +2 -2
+ updated
+
+
+ tests/libntp/run-lfpfunc.c@1.15 +9 -9
+ updated
+
+
+ tests/libntp/run-lfptostr.c@1.5 +10 -10
+ updated
+
+
+ tests/libntp/run-modetoa.c@1.10 +2 -2
+ updated
+
+
+ tests/libntp/run-msyslog.c@1.7 +8 -8
+ updated
+
+
+ChangeSet@1.3523.2.7, 2015-07-24 12:01:24+05:30, loki@dadasgift.(none)
+ ntp signd testing
+
+ tests/ntpd/ntp_signd.c@1.1 +24 -0
+ BitKeeper file /home/loki/ntp_gsoc/2_damir_code/ntp-stable-unity/tests/ntpd/ntp_signd.c
+
+ tests/ntpd/ntp_signd.c@1.0 +0 -0
+
+ChangeSet@1.3523.2.6, 2015-07-24 11:55:00+05:30, loki@dadasgift.(none)
+ ntp_signd test changes
+
+ tests/ntpd/Makefile.am@1.6.1.1 +21 -0
+
+ tests/ntpd/run-ntp_signd.c@1.1 +52 -0
+ BitKeeper file /home/loki/ntp_gsoc/2_damir_code/ntp-stable-unity/tests/ntpd/run-ntp_signd.c
+
+ tests/ntpd/run-ntp_signd.c@1.0 +0 -0
+
+ChangeSet@1.3535, 2015-07-23 19:19:08+02:00, tomek@tomek-n56vz.(none)
+ Wrote tests for ntpd/ntp_restrict.c
+ ntp_restrict.c, run-ntp_restrict.c:
+ new file
+ Makefile.am:
+ added ntp_restrict.c test
+ ntp_restrict.c:
+ added assertions (I prefer them to a segfault)
+
+ ntpd/ntp_restrict.c@1.39 +6 -0
+ added assertions (I prefer them to a segfault)
+
+ tests/ntpd/Makefile.am@1.8 +25 -0
+ added ntp_restrict.c test
+
+ tests/ntpd/ntp_restrict.c@1.1 +185 -0
+ BitKeeper file /home/tomek/ntp/ntpd_tests/ntp-stable-unity/tests/ntpd/ntp_restrict.c
+
+ tests/ntpd/ntp_restrict.c@1.0 +0 -0
+
+ tests/ntpd/run-ntp_restrict.c@1.1 +64 -0
+ BitKeeper file /home/tomek/ntp/ntpd_tests/ntp-stable-unity/tests/ntpd/run-ntp_restrict.c
+
+ tests/ntpd/run-ntp_restrict.c@1.0 +0 -0
+
+ChangeSet@1.3529.1.8, 2015-07-23 18:37:16+02:00, viperus@ubuntu.(none)
+ reduced number of warnings in sntp/tests/
+
+ sntp/tests/crypto.c@1.9 +6 -0
+ added declarations for tests
+
+ sntp/tests/fileHandlingTest.c@1.2 +1 -1
+ commented out unnecessary array
+
+ sntp/tests/keyFile.c@1.7 +4 -0
+ added declarations for tests
+
+
+ sntp/tests/kodDatabase.c@1.7 +6 -0
+ added declarations for tests
+
+
+ sntp/tests/kodFile.c@1.8 +8 -0
+ added declarations for tests
+
+
+ sntp/tests/nameresolution.c@1.2 +3 -0
+ added declarations for tests
+
+
+ sntp/tests/packetHandling.c@1.5 +13 -0
+ added declarations for tests
+
+
+ sntp/tests/packetProcessing.c@1.7 +24 -0
+ added declarations for tests
+
+
+ sntp/tests/run-crypto.c@1.5 +5 -5
+ added declarations for tests
+
+
+ sntp/tests/run-keyFile.c@1.8 +4 -4
+ updated
+
+ sntp/tests/run-kodDatabase.c@1.6 +5 -5
+ updated
+
+ sntp/tests/run-kodFile.c@1.6 +6 -6
+ updated
+
+ sntp/tests/run-packetHandling.c@1.5 +10 -10
+ updated
+
+ sntp/tests/run-packetProcessing.c@1.6 +18 -18
+ updated
+
+ sntp/tests/run-utilities.c@1.5 +7 -7
+ updated
+
+ sntp/tests/utilities.c@1.4 +12 -0
+ added declarations for tests
+
+
+ChangeSet@1.3529.1.7, 2015-07-22 20:09:39+02:00, viperus@ubuntu.(none)
+ Updated unity ruby testRunner generator with mark's latest fixes. Modified tests/libntp/Makefile.am and sntp/tests/Makefile.am accordingly. Also, split some .h files into .h and .c because they contained declarations and definitions which caused error in the newly generated test runners. Started fixing some warnings. We can add both declarations and defitions in a single test.c file without any issues now. Autogenerated tests will be run in order of the declarations in the test file.
+
+ sntp/tests/Makefile.am@1.61 +4 -0
+ New ruby generator script required some changes. Removed some definitions form header files and created their own .c files.
+
+ sntp/tests/crypto.c@1.8 +2 -0
+ started adding declarations at the top of the file
+
+ sntp/tests/fileHandlingTest.c@1.1 +74 -0
+ new file. Contains definitions from fileHandlingTest.h.in
+
+ sntp/tests/fileHandlingTest.c@1.0 +0 -0
+
+ sntp/tests/fileHandlingTest.h.in@1.14 +7 -46
+ changes stuff a bit, to work with the updated ruby generator
+
+ sntp/tests/keyFile.c@1.6 +4 -0
+ added declarations to avoid warnings
+
+ sntp/tests/run-crypto.c@1.4 +12 -9
+ updated autogenerated code
+
+ sntp/tests/run-keyFile.c@1.7 +12 -8
+ updated autogenerated code
+
+
+ sntp/tests/run-kodDatabase.c@1.5 +9 -3
+ updated autogenerated code
+
+
+ sntp/tests/run-kodFile.c@1.5 +7 -3
+ updated autogenerated code
+
+
+ sntp/tests/run-networking.c@1.2 +5 -2
+ updated autogenerated code
+
+
+ sntp/tests/run-packetHandling.c@1.4 +11 -3
+ updated autogenerated code
+
+
+ sntp/tests/run-packetProcessing.c@1.5 +6 -3
+ updated autogenerated code
+
+
+ sntp/tests/run-utilities.c@1.4 +8 -3
+ updated autogenerated code
+
+
+ sntp/tests/sntptest.c@1.1 +33 -0
+ definitions placed from .h to .c
+
+ sntp/tests/sntptest.c@1.0 +0 -0
+
+ sntp/tests/sntptest.h@1.6 +0 -29
+ added sntptest.c and put definitions in it.
+
+ sntp/unity/auto/generate_test_runner.rb@1.9 +3 -3
+ some changes were needed after mark's update to work better with NTP
+
+ sntp/unity/auto/generate_test_runner.rb@1.8 +209 -110
+ updated the ruby script with new stuff from Mark
+
+ sntp/unity/auto/parseOutput.rb@1.1 +191 -0
+ mark's new file from the update
+
+ sntp/unity/auto/parseOutput.rb@1.0 +0 -0
+
+ sntp/unity/auto/type_sanitizer.rb@1.1 +8 -0
+ mark's new file from the update
+
+
+ sntp/unity/auto/type_sanitizer.rb@1.0 +0 -0
+
+ sntp/unity/auto/unity_test_summary.py@1.1 +135 -0
+ mark's new file from the update
+
+
+ sntp/unity/auto/unity_test_summary.py@1.0 +0 -0
+
+ sntp/unity/auto/unity_test_summary.rb@1.3 +48 -25
+ added Marks new changes
+
+ tests/libntp/Makefile.am@1.85.1.3 +7 -0
+ New ruby generator script required some changes. Removed some definitions form header files and created their own .c files.
+
+
+ tests/libntp/a_md5encrypt.c@1.11 +8 -0
+ added declarations
+
+ tests/libntp/atoint.c@1.4 +9 -0
+ added declarations
+
+
+ tests/libntp/atouint.c@1.5 +8 -0
+ added declarations
+
+
+ tests/libntp/authkeys.c@1.10 +17 -6
+ added declarations
+
+
+ tests/libntp/lfptest.c@1.1 +10 -0
+ new file, contains definitions from lfptest.h
+
+ tests/libntp/lfptest.c@1.0 +0 -0
+
+ tests/libntp/lfptest.h@1.4.1.3 +2 -8
+ split to .h and .c which now contains definitions
+
+ tests/libntp/run-a_md5encrypt.c@1.13 +9 -7
+ autogenerated file update
+
+ tests/libntp/run-atoint.c@1.7 +10 -7
+ autogenerated file update
+
+
+ tests/libntp/run-atouint.c@1.8 +10 -7
+ autogenerated file update
+
+
+ tests/libntp/run-authkeys.c@1.10 +12 -9
+ autogenerated file update
+
+
+ tests/libntp/run-buftvtots.c@1.4 +8 -3
+ autogenerated file update
+
+
+ tests/libntp/run-calendar.c@1.7 +6 -3
+ autogenerated file update
+
+
+ tests/libntp/run-caljulian.c@1.11 +7 -3
+ autogenerated file update
+
+
+ tests/libntp/run-caltontp.c@1.3 +4 -3
+ autogenerated file update
+
+
+ tests/libntp/run-calyearstart.c@1.5 +6 -3
+ autogenerated file update
+
+
+ tests/libntp/run-clocktime.c@1.7 +6 -3
+ autogenerated file update
+
+
+ tests/libntp/run-decodenetnum.c@1.5 +5 -3
+ autogenerated file update
+
+
+ tests/libntp/run-hextoint.c@1.7 +6 -2
+ autogenerated file update
+
+
+ tests/libntp/run-hextolfp.c@1.6 +6 -3
+ autogenerated file update
+
+
+ tests/libntp/run-humandate.c@1.4 +5 -3
+ autogenerated file update
+
+
+ tests/libntp/run-lfpfunc.c@1.14 +7 -3
+ autogenerated file update
+
+
+ tests/libntp/run-lfptostr.c@1.4 +5 -3
+ autogenerated file update
+
+
+ tests/libntp/run-modetoa.c@1.9 +4 -3
+ autogenerated file update
+
+
+ tests/libntp/run-msyslog.c@1.6 +4 -3
+ autogenerated file update
+
+
+ tests/libntp/run-netof.c@1.4 +6 -3
+ autogenerated file update
+
+
+ tests/libntp/run-numtoa.c@1.8 +5 -3
+ autogenerated file update
+
+
+ tests/libntp/run-numtohost.c@1.8 +5 -3
+ autogenerated file update
+
+
+ tests/libntp/run-octtoint.c@1.5 +4 -2
+ autogenerated file update
+
+
+ tests/libntp/run-prettydate.c@1.3 +6 -2
+ autogenerated file update
+
+
+ tests/libntp/run-recvbuff.c@1.3 +4 -2
+ autogenerated file update
+
+
+ tests/libntp/run-refidsmear.c@1.4 +7 -3
+ autogenerated file update
+
+
+ tests/libntp/run-refnumtoa.c@1.6 +5 -3
+ autogenerated file update
+
+
+ tests/libntp/run-sfptostr.c@1.3 +4 -3
+ autogenerated file update
+
+
+ tests/libntp/run-socktoa.c@1.7 +6 -2
+ autogenerated file update
+
+
+ tests/libntp/run-ssl_init.c@1.7 +4 -3
+ autogenerated file update
+
+
+ tests/libntp/run-statestr.c@1.8 +6 -3
+ autogenerated file update
+
+
+ tests/libntp/run-strtolfp.c@1.3 +6 -2
+ autogenerated file update
+
+
+ tests/libntp/run-timespecops.c@1.8 +8 -3
+ autogenerated file update
+
+
+ tests/libntp/run-timevalops.c@1.10 +7 -3
+ autogenerated file update
+
+
+ tests/libntp/run-tstotv.c@1.3 +5 -2
+ autogenerated file update
+
+
+ tests/libntp/run-tvtots.c@1.4 +6 -3
+ autogenerated file update
+
+
+ tests/libntp/run-uglydate.c@1.9 +6 -4
+ autogenerated file update
+
+
+ tests/libntp/run-vi64ops.c@1.6 +5 -3
+ autogenerated file update
+
+
+ tests/libntp/run-ymd2yd.c@1.9 +4 -3
+ autogenerated file update
+
+
+ tests/libntp/sockaddrtest.c@1.1 +50 -0
+ New file created by splitting sockaddrtest.h.
+
+ tests/libntp/sockaddrtest.c@1.0 +0 -0
+
+ tests/libntp/sockaddrtest.h@1.6 +4 -45
+ removed definitions and placed them in sockaddrtest.c
+
+ tests/libntp/uglydate.c@1.7 +1 -0
+ added some declarations to test the new generator. Unfinished
+
+ChangeSet@1.3523.3.18, 2015-07-21 06:47:23+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar.
+
+ ChangeLog@1.1708.1.19 +1 -0
+ [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar.
+
+ ntpd/ntp_parser.c@1.98 +1141 -1381
+ [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar.
+
+ ntpd/ntp_parser.h@1.63 +216 -230
+ [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar.
+
+ ntpd/ntp_parser.y@1.88 +1 -1
+ [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar.
+
+ChangeSet@1.3523.3.17, 2015-07-20 07:32:09+00:00, stenn@psp-at1.ntp.org
+ ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn.
+
+ ChangeLog@1.1708.1.18 +1 -0
+ ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn.
+
+ ntpd/ntp_peer.c@1.158 +2 -0
+ ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn.
+
+ChangeSet@1.3523.3.16, 2015-07-20 07:20:04+00:00, stenn@psp-at1.ntp.org
+ [Bug 2849] Systems with more than one default route may never synchronize. Brian Utterback.
+
+ ChangeLog@1.1708.1.17 +3 -0
+ [Bug 2849] Systems with more than one default route may never synchronize. Brian Utterback.
+
+ ntpd/ntp_peer.c@1.157 +7 -3
+ [Bug 2849] Systems with more than one default route may never synchronize. Brian Utterback.
+
+ChangeSet@1.3523.3.15, 2015-07-20 06:38:37+00:00, stenn@psp-at1.ntp.org
+ util/ntptime.c: initialization nit. Harlan Stenn.
+
+ ChangeLog@1.1708.1.16 +1 -0
+ util/ntptime.c: initialization nit. Harlan Stenn.
+
+ util/ntptime.c@1.26 +1 -1
+ util/ntptime.c: initialization nit. Harlan Stenn.
+
+ChangeSet@1.3523.3.14, 2015-07-19 21:49:06-04:00, stenn@deacon.udel.edu
+ Typo
+
+ ChangeLog@1.1708.1.15 +1 -1
+ Typo
+
+ChangeSet@1.3523.3.13, 2015-07-19 21:46:59-04:00, stenn@deacon.udel.edu
+ libntp/icom.c: Typos fix. Harlan Stenn.
+
+ ChangeLog@1.1708.1.14 +1 -0
+ libntp/icom.c: Typos fix. Harlan Stenn.
+
+ libntp/icom.c@1.20 +1 -1
+ libntp/icom.c: Typos fix. Harlan Stenn.
+
+ChangeSet@1.3523.3.12, 2015-07-19 05:37:40+00:00, stenn@psp-at1.ntp.org
+ Code cleanup. Harlan Stenn.
+
+ ChangeLog@1.1708.1.13 +1 -0
+ Code cleanup. Harlan Stenn.
+
+ include/Makefile.am@1.52 +1 -0
+ Code cleanup. Harlan Stenn.
+
+ include/rc_cmdlength.h@1.1 +2 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable/include/rc_cmdlength.h
+
+ include/rc_cmdlength.h@1.0 +0 -0
+
+ libntp/audio.c@1.36 +8 -5
+ Code cleanup. Harlan Stenn.
+
+ libntp/icom.c@1.19 +23 -7
+ Code cleanup. Harlan Stenn.
+
+ libntp/ntp_worker.c@1.5 +1 -1
+ Code cleanup. Harlan Stenn.
+
+ ntpd/ntp_config.c@1.332 +10 -0
+ Code cleanup. Harlan Stenn.
+
+ ntpd/ntp_control.c@1.203 +1 -2
+ Code cleanup. Harlan Stenn.
+
+ ntpd/ntp_crypto.c@1.181 +1 -1
+ Code cleanup. Harlan Stenn.
+
+ ntpd/ntp_monitor.c@1.44 +4 -0
+ Code cleanup. Harlan Stenn.
+
+ ntpd/ntp_peer.c@1.156 +1 -0
+ Code cleanup. Harlan Stenn.
+
+ ntpd/ntp_proto.c@1.362 +3 -1
+ Code cleanup. Harlan Stenn.
+
+ ntpd/ntp_restrict.c@1.38 +4 -0
+ Code cleanup. Harlan Stenn.
+
+ ntpd/rc_cmdlength.c@1.2 +1 -0
+ Code cleanup. Harlan Stenn.
+
+ ntpd/refclock_arc.c@1.33 +1 -1
+ Code cleanup. Harlan Stenn.
+
+ ntpd/refclock_chu.c@1.57 +1 -1
+ Code cleanup. Harlan Stenn.
+
+ ntpd/refclock_nmea.c@1.78 +4 -3
+ Code cleanup. Harlan Stenn.
+
+ ntpd/refclock_parse.c@1.81 +3 -0
+ Code cleanup. Harlan Stenn.
+
+ ntpd/refclock_wwv.c@1.80 +4 -2
+ Code cleanup. Harlan Stenn.
+
+ ntpq/ntpq.c@1.159 +0 -1
+ Code cleanup. Harlan Stenn.
+
+ sntp/networking.c@1.66 +1 -1
+ Code cleanup. Harlan Stenn.
+
+ tests/sec-2853/run-sec-2853.c@1.3 +2 -2
+ Code cleanup. Harlan Stenn.
+
+ tests/sec-2853/sec-2853.c@1.5 +2 -2
+ Code cleanup. Harlan Stenn.
+
+ util/ntp-keygen.c@1.105 +2 -2
+ Code cleanup. Harlan Stenn.
+
+ChangeSet@1.3523.3.11, 2015-07-16 07:37:32+00:00, stenn@psp-at1.ntp.org
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ChangeLog@1.1708.1.12 +1 -0
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ include/ntp_assert.h@1.9 +0 -4
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ include/ntp_lists.h@1.15 +3 -3
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/atolfp.c@1.6 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/caljulian.c@1.16 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/caltontp.c@1.7 +8 -8
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/decodenetnum.c@1.17 +3 -3
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/msyslog.c@1.50 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/ntp_intres.c@1.99 +12 -12
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/ntp_rfc2553.c@1.48 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/prettydate.c@1.20 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/recvbuff.c@1.40 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/socket.c@1.10 +2 -2
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ libntp/socktohost.c@1.15 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpd/ntp_config.c@1.331 +7 -8
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpd/ntp_control.c@1.202 +18 -18
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpd/ntp_crypto.c@1.180 +14 -14
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpd/ntp_io.c@1.404 +15 -15
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpd/ntp_monitor.c@1.43 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpd/ntp_peer.c@1.155 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpd/ntp_refclock.c@1.120 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpd/ntp_restrict.c@1.37 +9 -9
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpdc/ntpdc.c@1.103 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ntpq/ntpq-subs.c@1.110 +7 -7
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ports/winnt/libntp/termios.c@1.31 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.66 +1 -1
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.71 +7 -8
+ Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+
+ChangeSet@1.3523.3.10, 2015-07-13 04:28:29+00:00, stenn@psp-at1.ntp.org
+ [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn.
+
+ ChangeLog@1.1708.1.11 +1 -0
+ [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn.
+
+ scripts/ntpsweep/ntpsweep.in@1.9 +2 -1
+ [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn.
+
+ChangeSet@1.3523.3.9, 2015-07-13 04:18:36+00:00, stenn@psp-at1.ntp.org
+ scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn.
+
+ ChangeLog@1.1708.1.10 +1 -0
+ scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn.
+
+ scripts/lib/NTP/Util.pm@1.5 +8 -1
+ scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn.
+
+ChangeSet@1.3531, 2015-07-13 04:21:50+02:00, tomek@tomek-n56vz.(none)
+ wrote tests for ntpd/ntp_prio_q.c
+
+ Makefile.am:
+ added ntp_prio_q.c
+ ntp_prio_q.c, run-ntp_prio_q.c:
+ new file
+ ChangeLog:
+ added info about the test of ntpd/ntp_prio_q.c
+
+ ChangeLog@1.1726 +1 -0
+ added info about the test of ntpd/ntp_prio_q.c
+
+ tests/ntpd/Makefile.am@1.7 +28 -0
+ added ntp_prio_q.c
+
+ tests/ntpd/ntp_prio_q.c@1.1 +261 -0
+ BitKeeper file /home/tomek/ntp/ntpd_tests/ntp-stable-unity/tests/ntpd/ntp_prio_q.c
+
+ tests/ntpd/ntp_prio_q.c@1.0 +0 -0
+
+ tests/ntpd/run-ntp_prio_q.c@1.1 +64 -0
+ BitKeeper file /home/tomek/ntp/ntpd_tests/ntp-stable-unity/tests/ntpd/run-ntp_prio_q.c
+
+ tests/ntpd/run-ntp_prio_q.c@1.0 +0 -0
+
+ChangeSet@1.3523.2.5, 2015-07-12 22:59:46+05:30, loki@dadasgift.(none)
+ rc_cmdlength test
+
+ tests/ntpd/rc_cmdlength.c@1.2 +20 -4
+
+ tests/ntpd/run-rc_cmdlength.c@1.1 +52 -0
+ BitKeeper file /home/loki/ntp_gsoc/2_damir_code/ntp-stable-unity/tests/ntpd/run-rc_cmdlength.c
+
+ tests/ntpd/run-rc_cmdlength.c@1.0 +0 -0
+
+ChangeSet@1.3523.3.8, 2015-07-11 19:20:33-04:00, stenn@deacon.udel.edu
+ br-flock: --enable-local-libevent. Harlan Stenn.
+
+ ChangeLog@1.1708.1.9 +1 -0
+ br-flock: --enable-local-libevent. Harlan Stenn.
+
+ br-flock@1.17 +1 -1
+ br-flock: --enable-local-libevent. Harlan Stenn.
+
+ChangeSet@1.3523.3.7, 2015-07-11 18:46:20-04:00, stenn@deacon.udel.edu
+ [Bug 2875] libevent is improperly bundled in the tarball
+
+ Makefile.am@1.133 +1 -1
+ [Bug 2875] libevent is improperly bundled in the tarball
+
+ChangeSet@1.3523.4.1, 2015-07-11 20:28:26+00:00, stenn@psp-at1.ntp.org
+ [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must be configured for the distribution targets. Harlan Stenn.
+
+ ChangeLog@1.1708.2.1 +2 -0
+ [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must be configured for the distribution targets. Harlan Stenn.
+
+ sntp/Makefile.am@1.86 +13 -24
+ [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must be configured for the distribution targets. Harlan Stenn.
+
+ChangeSet@1.3523.2.4, 2015-07-11 00:19:36+05:30, loki@dadasgift.(none)
+ rc_cmdlength testing
+
+ tests/ntpd/Makefile.am@1.6 +20 -0
+
+ tests/ntpd/rc_cmdlength.c@1.1 +22 -0
+ BitKeeper file /home/loki/ntp_gsoc/2_damir_code/ntp-stable-unity/tests/ntpd/rc_cmdlength.c
+
+ tests/ntpd/rc_cmdlength.c@1.0 +0 -0
+
+ChangeSet@1.3523.3.5, 2015-07-09 09:03:46+00:00, stenn@psp-at1.ntp.org
+ tests/libntp/test_caltontp needs -lpthread. Harlan Stenn.
+
+ ChangeLog@1.1708.1.7 +1 -0
+ tests/libntp/test_caltontp needs -lpthread. Harlan Stenn.
+
+ tests/libntp/Makefile.am@1.85.1.2 +5 -0
+ tests/libntp/test_caltontp needs -lpthread. Harlan Stenn.
+
+ChangeSet@1.3523.3.4, 2015-07-09 03:42:45-04:00, stenn@deacon.udel.edu
+ Don't build sntp/libevent/sample/. Harlan Stenn.
+
+ ChangeLog@1.1708.1.6 +1 -0
+ Don't build sntp/libevent/sample/. Harlan Stenn.
+
+ sntp/libevent/Makefile.am@1.14 +1 -1
+ Don't build sntp/libevent/sample/. Harlan Stenn.
+
+ChangeSet@1.3523.3.3, 2015-07-09 06:06:50+00:00, stenn@psp-at1.ntp.org
+ Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn.
+
+ ChangeLog@1.1708.1.5 +1 -0
+ Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn.
+
+ tests/libntp/Makefile.am@1.85.1.1 +113 -408
+ Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn.
+
+ChangeSet@1.3527, 2015-07-09 04:25:01+02:00, tomek@tomek-n56vz.(none)
+ lfptest.h:
+ now it uses NTP's conventions
+ ChangeLog:
+ add info about lfptest.h
+ test-libntp.c:
+ fixed formatting
+ sockaddrtest.h:
+ formatting fix
+ kodDatabase.c:
+ formatting, adding const, adding a missing library
+ ChangeLog:
+ added info about timespecops.c
+ kodFile.c:
+ formatting, changes to usage of unity macros to get better print messages, cleanup
+ crypto.c, lfptest.h:
+ cleanup
+ ChangeLog:
+ add info about test-libntp.c
+ timespecops.c:
+ further formatting changes
+ ChangeLog:
+ added info about timevalops.c
+ fileHandlingTest.h.in:
+ fixed buffer overflow problem and fixed one function that previously did nothing
+ timevalops.c:
+ fixed the order of includes, deleted unnecessary
+ packetProcessing.c:
+ formatting, sprintf->snprintf
+ packetHandling.c:
+ formatting, using better unity functions, using proper unity functions, deleting unused variable
+ keyFile.c:
+ formatting, using proper unity's macros
+ ChangeLog:
+ fileHandlingTest.h info
+ updating with info about sockaddrtest.h
+ timespecops.c:
+ forgot to delete one comment
+ ChangeLog:
+ added info about my code review changes in sntp/tests/
+ kodDatabase.c:
+ missed something in formatting
+ sntptest.h:
+ formatting
+ Many files:
+ autogenerated
+ kodDatabase.c:
+ added a header. now it's windows compliant too!
+ fileHandlingTest.h.in:
+ formatting, deleted unnecessary prints
+ timespecops.c:
+ fixed formatting, fixed the order of includes,
+ removed unnecessary comments, cleanup
+ utilities.c:
+ the order of includes, formatting, removing unnecessary comments, using proper unity assertions
+
+ ChangeLog@1.1723 +2 -1
+ fileHandlingTest.h info
+
+ ChangeLog@1.1722 +17 -0
+ added info about my code review changes in sntp/tests/
+
+ ChangeLog@1.1721 +1 -0
+ add info about test-libntp.c
+
+ ChangeLog@1.1720 +2 -0
+ updating with info about sockaddrtest.h
+
+ ChangeLog@1.1719 +1 -0
+ add info about lfptest.h
+
+ ChangeLog@1.1718 +2 -0
+ added info about timevalops.c
+
+ ChangeLog@1.1717 +3 -1
+ added info about timespecops.c
+
+ sntp/tests/crypto.c@1.7 +14 -8
+ cleanup
+
+ sntp/tests/fileHandlingTest.h.in@1.13 +6 -6
+ fixed buffer overflow problem and fixed one function that previously did nothing
+
+ sntp/tests/fileHandlingTest.h.in@1.12 +13 -39
+ formatting, deleted unnecessary prints
+
+ sntp/tests/keyFile.c@1.5 +33 -24
+ formatting, using proper unity's macros
+
+ sntp/tests/kodDatabase.c@1.6 +1 -1
+ added a header. now it's windows compliant too!
+
+ sntp/tests/kodDatabase.c@1.5 +1 -2
+ missed something in formatting
+
+ sntp/tests/kodDatabase.c@1.4 +39 -31
+ formatting, adding const, adding a missing library
+
+ sntp/tests/kodFile.c@1.7 +34 -32
+ formatting, changes to usage of unity macros to get better print messages, cleanup
+
+ sntp/tests/packetHandling.c@1.4 +46 -31
+ formatting, using better unity functions, using proper unity functions, deleting unused variable
+
+ sntp/tests/packetProcessing.c@1.6 +67 -25
+ formatting, sprintf->snprintf
+
+ sntp/tests/run-crypto.c@1.3 +6 -6
+ autogenerated
+
+ sntp/tests/run-keyFile.c@1.6 +5 -5
+ autogenerated
+
+ sntp/tests/run-kodDatabase.c@1.4 +5 -5
+ autogenerated
+
+ sntp/tests/run-kodDatabase.c@1.3 +4 -4
+ autogenerated
+
+ sntp/tests/run-kodFile.c@1.4 +5 -5
+ autogenerated
+
+ sntp/tests/run-packetHandling.c@1.3 +10 -10
+ autogenerated
+
+ sntp/tests/run-packetProcessing.c@1.4 +18 -18
+ autogenerated
+
+ sntp/tests/run-utilities.c@1.3 +7 -7
+ autogenerated
+
+ sntp/tests/sntptest.h@1.5 +9 -3
+ formatting
+
+ sntp/tests/utilities.c@1.3 +38 -20
+ the order of includes, formatting, removing unnecessary comments, using proper unity assertions
+
+ tests/libntp/lfptest.h@1.4.1.2 +2 -3
+ now it uses NTP's conventions
+
+ tests/libntp/lfptest.h@1.4.1.1 +7 -16
+ cleanup
+
+ tests/libntp/run-timespecops.c@1.5.1.3 +28 -28
+ autogenerated
+
+ tests/libntp/run-timespecops.c@1.5.1.2 +28 -28
+ autogenerated
+
+ tests/libntp/run-timespecops.c@1.5.1.1 +28 -28
+ autogenerated
+
+ tests/libntp/run-timevalops.c@1.7.1.1 +28 -28
+ autogenerated
+
+ tests/libntp/sockaddrtest.h@1.5 +6 -5
+ formatting fix
+
+ tests/libntp/test-libntp.c@1.10 +6 -11
+ fixed formatting
+
+ tests/libntp/timespecops.c@1.5.1.3 +7 -6
+ further formatting changes
+
+ tests/libntp/timespecops.c@1.5.1.2 +0 -1
+ forgot to delete one comment
+
+ tests/libntp/timespecops.c@1.5.1.1 +129 -85
+ fixed formatting, fixed the order of includes,
+ removed unnecessary comments, cleanup
+
+ tests/libntp/timevalops.c@1.8.1.1 +137 -87
+ fixed the order of includes, deleted unnecessary
+
+ChangeSet@1.3523.3.2, 2015-07-07 01:27:49+00:00, stenn@psp-at1.ntp.org
+ sntp/unity/unity.c: Clean up a printf(). Harlan Stenn
+
+ ChangeLog@1.1708.1.4 +1 -0
+ sntp/unity/unity.c: Clean up a printf(). Harlan Stenn
+
+ sntp/unity/unity.c@1.3 +1 -3
+ sntp/unity/unity.c: Clean up a printf(). Harlan Stenn
+
+ChangeSet@1.3523.3.1, 2015-07-07 01:21:36+00:00, stenn@psp-at1.ntp.org
+ [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn
+
+ ChangeLog@1.1708.1.3 +1 -0
+ [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn
+
+ sntp/Makefile.am@1.85 +1 -1
+ [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn
+
+ChangeSet@1.3523.2.2, 2015-07-06 20:30:39+05:30, loki@dadasgift.(none)
+ code review changes
+
+ tests/libntp/lfptest.h@1.5 +7 -6
+
+ tests/libntp/strtolfp.c@1.3 +20 -19
+
+ChangeSet@1.3514.1.2, 2015-07-06 19:55:50+05:30, loki@dadasgift.(none)
+ Code review changes
+
+ tests/libntp/decodenetnum.c@1.2.1.1 +13 -9
+
+ tests/libntp/hextolfp.c@1.4.1.1 +0 -1
+
+ tests/libntp/lfptostr.c@1.2.1.1 +23 -12
+
+ tests/libntp/netof.c@1.4 +9 -6
+
+ tests/libntp/octtoint.c@1.4 +14 -7
+
+ tests/libntp/socktoa.c@1.4 +16 -13
+
+ChangeSet@1.3523.1.3, 2015-07-06 08:37:13+00:00, stenn@psp-at1.ntp.org
+ [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
+
+ ChangeLog@1.1708.1.2 +1 -0
+ [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
+
+ sntp/tests/Makefile.am@1.60 +0 -1
+ [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
+
+ChangeSet@1.3523.1.2, 2015-07-06 08:31:19+00:00, stenn@psp-at1.ntp.org
+ update tests/libntp/run-lfpfunc.c
+
+ tests/libntp/run-lfpfunc.c@1.13 +9 -9
+ update
+
+ChangeSet@1.3523.1.1, 2015-07-06 05:48:25+00:00, stenn@psp-at1.ntp.org
+ sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn.
+
+ ChangeLog@1.1708.1.1 +1 -0
+ sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn.
+
+ sntp/tests/Makefile.am@1.59 +4 -4
+ sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn.
+
+ChangeSet@1.3524, 2015-07-05 23:58:57+02:00, tomek@tomek-n56vz.(none)
+ vi64ops.c:
+ deleted a comment
+ ymd2yd.c:
+ fixed formatting, deleted empty setUp() and tearDown()
+ ssl_init.c:
+ fixed formatting
+ ChangeLog:
+ updated the changes to vi64ops.c
+ vi64ops.c:
+ fixed formatting (trailing spaces, the order of includes, return type of a function in a new line)
+ ChangeLog:
+ info about tvtots.c
+ ymd2yd.c:
+ removed an include
+ ChangeLog:
+ info about ymd2yd.c
+ uglydate.c:
+ removed an unnecessary include
+ ChangeLog:
+ info about uglydate.c
+ statestr.c:
+ deleted unnecessary empty functions, fixed formatting, removed an unnecessary include
+ ChangeLog:
+ info about vi64ops.c
+ tvtots.c:
+ fixed a bug, fixed formatting
+ Many files:
+ autogenerated
+
+ ChangeLog@1.1714 +2 -3
+ info about ymd2yd.c
+
+ ChangeLog@1.1713 +2 -0
+ info about ymd2yd.c
+
+ ChangeLog@1.1712 +2 -1
+ updated the changes to vi64ops.c
+
+ ChangeLog@1.1711 +1 -0
+ info about vi64ops.c
+
+ ChangeLog@1.1710 +1 -0
+ info about uglydate.c
+
+ ChangeLog@1.1709 +4 -0
+ info about tvtots.c
+
+ tests/libntp/run-ssl_init.c@1.6 +5 -5
+ autogenerated
+
+ tests/libntp/run-statestr.c@1.7 +5 -4
+ autogenerated
+
+ tests/libntp/run-tvtots.c@1.3 +4 -3
+ autogenerated
+
+ tests/libntp/run-uglydate.c@1.8 +2 -1
+ autogenerated
+
+ tests/libntp/run-vi64ops.c@1.5 +3 -3
+ autogenerated
+
+ tests/libntp/run-ymd2yd.c@1.8 +4 -4
+ autogenerated
+
+ tests/libntp/run-ymd2yd.c@1.7 +5 -4
+ autogenerated
+
+ tests/libntp/ssl_init.c@1.7 +11 -6
+ fixed formatting
+
+ tests/libntp/statestr.c@1.4 +12 -15
+ deleted unnecessary empty functions, fixed formatting, removed an unnecessary include
+
+ tests/libntp/tvtots.c@1.4 +12 -5
+ fixed a bug, fixed formatting
+
+ tests/libntp/uglydate.c@1.6 +0 -1
+ removed an unnecessary include
+
+ tests/libntp/vi64ops.c@1.5 +1 -1
+ deleted a comment
+
+ tests/libntp/vi64ops.c@1.4 +17 -14
+ fixed formatting (trailing spaces, the order of includes, return type of a function in a new line)
+
+ tests/libntp/ymd2yd.c@1.5 +0 -1
+ removed an include
+
+ tests/libntp/ymd2yd.c@1.4 +14 -16
+ fixed formatting, deleted empty setUp() and tearDown()
+
+ChangeSet@1.3523, 2015-07-05 18:41:36+02:00, tomek@tomek-n56vz.(none)
+ refnumtoa.c:
+ fixed formatting
+ numtoa.c:
+ remove unnecessary empty functions, fix formatting
+ lfpfunc.c:
+ remove unnecessary include, remove old comments, fix formatting, cleanup
+ numtohost.c:
+ added const, fixed formatting
+ lfptostr.c:
+ fix formatting, delete an include
+ lfpfunc.c:
+ removed an endline
+ ChangeLog:
+ update with new changes to numtoa.c
+ numtoa.c:
+ added "const"
+ ChangeLog:
+ changes with numtohost.c
+ added changes to lfpfunc.c
+ add info about numtoa.c
+ updated with modetoa.c changes
+ add info about lfptostr.c
+ msyslog.c, modetoa.c:
+ fix formatting
+ Many files:
+ autogenerated
+ ChangeLog:
+ add info about msyslog.c
+ lfpfunc.c:
+ added spaces after the commas
+ ChangeLog:
+ updated info about refnumtoa.c
+
+ ChangeLog@1.1708 +1 -0
+ updated info about refnumtoa.c
+
+ ChangeLog@1.1707 +1 -0
+ changes with numtohost.c
+
+ ChangeLog@1.1706 +2 -2
+ update with new changes to numtoa.c
+
+ ChangeLog@1.1705 +2 -0
+ add info about numtoa.c
+
+ ChangeLog@1.1704 +1 -0
+ add info about msyslog.c
+
+ ChangeLog@1.1703 +1 -0
+ updated with modetoa.c changes
+
+ ChangeLog@1.1702 +3 -1
+ add info about lfptostr.c
+
+ ChangeLog@1.1701 +2 -0
+ added changes to lfpfunc.c
+
+ tests/libntp/lfpfunc.c@1.11 +0 -2
+ removed an endline
+
+ tests/libntp/lfpfunc.c@1.10 +55 -55
+ added spaces after the commas
+
+ tests/libntp/lfpfunc.c@1.9 +100 -188
+ remove unnecessary include, remove old comments, fix formatting, cleanup
+
+ tests/libntp/lfptostr.c@1.3 +20 -13
+ fix formatting, delete an include
+
+ tests/libntp/modetoa.c@1.6 +5 -5
+ fix formatting
+
+ tests/libntp/msyslog.c@1.5 +11 -2
+ fix formatting
+
+ tests/libntp/numtoa.c@1.5 +3 -3
+ added "const"
+
+ tests/libntp/numtoa.c@1.4 +12 -20
+ remove unnecessary empty functions, fix formatting
+
+ tests/libntp/numtohost.c@1.4 +3 -4
+ added const, fixed formatting
+
+ tests/libntp/refnumtoa.c@1.4 +10 -12
+ fixed formatting
+
+ tests/libntp/run-lfpfunc.c@1.12 +9 -9
+ autogenerated
+
+ tests/libntp/run-lfptostr.c@1.3 +11 -10
+ autogenerated
+
+ tests/libntp/run-modetoa.c@1.8 +2 -1
+ autogenerated
+
+ tests/libntp/run-msyslog.c@1.5 +8 -8
+ autogenerated
+
+ tests/libntp/run-numtoa.c@1.7 +3 -2
+ autogenerated
+
+ tests/libntp/run-numtohost.c@1.7 +1 -0
+ autogenerated
+
+ tests/libntp/run-refnumtoa.c@1.5 +1 -1
+ autogenerated
+
+ChangeSet@1.3514.2.2, 2015-07-04 21:58:49+00:00, stenn@psp-at1.ntp.org
+ sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn.
+
+ BitKeeper/deleted/42/evconfig-private.h~c311ed41afa56d3b@1.2 +0 -0
+ Delete: sntp/libevent/evconfig-private.h
+
+ ChangeLog@1.1695.1.2 +1 -0
+ sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn.
+
+ChangeSet@1.3514.2.1, 2015-07-04 21:44:33+00:00, stenn@psp-at1.ntp.org
+ sntp/unity/unity_config.h: Distribute it. Harlan Stenn.
+
+ ChangeLog@1.1695.1.1 +1 -0
+ sntp/unity/unity_config.h: Distribute it. Harlan Stenn.
+
+ sntp/unity/Makefile.am@1.6.1.1 +1 -0
+ sntp/unity/unity_config.h: Distribute it. Harlan Stenn.
+
+ChangeSet@1.3513.1.1, 2015-07-04 23:32:08+02:00, viperus@ubuntu.(none)
+ timevalops.c:
+ added timevaltoa() and fixed the printfs
+ timespecops.c:
+ added timespectoa() and fixed the printfs
+
+ tests/libntp/run-timespecops.c@1.6 +28 -28
+
+ tests/libntp/run-timevalops.c@1.8 +28 -28
+
+ tests/libntp/timespecops.c@1.6 +58 -1
+ added timespectoa() and fixed the printfs
+
+ tests/libntp/timevalops.c@1.9 +53 -1
+ added timevaltoa() and fixed the printfs
+
+ChangeSet@1.3520, 2015-07-04 14:10:34+00:00, tflendrich@psp-deb1.ntp.org
+ ChangeLog:
+ updated my changes
+
+ ChangeLog@1.1698 +1 -0
+ updated my changs
+
+ChangeSet@1.3519, 2015-07-04 15:41:50+02:00, tomek@tomek-n56vz.(none)
+ ChangeLog:
+ updated to match my changes
+
+ ChangeLog@1.1697 +3 -3
+ updated to match my changes
+
+ChangeSet@1.3518, 2015-07-04 15:39:51+02:00, tomek@tomek-n56vz.(none)
+ humandate.c:
+ reordered code so that it is C90-compilant, renamed variables so that they are different that function names, fixed formatting to match NTP's convention
+ hextolfp.c:
+ removed a trailing endline, changed formatting to match NTP's convention,
+ decodenetnum.c:
+ changed the order of imports, removed an unnecessary import, removed a trailing space, changed the return type from a function to be in a new line
+ run-humandate.c, run-hextolfp.c, run-decodenetnum.c:
+ autogenerated
+
+ tests/libntp/decodenetnum.c@1.3 +16 -11
+ changed the order of imports, removed an unnecessary import, removed a trailing space, changed the return type from a function to be in a new line
+
+ tests/libntp/hextolfp.c@1.5 +12 -7
+ removed a trailing endline, changed formatting to match NTP's convention,
+
+ tests/libntp/humandate.c@1.4 +11 -9
+ reordered code so that it is C90-compilant, renamed variables so that they are different that function names, fixed formatting to match NTP's convention
+
+ tests/libntp/run-decodenetnum.c@1.4 +5 -5
+ autogenerated
+
+ tests/libntp/run-hextolfp.c@1.5 +6 -6
+ autogenerated
+
+ tests/libntp/run-humandate.c@1.3 +3 -2
+ autogenerated
+
+ChangeSet@1.3517, 2015-07-04 12:38:08+00:00, tflendrich@psp-deb1.ntp.org
+ Makefile.am:
+ adding a forgotten header, so that "make distcheck" works
+
+ sntp/unity/Makefile.am@1.7 +1 -0
+ adding a forgotten header, so that "make distcheck" works
+
+ChangeSet@1.3516, 2015-07-04 11:55:26+00:00, tflendrich@psp-deb1.ntp.org
+ ChangeLog:
+ updated with my changes
+
+ ChangeLog@1.1696 +4 -0
+ updated with my changes
+
+ChangeSet@1.3499.1.1, 2015-07-04 13:39:28+02:00, tomek@tomek-n56vz.(none)
+ buftvtots.c:
+ fix formatting, declarations before code (C90)
+ authkeys.c:
+ fixed formatting, removed unnecessary comment
+ calendar.c:
+ further cleanup: deleted unnecessary comments, made first declaration, then code
+ clocktime.c:
+ removed comments, fixed formatting
+ a_md5encrypt.c:
+ fix formatting, add (void) as argument to a function etc
+ caltontp.c:
+ fixed the order of #includes
+ run-buftvtots.c, run-a_md5encrypt.c:
+ adding autogenerated file
+ calendar.c:
+ deleted comments, fixed formatting, used snprintf instead of sprintf, change variable names to be meaningful,
+ caljulian.c:
+ changed sprintf to snprintf, fixed formatting etc
+ a_md5encrypt.c:
+ changed to first declaration, then code (C90 compatibility)
+ Many files:
+ autogenerated
+ authkeys.c:
+ further changes of formatting
+
+ tests/libntp/a_md5encrypt.c@1.9 +8 -3
+ changed to first declaration, then code (C90 compatibility)
+
+ tests/libntp/a_md5encrypt.c@1.8 +17 -21
+ fix formatting, add (void) as argument to a function etc
+
+ tests/libntp/authkeys.c@1.8 +20 -10
+ further changes of formatting
+
+ tests/libntp/authkeys.c@1.7 +5 -11
+ fixed formatting, removed unnecessary comment
+
+ tests/libntp/buftvtots.c@1.2 +10 -7
+ fix formatting, declarations before code (C90)
+
+ tests/libntp/calendar.c@1.4 +12 -7
+ further cleanup: deleted unnecessary comments, made first declaration, then code
+
+ tests/libntp/calendar.c@1.3 +121 -114
+ deleted comments, fixed formatting, used snprintf instead of sprintf, change variable names to be meaningful,
+
+ tests/libntp/caljulian.c@1.7 +41 -39
+ changed sprintf to snprintf, fixed formatting etc
+
+ tests/libntp/caltontp.c@1.2 +1 -1
+ fixed the order of #includes
+
+ tests/libntp/clocktime.c@1.4 +24 -15
+ removed comments, fixed formatting
+
+ tests/libntp/run-a_md5encrypt.c@1.11 +4 -4
+ adding autogenerated file
+
+ tests/libntp/run-a_md5encrypt.c@1.10 +10 -10
+ adding autogenerated file
+
+ tests/libntp/run-authkeys.c@1.8 +6 -5
+ autogenerated
+
+ tests/libntp/run-buftvtots.c@1.2 +9 -8
+ adding autogenerated file
+
+ tests/libntp/run-calendar.c@1.5 +10 -10
+ autogenerated
+
+ tests/libntp/run-calendar.c@1.4 +22 -21
+ autogenerated
+
+ tests/libntp/run-caljulian.c@1.9 +7 -7
+ autogenerated
+
+ tests/libntp/run-caltontp.c@1.2 +1 -0
+ autogenerated
+
+ tests/libntp/run-clocktime.c@1.5 +17 -16
+ autogenerated
+
+ChangeSet@1.3514, 2015-07-04 10:24:57+00:00, viperus@psp-at1.ntp.org
+ cleanup
+
+ ChangeLog@1.1695 +2 -3
+ cleanup
+
+ChangeSet@1.3512, 2015-07-04 12:19:42+02:00, viperus@ubuntu.(none)
+ fixes to unsigned printing in timespecops.c and timevalops.c
+
+ tests/libntp/timespecops.c@1.5 +1 -1
+
+ tests/libntp/timevalops.c@1.8 +1 -1
+
+ChangeSet@1.3511, 2015-07-04 12:15:31+02:00, viperus@ubuntu.(none)
+ ChangeLog:
+ added my changes
+ timespecops.c:
+ many fixes, better printfs etc.
+ minor fixes to printf, formatting, etc.
+ timevalops.c:
+ minor fixes to printf, formatting, etc.
+
+ ChangeLog@1.1692.1.1 +3 -0
+ added my changes
+
+ tests/libntp/run-timespecops.c@1.5 +28 -28
+
+ tests/libntp/run-timevalops.c@1.7 +28 -28
+
+ tests/libntp/timespecops.c@1.4 +7 -13
+ many fixes, better printfs etc.
+ minor fixes to printf, formatting, etc.
+
+ tests/libntp/timevalops.c@1.7 +5 -9
+ minor fixes to printf, formatting, etc.
+
+ChangeSet@1.3509.1.1, 2015-07-04 09:34:18+00:00, stenn@psp-at1.ntp.org
+ [Bug 2866] segmentation fault at initgroups(). Harlan Stenn.
+
+ ChangeLog@1.1693 +1 -0
+ [Bug 2866] segmentation fault at initgroups(). Harlan Stenn.
+
+ ntpd/ntpd.c@1.160 +11 -4
+ [Bug 2866] segmentation fault at initgroups(). Harlan Stenn.
+
+ChangeSet@1.3510, 2015-07-04 11:27:04+02:00, viperus@ubuntu.(none)
+ sockaddrtest.h:
+ fully converted some tricky cout to printf (af_inet, sockaddr etc.)
+
+ tests/libntp/sockaddrtest.h@1.4 +3 -7
+ fully converted some tricky cout to printf (af_inet, sockaddr etc.)
+
+ChangeSet@1.3505.1.3, 2015-07-04 09:19:48+00:00, stenn@psp-at1.ntp.org
+ sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. Harlan Stenn.
+
+ ChangeLog@1.1690.1.2 +1 -0
+ sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. Harlan Stenn.
+
+ sntp/unity/unity_internals.h@1.4 +6 -6
+ sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. Harlan Stenn.
+
+ChangeSet@1.3505.1.2, 2015-07-04 09:16:51+00:00, stenn@psp-at1.ntp.org
+ sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn.
+
+ ChangeLog@1.1690.1.1 +1 -0
+ sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn.
+
+ sntp/unity/unity_config.h@1.2 +4 -0
+ sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn.
+
+ChangeSet@1.3508, 2015-07-04 09:11:47+00:00, stenn@psp-at1.ntp.org
+ tests/{libntp,ntpd} function parameter cleanup from Damir
+
+ ChangeLog@1.1691 +2 -0
+ tests/{libntp,ntpd} function parameter cleanup from Damir
+
+ChangeSet@1.3505.1.1, 2015-07-04 08:56:15+00:00, stenn@psp-at1.ntp.org
+ Update sntp/tests/run-crypto.c
+
+ sntp/tests/run-crypto.c@1.2 +6 -6
+ Update sntp/tests/run-crypto.c
+
+ChangeSet@1.3504.1.2, 2015-07-04 10:38:08+02:00, viperus@ubuntu.(none)
+ minor fixes, adding void, cleanup...
+
+ tests/libntp/a_md5encrypt.c@1.7.1.1 +5 -5
+
+ tests/libntp/atouint.c@1.4 +5 -5
+
+ tests/libntp/authkeys.c@1.6.1.1 +6 -6
+
+ tests/libntp/buftvtots.c@1.1.1.1 +4 -4
+
+ tests/libntp/calendar.c@1.2.1.1 +27 -32
+
+ tests/libntp/caljulian.c@1.6.1.1 +6 -8
+
+ tests/libntp/calyearstart.c@1.3 +6 -6
+
+ tests/libntp/clocktime.c@1.3.1.1 +10 -10
+
+ tests/libntp/lfpfunc.c@1.8 +9 -10
+
+ tests/libntp/lfptest.h@1.4 +2 -0
+
+ tests/libntp/msyslog.c@1.4 +0 -1
+
+ tests/libntp/refnumtoa.c@1.3 +2 -2
+
+ tests/libntp/run-a_md5encrypt.c@1.9.1.1 +5 -5
+
+ tests/libntp/run-atouint.c@1.7 +6 -5
+
+ tests/libntp/run-authkeys.c@1.7.1.1 +7 -6
+
+ tests/libntp/run-buftvtots.c@1.1.1.1 +5 -4
+
+ tests/libntp/run-calendar.c@1.3.1.1 +23 -22
+
+ tests/libntp/run-caljulian.c@1.8.1.1 +8 -8
+
+ tests/libntp/run-calyearstart.c@1.4 +4 -3
+
+ tests/libntp/run-clocktime.c@1.4.1.1 +9 -8
+
+ tests/libntp/run-lfpfunc.c@1.11 +17 -17
+
+ tests/libntp/run-msyslog.c@1.4 +8 -8
+
+ tests/libntp/run-refidsmear.c@1.3 +1 -1
+
+ tests/libntp/run-refnumtoa.c@1.4 +3 -2
+
+ tests/libntp/run-ssl_init.c@1.5 +6 -5
+
+ tests/libntp/run-timespecops.c@1.4 +29 -28
+
+ tests/libntp/run-timevalops.c@1.6 +29 -28
+
+ tests/libntp/run-vi64ops.c@1.4 +6 -6
+
+ tests/libntp/ssl_init.c@1.6 +5 -5
+
+ tests/libntp/timespecops.c@1.3 +28 -28
+
+ tests/libntp/timevalops.c@1.6 +37 -37
+
+ tests/libntp/vi64ops.c@1.3 +10 -11
+
+ChangeSet@1.3504.1.1, 2015-07-04 10:08:41+02:00, viperus@ubuntu.(none)
+ minor warning fixes, adding voids etc.
+
+ tests/ntpd/leapsec.c@1.3 +40 -45
+
+ tests/ntpd/run-leapsec.c@1.3 +66 -66
+
+ChangeSet@1.3505, 2015-07-04 08:08:23+00:00, stenn@psp-at1.ntp.org
+ sntp/tests/ function parameter list cleanup. Damir Tomi\xc4\x87.
+
+ ChangeLog@1.1690 +1 -0
+ sntp/tests/ function parameter list cleanup. Damir Tomi\xc4\x87.
+
+ChangeSet@1.3504, 2015-07-04 09:49:26+02:00, viperus@ubuntu.(none)
+ minor warning fixes like adding void etc.
+
+ sntp/tests/crypto.c@1.6 +1 -0
+
+ sntp/tests/keyFile.c@1.4 +5 -5
+
+ sntp/tests/kodDatabase.c@1.3 +5 -5
+
+ sntp/tests/kodFile.c@1.6 +8 -8
+
+ sntp/tests/packetProcessing.c@1.5 +2 -2
+
+ sntp/tests/run-keyFile.c@1.5 +6 -5
+
+ sntp/tests/run-kodDatabase.c@1.2 +6 -5
+
+ sntp/tests/run-kodFile.c@1.3 +7 -6
+
+ sntp/tests/run-utilities.c@1.2 +14 -14
+
+ sntp/tests/sntptest.h@1.4 +6 -3
+
+ sntp/tests/utilities.c@1.2 +7 -9
+
+ChangeSet@1.3503, 2015-07-04 07:25:15+00:00, stenn@psp-at1.ntp.org
+ top_srcdir can change based on ntp v. sntp. Harlan Stenn.
+
+ ChangeLog@1.1689 +1 -0
+ top_srcdir can change based on ntp v. sntp. Harlan Stenn.
+
+ sntp/tests/Makefile.am@1.58 +1 -1
+ top_srcdir can change based on ntp v. sntp. Harlan Stenn.
+
+ChangeSet@1.3502, 2015-07-04 00:44:41-04:00, stenn@deacon.udel.edu
+ On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn.
+
+ ChangeLog@1.1688 +1 -0
+ On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn.
+
+ include/ntp_types.h@1.35 +2 -1
+ On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn.
+
+ChangeSet@1.3501, 2015-07-04 03:49:10+00:00, stenn@psp-at1.ntp.org
+ Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn.
+
+ ChangeLog@1.1687 +1 -0
+ Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn.
+
+ sntp/tests/Makefile.am@1.57 +20 -97
+ Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn.
+
+ChangeSet@1.3500, 2015-07-03 20:30:06+00:00, stenn@psp-fb1.ntp.org
+ tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn.
+
+ ChangeLog@1.1686 +1 -0
+ tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn.
+
+ tests/ntpd/g_leapsec.cpp@1.16 +1 -1
+ tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn.
+
+ChangeSet@1.3498, 2015-07-03 19:27:53+00:00, stenn@psp-at1.ntp.org
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ ChangeLog@1.1685 +1 -0
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ sntp/tests/Makefile.am@1.56 +4 -2
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ sntp/unity/Makefile.am@1.6 +1 -1
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ sntp/unity/unity_config.h@1.1 +8 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-unity/sntp/unity/unity_config.h
+
+ sntp/unity/unity_config.h@1.0 +0 -0
+
+ tests/bug-2803/Makefile.am@1.13 +2 -0
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ tests/libntp/Makefile.am@1.83.1.1 +2 -4
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ tests/ntpd/Makefile.am@1.1.1.1 +2 -0
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ tests/sandbox/Makefile.am@1.5 +2 -0
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ tests/sandbox/smeartest.c@1.3.1.3 +12 -0
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ tests/sec-2853/Makefile.am@1.3 +2 -0
+ Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+
+ChangeSet@1.3497, 2015-07-03 09:30:02+00:00, stenn@psp-at1.ntp.org
+ libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn.
+
+ ChangeLog@1.1684 +1 -0
+ libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn.
+
+ libntp/emalloc.c@1.19 +0 -2
+ libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn.
+
+ChangeSet@1.3492.1.3, 2015-07-02 09:34:06+00:00, stenn@psp-at1.ntp.org
+ Fix ChangeLog
+
+ ChangeLog@1.1680.1.2 +3 -1
+ Fix ChangeLog
+
+ChangeSet@1.3495, 2015-07-02 09:32:14+00:00, stenn@psp-at1.ntp.org
+ Fix ChangeLog
+
+ ChangeLog@1.1682 +3 -1
+ Fix ChangeLog
+
+ChangeSet@1.3473.1.23, 2015-07-01 10:06:49+02:00, viperus@ubuntu.(none)
+ leapsec.c:
+ added include to fix everything, yey!
+ Makefile.am:
+ changed the order of libntp.a and libntpd.a, stuff builds now
+
+ tests/ntpd/Makefile.am@1.3 +11 -9
+ changed the order of libntp.a and libntpd.a, stuff builds now
+
+ tests/ntpd/leapsec.c@1.2 +8 -4
+ added include to fix everything, yey!
+
+ tests/ntpd/run-leapsec.c@1.2 +33 -33
+
+ChangeSet@1.3473.1.22, 2015-07-01 09:31:35+02:00, viperus@ubuntu.(none)
+ g_leapsec.cpp:
+ Rename: tests/ntpd/leapsec.cpp -> tests/ntpd/g_leapsec.cpp
+ run-leapsec.c, leapsec.c:
+ new file
+ Makefile.am:
+ added /tests/ntpd/ dir
+ unity tests
+ removed a comment line
+ g_ntpdtest.h:
+ Rename: tests/ntpd/ntpdtest.h -> tests/ntpd/g_ntpdtest.h
+ Makefile.am:
+ added support for unity tests
+ test-libntp.h:
+ added new headers
+ g_ntpdtest.cpp:
+ minor change in the header name
+ Rename: tests/ntpd/ntpdtest.cpp -> tests/ntpd/g_ntpdtest.cpp
+
+ tests/Makefile.am@1.9.1.1 +6 -5
+ added /tests/ntpd/ dir
+ unity tests
+
+ tests/libntp/Makefile.am@1.84 +0 -1
+ removed a comment line
+
+ tests/libntp/test-libntp.h@1.7 +5 -0
+ added new headers
+
+ tests/ntpd/Makefile.am@1.2 +62 -6
+ added support for unity tests
+
+ tests/ntpd/g_leapsec.cpp@1.15 +0 -0
+ Rename: tests/ntpd/leapsec.cpp -> tests/ntpd/g_leapsec.cpp
+
+ tests/ntpd/g_ntpdtest.cpp@1.3 +1 -1
+ minor change in the header name
+
+ tests/ntpd/g_ntpdtest.cpp@1.2 +0 -0
+ Rename: tests/ntpd/ntpdtest.cpp -> tests/ntpd/g_ntpdtest.cpp
+
+ tests/ntpd/g_ntpdtest.h@1.2 +0 -0
+ Rename: tests/ntpd/ntpdtest.h -> tests/ntpd/g_ntpdtest.h
+
+ tests/ntpd/leapsec.c@1.1 +1230 -0
+ BitKeeper file /home/viperus/Desktop/ntp-stable-unity/tests/ntpd/leapsec.c
+
+ tests/ntpd/leapsec.c@1.0 +0 -0
+
+ tests/ntpd/run-leapsec.c@1.1 +116 -0
+ BitKeeper file /home/viperus/Desktop/ntp-stable-unity/tests/ntpd/run-leapsec.c
+
+ tests/ntpd/run-leapsec.c@1.0 +0 -0
+
+ChangeSet@1.3492.2.1, 2015-07-01 03:11:28-04:00, stenn@deacon.udel.edu
+ Update the repo's description and contact email
+
+ BitKeeper/etc/config@1.11 +2 -2
+ Update the repo's description and contact email
+
+ChangeSet@1.3492.1.1, 2015-07-01 08:53:24+02:00, jnperlin@hydra.(none)
+ [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'
+
+ ChangeLog@1.1680.1.1 +1 -0
+ [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'
+
+
+ ntpd/ntp_control.c@1.201 +5 -2
+ [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'
+ make sure 'ctl_var' table matches indices (CS_LEAPSMEAR* is unconditionally defined and affects AUTOKEY vars)
+
+ChangeSet@1.3493, 2015-07-01 08:40:44+02:00, jnperlin@nemesis.localnet
+ [Bug 2864] 4.2.8p3 fails to compile on Windows.
+ fixed project files. (tested with VS2008 and VS2013)
+
+ ChangeLog@1.1681 +1 -0
+ [Bug 2864] 4.2.8p3 fails to compile on Windows.
+ fix project files. (tested with VS2008 and VS2013)
+
+ ports/winnt/vs2005/ntpd.vcproj@1.20 +22 -0
+ [Bug 2864] 4.2.8p3 fails to compile on Windows.
+ fixed project files. (UNTESTED!)
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.49 +4 -0
+ [Bug 2864] 4.2.8p3 fails to compile on Windows.
+ fixed project files. (tested)
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj@1.7 +1 -0
+ [Bug 2864] 4.2.8p3 fails to compile on Windows.
+ fixed project files. (tested)
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters@1.5 +3 -0
+ [Bug 2864] 4.2.8p3 fails to compile on Windows.
+ fixed project files. (tested)
+
+ChangeSet@1.3492, 2015-06-29 16:52:34-04:00, stenn@deacon.udel.edu
+ Makefile.in should not be checked in
+
+ BitKeeper/deleted/bd/Makefile.in~a06c74c485656b20@1.3 +0 -0
+ Delete: tests/sec-2853/Makefile.in
+
ChangeSet@1.3491, 2015-06-29 16:34:44-04:00, stenn@deacon.udel.edu
NTP_4_2_8P3
TAG: NTP_4_2_8P3
@@ -344,7 +5257,16 @@ ChangeSet@1.3489, 2015-06-29 19:33:22+00:00, stenn@psp-at1.ntp.org
NEWS@1.144 +18 -3
NEWS file update for bug 2853
-ChangeSet@1.3473.1.40, 2015-06-29 06:00:52+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.1.21, 2015-06-29 20:33:15+02:00, viperus@ubuntu.(none)
+ a_md5encrypt.c:
+ minor change to memory compare, suggested by Tomasz
+
+ tests/libntp/a_md5encrypt.c@1.7 +2 -1
+ minor change to memory compare, suggested by Tomasz
+
+ tests/libntp/run-a_md5encrypt.c@1.9 +5 -4
+
+ChangeSet@1.3473.3.23, 2015-06-29 06:00:52+00:00, stenn@psp-at1.ntp.org
html/miscopt.html: Document leapsmearinterval, other cleanup. Harlan Stenn.
ChangeLog@1.1666.1.19 +1 -0
@@ -353,7 +5275,7 @@ ChangeSet@1.3473.1.40, 2015-06-29 06:00:52+00:00, stenn@psp-at1.ntp.org
html/miscopt.html@1.82 +18 -15
html/miscopt.html: Document leapsmearinterval, other cleanup. Harlan Stenn.
-ChangeSet@1.3473.1.39, 2015-06-29 05:28:47+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.22, 2015-06-29 05:28:47+00:00, stenn@psp-at1.ntp.org
ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn.
ChangeLog@1.1666.1.18 +1 -0
@@ -383,14 +5305,14 @@ ChangeSet@1.3486, 2015-06-29 03:39:39+00:00, stenn@psp-at1.ntp.org
ChangeLog@1.1677 +2 -1
Updated entry for Sec 2853
-ChangeSet@1.3473.3.2, 2015-06-29 04:57:16+02:00, tomek@tomek-n56vz.(none)
+ChangeSet@1.3473.4.2, 2015-06-29 04:57:16+02:00, tomek@tomek-n56vz.(none)
ChangeLog:
moved a change to the proper place
ChangeLog@1.1666.2.2 +1 -1
moved a change to the proper place
-ChangeSet@1.3473.3.1, 2015-06-29 04:50:55+02:00, tomek@tomek-n56vz.(none)
+ChangeSet@1.3473.4.1, 2015-06-29 04:50:55+02:00, tomek@tomek-n56vz.(none)
ChangeLog:
updated my changes
msyslog.c:
@@ -407,7 +5329,7 @@ ChangeSet@1.3473.3.1, 2015-06-29 04:50:55+02:00, tomek@tomek-n56vz.(none)
tests/libntp/run-msyslog.c@1.3 +1 -0
checking in the autogenerated file
-ChangeSet@1.3473.1.37, 2015-06-29 01:16:44+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.20, 2015-06-29 01:16:44+00:00, stenn@psp-at1.ntp.org
[Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel.
ChangeLog@1.1666.1.16 +1 -0
@@ -419,13 +5341,13 @@ ChangeSet@1.3473.1.37, 2015-06-29 01:16:44+00:00, stenn@psp-at1.ntp.org
ntpq/ntpq-subs.c@1.109 +1 -1
[Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel.
-ChangeSet@1.3473.1.36, 2015-06-29 01:13:38+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.19, 2015-06-29 01:13:38+00:00, stenn@psp-at1.ntp.org
Update the NEWS file with info about README.leapsmear
NEWS@1.142 +2 -1
Update the NEWS file with info about README.leapsmear
-ChangeSet@1.3473.1.35, 2015-06-29 00:10:53+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.18, 2015-06-29 00:10:53+00:00, stenn@psp-at1.ntp.org
README.leapsmear edited. Harlan Stenn.
ChangeLog@1.1666.1.15 +1 -0
@@ -434,7 +5356,7 @@ ChangeSet@1.3473.1.35, 2015-06-29 00:10:53+00:00, stenn@psp-at1.ntp.org
README.leapsmear@1.2 +240 -75
README.leapsmear edited. Harlan Stenn.
-ChangeSet@1.3473.1.34, 2015-06-28 21:20:27+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.17, 2015-06-28 21:20:27+00:00, stenn@psp-at1.ntp.org
README.leapsmear added. Martin Burnicki.
ChangeLog@1.1666.1.14 +1 -0
@@ -448,19 +5370,19 @@ ChangeSet@1.3473.1.34, 2015-06-28 21:20:27+00:00, stenn@psp-at1.ntp.org
README.leapsmear@1.0 +0 -0
-ChangeSet@1.3473.1.33, 2015-06-27 23:05:51-04:00, stenn@deacon.udel.edu
+ChangeSet@1.3473.3.16, 2015-06-27 23:05:51-04:00, stenn@deacon.udel.edu
[Bug 2846] Report 'unsynchronized' status during the leap second. Fixed in Martin's changes to Bug 2855. Martin Burnicki.
ChangeLog@1.1666.1.13 +2 -0
[Bug 2846] Report 'unsynchronized' status during the leap second. Fixed in Martin's changes to Bug 2855. Martin Burnicki.
-ChangeSet@1.3473.1.32, 2015-06-27 21:34:55+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.15, 2015-06-27 21:34:55+00:00, stenn@psp-at1.ntp.org
NEWS file update
NEWS@1.141 +12 -0
NEWS file update
-ChangeSet@1.3473.1.31, 2015-06-27 19:25:39+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.14, 2015-06-27 19:25:39+00:00, stenn@psp-at1.ntp.org
[Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel.
ChangeLog@1.1666.1.12 +4 -0
@@ -487,7 +5409,7 @@ ChangeSet@1.3473.1.31, 2015-06-27 19:25:39+00:00, stenn@psp-at1.ntp.org
parseutil/testdcf.c@1.11 +1 -1
[Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel.
-ChangeSet@1.3473.1.30, 2015-06-27 05:21:56-04:00, stenn@deacon.udel.edu
+ChangeSet@1.3473.3.13, 2015-06-27 05:21:56-04:00, stenn@deacon.udel.edu
NTP_4_2_8P3_RC3
TAG: NTP_4_2_8P3_RC3
@@ -821,13 +5743,13 @@ ChangeSet@1.3473.1.30, 2015-06-27 05:21:56-04:00, stenn@deacon.udel.edu
util/ntp-keygen.mdoc.in@1.326 +2 -2
NTP_4_2_8P3_RC3
-ChangeSet@1.3473.1.29, 2015-06-27 04:45:02-04:00, stenn@deacon.udel.edu
+ChangeSet@1.3473.3.12, 2015-06-27 04:45:02-04:00, stenn@deacon.udel.edu
Update the NEWS file for 4.2.8p3-RC3
NEWS@1.140 +26 -0
Update the NEWS file for 4.2.8p3-RC3
-ChangeSet@1.3473.1.28, 2015-06-27 04:20:07-04:00, stenn@deacon.udel.edu
+ChangeSet@1.3473.3.11, 2015-06-27 04:20:07-04:00, stenn@deacon.udel.edu
html/drivers/driver22.html: typo fix. Harlan Stenn.
ChangeLog@1.1666.1.10 +1 -0
@@ -836,7 +5758,7 @@ ChangeSet@1.3473.1.28, 2015-06-27 04:20:07-04:00, stenn@deacon.udel.edu
html/drivers/driver22.html@1.23 +1 -1
html/drivers/driver22.html: typo fix. Harlan Stenn.
-ChangeSet@1.3473.1.27, 2015-06-27 02:22:09-04:00, stenn@deacon.udel.edu
+ChangeSet@1.3473.3.10, 2015-06-27 02:22:09-04:00, stenn@deacon.udel.edu
[Bug 2857] Stratus VOS does not support SIGIO. Paul Green.
ChangeLog@1.1666.1.9 +1 -0
@@ -848,7 +5770,7 @@ ChangeSet@1.3473.1.27, 2015-06-27 02:22:09-04:00, stenn@deacon.udel.edu
sntp/m4/ntp_libntp.m4@1.30 +9 -0
[Bug 2857] Stratus VOS does not support SIGIO. Paul Green.
-ChangeSet@1.3473.1.26, 2015-06-27 01:58:07-04:00, stenn@deacon.udel.edu
+ChangeSet@1.3473.3.9, 2015-06-27 01:58:07-04:00, stenn@deacon.udel.edu
[Bug 2856] ntpd should wait() on terminated child processes. Paul Green.
ChangeLog@1.1666.1.8 +1 -0
@@ -857,7 +5779,7 @@ ChangeSet@1.3473.1.26, 2015-06-27 01:58:07-04:00, stenn@deacon.udel.edu
libntp/work_fork.c@1.14 +23 -4
[Bug 2856] ntpd should wait() on terminated child processes. Paul Green.
-ChangeSet@1.3473.1.25, 2015-06-27 05:12:21+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.8, 2015-06-27 05:12:21+00:00, stenn@psp-at1.ntp.org
[Bug 2855] Report leap smear in the REFID. Harlan Stenn.
ChangeLog@1.1666.1.7 +1 -0
@@ -866,7 +5788,7 @@ ChangeSet@1.3473.1.25, 2015-06-27 05:12:21+00:00, stenn@psp-at1.ntp.org
ntpd/ntp_proto.c@1.361 +8 -2
[Bug 2855] Report leap smear in the REFID. Harlan Stenn.
-ChangeSet@1.3473.1.24, 2015-06-27 04:53:42+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.7, 2015-06-27 04:53:42+00:00, stenn@psp-at1.ntp.org
refidsmear test cleanup. Tomasz Flendrich.
ChangeLog@1.1666.1.6 +1 -0
@@ -875,14 +5797,14 @@ ChangeSet@1.3473.1.24, 2015-06-27 04:53:42+00:00, stenn@psp-at1.ntp.org
tests/libntp/refidsmear.c@1.4 +4 -5
refidsmear test cleanup. Tomasz Flendrich.
-ChangeSet@1.3473.1.23, 2015-06-27 06:44:17+02:00, tomek@tomek-n56vz.(none)
+ChangeSet@1.3473.3.6, 2015-06-27 06:44:17+02:00, tomek@tomek-n56vz.(none)
refidsmear.c:
moved assertions to proper places
tests/libntp/refidsmear.c@1.3 +4 -2
moved assertions to proper places
-ChangeSet@1.3473.1.22, 2015-06-27 04:46:21+02:00, tomek@tomek-n56vz.(none)
+ChangeSet@1.3473.3.5, 2015-06-27 04:46:21+02:00, tomek@tomek-n56vz.(none)
run-refidsmear.c:
updated autogenerated file
refidsmear.c:
@@ -894,7 +5816,7 @@ ChangeSet@1.3473.1.22, 2015-06-27 04:46:21+02:00, tomek@tomek-n56vz.(none)
tests/libntp/run-refidsmear.c@1.2 +1 -1
updated autogenerated file
-ChangeSet@1.3473.1.21, 2015-06-27 01:16:47+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.4, 2015-06-27 01:16:47+00:00, stenn@psp-at1.ntp.org
refidsmear function support and tests. Harlan Stenn.
ChangeLog@1.1666.1.5 +1 -0
@@ -929,24 +5851,31 @@ ChangeSet@1.3473.1.21, 2015-06-27 01:16:47+00:00, stenn@psp-at1.ntp.org
tests/libntp/run-refidsmear.c@1.0 +0 -0
-ChangeSet@1.3473.1.20, 2015-06-26 22:45:16+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.3, 2015-06-26 22:45:16+00:00, stenn@psp-at1.ntp.org
tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger.
ChangeLog@1.1666.1.4 +1 -0
tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger.
-ChangeSet@1.3473.1.19, 2015-06-26 20:10:51+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.2, 2015-06-26 20:10:51+00:00, stenn@psp-at1.ntp.org
smeartest.c fixes from Harlan
- tests/sandbox/smeartest.c@1.5 +52 -1
+ tests/sandbox/smeartest.c@1.3.1.2 +52 -1
smeartest.c fixes from Harlan
-ChangeSet@1.3473.1.18, 2015-06-26 18:43:39+00:00, stenn@psp-at1.ntp.org
+ChangeSet@1.3473.3.1, 2015-06-26 18:43:39+00:00, stenn@psp-at1.ntp.org
smeartest.c fixes from Juergen, Damir, and Harlan
- tests/sandbox/smeartest.c@1.4 +26 -17
+ tests/sandbox/smeartest.c@1.3.1.1 +26 -17
smeartest.c fixes from Juergen, Damir, and Harlan
+ChangeSet@1.3473.1.18, 2015-06-26 15:17:10+02:00, viperus@ubuntu.(none)
+ smeartest.c:
+ maybed fixed both funtions, needs checking!!!
+
+ tests/sandbox/smeartest.c@1.4 +69 -26
+ maybed fixed both funtions, needs checking!!!
+
ChangeSet@1.3473.1.17, 2015-06-26 11:24:43+00:00, stenn@psp-at1.ntp.org
smeartest.c - Harlan Stenn
diff --git a/contrib/ntp/FREEBSD-Xlist b/contrib/ntp/FREEBSD-Xlist
deleted file mode 100644
index 16cfc18b3215..000000000000
--- a/contrib/ntp/FREEBSD-Xlist
+++ /dev/null
@@ -1,2 +0,0 @@
-*ports
-*html/pic
diff --git a/contrib/ntp/FREEBSD-upgrade b/contrib/ntp/FREEBSD-upgrade
deleted file mode 100644
index 3253274b14a8..000000000000
--- a/contrib/ntp/FREEBSD-upgrade
+++ /dev/null
@@ -1,55 +0,0 @@
-# ex:ts=8
-#
-# $FreeBSD$
-
-NTP 4.2.8
- originals can be found on http://www.ntp.org/downloads.html
-
-Import
-------
-
-For the import of NTP the following files were removed:
-
- ports/* NT files
- html/pic/* GIF files
- html/build/hints/solaris.xtra.4095849 Trigger merge conflict script
-
-The stripped down version was created using FREEBSD-Xlist during
-extraction:
-
- tar -X FREEBSD-Xlist -xvzf ntp-4.2.8.tar.gz
- mv ntp-4.2.8 4.2.8
-
-Imported by:
- See procedure on
-https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/subversion-primer.html
-
-Updating usr.sbin/ntp
----------------------
-
-./configure --disable-all-clocks --enable-NMEA --enable-ONCORE
---enable-RAWDCF --with-crypto --disable-debugging
---enable-LOCAL-CLOCK --with-sntp --with-arlib --prefix=/usr
-
-config.h was generated by running configure and excluding almost all clock
-drivers (what is included is DCF77 -- what I use --, NMEA, Motorola OnCORE
-and local clocks).
-
-The file is then edited to edit the value of "NO_PARENB_IGNPAR" because we
-need to set no parity on the serial port (needed for DCF77). All clock
-drivers are then disabled (some of them are included by default by ntpd).
-
-Note that there are two #ifdef to support other architectures (WRT to long
-size and endianness). They'll need to be redone for each upgrade to the
-vendor branch to keep config.h in sync.
-
-ntpd/ntp_control.c is now the only file that is different from the vendor
-branch for unsigned char/int fixes and removal of a DoS.
-
-Documentation in /usr/share/doc/ntp is generated from the HTML files with
-lynx (without the GIF files of course).
-
-A patch to fix IPV6_MULTICAST_LOOP was committed to head as r222444 and
-filed as http://bugs.ntp.org/show_bug.cgi?id=1936. Check if still needed
-or re-apply on update.
-
diff --git a/contrib/ntp/Makefile.am b/contrib/ntp/Makefile.am
index 11b20bfdb971..43f45edbfff2 100644
--- a/contrib/ntp/Makefile.am
+++ b/contrib/ntp/Makefile.am
@@ -23,7 +23,7 @@ SUBDIRS = \
tests \
$(NULL)
-DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp
+DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp --enable-local-libevent $(NTP_DCF)
EXTRA_DIST = \
$(srcdir)/COPYRIGHT \
diff --git a/contrib/ntp/Makefile.in b/contrib/ntp/Makefile.in
index 4d71d85fd0d2..bc2327ff756f 100644
--- a/contrib/ntp/Makefile.in
+++ b/contrib/ntp/Makefile.in
@@ -115,6 +115,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -262,6 +263,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -270,6 +272,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -331,6 +334,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@@ -539,7 +543,7 @@ SUBDIRS = \
tests \
$(NULL)
-DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp
+DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp --enable-local-libevent $(NTP_DCF)
EXTRA_DIST = \
$(srcdir)/COPYRIGHT \
ChangeLog \
diff --git a/contrib/ntp/NEWS b/contrib/ntp/NEWS
index 4e61d1b80bb7..e16d93700837 100644
--- a/contrib/ntp/NEWS
+++ b/contrib/ntp/NEWS
@@ -1,4 +1,499 @@
---
+NTP 4.2.8p4
+
+Focus: Security, Bug fies, enhancements.
+
+Severity: MEDIUM
+
+In addition to bug fixes and enhancements, this release fixes the
+following 13 low- and medium-severity vulnerabilities:
+
+* Incomplete vallen (value length) checks in ntp_crypto.c, leading
+ to potential crashes or potential code injection/information leakage.
+
+ References: Sec 2899, Sec 2671, CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6
+ Summary: The fix for CVE-2014-9750 was incomplete in that there were
+ certain code paths where a packet with particular autokey operations
+ that contained malicious data was not always being completely
+ validated. Receipt of these packets can cause ntpd to crash.
+ Mitigation:
+ Don't use autokey.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Tenable Network Security.
+
+* Clients that receive a KoD should validate the origin timestamp field.
+
+ References: Sec 2901 / CVE-2015-7704, CVE-2015-7705
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:M/Au:N/C:N/I:N/A:P) Base Score: 4.3-5.0 at worst
+ Summary: An ntpd client that honors Kiss-of-Death responses will honor
+ KoD messages that have been forged by an attacker, causing it to
+ delay or stop querying its servers for time updates. Also, an
+ attacker can forge packets that claim to be from the target and
+ send them to servers often enough that a server that implements
+ KoD rate limiting will send the target machine a KoD response to
+ attempt to reduce the rate of incoming packets, or it may also
+ trigger a firewall block at the server for packets from the target
+ machine. For either of these attacks to succeed, the attacker must
+ know what servers the target is communicating with. An attacker
+ can be anywhere on the Internet and can frequently learn the
+ identity of the target's time source by sending the target a
+ time query.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ If you can't upgrade, restrict who can query ntpd to learn who
+ its servers are, and what IPs are allowed to ask your system
+ for the time. This mitigation is heavy-handed.
+ Monitor your ntpd instances.
+ Note:
+ 4.2.8p4 protects against the first attack. For the second attack,
+ all we can do is warn when it is happening, which we do in 4.2.8p4.
+ Credit: This weakness was discovered by Aanchal Malhotra,
+ Issac E. Cohen, and Sharon Goldberg of Boston University.
+
+* configuration directives to change "pidfile" and "driftfile" should
+ only be allowed locally.
+
+ References: Sec 2902 / CVE-2015-5196
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.2 worst case
+ Summary: If ntpd is configured to allow for remote configuration,
+ and if the (possibly spoofed) source IP address is allowed to
+ send remote configuration requests, and if the attacker knows
+ the remote configuration password, it's possible for an attacker
+ to use the "pidfile" or "driftfile" directives to potentially
+ overwrite other files.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page
+ If you cannot upgrade, don't enable remote configuration.
+ If you must enable remote configuration and cannot upgrade,
+ remote configuration of NTF's ntpd requires:
+ - an explicitly configured trustedkey, and you should also
+ configure a controlkey.
+ - access from a permitted IP. You choose the IPs.
+ - authentication. Don't disable it. Practice secure key safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Miroslav Lichvar of Red Hat.
+
+* Slow memory leak in CRYPTO_ASSOC
+
+ References: Sec 2909 / CVE-2015-7701
+ Affects: All ntp-4 releases that use autokey up to, but not
+ including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 0.0 best/usual case,
+ 4.6 otherwise
+ Summary: If ntpd is configured to use autokey, then an attacker can
+ send packets to ntpd that will, after several days of ongoing
+ attack, cause it to run out of memory.
+ Mitigation:
+ Don't use autokey.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Tenable Network Security.
+
+* mode 7 loop counter underrun
+
+ References: Sec 2913 / CVE-2015-7848 / TALOS-CAN-0052
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6
+ Summary: If ntpd is configured to enable mode 7 packets, and if the
+ use of mode 7 packets is not properly protected thru the use of
+ the available mode 7 authentication and restriction mechanisms,
+ and if the (possibly spoofed) source IP address is allowed to
+ send mode 7 queries, then an attacker can send a crafted packet
+ to ntpd that will cause it to crash.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ In ntp-4.2.8, mode 7 is disabled by default. Don't enable it.
+ If you must enable mode 7:
+ configure the use of a requestkey to control who can issue
+ mode 7 requests.
+ configure restrict noquery to further limit mode 7 requests
+ to trusted sources.
+ Monitor your ntpd instances.
+Credit: This weakness was discovered by Aleksandar Nikolic of Cisco Talos.
+
+* memory corruption in password store
+
+ References: Sec 2916 / CVE-2015-7849 / TALOS-CAN-0054
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:C/A:C) Base Score: 6.8, worst case
+ Summary: If ntpd is configured to allow remote configuration, and if
+ the (possibly spoofed) source IP address is allowed to send
+ remote configuration requests, and if the attacker knows the
+ remote configuration password or if ntpd was configured to
+ disable authentication, then an attacker can send a set of
+ packets to ntpd that may cause a crash or theoretically
+ perform a code injection attack.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade, remote configuration of NTF's
+ ntpd requires:
+ an explicitly configured "trusted" key. Only configure
+ this if you need it.
+ access from a permitted IP address. You choose the IPs.
+ authentication. Don't disable it. Practice secure key safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan of Cisco Talos.
+
+* Infinite loop if extended logging enabled and the logfile and
+ keyfile are the same.
+
+ References: Sec 2917 / CVE-2015-7850 / TALOS-CAN-0055
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case
+ Summary: If ntpd is configured to allow remote configuration, and if
+ the (possibly spoofed) source IP address is allowed to send
+ remote configuration requests, and if the attacker knows the
+ remote configuration password or if ntpd was configured to
+ disable authentication, then an attacker can send a set of
+ packets to ntpd that will cause it to crash and/or create a
+ potentially huge log file. Specifically, the attacker could
+ enable extended logging, point the key file at the log file,
+ and cause what amounts to an infinite loop.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade, remote configuration of NTF's ntpd
+ requires:
+ an explicitly configured "trusted" key. Only configure this
+ if you need it.
+ access from a permitted IP address. You choose the IPs.
+ authentication. Don't disable it. Practice secure key safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan of Cisco Talos.
+
+* Potential path traversal vulnerability in the config file saving of
+ ntpd on VMS.
+
+ References: Sec 2918 / CVE-2015-7851 / TALOS-CAN-0062
+ Affects: All ntp-4 releases running under VMS up to, but not
+ including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:P/A:C) Base Score: 5.2, worst case
+ Summary: If ntpd is configured to allow remote configuration, and if
+ the (possibly spoofed) IP address is allowed to send remote
+ configuration requests, and if the attacker knows the remote
+ configuration password or if ntpd was configured to disable
+ authentication, then an attacker can send a set of packets to
+ ntpd that may cause ntpd to overwrite files.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade, remote configuration of NTF's ntpd
+ requires:
+ an explicitly configured "trusted" key. Only configure
+ this if you need it.
+ access from permitted IP addresses. You choose the IPs.
+ authentication. Don't disable it. Practice key security safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan of Cisco Talos.
+
+* ntpq atoascii() potential memory corruption
+
+ References: Sec 2919 / CVE-2015-7852 / TALOS-CAN-0063
+ Affects: All ntp-4 releases running up to, but not including 4.2.8p4,
+ and 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:N/C:N/I:P/A:P) Base Score: 4.0, worst case
+ Summary: If an attacker can figure out the precise moment that ntpq
+ is listening for data and the port number it is listening on or
+ if the attacker can provide a malicious instance ntpd that
+ victims will connect to then an attacker can send a set of
+ crafted mode 6 response packets that, if received by ntpq,
+ can cause ntpq to crash.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade and you run ntpq against a server
+ and ntpq crashes, try again using raw mode. Build or get a
+ patched ntpq and see if that fixes the problem. Report new
+ bugs in ntpq or abusive servers appropriately.
+ If you use ntpq in scripts, make sure ntpq does what you expect
+ in your scripts.
+ Credit: This weakness was discovered by Yves Younan and
+ Aleksander Nikolich of Cisco Talos.
+
+* Invalid length data provided by a custom refclock driver could cause
+ a buffer overflow.
+
+ References: Sec 2920 / CVE-2015-7853 / TALOS-CAN-0064
+ Affects: Potentially all ntp-4 releases running up to, but not
+ including 4.2.8p4, and 4.3.0 up to, but not including 4.3.77
+ that have custom refclocks
+ CVSS: (AV:L/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 usual case,
+ 5.9 unusual worst case
+ Summary: A negative value for the datalen parameter will overflow a
+ data buffer. NTF's ntpd driver implementations always set this
+ value to 0 and are therefore not vulnerable to this weakness.
+ If you are running a custom refclock driver in ntpd and that
+ driver supplies a negative value for datalen (no custom driver
+ of even minimal competence would do this) then ntpd would
+ overflow a data buffer. It is even hypothetically possible
+ in this case that instead of simply crashing ntpd the attacker
+ could effect a code injection attack.
+ Mitigation:
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ If you are running custom refclock drivers, make sure
+ the signed datalen value is either zero or positive.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan of Cisco Talos.
+
+* Password Length Memory Corruption Vulnerability
+
+ References: Sec 2921 / CVE-2015-7854 / TALOS-CAN-0065
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4, and
+ 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:C/I:C/A:C) Base Score: 0.0 best case,
+ 1.7 usual case, 6.8, worst case
+ Summary: If ntpd is configured to allow remote configuration, and if
+ the (possibly spoofed) source IP address is allowed to send
+ remote configuration requests, and if the attacker knows the
+ remote configuration password or if ntpd was (foolishly)
+ configured to disable authentication, then an attacker can
+ send a set of packets to ntpd that may cause it to crash,
+ with the hypothetical possibility of a small code injection.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade, remote configuration of NTF's
+ ntpd requires:
+ an explicitly configured "trusted" key. Only configure
+ this if you need it.
+ access from a permitted IP address. You choose the IPs.
+ authentication. Don't disable it. Practice secure key safety.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Yves Younan and
+ Aleksander Nikolich of Cisco Talos.
+
+* decodenetnum() will ASSERT botch instead of returning FAIL on some
+ bogus values.
+
+ References: Sec 2922 / CVE-2015-7855
+ Affects: All ntp-4 releases up to, but not including 4.2.8p4, and
+ 4.3.0 up to, but not including 4.3.77
+ CVSS: (AV:N/AC:H/Au:M/C:N/I:N/A:C) Base Score: 4.6, worst case
+ Summary: If ntpd is fed a crafted mode 6 or mode 7 packet containing
+ an unusually long data value where a network address is expected,
+ the decodenetnum() function will abort with an assertion failure
+ instead of simply returning a failure condition.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ mode 7 is disabled by default. Don't enable it.
+ Use restrict noquery to limit who can send mode 6
+ and mode 7 requests.
+ Configure and use the controlkey and requestkey
+ authentication directives to limit who can
+ send mode 6 and mode 7 requests.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by John D "Doug" Birdwell of IDA.org.
+
+* NAK to the Future: Symmetric association authentication bypass via
+ crypto-NAK.
+
+ References: Sec 2941 / CVE-2015-7871
+ Affects: All ntp-4 releases between 4.2.5p186 up to but not including
+ 4.2.8p4, and 4.3.0 up to but not including 4.3.77
+ CVSS: (AV:N/AC:L/Au:N/C:N/I:P/A:P) Base Score: 6.4
+ Summary: Crypto-NAK packets can be used to cause ntpd to accept time
+ from unauthenticated ephemeral symmetric peers by bypassing the
+ authentication required to mobilize peer associations. This
+ vulnerability appears to have been introduced in ntp-4.2.5p186
+ when the code handling mobilization of new passive symmetric
+ associations (lines 1103-1165) was refactored.
+ Mitigation:
+ Implement BCP-38.
+ Upgrade to 4.2.8p4, or later, from the NTP Project Download
+ Page or the NTP Public Services Project Download Page.
+ If you are unable to upgrade:
+ Apply the patch to the bottom of the "authentic" check
+ block around line 1136 of ntp_proto.c.
+ Monitor your ntpd instances.
+ Credit: This weakness was discovered by Stephen Gray <stepgray@cisco.com>.
+
+Backward-Incompatible changes:
+* [Bug 2817] Default on Linux is now "rlimit memlock -1".
+While the general default of 32M is still the case, under Linux
+the default value has been changed to -1 (do not lock ntpd into
+ memory). A value of 0 means "lock ntpd into memory with whatever
+ memory it needs." If your ntp.conf file has an explicit "rlimit memlock"
+ value in it, that value will continue to be used.
+
+* [Bug 2886] Misspelling: "outlyer" should be "outlier".
+ If you've written a script that looks for this case in, say, the
+ output of ntpq, you probably want to change your regex matches
+ from 'outlyer' to 'outl[iy]er'.
+
+New features in this release:
+* 'rlimit memlock' now has finer-grained control. A value of -1 means
+ "don't lock ntpd into memore". This is the default for Linux boxes.
+ A value of 0 means "lock ntpd into memory" with no limits. Otherwise
+ the value is the number of megabytes of memory to lock. The default
+ is 32 megabytes.
+
+* The old Google Test framework has been replaced with a new framework,
+ based on http://www.throwtheswitch.org/unity/ .
+
+Bug Fixes and Improvements:
+* [Bug 2332] (reopened) Exercise thread cancellation once before dropping
+ privileges and limiting resources in NTPD removes the need to link
+ forcefully against 'libgcc_s' which does not always work. J.Perlinger
+* [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn.
+* [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn.
+* [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn.
+* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c. perlinger@ntp.org
+* [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn.
+* [Bug 2849] Systems with more than one default route may never
+ synchronize. Brian Utterback. Note that this patch might need to
+ be reverted once Bug 2043 has been fixed.
+* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger
+* [Bug 2866] segmentation fault at initgroups(). Harlan Stenn.
+* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger
+* [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn
+* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
+* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must
+ be configured for the distribution targets. Harlan Stenn.
+* [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar.
+* [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org
+* [Bug 2888] streamline calendar functions. perlinger@ntp.org
+* [Bug 2889] ntp-dev-4.3.67 does not build on Windows. perlinger@ntp.org
+* [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov.
+* [Bug 2906] make check needs better support for pthreads. Harlan Stenn.
+* [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn.
+* [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn.
+* libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn.
+* Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
+* tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn.
+* Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn.
+* On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn.
+* top_srcdir can change based on ntp v. sntp. Harlan Stenn.
+* sntp/tests/ function parameter list cleanup. Damir Tomić.
+* tests/libntp/ function parameter list cleanup. Damir Tomić.
+* tests/ntpd/ function parameter list cleanup. Damir Tomić.
+* sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn.
+* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. H.Stenn.
+* tests/libntp/timevalops.c and timespecops.c fixed error printing. D.Tomić.
+* tests/libntp/ improvements in code and fixed error printing. Damir Tomić.
+* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c,
+ caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed
+ formatting; first declaration, then code (C90); deleted unnecessary comments;
+ changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich
+* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments,
+ fix formatting, cleanup. Tomasz Flendrich
+* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting.
+ Tomasz Flendrich
+* tests/libntp/statestr.c remove empty functions, remove unnecessary include,
+ fix formatting. Tomasz Flendrich
+* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich
+* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich
+* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting.
+ Tomasz Flendrich
+* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich
+* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich
+* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich
+* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich
+* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich
+* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting.
+* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include,
+fixed formatting. Tomasz Flendrich
+* tests/libntp/timespecops.c fixed formatting, fixed the order of includes,
+ removed unnecessary comments, cleanup. Tomasz Flendrich
+* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary
+ comments, cleanup. Tomasz Flendrich
+* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting.
+ Tomasz Flendrich
+* tests/libntp/lfptest.h cleanup. Tomasz Flendrich
+* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich
+* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting.
+ Tomasz Flendrich
+* sntp/tests/kodDatabase.c added consts, deleted empty function,
+ fixed formatting. Tomasz Flendrich
+* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich
+* sntp/tests/packetHandling.c is now using proper Unity's assertions,
+ fixed formatting, deleted unused variable. Tomasz Flendrich
+* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting.
+ Tomasz Flendrich
+* sntp/tests/packetProcessing.c changed from sprintf to snprintf,
+ fixed formatting. Tomasz Flendrich
+* sntp/tests/utilities.c is now using proper Unity's assertions, changed
+ the order of includes, fixed formatting, removed unnecessary comments.
+ Tomasz Flendrich
+* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich
+* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem,
+ made one function do its job, deleted unnecessary prints, fixed formatting.
+ Tomasz Flendrich
+* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich
+* sntp/unity/unity_config.h: Distribute it. Harlan Stenn.
+* sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn.
+* sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn.
+* sntp/unity/unity.c: Clean up a printf(). Harlan Stenn.
+* Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn.
+* Don't build sntp/libevent/sample/. Harlan Stenn.
+* tests/libntp/test_caltontp needs -lpthread. Harlan Stenn.
+* br-flock: --enable-local-libevent. Harlan Stenn.
+* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich
+* scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn.
+* Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn.
+* Code cleanup. Harlan Stenn.
+* libntp/icom.c: Typo fix. Harlan Stenn.
+* util/ntptime.c: initialization nit. Harlan Stenn.
+* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn.
+* Add std_unity_tests to various Makefile.am files. Harlan Stenn.
+* ntpd/ntp_restrict.c: added a few assertions, created tests for this file.
+ Tomasz Flendrich
+* Changed progname to be const in many files - now it's consistent. Tomasz
+ Flendrich
+* Typo fix for GCC warning suppression. Harlan Stenn.
+* Added tests/ntpd/ntp_scanner.c test. Damir Tomić.
+* Added declarations to all Unity tests, and did minor fixes to them.
+ Reduced the number of warnings by half. Damir Tomić.
+* Updated generate_test_runner.rb and updated the sntp/unity/auto directory
+ with the latest Unity updates from Mark. Damir Tomić.
+* Retire google test - phase I. Harlan Stenn.
+* Unity test cleanup: move declaration of 'initializing'. Harlan Stenn.
+* Update the NEWS file. Harlan Stenn.
+* Autoconf cleanup. Harlan Stenn.
+* Unit test dist cleanup. Harlan Stenn.
+* Cleanup various test Makefile.am files. Harlan Stenn.
+* Pthread autoconf macro cleanup. Harlan Stenn.
+* Fix progname definition in unity runner scripts. Harlan Stenn.
+* Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn.
+* Update the patch for bug 2817. Harlan Stenn.
+* More updates for bug 2817. Harlan Stenn.
+* Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn.
+* gcc on older HPUX may need +allowdups. Harlan Stenn.
+* Adding missing MCAST protection. Harlan Stenn.
+* Disable certain test programs on certain platforms. Harlan Stenn.
+* Implement --enable-problem-tests (on by default). Harlan Stenn.
+* build system tweaks. Harlan Stenn.
+
+---
NTP 4.2.8p3 (Harlan Stenn <stenn@ntp.org>, 2015/06/29)
Focus: 1 Security fix. Bug fixes and enhancements. Leap-second improvements.
diff --git a/contrib/ntp/aclocal.m4 b/contrib/ntp/aclocal.m4
index bbc54be40406..0c81f43706bb 100644
--- a/contrib/ntp/aclocal.m4
+++ b/contrib/ntp/aclocal.m4
@@ -1355,6 +1355,7 @@ m4_include([sntp/m4/ntp_lineeditlibs.m4])
m4_include([sntp/m4/ntp_locinfo.m4])
m4_include([sntp/m4/ntp_openssl.m4])
m4_include([sntp/m4/ntp_pkg_config.m4])
+m4_include([sntp/m4/ntp_problemtests.m4])
m4_include([sntp/m4/ntp_prog_cc.m4])
m4_include([sntp/m4/ntp_rlimit.m4])
m4_include([sntp/m4/ntp_sntp.m4])
diff --git a/contrib/ntp/adjtimed/Makefile.in b/contrib/ntp/adjtimed/Makefile.in
index 716b9401e542..7a546ef2fe3c 100644
--- a/contrib/ntp/adjtimed/Makefile.in
+++ b/contrib/ntp/adjtimed/Makefile.in
@@ -124,6 +124,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -229,6 +230,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -237,6 +239,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -298,6 +301,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/adjtimed/adjtimed.c b/contrib/ntp/adjtimed/adjtimed.c
index f38e66dd0f75..fd28dfb1be07 100644
--- a/contrib/ntp/adjtimed/adjtimed.c
+++ b/contrib/ntp/adjtimed/adjtimed.c
@@ -58,7 +58,7 @@ void Exit (int);
/* emacs cc-mode goes nuts if we split the next line... */
#define tvtod(tv) ((double)tv.tv_sec + ((double)tv.tv_usec / (double)MILLION))
-char *progname = NULL;
+char const *progname = NULL;
int verbose = 0;
int sysdebug = 0;
static int mqid;
diff --git a/contrib/ntp/clockstuff/Makefile.in b/contrib/ntp/clockstuff/Makefile.in
index 0236354805cf..e75f4c047409 100644
--- a/contrib/ntp/clockstuff/Makefile.in
+++ b/contrib/ntp/clockstuff/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -224,6 +225,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -232,6 +234,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -293,6 +296,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/clockstuff/chutest.c b/contrib/ntp/clockstuff/chutest.c
index 488a0d16e0ff..78f6c5fe9818 100644
--- a/contrib/ntp/clockstuff/chutest.c
+++ b/contrib/ntp/clockstuff/chutest.c
@@ -56,7 +56,7 @@ struct chucode {
#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-char *progname;
+char const *progname;
int dofilter = 0; /* set to 1 when we should run filter algorithm */
int showtimes = 0; /* set to 1 when we should show char arrival times */
diff --git a/contrib/ntp/clockstuff/propdelay.c b/contrib/ntp/clockstuff/propdelay.c
index 52c20320cdc4..a3b9fc0b2850 100644
--- a/contrib/ntp/clockstuff/propdelay.c
+++ b/contrib/ntp/clockstuff/propdelay.c
@@ -117,7 +117,7 @@ int Cflag = 0;
int Gflag = 0;
int height;
-char *progname;
+char const *progname;
static void doit (double, double, double, double, double, char *);
static double latlong (char *, int);
diff --git a/contrib/ntp/configure b/contrib/ntp/configure
index 1d686cbdcba8..04813a8d5245 100755
--- a/contrib/ntp/configure
+++ b/contrib/ntp/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ntp 4.2.8p3.
+# Generated by GNU Autoconf 2.69 for ntp 4.2.8p4.
#
# Report bugs to <http://bugs.ntp.org./>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ntp'
PACKAGE_TARNAME='ntp'
-PACKAGE_VERSION='4.2.8p3'
-PACKAGE_STRING='ntp 4.2.8p3'
+PACKAGE_VERSION='4.2.8p4'
+PACKAGE_STRING='ntp 4.2.8p4'
PACKAGE_BUGREPORT='http://bugs.ntp.org./'
PACKAGE_URL='http://www.ntp.org./'
@@ -639,6 +639,12 @@ LTLIBOBJS
subdirs
PERLLIBDIR
NTP_KEYSDIR
+BUILD_TEST_NTP_SIGND_FALSE
+BUILD_TEST_NTP_SIGND_TRUE
+BUILD_TEST_NTP_SCANNER_FALSE
+BUILD_TEST_NTP_SCANNER_TRUE
+BUILD_TEST_NTP_RESTRICT_FALSE
+BUILD_TEST_NTP_RESTRICT_TRUE
GTEST_AVAILABLE_FALSE
GTEST_AVAILABLE_TRUE
GTEST_CPPFLAGS
@@ -689,6 +695,8 @@ PTHREADS_FALSE
PTHREADS_TRUE
LIBISC_PTHREADS_NOTHREADS
PTHREAD_LIBS
+LTHREAD_LIBS
+BUILD_THREAD
HAVE_INLINE
LDADD_LIBUTIL
ALLOCA
@@ -701,6 +709,7 @@ BUILD_LIBEVENT_FALSE
BUILD_LIBEVENT_TRUE
LDADD_LIBEVENT
CPPFLAGS_LIBEVENT
+CFLAGS_LIBEVENT
PKG_CONFIG
LIBOPTS_DIR
LIBOPTS_CFLAGS
@@ -1050,6 +1059,7 @@ enable_getifaddrs
enable_saveconfig
enable_leap_smear
with_gtest
+enable_problem_tests
'
ac_precious_vars='build_alias
host_alias
@@ -1606,7 +1616,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.8p3 to adapt to many kinds of systems.
+\`configure' configures ntp 4.2.8p4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1676,7 +1686,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ntp 4.2.8p3:";;
+ short | recursive ) echo "Configuration of ntp 4.2.8p4:";;
esac
cat <<\_ACEOF
@@ -1724,7 +1734,7 @@ Optional Features and Packages:
--enable-libseccomp EXPERIMENTAL: enable support for libseccomp
sandboxing (default is no)
--with-stack-limit ? =50 (200 for openbsd) 4k pages
- --with-memlock ? =32 (megabytes)
+ --with-memlock ? =32 (-1 on linux) megabytes
--enable-debug-timing - include processing time debugging code (costs
performance)
--enable-dst-minutes =60 minutes per DST adjustment
@@ -1821,6 +1831,7 @@ Optional Features and Packages:
--enable-saveconfig + saveconfig mechanism
--enable-leap-smear - experimental leap smear code
--with-gtest Use the gtest framework (Default: if it's available)
+ --enable-problem-tests + enable tests with undiagnosed problems
Some influential environment variables:
CC C compiler command
@@ -1908,7 +1919,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ntp configure 4.2.8p3
+ntp configure 4.2.8p4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2738,7 +2749,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.8p3, which was
+It was created by ntp $as_me 4.2.8p4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3117,6 +3128,12 @@ 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.
+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
+
@@ -3733,7 +3750,7 @@ fi
# Define the identity of the package.
PACKAGE='ntp'
- VERSION='4.2.8p3'
+ VERSION='4.2.8p4'
cat >>confdefs.h <<_ACEOF
@@ -6768,7 +6785,7 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
$as_echo_n "checking additional compiler flags... " >&6; }
- # allow ntp_os_flags to be preset to skip this stuff
+ # allow ntp_os_cflags to be preset to skip this stuff
case "${ntp_os_cflags+set}" in
set)
;;
@@ -6856,7 +6873,7 @@ $as_echo_n "checking additional compiler flags... " >&6; }
;;
esac
esac
- case "$ntp_os_flags" in
+ case "$ntp_os_cflags" in
'')
ntp_os_cflags_msg="none needed"
;;
@@ -6867,6 +6884,38 @@ $as_echo_n "checking additional compiler flags... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
$as_echo "$ntp_os_cflags_msg" >&6; }
{ ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
+ ###
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
+$as_echo_n "checking additional linker flags... " >&6; }
+ # HMS: The following might still need tweaking
+ # allow ntp_os_ldflags to be preset to skip this stuff
+ case "${ntp_os_ldflags+set}" in
+ set)
+ ;;
+ *)
+ ntp_os_ldflags=
+ case "$host_os" in
+ hpux*)
+ case "$GCC" in
+ yes)
+ ntp_os_ldflags="-Wl,+allowdups"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case "$ntp_os_ldflags" in
+ '')
+ ntp_os_ldflags_msg="none needed"
+ ;;
+ *)
+ ntp_os_ldflags_msg="$ntp_os_ldflags"
+ esac
+ LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
+$as_echo "$ntp_os_ldflags_msg" >&6; }
+ { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
@@ -19945,6 +19994,7 @@ ntp_libevent_tearoff=sntp/libevent
+
case "$ntp_use_local_libevent" in
yes)
;;
@@ -19958,6 +20008,7 @@ $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed
ntp_use_local_libevent=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
$as_echo "$as_me: Using the installed libevent" >&6;}
+ CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
# HMS: I hope the following is accurate.
# We don't need -levent, we only need -levent_core.
@@ -19987,6 +20038,9 @@ $as_echo "$as_me: Using the installed libevent" >&6;}
$as_echo "yes" >&6; }
else
ntp_use_local_libevent=yes
+ # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
+ # is "pthreads"?
+ CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -20012,6 +20066,7 @@ $as_echo "$as_me: Using libevent tearoff" >&6;}
esac
esac
+
if test "x$ntp_use_local_libevent" = "xyes"; then
BUILD_LIBEVENT_TRUE=
BUILD_LIBEVENT_FALSE='#'
@@ -22941,7 +22996,8 @@ fi
have_pthreads=no
case "$enable_thread_support" in
- yes)
+ no) ;;
+ *)
ol_found_pthreads=no
@@ -26358,6 +26414,9 @@ $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
+$as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
+
if test $ol_link_threads != no ; then
LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
@@ -27398,6 +27457,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
case "$ol_found_pthreads" in
yes)
saved_LIBS="$LIBS"
@@ -27423,56 +27486,6 @@ done
yes)
PTHREAD_LIBS="$LTHREAD_LIBS"
have_pthreads=yes
- # Bug 2332: With GCC we need to force a reference to libgcc_s
- # (if libgcc_s exists) or the combination of
- # threads + setuid + mlockall does not work on linux because
- # thread cancellation fails to load libgcc_s with dlopen().
- # We have to pass this all as linker options to avoid argument
- # reordering by libtool.
- case "$GCC$with_gnu_ld" in
- yesyes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -lgcc_s" >&5
-$as_echo_n "checking for exit in -lgcc_s... " >&6; }
-if ${ac_cv_lib_gcc_s_exit+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgcc_s $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 exit ();
-int
-main ()
-{
-return exit ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_gcc_s_exit=yes
-else
- ac_cv_lib_gcc_s_exit=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_gcc_s_exit" >&5
-$as_echo "$ac_cv_lib_gcc_s_exit" >&6; }
-if test "x$ac_cv_lib_gcc_s_exit" = xyes; then :
- PTHREAD_LIBS="$LTHREAD_LIBS -Wl,--no-as-needed,-lgcc_s,--as-needed"
-fi
-
- ;;
- esac
esac
esac
esac
@@ -31236,10 +31249,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_memlock" >&5
$as_echo "$ntp_cv_rlimit_memlock" >&6; }
+case "$host" in
+ *-*-*linux*)
+ ntp_dflt_rlimit_memlock="-1" ;;
+ *) ntp_dflt_rlimit_memlock="32" ;;
+esac
case "$ntp_cv_rlimit_memlock" in
yes)
- HAVE_RLIMIT_MEMLOCK=" memlock 32"
+ HAVE_RLIMIT_MEMLOCK=" memlock $ntp_dflt_rlimit_memlock" ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_STACK" >&5
@@ -31288,8 +31306,6 @@ case "$ntp_cv_rlimit_stack" in
HAVE_RLIMIT_STACK=" stacksize 50"
esac
-
-
# HMS: Only if we are doing the MLOCKALL stuff...
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default number of 4k stack pages" >&5
$as_echo_n "checking for the default number of 4k stack pages... " >&6; }
@@ -31339,7 +31355,7 @@ fi
case "$ans" in
yes | no)
- ans=32
+ ans=$ntp_dflt_rlimit_memlock
;;
[1-9][0-9]*) ;;
*) as_fn_error $? "\"--with-memlock requires an integer argument.\"" "$LINENO" 5
@@ -31354,6 +31370,7 @@ _ACEOF
+
# some OSes prefer _exit() in forked children to exit()
for ac_func in _exit
do :
@@ -36995,6 +37012,81 @@ fi
+
+case "$build" in
+ $host) cross=0 ;;
+ *) cross=1 ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
+$as_echo_n "checking if we want to enable tests with undiagnosed problems... " >&6; }
+# Check whether --enable-problem-tests was given.
+if test "${enable_problem_tests+set}" = set; then :
+ enableval=$enable_problem_tests; ntp_ept=$enableval
+else
+ ntp_ept=yes
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ept" >&5
+$as_echo "$ntp_ept" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_restrict" >&5
+$as_echo_n "checking if we can run test-ntp_restrict... " >&6; }
+ntp_test_ntp_restrict="no"
+case "$ntp_ept:$cross:$host" in
+ no:0:*-*-solaris*) ;;
+ no:0:*-*-hpux-11.23*) ;;
+ *) ntp_test_ntp_restrict="yes" ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_restrict" >&5
+$as_echo "$ntp_test_ntp_restrict" >&6; }
+ if test x$ntp_test_ntp_restrict = xyes; then
+ BUILD_TEST_NTP_RESTRICT_TRUE=
+ BUILD_TEST_NTP_RESTRICT_FALSE='#'
+else
+ BUILD_TEST_NTP_RESTRICT_TRUE='#'
+ BUILD_TEST_NTP_RESTRICT_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_scanner" >&5
+$as_echo_n "checking if we can run test-ntp_scanner... " >&6; }
+ntp_test_ntp_scanner="no"
+case "$ntp_ept:$cross:$host" in
+ no:0:*-*-solaris*) ;;
+ *) ntp_test_ntp_scanner="yes" ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_scanner" >&5
+$as_echo "$ntp_test_ntp_scanner" >&6; }
+ if test x$ntp_test_ntp_scanner = xyes; then
+ BUILD_TEST_NTP_SCANNER_TRUE=
+ BUILD_TEST_NTP_SCANNER_FALSE='#'
+else
+ BUILD_TEST_NTP_SCANNER_TRUE='#'
+ BUILD_TEST_NTP_SCANNER_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_signd" >&5
+$as_echo_n "checking if we can run test-ntp_signd... " >&6; }
+ntp_test_ntp_signd="no"
+case "$ntp_ept:$cross:$host" in
+ no:0:*-*-solaris*) ;;
+ *) ntp_test_ntp_signd="yes" ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_signd" >&5
+$as_echo "$ntp_test_ntp_signd" >&6; }
+ if test x$ntp_test_ntp_signd = xyes; then
+ BUILD_TEST_NTP_SIGND_TRUE=
+ BUILD_TEST_NTP_SIGND_FALSE='#'
+else
+ BUILD_TEST_NTP_SIGND_TRUE='#'
+ BUILD_TEST_NTP_SIGND_FALSE=
+fi
+
+
+
###
@@ -37091,6 +37183,8 @@ ac_config_files="$ac_config_files tests/libntp/Makefile"
ac_config_files="$ac_config_files tests/ntpd/Makefile"
+ac_config_files="$ac_config_files tests/ntpq/Makefile"
+
ac_config_files="$ac_config_files tests/sandbox/Makefile"
ac_config_files="$ac_config_files tests/sec-2853/Makefile"
@@ -37333,6 +37427,18 @@ if test -z "${GTEST_AVAILABLE_TRUE}" && test -z "${GTEST_AVAILABLE_FALSE}"; then
as_fn_error $? "conditional \"GTEST_AVAILABLE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${BUILD_TEST_NTP_RESTRICT_TRUE}" && test -z "${BUILD_TEST_NTP_RESTRICT_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_TEST_NTP_RESTRICT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_TEST_NTP_SCANNER_TRUE}" && test -z "${BUILD_TEST_NTP_SCANNER_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_TEST_NTP_SCANNER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_TEST_NTP_SIGND_TRUE}" && test -z "${BUILD_TEST_NTP_SIGND_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_TEST_NTP_SIGND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -37730,7 +37836,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.8p3, which was
+This file was extended by ntp $as_me 4.2.8p4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -37797,7 +37903,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.8p3
+ntp config.status 4.2.8p4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -38344,6 +38450,7 @@ do
"tests/bug-2803/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bug-2803/Makefile" ;;
"tests/libntp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libntp/Makefile" ;;
"tests/ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpd/Makefile" ;;
+ "tests/ntpq/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpq/Makefile" ;;
"tests/sandbox/Makefile") CONFIG_FILES="$CONFIG_FILES tests/sandbox/Makefile" ;;
"tests/sec-2853/Makefile") CONFIG_FILES="$CONFIG_FILES tests/sec-2853/Makefile" ;;
"util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
diff --git a/contrib/ntp/configure.ac b/contrib/ntp/configure.ac
index de6043015b17..42e18a49fe37 100644
--- a/contrib/ntp/configure.ac
+++ b/contrib/ntp/configure.ac
@@ -11,6 +11,7 @@ AC_INIT(
)
AC_CONFIG_MACRO_DIR([sntp/m4])
AC_CONFIG_AUX_DIR([sntp/libevent/build-aux])
+AC_LANG([C])
AC_PRESERVE_HELP_ORDER
@@ -928,60 +929,6 @@ esac
NTP_RLIMIT_ITEMS
-# HMS: Only if we are doing the MLOCKALL stuff...
-AC_MSG_CHECKING([for the default number of 4k stack pages])
-AC_ARG_WITH(
- [stack-limit],
- [AS_HELP_STRING(
- [--with-stack-limit],
- [? =50 (200 for openbsd) 4k pages]
- )],
- [ans=$withval],
- [ans=yes]
-)
-case "$ans" in
- yes | no)
- case "$host" in
- *-*-openbsd*)
- ans=200
- ;;
- *) ans=50
- ;;
- esac
- ;;
- [[1-9]][[0-9]]*)
- ;;
- *) AC_MSG_ERROR(["--with-stack-limit requires an integer argument."])
- ;;
-esac
-AC_MSG_RESULT([$ans])
-AC_DEFINE_UNQUOTED([DFLT_RLIMIT_STACK], [$ans],
- [Default number of 4k pages for RLIMIT_STACK])
-
-# HMS: only if we have RLIMIT_MEMLOCK
-AC_MSG_CHECKING([for the default number of megabytes to MEMLOCK])
-AC_ARG_WITH(
- [memlock],
- [AS_HELP_STRING(
- [--with-memlock],
- [? =32 (megabytes)]
- )],
- [ans=$withval],
- [ans=yes]
-)
-case "$ans" in
- yes | no)
- ans=32
- ;;
- [[1-9]][[0-9]]*) ;;
- *) AC_MSG_ERROR(["--with-memlock requires an integer argument."])
- ;;
-esac
-AC_MSG_RESULT([$ans])
-AC_DEFINE_UNQUOTED([DFLT_RLIMIT_MEMLOCK], [$ans],
- [Default number of megabytes for RLIMIT_MEMLOCK])
-
-
# some OSes prefer _exit() in forked children to exit()
AC_CHECK_FUNCS([_exit])
ntp_worker_child_exit=exit
@@ -4382,6 +4329,8 @@ dnl require a C++ compiler only if we will use gtest, but AC_PROG_CXX
dnl can't be conditionalized.
NTP_GOOGLETEST
+NTP_PROBLEM_TESTS
+
###
AC_DEFINE_DIR([NTP_KEYSDIR], [sysconfdir],
@@ -4425,6 +4374,7 @@ AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([tests/bug-2803/Makefile])
AC_CONFIG_FILES([tests/libntp/Makefile])
AC_CONFIG_FILES([tests/ntpd/Makefile])
+AC_CONFIG_FILES([tests/ntpq/Makefile])
AC_CONFIG_FILES([tests/sandbox/Makefile])
AC_CONFIG_FILES([tests/sec-2853/Makefile])
AC_CONFIG_FILES([util/Makefile])
diff --git a/contrib/ntp/html/decode.html b/contrib/ntp/html/decode.html
index 51603ad67aae..a15046f3f22b 100644
--- a/contrib/ntp/html/decode.html
+++ b/contrib/ntp/html/decode.html
@@ -11,7 +11,7 @@
<img src="pic/alice47.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
<p>Caterpillar knows all the error codes, which is more than most of us do.</p>
<p>Last update:
- <!-- #BeginDate format:En2m -->16-Jul-2014 04:48<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->26-Jul-2015 06:26<!-- #EndDate -->
UTC</p>
</p>
<br clear="left">
@@ -296,7 +296,7 @@
</tr>
<tr>
<td><tt>3</tt></td>
- <td><tt>sel_outlyer</tt></td>
+ <td><tt>sel_outlier</tt></td>
<td><tt>-</tt></td>
<td>discarded by the cluster algorithm</td>
</tr>
diff --git a/contrib/ntp/html/miscopt.html b/contrib/ntp/html/miscopt.html
index ac32419df08a..c6190222bf96 100644
--- a/contrib/ntp/html/miscopt.html
+++ b/contrib/ntp/html/miscopt.html
@@ -11,7 +11,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 -->29-Jun-2015 05:56<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->23-Sep-2015 10:20<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
@@ -105,7 +105,7 @@
<dd>
<dl>
<dt><tt>memlock <i>Nmegabytes</i></tt></dt>
- <dd>Specify the number of megabytes of memory that can be allocated. Probably only available under Linux, this option is useful when dropping root (the <tt>-i</tt> option). The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.</dd>
+ <dd>Specify the number of megabytes of memory that should be allocated and locked. Probably only available under Linux, this option may be useful when dropping root (the <tt>-i</tt> option). The default is 32 megabytes on non-Linux machines, and -1 under Linux. -1 means "do not lock the process into memory". 0 means "lock whatever memory the process wants into memory".</dd>
<dt><tt>stacksize <i>N4kPages</i></tt></dt>
<dd>Specifies the maximum size of the process stack on systems with the <tt>mlockall()</tt> function. Defaults to 50 4k pages (200 4k pages in OpenBSD).</dd>
<dt><tt>filenum <i>Nfiledescriptors</i></tt></dt>
diff --git a/contrib/ntp/html/stats.html b/contrib/ntp/html/stats.html
index 943851773c17..c5bc34c41612 100644
--- a/contrib/ntp/html/stats.html
+++ b/contrib/ntp/html/stats.html
@@ -7,9 +7,9 @@
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
-<h3>Performance Metrics</h3>
+<h3>Performance Metrics</h3>
<p>Last update:
- <!-- #BeginDate format:En2m -->10-Mar-2014 05:23<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->26-Jul-2015 06:29<!-- #EndDate -->
UTC</p>
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/special.txt"></script>
@@ -25,45 +25,45 @@
<p>This page describes several statistics provided in the NTP specification and reference implementation and how they determine the accuracy and error measured during routine and exceptional operation. These statistics provide the following information.</p>
<ul>
- <li>Nominal estimate of the server clock time relative to the client clock time. This is called <em>clock offset</em> symbolized by the Greek letter &theta;.</li>
- <li>Roundtrip system and network delay measured by the on-wire protocol. This is call <em>roundtrip delay</em> symbolized by the Greek letter &delta;.</li>
- <li>Potential clock offset error due to the maximum uncorrected system clock frequency error. This is called <em>dispersion</em> symbolized by the Greek letter &epsilon;.</li>
- <li>Expected error, consisting of the root mean square (RMS) nominal clock offset sample differencess in a sliding window of several samples. This is called <em>jitter</em> symbolized by the Greek letter &phi;.</li>
+ <li>Nominal estimate of the server clock time relative to the client clock time. This is called <em>clock offset</em> symbolized by the Greek letter &theta;.</li>
+ <li>Roundtrip system and network delay measured by the on-wire protocol. This is call <em>roundtrip delay</em> symbolized by the Greek letter &delta;.</li>
+ <li>Potential clock offset error due to the maximum uncorrected system clock frequency error. This is called <em>dispersion</em> symbolized by the Greek letter &epsilon;.</li>
+ <li>Expected error, consisting of the root mean square (RMS) nominal clock offset sample differencess in a sliding window of several samples. This is called <em>jitter</em> symbolized by the Greek letter &phi;.</li>
</ul>
<p> Figure 1 shows how the various measured statistics are collected and compiled to calibrate NTP performance.</p>
<div align="center">
<img src="pic/stats.gif" alt="gif">
<p>Figure 1. Statistics Budget</p>
</div>
-<p>The data represented in boxes labeled Server are contained in fields in packet received from the server. The data represented in boxes labeled Peer are computed by the on-wire protocol, as described below. The algorithms of the box labeled Selection and Combining Algorithms process the peer data to select a system peer. The System box represents summary data inherited from the system peer. These data are available to application programs and dependent downstream clients.</p>
+<p>The data represented in boxes labeled Server are contained in fields in packet received from the server. The data represented in boxes labeled Peer are computed by the on-wire protocol, as described below. The algorithms of the box labeled Selection and Combining Algorithms process the peer data to select a system peer. The System box represents summary data inherited from the system peer. These data are available to application programs and dependent downstream clients.</p>
<h4 id="budget">2. Statistics Summary</h4>
-<p>Each NTP synchronization source is characterized by the offset &theta; and delay &delta; samples measured by the on-wire protocol, as described on the <a href="warp.html">How NTP Works</a> page. In addition, the dispersion &epsilon; sample is initialized with the sum of the source precision &rho;<sub>R</sub> and the client precision &rho; (not shown) as each source packet is received. The dispersion increases at a rate of 15 &mu;s/s after that. For this purpose, the precision is equal to the latency to read the system clock. The offset, delay and dispersion are called the sample statistics.</p>
+<p>Each NTP synchronization source is characterized by the offset &theta; and delay &delta; samples measured by the on-wire protocol, as described on the <a href="warp.html">How NTP Works</a> page. In addition, the dispersion &epsilon; sample is initialized with the sum of the source precision &rho;<sub>R</sub> and the client precision &rho; (not shown) as each source packet is received. The dispersion increases at a rate of 15 &mu;s/s after that. For this purpose, the precision is equal to the latency to read the system clock. The offset, delay and dispersion are called the sample statistics.</p>
<blockquote>
- <p>Note. In very fast networks where the client clock frequency is not within 1 PPM or so of the the server clock frequency, the roundtrip delay may have small negative values. This is usually a temporary condition when the client is first started. When using the roundtrip delay in calculations, negative values are assumed zero.</p>
+ <p>Note. In very fast networks where the client clock frequency is not within 1 PPM or so of the the server clock frequency, the roundtrip delay may have small negative values. This is usually a temporary condition when the client is first started. When using the roundtrip delay in calculations, negative values are assumed zero.</p>
</blockquote>
-<p> In a window of eight (offset, delay, dispersion) samples, the algorithm described on the <a href="filter.html">Clock Filter Algorithm</a> page selects the sample with minimum delay, which generally represents the most accurate offset statistic. The selected offset sample determines the <em>peer offset</em> and <em>peer delay </em>statistics. The <em>peer dispersion</em> is a weighted average of the dispersion samples in the window. These quantities are recalculated as each update is received from the source. Between updates, both the sample dispersion and peer dispersion continue to grow at the same rate, 15 &mu;s/s. Finally, the <em>peer jitter</em> &phi; is determined as the RMS differences between the offset samples in the window relative to the selected offset sample. The peer statistics are recorded by the <tt>peerstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. Peer variables are displayed by the <tt>rv</tt> command of the <a href="ntpq.html#peer"><tt>ntpq</tt></a> program.</p>
-<p> The clock filter algorithm continues to process updates in this way until the source is no longer reachable. Reachability is determined by an eight-bit shift register, which is shifted left by one bit as each poll packet is sent, with 0 replacing the vacated rightmost bit. Each time a valid update is received, the rightmost bit is set to 1. The source is considered reachable if any bit is set to 1 in the register; otherwise, it is considered unreachable. When a source becomes unreachable, a dummy sample with &quot;infinite&quot; dispersion is inserted in the filter window at each poll, thus displacing old samples. This causes the peer dispersion to increase eventually to infinity.</p>
-<p>The composition of the source population and the system peer selection is redetermined as each update from each source is received. The system peer and system variables are determined as described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The system variables &Theta;, &Delta;, &Epsilon; and &Phi; are updated from the system peer variables of the same name and the system stratum set one greater than the system peer stratum. The system statistics are recorded by the <tt>loopstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. System variables are displayed by the <tt>rv</tt> command of the <a href="ntpq.html#system"><tt>ntpq</tt></a> program.</p>
-<p>Although it might seem counterintuitive, a cardinal rule in the selection process is, once a sample has been selected by the clock filter algorithm, older samples are no longer selectable. This applies also to the clock select algorithm. Once the peer variables for a source have been selected, older variables of the same or other sources are no longer selectable. The reason for these rules is to limit the time delay in the clock discipline algorithm. This is necessary to preserve the optimum impulse response and thus the risetime and overshoot.</p>
+<p> In a window of eight (offset, delay, dispersion) samples, the algorithm described on the <a href="filter.html">Clock Filter Algorithm</a> page selects the sample with minimum delay, which generally represents the most accurate offset statistic. The selected offset sample determines the <em>peer offset</em> and <em>peer delay </em>statistics. The <em>peer dispersion</em> is a weighted average of the dispersion samples in the window. These quantities are recalculated as each update is received from the source. Between updates, both the sample dispersion and peer dispersion continue to grow at the same rate, 15 &mu;s/s. Finally, the <em>peer jitter</em> &phi; is determined as the RMS differences between the offset samples in the window relative to the selected offset sample. The peer statistics are recorded by the <tt>peerstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. Peer variables are displayed by the <tt>rv</tt> command of the <a href="ntpq.html#peer"><tt>ntpq</tt></a> program.</p>
+<p> The clock filter algorithm continues to process updates in this way until the source is no longer reachable. Reachability is determined by an eight-bit shift register, which is shifted left by one bit as each poll packet is sent, with 0 replacing the vacated rightmost bit. Each time a valid update is received, the rightmost bit is set to 1. The source is considered reachable if any bit is set to 1 in the register; otherwise, it is considered unreachable. When a source becomes unreachable, a dummy sample with &quot;infinite&quot; dispersion is inserted in the filter window at each poll, thus displacing old samples. This causes the peer dispersion to increase eventually to infinity.</p>
+<p>The composition of the source population and the system peer selection is redetermined as each update from each source is received. The system peer and system variables are determined as described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The system variables &Theta;, &Delta;, &Epsilon; and &Phi; are updated from the system peer variables of the same name and the system stratum set one greater than the system peer stratum. The system statistics are recorded by the <tt>loopstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. System variables are displayed by the <tt>rv</tt> command of the <a href="ntpq.html#system"><tt>ntpq</tt></a> program.</p>
+<p>Although it might seem counterintuitive, a cardinal rule in the selection process is, once a sample has been selected by the clock filter algorithm, older samples are no longer selectable. This applies also to the clock select algorithm. Once the peer variables for a source have been selected, older variables of the same or other sources are no longer selectable. The reason for these rules is to limit the time delay in the clock discipline algorithm. This is necessary to preserve the optimum impulse response and thus the risetime and overshoot.</p>
<p>This means that not every sample can be used to update the peer variables, and up to seven samples can be ignored between selected samples. This fact has been carefully considered in the discipline algorithm design with due consideration for feedback loop delay and minimum sampling rate. In engineering terms, even if only one sample in eight survives, the resulting sample rate is twice the Nyquist rate at any time constant and poll interval.</p>
<h4 id="quality">3. Quality of Service</h4>
-<p>This section discusses how an NTP client determines the system performance using a peer population including reference clocks and remote servers. This is determined for each peer from two statistics, <em>peer jitter</em> and <em>root distance.</em> Peer jitter is determined from various jitter components as described above. It represents the expected error in determining the clock offset estimate. Root distance represents the maximum error of the estimate due to all causes.</p>
-<p>The root distance statistic is computed as one-half the <em> root delay</em> of the primary source of time; i.e., the reference clock, plus the <em> root dispersion</em> of that source. The root variables are included in the NTP packet header received from each source. At each update the root delay is recomputed as the sum of the root delay in the packet plus the peer delay, while the root dispersion is recomputed as the sum of the root dispersion in the packet plus the peer dispersion.</p>
+<p>This section discusses how an NTP client determines the system performance using a peer population including reference clocks and remote servers. This is determined for each peer from two statistics, <em>peer jitter</em> and <em>root distance.</em> Peer jitter is determined from various jitter components as described above. It represents the expected error in determining the clock offset estimate. Root distance represents the maximum error of the estimate due to all causes.</p>
+<p>The root distance statistic is computed as one-half the <em> root delay</em> of the primary source of time; i.e., the reference clock, plus the <em> root dispersion</em> of that source. The root variables are included in the NTP packet header received from each source. At each update the root delay is recomputed as the sum of the root delay in the packet plus the peer delay, while the root dispersion is recomputed as the sum of the root dispersion in the packet plus the peer dispersion.</p>
<blockquote>
- <p>Note. In order to avoid timing loops, the root distance is adjusted to the maximum of the above computation and a <em>minimum threshold.</em> The minimum threshold defaults to 1 ms, but can be changed according to client preference using the <tt>mindist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+ <p>Note. In order to avoid timing loops, the root distance is adjusted to the maximum of the above computation and a <em>minimum threshold.</em> The minimum threshold defaults to 1 ms, but can be changed according to client preference using the <tt>mindist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
</blockquote>
-<p>A source is considered selectable only if its root distance is less than the <em>select threshold</em>, by default 1.5 s, but can be changed according to client preference using the <tt>maxdist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. When an upstream server loses all sources, its root distance apparent to dependent clients continues to increase. The clients are not aware of this condition and continue to accept synchronization as long as the root distance is less than the select threshold.</p>
-<p>The root distance statistic is used by the select, cluster and mitigation algorithms. In this respect, it is sometimes called the <em>synchronization distance</em> often shortened simply to <em>distance</em>. The root distance is also used in the following ways.</p>
+<p>A source is considered selectable only if its root distance is less than the <em>select threshold</em>, by default 1.5 s, but can be changed according to client preference using the <tt>maxdist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. When an upstream server loses all sources, its root distance apparent to dependent clients continues to increase. The clients are not aware of this condition and continue to accept synchronization as long as the root distance is less than the select threshold.</p>
+<p>The root distance statistic is used by the select, cluster and mitigation algorithms. In this respect, it is sometimes called the <em>synchronization distance</em> often shortened simply to <em>distance</em>. The root distance is also used in the following ways.</p>
<ul>
<li>Root distance defines the maximum error of the clock offset estimate due to all causes as long as the source remains reachable..</li>
- <li>Root distance defines the upper and lower limits of the correctness interval. This interval represents the maximum clock offset for each of possibly several sources. The clock select algorithm computes the intersection of the correctness intervals to determine the truechimers from the selectable source population.</li>
- <li>Root distance is used by the clock cluster algorithm as a weight factor when pruning outlyers from the truechimer population.</li>
+ <li>Root distance defines the upper and lower limits of the correctness interval. This interval represents the maximum clock offset for each of possibly several sources. The clock select algorithm computes the intersection of the correctness intervals to determine the truechimers from the selectable source population.</li>
+ <li>Root distance is used by the clock cluster algorithm as a weight factor when pruning outliers from the truechimer population.</li>
<li>The (normalized) reciprocal of the root distance is used as a weight factor by the combine algorithm when computing the system clock offset and system jitter.</li>
- <li>Root distance is used by the mitigation algorithm to select the system peer from among the cluster algorithm survivors.</li>
+ <li>Root distance is used by the mitigation algorithm to select the system peer from among the cluster algorithm survivors.</li>
</ul>
-<p>The root distance thus functions as a metric in the selection and weighting of the various available sources. The strategy is to select the system peer as the source with the minimum root distance and thus the minimum maximum error. The reference implementation uses the Bellman-Ford algorithm described in the literature, where the goal is to minimize the root distance. The algorithm selects the <em>system peer</em>, from which the system root delay and system root dispersion are inherited.</p>
-<p>The algorithms described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page deliver several important statistics. The <em>system offset</em> and <em>system jitter</em> are weighted averages computed by the clock combine algorithm. System offset is best interpreted as the maximum-likelihood estimate of the system clock offset, while system jitter, also called estimated error, is best interpreted as the expected error of this estimate. <em>System delay</em> is the root delay inherited from the system peer, while <em>s</em><em>ystem dispersion</em> is the root dispersion plus contributions due to jitter and the absolute value of the system offset.</p>
-<p>The maximum system error, or <em>system distance</em>, is computed as one-half the system delay plus the system dispersion. In order to simplify discussion, certain minor contributions to the maximum error statistic are ignored. If the precision time kernel support is available, both the estimated error and maximum error are reported to user programs via the <tt>ntp_adjtime()</tt> kernel system call. See the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page for further information.</p>
+<p>The root distance thus functions as a metric in the selection and weighting of the various available sources. The strategy is to select the system peer as the source with the minimum root distance and thus the minimum maximum error. The reference implementation uses the Bellman-Ford algorithm described in the literature, where the goal is to minimize the root distance. The algorithm selects the <em>system peer</em>, from which the system root delay and system root dispersion are inherited.</p>
+<p>The algorithms described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page deliver several important statistics. The <em>system offset</em> and <em>system jitter</em> are weighted averages computed by the clock combine algorithm. System offset is best interpreted as the maximum-likelihood estimate of the system clock offset, while system jitter, also called estimated error, is best interpreted as the expected error of this estimate. <em>System delay</em> is the root delay inherited from the system peer, while <em>s</em><em>ystem dispersion</em> is the root dispersion plus contributions due to jitter and the absolute value of the system offset.</p>
+<p>The maximum system error, or <em>system distance</em>, is computed as one-half the system delay plus the system dispersion. In order to simplify discussion, certain minor contributions to the maximum error statistic are ignored. If the precision time kernel support is available, both the estimated error and maximum error are reported to user programs via the <tt>ntp_adjtime()</tt> kernel system call. See the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page for further information.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
diff --git a/contrib/ntp/include/Makefile.am b/contrib/ntp/include/Makefile.am
index 8b063c3c66f5..f032c97e792d 100644
--- a/contrib/ntp/include/Makefile.am
+++ b/contrib/ntp/include/Makefile.am
@@ -62,6 +62,7 @@ noinst_HEADERS = \
ntpsim.h \
parse.h \
parse_conf.h \
+ rc_cmdlength.h \
recvbuff.h \
refclock_atom.h \
refidsmear.h \
diff --git a/contrib/ntp/include/Makefile.in b/contrib/ntp/include/Makefile.in
index 408118b99bde..8f0968bf77b5 100644
--- a/contrib/ntp/include/Makefile.in
+++ b/contrib/ntp/include/Makefile.in
@@ -116,6 +116,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -227,6 +228,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -235,6 +237,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -296,6 +299,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@@ -543,6 +547,7 @@ noinst_HEADERS = \
ntpsim.h \
parse.h \
parse_conf.h \
+ rc_cmdlength.h \
recvbuff.h \
refclock_atom.h \
refidsmear.h \
diff --git a/contrib/ntp/include/isc/Makefile.in b/contrib/ntp/include/isc/Makefile.in
index 7cbcae303707..5bd25d615fd0 100644
--- a/contrib/ntp/include/isc/Makefile.in
+++ b/contrib/ntp/include/isc/Makefile.in
@@ -116,6 +116,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -185,6 +186,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -193,6 +195,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -254,6 +257,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/include/ntp_assert.h b/contrib/ntp/include/ntp_assert.h
index 2f3bbc8a0b9b..42d78acab0db 100644
--- a/contrib/ntp/include/ntp_assert.h
+++ b/contrib/ntp/include/ntp_assert.h
@@ -88,10 +88,6 @@ extern void calysto_assert(unsigned char cnd); /* check whether this holds */
* We initially used NTP_REQUIRE() instead of REQUIRE() etc, but that
* is unneccesarily verbose, as libisc use of REQUIRE() etc shows.
*/
-#define NTP_REQUIRE(x) REQUIRE(x)
-#define NTP_INSIST(x) INSIST(x)
-#define NTP_INVARIANT(x) INVARIANT(x)
-#define NTP_ENSURE(x) ENSURE(x)
# ifdef DEBUG
#define DEBUG_REQUIRE(x) REQUIRE(x)
diff --git a/contrib/ntp/include/ntp_calendar.h b/contrib/ntp/include/ntp_calendar.h
index 3afb627d2594..6f36c0777aba 100644
--- a/contrib/ntp/include/ntp_calendar.h
+++ b/contrib/ntp/include/ntp_calendar.h
@@ -157,6 +157,12 @@ ntpcal_daysplit(const vint64 *);
extern vint64
ntpcal_dayjoin(int32_t /* days */, int32_t /* seconds */);
+/* Get the number of leap years since epoch for the number of elapsed
+ * full years
+ */
+extern int32_t
+ntpcal_leapyears_in_years(int32_t /* years */);
+
/*
* Convert elapsed years in Era into elapsed days in Era.
*/
@@ -220,6 +226,9 @@ ntpcal_date_to_rd(const struct calendar * /* jt */);
*
* if 'isleapyear' is not NULL, it will receive an integer that is 0
* for regular years and a non-zero value for leap years.
+ *
+ * The input is limited to [-2^30, 2^30-1]. If the days exceed this
+ * range, errno is set to EDOM and the result is saturated.
*/
extern ntpcal_split
ntpcal_split_eradays(int32_t /* days */, int/*BOOL*/ * /* isleapyear */);
@@ -330,6 +339,10 @@ ntpcal_date_to_time(const struct calendar * /* jd */);
extern int32_t
isocal_weeks_in_years(int32_t /* years */);
+/*
+ * The input is limited to [-2^30, 2^30-1]. If the weeks exceed this
+ * range, errno is set to EDOM and the result is saturated.
+ */
extern ntpcal_split
isocal_split_eraweeks(int32_t /* weeks */);
diff --git a/contrib/ntp/include/ntp_config.h b/contrib/ntp/include/ntp_config.h
index a74cd552b85d..bd8f595d94f3 100644
--- a/contrib/ntp/include/ntp_config.h
+++ b/contrib/ntp/include/ntp_config.h
@@ -46,8 +46,8 @@
extern int cmdline_server_count;
extern char ** cmdline_servers;
-/* set to zero if admin doesn't want memory locked */
-extern int do_memlock;
+/* set to zero if we're not locking memory */
+extern int cur_memlock;
typedef struct int_range_tag {
int first;
diff --git a/contrib/ntp/include/ntp_control.h b/contrib/ntp/include/ntp_control.h
index be5b16d80ead..85f41056c7b1 100644
--- a/contrib/ntp/include/ntp_control.h
+++ b/contrib/ntp/include/ntp_control.h
@@ -104,7 +104,7 @@ struct ntp_control {
#define CTL_PST_SEL_REJECT 0 /* reject */
#define CTL_PST_SEL_SANE 1 /* x falsetick */
#define CTL_PST_SEL_CORRECT 2 /* . excess */
-#define CTL_PST_SEL_SELCAND 3 /* - outlyer */
+#define CTL_PST_SEL_SELCAND 3 /* - outlier */
#define CTL_PST_SEL_SYNCCAND 4 /* + candidate */
#define CTL_PST_SEL_EXCESS 5 /* # backup */
#define CTL_PST_SEL_SYSPEER 6 /* * sys.peer */
diff --git a/contrib/ntp/include/ntp_lists.h b/contrib/ntp/include/ntp_lists.h
index 2b6e616965a7..d741974943ef 100644
--- a/contrib/ntp/include/ntp_lists.h
+++ b/contrib/ntp/include/ntp_lists.h
@@ -215,9 +215,9 @@ do { \
\
for (pentry = (listhead); \
pentry != NULL; \
- pentry = pentry->nextlink){ \
- NTP_INSIST(pentry != pentry->nextlink); \
- NTP_INSIST((listhead) != pentry->nextlink); \
+ pentry = pentry->nextlink) { \
+ INSIST(pentry != pentry->nextlink); \
+ INSIST((listhead) != pentry->nextlink); \
} \
} while (FALSE)
diff --git a/contrib/ntp/include/ntp_stdlib.h b/contrib/ntp/include/ntp_stdlib.h
index bad2697d06fd..a2e62dabefd9 100644
--- a/contrib/ntp/include/ntp_stdlib.h
+++ b/contrib/ntp/include/ntp_stdlib.h
@@ -31,6 +31,7 @@ extern int mvsnprintf(char *, size_t, const char *, va_list)
extern int msnprintf(char *, size_t, const char *, ...)
NTP_PRINTF(3, 4);
extern void msyslog(int, const char *, ...) NTP_PRINTF(2, 3);
+extern void mvsyslog(int, const char *, va_list) NTP_PRINTF(2, 0);
extern void init_logging (const char *, u_int32, int);
extern int change_logfile (const char *, int);
extern void setup_logfile (const char *);
diff --git a/contrib/ntp/include/ntp_syslog.h b/contrib/ntp/include/ntp_syslog.h
index a0152b53d9ca..ecc6346796e8 100644
--- a/contrib/ntp/include/ntp_syslog.h
+++ b/contrib/ntp/include/ntp_syslog.h
@@ -9,6 +9,7 @@
#ifdef VMS
extern void msyslog();
+extern void mvsyslog();
#else
# ifndef SYS_VXWORKS
# include <syslog.h>
diff --git a/contrib/ntp/include/ntp_types.h b/contrib/ntp/include/ntp_types.h
index 1c66165b3b38..a947f30575e5 100644
--- a/contrib/ntp/include/ntp_types.h
+++ b/contrib/ntp/include/ntp_types.h
@@ -15,7 +15,8 @@
#include <sys/types.h>
#if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
-#elif defined(HAVE_STDINT_H)
+#endif
+#if defined(HAVE_STDINT_H)
# include <stdint.h>
#endif
diff --git a/contrib/ntp/include/rc_cmdlength.h b/contrib/ntp/include/rc_cmdlength.h
new file mode 100644
index 000000000000..87947573d634
--- /dev/null
+++ b/contrib/ntp/include/rc_cmdlength.h
@@ -0,0 +1,2 @@
+
+extern size_t remoteconfig_cmdlength( const char *src_buf, const char *src_end );
diff --git a/contrib/ntp/kernel/Makefile.in b/contrib/ntp/kernel/Makefile.in
index d66d99438737..dd00144745df 100644
--- a/contrib/ntp/kernel/Makefile.in
+++ b/contrib/ntp/kernel/Makefile.in
@@ -115,6 +115,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -224,6 +225,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -232,6 +234,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -293,6 +296,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/kernel/sys/Makefile.in b/contrib/ntp/kernel/sys/Makefile.in
index a9cefad760b7..58b0b6eee0f6 100644
--- a/contrib/ntp/kernel/sys/Makefile.in
+++ b/contrib/ntp/kernel/sys/Makefile.in
@@ -116,6 +116,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -185,6 +186,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -193,6 +195,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -254,6 +257,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/libntp/Makefile.in b/contrib/ntp/libntp/Makefile.in
index b4b1d818d547..6e40cd4cddc5 100644
--- a/contrib/ntp/libntp/Makefile.in
+++ b/contrib/ntp/libntp/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -345,6 +346,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -353,6 +355,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -414,6 +417,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/libntp/atolfp.c b/contrib/ntp/libntp/atolfp.c
index 3a65f6bcb2f7..9a2f6917873a 100644
--- a/contrib/ntp/libntp/atolfp.c
+++ b/contrib/ntp/libntp/atolfp.c
@@ -40,7 +40,7 @@ atolfp(
int isneg;
static const char *digits = "0123456789";
- NTP_REQUIRE(str != NULL);
+ REQUIRE(str != NULL);
isneg = 0;
dec_i = dec_f = 0;
diff --git a/contrib/ntp/libntp/audio.c b/contrib/ntp/libntp/audio.c
index 6f2262c991f3..726dfa94d819 100644
--- a/contrib/ntp/libntp/audio.c
+++ b/contrib/ntp/libntp/audio.c
@@ -377,7 +377,9 @@ audio_gain(
#ifdef PCM_STYLE_SOUND
int l, r;
- rval = 0;
+# ifdef GCC
+ rval = 0; /* GCC thinks rval is used uninitialized */
+# endif
r = l = 100 * gain / 255; /* Normalize to 0-100 */
# ifdef DEBUG
@@ -392,10 +394,11 @@ audio_gain(
if (cf_agc[0] != '\0')
rval = ioctl(ctl_fd, agc, &l);
else
- if (2 == port)
- rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_LINE, &l);
- else
- rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_MIC, &l);
+ rval = ioctl(ctl_fd
+ , (2 == port)
+ ? SOUND_MIXER_WRITE_LINE
+ : SOUND_MIXER_WRITE_MIC
+ , &l);
if (-1 == rval) {
printf("audio_gain: agc write: %s\n", strerror(errno));
return rval;
diff --git a/contrib/ntp/libntp/authkeys.c b/contrib/ntp/libntp/authkeys.c
index 68771ffb339f..667ca298b96f 100644
--- a/contrib/ntp/libntp/authkeys.c
+++ b/contrib/ntp/libntp/authkeys.c
@@ -534,6 +534,12 @@ MD5auth_setkey(
bucket = &key_hash[KEYHASH(keyno)];
for (sk = *bucket; sk != NULL; sk = sk->hlink) {
if (keyno == sk->keyid) {
+ /* TALOS-CAN-0054: make sure we have a new buffer! */
+ if (NULL != sk->secret) {
+ memset(sk->secret, 0, sk->secretsize);
+ free(sk->secret);
+ }
+ sk->secret = emalloc(len);
sk->type = (u_short)keytype;
secretsize = len;
sk->secretsize = (u_short)secretsize;
@@ -593,12 +599,14 @@ auth_delkeys(void)
}
/*
- * Don't lose info as to which keys are trusted.
+ * Don't lose info as to which keys are trusted. Make
+ * sure there are no dangling pointers!
*/
if (KEY_TRUSTED & sk->flags) {
if (sk->secret != NULL) {
- memset(sk->secret, '\0', sk->secretsize);
+ memset(sk->secret, 0, sk->secretsize);
free(sk->secret);
+ sk->secret = NULL; /* TALOS-CAN-0054 */
}
sk->secretsize = 0;
sk->lifetime = 0;
diff --git a/contrib/ntp/libntp/authreadkeys.c b/contrib/ntp/libntp/authreadkeys.c
index e8ddc942a665..1c4c07ca5926 100644
--- a/contrib/ntp/libntp/authreadkeys.c
+++ b/contrib/ntp/libntp/authreadkeys.c
@@ -62,6 +62,40 @@ nexttok(
}
+/* TALOS-CAN-0055: possibly DoS attack by setting the key file to the
+ * log file. This is hard to prevent (it would need to check two files
+ * to be the same on the inode level, which will not work so easily with
+ * Windows or VMS) but we can avoid the self-amplification loop: We only
+ * log the first 5 errors, silently ignore the next 10 errors, and give
+ * up when when we have found more than 15 errors.
+ *
+ * This avoids the endless file iteration we will end up with otherwise,
+ * and also avoids overflowing the log file.
+ *
+ * Nevertheless, once this happens, the keys are gone since this would
+ * require a save/swap strategy that is not easy to apply due to the
+ * data on global/static level.
+ */
+
+static const size_t nerr_loglimit = 5u;
+static const size_t nerr_maxlimit = 15;
+
+static void log_maybe(size_t*, const char*, ...) NTP_PRINTF(2, 3);
+
+static void
+log_maybe(
+ size_t *pnerr,
+ const char *fmt ,
+ ...)
+{
+ va_list ap;
+ if (++(*pnerr) <= nerr_loglimit) {
+ va_start(ap, fmt);
+ mvsyslog(LOG_ERR, fmt, ap);
+ va_end(ap);
+ }
+}
+
/*
* authreadkeys - (re)read keys from a file.
*/
@@ -79,7 +113,7 @@ authreadkeys(
u_char keystr[32]; /* Bug 2537 */
size_t len;
size_t j;
-
+ size_t nerr;
/*
* Open file. Complain and return if it can't be opened.
*/
@@ -99,7 +133,10 @@ authreadkeys(
/*
* Now read lines from the file, looking for key entries
*/
+ nerr = 0;
while ((line = fgets(buf, sizeof buf, fp)) != NULL) {
+ if (nerr > nerr_maxlimit)
+ break;
token = nexttok(&line);
if (token == NULL)
continue;
@@ -109,15 +146,16 @@ authreadkeys(
*/
keyno = atoi(token);
if (keyno == 0) {
- msyslog(LOG_ERR,
- "authreadkeys: cannot change key %s", token);
+ log_maybe(&nerr,
+ "authreadkeys: cannot change key %s",
+ token);
continue;
}
if (keyno > NTP_MAXKEY) {
- msyslog(LOG_ERR,
- "authreadkeys: key %s > %d reserved for Autokey",
- token, NTP_MAXKEY);
+ log_maybe(&nerr,
+ "authreadkeys: key %s > %d reserved for Autokey",
+ token, NTP_MAXKEY);
continue;
}
@@ -126,8 +164,9 @@ authreadkeys(
*/
token = nexttok(&line);
if (token == NULL) {
- msyslog(LOG_ERR,
- "authreadkeys: no key type for key %d", keyno);
+ log_maybe(&nerr,
+ "authreadkeys: no key type for key %d",
+ keyno);
continue;
}
#ifdef OPENSSL
@@ -139,13 +178,15 @@ authreadkeys(
*/
keytype = keytype_from_text(token, NULL);
if (keytype == 0) {
- msyslog(LOG_ERR,
- "authreadkeys: invalid type for key %d", keyno);
+ log_maybe(&nerr,
+ "authreadkeys: invalid type for key %d",
+ keyno);
continue;
}
if (EVP_get_digestbynid(keytype) == NULL) {
- msyslog(LOG_ERR,
- "authreadkeys: no algorithm for key %d", keyno);
+ log_maybe(&nerr,
+ "authreadkeys: no algorithm for key %d",
+ keyno);
continue;
}
#else /* !OPENSSL follows */
@@ -155,8 +196,9 @@ authreadkeys(
* 'm' for compatibility.
*/
if (!(*token == 'M' || *token == 'm')) {
- msyslog(LOG_ERR,
- "authreadkeys: invalid type for key %d", keyno);
+ log_maybe(&nerr,
+ "authreadkeys: invalid type for key %d",
+ keyno);
continue;
}
keytype = KEY_TYPE_MD5;
@@ -170,8 +212,8 @@ authreadkeys(
*/
token = nexttok(&line);
if (token == NULL) {
- msyslog(LOG_ERR,
- "authreadkeys: no key for key %d", keyno);
+ log_maybe(&nerr,
+ "authreadkeys: no key for key %d", keyno);
continue;
}
len = strlen(token);
@@ -195,13 +237,24 @@ authreadkeys(
keystr[j / 2] = temp << 4;
}
if (j < jlim) {
- msyslog(LOG_ERR,
- "authreadkeys: invalid hex digit for key %d", keyno);
+ log_maybe(&nerr,
+ "authreadkeys: invalid hex digit for key %d",
+ keyno);
continue;
}
MD5auth_setkey(keyno, keytype, keystr, jlim / 2);
}
}
fclose(fp);
+ if (nerr > nerr_maxlimit) {
+ msyslog(LOG_ERR,
+ "authreadkeys: emergency break after %u errors",
+ nerr);
+ return (0);
+ } else if (nerr > nerr_loglimit) {
+ msyslog(LOG_ERR,
+ "authreadkeys: found %u more error(s)",
+ nerr - nerr_loglimit);
+ }
return (1);
}
diff --git a/contrib/ntp/libntp/caljulian.c b/contrib/ntp/libntp/caljulian.c
index 6463699b152a..4a306033ad70 100644
--- a/contrib/ntp/libntp/caljulian.c
+++ b/contrib/ntp/libntp/caljulian.c
@@ -28,7 +28,7 @@ caljulian(
ntpcal_split split;
- NTP_INSIST(NULL != jt);
+ INSIST(NULL != jt);
/*
* Unfold ntp time around current time into NTP domain. Split
diff --git a/contrib/ntp/libntp/caltontp.c b/contrib/ntp/libntp/caltontp.c
index 4246a6a5431c..808c94c64afd 100644
--- a/contrib/ntp/libntp/caltontp.c
+++ b/contrib/ntp/libntp/caltontp.c
@@ -40,14 +40,14 @@ caltontp(
int32_t eraday; /* CE Rata Die number */
vint64 ntptime;/* resulting NTP time */
- NTP_INSIST(jt != NULL);
+ REQUIRE(jt != NULL);
- NTP_REQUIRE(jt->month <= 13); /* permit month 0..13! */
- NTP_REQUIRE(jt->monthday <= 32);
- NTP_REQUIRE(jt->yearday <= 366);
- NTP_REQUIRE(jt->hour <= 24);
- NTP_REQUIRE(jt->minute <= MINSPERHR);
- NTP_REQUIRE(jt->second <= SECSPERMIN);
+ REQUIRE(jt->month <= 13); /* permit month 0..13! */
+ REQUIRE(jt->monthday <= 32);
+ REQUIRE(jt->yearday <= 366);
+ REQUIRE(jt->hour <= 24);
+ REQUIRE(jt->minute <= MINSPERHR);
+ REQUIRE(jt->second <= SECSPERMIN);
/*
* First convert the date to he corresponding RataDie
diff --git a/contrib/ntp/libntp/decodenetnum.c b/contrib/ntp/libntp/decodenetnum.c
index 187d5cae7e5b..35b908f39478 100644
--- a/contrib/ntp/libntp/decodenetnum.c
+++ b/contrib/ntp/libntp/decodenetnum.c
@@ -35,8 +35,11 @@ decodenetnum(
char *np;
char name[80];
- NTP_REQUIRE(num != NULL);
- NTP_REQUIRE(strlen(num) < sizeof(name));
+ REQUIRE(num != NULL);
+
+ if (strlen(num) >= sizeof(name)) {
+ return 0;
+ }
port_str = NULL;
if ('[' != num[0]) {
@@ -72,7 +75,7 @@ decodenetnum(
err = getaddrinfo(cp, "ntp", &hints, &ai);
if (err != 0)
return 0;
- NTP_INSIST(ai->ai_addrlen <= sizeof(*netnum));
+ INSIST(ai->ai_addrlen <= sizeof(*netnum));
ZERO(*netnum);
memcpy(netnum, ai->ai_addr, ai->ai_addrlen);
freeaddrinfo(ai);
diff --git a/contrib/ntp/libntp/emalloc.c b/contrib/ntp/libntp/emalloc.c
index 95d293f1c3dc..8b7ef990c6b6 100644
--- a/contrib/ntp/libntp/emalloc.c
+++ b/contrib/ntp/libntp/emalloc.c
@@ -76,8 +76,6 @@ ereallocz(
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdint.h>
-
/*
* This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
* if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
diff --git a/contrib/ntp/libntp/icom.c b/contrib/ntp/libntp/icom.c
index 80700114255e..2e95db5eb3f4 100644
--- a/contrib/ntp/libntp/icom.c
+++ b/contrib/ntp/libntp/icom.c
@@ -6,14 +6,16 @@
* frequency. All other parameters must be manually set before use.
*/
#include <config.h>
-#include "icom.h"
+#include <ntp_stdlib.h>
+#include <ntp_tty.h>
+#include <l_stdlib.h>
+#include <icom.h>
+
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
-#include "ntp_tty.h"
-#include "l_stdlib.h"
#ifdef SYS_WINNT
#undef write /* ports/winnt/include/config.h: #define write _write */
@@ -60,9 +62,14 @@ static void doublefreq (double, u_char *, int);
/*
* icom_freq(fd, ident, freq) - load radio frequency
+ *
+ * returns:
+ * 0 (ok)
+ * -1 (error)
+ * 1 (short write to device)
*/
int
-icom_freq( /* returns 0 (ok), EIO (error) */
+icom_freq(
int fd, /* file descriptor */
int ident, /* ICOM radio identifier */
double freq /* frequency (MHz) */
@@ -71,6 +78,7 @@ icom_freq( /* returns 0 (ok), EIO (error) */
u_char cmd[] = {PAD, PR, PR, 0, TX, V_SFREQ, 0, 0, 0, 0, FI,
FI};
int temp;
+ int rc;
cmd[3] = (char)ident;
if (ident == IC735)
@@ -78,9 +86,17 @@ icom_freq( /* returns 0 (ok), EIO (error) */
else
temp = 5;
doublefreq(freq * 1e6, &cmd[6], temp);
- temp = write(fd, cmd, temp + 7);
+ rc = write(fd, cmd, temp + 7);
+ if (rc == -1) {
+ msyslog(LOG_ERR, "icom_freq: write() failed: %m");
+ return -1;
+ } else if (rc != temp + 7) {
+ msyslog(LOG_ERR, "icom_freq: only wrote %d of %d bytes.",
+ rc, temp+7);
+ return 1;
+ }
- return (0);
+ return 0;
}
diff --git a/contrib/ntp/libntp/machines.c b/contrib/ntp/libntp/machines.c
index 43944f9edb3f..7a29ac07ea5f 100644
--- a/contrib/ntp/libntp/machines.c
+++ b/contrib/ntp/libntp/machines.c
@@ -40,7 +40,7 @@ struct hostent *gethostbyname(char *name)
{
struct hostent *host1;
h_errno = 0; /* we are always successful!!! */
- host1 = (struct hostent *) malloc (sizeof(struct hostent));
+ host1 = (struct hostent *) emalloc (sizeof(struct hostent));
host1->h_name = name;
host1->h_addrtype = AF_INET;
host1->h_aliases = name;
@@ -54,7 +54,7 @@ struct hostent *gethostbyaddr(char *name, int size, int addr_type)
{
struct hostent *host1;
h_errno = 0; /* we are always successful!!! */
- host1 = (struct hostent *) malloc (sizeof(struct hostent));
+ host1 = (struct hostent *) emalloc (sizeof(struct hostent));
host1->h_name = name;
host1->h_addrtype = AF_INET;
host1->h_aliases = name;
@@ -66,7 +66,7 @@ struct hostent *gethostbyaddr(char *name, int size, int addr_type)
struct servent *getservbyname (char *name, char *type)
{
struct servent *serv1;
- serv1 = (struct servent *) malloc (sizeof(struct servent));
+ serv1 = (struct servent *) emalloc (sizeof(struct servent));
serv1->s_name = "ntp"; /* official service name */
serv1->s_aliases = NULL; /* alias list */
serv1->s_port = 123; /* port # */
diff --git a/contrib/ntp/libntp/msyslog.c b/contrib/ntp/libntp/msyslog.c
index 283414d74423..cc8868f8e7b8 100644
--- a/contrib/ntp/libntp/msyslog.c
+++ b/contrib/ntp/libntp/msyslog.c
@@ -38,7 +38,7 @@ char * syslog_abs_fname;
#define INIT_NTP_SYSLOGMASK ~(u_int32)0
u_int32 ntp_syslogmask = INIT_NTP_SYSLOGMASK;
-extern char * progname;
+extern char const * progname;
/* Declare the local functions */
void addto_syslog (int, const char *);
@@ -145,8 +145,8 @@ addto_syslog(
const char * msg
)
{
- static char * prevcall_progname;
- static char * prog;
+ static char const * prevcall_progname;
+ static char const * prog;
const char nl[] = "\n";
const char empty[] = "";
FILE * term_file;
@@ -357,6 +357,18 @@ msyslog(
addto_syslog(level, buf);
}
+void
+mvsyslog(
+ int level,
+ const char * fmt,
+ va_list ap
+ )
+{
+ char buf[1024];
+ mvsnprintf(buf, sizeof(buf), fmt, ap);
+ addto_syslog(level, buf);
+}
+
/*
* Initialize the logging
@@ -371,7 +383,7 @@ init_logging(
)
{
static int was_daemon;
- const char * cp;
+ char * cp;
const char * pname;
/*
@@ -402,7 +414,7 @@ init_logging(
#ifdef SYS_WINNT /* strip ".exe" */
cp = strrchr(progname, '.');
if (NULL != cp && !strcasecmp(cp, ".exe"))
- progname[cp - progname] = '\0';
+ *cp = '\0';
#endif
#if !defined(VMS)
@@ -454,7 +466,7 @@ change_logfile(
size_t octets;
#endif /* POSIX */
- NTP_REQUIRE(fname != NULL);
+ REQUIRE(fname != NULL);
log_fname = fname;
/*
diff --git a/contrib/ntp/libntp/ntp_calendar.c b/contrib/ntp/libntp/ntp_calendar.c
index ff91fcfc678d..ff6ead364e5a 100644
--- a/contrib/ntp/libntp/ntp_calendar.c
+++ b/contrib/ntp/libntp/ntp_calendar.c
@@ -3,7 +3,55 @@
*
* Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
* The contents of 'html/copyright.html' apply.
+ *
+ * --------------------------------------------------------------------
+ * Some notes on the implementation:
+ *
+ * Calendar algorithms thrive on the division operation, which is one of
+ * the slowest numerical operations in any CPU. What saves us here from
+ * abysmal performance is the fact that all divisions are divisions by
+ * constant numbers, and most compilers can do this by a multiplication
+ * operation. But this might not work when using the div/ldiv/lldiv
+ * function family, because many compilers are not able to do inline
+ * expansion of the code with following optimisation for the
+ * constant-divider case.
+ *
+ * Also div/ldiv/lldiv are defined in terms of int/long/longlong, which
+ * are inherently target dependent. Nothing that could not be cured with
+ * autoconf, but still a mess...
+ *
+ * Furthermore, we need floor division in many places. C either leaves
+ * the division behaviour undefined (< C99) or demands truncation to
+ * zero (>= C99), so additional steps are required to make sure the
+ * algorithms work. The {l,ll}div function family is requested to
+ * truncate towards zero, which is also the wrong direction for our
+ * purpose.
+ *
+ * For all this, all divisions by constant are coded manually, even when
+ * there is a joined div/mod operation: The optimiser should sort that
+ * out, if possible. Most of the calculations are done with unsigned
+ * types, explicitely using two's complement arithmetics where
+ * necessary. This minimises the dependecies to compiler and target,
+ * while still giving reasonable to good performance.
+ *
+ * The implementation uses a few tricks that exploit properties of the
+ * two's complement: Floor division on negative dividents can be
+ * executed by using the one's complement of the divident. One's
+ * complement can be easily created using XOR and a mask.
+ *
+ * Finally, check for overflow conditions is minimal. There are only two
+ * calculation steps in the whole calendar that suffer from an internal
+ * overflow, and these conditions are checked: errno is set to EDOM and
+ * the results are clamped/saturated in this case. All other functions
+ * do not suffer from internal overflow and simply return the result
+ * truncated to 32 bits.
+ *
+ * This is a sacrifice made for execution speed. Since a 32-bit day
+ * counter covers +/- 5,879,610 years and the clamp limits the effective
+ * range to +/-2.9 million years, this should not pose a problem here.
+ *
*/
+
#include <config.h>
#include <sys/types.h>
@@ -13,6 +61,33 @@
#include "ntp_fp.h"
#include "ntp_unixtime.h"
+/* For now, let's take the conservative approach: if the target property
+ * macros are not defined, check a few well-known compiler/architecture
+ * settings. Default is to assume that the representation of signed
+ * integers is unknown and shift-arithmetic-right is not available.
+ */
+#ifndef TARGET_HAS_2CPL
+# if defined(__GNUC__)
+# if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
+# define TARGET_HAS_2CPL 1
+# else
+# define TARGET_HAS_2CPL 0
+# endif
+# elif defined(_MSC_VER)
+# if defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM)
+# define TARGET_HAS_2CPL 1
+# else
+# define TARGET_HAS_2CPL 0
+# endif
+# else
+# define TARGET_HAS_2CPL 0
+# endif
+#endif
+
+#ifndef TARGET_HAS_SAR
+# define TARGET_HAS_SAR 0
+#endif
+
/*
*---------------------------------------------------------------------
* replacing the 'time()' function
@@ -47,6 +122,117 @@ now(void)
/*
*---------------------------------------------------------------------
+ * Get sign extension mask and unsigned 2cpl rep for a signed integer
+ *---------------------------------------------------------------------
+ */
+
+static inline uint32_t
+int32_sflag(
+ const int32_t v)
+{
+# if TARGET_HAS_2CPL && TARGET_HAS_SAR && SIZEOF_INT >= 4
+
+ /* Let's assume that shift is the fastest way to get the sign
+ * extension of of a signed integer. This might not always be
+ * true, though -- On 8bit CPUs or machines without barrel
+ * shifter this will kill the performance. So we make sure
+ * we do this only if 'int' has at least 4 bytes.
+ */
+ return (uint32_t)(v >> 31);
+
+# else
+
+ /* This should be a rather generic approach for getting a sign
+ * extension mask...
+ */
+ return UINT32_C(0) - (uint32_t)(v < 0);
+
+# endif
+}
+
+static inline uint32_t
+int32_to_uint32_2cpl(
+ const int32_t v)
+{
+ uint32_t vu;
+
+# if TARGET_HAS_2CPL
+
+ /* Just copy through the 32 bits from the signed value if we're
+ * on a two's complement target.
+ */
+ vu = (uint32_t)v;
+
+# else
+
+ /* Convert from signed int to unsigned int two's complement. Do
+ * not make any assumptions about the representation of signed
+ * integers, but make sure signed integer overflow cannot happen
+ * here. A compiler on a two's complement target *might* find
+ * out that this is just a complicated cast (as above), but your
+ * mileage might vary.
+ */
+ if (v < 0)
+ vu = ~(uint32_t)(-(v + 1));
+ else
+ vu = (uint32_t)v;
+
+# endif
+
+ return vu;
+}
+
+static inline int32_t
+uint32_2cpl_to_int32(
+ const uint32_t vu)
+{
+ int32_t v;
+
+# if TARGET_HAS_2CPL
+
+ /* Just copy through the 32 bits from the unsigned value if
+ * we're on a two's complement target.
+ */
+ v = (int32_t)vu;
+
+# else
+
+ /* Convert to signed integer, making sure signed integer
+ * overflow cannot happen. Again, the optimiser might or might
+ * not find out that this is just a copy of 32 bits on a target
+ * with two's complement representation for signed integers.
+ */
+ if (vu > INT32_MAX)
+ v = -(int32_t)(~vu) - 1;
+ else
+ v = (int32_t)vu;
+
+# endif
+
+ return v;
+}
+
+/* Some of the calculations need to multiply the input by 4 before doing
+ * a division. This can cause overflow and strange results. Therefore we
+ * clamp / saturate the input operand. And since we do the calculations
+ * in unsigned int with an extra sign flag/mask, we only loose one bit
+ * of the input value range.
+ */
+static inline uint32_t
+uint32_saturate(
+ uint32_t vu,
+ uint32_t mu)
+{
+ static const uint32_t limit = UINT32_MAX/4u;
+ if ((mu ^ vu) > limit) {
+ vu = mu ^ limit;
+ errno = EDOM;
+ }
+ return vu;
+}
+
+/*
+ *---------------------------------------------------------------------
* Convert between 'time_t' and 'vint64'
*---------------------------------------------------------------------
*/
@@ -60,7 +246,7 @@ time_to_vint64(
tt = *ptt;
-#if SIZEOF_TIME_T <= 4
+# if SIZEOF_TIME_T <= 4
res.D_s.hi = 0;
if (tt < 0) {
@@ -70,11 +256,11 @@ time_to_vint64(
res.D_s.lo = (uint32_t)tt;
}
-#elif defined(HAVE_INT64)
+# elif defined(HAVE_INT64)
res.q_s = tt;
-#else
+# else
/*
* shifting negative signed quantities is compiler-dependent, so
* we better avoid it and do it all manually. And shifting more
@@ -90,7 +276,7 @@ time_to_vint64(
res.D_s.hi = (uint32_t)(tt >> 32);
}
-#endif
+# endif
return res;
}
@@ -103,19 +289,19 @@ vint64_to_time(
{
time_t res;
-#if SIZEOF_TIME_T <= 4
+# if SIZEOF_TIME_T <= 4
res = (time_t)tv->D_s.lo;
-#elif defined(HAVE_INT64)
+# elif defined(HAVE_INT64)
res = (time_t)tv->q_s;
-#else
+# else
res = ((time_t)tv->d_s.hi << 32) | tv->D_s.lo;
-#endif
+# endif
return res;
}
@@ -153,11 +339,11 @@ ntpcal_get_build_date(
* problem.
*
*/
-#ifdef MKREPRO_DATE
+# ifdef MKREPRO_DATE
static const char build[] = MKREPRO_TIME "/" MKREPRO_DATE;
-#else
+# else
static const char build[] = __TIME__ "/" __DATE__;
-#endif
+# endif
static const char mlist[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
char monstr[4];
@@ -167,16 +353,16 @@ ntpcal_get_build_date(
* so using 'uint16_t' is contra-indicated!
*/
-#ifdef DEBUG
+# ifdef DEBUG
static int ignore = 0;
-#endif
+# endif
ZERO(*jd);
jd->year = 1970;
jd->month = 1;
jd->monthday = 1;
-#ifdef DEBUG
+# ifdef DEBUG
/* check environment if build date should be ignored */
if (0 == ignore) {
const char * envstr;
@@ -185,7 +371,7 @@ ntpcal_get_build_date(
}
if (ignore > 1)
return FALSE;
-#endif
+# endif
if (6 == sscanf(build, "%hu:%hu:%hu/%3s %hu %hu",
&hour, &minute, &second, monstr, &day, &year)) {
@@ -254,37 +440,8 @@ static const uint16_t real_month_table[2][13] = {
* (day number). This is the number of days elapsed since 0000-12-31
* 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
- * the slowest numerical operations in any CPU. What saves us here from
- * abysmal performance is the fact that all divisions are divisions by
- * constant numbers, and most compilers can do this by a multiplication
- * operation. But this might not work when using the div/ldiv/lldiv
- * function family, because many compilers are not able to do inline
- * expansion of the code with following optimisation for the
- * constant-divider case.
- *
- * Also div/ldiv/lldiv are defined in terms of int/long/longlong, which
- * are inherently target dependent. Nothing that could not be cured with
- * autoconf, but still a mess...
- *
- * Furthermore, we need floor division while C demands truncation to
- * zero, so additional steps are required to make sure the algorithms
- * work.
- *
- * For all this, all divisions by constant are coded manually, even when
- * there is a joined div/mod operation: The optimiser should sort that
- * out, if possible.
- *
- * Finally, the functions do not check for overflow conditions. This
- * is a sacrifice made for execution speed; since a 32-bit day counter
- * covers +/- 5,879,610 years, this should not pose a problem here.
*/
-
/*
* ==================================================================
*
@@ -363,22 +520,23 @@ ntpcal_periodic_extend(
* Get absolute difference as unsigned quantity and
* the complement flag. This is done by always
* subtracting the smaller value from the bigger
- * one. This implementation works only on a two's
- * complement machine!
+ * one.
*/
if (value >= pivot) {
- diff = (uint32_t)value - (uint32_t)pivot;
+ diff = int32_to_uint32_2cpl(value)
+ - int32_to_uint32_2cpl(pivot);
} else {
- diff = (uint32_t)pivot - (uint32_t)value;
+ diff = int32_to_uint32_2cpl(pivot)
+ - int32_to_uint32_2cpl(value);
cpl ^= 1;
}
diff %= (uint32_t)cycle;
if (diff) {
if (cpl)
- diff = cycle - diff;
+ diff = (uint32_t)cycle - diff;
if (neg)
diff = ~diff + 1;
- pivot += diff;
+ pivot += uint32_2cpl_to_int32(diff);
}
}
return pivot;
@@ -405,7 +563,7 @@ ntpcal_ntp_to_time(
{
vint64 res;
-#ifdef HAVE_INT64
+# if defined(HAVE_INT64)
res.q_s = (pivot != NULL)
? *pivot
@@ -415,7 +573,7 @@ ntpcal_ntp_to_time(
ntp -= res.D_s.lo; /* cycle difference */
res.Q_s += (uint64_t)ntp; /* get expanded time */
-#else /* no 64bit scalars */
+# else /* no 64bit scalars */
time_t tmp;
@@ -428,7 +586,7 @@ ntpcal_ntp_to_time(
ntp -= res.D_s.lo; /* cycle difference */
M_ADD(res.D_s.hi, res.D_s.lo, 0, ntp);
-#endif /* no 64bit scalars */
+# endif /* no 64bit scalars */
return res;
}
@@ -454,7 +612,7 @@ ntpcal_ntp_to_ntp(
{
vint64 res;
-#ifdef HAVE_INT64
+# if defined(HAVE_INT64)
res.q_s = (pivot)
? *pivot
@@ -464,7 +622,7 @@ ntpcal_ntp_to_ntp(
ntp -= res.D_s.lo; /* cycle difference */
res.Q_s += (uint64_t)ntp; /* get expanded time */
-#else /* no 64bit scalars */
+# else /* no 64bit scalars */
time_t tmp;
@@ -477,7 +635,7 @@ ntpcal_ntp_to_ntp(
ntp -= res.D_s.lo; /* cycle difference */
M_ADD(res.D_s.hi, res.D_s.lo, 0, ntp);
-#endif /* no 64bit scalars */
+# endif /* no 64bit scalars */
return res;
}
@@ -505,78 +663,75 @@ ntpcal_daysplit(
)
{
ntpcal_split res;
+ uint32_t Q;
+
+# if defined(HAVE_INT64)
+
+ /* Manual floor division by SECSPERDAY. This uses the one's
+ * complement trick, too, but without an extra flag value: The
+ * flag would be 64bit, and that's a bit of overkill on a 32bit
+ * target that has to use a register pair for a 64bit number.
+ */
+ if (ts->q_s < 0)
+ Q = ~(uint32_t)(~ts->Q_s / SECSPERDAY);
+ else
+ Q = (uint32_t)(ts->Q_s / SECSPERDAY);
-#ifdef HAVE_INT64
+# else
- /* manual floor division by SECSPERDAY */
- res.hi = (int32_t)(ts->q_s / SECSPERDAY);
- res.lo = (int32_t)(ts->q_s % SECSPERDAY);
- if (res.lo < 0) {
- res.hi -= 1;
- res.lo += SECSPERDAY;
- }
+ uint32_t ah, al, sflag, A;
-#else
+ /* get operand into ah/al (either ts or ts' one's complement,
+ * for later floor division)
+ */
+ sflag = int32_sflag(ts->d_s.hi);
+ ah = sflag ^ ts->D_s.hi;
+ al = sflag ^ ts->D_s.lo;
+
+ /* Since 86400 == 128*675 we can drop the least 7 bits and
+ * divide by 675 instead of 86400. Then the maximum remainder
+ * after each devision step is 674, and we need 10 bits for
+ * that. So in the next step we can shift in 22 bits from the
+ * numerator.
+ *
+ * Therefore we load the accu with the top 13 bits (51..63) in
+ * the first shot. We don't have to remember the quotient -- it
+ * would be shifted out anyway.
+ */
+ A = ah >> 19;
+ if (A >= 675)
+ A = (A % 675u);
+
+ /* Now assemble the remainder with bits 29..50 from the
+ * numerator and divide. This creates the upper ten bits of the
+ * quotient. (Well, the top 22 bits of a 44bit result. But that
+ * will be truncated to 32 bits anyway.)
+ */
+ A = (A << 19) | (ah & 0x0007FFFFu);
+ A = (A << 3) | (al >> 29);
+ Q = A / 675u;
+ A = A % 675u;
- /*
- * since we do not have 64bit ops, we have to this by hand.
- * Luckily SECSPERDAY is 86400 is 675*128, so we do the division
- * using chained 32/16 bit divisions and shifts.
+ /* Now assemble the remainder with bits 7..28 from the numerator
+ * and do a final division step.
*/
- vint64 op;
- uint32_t q, r, a;
- int isneg;
+ A = (A << 22) | ((al >> 7) & 0x003FFFFFu);
+ Q = (Q << 22) | (A / 675u);
- memcpy(&op, ts, sizeof(op));
- /* fix sign */
- 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);
- op.D_s.hi = (op.D_s.hi >> 7);
-
- /* now do a mnual division, trying to remove as many ops as
- * possible -- division is always slow! An since we do not have
- * the advantage of a specific 64/32 bit or even a specific 32/16
- * bit division op, but must use the general 32/32bit division
- * even if we *know* the divider fits into unsigned 16 bits, the
- * exra code pathes should pay off.
+ /* The last 7 bits get simply dropped, as they have no affect on
+ * the quotient when dividing by 86400.
*/
- a = op.D_s.hi;
- if (a > 675u)
- a = a % 675u;
- if (a) {
- a = (a << 16) | op.W_s.lh;
- q = a / 675u;
- a = a % 675u;
-
- a = (a << 16) | op.W_s.ll;
- q = (q << 16) | (a / 675u);
- } else {
- a = op.D_s.lo;
- q = a / 675u;
- }
- a = a % 675u;
-
- /* assemble remainder */
- r |= a << 7;
-
- /* fix sign of result */
- if (isneg) {
- if (r) {
- r = SECSPERDAY - r;
- q = ~q;
- } else
- q = ~q + 1;
- }
- res.hi = q;
- res.lo = r;
+ /* apply sign correction and calculate the true floor
+ * remainder.
+ */
+ Q ^= sflag;
+
+# endif
+
+ res.hi = uint32_2cpl_to_int32(Q);
+ res.lo = ts->D_s.lo - Q * SECSPERDAY;
-#endif
return res;
}
@@ -593,25 +748,28 @@ priv_timesplit(
int32_t ts
)
{
- int32_t days = 0;
-
- /* make sure we have a positive offset into a day */
- if (ts < 0 || ts >= SECSPERDAY) {
- days = ts / SECSPERDAY;
- ts = ts % SECSPERDAY;
- if (ts < 0) {
- days -= 1;
- ts += SECSPERDAY;
- }
- }
+ /* Do 3 chained floor divisions by positive constants, using the
+ * one's complement trick and factoring out the intermediate XOR
+ * ops to reduce the number of operations.
+ */
+ uint32_t us, um, uh, ud, sflag;
- /* get secs, mins, hours */
- split[2] = (uint8_t)(ts % SECSPERMIN);
- ts /= SECSPERMIN;
- split[1] = (uint8_t)(ts % MINSPERHR);
- split[0] = (uint8_t)(ts / MINSPERHR);
+ sflag = int32_sflag(ts);
+ us = int32_to_uint32_2cpl(ts);
- return days;
+ um = (sflag ^ us) / SECSPERMIN;
+ uh = um / MINSPERHR;
+ ud = uh / HRSPERDAY;
+
+ um ^= sflag;
+ uh ^= sflag;
+ ud ^= sflag;
+
+ split[0] = (int32_t)(uh - ud * HRSPERDAY );
+ split[1] = (int32_t)(um - uh * MINSPERHR );
+ split[2] = (int32_t)(us - um * SECSPERMIN);
+
+ return uint32_2cpl_to_int32(ud);
}
/*
@@ -630,46 +788,45 @@ ntpcal_split_eradays(
int *isleapyear
)
{
- 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
- * all operands are positive; alas, we have to be aware of the
- * possibe cycle overflows for 100 years and 1 year, caused by
- * the additional leap day.
+ /* Use the fast cyclesplit algorithm here, to calculate the
+ * centuries and years in a century with one division each. This
+ * reduces the number of division operations to two, but is
+ * susceptible to internal range overflow. We make sure the
+ * input operands are in the safe range; this still gives us
+ * approx +/-2.9 million years.
*/
- n400 = days / GREGORIAN_CYCLE_DAYS;
- yday = days % GREGORIAN_CYCLE_DAYS;
- if (yday < 0) {
- n400 -= 1;
- yday += GREGORIAN_CYCLE_DAYS;
- }
- n100 = yday / GREGORIAN_NORMAL_CENTURY_DAYS;
- yday = yday % GREGORIAN_NORMAL_CENTURY_DAYS;
- n004 = yday / GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
- 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
+ ntpcal_split res;
+ int32_t n100, n001; /* calendar year cycles */
+ uint32_t uday, Q, sflag;
+
+ /* split off centuries first */
+ sflag = int32_sflag(days);
+ uday = uint32_saturate(int32_to_uint32_2cpl(days), sflag);
+ uday = (4u * uday) | 3u;
+ Q = sflag ^ ((sflag ^ uday) / GREGORIAN_CYCLE_DAYS);
+ uday = uday - Q * GREGORIAN_CYCLE_DAYS;
+ n100 = uint32_2cpl_to_int32(Q);
+
+ /* Split off years in century -- days >= 0 here, and we're far
+ * away from integer overflow trouble now. */
+ uday |= 3;
+ n001 = uday / GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
+ uday = uday % GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
+
+ /* Assemble the year and day in year */
+ res.hi = n100 * 100 + n001;
+ res.lo = uday / 4u;
+
+ /* Eventually set the leap year flag. Note: 0 <= n001 <= 99 and
+ * Q is still the two's complement representation of the
+ * centuries: The modulo 4 ops can be done with masking here.
+ * We also shift the year and the century by one, so the tests
+ * can be done against zero instead of 3.
*/
- if ((n001 | n100) > 3) {
- /* hit last day of leap year */
- n001 -= 1;
- yday += DAYSPERYEAR;
- if (isleapyear)
- *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;
-
+ if (isleapyear)
+ *isleapyear = !((n001+1) & 3)
+ && ((n001 != 99) || !((Q+1) & 3));
+
return res;
}
@@ -719,11 +876,9 @@ ntpcal_rd_to_date(
)
{
ntpcal_split split;
- int leaps;
- int retv;
+ int leapy;
+ u_int ymask;
- leaps = 0;
- retv = 0;
/* 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.
@@ -731,26 +886,28 @@ ntpcal_rd_to_date(
* 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;
-
- split = ntpcal_split_eradays(rd - 1, &leaps);
- retv = leaps;
- /* get year and day-of-year */
- jd->year = (uint16_t)split.hi + 1;
- if (jd->year != split.hi + 1) {
- jd->year = 0;
- retv = -1; /* bletch. overflow trouble. */
- }
+ jd->weekday = rd % DAYSPERWEEK;
+ if (jd->weekday >= DAYSPERWEEK) /* weekday is unsigned! */
+ jd->weekday += DAYSPERWEEK;
+
+ split = ntpcal_split_eradays(rd - 1, &leapy);
+ /* Get year and day-of-year, with overflow check. If any of the
+ * upper 16 bits is set after shifting to unity-based years, we
+ * will have an overflow when converting to an unsigned 16bit
+ * year. Shifting to the right is OK here, since it does not
+ * matter if the shift is logic or arithmetic.
+ */
+ split.hi += 1;
+ ymask = 0u - ((split.hi >> 16) == 0);
+ jd->year = (uint16_t)(split.hi & ymask);
jd->yearday = (uint16_t)split.lo + 1;
/* convert to month and mday */
- split = ntpcal_split_yeardays(split.lo, leaps);
+ split = ntpcal_split_yeardays(split.lo, leapy);
jd->month = (uint8_t)split.hi + 1;
jd->monthday = (uint8_t)split.lo + 1;
- return retv ? retv : leaps;
+ return ymask ? leapy : -1;
}
/*
@@ -765,25 +922,24 @@ ntpcal_rd_to_tm(
)
{
ntpcal_split split;
- int leaps;
+ int leapy;
- leaps = 0;
/* get day-of-week first */
- utm->tm_wday = rd % 7;
+ utm->tm_wday = rd % DAYSPERWEEK;
if (utm->tm_wday < 0)
- utm->tm_wday += 7;
+ utm->tm_wday += DAYSPERWEEK;
/* get year and day-of-year */
- split = ntpcal_split_eradays(rd - 1, &leaps);
+ split = ntpcal_split_eradays(rd - 1, &leapy);
utm->tm_year = split.hi - 1899;
utm->tm_yday = split.lo; /* 0-based */
/* convert to month and mday */
- split = ntpcal_split_yeardays(split.lo, leaps);
+ split = ntpcal_split_yeardays(split.lo, leapy);
utm->tm_mon = split.hi; /* 0-based */
utm->tm_mday = split.lo + 1; /* 1-based */
- return leaps;
+ return leapy;
}
/*
@@ -918,13 +1074,13 @@ ntpcal_dayjoin(
{
vint64 res;
-#ifdef HAVE_INT64
+# if defined(HAVE_INT64)
res.q_s = days;
res.q_s *= SECSPERDAY;
res.q_s += secs;
-#else
+# else
uint32_t p1, p2;
int isneg;
@@ -963,47 +1119,57 @@ ntpcal_dayjoin(
}
M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
-#endif
+# endif
return res;
}
/*
*---------------------------------------------------------------------
- * Convert elapsed years in Era into elapsed days in Era.
- *
- * To accomodate for negative values of years, floor division would be
- * required for all division operations. This can be eased by first
- * splitting the years into full 400-year cycles and years in the
- * cycle. Only this operation must be coded as a full floor division; as
- * the years in the cycle is a non-negative number, all other divisions
- * can be regular truncated divisions.
+ * get leap years since epoch in elapsed years
*---------------------------------------------------------------------
*/
int32_t
-ntpcal_days_in_years(
+ntpcal_leapyears_in_years(
int32_t years
)
{
- int32_t cycle; /* full gregorian cycle */
-
- /* split off full calendar cycles, using floor division */
- cycle = years / 400;
- years = years % 400;
- if (years < 0) {
- cycle -= 1;
- years += 400;
- }
+ /* We use the in-out-in algorithm here, using the one's
+ * complement division trick for negative numbers. The chained
+ * division sequence by 4/25/4 gives the compiler the chance to
+ * get away with only one true division and doing shifts otherwise.
+ */
- /*
- * Calculate days in cycle. years now is a non-negative number,
- * holding the number of years in the 400-year cycle.
+ uint32_t sflag, sum, uyear;
+
+ sflag = int32_sflag(years);
+ uyear = int32_to_uint32_2cpl(years);
+ uyear ^= sflag;
+
+ sum = (uyear /= 4u); /* 4yr rule --> IN */
+ sum -= (uyear /= 25u); /* 100yr rule --> OUT */
+ sum += (uyear /= 4u); /* 400yr rule --> IN */
+
+ /* Thanks to the alternation of IN/OUT/IN we can do the sum
+ * directly and have a single one's complement operation
+ * here. (Only if the years are negative, of course.) Otherwise
+ * the one's complement would have to be done when
+ * adding/subtracting the terms.
*/
- return cycle * GREGORIAN_CYCLE_DAYS
- + years * DAYSPERYEAR /* days inregular years */
- + years / 4 /* 4 year leap rule */
- - years / 100; /* 100 year leap rule */
- /* the 400-year rule does not apply due to full-cycle split-off */
+ return uint32_2cpl_to_int32(sflag ^ sum);
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert elapsed years in Era into elapsed days in Era.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_days_in_years(
+ int32_t years
+ )
+{
+ return years * DAYSPERYEAR + ntpcal_leapyears_in_years(years);
}
/*
@@ -1029,26 +1195,22 @@ ntpcal_days_in_months(
{
ntpcal_split res;
- /* normalize month into range */
- res.hi = 0;
- res.lo = m;
- if (res.lo < 0 || res.lo >= 12) {
- res.hi = res.lo / 12;
- res.lo = res.lo % 12;
- if (res.lo < 0) {
- res.hi -= 1;
- res.lo += 12;
- }
- }
+ /* Add ten months and correct if needed. (It likely is...) */
+ res.lo = m + 10;
+ res.hi = (res.lo >= 12);
+ if (res.hi)
+ res.lo -= 12;
- /* add 10 month for year starting with march */
- if (res.lo < 2)
- res.lo += 10;
- else {
- res.hi += 1;
- res.lo -= 2;
+ /* if still out of range, normalise by floor division ... */
+ if (res.lo < 0 || res.lo >= 12) {
+ uint32_t mu, Q, sflag;
+ sflag = int32_sflag(res.lo);
+ mu = int32_to_uint32_2cpl(res.lo);
+ Q = sflag ^ ((sflag ^ mu) / 12u);
+ res.hi += uint32_2cpl_to_int32(Q);
+ res.lo = mu - Q * 12u;
}
-
+
/* get cummulated days in year with unshift */
res.lo = shift_month_table[res.lo] - 306;
@@ -1451,37 +1613,42 @@ int32_t
isocal_weeks_in_years(
int32_t years
)
-{
+{
/*
* use: w = (y * 53431 + b[c]) / 1024 as interpolation
*/
- static const int32_t bctab[4] = { 449, 157, 889, 597 };
- int32_t cycle; /* full gregorian cycle */
- int32_t cents; /* full centuries */
- int32_t weeks; /* accumulated weeks */
-
- /* split off full calendar cycles, using floor division */
- cycle = years / 400;
- years = years % 400;
- if (years < 0) {
- cycle -= 1;
- years += 400;
- }
-
- /* split off full centuries */
- cents = years / 100;
- years = years % 100;
-
- /*
- * calculate elapsed weeks, taking into account that the
- * first, third and fourth century have 5218 weeks but the
- * second century falls short by one week.
+ static const uint16_t bctab[4] = { 157, 449, 597, 889 };
+
+ int32_t cs, cw;
+ uint32_t cc, ci, yu, sflag;
+
+ sflag = int32_sflag(years);
+ yu = int32_to_uint32_2cpl(years);
+
+ /* split off centuries, using floor division */
+ cc = sflag ^ ((sflag ^ yu) / 100u);
+ yu -= cc * 100u;
+
+ /* calculate century cycles shift and cycle index:
+ * Assuming a century is 5217 weeks, we have to add a cycle
+ * shift that is 3 for every 4 centuries, because 3 of the four
+ * centuries have 5218 weeks. So '(cc*3 + 1) / 4' is the actual
+ * correction, and the second century is the defective one.
+ *
+ * Needs floor division by 4, which is done with masking and
+ * shifting.
+ */
+ ci = cc * 3u + 1;
+ cs = uint32_2cpl_to_int32(sflag ^ ((sflag ^ ci) / 4u));
+ ci = ci % 4u;
+
+ /* Get weeks in century. Can use plain division here as all ops
+ * are >= 0, and let the compiler sort out the possible
+ * optimisations.
*/
- weeks = (years * 53431 + bctab[cents]) / 1024;
+ cw = (yu * 53431u + bctab[ci]) / 1024u;
- return cycle * GREGORIAN_CYCLE_WEEKS
- + cents * 5218 - (cents > 1)
- + weeks;
+ return uint32_2cpl_to_int32(cc) * 5217 + cs + cw;
}
/*
@@ -1498,35 +1665,41 @@ isocal_split_eraweeks(
/*
* use: y = (w * 157 + b[c]) / 8192 as interpolation
*/
- static const int32_t bctab[4] = { 85, 131, 17, 62 };
+
+ static const uint16_t bctab[4] = { 85, 130, 17, 62 };
+
ntpcal_split res;
- int32_t cents;
+ int32_t cc, ci;
+ uint32_t sw, cy, Q, sflag;
- /*
- * split off 400-year cycles, using the fact that a 400-year
- * cycle has 146097 days, which is exactly 20871 weeks.
+ /* Use two fast cycle-split divisions here. This is again
+ * susceptible to internal overflow, so we check the range. This
+ * still permits more than +/-20 million years, so this is
+ * likely a pure academical problem.
+ *
+ * We want to execute '(weeks * 4 + 2) /% 20871' under floor
+ * division rules in the first step.
*/
- res.hi = weeks / GREGORIAN_CYCLE_WEEKS;
- res.lo = weeks % GREGORIAN_CYCLE_WEEKS;
- if (res.lo < 0) {
- res.hi -= 1;
- res.lo += GREGORIAN_CYCLE_WEEKS;
- }
- res.hi *= 400;
-
- /*
- * split off centuries, taking into account that the first,
- * third and fourth century have 5218 weeks but that the
- * second century falls short by one week.
+ sflag = int32_sflag(weeks);
+ sw = uint32_saturate(int32_to_uint32_2cpl(weeks), sflag);
+ sw = 4u * sw + 2;
+ Q = sflag ^ ((sflag ^ sw) / GREGORIAN_CYCLE_WEEKS);
+ sw -= Q * GREGORIAN_CYCLE_WEEKS;
+ ci = Q % 4u;
+ cc = uint32_2cpl_to_int32(Q);
+
+ /* Split off years; sw >= 0 here! The scaled weeks in the years
+ * are scaled up by 157 afterwards.
+ */
+ sw = (sw / 4u) * 157u + bctab[ci];
+ cy = sw / 8192u; /* ws >> 13 , let the compiler sort it out */
+ sw = sw % 8192u; /* ws & 8191, let the compiler sort it out */
+
+ /* assemble elapsed years and downscale the elapsed weeks in
+ * the year.
*/
- 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.hi = 100*cc + cy;
+ res.lo = sw / 157u;
return res;
}
@@ -1544,6 +1717,7 @@ isocal_ntp64_to_date(
{
ntpcal_split ds;
int32_t ts[3];
+ uint32_t uw, ud, sflag;
/*
* Split NTP time into days and seconds, shift days into CE
@@ -1557,16 +1731,18 @@ isocal_ntp64_to_date(
id->minute = (uint8_t)ts[1];
id->second = (uint8_t)ts[2];
- /* split date part */
- ds.lo = ds.hi + DAY_NTP_STARTS - 1; /* elapsed era days */
- ds.hi = ds.lo / 7; /* elapsed era weeks */
- ds.lo = ds.lo % 7; /* elapsed week days */
- if (ds.lo < 0) { /* floor division! */
- ds.hi -= 1;
- ds.lo += 7;
- }
+ /* split days into days and weeks, using floor division in unsigned */
+ ds.hi += DAY_NTP_STARTS - 1; /* shift from NTP to RDN */
+ sflag = int32_sflag(ds.hi);
+ ud = int32_to_uint32_2cpl(ds.hi);
+ uw = sflag ^ ((sflag ^ ud) / DAYSPERWEEK);
+ ud -= uw * DAYSPERWEEK;
+ ds.hi = uint32_2cpl_to_int32(uw);
+ ds.lo = ud;
+
id->weekday = (uint8_t)ds.lo + 1; /* weekday result */
+ /* get year and week in year */
ds = isocal_split_eraweeks(ds.hi); /* elapsed years&week*/
id->year = (uint16_t)ds.hi + 1; /* shift to current */
id->week = (uint8_t )ds.lo + 1;
diff --git a/contrib/ntp/libntp/ntp_intres.c b/contrib/ntp/libntp/ntp_intres.c
index eea88a127378..b0f562036a00 100644
--- a/contrib/ntp/libntp/ntp_intres.c
+++ b/contrib/ntp/libntp/ntp_intres.c
@@ -249,12 +249,12 @@ getaddrinfo_sometime(
size_t servsize;
time_t now;
- NTP_REQUIRE(NULL != node);
+ REQUIRE(NULL != node);
if (NULL != hints) {
- NTP_REQUIRE(0 == hints->ai_addrlen);
- NTP_REQUIRE(NULL == hints->ai_addr);
- NTP_REQUIRE(NULL == hints->ai_canonname);
- NTP_REQUIRE(NULL == hints->ai_next);
+ REQUIRE(0 == hints->ai_addrlen);
+ REQUIRE(NULL == hints->ai_addr);
+ REQUIRE(NULL == hints->ai_canonname);
+ REQUIRE(NULL == hints->ai_next);
}
idx = get_dnschild_ctx();
@@ -420,7 +420,7 @@ blocking_getaddrinfo(
ai = ai_res;
while (NULL != ai) {
- NTP_INSIST(ai->ai_addrlen <= sizeof(sockaddr_u));
+ INSIST(ai->ai_addrlen <= sizeof(sockaddr_u));
memcpy(cp, ai->ai_addr, ai->ai_addrlen);
cp += sizeof(sockaddr_u);
@@ -568,7 +568,7 @@ getaddrinfo_sometime_complete(
ai[i].ai_canonname += (size_t)canon_start;
}
- NTP_ENSURE((char *)psau == canon_start);
+ ENSURE((char *)psau == canon_start);
if (!gai_resp->ai_count)
ai = NULL;
@@ -634,8 +634,8 @@ getnameinfo_sometime(
dnschild_ctx * child_ctx;
time_t time_now;
- NTP_REQUIRE(hostoctets);
- NTP_REQUIRE(hostoctets + servoctets < 1024);
+ REQUIRE(hostoctets);
+ REQUIRE(hostoctets + servoctets < 1024);
idx = get_dnschild_ctx();
child_ctx = dnschild_contexts[idx];
@@ -699,7 +699,7 @@ blocking_getnameinfo(
* large allocations. We only need room for the host
* and service names.
*/
- NTP_REQUIRE(octets < sizeof(host));
+ REQUIRE(octets < sizeof(host));
service = host + gni_req->hostoctets;
worker_ctx = get_worker_context(c, gni_req->dns_idx);
@@ -775,8 +775,8 @@ blocking_getnameinfo(
cp += gni_resp->servoctets;
}
- NTP_INSIST((size_t)(cp - (char *)resp) == resp_octets);
- NTP_INSIST(resp_octets - sizeof(*resp) == gni_resp->octets);
+ INSIST((size_t)(cp - (char *)resp) == resp_octets);
+ INSIST(resp_octets - sizeof(*resp) == gni_resp->octets);
rc = queue_blocking_response(c, resp, resp_octets, req);
if (rc)
diff --git a/contrib/ntp/libntp/ntp_lineedit.c b/contrib/ntp/libntp/ntp_lineedit.c
index e3bc0022a292..a2b2d2934705 100644
--- a/contrib/ntp/libntp/ntp_lineedit.c
+++ b/contrib/ntp/libntp/ntp_lineedit.c
@@ -36,7 +36,7 @@
* external references
*/
-extern char * progname;
+extern char const * progname;
/*
* globals, private prototypes
diff --git a/contrib/ntp/libntp/ntp_rfc2553.c b/contrib/ntp/libntp/ntp_rfc2553.c
index f267999c5e3f..a9ebb4b35363 100644
--- a/contrib/ntp/libntp/ntp_rfc2553.c
+++ b/contrib/ntp/libntp/ntp_rfc2553.c
@@ -221,7 +221,7 @@ copy_addrinfo_common(
}
++ai_cpy;
}
- NTP_ENSURE(pcanon == ((char *)dst + octets));
+ ENSURE(pcanon == ((char *)dst + octets));
return dst;
}
diff --git a/contrib/ntp/libntp/ntp_worker.c b/contrib/ntp/libntp/ntp_worker.c
index bb1cb87e44a0..32970da0d124 100644
--- a/contrib/ntp/libntp/ntp_worker.c
+++ b/contrib/ntp/libntp/ntp_worker.c
@@ -278,7 +278,7 @@ blocking_child_common(
req = receive_blocking_req_internal(c);
if (NULL == req) {
say_bye = TRUE;
- break;
+ continue;
}
DEBUG_REQUIRE(BLOCKING_REQ_MAGIC == req->magic_sig);
diff --git a/contrib/ntp/libntp/prettydate.c b/contrib/ntp/libntp/prettydate.c
index 5da5ecc50a69..25b085ef28fb 100644
--- a/contrib/ntp/libntp/prettydate.c
+++ b/contrib/ntp/libntp/prettydate.c
@@ -141,7 +141,7 @@ get_struct_tm(
return NULL; /* That's truly pathological! */
/* 'tm' surely not NULL here! */
- NTP_INSIST(tm != NULL);
+ INSIST(tm != NULL);
if (folds != 0) {
tm->tm_year += folds * SOLAR_CYCLE_YEARS;
if (tm->tm_year <= 0 || tm->tm_year >= 200)
diff --git a/contrib/ntp/libntp/recvbuff.c b/contrib/ntp/libntp/recvbuff.c
index 83a9ee193a3b..73ebe886d9a7 100644
--- a/contrib/ntp/libntp/recvbuff.c
+++ b/contrib/ntp/libntp/recvbuff.c
@@ -216,7 +216,7 @@ get_free_recv_buffer_alloc(void)
create_buffers(RECV_INC);
buffer = get_free_recv_buffer();
}
- NTP_ENSURE(buffer != NULL);
+ ENSURE(buffer != NULL);
return (buffer);
}
#endif
diff --git a/contrib/ntp/libntp/socket.c b/contrib/ntp/libntp/socket.c
index de678c6340b4..11fb004690c4 100644
--- a/contrib/ntp/libntp/socket.c
+++ b/contrib/ntp/libntp/socket.c
@@ -78,7 +78,7 @@ move_fd(
static SOCKET socket_boundary = -1;
SOCKET newfd;
- NTP_REQUIRE((int)fd >= 0);
+ REQUIRE((int)fd >= 0);
/*
* check whether boundary has be set up
@@ -115,7 +115,7 @@ move_fd(
socket_boundary));
} while (socket_boundary > 0);
#else
- NTP_REQUIRE((int)fd >= 0);
+ ENSURE((int)fd >= 0);
#endif /* !defined(SYS_WINNT) && defined(F_DUPFD) */
return fd;
}
diff --git a/contrib/ntp/libntp/socktohost.c b/contrib/ntp/libntp/socktohost.c
index c61e57148a65..3d9ab960e8a1 100644
--- a/contrib/ntp/libntp/socktohost.c
+++ b/contrib/ntp/libntp/socktohost.c
@@ -79,7 +79,7 @@ socktohost(
if (a_info)
goto forward_fail;
- NTP_INSIST(alist != NULL);
+ INSIST(alist != NULL);
for (ai = alist; ai != NULL; ai = ai->ai_next) {
/*
diff --git a/contrib/ntp/libntp/statestr.c b/contrib/ntp/libntp/statestr.c
index cd98eb3951a3..313cd46bebfe 100644
--- a/contrib/ntp/libntp/statestr.c
+++ b/contrib/ntp/libntp/statestr.c
@@ -60,7 +60,7 @@ static const struct codestring select_codes[] = {
{ CTL_PST_SEL_REJECT, "sel_reject" },
{ CTL_PST_SEL_SANE, "sel_falsetick" },
{ CTL_PST_SEL_CORRECT, "sel_excess" },
- { CTL_PST_SEL_SELCAND, "sel_outlyer" },
+ { CTL_PST_SEL_SELCAND, "sel_outlier" },
{ CTL_PST_SEL_SYNCCAND, "sel_candidate" },
{ CTL_PST_SEL_EXCESS, "sel_backup" },
{ CTL_PST_SEL_SYSPEER, "sel_sys.peer" },
diff --git a/contrib/ntp/libparse/Makefile.in b/contrib/ntp/libparse/Makefile.in
index 4b15dd685cf3..2f13e1f47f1c 100644
--- a/contrib/ntp/libparse/Makefile.in
+++ b/contrib/ntp/libparse/Makefile.in
@@ -118,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -252,6 +253,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -260,6 +262,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -321,6 +324,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/ntpd/Makefile.am b/contrib/ntp/ntpd/Makefile.am
index c94f7c09edf6..a5690b70d391 100644
--- a/contrib/ntp/ntpd/Makefile.am
+++ b/contrib/ntp/ntpd/Makefile.am
@@ -432,6 +432,9 @@ version.c: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/
version.o: version.c
env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+$(srcdir)/Makefile.am:
+ @: do-nothing
+
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libopts.mf
include $(top_srcdir)/sntp/check-libntp.mf
diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in
index 7f3084693593..2304e33d1f0f 100644
--- a/contrib/ntp/ntpd/Makefile.in
+++ b/contrib/ntp/ntpd/Makefile.in
@@ -125,6 +125,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -343,6 +344,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -351,6 +353,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -412,6 +415,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@@ -1827,6 +1831,9 @@ version.c: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/
version.o: version.c
env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+$(srcdir)/Makefile.am:
+ @: do-nothing
+
install-exec-hook:
@test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
|| for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
diff --git a/contrib/ntp/ntpd/invoke-ntp.conf.texi b/contrib/ntp/ntpd/invoke-ntp.conf.texi
index d7a9d13a2d99..37427d679d45 100644
--- a/contrib/ntp/ntpd/invoke-ntp.conf.texi
+++ b/contrib/ntp/ntpd/invoke-ntp.conf.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:30:28 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:38:16 PM by AutoGen 5.18.5
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@@ -1837,7 +1837,7 @@ re-associate accordingly.
Some administrators prefer to avoid running
@code{ntpd(1ntpdmdoc)}
continuously and run either
-@code{ntpdate(8)}
+@code{sntp(1sntpmdoc)}
or
@code{ntpd(1ntpdmdoc)}
@code{-q}
@@ -1921,7 +1921,7 @@ peers remaining.
This value defaults to 1, but can be changed
to any number from 1 to 15.
@item @code{minclock} @kbd{minclock}
-The clustering algorithm repeatedly casts out outlyer
+The clustering algorithm repeatedly casts out outlier
associations until no more than
@code{minclock}
associations remain.
@@ -2578,12 +2578,15 @@ pulses will not be suppressed.
@item @code{rlimit} @code{[@code{memlock} @kbd{Nmegabytes} | @code{stacksize} @kbd{N4kPages} @code{filenum} @kbd{Nfiledescriptors}]}
@table @asis
@item @code{memlock} @kbd{Nmegabytes}
-Specify the number of megabytes of memory that can be allocated.
-Probably only available under Linux, this option is useful
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
when dropping root (the
@code{-i}
option).
-The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+The default is 32 megabytes on non-Linux machines, and -1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
@item @code{stacksize} @kbd{N4kPages}
Specifies the maximum size of the process stack on systems with the
@code{mlockall()}
diff --git a/contrib/ntp/ntpd/invoke-ntp.keys.texi b/contrib/ntp/ntpd/invoke-ntp.keys.texi
index 622c4ffe03c2..33fdb8938ed6 100644
--- a/contrib/ntp/ntpd/invoke-ntp.keys.texi
+++ b/contrib/ntp/ntpd/invoke-ntp.keys.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:30:31 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:38:19 PM by AutoGen 5.18.5
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
diff --git a/contrib/ntp/ntpd/invoke-ntpd.texi b/contrib/ntp/ntpd/invoke-ntpd.texi
index 6936dda91f04..a781b26681f8 100644
--- a/contrib/ntp/ntpd/invoke-ntpd.texi
+++ b/contrib/ntp/ntpd/invoke-ntpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:30:33 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:38:21 PM by AutoGen 5.18.5
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -142,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.8p3
+ntpd - NTP daemon program - Ver. 4.2.8p4
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
diff --git a/contrib/ntp/ntpd/ntp.conf.5man b/contrib/ntp/ntpd/ntp.conf.5man
index 14438bdc7da1..ee457df4c8bb 100644
--- a/contrib/ntp/ntpd/ntp.conf.5man
+++ b/contrib/ntp/ntpd/ntp.conf.5man
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5man "29 Jun 2015" "4.2.8p3" "File Formats"
+.TH ntp.conf 5man "21 Oct 2015" "4.2.8p4" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-R0aO7B/ag-30aG6B)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-9oaqYI/ag-OpaiXI)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:16 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:01 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -2080,7 +2080,7 @@ re-associate accordingly.
Some administrators prefer to avoid running
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
continuously and run either
-\fCntpdate\f[]\fR(8)\f[]
+\fCsntp\f[]\fR(1sntpmdoc)\f[]
or
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
\f\*[B-Font]\-q\f[]
@@ -2170,7 +2170,7 @@ This value defaults to 1, but can be changed
to any number from 1 to 15.
.TP 7
.NOP \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[]
-The clustering algorithm repeatedly casts out outlyer
+The clustering algorithm repeatedly casts out outlier
associations until no more than
\f\*[B-Font]minclock\f[]
associations remain.
@@ -2897,12 +2897,15 @@ pulses will not be suppressed.
.RS
.TP 7
.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
-Specify the number of megabytes of memory that can be allocated.
-Probably only available under Linux, this option is useful
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
when dropping root (the
\f\*[B-Font]\-i\f[]
option).
-The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+The default is 32 megabytes on non-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
.TP 7
.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
Specifies the maximum size of the process stack on systems with the
diff --git a/contrib/ntp/ntpd/ntp.conf.5mdoc b/contrib/ntp/ntpd/ntp.conf.5mdoc
index 938acf6d6a13..a883aabaa8cb 100644
--- a/contrib/ntp/ntpd/ntp.conf.5mdoc
+++ b/contrib/ntp/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:36 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:24 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1903,7 +1903,7 @@ re\-associate accordingly.
Some administrators prefer to avoid running
.Xr ntpd 1ntpdmdoc
continuously and run either
-.Xr ntpdate 8
+.Xr sntp 1sntpmdoc
or
.Xr ntpd 1ntpdmdoc
.Fl q
@@ -1995,7 +1995,7 @@ peers remaining.
This value defaults to 1, but can be changed
to any number from 1 to 15.
.It Cm minclock Ar minclock
-The clustering algorithm repeatedly casts out outlyer
+The clustering algorithm repeatedly casts out outlier
associations until no more than
.Cm minclock
associations remain.
@@ -2725,12 +2725,15 @@ pulses will not be suppressed.
.Xc
.Bl -tag -width indent
.It Cm memlock Ar Nmegabytes
-Specify the number of megabytes of memory that can be allocated.
-Probably only available under Linux, this option is useful
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
when dropping root (the
.Fl i
option).
-The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
.It Cm stacksize Ar N4kPages
Specifies the maximum size of the process stack on systems with the
.Fn mlockall
diff --git a/contrib/ntp/ntpd/ntp.conf.def b/contrib/ntp/ntpd/ntp.conf.def
index 7e09c0306946..43835bc7632e 100644
--- a/contrib/ntp/ntpd/ntp.conf.def
+++ b/contrib/ntp/ntpd/ntp.conf.def
@@ -1905,7 +1905,7 @@ re-associate accordingly.
Some administrators prefer to avoid running
.Xr ntpd 1ntpdmdoc
continuously and run either
-.Xr ntpdate 8
+.Xr sntp 1sntpmdoc
or
.Xr ntpd 1ntpdmdoc
.Fl q
@@ -1997,7 +1997,7 @@ peers remaining.
This value defaults to 1, but can be changed
to any number from 1 to 15.
.It Cm minclock Ar minclock
-The clustering algorithm repeatedly casts out outlyer
+The clustering algorithm repeatedly casts out outlier
associations until no more than
.Cm minclock
associations remain.
@@ -2727,12 +2727,15 @@ pulses will not be suppressed.
.Xc
.Bl -tag -width indent
.It Cm memlock Ar Nmegabytes
-Specify the number of megabytes of memory that can be allocated.
-Probably only available under Linux, this option is useful
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
when dropping root (the
.Fl i
option).
-The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+The default is 32 megabytes on non-Linux machines, and -1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
.It Cm stacksize Ar N4kPages
Specifies the maximum size of the process stack on systems with the
.Fn mlockall
diff --git a/contrib/ntp/ntpd/ntp.conf.html b/contrib/ntp/ntpd/ntp.conf.html
index ad643556ea1f..1f0c81908a05 100644
--- a/contrib/ntp/ntpd/ntp.conf.html
+++ b/contrib/ntp/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.8p3 of <code>ntp.conf</code>.
+ <p>This document applies to version 4.2.8p4 of <code>ntp.conf</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -1839,7 +1839,7 @@ re-associate accordingly.
<p>Some administrators prefer to avoid running
<code>ntpd(1ntpdmdoc)</code>
continuously and run either
-<code>ntpdate(8)</code>
+<code>sntp(1sntpmdoc)</code>
or
<code>ntpd(1ntpdmdoc)</code>
<code>-q</code>
@@ -1922,7 +1922,7 @@ will be discarded if there are at least
peers remaining.
This value defaults to 1, but can be changed
to any number from 1 to 15.
-<br><dt><code>minclock</code> <kbd>minclock</kbd><dd>The clustering algorithm repeatedly casts out outlyer
+<br><dt><code>minclock</code> <kbd>minclock</kbd><dd>The clustering algorithm repeatedly casts out outlier
associations until no more than
<code>minclock</code>
associations remain.
@@ -2546,12 +2546,15 @@ pulses will not be suppressed.
</dl>
<br><dt><code>rlimit</code> <code>[memlock </code><kbd>Nmegabytes</kbd><code> | stacksize </code><kbd>N4kPages</kbd><code> filenum </code><kbd>Nfiledescriptors</kbd><code>]</code><dd>
<dl>
-<dt><code>memlock</code> <kbd>Nmegabytes</kbd><dd>Specify the number of megabytes of memory that can be allocated.
-Probably only available under Linux, this option is useful
+<dt><code>memlock</code> <kbd>Nmegabytes</kbd><dd>Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
when dropping root (the
<code>-i</code>
option).
-The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+The default is 32 megabytes on non-Linux machines, and -1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
<br><dt><code>stacksize</code> <kbd>N4kPages</kbd><dd>Specifies the maximum size of the process stack on systems with the
<code>mlockall()</code>
function.
diff --git a/contrib/ntp/ntpd/ntp.conf.man.in b/contrib/ntp/ntpd/ntp.conf.man.in
index ef9e14dfe770..7c8a39f46588 100644
--- a/contrib/ntp/ntpd/ntp.conf.man.in
+++ b/contrib/ntp/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 "29 Jun 2015" "4.2.8p3" "File Formats"
+.TH ntp.conf 5 "21 Oct 2015" "4.2.8p4" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-R0aO7B/ag-30aG6B)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-9oaqYI/ag-OpaiXI)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:16 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:01 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -2080,7 +2080,7 @@ re-associate accordingly.
Some administrators prefer to avoid running
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
continuously and run either
-\fCntpdate\f[]\fR(8)\f[]
+\fCsntp\f[]\fR(@SNTP_MS@)\f[]
or
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
\f\*[B-Font]\-q\f[]
@@ -2170,7 +2170,7 @@ This value defaults to 1, but can be changed
to any number from 1 to 15.
.TP 7
.NOP \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[]
-The clustering algorithm repeatedly casts out outlyer
+The clustering algorithm repeatedly casts out outlier
associations until no more than
\f\*[B-Font]minclock\f[]
associations remain.
@@ -2897,12 +2897,15 @@ pulses will not be suppressed.
.RS
.TP 7
.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
-Specify the number of megabytes of memory that can be allocated.
-Probably only available under Linux, this option is useful
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
when dropping root (the
\f\*[B-Font]\-i\f[]
option).
-The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+The default is 32 megabytes on non-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
.TP 7
.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
Specifies the maximum size of the process stack on systems with the
diff --git a/contrib/ntp/ntpd/ntp.conf.mdoc.in b/contrib/ntp/ntpd/ntp.conf.mdoc.in
index 93c638d6edff..613ee7a84aed 100644
--- a/contrib/ntp/ntpd/ntp.conf.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:36 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:24 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1903,7 +1903,7 @@ re\-associate accordingly.
Some administrators prefer to avoid running
.Xr ntpd @NTPD_MS@
continuously and run either
-.Xr ntpdate 8
+.Xr sntp @SNTP_MS@
or
.Xr ntpd @NTPD_MS@
.Fl q
@@ -1995,7 +1995,7 @@ peers remaining.
This value defaults to 1, but can be changed
to any number from 1 to 15.
.It Cm minclock Ar minclock
-The clustering algorithm repeatedly casts out outlyer
+The clustering algorithm repeatedly casts out outlier
associations until no more than
.Cm minclock
associations remain.
@@ -2725,12 +2725,15 @@ pulses will not be suppressed.
.Xc
.Bl -tag -width indent
.It Cm memlock Ar Nmegabytes
-Specify the number of megabytes of memory that can be allocated.
-Probably only available under Linux, this option is useful
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
when dropping root (the
.Fl i
option).
-The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
.It Cm stacksize Ar N4kPages
Specifies the maximum size of the process stack on systems with the
.Fn mlockall
diff --git a/contrib/ntp/ntpd/ntp.keys.5man b/contrib/ntp/ntpd/ntp.keys.5man
index 63d4553852ae..3e5cb54d91a6 100644
--- a/contrib/ntp/ntpd/ntp.keys.5man
+++ b/contrib/ntp/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "29 Jun 2015" "4.2.8p3" "File Formats"
+.TH ntp.keys 5man "21 Oct 2015" "4.2.8p4" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:21 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:08 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpd/ntp.keys.5mdoc b/contrib/ntp/ntpd/ntp.keys.5mdoc
index 47e5f81d258a..6355a39ca016 100644
--- a/contrib/ntp/ntpd/ntp.keys.5mdoc
+++ b/contrib/ntp/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:39 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:28 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpd/ntp.keys.html b/contrib/ntp/ntpd/ntp.keys.html
index f096f63fc837..3671aaaace7a 100644
--- a/contrib/ntp/ntpd/ntp.keys.html
+++ b/contrib/ntp/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.8p3 of <code>ntp.keys</code>.
+ <p>This document applies to version 4.2.8p4 of <code>ntp.keys</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/contrib/ntp/ntpd/ntp.keys.man.in b/contrib/ntp/ntpd/ntp.keys.man.in
index 1080b91bf0ed..bd64756a01c0 100644
--- a/contrib/ntp/ntpd/ntp.keys.man.in
+++ b/contrib/ntp/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "29 Jun 2015" "4.2.8p3" "File Formats"
+.TH ntp.keys 5 "21 Oct 2015" "4.2.8p4" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:21 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:08 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpd/ntp.keys.mdoc.in b/contrib/ntp/ntpd/ntp.keys.mdoc.in
index 6bd1c0987c2c..6600d57d5ea4 100644
--- a/contrib/ntp/ntpd/ntp.keys.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:39 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:28 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpd/ntp_config.c b/contrib/ntp/ntpd/ntp_config.c
index 300773240c74..1c754bd1613d 100644
--- a/contrib/ntp/ntpd/ntp_config.c
+++ b/contrib/ntp/ntpd/ntp_config.c
@@ -53,13 +53,21 @@
#include "ntp_parser.h"
#include "ntpd-opts.h"
+/* Bug 2817 */
+#if defined(HAVE_SYS_MMAN_H)
+# include <sys/mman.h>
+#endif
/* list of servers from command line for config_peers() */
int cmdline_server_count;
char ** cmdline_servers;
-/* set to zero if admin doesn't want memory locked */
-int do_memlock = 1;
+/* Current state of memory locking:
+ * -1: default
+ * 0: memory locking disabled
+ * 1: Memory locking enabled
+ */
+int cur_memlock = -1;
/*
* "logconfig" building blocks
@@ -1152,9 +1160,8 @@ create_address_node(
{
address_node *my_node;
- NTP_REQUIRE(NULL != addr);
- NTP_REQUIRE(AF_INET == type ||
- AF_INET6 == type || AF_UNSPEC == type);
+ REQUIRE(NULL != addr);
+ REQUIRE(AF_INET == type || AF_INET6 == type || AF_UNSPEC == type);
my_node = emalloc_zero(sizeof(*my_node));
my_node->address = addr;
my_node->type = (u_short)type;
@@ -1170,7 +1177,7 @@ destroy_address_node(
{
if (NULL == my_node)
return;
- NTP_REQUIRE(NULL != my_node->address);
+ REQUIRE(NULL != my_node->address);
free(my_node->address);
free(my_node);
@@ -1567,7 +1574,7 @@ create_nic_rule_node(
{
nic_rule_node *my_node;
- NTP_REQUIRE(match_class != 0 || if_name != NULL);
+ REQUIRE(match_class != 0 || if_name != NULL);
my_node = emalloc_zero(sizeof(*my_node));
my_node->match_class = match_class;
@@ -1826,7 +1833,9 @@ config_auth(
/* Crypto Command */
#ifdef AUTOKEY
+# ifdef __GNUC__
item = -1; /* quiet warning */
+# endif
my_val = HEAD_PFIFO(ptree->auth.crypto_cmd_list);
for (; my_val != NULL; my_val = my_val->link) {
switch (my_val->attr) {
@@ -1979,7 +1988,9 @@ config_tos(
int item;
double val;
+#ifdef __GNUC__
item = -1; /* quiet warning */
+#endif
tos = HEAD_PFIFO(ptree->orphan_cmds);
for (; tos != NULL; tos = tos->link) {
val = tos->value.d;
@@ -2610,18 +2621,36 @@ config_rlimit(
break;
case T_Memlock:
- if (rlimit_av->value.i != 0) {
+ /* What if we HAVE_OPT(SAVECONFIGQUIT) ? */
+ if (rlimit_av->value.i == -1) {
+# if defined(HAVE_MLOCKALL)
+ if (cur_memlock != 0) {
+ if (-1 == munlockall()) {
+ msyslog(LOG_ERR, "munlockall() failed: %m");
+ }
+ }
+ cur_memlock = 0;
+# endif /* HAVE_MLOCKALL */
+ } else if (rlimit_av->value.i >= 0) {
#if defined(RLIMIT_MEMLOCK)
+# if defined(HAVE_MLOCKALL)
+ if (cur_memlock != 1) {
+ if (-1 == mlockall(MCL_CURRENT|MCL_FUTURE)) {
+ msyslog(LOG_ERR, "mlockall() failed: %m");
+ }
+ }
+# endif /* HAVE_MLOCKALL */
ntp_rlimit(RLIMIT_MEMLOCK,
(rlim_t)(rlimit_av->value.i * 1024 * 1024),
1024 * 1024,
"MB");
+ cur_memlock = 1;
#else
/* STDERR as well would be fine... */
msyslog(LOG_WARNING, "'rlimit memlock' specified but is not available on this system.");
#endif /* RLIMIT_MEMLOCK */
} else {
- do_memlock = 0;
+ msyslog(LOG_WARNING, "'rlimit memlock' value of %d is unexpected!", rlimit_av->value.i);
}
break;
@@ -2662,7 +2691,9 @@ config_tinker(
attr_val * tinker;
int item;
+#ifdef __GNUC__
item = -1; /* quiet warning */
+#endif
tinker = HEAD_PFIFO(ptree->tinker);
for (; tinker != NULL; tinker = tinker->link) {
switch (tinker->attr) {
@@ -2776,12 +2807,14 @@ config_nic_rules(
switch (curr_node->match_class) {
default:
+#ifdef __GNUC__
/*
* this assignment quiets a gcc "may be used
* uninitialized" warning and is here for no
* other reason.
*/
match_type = MATCH_ALL;
+#endif
INSIST(FALSE);
break;
@@ -2834,12 +2867,14 @@ config_nic_rules(
switch (curr_node->action) {
default:
+#ifdef __GNUC__
/*
* this assignment quiets a gcc "may be used
* uninitialized" warning and is here for no
* other reason.
*/
action = ACTION_LISTEN;
+#endif
INSIST(FALSE);
break;
@@ -4880,9 +4915,9 @@ getnetnum(
enum gnn_type a_type /* ignored */
)
{
- NTP_REQUIRE(AF_UNSPEC == AF(addr) ||
- AF_INET == AF(addr) ||
- AF_INET6 == AF(addr));
+ REQUIRE(AF_UNSPEC == AF(addr) ||
+ AF_INET == AF(addr) ||
+ AF_INET6 == AF(addr));
if (!is_ip_address(num, AF(addr), addr))
return 0;
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
index 8ad1faf6eb1e..77363117bda4 100644
--- a/contrib/ntp/ntpd/ntp_control.c
+++ b/contrib/ntp/ntpd/ntp_control.c
@@ -3,10 +3,6 @@
* traps. Provides service to ntpq and others.
*/
-/*
- * $FreeBSD: stable/10/contrib/ntp/ntpd/ntp_control.c 276072 2014-12-22 19:07:16Z delphij $
- */
-
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -32,15 +28,11 @@
#include "ntp_leapsec.h"
#include "ntp_md5.h" /* provides OpenSSL digest API */
#include "lib_strbuf.h"
+#include <rc_cmdlength.h>
#ifdef KERNEL_PLL
# include "ntp_syscall.h"
#endif
-extern size_t remoteconfig_cmdlength( const char *src_buf, const char *src_end );
-
-#ifndef MIN
-#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
-#endif
/*
* Structure to hold request procedure information
@@ -428,10 +420,10 @@ static const struct ctl_var sys_var[] = {
{ CS_TIMER_XMTS, RO, "timer_xmts" }, /* 87 */
{ CS_FUZZ, RO, "fuzz" }, /* 88 */
{ CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 89 */
-#ifdef LEAP_SMEAR
+
{ CS_LEAPSMEARINTV, RO, "leapsmearinterval" }, /* 90 */
{ CS_LEAPSMEAROFFS, RO, "leapsmearoffset" }, /* 91 */
-#endif /* LEAP_SMEAR */
+
#ifdef AUTOKEY
{ CS_FLAGS, RO, "flags" }, /* 1 + CS_MAX_NOAUTOKEY */
{ CS_HOST, RO, "host" }, /* 2 + CS_MAX_NOAUTOKEY */
@@ -892,6 +884,28 @@ save_config(
int restrict_mask
)
{
+ /* block directory traversal by searching for characters that
+ * indicate directory components in a file path.
+ *
+ * Conceptually we should be searching for DIRSEP in filename,
+ * however Windows actually recognizes both forward and
+ * backslashes as equivalent directory separators at the API
+ * level. On POSIX systems we could allow '\\' but such
+ * filenames are tricky to manipulate from a shell, so just
+ * reject both types of slashes on all platforms.
+ */
+ /* TALOS-CAN-0062: block directory traversal for VMS, too */
+ static const char * illegal_in_filename =
+#if defined(VMS)
+ ":[]" /* do not allow drive and path components here */
+#elif defined(SYS_WINNT)
+ ":\\/" /* path and drive separators */
+#else
+ "\\/" /* separator and critical char for POSIX */
+#endif
+ ;
+
+
char reply[128];
#ifdef SAVECONFIG
char filespec[128];
@@ -946,15 +960,9 @@ save_config(
localtime(&now)))
strlcpy(filename, filespec, sizeof(filename));
- /*
- * Conceptually we should be searching for DIRSEP in filename,
- * however Windows actually recognizes both forward and
- * backslashes as equivalent directory separators at the API
- * level. On POSIX systems we could allow '\\' but such
- * filenames are tricky to manipulate from a shell, so just
- * reject both types of slashes on all platforms.
- */
- if (strchr(filename, '\\') || strchr(filename, '/')) {
+ /* block directory/drive traversal */
+ /* TALOS-CAN-0062: block directory traversal for VMS, too */
+ if (NULL != strpbrk(filename, illegal_in_filename)) {
snprintf(reply, sizeof(reply),
"saveconfig does not allow directory in filename");
ctl_putdata(reply, strlen(reply), 0);
@@ -1409,7 +1417,7 @@ ctl_putstr(
memcpy(buffer, tag, tl);
cp = buffer + tl;
if (len > 0) {
- NTP_INSIST(tl + 3 + len <= sizeof(buffer));
+ INSIST(tl + 3 + len <= sizeof(buffer));
*cp++ = '=';
*cp++ = '"';
memcpy(cp, data, len);
@@ -1444,7 +1452,7 @@ ctl_putunqstr(
memcpy(buffer, tag, tl);
cp = buffer + tl;
if (len > 0) {
- NTP_INSIST(tl + 1 + len <= sizeof(buffer));
+ INSIST(tl + 1 + len <= sizeof(buffer));
*cp++ = '=';
memcpy(cp, data, len);
cp += len;
@@ -1473,7 +1481,7 @@ ctl_putdblf(
while (*cq != '\0')
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((size_t)(cp - buffer) < sizeof(buffer));
+ INSIST((size_t)(cp - buffer) < sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), use_f ? "%.*f" : "%.*g",
precision, d);
cp += strlen(cp);
@@ -1499,7 +1507,7 @@ ctl_putuint(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
+ INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "%lu", uval);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
@@ -1526,7 +1534,7 @@ ctl_putcal(
pcal->hour,
pcal->minute
);
- NTP_INSIST(numch < sizeof(buffer));
+ INSIST(numch < sizeof(buffer));
ctl_putdata(buffer, numch, 0);
return;
@@ -1557,7 +1565,7 @@ ctl_putfs(
tm = gmtime(&fstamp);
if (NULL == tm)
return;
- NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
+ INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer),
"%04d%02d%02d%02d%02d", tm->tm_year + 1900,
tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min);
@@ -1586,7 +1594,7 @@ ctl_puthex(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
+ INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "0x%lx", uval);
cp += strlen(cp);
ctl_putdata(buffer,(unsigned)( cp - buffer ), 0);
@@ -1612,7 +1620,7 @@ ctl_putint(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
+ INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "%ld", ival);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
@@ -1638,7 +1646,7 @@ ctl_putts(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((size_t)(cp - buffer) < sizeof(buffer));
+ INSIST((size_t)(cp - buffer) < sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "0x%08x.%08x",
(u_int)ts->l_ui, (u_int)ts->l_uf);
cp += strlen(cp);
@@ -1670,7 +1678,7 @@ ctl_putadr(
cq = numtoa(addr32);
else
cq = stoa(addr);
- NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
+ INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "%s", cq);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
@@ -1741,7 +1749,7 @@ ctl_putarray(
if (i == 0)
i = NTP_SHIFT;
i--;
- NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
+ INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer),
" %.2f", arr[i] * 1e3);
cp += strlen(cp);
@@ -2410,6 +2418,9 @@ ctl_putsys(
ntohl(hostval.tstamp));
break;
#endif /* AUTOKEY */
+
+ default:
+ break;
}
}
@@ -2933,7 +2944,6 @@ ctl_getitem(
* Look for a first character match on the tag. If we find
* one, see if it is a full match.
*/
- v = var_list;
cp = reqpt;
for (v = var_list; !(EOV & v->flags); v++) {
if (!(PADDING & v->flags) && *cp == *(v->text)) {
@@ -3115,7 +3125,7 @@ read_peervars(void)
ctl_error(CERR_UNKNOWNVAR);
return;
}
- NTP_INSIST(v->code < COUNTOF(wants));
+ INSIST(v->code < COUNTOF(wants));
wants[v->code] = 1;
gotvar = 1;
}
@@ -3158,19 +3168,19 @@ read_sysvars(void)
gotvar = 0;
while (NULL != (v = ctl_getitem(sys_var, &valuep))) {
if (!(EOV & v->flags)) {
- NTP_INSIST(v->code < wants_count);
+ INSIST(v->code < wants_count);
wants[v->code] = 1;
gotvar = 1;
} else {
v = ctl_getitem(ext_sys_var, &valuep);
- NTP_INSIST(v != NULL);
+ INSIST(v != NULL);
if (EOV & v->flags) {
ctl_error(CERR_UNKNOWNVAR);
free(wants);
return;
}
n = v->code + CS_MAXCODE + 1;
- NTP_INSIST(n < wants_count);
+ INSIST(n < wants_count);
wants[n] = 1;
gotvar = 1;
}
@@ -4404,7 +4414,7 @@ read_clockstatus(
gotvar = TRUE;
} else {
v = ctl_getitem(kv, &valuep);
- NTP_INSIST(NULL != v);
+ INSIST(NULL != v);
if (EOV & v->flags) {
ctl_error(CERR_UNKNOWNVAR);
free(wants);
@@ -4800,7 +4810,7 @@ report_event(
for (i = 1; i <= CS_VARLIST; i++)
ctl_putsys(i);
} else {
- NTP_INSIST(peer != NULL);
+ INSIST(peer != NULL);
rpkt.associd = htons(peer->associd);
rpkt.status = htons(ctlpeerstatus(peer));
@@ -4905,7 +4915,7 @@ count_var(
while (!(EOV & (k++)->flags))
c++;
- NTP_ENSURE(c <= USHRT_MAX);
+ ENSURE(c <= USHRT_MAX);
return (u_short)c;
}
diff --git a/contrib/ntp/ntpd/ntp_crypto.c b/contrib/ntp/ntpd/ntp_crypto.c
index 2be501d15695..376b5b50514e 100644
--- a/contrib/ntp/ntpd/ntp_crypto.c
+++ b/contrib/ntp/ntpd/ntp_crypto.c
@@ -202,6 +202,7 @@ static void cert_free (struct cert_info *);
static struct pkey_info *crypto_key (char *, char *, sockaddr_u *);
static void bighash (BIGNUM *, BIGNUM *);
static struct cert_info *crypto_cert (char *);
+static u_int exten_payload_size(const struct exten *);
#ifdef SYS_WINNT
int
@@ -380,7 +381,7 @@ make_keylist(
EVP_SignUpdate(&ctx, (u_char *)vp, 12);
EVP_SignUpdate(&ctx, vp->ptr, sizeof(struct autokey));
if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
peer->flags |= FLAG_ASSOC;
}
@@ -419,7 +420,7 @@ crypto_recv(
struct autokey *ap, *bp; /* autokey pointer */
struct exten *ep, *fp; /* extension pointers */
struct cert_info *xinfo; /* certificate info pointer */
- int has_mac; /* length of MAC field */
+ int macbytes; /* length of MAC field, signed by intention */
int authlen; /* offset of MAC field */
associd_t associd; /* association ID */
tstamp_t fstamp = 0; /* filestamp */
@@ -446,7 +447,11 @@ crypto_recv(
*/
authlen = LEN_PKT_NOMAC;
hismode = (int)PKT_MODE((&rbufp->recv_pkt)->li_vn_mode);
- while ((has_mac = rbufp->recv_length - authlen) > (int)MAX_MAC_LEN) {
+ while ((macbytes = rbufp->recv_length - authlen) > (int)MAX_MAC_LEN) {
+ /* We can be reasonably sure that we can read at least
+ * the opcode and the size field here. More stringent
+ * checks follow up shortly.
+ */
pkt = (u_int32 *)&rbufp->recv_pkt + authlen / 4;
ep = (struct exten *)pkt;
code = ntohl(ep->opcode) & 0xffff0000;
@@ -467,6 +472,18 @@ crypto_recv(
code |= CRYPTO_ERROR;
}
+ /* Check if the declared size fits into the remaining
+ * buffer.
+ */
+ if (len > macbytes) {
+ DPRINTF(1, ("crypto_recv: possible attack detected, associd %d\n",
+ associd));
+ return XEVNT_LEN;
+ }
+
+ /* Check if the paylod of the extension fits into the
+ * declared frame.
+ */
if (len >= VALUE_LEN) {
fstamp = ntohl(ep->fstamp);
vallen = ntohl(ep->vallen);
@@ -508,6 +525,7 @@ crypto_recv(
rval = XEVNT_ERR;
break;
}
+ free(peer->cmmd); /* will be set again! */
}
fp = emalloc(len);
memcpy(fp, ep, len);
@@ -1153,9 +1171,8 @@ crypto_xmit(
* choice.
*/
case CRYPTO_CERT | CRYPTO_RESP:
- vallen = ntohl(ep->vallen); /* Must be <64k */
- if (vallen == 0 || vallen > MAXHOSTNAME ||
- len - VALUE_LEN < vallen) {
+ vallen = exten_payload_size(ep); /* Must be <64k */
+ if (vallen == 0 || vallen >= sizeof(certname) ) {
rval = XEVNT_LEN;
break;
}
@@ -1591,7 +1608,7 @@ crypto_encrypt(
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(&ctx, vp->ptr, vallen);
if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) {
- NTP_INSIST(vallen <= sign_siglen);
+ INSIST(vallen <= sign_siglen);
vp->siglen = htonl(vallen);
}
return (XEVNT_OK);
@@ -1770,7 +1787,7 @@ crypto_send(
if (j * 4 < siglen)
ep->pkt[i + j++] = 0;
memcpy(&ep->pkt[i], vp->sig, siglen);
- i += j;
+ /* i += j; */ /* We don't use i after this */
}
opcode = ntohl(ep->opcode);
ep->opcode = htonl((opcode & 0xffff0000) | len);
@@ -1825,7 +1842,7 @@ crypto_update(void)
EVP_SignUpdate(&ctx, (u_char *)&pubkey, 12);
EVP_SignUpdate(&ctx, pubkey.ptr, ntohl(pubkey.vallen));
if (EVP_SignFinal(&ctx, pubkey.sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
pubkey.siglen = htonl(len);
}
}
@@ -1846,7 +1863,7 @@ crypto_update(void)
EVP_SignUpdate(&ctx, cp->cert.ptr,
ntohl(cp->cert.vallen));
if (EVP_SignFinal(&ctx, cp->cert.sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
cp->cert.siglen = htonl(len);
}
}
@@ -1896,7 +1913,7 @@ crypto_update(void)
EVP_SignUpdate(&ctx, (u_char *)&tai_leap, 12);
EVP_SignUpdate(&ctx, tai_leap.ptr, len);
if (EVP_SignFinal(&ctx, tai_leap.sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
tai_leap.siglen = htonl(len);
}
crypto_flags |= CRYPTO_FLAG_TAI;
@@ -1997,9 +2014,9 @@ asn_to_calendar (
* 100. Dontcha love ASN.1? Better than MIL-188.
*/
len = asn1time->length;
- NTP_REQUIRE(len < sizeof(v));
+ REQUIRE(len < sizeof(v));
(void)strncpy(v, (char *)(asn1time->data), len);
- NTP_REQUIRE(len >= 13);
+ REQUIRE(len >= 13);
temp = strtoul(v+len-3, NULL, 10);
pjd->second = temp;
v[len-3] = '\0';
@@ -2169,7 +2186,7 @@ crypto_alice(
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(&ctx, vp->ptr, len);
if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
return (XEVNT_OK);
@@ -2197,8 +2214,7 @@ crypto_bob(
tstamp_t tstamp; /* NTP timestamp */
BIGNUM *bn, *bk, *r;
u_char *ptr;
- u_int len; /* extension field length */
- u_int vallen = 0; /* value length */
+ u_int len; /* extension field value length */
/*
* If the IFF parameters are not valid, something awful
@@ -2213,11 +2229,10 @@ crypto_bob(
/*
* Extract r from the challenge.
*/
- vallen = ntohl(ep->vallen);
- len = ntohl(ep->opcode) & 0x0000ffff;
- if (vallen == 0 || len < VALUE_LEN || len - VALUE_LEN < vallen)
- return XEVNT_LEN;
- if ((r = BN_bin2bn((u_char *)ep->pkt, vallen, NULL)) == NULL) {
+ len = exten_payload_size(ep);
+ if (len == 0 || len > MAX_VALLEN)
+ return (XEVNT_LEN);
+ if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) {
msyslog(LOG_ERR, "crypto_bob: %s",
ERR_error_string(ERR_get_error(), NULL));
return (XEVNT_ERR);
@@ -2229,7 +2244,7 @@ crypto_bob(
*/
bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new();
sdsa = DSA_SIG_new();
- BN_rand(bk, vallen * 8, -1, 1); /* k */
+ BN_rand(bk, len * 8, -1, 1); /* k */
BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */
BN_add(bn, bn, bk);
BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */
@@ -2248,16 +2263,16 @@ crypto_bob(
* Encode the values in ASN.1 and sign. The filestamp is from
* the local file.
*/
- vallen = i2d_DSA_SIG(sdsa, NULL);
- if (vallen == 0) {
+ len = i2d_DSA_SIG(sdsa, NULL);
+ if (len == 0) {
msyslog(LOG_ERR, "crypto_bob: %s",
ERR_error_string(ERR_get_error(), NULL));
DSA_SIG_free(sdsa);
return (XEVNT_ERR);
}
- if (vallen > MAX_VALLEN) {
- msyslog(LOG_ERR, "crypto_bob: signature is too big: %d",
- vallen);
+ if (len > MAX_VALLEN) {
+ msyslog(LOG_ERR, "crypto_bob: signature is too big: %u",
+ len);
DSA_SIG_free(sdsa);
return (XEVNT_LEN);
}
@@ -2265,8 +2280,8 @@ crypto_bob(
tstamp = crypto_time();
vp->tstamp = htonl(tstamp);
vp->fstamp = htonl(iffkey_info->fstamp);
- vp->vallen = htonl(vallen);
- ptr = emalloc(vallen);
+ vp->vallen = htonl(len);
+ ptr = emalloc(len);
vp->ptr = ptr;
i2d_DSA_SIG(sdsa, &ptr);
DSA_SIG_free(sdsa);
@@ -2277,10 +2292,10 @@ crypto_bob(
vp->sig = emalloc(sign_siglen);
EVP_SignInit(&ctx, sign_digest);
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
- EVP_SignUpdate(&ctx, vp->ptr, vallen);
- if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) {
- NTP_INSIST(vallen <= sign_siglen);
- vp->siglen = htonl(vallen);
+ EVP_SignUpdate(&ctx, vp->ptr, len);
+ if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) {
+ INSIST(len <= sign_siglen);
+ vp->siglen = htonl(len);
}
return (XEVNT_OK);
}
@@ -2486,7 +2501,7 @@ crypto_alice2(
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(&ctx, vp->ptr, len);
if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
return (XEVNT_OK);
@@ -2530,7 +2545,9 @@ crypto_bob2(
/*
* Extract r from the challenge.
*/
- len = ntohl(ep->vallen);
+ len = exten_payload_size(ep);
+ if (len == 0 || len > MAX_VALLEN)
+ return (XEVNT_LEN);
if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) {
msyslog(LOG_ERR, "crypto_bob2: %s",
ERR_error_string(ERR_get_error(), NULL));
@@ -2586,7 +2603,7 @@ crypto_bob2(
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(&ctx, vp->ptr, len);
if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
return (XEVNT_OK);
@@ -2817,7 +2834,7 @@ crypto_alice3(
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(&ctx, vp->ptr, len);
if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
return (XEVNT_OK);
@@ -2859,7 +2876,9 @@ crypto_bob3(
/*
* Extract r from the challenge.
*/
- len = ntohl(ep->vallen);
+ len = exten_payload_size(ep);
+ if (len == 0 || len > MAX_VALLEN)
+ return (XEVNT_LEN);
if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) {
msyslog(LOG_ERR, "crypto_bob3: %s",
ERR_error_string(ERR_get_error(), NULL));
@@ -2919,7 +2938,7 @@ crypto_bob3(
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
EVP_SignUpdate(&ctx, vp->ptr, len);
if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
return (XEVNT_OK);
@@ -3078,8 +3097,11 @@ cert_sign(
if (tstamp == 0)
return (XEVNT_TSP);
+ len = exten_payload_size(ep);
+ if (len == 0 || len > MAX_VALLEN)
+ return (XEVNT_LEN);
cptr = (void *)ep->pkt;
- if ((req = d2i_X509(NULL, &cptr, ntohl(ep->vallen))) == NULL) {
+ if ((req = d2i_X509(NULL, &cptr, len)) == NULL) {
msyslog(LOG_ERR, "cert_sign: %s",
ERR_error_string(ERR_get_error(), NULL));
return (XEVNT_CRT);
@@ -3158,7 +3180,7 @@ cert_sign(
EVP_SignUpdate(&ctx, (u_char *)vp, 12);
EVP_SignUpdate(&ctx, vp->ptr, len);
if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) {
- NTP_INSIST(len <= sign_siglen);
+ INSIST(len <= sign_siglen);
vp->siglen = htonl(len);
}
}
@@ -4028,6 +4050,36 @@ crypto_config(
break;
}
}
+
+/*
+ * Get the payload size (internal value length) of an extension packet.
+ * If the inner value size does not match the outer packet size (that
+ * is, the value would end behind the frame given by the opcode/size
+ * field) the function will effectively return UINT_MAX. If the frame is
+ * too short to hold a variable-sized value, the return value is zero.
+ */
+static u_int
+exten_payload_size(
+ const struct exten * ep)
+{
+ typedef const u_char *BPTR;
+
+ size_t extn_size;
+ size_t data_size;
+ size_t head_size;
+
+ data_size = 0;
+ if (NULL != ep) {
+ head_size = (BPTR)(&ep->vallen + 1) - (BPTR)ep;
+ extn_size = (uint16_t)(ntohl(ep->opcode) & 0x0000ffff);
+ if (extn_size >= head_size) {
+ data_size = (uint32_t)ntohl(ep->vallen);
+ if (data_size > extn_size - head_size)
+ data_size = ~(size_t)0u;
+ }
+ }
+ return (u_int)data_size;
+}
# else /* !AUTOKEY follows */
int ntp_crypto_bs_pubkey;
# endif /* !AUTOKEY */
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
index 2b5a003e0061..5fc6ed52acae 100644
--- a/contrib/ntp/ntpd/ntp_io.c
+++ b/contrib/ntp/ntpd/ntp_io.c
@@ -216,7 +216,7 @@ static int is_wildcard_addr (const sockaddr_u *);
* Multicast functions
*/
static isc_boolean_t addr_ismulticast (sockaddr_u *);
-static isc_boolean_t is_not_bindable (sockaddr_u *,
+static isc_boolean_t is_anycast (sockaddr_u *,
const char *);
/*
@@ -371,7 +371,7 @@ maintain_activefds(
maxactivefd = i;
break;
}
- NTP_INSIST(fd != maxactivefd);
+ INSIST(fd != maxactivefd);
}
}
}
@@ -687,8 +687,8 @@ addr_samesubnet(
const u_int32 * pm;
size_t loops;
- NTP_REQUIRE(AF(a) == AF(a_mask));
- NTP_REQUIRE(AF(b) == AF(b_mask));
+ REQUIRE(AF(a) == AF(a_mask));
+ REQUIRE(AF(b) == AF(b_mask));
/*
* With address and mask families verified to match, comparing
* the masks also validates the address's families match.
@@ -735,8 +735,8 @@ is_ip_address(
char tmpbuf[128];
char *pch;
- NTP_REQUIRE(host != NULL);
- NTP_REQUIRE(addr != NULL);
+ REQUIRE(host != NULL);
+ REQUIRE(addr != NULL);
ZERO_SOCK(addr);
@@ -1250,15 +1250,15 @@ add_nic_rule(
rule->action = action;
if (MATCH_IFNAME == match_type) {
- NTP_REQUIRE(NULL != if_name);
+ REQUIRE(NULL != if_name);
rule->if_name = estrdup(if_name);
} else if (MATCH_IFADDR == match_type) {
- NTP_REQUIRE(NULL != if_name);
+ REQUIRE(NULL != if_name);
/* set rule->addr */
is_ip = is_ip_address(if_name, AF_UNSPEC, &rule->addr);
- NTP_REQUIRE(is_ip);
+ REQUIRE(is_ip);
} else
- NTP_REQUIRE(NULL == if_name);
+ REQUIRE(NULL == if_name);
LINK_SLIST(nic_rule_list, rule, next);
}
@@ -1278,7 +1278,7 @@ action_text(
t = "ERROR"; /* quiet uninit warning */
DPRINTF(1, ("fatal: unknown nic_rule_action %d\n",
action));
- NTP_ENSURE(0);
+ ENSURE(0);
break;
case ACTION_LISTEN:
@@ -1666,11 +1666,9 @@ check_flags6(
u_int32 flags6
)
{
-#if defined(INCLUDE_IPV6_SUPPORT) && defined(SIOCGIFAFLAG_IN6) && \
- (defined(IN6_IFF_ANYCAST) || defined(IN6_IFF_NOTREADY))
+#if defined(INCLUDE_IPV6_SUPPORT) && defined(SIOCGIFAFLAG_IN6)
struct in6_ifreq ifr6;
int fd;
- u_int32 exclude = 0;
if (psau->sa.sa_family != AF_INET6)
return ISC_FALSE;
@@ -1684,21 +1682,14 @@ check_flags6(
return ISC_FALSE;
}
close(fd);
- flags6 = ifr6.ifr_ifru.ifru_flags6;
-#if defined(IN6_IFF_ANYCAST)
- exclude |= IN6_IFF_ANYCAST;
-#endif /* !IN6_IFF_ANYCAST */
-#if defined(IN6_IFF_NOTREADY)
- exclude |= IN6_IFF_NOTREADY;
-#endif /* !IN6_IFF_NOTREADY */
- if ((flags6 & exclude) != 0)
+ if ((ifr6.ifr_ifru.ifru_flags6 & flags6) != 0)
return ISC_TRUE;
-#endif /* INCLUDE_IPV6_SUPPORT && SIOCGIFAFLAG_IN6 && (IN6_IFF_ANYCAST && IN6_IFF_NOTREADY) */
+#endif /* INCLUDE_IPV6_SUPPORT && SIOCGIFAFLAG_IN6 */
return ISC_FALSE;
}
static isc_boolean_t
-is_not_bindable(
+is_anycast(
sockaddr_u *psau,
const char *name
)
@@ -1859,7 +1850,7 @@ update_interfaces(
if (is_wildcard_addr(&enumep.sin))
continue;
- if (is_not_bindable(&enumep.sin, isc_if.name))
+ if (is_anycast(&enumep.sin, isc_if.name))
continue;
/*
@@ -2031,6 +2022,7 @@ update_interfaces(
if (sys_bclient)
io_setbclient();
+#ifdef MCAST
/*
* Check multicast interfaces and try to join multicast groups if
* not joined yet.
@@ -2056,6 +2048,7 @@ update_interfaces(
}
}
}
+#endif /* MCAST */
return new_interface_found;
}
@@ -2406,7 +2399,7 @@ enable_multicast_if(
u_int off6 = 0;
#endif
- NTP_REQUIRE(AF(maddr) == AF(&iface->sin));
+ REQUIRE(AF(maddr) == AF(&iface->sin));
switch (AF(&iface->sin)) {
@@ -2466,9 +2459,9 @@ socket_multicast_enable(
)
{
struct ip_mreq mreq;
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
+# ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
struct ipv6_mreq mreq6;
-#endif
+# endif
switch (AF(maddr)) {
case AF_INET:
@@ -2495,7 +2488,7 @@ socket_multicast_enable(
break;
case AF_INET6:
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
+# ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
/*
* Enable reception of multicast packets.
* If the address is link-local we can get the
@@ -2519,9 +2512,9 @@ socket_multicast_enable(
DPRINTF(4, ("Added IPv6 multicast group on socket %d, addr %s for interface %u (%s)\n",
iface->fd, stoa(&iface->sin),
mreq6.ipv6mr_interface, stoa(maddr)));
-#else
+# else
return ISC_FALSE;
-#endif /* INCLUDE_IPV6_MULTICAST_SUPPORT */
+# endif /* INCLUDE_IPV6_MULTICAST_SUPPORT */
}
iface->flags |= INT_MCASTOPEN;
iface->num_mcast++;
@@ -2543,9 +2536,9 @@ socket_multicast_disable(
sockaddr_u * maddr
)
{
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
+# ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
struct ipv6_mreq mreq6;
-#endif
+# endif
struct ip_mreq mreq;
ZERO(mreq);
@@ -2574,7 +2567,7 @@ socket_multicast_disable(
}
break;
case AF_INET6:
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
+# ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
/*
* Disable reception of multicast packets
* If the address is link-local we can get the
@@ -2596,9 +2589,9 @@ socket_multicast_disable(
return ISC_FALSE;
}
break;
-#else
+# else
return ISC_FALSE;
-#endif /* INCLUDE_IPV6_MULTICAST_SUPPORT */
+# endif /* INCLUDE_IPV6_MULTICAST_SUPPORT */
}
iface->num_mcast--;
@@ -2638,7 +2631,7 @@ io_setbclient(void)
continue;
/* Only IPv4 addresses are valid for broadcast */
- NTP_REQUIRE(IS_IPV4(&interf->sin));
+ REQUIRE(IS_IPV4(&interf->sin));
/* Do we already have the broadcast address open? */
if (interf->flags & INT_BCASTOPEN) {
@@ -2744,7 +2737,7 @@ io_multicast_add(
return;
}
-#ifndef MULTICAST_NONEWSOCKET
+# ifndef MULTICAST_NONEWSOCKET
ep = new_interface(NULL);
/*
@@ -2794,7 +2787,7 @@ io_multicast_add(
}
{ /* in place of the { following for in #else clause */
one_ep = ep;
-#else /* MULTICAST_NONEWSOCKET follows */
+# else /* MULTICAST_NONEWSOCKET follows */
/*
* For the case where we can't use a separate socket (Windows)
* join each applicable endpoint socket to the group address.
@@ -2809,7 +2802,7 @@ io_multicast_add(
(INT_LOOPBACK | INT_WILDCARD) & ep->flags)
continue;
one_ep = ep;
-#endif /* MULTICAST_NONEWSOCKET */
+# endif /* MULTICAST_NONEWSOCKET */
if (socket_multicast_enable(ep, addr))
msyslog(LOG_INFO,
"Joined %s socket to multicast group %s",
@@ -3249,7 +3242,7 @@ read_refclock_packet(
l_fp ts
)
{
- int i;
+ u_int read_count;
int buflen;
int saved_errno;
int consumed;
@@ -3268,12 +3261,15 @@ read_refclock_packet(
return (buflen);
}
- i = (rp->datalen == 0
- || rp->datalen > (int)sizeof(rb->recv_space))
- ? (int)sizeof(rb->recv_space)
- : rp->datalen;
+ /* TALOS-CAN-0064: avoid signed/unsigned clashes that can lead
+ * to buffer overrun and memory corruption
+ */
+ if (rp->datalen <= 0 || rp->datalen > sizeof(rb->recv_space))
+ read_count = sizeof(rb->recv_space);
+ else
+ read_count = (u_int)rp->datalen;
do {
- buflen = read(fd, (char *)&rb->recv_space, (u_int)i);
+ buflen = read(fd, (char *)&rb->recv_space, read_count);
} while (buflen < 0 && EINTR == errno);
if (buflen <= 0) {
@@ -4088,7 +4084,7 @@ calc_addr_distance(
int a1_greater;
int i;
- NTP_REQUIRE(AF(a1) == AF(a2));
+ REQUIRE(AF(a1) == AF(a2));
ZERO_SOCK(dist);
AF(dist) = AF(a1);
@@ -4139,7 +4135,7 @@ cmp_addr_distance(
{
int i;
- NTP_REQUIRE(AF(d1) == AF(d2));
+ REQUIRE(AF(d1) == AF(d2));
if (IS_IPV4(d1)) {
if (SRCADR(d1) < SRCADR(d2))
@@ -4631,10 +4627,15 @@ process_routing_msgs(struct asyncio_reader *reader)
cnt = read(reader->fd, buffer, sizeof(buffer));
if (cnt < 0) {
- msyslog(LOG_ERR,
- "i/o error on routing socket %m - disabling");
- remove_asyncio_reader(reader);
- delete_asyncio_reader(reader);
+ if (errno == ENOBUFS) {
+ msyslog(LOG_ERR,
+ "routing socket reports: %m");
+ } else {
+ msyslog(LOG_ERR,
+ "routing socket reports: %m - disabling");
+ remove_asyncio_reader(reader);
+ delete_asyncio_reader(reader);
+ }
return;
}
diff --git a/contrib/ntp/ntpd/ntp_loopfilter.c b/contrib/ntp/ntpd/ntp_loopfilter.c
index cb183b934fc8..42c30de5679f 100644
--- a/contrib/ntp/ntpd/ntp_loopfilter.c
+++ b/contrib/ntp/ntpd/ntp_loopfilter.c
@@ -577,7 +577,7 @@ local_clock(
switch (state) {
/*
- * In SYNC state we ignore the first outlyer and switch
+ * In SYNC state we ignore the first outlier and switch
* to SPIK state.
*/
case EVNT_SYNC:
@@ -588,8 +588,8 @@ local_clock(
return (0);
/*
- * In FREQ state we ignore outlyers and inlyers. At the
- * first outlyer after the stepout threshold, compute
+ * In FREQ state we ignore outliers and inlyers. At the
+ * first outlier after the stepout threshold, compute
* the apparent frequency correction and step the phase.
*/
case EVNT_FREQ:
@@ -601,7 +601,7 @@ local_clock(
/* fall through to EVNT_SPIK */
/*
- * In SPIK state we ignore succeeding outlyers until
+ * In SPIK state we ignore succeeding outliers until
* either an inlyer is found or the stepout threshold is
* exceeded.
*/
diff --git a/contrib/ntp/ntpd/ntp_monitor.c b/contrib/ntp/ntpd/ntp_monitor.c
index 02fd757307da..a07a1aaef196 100644
--- a/contrib/ntp/ntpd/ntp_monitor.c
+++ b/contrib/ntp/ntpd/ntp_monitor.c
@@ -133,7 +133,7 @@ remove_from_hash(
hash = MON_HASH(&mon->rmtadr);
UNLINK_SLIST(punlinked, mon_hash[hash], mon, hash_next,
mon_entry);
- NTP_ENSURE(punlinked == mon);
+ ENSURE(punlinked == mon);
}
@@ -325,6 +325,8 @@ ntp_monitor(
int leak; /* new headway */
int limit; /* average threshold */
+ REQUIRE(rbufp != NULL);
+
if (mon_enabled == MON_OFF)
return ~(RES_LIMITED | RES_KOD) & flags;
@@ -466,6 +468,8 @@ ntp_monitor(
}
}
+ INSIST(mon != NULL);
+
/*
* Got one, initialize it
*/
diff --git a/contrib/ntp/ntpd/ntp_parser.c b/contrib/ntp/ntpd/ntp_parser.c
index d76ac3374386..6235033feffb 100644
--- a/contrib/ntp/ntpd/ntp_parser.c
+++ b/contrib/ntp/ntpd/ntp_parser.c
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
+/* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
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/>. */
@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.7.12-4996"
+#define YYBISON_VERSION "3.0.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -62,8 +62,7 @@
/* Copy the first part of user declarations. */
-/* Line 371 of yacc.c */
-#line 11 "../../ntpd/ntp_parser.y"
+#line 11 "../../ntpd/ntp_parser.y" /* yacc.c:339 */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -97,14 +96,13 @@
# define ONLY_SIM(a) NULL
#endif
-/* Line 371 of yacc.c */
-#line 102 "ntp_parser.c"
+#line 100 "../../ntpd/ntp_parser.c" /* yacc.c:339 */
-# ifndef YY_NULL
+# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# define YY_NULLPTR nullptr
# else
-# define YY_NULL 0
+# define YY_NULLPTR 0
# endif
# endif
@@ -118,9 +116,9 @@
/* In a future release of Bison, this section will be replaced
by #include "y.tab.h". */
-#ifndef YY_YY_NTP_PARSER_H_INCLUDED
-# define YY_YY_NTP_PARSER_H_INCLUDED
-/* Enabling traces. */
+#ifndef YY_YY__NTPD_NTP_PARSER_H_INCLUDED
+# define YY_YY__NTPD_NTP_PARSER_H_INCLUDED
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
#endif
@@ -128,204 +126,203 @@
extern int yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- T_Abbrev = 258,
- T_Age = 259,
- T_All = 260,
- T_Allan = 261,
- T_Allpeers = 262,
- T_Auth = 263,
- T_Autokey = 264,
- T_Automax = 265,
- T_Average = 266,
- T_Bclient = 267,
- T_Beacon = 268,
- T_Broadcast = 269,
- T_Broadcastclient = 270,
- T_Broadcastdelay = 271,
- T_Burst = 272,
- T_Calibrate = 273,
- T_Ceiling = 274,
- T_Clockstats = 275,
- T_Cohort = 276,
- T_ControlKey = 277,
- T_Crypto = 278,
- T_Cryptostats = 279,
- T_Ctl = 280,
- T_Day = 281,
- T_Default = 282,
- T_Digest = 283,
- T_Disable = 284,
- T_Discard = 285,
- T_Dispersion = 286,
- T_Double = 287,
- T_Driftfile = 288,
- T_Drop = 289,
- T_Dscp = 290,
- T_Ellipsis = 291,
- T_Enable = 292,
- T_End = 293,
- T_False = 294,
- T_File = 295,
- T_Filegen = 296,
- T_Filenum = 297,
- T_Flag1 = 298,
- T_Flag2 = 299,
- T_Flag3 = 300,
- T_Flag4 = 301,
- T_Flake = 302,
- T_Floor = 303,
- T_Freq = 304,
- T_Fudge = 305,
- T_Host = 306,
- T_Huffpuff = 307,
- T_Iburst = 308,
- T_Ident = 309,
- T_Ignore = 310,
- T_Incalloc = 311,
- T_Incmem = 312,
- T_Initalloc = 313,
- T_Initmem = 314,
- T_Includefile = 315,
- T_Integer = 316,
- T_Interface = 317,
- T_Intrange = 318,
- T_Io = 319,
- T_Ipv4 = 320,
- T_Ipv4_flag = 321,
- T_Ipv6 = 322,
- T_Ipv6_flag = 323,
- T_Kernel = 324,
- T_Key = 325,
- T_Keys = 326,
- T_Keysdir = 327,
- T_Kod = 328,
- T_Mssntp = 329,
- T_Leapfile = 330,
- T_Leapsmearinterval = 331,
- T_Limited = 332,
- T_Link = 333,
- T_Listen = 334,
- T_Logconfig = 335,
- T_Logfile = 336,
- T_Loopstats = 337,
- T_Lowpriotrap = 338,
- T_Manycastclient = 339,
- T_Manycastserver = 340,
- T_Mask = 341,
- T_Maxage = 342,
- T_Maxclock = 343,
- T_Maxdepth = 344,
- T_Maxdist = 345,
- T_Maxmem = 346,
- T_Maxpoll = 347,
- T_Mdnstries = 348,
- T_Mem = 349,
- T_Memlock = 350,
- T_Minclock = 351,
- T_Mindepth = 352,
- T_Mindist = 353,
- T_Minimum = 354,
- T_Minpoll = 355,
- T_Minsane = 356,
- T_Mode = 357,
- T_Mode7 = 358,
- T_Monitor = 359,
- T_Month = 360,
- T_Mru = 361,
- T_Multicastclient = 362,
- T_Nic = 363,
- T_Nolink = 364,
- T_Nomodify = 365,
- T_Nomrulist = 366,
- T_None = 367,
- T_Nonvolatile = 368,
- T_Nopeer = 369,
- T_Noquery = 370,
- T_Noselect = 371,
- T_Noserve = 372,
- T_Notrap = 373,
- T_Notrust = 374,
- T_Ntp = 375,
- T_Ntpport = 376,
- T_NtpSignDsocket = 377,
- T_Orphan = 378,
- T_Orphanwait = 379,
- T_Panic = 380,
- T_Peer = 381,
- T_Peerstats = 382,
- T_Phone = 383,
- T_Pid = 384,
- T_Pidfile = 385,
- T_Pool = 386,
- T_Port = 387,
- T_Preempt = 388,
- T_Prefer = 389,
- T_Protostats = 390,
- T_Pw = 391,
- T_Randfile = 392,
- T_Rawstats = 393,
- T_Refid = 394,
- T_Requestkey = 395,
- T_Reset = 396,
- T_Restrict = 397,
- T_Revoke = 398,
- T_Rlimit = 399,
- T_Saveconfigdir = 400,
- T_Server = 401,
- T_Setvar = 402,
- T_Source = 403,
- T_Stacksize = 404,
- T_Statistics = 405,
- T_Stats = 406,
- T_Statsdir = 407,
- T_Step = 408,
- T_Stepback = 409,
- T_Stepfwd = 410,
- T_Stepout = 411,
- T_Stratum = 412,
- T_String = 413,
- T_Sys = 414,
- T_Sysstats = 415,
- T_Tick = 416,
- T_Time1 = 417,
- T_Time2 = 418,
- T_Timer = 419,
- T_Timingstats = 420,
- T_Tinker = 421,
- T_Tos = 422,
- T_Trap = 423,
- T_True = 424,
- T_Trustedkey = 425,
- T_Ttl = 426,
- T_Type = 427,
- T_U_int = 428,
- T_Unconfig = 429,
- T_Unpeer = 430,
- T_Version = 431,
- T_WanderThreshold = 432,
- T_Week = 433,
- T_Wildcard = 434,
- T_Xleave = 435,
- T_Year = 436,
- T_Flag = 437,
- T_EOC = 438,
- T_Simulate = 439,
- T_Beep_Delay = 440,
- T_Sim_Duration = 441,
- T_Server_Offset = 442,
- T_Duration = 443,
- T_Freq_Offset = 444,
- T_Wander = 445,
- T_Jitter = 446,
- T_Prop_Delay = 447,
- T_Proc_Delay = 448
- };
+ enum yytokentype
+ {
+ T_Abbrev = 258,
+ T_Age = 259,
+ T_All = 260,
+ T_Allan = 261,
+ T_Allpeers = 262,
+ T_Auth = 263,
+ T_Autokey = 264,
+ T_Automax = 265,
+ T_Average = 266,
+ T_Bclient = 267,
+ T_Beacon = 268,
+ T_Broadcast = 269,
+ T_Broadcastclient = 270,
+ T_Broadcastdelay = 271,
+ T_Burst = 272,
+ T_Calibrate = 273,
+ T_Ceiling = 274,
+ T_Clockstats = 275,
+ T_Cohort = 276,
+ T_ControlKey = 277,
+ T_Crypto = 278,
+ T_Cryptostats = 279,
+ T_Ctl = 280,
+ T_Day = 281,
+ T_Default = 282,
+ T_Digest = 283,
+ T_Disable = 284,
+ T_Discard = 285,
+ T_Dispersion = 286,
+ T_Double = 287,
+ T_Driftfile = 288,
+ T_Drop = 289,
+ T_Dscp = 290,
+ T_Ellipsis = 291,
+ T_Enable = 292,
+ T_End = 293,
+ T_False = 294,
+ T_File = 295,
+ T_Filegen = 296,
+ T_Filenum = 297,
+ T_Flag1 = 298,
+ T_Flag2 = 299,
+ T_Flag3 = 300,
+ T_Flag4 = 301,
+ T_Flake = 302,
+ T_Floor = 303,
+ T_Freq = 304,
+ T_Fudge = 305,
+ T_Host = 306,
+ T_Huffpuff = 307,
+ T_Iburst = 308,
+ T_Ident = 309,
+ T_Ignore = 310,
+ T_Incalloc = 311,
+ T_Incmem = 312,
+ T_Initalloc = 313,
+ T_Initmem = 314,
+ T_Includefile = 315,
+ T_Integer = 316,
+ T_Interface = 317,
+ T_Intrange = 318,
+ T_Io = 319,
+ T_Ipv4 = 320,
+ T_Ipv4_flag = 321,
+ T_Ipv6 = 322,
+ T_Ipv6_flag = 323,
+ T_Kernel = 324,
+ T_Key = 325,
+ T_Keys = 326,
+ T_Keysdir = 327,
+ T_Kod = 328,
+ T_Mssntp = 329,
+ T_Leapfile = 330,
+ T_Leapsmearinterval = 331,
+ T_Limited = 332,
+ T_Link = 333,
+ T_Listen = 334,
+ T_Logconfig = 335,
+ T_Logfile = 336,
+ T_Loopstats = 337,
+ T_Lowpriotrap = 338,
+ T_Manycastclient = 339,
+ T_Manycastserver = 340,
+ T_Mask = 341,
+ T_Maxage = 342,
+ T_Maxclock = 343,
+ T_Maxdepth = 344,
+ T_Maxdist = 345,
+ T_Maxmem = 346,
+ T_Maxpoll = 347,
+ T_Mdnstries = 348,
+ T_Mem = 349,
+ T_Memlock = 350,
+ T_Minclock = 351,
+ T_Mindepth = 352,
+ T_Mindist = 353,
+ T_Minimum = 354,
+ T_Minpoll = 355,
+ T_Minsane = 356,
+ T_Mode = 357,
+ T_Mode7 = 358,
+ T_Monitor = 359,
+ T_Month = 360,
+ T_Mru = 361,
+ T_Multicastclient = 362,
+ T_Nic = 363,
+ T_Nolink = 364,
+ T_Nomodify = 365,
+ T_Nomrulist = 366,
+ T_None = 367,
+ T_Nonvolatile = 368,
+ T_Nopeer = 369,
+ T_Noquery = 370,
+ T_Noselect = 371,
+ T_Noserve = 372,
+ T_Notrap = 373,
+ T_Notrust = 374,
+ T_Ntp = 375,
+ T_Ntpport = 376,
+ T_NtpSignDsocket = 377,
+ T_Orphan = 378,
+ T_Orphanwait = 379,
+ T_Panic = 380,
+ T_Peer = 381,
+ T_Peerstats = 382,
+ T_Phone = 383,
+ T_Pid = 384,
+ T_Pidfile = 385,
+ T_Pool = 386,
+ T_Port = 387,
+ T_Preempt = 388,
+ T_Prefer = 389,
+ T_Protostats = 390,
+ T_Pw = 391,
+ T_Randfile = 392,
+ T_Rawstats = 393,
+ T_Refid = 394,
+ T_Requestkey = 395,
+ T_Reset = 396,
+ T_Restrict = 397,
+ T_Revoke = 398,
+ T_Rlimit = 399,
+ T_Saveconfigdir = 400,
+ T_Server = 401,
+ T_Setvar = 402,
+ T_Source = 403,
+ T_Stacksize = 404,
+ T_Statistics = 405,
+ T_Stats = 406,
+ T_Statsdir = 407,
+ T_Step = 408,
+ T_Stepback = 409,
+ T_Stepfwd = 410,
+ T_Stepout = 411,
+ T_Stratum = 412,
+ T_String = 413,
+ T_Sys = 414,
+ T_Sysstats = 415,
+ T_Tick = 416,
+ T_Time1 = 417,
+ T_Time2 = 418,
+ T_Timer = 419,
+ T_Timingstats = 420,
+ T_Tinker = 421,
+ T_Tos = 422,
+ T_Trap = 423,
+ T_True = 424,
+ T_Trustedkey = 425,
+ T_Ttl = 426,
+ T_Type = 427,
+ T_U_int = 428,
+ T_Unconfig = 429,
+ T_Unpeer = 430,
+ T_Version = 431,
+ T_WanderThreshold = 432,
+ T_Week = 433,
+ T_Wildcard = 434,
+ T_Xleave = 435,
+ T_Year = 436,
+ T_Flag = 437,
+ T_EOC = 438,
+ T_Simulate = 439,
+ T_Beep_Delay = 440,
+ T_Sim_Duration = 441,
+ T_Server_Offset = 442,
+ T_Duration = 443,
+ T_Freq_Offset = 444,
+ T_Wander = 445,
+ T_Jitter = 446,
+ T_Prop_Delay = 447,
+ T_Proc_Delay = 448
+ };
#endif
/* Tokens. */
#define T_Abbrev 258
@@ -520,13 +517,12 @@ extern int yydebug;
#define T_Prop_Delay 447
#define T_Proc_Delay 448
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{
-/* Line 387 of yacc.c */
-#line 51 "../../ntpd/ntp_parser.y"
+#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:355 */
char * String;
double Double;
@@ -545,37 +541,22 @@ typedef union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-
-/* Line 387 of yacc.c */
-#line 551 "ntp_parser.c"
-} YYSTYPE;
+#line 545 "../../ntpd/ntp_parser.c" /* yacc.c:355 */
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+
extern YYSTYPE yylval;
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
+#endif /* !YY_YY__NTPD_NTP_PARSER_H_INCLUDED */
/* Copy the second part of user declarations. */
-/* Line 390 of yacc.c */
-#line 579 "ntp_parser.c"
+#line 560 "../../ntpd/ntp_parser.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -589,11 +570,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -613,8 +591,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -636,11 +613,30 @@ typedef short int yytype_int16;
# endif
#endif
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if (! defined __GNUC__ || __GNUC__ < 2 \
- || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
-# define __attribute__(Spec) /* empty */
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
@@ -651,25 +647,26 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -687,8 +684,7 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
@@ -700,8 +696,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -717,7 +713,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -725,15 +721,13 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -743,7 +737,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -768,16 +762,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
@@ -796,7 +790,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -812,17 +806,19 @@ union yyalloc
#define YYNNTS 105
/* YYNRULES -- Number of rules. */
#define YYNRULES 313
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 419
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 448
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -873,127 +869,7 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 5, 9, 12, 15, 16, 18, 20,
- 22, 24, 26, 28, 30, 32, 34, 36, 38, 40,
- 42, 46, 48, 50, 52, 54, 56, 58, 61, 63,
- 65, 67, 68, 71, 73, 75, 77, 79, 81, 83,
- 85, 87, 89, 91, 93, 95, 98, 101, 103, 105,
- 107, 109, 111, 113, 116, 118, 121, 123, 125, 127,
- 130, 133, 136, 139, 142, 145, 148, 151, 154, 157,
- 160, 163, 164, 167, 170, 173, 175, 177, 179, 181,
- 183, 186, 189, 191, 194, 197, 200, 202, 204, 206,
- 208, 210, 212, 214, 216, 218, 220, 223, 226, 230,
- 233, 235, 237, 239, 241, 243, 245, 247, 249, 251,
- 252, 255, 258, 261, 263, 265, 267, 269, 271, 273,
- 275, 277, 279, 281, 283, 285, 287, 290, 293, 297,
- 303, 307, 312, 317, 321, 322, 325, 327, 329, 331,
- 333, 335, 337, 339, 341, 343, 345, 347, 349, 351,
- 353, 355, 358, 360, 363, 365, 367, 369, 372, 374,
- 377, 379, 381, 383, 385, 387, 389, 391, 393, 397,
- 400, 402, 405, 408, 411, 414, 417, 419, 421, 423,
- 425, 427, 429, 432, 435, 437, 440, 442, 444, 446,
- 449, 452, 455, 457, 459, 461, 463, 465, 467, 469,
- 471, 473, 475, 477, 480, 483, 485, 488, 490, 492,
- 494, 496, 498, 500, 502, 504, 506, 508, 510, 512,
- 515, 518, 521, 524, 528, 530, 533, 536, 539, 542,
- 546, 549, 551, 553, 555, 557, 559, 561, 563, 565,
- 567, 569, 571, 574, 575, 580, 582, 583, 584, 587,
- 590, 593, 596, 598, 600, 604, 608, 610, 612, 614,
- 616, 618, 620, 622, 624, 626, 629, 632, 634, 636,
- 638, 640, 642, 644, 646, 648, 651, 653, 656, 658,
- 660, 662, 668, 671, 673, 676, 678, 680, 682, 684,
- 686, 688, 694, 696, 700, 703, 707, 709, 711, 714,
- 716, 722, 727, 731, 734, 736, 743, 747, 750, 754,
- 756, 758, 760, 762
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int16 yyrhs[] =
-{
- 200, 0, -1, 201, -1, 201, 202, 183, -1, 202,
- 183, -1, 1, 183, -1, -1, 203, -1, 216, -1,
- 218, -1, 219, -1, 228, -1, 236, -1, 223, -1,
- 245, -1, 250, -1, 254, -1, 259, -1, 263, -1,
- 290, -1, 204, 205, 208, -1, 146, -1, 131, -1,
- 126, -1, 14, -1, 84, -1, 206, -1, 207, 158,
- -1, 158, -1, 66, -1, 68, -1, -1, 208, 209,
- -1, 210, -1, 212, -1, 214, -1, 211, -1, 9,
- -1, 17, -1, 53, -1, 116, -1, 133, -1, 134,
- -1, 169, -1, 180, -1, 213, 61, -1, 213, 173,
- -1, 70, -1, 100, -1, 92, -1, 171, -1, 102,
- -1, 176, -1, 215, 158, -1, 54, -1, 217, 205,
- -1, 174, -1, 175, -1, 15, -1, 85, 287, -1,
- 107, 287, -1, 93, 61, -1, 10, 61, -1, 22,
- 61, -1, 23, 220, -1, 71, 158, -1, 72, 158,
- -1, 140, 61, -1, 143, 61, -1, 170, 283, -1,
- 122, 158, -1, -1, 220, 221, -1, 222, 158, -1,
- 143, 61, -1, 51, -1, 54, -1, 136, -1, 137,
- -1, 28, -1, 167, 224, -1, 224, 225, -1, 225,
- -1, 226, 61, -1, 227, 289, -1, 21, 288, -1,
- 19, -1, 48, -1, 123, -1, 124, -1, 101, -1,
- 13, -1, 98, -1, 90, -1, 96, -1, 88, -1,
- 150, 229, -1, 152, 158, -1, 41, 230, 231, -1,
- 229, 230, -1, 230, -1, 20, -1, 24, -1, 82,
- -1, 127, -1, 138, -1, 160, -1, 165, -1, 135,
- -1, -1, 231, 232, -1, 40, 158, -1, 172, 235,
- -1, 233, -1, 234, -1, 78, -1, 109, -1, 37,
- -1, 29, -1, 112, -1, 129, -1, 26, -1, 178,
- -1, 105, -1, 181, -1, 4, -1, 30, 239, -1,
- 106, 242, -1, 142, 205, 237, -1, 142, 206, 86,
- 206, 237, -1, 142, 27, 237, -1, 142, 66, 27,
- 237, -1, 142, 68, 27, 237, -1, 142, 148, 237,
- -1, -1, 237, 238, -1, 47, -1, 55, -1, 73,
- -1, 74, -1, 77, -1, 83, -1, 110, -1, 111,
- -1, 114, -1, 115, -1, 117, -1, 118, -1, 119,
- -1, 121, -1, 176, -1, 239, 240, -1, 240, -1,
- 241, 61, -1, 11, -1, 99, -1, 104, -1, 242,
- 243, -1, 243, -1, 244, 61, -1, 56, -1, 57,
- -1, 58, -1, 59, -1, 87, -1, 89, -1, 91,
- -1, 97, -1, 50, 205, 246, -1, 246, 247, -1,
- 247, -1, 248, 289, -1, 249, 288, -1, 157, 61,
- -1, 3, 158, -1, 139, 158, -1, 162, -1, 163,
- -1, 43, -1, 44, -1, 45, -1, 46, -1, 144,
- 251, -1, 251, 252, -1, 252, -1, 253, 61, -1,
- 95, -1, 149, -1, 42, -1, 37, 255, -1, 29,
- 255, -1, 255, 256, -1, 256, -1, 257, -1, 258,
- -1, 8, -1, 12, -1, 18, -1, 69, -1, 104,
- -1, 120, -1, 103, -1, 151, -1, 166, 260, -1,
- 260, 261, -1, 261, -1, 262, 289, -1, 6, -1,
- 31, -1, 49, -1, 52, -1, 125, -1, 153, -1,
- 154, -1, 155, -1, 156, -1, 161, -1, 275, -1,
- 279, -1, 264, 289, -1, 265, 61, -1, 266, 158,
- -1, 267, 158, -1, 60, 158, 202, -1, 38, -1,
- 33, 268, -1, 80, 273, -1, 128, 286, -1, 147,
- 269, -1, 168, 206, 271, -1, 171, 282, -1, 16,
- -1, 113, -1, 161, -1, 35, -1, 76, -1, 54,
- -1, 75, -1, 130, -1, 81, -1, 145, -1, 158,
- -1, 158, 32, -1, -1, 158, 194, 158, 270, -1,
- 27, -1, -1, -1, 271, 272, -1, 132, 61, -1,
- 62, 206, -1, 273, 274, -1, 274, -1, 158, -1,
- 276, 278, 277, -1, 276, 278, 158, -1, 62, -1,
- 108, -1, 5, -1, 65, -1, 67, -1, 179, -1,
- 79, -1, 55, -1, 34, -1, 141, 280, -1, 280,
- 281, -1, 281, -1, 7, -1, 8, -1, 25, -1,
- 64, -1, 94, -1, 159, -1, 164, -1, 282, 61,
- -1, 61, -1, 283, 284, -1, 284, -1, 61, -1,
- 285, -1, 195, 61, 36, 61, 196, -1, 286, 158,
- -1, 158, -1, 287, 205, -1, 205, -1, 61, -1,
- 169, -1, 39, -1, 61, -1, 32, -1, 291, 197,
- 292, 295, 198, -1, 184, -1, 292, 293, 183, -1,
- 293, 183, -1, 294, 194, 289, -1, 185, -1, 186,
- -1, 295, 296, -1, 296, -1, 298, 197, 297, 299,
- 198, -1, 187, 194, 289, 183, -1, 146, 194, 205,
- -1, 299, 300, -1, 300, -1, 188, 194, 289, 197,
- 301, 198, -1, 301, 302, 183, -1, 302, 183, -1,
- 303, 194, 289, -1, 189, -1, 190, -1, 191, -1,
- 192, -1, 193, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 366, 366, 370, 371, 372, 387, 388, 389, 390,
@@ -1019,15 +895,15 @@ static const yytype_uint16 yyrline[] =
1073, 1077, 1078, 1086, 1091, 1096, 1104, 1109, 1110, 1111,
1112, 1113, 1114, 1115, 1116, 1117, 1118, 1127, 1128, 1129,
1136, 1143, 1150, 1166, 1185, 1187, 1189, 1191, 1193, 1195,
- 1202, 1207, 1208, 1209, 1213, 1217, 1226, 1227, 1228, 1232,
- 1233, 1237, 1244, 1254, 1263, 1268, 1270, 1275, 1276, 1284,
- 1286, 1294, 1299, 1307, 1332, 1339, 1349, 1350, 1354, 1355,
- 1356, 1357, 1361, 1362, 1363, 1367, 1372, 1377, 1385, 1386,
- 1387, 1388, 1389, 1390, 1391, 1401, 1406, 1414, 1419, 1427,
- 1429, 1433, 1438, 1443, 1451, 1456, 1464, 1473, 1474, 1478,
- 1479, 1488, 1506, 1510, 1515, 1523, 1528, 1529, 1533, 1538,
- 1546, 1551, 1556, 1561, 1566, 1574, 1579, 1584, 1592, 1597,
- 1598, 1599, 1600, 1601
+ 1202, 1207, 1208, 1209, 1213, 1217, 1226, 1227, 1231, 1232,
+ 1233, 1237, 1248, 1262, 1274, 1279, 1281, 1286, 1287, 1295,
+ 1297, 1305, 1310, 1318, 1343, 1350, 1360, 1361, 1365, 1366,
+ 1367, 1368, 1372, 1373, 1374, 1378, 1383, 1388, 1396, 1397,
+ 1398, 1399, 1400, 1401, 1402, 1412, 1417, 1425, 1430, 1438,
+ 1440, 1444, 1449, 1454, 1462, 1467, 1475, 1484, 1485, 1489,
+ 1490, 1499, 1517, 1521, 1526, 1534, 1539, 1540, 1544, 1549,
+ 1557, 1562, 1567, 1572, 1577, 1585, 1590, 1595, 1603, 1608,
+ 1609, 1610, 1611, 1612
};
#endif
@@ -1105,13 +981,13 @@ static const char *const yytname[] =
"sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
"sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
"sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
- "sim_act_keyword", YY_NULL
+ "sim_act_keyword", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -1137,148 +1013,18 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint16 yyr1[] =
-{
- 0, 199, 200, 201, 201, 201, 202, 202, 202, 202,
- 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
- 203, 204, 204, 204, 204, 204, 205, 205, 206, 207,
- 207, 208, 208, 209, 209, 209, 210, 211, 211, 211,
- 211, 211, 211, 211, 211, 212, 212, 213, 213, 213,
- 213, 213, 213, 214, 215, 216, 217, 217, 218, 218,
- 218, 218, 219, 219, 219, 219, 219, 219, 219, 219,
- 219, 220, 220, 221, 221, 222, 222, 222, 222, 222,
- 223, 224, 224, 225, 225, 225, 226, 226, 226, 226,
- 226, 226, 227, 227, 227, 227, 228, 228, 228, 229,
- 229, 230, 230, 230, 230, 230, 230, 230, 230, 231,
- 231, 232, 232, 232, 232, 233, 233, 234, 234, 235,
- 235, 235, 235, 235, 235, 235, 236, 236, 236, 236,
- 236, 236, 236, 236, 237, 237, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 239, 239, 240, 241, 241, 241, 242, 242, 243,
- 244, 244, 244, 244, 244, 244, 244, 244, 245, 246,
- 246, 247, 247, 247, 247, 247, 248, 248, 249, 249,
- 249, 249, 250, 251, 251, 252, 253, 253, 253, 254,
- 254, 255, 255, 256, 256, 257, 257, 257, 257, 257,
- 257, 258, 258, 259, 260, 260, 261, 262, 262, 262,
- 262, 262, 262, 262, 262, 262, 262, 263, 263, 263,
- 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
- 263, 264, 264, 264, 265, 265, 266, 266, 266, 267,
- 267, 268, 268, 268, 269, 270, 270, 271, 271, 272,
- 272, 273, 273, 274, 275, 275, 276, 276, 277, 277,
- 277, 277, 278, 278, 278, 279, 280, 280, 281, 281,
- 281, 281, 281, 281, 281, 282, 282, 283, 283, 284,
- 284, 285, 286, 286, 287, 287, 288, 288, 288, 289,
- 289, 290, 291, 292, 292, 293, 294, 294, 295, 295,
- 296, 297, 298, 299, 299, 300, 301, 301, 302, 303,
- 303, 303, 303, 303
-};
+#define YYPACT_NINF -185
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
- 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
- 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
- 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 2, 3, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
- 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 2, 3, 5,
- 3, 4, 4, 3, 0, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 2, 1, 1, 1, 2, 1, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
- 1, 2, 2, 2, 2, 2, 1, 1, 1, 1,
- 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, 1, 1, 2,
- 2, 2, 2, 3, 1, 2, 2, 2, 2, 3,
- 2, 1, 1, 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
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-185)))
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint16 yydefact[] =
-{
- 0, 0, 0, 24, 58, 231, 0, 71, 0, 0,
- 243, 234, 0, 224, 0, 0, 236, 0, 256, 0,
- 0, 237, 235, 0, 239, 25, 0, 0, 0, 0,
- 257, 232, 0, 23, 0, 238, 22, 0, 0, 0,
- 0, 0, 240, 21, 0, 0, 0, 233, 0, 0,
- 0, 0, 0, 56, 57, 292, 0, 2, 0, 7,
- 0, 8, 0, 9, 10, 13, 11, 12, 14, 15,
- 16, 17, 18, 0, 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, 241, 225, 189, 101, 102, 103,
- 104, 108, 105, 106, 107, 109, 29, 30, 28, 0,
- 26, 0, 6, 65, 66, 253, 226, 252, 285, 59,
- 61, 160, 161, 162, 163, 164, 165, 166, 167, 127,
- 158, 0, 60, 70, 283, 227, 67, 268, 269, 270,
- 271, 272, 273, 274, 265, 267, 134, 29, 30, 134,
- 134, 26, 68, 188, 186, 187, 182, 184, 0, 0,
- 228, 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, 247, 279, 0, 69, 278, 280, 276, 230,
- 1, 0, 4, 31, 55, 290, 289, 219, 220, 221,
- 222, 264, 263, 262, 0, 0, 79, 75, 76, 77,
- 78, 0, 72, 0, 191, 151, 153, 242, 98, 0,
- 178, 179, 180, 181, 0, 0, 176, 177, 168, 170,
- 0, 0, 27, 223, 251, 284, 157, 159, 282, 266,
- 130, 134, 134, 133, 128, 0, 183, 185, 0, 99,
- 204, 206, 288, 286, 287, 85, 81, 83, 84, 229,
- 0, 277, 275, 3, 20, 258, 259, 260, 255, 261,
- 254, 296, 297, 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, 246, 0, 0, 248, 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, 299, 0, 294, 0, 111, 125, 121, 123,
- 119, 120, 122, 124, 112, 129, 245, 244, 250, 249,
- 0, 45, 46, 53, 0, 293, 291, 298, 0, 295,
- 281, 302, 0, 0, 0, 0, 0, 304, 0, 0,
- 300, 303, 301, 0, 0, 309, 310, 311, 312, 313,
- 0, 0, 0, 305, 0, 307, 0, 306, 308
-};
+#define YYTABLE_NINF -7
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 56, 57, 58, 59, 60, 128, 120, 121, 284,
- 352, 353, 354, 355, 356, 357, 358, 61, 62, 63,
- 64, 85, 232, 233, 65, 198, 199, 200, 201, 66,
- 171, 115, 238, 304, 305, 306, 374, 67, 260, 328,
- 101, 102, 103, 139, 140, 141, 68, 248, 249, 250,
- 251, 69, 166, 167, 168, 70, 94, 95, 96, 97,
- 71, 184, 185, 186, 72, 73, 74, 75, 76, 105,
- 170, 377, 279, 335, 126, 127, 77, 78, 290, 224,
- 79, 154, 155, 209, 205, 206, 207, 145, 129, 275,
- 217, 80, 81, 293, 294, 295, 361, 362, 393, 363,
- 396, 397, 410, 411, 412
-};
+#define yytable_value_is_error(Yytable_value) \
+ 0
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -185
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int16 yypact[] =
{
78, -169, -34, -185, -185, -185, -29, -185, 17, 43,
@@ -1325,7 +1071,56 @@ static const yytype_int16 yypact[] =
98, 57, 47, -185, 60, -185, -12, -185, -185
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint16 yydefact[] =
+{
+ 0, 0, 0, 24, 58, 231, 0, 71, 0, 0,
+ 243, 234, 0, 224, 0, 0, 236, 0, 256, 0,
+ 0, 237, 235, 0, 238, 25, 0, 0, 0, 0,
+ 257, 232, 0, 23, 0, 239, 22, 0, 0, 0,
+ 0, 0, 240, 21, 0, 0, 0, 233, 0, 0,
+ 0, 0, 0, 56, 57, 292, 0, 2, 0, 7,
+ 0, 8, 0, 9, 10, 13, 11, 12, 14, 15,
+ 16, 17, 18, 0, 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, 241, 225, 189, 101, 102, 103,
+ 104, 108, 105, 106, 107, 109, 29, 30, 28, 0,
+ 26, 0, 6, 65, 66, 253, 226, 252, 285, 59,
+ 61, 160, 161, 162, 163, 164, 165, 166, 167, 127,
+ 158, 0, 60, 70, 283, 227, 67, 268, 269, 270,
+ 271, 272, 273, 274, 265, 267, 134, 29, 30, 134,
+ 134, 26, 68, 188, 186, 187, 182, 184, 0, 0,
+ 228, 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, 247, 279, 0, 69, 278, 280, 276, 230,
+ 1, 0, 4, 31, 55, 290, 289, 219, 220, 221,
+ 222, 264, 263, 262, 0, 0, 79, 75, 76, 77,
+ 78, 0, 72, 0, 191, 151, 153, 242, 98, 0,
+ 178, 179, 180, 181, 0, 0, 176, 177, 168, 170,
+ 0, 0, 27, 223, 251, 284, 157, 159, 282, 266,
+ 130, 134, 134, 133, 128, 0, 183, 185, 0, 99,
+ 204, 206, 288, 286, 287, 85, 81, 83, 84, 229,
+ 0, 277, 275, 3, 20, 258, 259, 260, 255, 261,
+ 254, 296, 297, 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, 246, 0, 0, 248, 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, 299, 0, 294, 0, 111, 125, 121, 123,
+ 119, 120, 122, 124, 112, 129, 245, 244, 250, 249,
+ 0, 45, 46, 53, 0, 293, 291, 298, 0, 295,
+ 281, 302, 0, 0, 0, 0, 0, 304, 0, 0,
+ 300, 303, 301, 0, 0, 309, 310, 311, 312, 313,
+ 0, 0, 0, 305, 0, 307, 0, 306, 308
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-185, -185, -185, -44, -185, -185, -15, -38, -185, -185,
@@ -1341,10 +1136,25 @@ static const yytype_int16 yypgoto[] =
-185, -113, -185, -126, -185
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -7
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 56, 57, 58, 59, 60, 128, 120, 121, 284,
+ 352, 353, 354, 355, 356, 357, 358, 61, 62, 63,
+ 64, 85, 232, 233, 65, 198, 199, 200, 201, 66,
+ 171, 115, 238, 304, 305, 306, 374, 67, 260, 328,
+ 101, 102, 103, 139, 140, 141, 68, 248, 249, 250,
+ 251, 69, 166, 167, 168, 70, 94, 95, 96, 97,
+ 71, 184, 185, 186, 72, 73, 74, 75, 76, 105,
+ 170, 377, 279, 335, 126, 127, 77, 78, 290, 224,
+ 79, 154, 155, 209, 205, 206, 207, 145, 129, 275,
+ 217, 80, 81, 293, 294, 295, 361, 362, 393, 363,
+ 396, 397, 410, 411, 412
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
119, 161, 271, 285, 272, 203, 381, 263, 264, 172,
@@ -1414,12 +1224,6 @@ static const yytype_int16 yytable[] =
350, 0, 0, 0, 351, 0, 196, 197
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-185)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
-
static const yytype_int16 yycheck[] =
{
15, 39, 186, 5, 39, 61, 61, 159, 160, 45,
@@ -1489,8 +1293,8 @@ static const yytype_int16 yycheck[] =
176, -1, -1, -1, 180, -1, 123, 124
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint16 yystos[] =
{
0, 1, 10, 14, 15, 16, 22, 23, 29, 30,
@@ -1537,30 +1341,90 @@ static const yytype_uint16 yystos[] =
301, 302, 303, 198, 302, 183, 194, 183, 289
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint16 yyr1[] =
+{
+ 0, 199, 200, 201, 201, 201, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
+ 203, 204, 204, 204, 204, 204, 205, 205, 206, 207,
+ 207, 208, 208, 209, 209, 209, 210, 211, 211, 211,
+ 211, 211, 211, 211, 211, 212, 212, 213, 213, 213,
+ 213, 213, 213, 214, 215, 216, 217, 217, 218, 218,
+ 218, 218, 219, 219, 219, 219, 219, 219, 219, 219,
+ 219, 220, 220, 221, 221, 222, 222, 222, 222, 222,
+ 223, 224, 224, 225, 225, 225, 226, 226, 226, 226,
+ 226, 226, 227, 227, 227, 227, 228, 228, 228, 229,
+ 229, 230, 230, 230, 230, 230, 230, 230, 230, 231,
+ 231, 232, 232, 232, 232, 233, 233, 234, 234, 235,
+ 235, 235, 235, 235, 235, 235, 236, 236, 236, 236,
+ 236, 236, 236, 236, 237, 237, 238, 238, 238, 238,
+ 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
+ 238, 239, 239, 240, 241, 241, 241, 242, 242, 243,
+ 244, 244, 244, 244, 244, 244, 244, 244, 245, 246,
+ 246, 247, 247, 247, 247, 247, 248, 248, 249, 249,
+ 249, 249, 250, 251, 251, 252, 253, 253, 253, 254,
+ 254, 255, 255, 256, 256, 257, 257, 257, 257, 257,
+ 257, 258, 258, 259, 260, 260, 261, 262, 262, 262,
+ 262, 262, 262, 262, 262, 262, 262, 263, 263, 263,
+ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
+ 263, 264, 264, 264, 265, 265, 266, 266, 267, 267,
+ 267, 268, 268, 268, 269, 270, 270, 271, 271, 272,
+ 272, 273, 273, 274, 275, 275, 276, 276, 277, 277,
+ 277, 277, 278, 278, 278, 279, 280, 280, 281, 281,
+ 281, 281, 281, 281, 281, 282, 282, 283, 283, 284,
+ 284, 285, 286, 286, 287, 287, 288, 288, 288, 289,
+ 289, 290, 291, 292, 292, 293, 294, 294, 295, 295,
+ 296, 297, 298, 299, 299, 300, 301, 301, 302, 303,
+ 303, 303, 303, 303
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
+ 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
+ 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
+ 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 3, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 3, 5,
+ 3, 4, 4, 3, 0, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 2, 1, 1, 1, 2, 1, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
+ 1, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 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, 1, 1, 2,
+ 2, 2, 2, 3, 1, 2, 2, 2, 2, 3,
+ 2, 1, 1, 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
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
#define YYRECOVERING() (!!yyerrstatus)
@@ -1577,27 +1441,15 @@ do \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
+#define YYTERROR 1
+#define YYERRCODE 256
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
/* Enable debugging if requested. */
#if YYDEBUG
@@ -1607,40 +1459,36 @@ while (YYID (0))
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
@@ -1649,8 +1497,6 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
YYUSE (yytype);
}
@@ -1660,22 +1506,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep);
YYFPRINTF (yyoutput, ")");
@@ -1686,16 +1521,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -1706,49 +1533,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -1762,7 +1582,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -1785,15 +1605,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -1809,16 +1622,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1848,27 +1653,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -1891,11 +1696,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@@ -1903,10 +1708,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0;
/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
@@ -1956,7 +1757,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
}
yyarg[yycount++] = yytname[yyx];
{
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
@@ -2023,26 +1824,17 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
{
YYUSE (yyvaluep);
-
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -2051,18 +1843,8 @@ yydestruct (yymsg, yytype, yyvaluep)
/* The lookahead symbol. */
int yychar;
-
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
-
+YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
@@ -2071,35 +1853,16 @@ int yynerrs;
| yyparse. |
`----------*/
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
{
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
@@ -2167,23 +1930,23 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -2191,22 +1954,22 @@ yyparse ()
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -2215,10 +1978,10 @@ yyparse ()
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -2247,7 +2010,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex ();
}
if (yychar <= YYEOF)
@@ -2312,7 +2075,7 @@ yyreduce:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -2326,8 +2089,7 @@ yyreduce:
switch (yyn)
{
case 5:
-/* Line 1787 of yacc.c */
-#line 373 "../../ntpd/ntp_parser.y"
+#line 373 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2340,433 +2102,433 @@ yyreduce:
ip_ctx->errpos.nline,
ip_ctx->errpos.ncol);
}
+#line 2106 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 20:
-/* Line 1787 of yacc.c */
-#line 409 "../../ntpd/ntp_parser.y"
+#line 409 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
peer_node *my_node;
- my_node = create_peer_node((yyvsp[(1) - (3)].Integer), (yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Attr_val_fifo));
+ 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 2117 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 27:
-/* Line 1787 of yacc.c */
-#line 428 "../../ntpd/ntp_parser.y"
- { (yyval.Address_node) = create_address_node((yyvsp[(2) - (2)].String), (yyvsp[(1) - (2)].Integer)); }
+#line 428 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
+#line 2123 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 28:
-/* Line 1787 of yacc.c */
-#line 433 "../../ntpd/ntp_parser.y"
- { (yyval.Address_node) = create_address_node((yyvsp[(1) - (1)].String), AF_UNSPEC); }
+#line 433 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
+#line 2129 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 29:
-/* Line 1787 of yacc.c */
-#line 438 "../../ntpd/ntp_parser.y"
+#line 438 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET; }
+#line 2135 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 30:
-/* Line 1787 of yacc.c */
-#line 440 "../../ntpd/ntp_parser.y"
+#line 440 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET6; }
+#line 2141 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 31:
-/* Line 1787 of yacc.c */
-#line 445 "../../ntpd/ntp_parser.y"
+#line 445 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
+#line 2147 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 32:
-/* Line 1787 of yacc.c */
-#line 447 "../../ntpd/ntp_parser.y"
+#line 447 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2156 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 36:
-/* Line 1787 of yacc.c */
-#line 461 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); }
+#line 461 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
+#line 2162 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 45:
-/* Line 1787 of yacc.c */
-#line 477 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+#line 477 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2168 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 46:
-/* Line 1787 of yacc.c */
-#line 479 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_uval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+#line 479 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2174 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 53:
-/* Line 1787 of yacc.c */
-#line 493 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
+#line 493 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2180 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 55:
-/* Line 1787 of yacc.c */
-#line 507 "../../ntpd/ntp_parser.y"
+#line 507 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
unpeer_node *my_node;
- my_node = create_unpeer_node((yyvsp[(2) - (2)].Address_node));
+ my_node = create_unpeer_node((yyvsp[0].Address_node));
if (my_node)
APPEND_G_FIFO(cfgt.unpeers, my_node);
}
+#line 2192 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 58:
-/* Line 1787 of yacc.c */
-#line 528 "../../ntpd/ntp_parser.y"
+#line 528 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ cfgt.broadcastclient = 1; }
+#line 2198 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 59:
-/* Line 1787 of yacc.c */
-#line 530 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[(2) - (2)].Address_fifo)); }
+#line 530 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
+#line 2204 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 60:
-/* Line 1787 of yacc.c */
-#line 532 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[(2) - (2)].Address_fifo)); }
+#line 532 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
+#line 2210 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 61:
-/* Line 1787 of yacc.c */
-#line 534 "../../ntpd/ntp_parser.y"
- { cfgt.mdnstries = (yyvsp[(2) - (2)].Integer); }
+#line 534 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.mdnstries = (yyvsp[0].Integer); }
+#line 2216 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 62:
-/* Line 1787 of yacc.c */
-#line 545 "../../ntpd/ntp_parser.y"
+#line 545 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
attr_val *atrv;
- atrv = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer));
+ atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, atrv);
}
+#line 2227 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 63:
-/* Line 1787 of yacc.c */
-#line 552 "../../ntpd/ntp_parser.y"
- { cfgt.auth.control_key = (yyvsp[(2) - (2)].Integer); }
+#line 552 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.control_key = (yyvsp[0].Integer); }
+#line 2233 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 64:
-/* Line 1787 of yacc.c */
-#line 554 "../../ntpd/ntp_parser.y"
+#line 554 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.cryptosw++;
- CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[(2) - (2)].Attr_val_fifo));
+ CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
}
+#line 2242 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 65:
-/* Line 1787 of yacc.c */
-#line 559 "../../ntpd/ntp_parser.y"
- { cfgt.auth.keys = (yyvsp[(2) - (2)].String); }
+#line 559 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.keys = (yyvsp[0].String); }
+#line 2248 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 66:
-/* Line 1787 of yacc.c */
-#line 561 "../../ntpd/ntp_parser.y"
- { cfgt.auth.keysdir = (yyvsp[(2) - (2)].String); }
+#line 561 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.keysdir = (yyvsp[0].String); }
+#line 2254 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 67:
-/* Line 1787 of yacc.c */
-#line 563 "../../ntpd/ntp_parser.y"
- { cfgt.auth.request_key = (yyvsp[(2) - (2)].Integer); }
+#line 563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.request_key = (yyvsp[0].Integer); }
+#line 2260 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 68:
-/* Line 1787 of yacc.c */
-#line 565 "../../ntpd/ntp_parser.y"
- { cfgt.auth.revoke = (yyvsp[(2) - (2)].Integer); }
+#line 565 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.revoke = (yyvsp[0].Integer); }
+#line 2266 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 69:
-/* Line 1787 of yacc.c */
-#line 567 "../../ntpd/ntp_parser.y"
+#line 567 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- cfgt.auth.trusted_key_list = (yyvsp[(2) - (2)].Attr_val_fifo);
+ cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
// if (!cfgt.auth.trusted_key_list)
// cfgt.auth.trusted_key_list = $2;
// else
// LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
}
+#line 2279 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 70:
-/* Line 1787 of yacc.c */
-#line 576 "../../ntpd/ntp_parser.y"
- { cfgt.auth.ntp_signd_socket = (yyvsp[(2) - (2)].String); }
+#line 576 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
+#line 2285 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 71:
-/* Line 1787 of yacc.c */
-#line 581 "../../ntpd/ntp_parser.y"
+#line 581 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
+#line 2291 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 72:
-/* Line 1787 of yacc.c */
-#line 583 "../../ntpd/ntp_parser.y"
+#line 583 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2300 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 73:
-/* Line 1787 of yacc.c */
-#line 591 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
+#line 591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2306 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 74:
-/* Line 1787 of yacc.c */
-#line 593 "../../ntpd/ntp_parser.y"
+#line 593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = NULL;
- cfgt.auth.revoke = (yyvsp[(2) - (2)].Integer);
+ cfgt.auth.revoke = (yyvsp[0].Integer);
msyslog(LOG_WARNING,
"'crypto revoke %d' is deprecated, "
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
+#line 2319 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 80:
-/* Line 1787 of yacc.c */
-#line 618 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[(2) - (2)].Attr_val_fifo)); }
+#line 618 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
+#line 2325 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 81:
-/* Line 1787 of yacc.c */
-#line 623 "../../ntpd/ntp_parser.y"
+#line 623 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2334 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 82:
-/* Line 1787 of yacc.c */
-#line 628 "../../ntpd/ntp_parser.y"
+#line 628 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2343 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 83:
-/* Line 1787 of yacc.c */
-#line 636 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (double)(yyvsp[(2) - (2)].Integer)); }
+#line 636 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
+#line 2349 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 84:
-/* Line 1787 of yacc.c */
-#line 638 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
+#line 638 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 2355 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 85:
-/* Line 1787 of yacc.c */
-#line 640 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (double)(yyvsp[(2) - (2)].Integer)); }
+#line 640 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
+#line 2361 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 96:
-/* Line 1787 of yacc.c */
-#line 666 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[(2) - (2)].Int_fifo)); }
+#line 666 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
+#line 2367 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 97:
-/* Line 1787 of yacc.c */
-#line 668 "../../ntpd/ntp_parser.y"
+#line 668 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
- cfgt.stats_dir = (yyvsp[(2) - (2)].String);
+ cfgt.stats_dir = (yyvsp[0].String);
} else {
- YYFREE((yyvsp[(2) - (2)].String));
+ YYFREE((yyvsp[0].String));
yyerror("statsdir remote configuration ignored");
}
}
+#line 2380 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 98:
-/* Line 1787 of yacc.c */
-#line 677 "../../ntpd/ntp_parser.y"
+#line 677 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
filegen_node *fgn;
- fgn = create_filegen_node((yyvsp[(2) - (3)].Integer), (yyvsp[(3) - (3)].Attr_val_fifo));
+ fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.filegen_opts, fgn);
}
+#line 2391 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 99:
-/* Line 1787 of yacc.c */
-#line 687 "../../ntpd/ntp_parser.y"
+#line 687 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Int_fifo) = (yyvsp[(1) - (2)].Int_fifo);
- APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(2) - (2)].Integer)));
+ (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
+#line 2400 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 100:
-/* Line 1787 of yacc.c */
-#line 692 "../../ntpd/ntp_parser.y"
+#line 692 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
- APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(1) - (1)].Integer)));
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
+#line 2409 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 109:
-/* Line 1787 of yacc.c */
-#line 711 "../../ntpd/ntp_parser.y"
+#line 711 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
+#line 2415 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 110:
-/* Line 1787 of yacc.c */
-#line 713 "../../ntpd/ntp_parser.y"
+#line 713 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2424 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 111:
-/* Line 1787 of yacc.c */
-#line 721 "../../ntpd/ntp_parser.y"
+#line 721 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
- (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String));
+ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
} else {
(yyval.Attr_val) = NULL;
- YYFREE((yyvsp[(2) - (2)].String));
+ YYFREE((yyvsp[0].String));
yyerror("filegen file remote config ignored");
}
}
+#line 2438 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 112:
-/* Line 1787 of yacc.c */
-#line 731 "../../ntpd/ntp_parser.y"
+#line 731 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
- (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer));
+ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
} else {
(yyval.Attr_val) = NULL;
yyerror("filegen type remote config ignored");
}
}
+#line 2451 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 113:
-/* Line 1787 of yacc.c */
-#line 740 "../../ntpd/ntp_parser.y"
+#line 740 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
const char *err;
if (lex_from_file()) {
- (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer));
+ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
} else {
(yyval.Attr_val) = NULL;
- if (T_Link == (yyvsp[(1) - (1)].Integer))
+ if (T_Link == (yyvsp[0].Integer))
err = "filegen link remote config ignored";
else
err = "filegen nolink remote config ignored";
yyerror(err);
}
}
+#line 2470 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 114:
-/* Line 1787 of yacc.c */
-#line 755 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); }
+#line 755 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
+#line 2476 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 126:
-/* Line 1787 of yacc.c */
-#line 785 "../../ntpd/ntp_parser.y"
+#line 785 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[(2) - (2)].Attr_val_fifo));
+ CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
+#line 2484 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 127:
-/* Line 1787 of yacc.c */
-#line 789 "../../ntpd/ntp_parser.y"
+#line 789 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[(2) - (2)].Attr_val_fifo));
+ CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
+#line 2492 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 128:
-/* Line 1787 of yacc.c */
-#line 793 "../../ntpd/ntp_parser.y"
+#line 793 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
- rn = create_restrict_node((yyvsp[(2) - (3)].Address_node), NULL, (yyvsp[(3) - (3)].Int_fifo),
+ rn = create_restrict_node((yyvsp[-1].Address_node), NULL, (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2504 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 129:
-/* Line 1787 of yacc.c */
-#line 801 "../../ntpd/ntp_parser.y"
+#line 801 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
- rn = create_restrict_node((yyvsp[(2) - (5)].Address_node), (yyvsp[(4) - (5)].Address_node), (yyvsp[(5) - (5)].Int_fifo),
+ rn = create_restrict_node((yyvsp[-3].Address_node), (yyvsp[-1].Address_node), (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2516 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 130:
-/* Line 1787 of yacc.c */
-#line 809 "../../ntpd/ntp_parser.y"
+#line 809 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
- rn = create_restrict_node(NULL, NULL, (yyvsp[(3) - (3)].Int_fifo),
+ rn = create_restrict_node(NULL, NULL, (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2528 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 131:
-/* Line 1787 of yacc.c */
-#line 817 "../../ntpd/ntp_parser.y"
+#line 817 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2777,15 +2539,15 @@ yyreduce:
create_address_node(
estrdup("0.0.0.0"),
AF_INET),
- (yyvsp[(4) - (4)].Int_fifo),
+ (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2547 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 132:
-/* Line 1787 of yacc.c */
-#line 832 "../../ntpd/ntp_parser.y"
+#line 832 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2796,320 +2558,320 @@ yyreduce:
create_address_node(
estrdup("::"),
AF_INET6),
- (yyvsp[(4) - (4)].Int_fifo),
+ (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2566 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 133:
-/* Line 1787 of yacc.c */
-#line 847 "../../ntpd/ntp_parser.y"
+#line 847 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node * rn;
- APPEND_G_FIFO((yyvsp[(3) - (3)].Int_fifo), create_int_node((yyvsp[(2) - (3)].Integer)));
+ APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-1].Integer)));
rn = create_restrict_node(
- NULL, NULL, (yyvsp[(3) - (3)].Int_fifo), lex_current()->curpos.nline);
+ NULL, NULL, (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2579 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 134:
-/* Line 1787 of yacc.c */
-#line 859 "../../ntpd/ntp_parser.y"
+#line 859 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Int_fifo) = NULL; }
+#line 2585 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 135:
-/* Line 1787 of yacc.c */
-#line 861 "../../ntpd/ntp_parser.y"
+#line 861 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Int_fifo) = (yyvsp[(1) - (2)].Int_fifo);
- APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(2) - (2)].Integer)));
+ (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
+#line 2594 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 151:
-/* Line 1787 of yacc.c */
-#line 887 "../../ntpd/ntp_parser.y"
+#line 887 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2603 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 152:
-/* Line 1787 of yacc.c */
-#line 892 "../../ntpd/ntp_parser.y"
+#line 892 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2612 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 153:
-/* Line 1787 of yacc.c */
-#line 900 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+#line 900 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2618 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 157:
-/* Line 1787 of yacc.c */
-#line 911 "../../ntpd/ntp_parser.y"
+#line 911 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2627 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 158:
-/* Line 1787 of yacc.c */
-#line 916 "../../ntpd/ntp_parser.y"
+#line 916 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2636 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 159:
-/* Line 1787 of yacc.c */
-#line 924 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+#line 924 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2642 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 168:
-/* Line 1787 of yacc.c */
-#line 944 "../../ntpd/ntp_parser.y"
+#line 944 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
- aon = create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Attr_val_fifo));
+ aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.fudge, aon);
}
+#line 2653 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 169:
-/* Line 1787 of yacc.c */
-#line 954 "../../ntpd/ntp_parser.y"
+#line 954 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2662 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 170:
-/* Line 1787 of yacc.c */
-#line 959 "../../ntpd/ntp_parser.y"
+#line 959 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2671 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 171:
-/* Line 1787 of yacc.c */
-#line 967 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
+#line 967 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 2677 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 172:
-/* Line 1787 of yacc.c */
-#line 969 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+#line 969 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2683 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 173:
-/* Line 1787 of yacc.c */
-#line 971 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+#line 971 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2689 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 174:
-/* Line 1787 of yacc.c */
-#line 973 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
+#line 973 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2695 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 175:
-/* Line 1787 of yacc.c */
-#line 975 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
+#line 975 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2701 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 182:
-/* Line 1787 of yacc.c */
-#line 996 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[(2) - (2)].Attr_val_fifo)); }
+#line 996 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
+#line 2707 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 183:
-/* Line 1787 of yacc.c */
-#line 1001 "../../ntpd/ntp_parser.y"
+#line 1001 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2716 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 184:
-/* Line 1787 of yacc.c */
-#line 1006 "../../ntpd/ntp_parser.y"
+#line 1006 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2725 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 185:
-/* Line 1787 of yacc.c */
-#line 1014 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+#line 1014 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2731 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 189:
-/* Line 1787 of yacc.c */
-#line 1030 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[(2) - (2)].Attr_val_fifo)); }
+#line 1030 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
+#line 2737 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 190:
-/* Line 1787 of yacc.c */
-#line 1032 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[(2) - (2)].Attr_val_fifo)); }
+#line 1032 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
+#line 2743 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 191:
-/* Line 1787 of yacc.c */
-#line 1037 "../../ntpd/ntp_parser.y"
+#line 1037 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2752 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 192:
-/* Line 1787 of yacc.c */
-#line 1042 "../../ntpd/ntp_parser.y"
+#line 1042 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2761 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 193:
-/* Line 1787 of yacc.c */
-#line 1050 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); }
+#line 1050 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
+#line 2767 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 194:
-/* Line 1787 of yacc.c */
-#line 1052 "../../ntpd/ntp_parser.y"
+#line 1052 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
- (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer));
+ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
} else {
char err_str[128];
(yyval.Attr_val) = NULL;
snprintf(err_str, sizeof(err_str),
"enable/disable %s remote configuration ignored",
- keyword((yyvsp[(1) - (1)].Integer)));
+ keyword((yyvsp[0].Integer)));
yyerror(err_str);
}
}
+#line 2785 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 203:
-/* Line 1787 of yacc.c */
-#line 1087 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[(2) - (2)].Attr_val_fifo)); }
+#line 1087 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
+#line 2791 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 204:
-/* Line 1787 of yacc.c */
-#line 1092 "../../ntpd/ntp_parser.y"
+#line 1092 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2800 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 205:
-/* Line 1787 of yacc.c */
-#line 1097 "../../ntpd/ntp_parser.y"
+#line 1097 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2809 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 206:
-/* Line 1787 of yacc.c */
-#line 1105 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
+#line 1105 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 2815 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 219:
-/* Line 1787 of yacc.c */
-#line 1130 "../../ntpd/ntp_parser.y"
+#line 1130 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
- av = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double));
+ av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
+#line 2826 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 220:
-/* Line 1787 of yacc.c */
-#line 1137 "../../ntpd/ntp_parser.y"
+#line 1137 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
- av = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer));
+ av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, av);
}
+#line 2837 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 221:
-/* Line 1787 of yacc.c */
-#line 1144 "../../ntpd/ntp_parser.y"
+#line 1144 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
- av = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String));
+ av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
+#line 2848 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 222:
-/* Line 1787 of yacc.c */
-#line 1151 "../../ntpd/ntp_parser.y"
+#line 1151 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
char error_text[64];
attr_val *av;
if (lex_from_file()) {
- av = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String));
+ av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
} else {
- YYFREE((yyvsp[(2) - (2)].String));
+ YYFREE((yyvsp[0].String));
snprintf(error_text, sizeof(error_text),
"%s remote config ignored",
- keyword((yyvsp[(1) - (2)].Integer)));
+ keyword((yyvsp[-1].Integer)));
yyerror(error_text);
}
}
+#line 2868 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 223:
-/* Line 1787 of yacc.c */
-#line 1167 "../../ntpd/ntp_parser.y"
+#line 1167 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (!lex_from_file()) {
- YYFREE((yyvsp[(2) - (3)].String)); /* avoid leak */
+ YYFREE((yyvsp[-1].String)); /* avoid leak */
yyerror("remote includefile ignored");
break;
}
@@ -3117,486 +2879,497 @@ yyreduce:
fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
} else {
- const char * path = FindConfig((yyvsp[(2) - (3)].String)); /* might return $2! */
+ const char * path = FindConfig((yyvsp[-1].String)); /* might return $2! */
if (!lex_push_file(path, "r")) {
fprintf(stderr, "getconfig: Couldn't open <%s>\n", path);
msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path);
}
}
- YYFREE((yyvsp[(2) - (3)].String)); /* avoid leak */
+ YYFREE((yyvsp[-1].String)); /* avoid leak */
}
+#line 2891 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 224:
-/* Line 1787 of yacc.c */
-#line 1186 "../../ntpd/ntp_parser.y"
+#line 1186 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ lex_flush_stack(); }
+#line 2897 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 225:
-/* Line 1787 of yacc.c */
-#line 1188 "../../ntpd/ntp_parser.y"
+#line 1188 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ /* see drift_parm below for actions */ }
+#line 2903 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 226:
-/* Line 1787 of yacc.c */
-#line 1190 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[(2) - (2)].Attr_val_fifo)); }
+#line 1190 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
+#line 2909 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 227:
-/* Line 1787 of yacc.c */
-#line 1192 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[(2) - (2)].String_fifo)); }
+#line 1192 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
+#line 2915 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 228:
-/* Line 1787 of yacc.c */
-#line 1194 "../../ntpd/ntp_parser.y"
- { APPEND_G_FIFO(cfgt.setvar, (yyvsp[(2) - (2)].Set_var)); }
+#line 1194 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
+#line 2921 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 229:
-/* Line 1787 of yacc.c */
-#line 1196 "../../ntpd/ntp_parser.y"
+#line 1196 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
- aon = create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Attr_val_fifo));
+ aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.trap, aon);
}
+#line 2932 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 230:
-/* Line 1787 of yacc.c */
-#line 1203 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[(2) - (2)].Attr_val_fifo)); }
+#line 1203 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
+#line 2938 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 235:
-/* Line 1787 of yacc.c */
-#line 1218 "../../ntpd/ntp_parser.y"
+#line 1218 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
#ifndef LEAP_SMEAR
yyerror("Built without LEAP_SMEAR support.");
#endif
}
+#line 2948 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 241:
-/* Line 1787 of yacc.c */
-#line 1238 "../../ntpd/ntp_parser.y"
+#line 1238 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- attr_val *av;
-
- av = create_attr_sval(T_Driftfile, (yyvsp[(1) - (1)].String));
- APPEND_G_FIFO(cfgt.vars, av);
+ if (lex_from_file()) {
+ attr_val *av;
+ av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
+ APPEND_G_FIFO(cfgt.vars, av);
+ } else {
+ YYFREE((yyvsp[0].String));
+ yyerror("driftfile remote configuration ignored");
+ }
}
+#line 2963 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 242:
-/* Line 1787 of yacc.c */
-#line 1245 "../../ntpd/ntp_parser.y"
+#line 1249 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- attr_val *av;
-
- av = create_attr_sval(T_Driftfile, (yyvsp[(1) - (2)].String));
- APPEND_G_FIFO(cfgt.vars, av);
- av = create_attr_dval(T_WanderThreshold, (yyvsp[(2) - (2)].Double));
- APPEND_G_FIFO(cfgt.vars, av);
+ if (lex_from_file()) {
+ attr_val *av;
+ av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
+ APPEND_G_FIFO(cfgt.vars, av);
+ av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
+ APPEND_G_FIFO(cfgt.vars, av);
+ } else {
+ YYFREE((yyvsp[-1].String));
+ yyerror("driftfile remote configuration ignored");
+ }
}
+#line 2980 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 243:
-/* Line 1787 of yacc.c */
-#line 1254 "../../ntpd/ntp_parser.y"
+#line 1262 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- attr_val *av;
-
- av = create_attr_sval(T_Driftfile, "");
- APPEND_G_FIFO(cfgt.vars, av);
+ if (lex_from_file()) {
+ attr_val *av;
+ av = create_attr_sval(T_Driftfile, estrdup(""));
+ APPEND_G_FIFO(cfgt.vars, av);
+ } else {
+ yyerror("driftfile remote configuration ignored");
+ }
}
+#line 2994 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 244:
-/* Line 1787 of yacc.c */
-#line 1264 "../../ntpd/ntp_parser.y"
- { (yyval.Set_var) = create_setvar_node((yyvsp[(1) - (4)].String), (yyvsp[(3) - (4)].String), (yyvsp[(4) - (4)].Integer)); }
+#line 1275 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
+#line 3000 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 246:
-/* Line 1787 of yacc.c */
-#line 1270 "../../ntpd/ntp_parser.y"
+#line 1281 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
+#line 3006 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 247:
-/* Line 1787 of yacc.c */
-#line 1275 "../../ntpd/ntp_parser.y"
+#line 1286 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
+#line 3012 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 248:
-/* Line 1787 of yacc.c */
-#line 1277 "../../ntpd/ntp_parser.y"
+#line 1288 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 3021 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 249:
-/* Line 1787 of yacc.c */
-#line 1285 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+#line 1296 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 3027 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 250:
-/* Line 1787 of yacc.c */
-#line 1287 "../../ntpd/ntp_parser.y"
+#line 1298 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), estrdup((yyvsp[(2) - (2)].Address_node)->address));
- destroy_address_node((yyvsp[(2) - (2)].Address_node));
+ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
+ destroy_address_node((yyvsp[0].Address_node));
}
+#line 3036 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 251:
-/* Line 1787 of yacc.c */
-#line 1295 "../../ntpd/ntp_parser.y"
+#line 1306 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 3045 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 252:
-/* Line 1787 of yacc.c */
-#line 1300 "../../ntpd/ntp_parser.y"
+#line 1311 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 3054 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 253:
-/* Line 1787 of yacc.c */
-#line 1308 "../../ntpd/ntp_parser.y"
+#line 1319 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
char prefix;
char * type;
- switch ((yyvsp[(1) - (1)].String)[0]) {
+ switch ((yyvsp[0].String)[0]) {
case '+':
case '-':
case '=':
- prefix = (yyvsp[(1) - (1)].String)[0];
- type = (yyvsp[(1) - (1)].String) + 1;
+ prefix = (yyvsp[0].String)[0];
+ type = (yyvsp[0].String) + 1;
break;
default:
prefix = '=';
- type = (yyvsp[(1) - (1)].String);
+ type = (yyvsp[0].String);
}
(yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
- YYFREE((yyvsp[(1) - (1)].String));
+ YYFREE((yyvsp[0].String));
}
+#line 3080 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 254:
-/* Line 1787 of yacc.c */
-#line 1333 "../../ntpd/ntp_parser.y"
+#line 1344 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
- nrn = create_nic_rule_node((yyvsp[(3) - (3)].Integer), NULL, (yyvsp[(2) - (3)].Integer));
+ nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
+#line 3091 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 255:
-/* Line 1787 of yacc.c */
-#line 1340 "../../ntpd/ntp_parser.y"
+#line 1351 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
- nrn = create_nic_rule_node(0, (yyvsp[(3) - (3)].String), (yyvsp[(2) - (3)].Integer));
+ nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
+#line 3102 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 265:
-/* Line 1787 of yacc.c */
-#line 1368 "../../ntpd/ntp_parser.y"
- { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[(2) - (2)].Int_fifo)); }
+#line 1379 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
+#line 3108 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 266:
-/* Line 1787 of yacc.c */
-#line 1373 "../../ntpd/ntp_parser.y"
+#line 1384 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Int_fifo) = (yyvsp[(1) - (2)].Int_fifo);
- APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(2) - (2)].Integer)));
+ (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
+#line 3117 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 267:
-/* Line 1787 of yacc.c */
-#line 1378 "../../ntpd/ntp_parser.y"
+#line 1389 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
- APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(1) - (1)].Integer)));
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
+#line 3126 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 275:
-/* Line 1787 of yacc.c */
-#line 1402 "../../ntpd/ntp_parser.y"
+#line 1413 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[(2) - (2)].Integer)));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
+#line 3135 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 276:
-/* Line 1787 of yacc.c */
-#line 1407 "../../ntpd/ntp_parser.y"
+#line 1418 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[(1) - (1)].Integer)));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
+#line 3144 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 277:
-/* Line 1787 of yacc.c */
-#line 1415 "../../ntpd/ntp_parser.y"
+#line 1426 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 3153 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 278:
-/* Line 1787 of yacc.c */
-#line 1420 "../../ntpd/ntp_parser.y"
+#line 1431 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 3162 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 279:
-/* Line 1787 of yacc.c */
-#line 1428 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[(1) - (1)].Integer)); }
+#line 1439 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
+#line 3168 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 281:
-/* Line 1787 of yacc.c */
-#line 1434 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[(2) - (5)].Integer), (yyvsp[(4) - (5)].Integer)); }
+#line 1445 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
+#line 3174 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 282:
-/* Line 1787 of yacc.c */
-#line 1439 "../../ntpd/ntp_parser.y"
+#line 1450 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.String_fifo) = (yyvsp[(1) - (2)].String_fifo);
- APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[(2) - (2)].String)));
+ (yyval.String_fifo) = (yyvsp[-1].String_fifo);
+ APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
+#line 3183 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 283:
-/* Line 1787 of yacc.c */
-#line 1444 "../../ntpd/ntp_parser.y"
+#line 1455 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = NULL;
- APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[(1) - (1)].String)));
+ APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
+#line 3192 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 284:
-/* Line 1787 of yacc.c */
-#line 1452 "../../ntpd/ntp_parser.y"
+#line 1463 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Address_fifo) = (yyvsp[(1) - (2)].Address_fifo);
- APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[(2) - (2)].Address_node));
+ (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
+ APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
+#line 3201 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 285:
-/* Line 1787 of yacc.c */
-#line 1457 "../../ntpd/ntp_parser.y"
+#line 1468 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = NULL;
- APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[(1) - (1)].Address_node));
+ APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
+#line 3210 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 286:
-/* Line 1787 of yacc.c */
-#line 1465 "../../ntpd/ntp_parser.y"
+#line 1476 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- if ((yyvsp[(1) - (1)].Integer) != 0 && (yyvsp[(1) - (1)].Integer) != 1) {
+ if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
yyerror("Integer value is not boolean (0 or 1). Assuming 1");
(yyval.Integer) = 1;
} else {
- (yyval.Integer) = (yyvsp[(1) - (1)].Integer);
+ (yyval.Integer) = (yyvsp[0].Integer);
}
}
+#line 3223 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 287:
-/* Line 1787 of yacc.c */
-#line 1473 "../../ntpd/ntp_parser.y"
+#line 1484 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 1; }
+#line 3229 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 288:
-/* Line 1787 of yacc.c */
-#line 1474 "../../ntpd/ntp_parser.y"
+#line 1485 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
+#line 3235 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 289:
-/* Line 1787 of yacc.c */
-#line 1478 "../../ntpd/ntp_parser.y"
- { (yyval.Double) = (double)(yyvsp[(1) - (1)].Integer); }
+#line 1489 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Double) = (double)(yyvsp[0].Integer); }
+#line 3241 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 291:
-/* Line 1787 of yacc.c */
-#line 1489 "../../ntpd/ntp_parser.y"
+#line 1500 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
sim_node *sn;
- sn = create_sim_node((yyvsp[(3) - (5)].Attr_val_fifo), (yyvsp[(4) - (5)].Sim_server_fifo));
+ sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
APPEND_G_FIFO(cfgt.sim_details, sn);
/* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
+#line 3255 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 292:
-/* Line 1787 of yacc.c */
-#line 1506 "../../ntpd/ntp_parser.y"
+#line 1517 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ old_config_style = 0; }
+#line 3261 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 293:
-/* Line 1787 of yacc.c */
-#line 1511 "../../ntpd/ntp_parser.y"
+#line 1522 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (3)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (3)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
+#line 3270 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 294:
-/* Line 1787 of yacc.c */
-#line 1516 "../../ntpd/ntp_parser.y"
+#line 1527 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (2)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
+#line 3279 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 295:
-/* Line 1787 of yacc.c */
-#line 1524 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
+#line 1535 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
+#line 3285 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 298:
-/* Line 1787 of yacc.c */
-#line 1534 "../../ntpd/ntp_parser.y"
+#line 1545 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Sim_server_fifo) = (yyvsp[(1) - (2)].Sim_server_fifo);
- APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[(2) - (2)].Sim_server));
+ (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
+ APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
+#line 3294 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 299:
-/* Line 1787 of yacc.c */
-#line 1539 "../../ntpd/ntp_parser.y"
+#line 1550 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = NULL;
- APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[(1) - (1)].Sim_server));
+ APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
+#line 3303 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 300:
-/* Line 1787 of yacc.c */
-#line 1547 "../../ntpd/ntp_parser.y"
- { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[(1) - (5)].Address_node), (yyvsp[(3) - (5)].Double), (yyvsp[(4) - (5)].Sim_script_fifo))); }
+#line 1558 "../../ntpd/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 3309 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 301:
-/* Line 1787 of yacc.c */
-#line 1552 "../../ntpd/ntp_parser.y"
- { (yyval.Double) = (yyvsp[(3) - (4)].Double); }
+#line 1563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Double) = (yyvsp[-1].Double); }
+#line 3315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 302:
-/* Line 1787 of yacc.c */
-#line 1557 "../../ntpd/ntp_parser.y"
- { (yyval.Address_node) = (yyvsp[(3) - (3)].Address_node); }
+#line 1568 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Address_node) = (yyvsp[0].Address_node); }
+#line 3321 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 303:
-/* Line 1787 of yacc.c */
-#line 1562 "../../ntpd/ntp_parser.y"
+#line 1573 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Sim_script_fifo) = (yyvsp[(1) - (2)].Sim_script_fifo);
- APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[(2) - (2)].Sim_script));
+ (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
+ APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
+#line 3330 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 304:
-/* Line 1787 of yacc.c */
-#line 1567 "../../ntpd/ntp_parser.y"
+#line 1578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = NULL;
- APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[(1) - (1)].Sim_script));
+ APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
+#line 3339 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 305:
-/* Line 1787 of yacc.c */
-#line 1575 "../../ntpd/ntp_parser.y"
- { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[(3) - (6)].Double), (yyvsp[(5) - (6)].Attr_val_fifo))); }
+#line 1586 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
+#line 3345 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 306:
-/* Line 1787 of yacc.c */
-#line 1580 "../../ntpd/ntp_parser.y"
+#line 1591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- (yyval.Attr_val_fifo) = (yyvsp[(1) - (3)].Attr_val_fifo);
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (3)].Attr_val));
+ (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
+#line 3354 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 307:
-/* Line 1787 of yacc.c */
-#line 1585 "../../ntpd/ntp_parser.y"
+#line 1596 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
- APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (2)].Attr_val));
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
+#line 3363 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 308:
-/* Line 1787 of yacc.c */
-#line 1593 "../../ntpd/ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
+#line 1604 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
+#line 3369 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
-/* Line 1787 of yacc.c */
-#line 3600 "ntp_parser.c"
+#line 3373 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3618,7 +3391,7 @@ yyreduce:
*++yyvsp = yyval;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -3633,9 +3406,9 @@ yyreduce:
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
@@ -3686,20 +3459,20 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -3718,7 +3491,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -3731,29 +3504,29 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
+ yystos[yystate], yyvsp);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -3804,14 +3577,14 @@ yyreturn:
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
}
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
+ yystos[*yyssp], yyvsp);
YYPOPSTACK (1);
}
#ifndef yyoverflow
@@ -3822,13 +3595,9 @@ yyreturn:
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
-
-
-/* Line 2050 of yacc.c */
-#line 1604 "../../ntpd/ntp_parser.y"
+#line 1615 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */
void
diff --git a/contrib/ntp/ntpd/ntp_parser.h b/contrib/ntp/ntpd/ntp_parser.h
index b474fc24113c..1ec7f8cc69af 100644
--- a/contrib/ntp/ntpd/ntp_parser.h
+++ b/contrib/ntp/ntpd/ntp_parser.h
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
+/* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
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/>. */
@@ -26,13 +26,13 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-#ifndef YY_YY_NTP_PARSER_H_INCLUDED
-# define YY_YY_NTP_PARSER_H_INCLUDED
-/* Enabling traces. */
+#ifndef YY_YY__NTPD_NTP_PARSER_H_INCLUDED
+# define YY_YY__NTPD_NTP_PARSER_H_INCLUDED
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
#endif
@@ -40,204 +40,203 @@
extern int yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- T_Abbrev = 258,
- T_Age = 259,
- T_All = 260,
- T_Allan = 261,
- T_Allpeers = 262,
- T_Auth = 263,
- T_Autokey = 264,
- T_Automax = 265,
- T_Average = 266,
- T_Bclient = 267,
- T_Beacon = 268,
- T_Broadcast = 269,
- T_Broadcastclient = 270,
- T_Broadcastdelay = 271,
- T_Burst = 272,
- T_Calibrate = 273,
- T_Ceiling = 274,
- T_Clockstats = 275,
- T_Cohort = 276,
- T_ControlKey = 277,
- T_Crypto = 278,
- T_Cryptostats = 279,
- T_Ctl = 280,
- T_Day = 281,
- T_Default = 282,
- T_Digest = 283,
- T_Disable = 284,
- T_Discard = 285,
- T_Dispersion = 286,
- T_Double = 287,
- T_Driftfile = 288,
- T_Drop = 289,
- T_Dscp = 290,
- T_Ellipsis = 291,
- T_Enable = 292,
- T_End = 293,
- T_False = 294,
- T_File = 295,
- T_Filegen = 296,
- T_Filenum = 297,
- T_Flag1 = 298,
- T_Flag2 = 299,
- T_Flag3 = 300,
- T_Flag4 = 301,
- T_Flake = 302,
- T_Floor = 303,
- T_Freq = 304,
- T_Fudge = 305,
- T_Host = 306,
- T_Huffpuff = 307,
- T_Iburst = 308,
- T_Ident = 309,
- T_Ignore = 310,
- T_Incalloc = 311,
- T_Incmem = 312,
- T_Initalloc = 313,
- T_Initmem = 314,
- T_Includefile = 315,
- T_Integer = 316,
- T_Interface = 317,
- T_Intrange = 318,
- T_Io = 319,
- T_Ipv4 = 320,
- T_Ipv4_flag = 321,
- T_Ipv6 = 322,
- T_Ipv6_flag = 323,
- T_Kernel = 324,
- T_Key = 325,
- T_Keys = 326,
- T_Keysdir = 327,
- T_Kod = 328,
- T_Mssntp = 329,
- T_Leapfile = 330,
- T_Leapsmearinterval = 331,
- T_Limited = 332,
- T_Link = 333,
- T_Listen = 334,
- T_Logconfig = 335,
- T_Logfile = 336,
- T_Loopstats = 337,
- T_Lowpriotrap = 338,
- T_Manycastclient = 339,
- T_Manycastserver = 340,
- T_Mask = 341,
- T_Maxage = 342,
- T_Maxclock = 343,
- T_Maxdepth = 344,
- T_Maxdist = 345,
- T_Maxmem = 346,
- T_Maxpoll = 347,
- T_Mdnstries = 348,
- T_Mem = 349,
- T_Memlock = 350,
- T_Minclock = 351,
- T_Mindepth = 352,
- T_Mindist = 353,
- T_Minimum = 354,
- T_Minpoll = 355,
- T_Minsane = 356,
- T_Mode = 357,
- T_Mode7 = 358,
- T_Monitor = 359,
- T_Month = 360,
- T_Mru = 361,
- T_Multicastclient = 362,
- T_Nic = 363,
- T_Nolink = 364,
- T_Nomodify = 365,
- T_Nomrulist = 366,
- T_None = 367,
- T_Nonvolatile = 368,
- T_Nopeer = 369,
- T_Noquery = 370,
- T_Noselect = 371,
- T_Noserve = 372,
- T_Notrap = 373,
- T_Notrust = 374,
- T_Ntp = 375,
- T_Ntpport = 376,
- T_NtpSignDsocket = 377,
- T_Orphan = 378,
- T_Orphanwait = 379,
- T_Panic = 380,
- T_Peer = 381,
- T_Peerstats = 382,
- T_Phone = 383,
- T_Pid = 384,
- T_Pidfile = 385,
- T_Pool = 386,
- T_Port = 387,
- T_Preempt = 388,
- T_Prefer = 389,
- T_Protostats = 390,
- T_Pw = 391,
- T_Randfile = 392,
- T_Rawstats = 393,
- T_Refid = 394,
- T_Requestkey = 395,
- T_Reset = 396,
- T_Restrict = 397,
- T_Revoke = 398,
- T_Rlimit = 399,
- T_Saveconfigdir = 400,
- T_Server = 401,
- T_Setvar = 402,
- T_Source = 403,
- T_Stacksize = 404,
- T_Statistics = 405,
- T_Stats = 406,
- T_Statsdir = 407,
- T_Step = 408,
- T_Stepback = 409,
- T_Stepfwd = 410,
- T_Stepout = 411,
- T_Stratum = 412,
- T_String = 413,
- T_Sys = 414,
- T_Sysstats = 415,
- T_Tick = 416,
- T_Time1 = 417,
- T_Time2 = 418,
- T_Timer = 419,
- T_Timingstats = 420,
- T_Tinker = 421,
- T_Tos = 422,
- T_Trap = 423,
- T_True = 424,
- T_Trustedkey = 425,
- T_Ttl = 426,
- T_Type = 427,
- T_U_int = 428,
- T_Unconfig = 429,
- T_Unpeer = 430,
- T_Version = 431,
- T_WanderThreshold = 432,
- T_Week = 433,
- T_Wildcard = 434,
- T_Xleave = 435,
- T_Year = 436,
- T_Flag = 437,
- T_EOC = 438,
- T_Simulate = 439,
- T_Beep_Delay = 440,
- T_Sim_Duration = 441,
- T_Server_Offset = 442,
- T_Duration = 443,
- T_Freq_Offset = 444,
- T_Wander = 445,
- T_Jitter = 446,
- T_Prop_Delay = 447,
- T_Proc_Delay = 448
- };
+ enum yytokentype
+ {
+ T_Abbrev = 258,
+ T_Age = 259,
+ T_All = 260,
+ T_Allan = 261,
+ T_Allpeers = 262,
+ T_Auth = 263,
+ T_Autokey = 264,
+ T_Automax = 265,
+ T_Average = 266,
+ T_Bclient = 267,
+ T_Beacon = 268,
+ T_Broadcast = 269,
+ T_Broadcastclient = 270,
+ T_Broadcastdelay = 271,
+ T_Burst = 272,
+ T_Calibrate = 273,
+ T_Ceiling = 274,
+ T_Clockstats = 275,
+ T_Cohort = 276,
+ T_ControlKey = 277,
+ T_Crypto = 278,
+ T_Cryptostats = 279,
+ T_Ctl = 280,
+ T_Day = 281,
+ T_Default = 282,
+ T_Digest = 283,
+ T_Disable = 284,
+ T_Discard = 285,
+ T_Dispersion = 286,
+ T_Double = 287,
+ T_Driftfile = 288,
+ T_Drop = 289,
+ T_Dscp = 290,
+ T_Ellipsis = 291,
+ T_Enable = 292,
+ T_End = 293,
+ T_False = 294,
+ T_File = 295,
+ T_Filegen = 296,
+ T_Filenum = 297,
+ T_Flag1 = 298,
+ T_Flag2 = 299,
+ T_Flag3 = 300,
+ T_Flag4 = 301,
+ T_Flake = 302,
+ T_Floor = 303,
+ T_Freq = 304,
+ T_Fudge = 305,
+ T_Host = 306,
+ T_Huffpuff = 307,
+ T_Iburst = 308,
+ T_Ident = 309,
+ T_Ignore = 310,
+ T_Incalloc = 311,
+ T_Incmem = 312,
+ T_Initalloc = 313,
+ T_Initmem = 314,
+ T_Includefile = 315,
+ T_Integer = 316,
+ T_Interface = 317,
+ T_Intrange = 318,
+ T_Io = 319,
+ T_Ipv4 = 320,
+ T_Ipv4_flag = 321,
+ T_Ipv6 = 322,
+ T_Ipv6_flag = 323,
+ T_Kernel = 324,
+ T_Key = 325,
+ T_Keys = 326,
+ T_Keysdir = 327,
+ T_Kod = 328,
+ T_Mssntp = 329,
+ T_Leapfile = 330,
+ T_Leapsmearinterval = 331,
+ T_Limited = 332,
+ T_Link = 333,
+ T_Listen = 334,
+ T_Logconfig = 335,
+ T_Logfile = 336,
+ T_Loopstats = 337,
+ T_Lowpriotrap = 338,
+ T_Manycastclient = 339,
+ T_Manycastserver = 340,
+ T_Mask = 341,
+ T_Maxage = 342,
+ T_Maxclock = 343,
+ T_Maxdepth = 344,
+ T_Maxdist = 345,
+ T_Maxmem = 346,
+ T_Maxpoll = 347,
+ T_Mdnstries = 348,
+ T_Mem = 349,
+ T_Memlock = 350,
+ T_Minclock = 351,
+ T_Mindepth = 352,
+ T_Mindist = 353,
+ T_Minimum = 354,
+ T_Minpoll = 355,
+ T_Minsane = 356,
+ T_Mode = 357,
+ T_Mode7 = 358,
+ T_Monitor = 359,
+ T_Month = 360,
+ T_Mru = 361,
+ T_Multicastclient = 362,
+ T_Nic = 363,
+ T_Nolink = 364,
+ T_Nomodify = 365,
+ T_Nomrulist = 366,
+ T_None = 367,
+ T_Nonvolatile = 368,
+ T_Nopeer = 369,
+ T_Noquery = 370,
+ T_Noselect = 371,
+ T_Noserve = 372,
+ T_Notrap = 373,
+ T_Notrust = 374,
+ T_Ntp = 375,
+ T_Ntpport = 376,
+ T_NtpSignDsocket = 377,
+ T_Orphan = 378,
+ T_Orphanwait = 379,
+ T_Panic = 380,
+ T_Peer = 381,
+ T_Peerstats = 382,
+ T_Phone = 383,
+ T_Pid = 384,
+ T_Pidfile = 385,
+ T_Pool = 386,
+ T_Port = 387,
+ T_Preempt = 388,
+ T_Prefer = 389,
+ T_Protostats = 390,
+ T_Pw = 391,
+ T_Randfile = 392,
+ T_Rawstats = 393,
+ T_Refid = 394,
+ T_Requestkey = 395,
+ T_Reset = 396,
+ T_Restrict = 397,
+ T_Revoke = 398,
+ T_Rlimit = 399,
+ T_Saveconfigdir = 400,
+ T_Server = 401,
+ T_Setvar = 402,
+ T_Source = 403,
+ T_Stacksize = 404,
+ T_Statistics = 405,
+ T_Stats = 406,
+ T_Statsdir = 407,
+ T_Step = 408,
+ T_Stepback = 409,
+ T_Stepfwd = 410,
+ T_Stepout = 411,
+ T_Stratum = 412,
+ T_String = 413,
+ T_Sys = 414,
+ T_Sysstats = 415,
+ T_Tick = 416,
+ T_Time1 = 417,
+ T_Time2 = 418,
+ T_Timer = 419,
+ T_Timingstats = 420,
+ T_Tinker = 421,
+ T_Tos = 422,
+ T_Trap = 423,
+ T_True = 424,
+ T_Trustedkey = 425,
+ T_Ttl = 426,
+ T_Type = 427,
+ T_U_int = 428,
+ T_Unconfig = 429,
+ T_Unpeer = 430,
+ T_Version = 431,
+ T_WanderThreshold = 432,
+ T_Week = 433,
+ T_Wildcard = 434,
+ T_Xleave = 435,
+ T_Year = 436,
+ T_Flag = 437,
+ T_EOC = 438,
+ T_Simulate = 439,
+ T_Beep_Delay = 440,
+ T_Sim_Duration = 441,
+ T_Server_Offset = 442,
+ T_Duration = 443,
+ T_Freq_Offset = 444,
+ T_Wander = 445,
+ T_Jitter = 446,
+ T_Prop_Delay = 447,
+ T_Proc_Delay = 448
+ };
#endif
/* Tokens. */
#define T_Abbrev 258
@@ -432,13 +431,12 @@ extern int yydebug;
#define T_Prop_Delay 447
#define T_Proc_Delay 448
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{
-/* Line 2053 of yacc.c */
-#line 51 "../../ntpd/ntp_parser.y"
+#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:1909 */
char * String;
double Double;
@@ -457,29 +455,15 @@ typedef union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-
-/* Line 2053 of yacc.c */
-#line 463 "ntp_parser.h"
-} YYSTYPE;
+#line 459 "../../ntpd/ntp_parser.h" /* yacc.c:1909 */
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+
extern YYSTYPE yylval;
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
+#endif /* !YY_YY__NTPD_NTP_PARSER_H_INCLUDED */
diff --git a/contrib/ntp/ntpd/ntp_peer.c b/contrib/ntp/ntpd/ntp_peer.c
index d42d804d444d..cc23a382309c 100644
--- a/contrib/ntp/ntpd/ntp_peer.c
+++ b/contrib/ntp/ntpd/ntp_peer.c
@@ -718,9 +718,13 @@ refresh_all_peerinterfaces(void)
/*
* this is called when the interface list has changed
* give all peers a chance to find a better interface
+ * but only if either they don't have an address already
+ * or if the one they have hasn't worked for a while.
*/
- for (p = peer_list; p != NULL; p = p->p_link)
- peer_refresh_interface(p);
+ for (p = peer_list; p != NULL; p = p->p_link) {
+ if (!(p->dstadr && (p->reach & 0x3))) // Bug 2849 XOR 2043
+ peer_refresh_interface(p);
+ }
}
@@ -746,6 +750,8 @@ newpeer(
struct peer * peer;
u_int hash;
+ DEBUG_REQUIRE(srcadr);
+
#ifdef AUTOKEY
/*
* If Autokey is requested but not configured, complain loudly.
@@ -764,7 +770,7 @@ newpeer(
/*
* For now only pool associations have a hostname.
*/
- NTP_INSIST(NULL == hostname || (MDF_POOL & cast_flags));
+ INSIST(NULL == hostname || (MDF_POOL & cast_flags));
/*
* First search from the beginning for an association with given
@@ -817,6 +823,7 @@ newpeer(
if (peer_free_count == 0)
getmorepeermem();
UNLINK_HEAD_SLIST(peer, peer_free, p_link);
+ INSIST(peer != NULL);
peer_free_count--;
peer_associations++;
if (FLAG_PREEMPT & flags)
diff --git a/contrib/ntp/ntpd/ntp_proto.c b/contrib/ntp/ntpd/ntp_proto.c
index 40624066746f..2a15d7242647 100644
--- a/contrib/ntp/ntpd/ntp_proto.c
+++ b/contrib/ntp/ntpd/ntp_proto.c
@@ -28,8 +28,8 @@
* This macro defines the authentication state. If x is 1 authentication
* is required; othewise it is optional.
*/
-#define AUTH(x, y) ((x) ? (y) == AUTH_OK : (y) == AUTH_OK || \
- (y) == AUTH_NONE)
+#define AUTH(x, y) ((x) ? (y) == AUTH_OK \
+ : (y) == AUTH_OK || (y) == AUTH_NONE)
#define AUTH_NONE 0 /* authentication not required */
#define AUTH_OK 1 /* authentication OK */
@@ -37,6 +37,19 @@
#define AUTH_CRYPTO 3 /* crypto_NAK */
/*
+ * Set up Kiss Code values
+ */
+
+enum kiss_codes {
+ NOKISS, /* No Kiss Code */
+ RATEKISS, /* Rate limit Kiss Code */
+ DENYKISS, /* Deny Kiss */
+ RSTRKISS, /* Restricted Kiss */
+ XKISS, /* Experimental Kiss */
+ UNKNOWNKISS /* Unknown Kiss Code */
+};
+
+/*
* traffic shaping parameters
*/
#define NTP_IBURST 6 /* packets in iburst */
@@ -139,6 +152,7 @@ u_long sys_declined; /* declined */
u_long sys_limitrejected; /* rate exceeded */
u_long sys_kodsent; /* KoD sent */
+static int kiss_code_check(u_char hisleap, u_char hisstratum, u_char hismode, u_int32 refid);
static double root_distance (struct peer *);
static void clock_combine (peer_select *, int, int);
static void peer_xmit (struct peer *);
@@ -185,7 +199,34 @@ set_sys_leap(u_char new_sys_leap) {
}
}
+/*
+ * Kiss Code check
+ */
+int kiss_code_check(u_char hisleap, u_char hisstratum, u_char hismode, u_int32 refid) {
+ if ( hismode == MODE_SERVER
+ && hisleap == LEAP_NOTINSYNC
+ && hisstratum == STRATUM_UNSPEC) {
+ if(memcmp(&refid,"RATE", 4) == 0) {
+ return (RATEKISS);
+ }
+ else if(memcmp(&refid,"DENY", 4) == 0) {
+ return (DENYKISS);
+ }
+ else if(memcmp(&refid,"RSTR", 4) == 0) {
+ return (RSTRKISS);
+ }
+ else if(memcmp(&refid,"X", 1) == 0) {
+ return (XKISS);
+ }
+ else {
+ return (UNKNOWNKISS);
+ }
+ }
+ else {
+ return (NOKISS);
+ }
+}
/*
* transmit - transmit procedure called by poll timeout
*/
@@ -235,8 +276,8 @@ transmit(
peer->unreach = 0;
peer->ttl = 0;
peer_xmit(peer);
- } else if (sys_survivors < sys_minclock ||
- peer_associations < sys_maxclock) {
+ } else if ( sys_survivors < sys_minclock
+ || peer_associations < sys_maxclock) {
if (peer->ttl < (u_int32)sys_ttlmax)
peer->ttl++;
peer_xmit(peer);
@@ -260,9 +301,9 @@ transmit(
*/
if (peer->cast_flags & MDF_POOL) {
peer->outdate = current_time;
- if ((peer_associations <= 2 * sys_maxclock) &&
- (peer_associations < sys_maxclock ||
- sys_survivors < sys_minclock))
+ if ( (peer_associations <= 2 * sys_maxclock)
+ && ( peer_associations < sys_maxclock
+ || sys_survivors < sys_minclock))
pool_xmit(peer);
poll_update(peer, hpoll);
return;
@@ -297,8 +338,8 @@ transmit(
peer_unfit(peer);
report_event(PEVNT_UNREACH, peer, NULL);
}
- if ((peer->flags & FLAG_IBURST) &&
- peer->retry == 0)
+ if ( (peer->flags & FLAG_IBURST)
+ && peer->retry == 0)
peer->retry = NTP_RETRY;
} else {
@@ -312,8 +353,9 @@ transmit(
hpoll = sys_poll;
if (!(peer->flags & FLAG_PREEMPT))
peer->unreach = 0;
- if ((peer->flags & FLAG_BURST) && peer->retry ==
- 0 && !peer_unfit(peer))
+ if ( (peer->flags & FLAG_BURST)
+ && peer->retry == 0
+ && !peer_unfit(peer))
peer->retry = NTP_RETRY;
}
@@ -334,9 +376,9 @@ transmit(
unpeer(peer);
return;
}
- if ((peer->flags & FLAG_PREEMPT) &&
- (peer_associations > sys_maxclock) &&
- score_all(peer)) {
+ if ( (peer->flags & FLAG_PREEMPT)
+ && (peer_associations > sys_maxclock)
+ && score_all(peer)) {
report_event(PEVNT_RESTART, peer, "timeout");
peer_clear(peer, "TIME");
unpeer(peer);
@@ -392,6 +434,7 @@ receive(
u_char hismode; /* packet mode */
u_char hisstratum; /* packet stratum */
u_short restrict_mask; /* restrict bits */
+ int kissCode = NOKISS; /* Kiss Code */
int has_mac; /* length of MAC field */
int authlen; /* offset of MAC field */
int is_authentic = 0; /* cryptosum ok */
@@ -483,8 +526,8 @@ receive(
*/
if (hisversion == NTP_VERSION) {
sys_newversion++; /* new version */
- } else if (!(restrict_mask & RES_VERSION) && hisversion >=
- NTP_OLDVERSION) {
+ } else if ( !(restrict_mask & RES_VERSION)
+ && hisversion >= NTP_OLDVERSION) {
sys_oldversion++; /* previous version */
} else {
sys_badlength++;
@@ -538,8 +581,9 @@ receive(
} else {
opcode = ntohl(((u_int32 *)pkt)[authlen / 4]);
len = opcode & 0xffff;
- if (len % 4 != 0 || len < 4 || (int)len +
- authlen > rbufp->recv_length) {
+ if ( len % 4 != 0
+ || len < 4
+ || (int)len + authlen > rbufp->recv_length) {
sys_badlength++;
return; /* bad length */
}
@@ -549,13 +593,13 @@ receive(
* sys_groupname is non-NULL, there must be
* a group name provided to elicit a response.
*/
- if ((opcode & 0x3fff0000) == CRYPTO_ASSOC &&
- sys_groupname != NULL) {
+ if ( (opcode & 0x3fff0000) == CRYPTO_ASSOC
+ && sys_groupname != NULL) {
ep = (struct exten *)&((u_int32 *)pkt)[authlen / 4];
hostlen = ntohl(ep->vallen);
- if (hostlen >= sizeof(hostname) ||
- hostlen > len -
- offsetof(struct exten, pkt)) {
+ if ( hostlen >= sizeof(hostname)
+ || hostlen > len -
+ offsetof(struct exten, pkt)) {
sys_badlength++;
return; /* bad length */
}
@@ -599,8 +643,9 @@ receive(
restrict_mask = ntp_monitor(rbufp, restrict_mask);
if (restrict_mask & RES_LIMITED) {
sys_limitrejected++;
- if (!(restrict_mask & RES_KOD) || MODE_BROADCAST ==
- hismode || MODE_SERVER == hismode) {
+ if ( !(restrict_mask & RES_KOD)
+ || MODE_BROADCAST == hismode
+ || MODE_SERVER == hismode) {
if (MODE_SERVER == hismode)
DPRINTF(1, ("Possibly self-induced rate limiting of MODE_SERVER from %s\n",
stoa(&rbufp->recv_srcadr)));
@@ -698,10 +743,11 @@ receive(
* This is described in Microsoft's WSPP docs, in MS-SNTP:
* http://msdn.microsoft.com/en-us/library/cc212930.aspx
*/
- } else if (has_mac == MAX_MD5_LEN && (restrict_mask & RES_MSSNTP) &&
- (retcode == AM_FXMIT || retcode == AM_NEWPASS) &&
- (memcmp(zero_key, (char *)pkt + authlen + 4, MAX_MD5_LEN - 4) ==
- 0)) {
+ } else if ( has_mac == MAX_MD5_LEN
+ && (restrict_mask & RES_MSSNTP)
+ && (retcode == AM_FXMIT || retcode == AM_NEWPASS)
+ && (memcmp(zero_key, (char *)pkt + authlen + 4,
+ MAX_MD5_LEN - 4) == 0)) {
is_authentic = AUTH_NONE;
#endif /* HAVE_NTP_SIGND */
@@ -754,8 +800,9 @@ receive(
* mobilized. However, if this is from
* the wildcard interface, game over.
*/
- if (crypto_flags && rbufp->dstadr ==
- ANY_INTERFACE_CHOOSE(&rbufp->recv_srcadr)) {
+ if ( crypto_flags
+ && rbufp->dstadr ==
+ ANY_INTERFACE_CHOOSE(&rbufp->recv_srcadr)) {
sys_restricted++;
return; /* no wildcard */
}
@@ -882,10 +929,10 @@ receive(
* stratum is greater than the manycaster or the
* manycaster has already synchronized to us.
*/
- if (sys_leap == LEAP_NOTINSYNC || sys_stratum >=
- hisstratum || (!sys_cohort && sys_stratum ==
- hisstratum + 1) || rbufp->dstadr->addr_refid ==
- pkt->refid) {
+ if ( sys_leap == LEAP_NOTINSYNC
+ || sys_stratum >= hisstratum
+ || (!sys_cohort && sys_stratum == hisstratum + 1)
+ || rbufp->dstadr->addr_refid == pkt->refid) {
sys_declined++;
return; /* no help */
}
@@ -933,9 +980,10 @@ receive(
sys_restricted++;
return; /* not enabled */
}
- if (!AUTH((!(peer2->cast_flags & MDF_POOL) &&
- sys_authenticate) | (restrict_mask & (RES_NOPEER |
- RES_DONTTRUST)), is_authentic)) {
+ if (!AUTH( (!(peer2->cast_flags & MDF_POOL)
+ && sys_authenticate)
+ || (restrict_mask & (RES_NOPEER |
+ RES_DONTTRUST)), is_authentic)) {
sys_restricted++;
return; /* access denied */
}
@@ -944,8 +992,9 @@ receive(
* Do not respond if unsynchronized or stratum is below
* the floor or at or above the ceiling.
*/
- if (hisleap == LEAP_NOTINSYNC || hisstratum <
- sys_floor || hisstratum >= sys_ceiling) {
+ if ( hisleap == LEAP_NOTINSYNC
+ || hisstratum < sys_floor
+ || hisstratum >= sys_ceiling) {
sys_declined++;
return; /* no help */
}
@@ -1007,8 +1056,9 @@ receive(
* Do not respond if unsynchronized or stratum is below
* the floor or at or above the ceiling.
*/
- if (hisleap == LEAP_NOTINSYNC || hisstratum <
- sys_floor || hisstratum >= sys_ceiling) {
+ if ( hisleap == LEAP_NOTINSYNC
+ || hisstratum < sys_floor
+ || hisstratum >= sys_ceiling) {
sys_declined++;
return; /* no help */
}
@@ -1018,8 +1068,8 @@ receive(
* Do not respond if Autokey and the opcode is not a
* CRYPTO_ASSOC response with association ID.
*/
- if (crypto_flags && skeyid > NTP_MAXKEY && (opcode &
- 0xffff0000) != (CRYPTO_ASSOC | CRYPTO_RESP)) {
+ if ( crypto_flags && skeyid > NTP_MAXKEY
+ && (opcode & 0xffff0000) != (CRYPTO_ASSOC | CRYPTO_RESP)) {
sys_declined++;
return; /* protocol error */
}
@@ -1133,6 +1183,24 @@ receive(
sys_restricted++;
return;
}
+ /* [Bug 2941]
+ * If we got here, the packet isn't part of an
+ * existing association, it isn't correctly
+ * authenticated, and it didn't meet either of
+ * the previous two special cases so we should
+ * just drop it on the floor. For example,
+ * crypto-NAKs (is_authentic == AUTH_CRYPTO)
+ * will make it this far. This is just
+ * debug-printed and not logged to avoid log
+ * flooding.
+ */
+ DPRINTF(1, ("receive: at %ld refusing to mobilize passive association"
+ " with unknown peer %s mode %d keyid %08x len %d auth %d\n",
+ current_time, stoa(&rbufp->recv_srcadr),
+ hismode, skeyid, (authlen + has_mac),
+ is_authentic));
+ sys_declined++;
+ return;
}
/*
@@ -1145,8 +1213,8 @@ receive(
* we will spin an ephemeral association in response to
* MODE_ACTIVE KoDs, which will time out eventually.
*/
- if (hisleap != LEAP_NOTINSYNC && (hisstratum <
- sys_floor || hisstratum >= sys_ceiling)) {
+ if ( hisleap != LEAP_NOTINSYNC
+ && (hisstratum < sys_floor || hisstratum >= sys_ceiling)) {
sys_declined++;
return; /* no help */
}
@@ -1205,9 +1273,9 @@ receive(
* have a public key ID; if not, the packet must have a
* symmetric key ID.
*/
- if (is_authentic != AUTH_CRYPTO && (((peer->flags &
- FLAG_SKEY) && skeyid <= NTP_MAXKEY) || (!(peer->flags &
- FLAG_SKEY) && skeyid > NTP_MAXKEY))) {
+ if ( is_authentic != AUTH_CRYPTO
+ && ( ((peer->flags & FLAG_SKEY) && skeyid <= NTP_MAXKEY)
+ || (!(peer->flags & FLAG_SKEY) && skeyid > NTP_MAXKEY))) {
sys_badauth++;
return;
}
@@ -1256,16 +1324,23 @@ receive(
* Check for bogus packet in basic mode. If found, switch to
* interleaved mode and resynchronize, but only after confirming
* the packet is not bogus in symmetric interleaved mode.
+ *
+ * This could also mean somebody is forging packets claiming to
+ * be from us, attempting to cause our server to KoD us.
*/
} else if (peer->flip == 0) {
if (!L_ISEQU(&p_org, &peer->aorg)) {
peer->bogusorg++;
peer->flash |= TEST2; /* bogus */
- if (!L_ISZERO(&peer->dst) && L_ISEQU(&p_org,
- &peer->dst)) {
+ msyslog(LOG_INFO,
+ "receive: Unexpected origin timestamp from %s",
+ ntoa(&peer->srcadr));
+ if ( !L_ISZERO(&peer->dst)
+ && L_ISEQU(&p_org, &peer->dst)) {
peer->flip = 1;
report_event(PEVNT_XLEAVE, peer, NULL);
}
+ return; /* Bogus packet, we are done */
} else {
L_CLR(&peer->aorg);
}
@@ -1282,11 +1357,12 @@ receive(
* can happen if a packet is lost, duplicated or crossed. If
* found, flip and resynchronize.
*/
- } else if (!L_ISZERO(&peer->dst) && !L_ISEQU(&p_org,
- &peer->dst)) {
+ } else if ( !L_ISZERO(&peer->dst)
+ && !L_ISEQU(&p_org, &peer->dst)) {
peer->bogusorg++;
peer->flags |= FLAG_XBOGUS;
peer->flash |= TEST2; /* bogus */
+ return; /* Bogus packet, we are done */
}
/*
@@ -1321,8 +1397,8 @@ receive(
report_event(PEVNT_AUTH, peer, "digest");
peer->flash |= TEST5; /* bad auth */
peer->badauth++;
- if (has_mac &&
- (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);
@@ -1351,11 +1427,22 @@ receive(
* this maximum and advance the headway to give the sender some
* headroom. Very intricate.
*/
+
+ /*
+ * Check for any kiss codes. Note this is only used when a server
+ * responds to a packet request
+ */
+
+ kissCode = kiss_code_check(hisleap, hisstratum, hismode, pkt->refid);
+
+ /*
+ * Check to see if this is a RATE Kiss Code
+ * Currently this kiss code will accept whatever poll
+ * rate that the server sends
+ */
peer->ppoll = max(peer->minpoll, pkt->ppoll);
- if (hismode == MODE_SERVER && hisleap == LEAP_NOTINSYNC &&
- hisstratum == STRATUM_UNSPEC && memcmp(&pkt->refid,
- "RATE", 4) == 0) {
- peer->selbroken++;
+ if (kissCode == RATEKISS) {
+ peer->selbroken++; /* Increment the KoD count */
report_event(PEVNT_RATE, peer, NULL);
if (pkt->ppoll > peer->minpoll)
peer->minpoll = peer->ppoll;
@@ -1364,6 +1451,11 @@ receive(
poll_update(peer, pkt->ppoll);
return; /* kiss-o'-death */
}
+ if (kissCode != NOKISS) {
+ peer->selbroken++; /* Increment the KoD count */
+ return; /* Drop any other kiss code packets */
+ }
+
/*
* That was hard and I am sweaty, but the packet is squeaky
@@ -1455,8 +1547,8 @@ receive(
int i;
for (i = 0; ; i++) {
- if (tkeyid == peer->pkeyid ||
- tkeyid == ap->key) {
+ if ( tkeyid == peer->pkeyid
+ || tkeyid == ap->key) {
peer->flash &= ~TEST8;
peer->pkeyid = skeyid;
ap->seq -= i;
@@ -1589,8 +1681,8 @@ process_packet(
* Verify the server is synchronized; that is, the leap bits,
* stratum and root distance are valid.
*/
- if (pleap == LEAP_NOTINSYNC || /* test 6 */
- pstratum < sys_floor || pstratum >= sys_ceiling)
+ if ( pleap == LEAP_NOTINSYNC /* test 6 */
+ || pstratum < sys_floor || pstratum >= sys_ceiling)
peer->flash |= TEST6; /* bad synch or strat */
if (p_del / 2 + p_disp >= MAXDISPERSE) /* test 7 */
peer->flash |= TEST7; /* bad header */
@@ -1823,8 +1915,9 @@ process_packet(
* client mode when the client is fit and the autokey dance is
* complete.
*/
- if ((FLAG_BC_VOL & peer->flags) && MODE_CLIENT == peer->hmode &&
- !(TEST11 & peer_unfit(peer))) { /* distance exceeded */
+ if ( (FLAG_BC_VOL & peer->flags)
+ && MODE_CLIENT == peer->hmode
+ && !(TEST11 & peer_unfit(peer))) { /* distance exceeded */
#ifdef AUTOKEY
if (peer->flags & FLAG_SKEY) {
if (!(~peer->crypto & CRYPTO_FLAG_ALL))
@@ -1865,8 +1958,8 @@ clock_update(
sys_poll = peer->maxpoll;
poll_update(peer, sys_poll);
sys_stratum = min(peer->stratum + 1, STRATUM_UNSPEC);
- if (peer->stratum == STRATUM_REFCLOCK ||
- peer->stratum == STRATUM_UNSPEC)
+ if ( peer->stratum == STRATUM_REFCLOCK
+ || peer->stratum == STRATUM_UNSPEC)
sys_refid = peer->refid;
else
sys_refid = addr2refid(&peer->srcadr);
@@ -1992,12 +2085,12 @@ clock_update(
* once is mostly harmless.)
*/
if (leapsec == LSPROX_NOWARN) {
- if (leap_vote_ins > leap_vote_del
+ if ( leap_vote_ins > leap_vote_del
&& leap_vote_ins > sys_survivors / 2) {
get_systime(&now);
leapsec_add_dyn(TRUE, now.l_ui, NULL);
}
- if (leap_vote_del > leap_vote_ins
+ if ( leap_vote_del > leap_vote_ins
&& leap_vote_del > sys_survivors / 2) {
get_systime(&now);
leapsec_add_dyn(FALSE, now.l_ui, NULL);
@@ -2320,8 +2413,8 @@ clock_filter(
m = 0;
for (i = 0; i < NTP_SHIFT; i++) {
peer->filter_order[i] = (u_char) ord[i];
- if (dst[i] >= MAXDISPERSE || (m >= 2 && dst[i] >=
- sys_maxdist))
+ if ( dst[i] >= MAXDISPERSE
+ || (m >= 2 && dst[i] >= sys_maxdist))
continue;
m++;
}
@@ -2367,10 +2460,11 @@ clock_filter(
* than twice the host poll interval, consider the new sample
* a popcorn spike and ignore it.
*/
- if (peer->disp < sys_maxdist && peer->filter_disp[k] <
- sys_maxdist && etemp > CLOCK_SGATE * peer->jitter &&
- peer->filter_epoch[k] - peer->epoch < 2. *
- ULOGTOD(peer->hpoll)) {
+ if ( peer->disp < sys_maxdist
+ && peer->filter_disp[k] < sys_maxdist
+ && etemp > CLOCK_SGATE * peer->jitter
+ && peer->filter_epoch[k] - peer->epoch
+ < 2. * ULOGTOD(peer->hpoll)) {
snprintf(tbuf, sizeof(tbuf), "%.6f s", etemp);
report_event(PEVNT_POPCORN, peer, tbuf);
return;
@@ -2547,14 +2641,14 @@ clock_select(void)
if (!(peer->flags & FLAG_PREFER)) {
switch (peer->refclktype) {
case REFCLK_LOCALCLOCK:
- if (current_time > orphwait &&
- typelocal == NULL)
+ if ( current_time > orphwait
+ && typelocal == NULL)
typelocal = peer;
continue;
case REFCLK_ACTS:
- if (current_time > orphwait &&
- typeacts == NULL)
+ if ( current_time > orphwait
+ && typeacts == NULL)
typeacts = peer;
continue;
}
@@ -2684,8 +2778,10 @@ clock_select(void)
peer = peers[i].peer;
h = peers[i].synch;
- if ((high <= low || peer->offset + h < low ||
- peer->offset - h > high) && !(peer->flags & FLAG_TRUE))
+ if (( high <= low
+ || peer->offset + h < low
+ || peer->offset - h > high
+ ) && !(peer->flags & FLAG_TRUE))
continue;
#ifdef REFCLOCK
@@ -2742,7 +2838,7 @@ clock_select(void)
}
/*
- * Now, vote outlyers off the island by select jitter weighted
+ * Now, vote outliers off the island by select jitter weighted
* 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
@@ -2772,8 +2868,9 @@ clock_select(void)
}
}
g = max(g, LOGTOD(sys_precision));
- if (nlist <= max(1, sys_minclock) || g <= d ||
- ((FLAG_TRUE | FLAG_PREFER) & peers[k].peer->flags))
+ if ( nlist <= max(1, sys_minclock)
+ || g <= d
+ || ((FLAG_TRUE | FLAG_PREFER) & peers[k].peer->flags))
break;
DPRINTF(3, ("select: drop %s seljit %.6f jit %.6f\n",
@@ -2898,10 +2995,12 @@ clock_select(void)
* if there is a prefer peer or there are no survivors and none
* are required.
*/
- if (typepps != NULL && fabs(sys_offset) < 0.4 &&
- (typepps->refclktype != REFCLK_ATOM_PPS ||
- (typepps->refclktype == REFCLK_ATOM_PPS && (sys_prefer !=
- NULL || (typesystem == NULL && sys_minsane == 0))))) {
+ if ( typepps != NULL
+ && fabs(sys_offset) < 0.4
+ && ( typepps->refclktype != REFCLK_ATOM_PPS
+ || ( typepps->refclktype == REFCLK_ATOM_PPS
+ && ( sys_prefer != NULL
+ || (typesystem == NULL && sys_minsane == 0))))) {
typesystem = typepps;
sys_clockhop = 0;
typesystem->new_status = CTL_PST_SEL_PPS;
@@ -3240,16 +3339,16 @@ peer_xmit(
* autokey sequence, the autokey exchange is
* used to retrieve the autokey values.
*/
- else if (sys_leap != LEAP_NOTINSYNC &&
- peer->leap != LEAP_NOTINSYNC &&
- !(peer->crypto & CRYPTO_FLAG_COOK))
+ else if ( sys_leap != LEAP_NOTINSYNC
+ && peer->leap != LEAP_NOTINSYNC
+ && !(peer->crypto & CRYPTO_FLAG_COOK))
exten = crypto_args(peer, CRYPTO_COOK,
peer->associd, NULL);
else if (!(peer->crypto & CRYPTO_FLAG_AUTO))
exten = crypto_args(peer, CRYPTO_AUTO,
peer->associd, NULL);
- else if (peer->flags & FLAG_ASSOC &&
- peer->crypto & CRYPTO_FLAG_SIGN)
+ else if ( peer->flags & FLAG_ASSOC
+ && peer->crypto & CRYPTO_FLAG_SIGN)
exten = crypto_args(peer, CRYPTO_AUTO |
CRYPTO_RESP, peer->assoc, NULL);
@@ -3693,7 +3792,7 @@ pool_xmit(
pool->hostname));
else
msyslog(LOG_ERR,
- "unable to start pool DNS %s %m",
+ "unable to start pool DNS %s: %m",
pool->hostname);
return;
}
@@ -3883,8 +3982,9 @@ peer_unfit(
* synchronized, (2) the server stratum is below the floor or
* greater than or equal to the ceiling.
*/
- if (peer->leap == LEAP_NOTINSYNC || peer->stratum < sys_floor ||
- peer->stratum >= sys_ceiling)
+ if ( peer->leap == LEAP_NOTINSYNC
+ || peer->stratum < sys_floor
+ || peer->stratum >= sys_ceiling)
rval |= TEST10; /* bad synch or stratum */
/*
@@ -3892,8 +3992,9 @@ peer_unfit(
* distance is greater than or equal to the distance threshold
* plus the increment due to one host poll interval.
*/
- if (!(peer->flags & FLAG_REFCLOCK) && root_distance(peer) >=
- sys_maxdist + clock_phi * ULOGTOD(peer->hpoll))
+ if ( !(peer->flags & FLAG_REFCLOCK)
+ && root_distance(peer) >= sys_maxdist
+ + clock_phi * ULOGTOD(peer->hpoll))
rval |= TEST11; /* distance exceeded */
/*
diff --git a/contrib/ntp/ntpd/ntp_refclock.c b/contrib/ntp/ntpd/ntp_refclock.c
index f0e9b9ec307d..1f16ca797106 100644
--- a/contrib/ntp/ntpd/ntp_refclock.c
+++ b/contrib/ntp/ntpd/ntp_refclock.c
@@ -1049,7 +1049,7 @@ refclock_control(
if (NULL == peer)
return;
- NTP_INSIST(peer->procptr != NULL);
+ INSIST(peer->procptr != NULL);
pp = peer->procptr;
/*
diff --git a/contrib/ntp/ntpd/ntp_request.c b/contrib/ntp/ntpd/ntp_request.c
index 8ffebad32882..6073f99c456d 100644
--- a/contrib/ntp/ntpd/ntp_request.c
+++ b/contrib/ntp/ntpd/ntp_request.c
@@ -1757,10 +1757,12 @@ do_restrict(
}
/*
- * Looks okay, try it out
+ * Looks okay, try it out. Needs to reload data pointer and
+ * item counter. (Talos-CAN-0052)
*/
ZERO_SOCK(&matchaddr);
ZERO_SOCK(&matchmask);
+ items = INFO_NITEMS(inpkt->err_nitems);
datap = inpkt->u.data;
while (items-- > 0) {
@@ -1917,9 +1919,11 @@ reset_peer(
}
/*
- * Now do it in earnest.
+ * Now do it in earnest. Needs to reload data pointer and item
+ * counter. (Talos-CAN-0052)
*/
-
+
+ items = INFO_NITEMS(inpkt->err_nitems);
datap = inpkt->u.data;
while (items-- > 0) {
ZERO(cp);
diff --git a/contrib/ntp/ntpd/ntp_restrict.c b/contrib/ntp/ntpd/ntp_restrict.c
index 9948d54d9e90..82bbaef25741 100644
--- a/contrib/ntp/ntpd/ntp_restrict.c
+++ b/contrib/ntp/ntpd/ntp_restrict.c
@@ -173,7 +173,7 @@ alloc_res4(void)
LINK_SLIST(resfree4, res, link);
res = (void *)((char *)res - cb);
}
- NTP_INSIST(rl == res);
+ INSIST(rl == res);
/* allocate the first */
return res;
}
@@ -199,7 +199,7 @@ alloc_res6(void)
LINK_SLIST(resfree6, res, link);
res = (void *)((char *)res - cb);
}
- NTP_INSIST(rl == res);
+ INSIST(rl == res);
/* allocate the first */
return res;
}
@@ -223,7 +223,7 @@ free_res(
else
plisthead = &restrictlist4;
UNLINK_SLIST(unlinked, *plisthead, res, link, restrict_u);
- NTP_INSIST(unlinked == res);
+ INSIST(unlinked == res);
if (v6) {
zero_mem(res, V6_SIZEOF_RESTRICT_U);
@@ -291,7 +291,7 @@ match_restrict6_addr(
for (res = restrictlist6; res != NULL; res = next) {
next = res->link;
- NTP_INSIST(next != res);
+ INSIST(next != res);
if (res->expire &&
res->expire <= current_time)
free_res(res, v6);
@@ -435,6 +435,9 @@ restrictions(
match = match_restrict4_addr(SRCADR(srcadr),
SRCPORT(srcadr));
+
+ INSIST(match != NULL);
+
match->count++;
/*
* res_not_found counts only use of the final default
@@ -461,6 +464,7 @@ restrictions(
return (int)RES_IGNORE;
match = match_restrict6_addr(pin6, SRCPORT(srcadr));
+ INSIST(match != NULL);
match->count++;
if (&restrict_def6 == match)
res_not_found++;
@@ -494,8 +498,8 @@ hack_restrict(
op, stoa(resaddr), stoa(resmask), mflags, flags));
if (NULL == resaddr) {
- NTP_REQUIRE(NULL == resmask);
- NTP_REQUIRE(RESTRICT_FLAGS == op);
+ REQUIRE(NULL == resmask);
+ REQUIRE(RESTRICT_FLAGS == op);
restrict_source_flags = flags;
restrict_source_mflags = mflags;
restrict_source_enabled = 1;
@@ -503,9 +507,13 @@ hack_restrict(
}
ZERO(match);
+
+#if 0
/* silence VC9 potentially uninit warnings */
+ // HMS: let's use a compiler-specific "enable" for this.
res = NULL;
v6 = 0;
+#endif
if (IS_IPV4(resaddr)) {
v6 = 0;
@@ -528,7 +536,7 @@ hack_restrict(
&match.u.v6.mask);
} else /* not IPv4 nor IPv6 */
- NTP_REQUIRE(0);
+ REQUIRE(0);
match.flags = flags;
match.mflags = mflags;
@@ -600,7 +608,7 @@ hack_restrict(
break;
default: /* unknown op */
- NTP_INSIST(0);
+ INSIST(0);
break;
}
@@ -626,7 +634,7 @@ restrict_source(
IS_MCAST(addr) || ISREFCLOCKADR(addr))
return;
- NTP_REQUIRE(AF_INET == AF(addr) || AF_INET6 == AF(addr));
+ REQUIRE(AF_INET == AF(addr) || AF_INET6 == AF(addr));
SET_HOSTMASK(&onesmask, AF(addr));
if (farewell) {
@@ -647,10 +655,12 @@ restrict_source(
*/
if (IS_IPV4(addr)) {
res = match_restrict4_addr(SRCADR(addr), SRCPORT(addr));
+ INSIST(res != NULL);
found_specific = (SRCADR(&onesmask) == res->u.v4.mask);
} else {
res = match_restrict6_addr(&SOCK_ADDR6(addr),
SRCPORT(addr));
+ INSIST(res != NULL);
found_specific = ADDR6_EQ(&res->u.v6.mask,
&SOCK_ADDR6(&onesmask));
}
diff --git a/contrib/ntp/ntpd/ntp_timer.c b/contrib/ntp/ntpd/ntp_timer.c
index 5cbb892e3ddd..828aa8c273bf 100644
--- a/contrib/ntp/ntpd/ntp_timer.c
+++ b/contrib/ntp/ntpd/ntp_timer.c
@@ -57,6 +57,12 @@ static void check_leapsec(u_int32, const time_t*, int/*BOOL*/);
volatile int interface_interval; /* init_io() sets def. 300s */
/*
+ * Initializing flag. All async routines watch this and only do their
+ * thing when it is clear.
+ */
+int initializing;
+
+/*
* Alarm flag. The mainline code imports this.
*/
volatile int alarm_flag;
diff --git a/contrib/ntp/ntpd/ntpd-opts.c b/contrib/ntp/ntpd/ntpd-opts.c
index 2d547a18de79..1bbecfa0460d 100644
--- a/contrib/ntp/ntpd/ntpd-opts.c
+++ b/contrib/ntp/ntpd/ntpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed June 29, 2015 at 04:28:19 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:36:00 PM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -75,7 +75,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpd options
*/
static char const ntpd_opt_strs[3129] =
-/* 0 */ "ntpd 4.2.8p3\n"
+/* 0 */ "ntpd 4.2.8p4\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"
@@ -205,12 +205,12 @@ static char const ntpd_opt_strs[3129] =
/* 2900 */ "output version information and exit\0"
/* 2936 */ "version\0"
/* 2944 */ "NTPD\0"
-/* 2949 */ "ntpd - NTP daemon program - Ver. 4.2.8p3\n"
+/* 2949 */ "ntpd - NTP daemon program - Ver. 4.2.8p4\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
/* 3080 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 3114 */ "\n\0"
-/* 3116 */ "ntpd 4.2.8p3";
+/* 3116 */ "ntpd 4.2.8p4";
/**
* ipv4 option description with
@@ -1529,7 +1529,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.8p3\n\
+ puts(_("ntpd 4.2.8p4\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\
@@ -1670,7 +1670,7 @@ implied warranty.\n"));
puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */
- puts(_("ntpd - NTP daemon program - Ver. 4.2.8p3\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p4\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@@ -1678,7 +1678,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
- puts(_("ntpd 4.2.8p3"));
+ puts(_("ntpd 4.2.8p4"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpd/ntpd-opts.def b/contrib/ntp/ntpd/ntpd-opts.def
index dee484dbe1b4..00d35115dc43 100644
--- a/contrib/ntp/ntpd/ntpd-opts.def
+++ b/contrib/ntp/ntpd/ntpd-opts.def
@@ -236,6 +236,8 @@ when you have permission to do so from the owner of the target host.
Finally,
in the past many startup scripts would run
.Xr ntpdate 1ntpdatemdoc
+or
+.Xr sntp 1sntpmdoc
to get the system clock close to correct before starting
.Xr ntpd 1ntpdmdoc ,
but this was never more than a mediocre hack and is no longer needed.
@@ -245,7 +247,9 @@ and you still need to set the system time before starting
.Nm ,
please open a bug report and document what is going on,
and then look at using
-.Xr sntp 1sntpmdoc .
+.Xr sntp 1sntpmdoc
+if you really need to set the clock before starting
+.Nm .
.Pp
There is a way to start
.Xr ntpd 1ntpdmdoc
diff --git a/contrib/ntp/ntpd/ntpd-opts.h b/contrib/ntp/ntpd/ntpd-opts.h
index 21142d8c4de2..d87c2216dcb5 100644
--- a/contrib/ntp/ntpd/ntpd-opts.h
+++ b/contrib/ntp/ntpd/ntpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed June 29, 2015 at 04:28:18 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:35:59 PM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -106,9 +106,9 @@ typedef enum {
/** count of all options for ntpd */
#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.2.8p3"
+#define NTPD_VERSION "4.2.8p4"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.8p3"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p4"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpd/ntpd.1ntpdman b/contrib/ntp/ntpd/ntpd.1ntpdman
index c231b7fd8486..187a79a79a08 100644
--- a/contrib/ntp/ntpd/ntpd.1ntpdman
+++ b/contrib/ntp/ntpd/ntpd.1ntpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd 1ntpdman "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH ntpd 1ntpdman "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-LZaapD/ag-XZa4nD)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-dUaOfK/ag-qUaGeK)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:24 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:11 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -602,6 +602,8 @@ when you have permission to do so from the owner of the target host.
Finally,
in the past many startup scripts would run
\fCntpdate\f[]\fR(1ntpdatemdoc)\f[]
+or
+\fCsntp\f[]\fR(1sntpmdoc)\f[]
to get the system clock close to correct before starting
\fCntpd\f[]\fR(1ntpdmdoc)\f[],
but this was never more than a mediocre hack and is no longer needed.
@@ -611,7 +613,9 @@ and you still need to set the system time before starting
\f\*[B-Font]ntpd\fP,
please open a bug report and document what is going on,
and then look at using
-\fCsntp\f[]\fR(1sntpmdoc)\f[].
+\fCsntp\f[]\fR(1sntpmdoc)\f[]
+if you really need to set the clock before starting
+\f\*[B-Font]ntpd\fP.
.sp \n(Ppu
.ne 2
diff --git a/contrib/ntp/ntpd/ntpd.1ntpdmdoc b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
index 08d7655dff1f..139de527781e 100644
--- a/contrib/ntp/ntpd/ntpd.1ntpdmdoc
+++ b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:41 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:30 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -532,6 +532,8 @@ when you have permission to do so from the owner of the target host.
Finally,
in the past many startup scripts would run
.Xr ntpdate 1ntpdatemdoc
+or
+.Xr sntp 1sntpmdoc
to get the system clock close to correct before starting
.Xr ntpd 1ntpdmdoc ,
but this was never more than a mediocre hack and is no longer needed.
@@ -541,7 +543,9 @@ and you still need to set the system time before starting
.Nm ,
please open a bug report and document what is going on,
and then look at using
-.Xr sntp 1sntpmdoc .
+.Xr sntp 1sntpmdoc
+if you really need to set the clock before starting
+.Nm .
.Pp
There is a way to start
.Xr ntpd 1ntpdmdoc
diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c
index 529e6ce1b0cc..a517391ba522 100644
--- a/contrib/ntp/ntpd/ntpd.c
+++ b/contrib/ntp/ntpd/ntpd.c
@@ -27,6 +27,14 @@
#include "ntp_libopts.h"
#include "ntpd-opts.h"
+/* there's a short treatise below what the thread stuff is for */
+#if defined(HAVE_PTHREADS) && HAVE_PTHREADS && !defined(NO_THREADS)
+# ifdef HAVE_PTHREAD_H
+# include <pthread.h>
+# endif
+# define NEED_PTHREAD_WARMUP
+#endif
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -180,12 +188,6 @@ int waitsync_fd_to_close = -1; /* -w/--wait-sync */
#endif
/*
- * Initializing flag. All async routines watch this and only do their
- * thing when it is clear.
- */
-int initializing;
-
-/*
* Version declaration
*/
extern const char *Version;
@@ -238,6 +240,68 @@ static void library_unexpected_error(const char *, int,
#endif /* !SIM */
+/* Bug2332 unearthed a problem in the interaction of reduced user
+ * privileges, the limits on memory usage and some versions of the
+ * pthread library on Linux systems. The 'pthread_cancel()' function and
+ * likely some others need to track the stack of the thread involved,
+ * and uses a function that comes from GCC (--> libgcc_s.so) to do
+ * this. Unfortunately the developers of glibc decided to load the
+ * library on demand, which speeds up program start but can cause
+ * trouble here: Due to all the things NTPD does to limit its resource
+ * usage, this deferred load of libgcc_s does not always work once the
+ * restrictions are in effect.
+ *
+ * One way out of this was attempting a forced link against libgcc_s
+ * when possible because it makes the library available immediately
+ * without deferred load. (The symbol resolution would still be dynamic
+ * and on demand, but the code would already be in the process image.)
+ *
+ * This is a tricky thing to do, since it's not necessary everywhere,
+ * not possible everywhere, has shown to break the build of other
+ * programs in the NTP suite and is now generally frowned upon.
+ *
+ * So we take a different approach here: We creat a worker thread that does
+ * actually nothing except waiting for cancellation and cancel it. If
+ * this is done before all the limitations are put in place, the
+ * machinery is pre-heated and all the runtime stuff should be in place
+ * and useable when needed.
+ *
+ * This uses only the standard pthread API and should work with all
+ * implementations of pthreads. It is not necessary everywhere, but it's
+ * cheap enough to go on nearly unnoticed.
+ */
+#ifdef NEED_PTHREAD_WARMUP
+
+/* simple thread function: sleep until cancelled, just to exercise
+ * thread cancellation.
+ */
+static void*
+my_pthread_warmup_worker(
+ void *thread_args)
+{
+ (void)thread_args;
+ for (;;)
+ sleep(10);
+ return NULL;
+}
+
+/* pre-heat threading: create a thread and cancel it, just to exercise
+ * thread cancellation.
+ */
+static void
+my_pthread_warmup(void)
+{
+ pthread_t thread;
+ int rc;
+ rc = pthread_create(
+ &thread, NULL, my_pthread_warmup_worker, NULL);
+ if (0 == rc) {
+ pthread_cancel(thread);
+ pthread_join(thread, NULL);
+ }
+}
+
+#endif /*defined(NEED_PTHREAD_WARMUP)*/
void
@@ -451,6 +515,10 @@ ntpdmain(
int zero;
# endif
+# ifdef NEED_PTHREAD_WARMUP
+ my_pthread_warmup();
+# endif
+
# ifdef HAVE_UMASK
uv = umask(0);
if (uv)
@@ -791,13 +859,16 @@ ntpdmain(
*/
getconfig(argc, argv);
- if (do_memlock) {
+ if (-1 == cur_memlock) {
# if defined(HAVE_MLOCKALL)
/*
* lock the process into memory
*/
- if (!HAVE_OPT(SAVECONFIGQUIT) &&
- 0 != mlockall(MCL_CURRENT|MCL_FUTURE))
+ if ( !HAVE_OPT(SAVECONFIGQUIT)
+# ifdef RLIMIT_MEMLOCK
+ && -1 != DFLT_RLIMIT_MEMLOCK
+# endif
+ && 0 != mlockall(MCL_CURRENT|MCL_FUTURE))
msyslog(LOG_ERR, "mlockall(): %m");
# else /* !HAVE_MLOCKALL follows */
# ifdef HAVE_PLOCK
@@ -937,10 +1008,17 @@ getgroup:
msyslog(LOG_ERR, "Cannot setegid() to group `%s': %m", group);
exit (-1);
}
- if (group)
- setgroups(1, &sw_gid);
- else
- initgroups(pw->pw_name, pw->pw_gid);
+ if (group) {
+ if (0 != setgroups(1, &sw_gid)) {
+ msyslog(LOG_ERR, "setgroups(1, %d) failed: %m", sw_gid);
+ exit (-1);
+ }
+ }
+ else if (pw)
+ if (0 != initgroups(pw->pw_name, pw->pw_gid)) {
+ msyslog(LOG_ERR, "initgroups(<%s>, %d) filed: %m", pw->pw_name, pw->pw_gid);
+ exit (-1);
+ }
if (user && setuid(sw_uid)) {
msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user);
exit (-1);
diff --git a/contrib/ntp/ntpd/ntpd.html b/contrib/ntp/ntpd/ntpd.html
index 7af6d9859f95..8d6f9d6ad507 100644
--- a/contrib/ntp/ntpd/ntpd.html
+++ b/contrib/ntp/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.8p3 of <code>ntpd</code>.
+ <p>This document applies to version 4.2.8p4 of <code>ntpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description
@@ -220,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.8p3-RC3
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p4-sec-RC2
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
diff --git a/contrib/ntp/ntpd/ntpd.man.in b/contrib/ntp/ntpd/ntpd.man.in
index c7c4eecd2edc..21bd88473585 100644
--- a/contrib/ntp/ntpd/ntpd.man.in
+++ b/contrib/ntp/ntpd/ntpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd @NTPD_MS@ "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH ntpd @NTPD_MS@ "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-LZaapD/ag-XZa4nD)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-dUaOfK/ag-qUaGeK)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:24 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:11 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -602,6 +602,8 @@ when you have permission to do so from the owner of the target host.
Finally,
in the past many startup scripts would run
\fCntpdate\f[]\fR(@NTPDATE_MS@)\f[]
+or
+\fCsntp\f[]\fR(@SNTP_MS@)\f[]
to get the system clock close to correct before starting
\fCntpd\f[]\fR(@NTPD_MS@)\f[],
but this was never more than a mediocre hack and is no longer needed.
@@ -611,7 +613,9 @@ and you still need to set the system time before starting
\f\*[B-Font]ntpd\fP,
please open a bug report and document what is going on,
and then look at using
-\fCsntp\f[]\fR(@SNTP_MS@)\f[].
+\fCsntp\f[]\fR(@SNTP_MS@)\f[]
+if you really need to set the clock before starting
+\f\*[B-Font]ntpd\fP.
.sp \n(Ppu
.ne 2
diff --git a/contrib/ntp/ntpd/ntpd.mdoc.in b/contrib/ntp/ntpd/ntpd.mdoc.in
index 7d87d85bbc27..ad71af9ad62d 100644
--- a/contrib/ntp/ntpd/ntpd.mdoc.in
+++ b/contrib/ntp/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:30:41 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:30 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -532,6 +532,8 @@ when you have permission to do so from the owner of the target host.
Finally,
in the past many startup scripts would run
.Xr ntpdate @NTPDATE_MS@
+or
+.Xr sntp @SNTP_MS@
to get the system clock close to correct before starting
.Xr ntpd @NTPD_MS@ ,
but this was never more than a mediocre hack and is no longer needed.
@@ -541,7 +543,9 @@ and you still need to set the system time before starting
.Nm ,
please open a bug report and document what is going on,
and then look at using
-.Xr sntp @SNTP_MS@ .
+.Xr sntp @SNTP_MS@
+if you really need to set the clock before starting
+.Nm .
.Pp
There is a way to start
.Xr ntpd @NTPD_MS@
diff --git a/contrib/ntp/ntpd/rc_cmdlength.c b/contrib/ntp/ntpd/rc_cmdlength.c
index 2807d2acd73e..922312e62a7b 100644
--- a/contrib/ntp/ntpd/rc_cmdlength.c
+++ b/contrib/ntp/ntpd/rc_cmdlength.c
@@ -1,4 +1,5 @@
#include <config.h>
+#include <rc_cmdlength.h>
#if HAVE_UNISTD_H
# include <unistd.h>
diff --git a/contrib/ntp/ntpd/refclock_arc.c b/contrib/ntp/ntpd/refclock_arc.c
index e5d4cb44086c..7daae8d3a03a 100644
--- a/contrib/ntp/ntpd/refclock_arc.c
+++ b/contrib/ntp/ntpd/refclock_arc.c
@@ -657,7 +657,7 @@ arc_start(
return 0;
}
close(temp_fd);
- temp_fd = -1;
+ temp_fd = -1; /* not used after this, at *this* time. */
#ifndef SYS_WINNT
if (-1 == fcntl(fd, F_SETFL, 0)) /* clear the descriptor flags */
diff --git a/contrib/ntp/ntpd/refclock_chu.c b/contrib/ntp/ntpd/refclock_chu.c
index 6b1ae5554adf..1f02a1c1f4a7 100644
--- a/contrib/ntp/ntpd/refclock_chu.c
+++ b/contrib/ntp/ntpd/refclock_chu.c
@@ -1194,7 +1194,7 @@ chu_a(
* only if the maximum distance is at least MINSYNC.
*/
up->syndist = k = 0;
- val = -16;
+ // val = -16;
for (i = -1; i < 2; i++) {
temp = up->cbuf[i + 4] & 0xf;
if (i >= 0)
diff --git a/contrib/ntp/ntpd/refclock_gpsdjson.c b/contrib/ntp/ntpd/refclock_gpsdjson.c
index 0a88cece4d24..c2bf09a805e8 100644
--- a/contrib/ntp/ntpd/refclock_gpsdjson.c
+++ b/contrib/ntp/ntpd/refclock_gpsdjson.c
@@ -1113,9 +1113,9 @@ strtojint(
/* Now try to convert a sequence of digits. */
hold = cp;
accu = 0;
- while (isdigit(*(const unsigned char*)cp)) {
+ while (isdigit(*(const u_char*)cp)) {
flags |= (accu > limit_lo);
- accu = accu * 10 + (*(const unsigned char*)cp++ - '0');
+ accu = accu * 10 + (*(const u_char*)cp++ - '0');
flags |= (accu > limit_hi);
}
/* Check for empty conversion (no digits seen). */
@@ -2086,8 +2086,8 @@ convert_ascii_time(
return FALSE; /* could not parse the mandatory stuff! */
if (*ep == '.') {
dw = 100000000u;
- while (isdigit(*(unsigned char*)++ep)) {
- ts.tv_nsec += (*(unsigned char*)ep - '0') * dw;
+ while (isdigit(*(u_char*)++ep)) {
+ ts.tv_nsec += (*(u_char*)ep - '0') * dw;
dw /= 10u;
}
}
@@ -2189,16 +2189,16 @@ log_data(
char *dtop = s_lbuf + sizeof(s_lbuf) - 1; /* for NUL */
while (sptr != stop && dptr != dtop) {
- if (*sptr == '\\') {
+ u_char uch = (u_char)*sptr++;
+ if (uch == '\\') {
dptr = add_string(dptr, dtop, "\\\\");
- } else if (isprint(*sptr)) {
- *dptr++ = *sptr;
+ } else if (isprint(uch)) {
+ *dptr++ = (char)uch;
} else {
char fbuf[6];
- snprintf(fbuf, sizeof(fbuf), "\\%03o", *(const u_char*)sptr);
+ snprintf(fbuf, sizeof(fbuf), "\\%03o", uch);
dptr = add_string(dptr, dtop, fbuf);
}
- sptr++;
}
*dptr = '\0';
mprintf("%s[%s]: '%s'\n", up->logname, what, s_lbuf);
diff --git a/contrib/ntp/ntpd/refclock_local.c b/contrib/ntp/ntpd/refclock_local.c
index d1b28718e993..d816c55c1281 100644
--- a/contrib/ntp/ntpd/refclock_local.c
+++ b/contrib/ntp/ntpd/refclock_local.c
@@ -55,15 +55,7 @@
*
* Fudge Factors
*
- * If fudge flag1 is lit, the leap second bit is set in the peer
- * status word. It should be set early in the day of a leap second
- * event and set dark on the day after the event.
- *
- * Note the fudge time1 and time2 have been deprecated. The fudge time1
- * was intended to apply a bias offset. This can be done using the Unix
- * date command. The fudge time2 was intended to apply a bias frequency.
- * This can be done using the frequency file and/or the freq
- * configuration command.
+ * None currently supported.
*/
/*
* Local interface definitions
@@ -179,9 +171,7 @@ local_poll(
/*
* Ramble through the usual filtering and grooming code, which
* is essentially a no-op and included mostly for pretty
- * billboards. We allow a one-time time adjustment using fudge
- * time1 (s) and a continuous frequency adjustment using fudge
- * time 2 (ppm).
+ * billboards.
*/
poll_time = current_time;
refclock_process_offset(pp, pp->lastrec, pp->lastrec, 0);
@@ -215,10 +205,6 @@ local_poll(
pp->disp = 0;
pp->jitter = 0;
#else /* KERNEL_PLL LOCKCLOCK */
- if (pp->sloppyclockflag & CLK_FLAG1)
- pp->leap = LEAP_ADDSECOND;
- else
- pp->leap = LEAP_NOWARNING;
pp->disp = DISPERSION;
pp->jitter = 0;
#endif /* KERNEL_PLL LOCKCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_nmea.c b/contrib/ntp/ntpd/refclock_nmea.c
index 126b53026a9e..b1ea2946b620 100644
--- a/contrib/ntp/ntpd/refclock_nmea.c
+++ b/contrib/ntp/ntpd/refclock_nmea.c
@@ -810,9 +810,10 @@ nmea_receive(
ZERO(tofs);
ZERO(date);
ZERO(gpsw);
- sentence = 0;
- rc_date = 0;
- rc_time = 0;
+ sentence = 0; // Should never be needed.
+ rc_date = 0; // Should never be needed.
+ rc_time = 0; // Should never be needed.
+
/*
* Read the timecode and timestamp, then initialise field
* processing. The <CR><LF> at the NMEA line end is translated
diff --git a/contrib/ntp/ntpd/refclock_palisade.c b/contrib/ntp/ntpd/refclock_palisade.c
index 0520311d1bc7..921c815ce163 100644
--- a/contrib/ntp/ntpd/refclock_palisade.c
+++ b/contrib/ntp/ntpd/refclock_palisade.c
@@ -218,7 +218,7 @@ init_thunderbolt (
struct packettx tx;
tx.size = 0;
- tx.data = (u_char *) malloc(100);
+ tx.data = (u_char *) emalloc(100);
/* set UTC time */
sendsupercmd (&tx, 0x8E, 0xA2);
@@ -246,7 +246,7 @@ init_acutime (
struct packettx tx;
tx.size = 0;
- tx.data = (u_char *) malloc(100);
+ tx.data = (u_char *) emalloc(100);
sendsupercmd(&tx, 0x8E, 0xA5);
sendbyte(&tx, 0x02);
diff --git a/contrib/ntp/ntpd/refclock_parse.c b/contrib/ntp/ntpd/refclock_parse.c
index 147a462231dd..8e9059573677 100644
--- a/contrib/ntp/ntpd/refclock_parse.c
+++ b/contrib/ntp/ntpd/refclock_parse.c
@@ -2587,6 +2587,9 @@ parsestate(
i++;
}
t = ap(buffer, size, t, ")");
+ /* t is unused here, but if we don't track it and
+ * need it later, that's a bug waiting to happen.
+ */
}
return buffer;
}
diff --git a/contrib/ntp/ntpd/refclock_wwv.c b/contrib/ntp/ntpd/refclock_wwv.c
index 79c0afd5bcfb..2736cfa32fd7 100644
--- a/contrib/ntp/ntpd/refclock_wwv.c
+++ b/contrib/ntp/ntpd/refclock_wwv.c
@@ -2241,6 +2241,7 @@ wwv_tsec(
temp = carry(&up->decvec[HR]);
if (temp == 0)
temp = carry(&up->decvec[HR + 1]);
+ // XXX: Does temp have an expected value here?
/*
* Decode the current minute and day. Set leap day if the
@@ -2271,7 +2272,7 @@ wwv_tsec(
if (minute != 1440)
return;
- minute = 0;
+ // minute = 0;
while (carry(&up->decvec[HR]) != 0); /* advance to minute 0 */
while (carry(&up->decvec[HR + 1]) != 0);
day++;
@@ -2280,6 +2281,7 @@ wwv_tsec(
temp = carry(&up->decvec[DA + 1]);
if (temp == 0)
temp = carry(&up->decvec[DA + 2]);
+ // XXX: Is there an expected value of temp here?
/*
* Roll the year if this the first day and propagate carries
@@ -2288,7 +2290,7 @@ wwv_tsec(
if (day != (isleap ? 365 : 366))
return;
- day = 1;
+ // day = 1;
while (carry(&up->decvec[DA]) != 1); /* advance to day 1 */
while (carry(&up->decvec[DA + 1]) != 0);
while (carry(&up->decvec[DA + 2]) != 0);
diff --git a/contrib/ntp/ntpdate/Makefile.in b/contrib/ntp/ntpdate/Makefile.in
index feae7e4c7443..79f52514ecd9 100644
--- a/contrib/ntp/ntpdate/Makefile.in
+++ b/contrib/ntp/ntpdate/Makefile.in
@@ -122,6 +122,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -229,6 +230,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -237,6 +239,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -298,6 +301,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/ntpdate/ntpdate.c b/contrib/ntp/ntpdate/ntpdate.c
index 08edc8be4a7f..9831929c490b 100644
--- a/contrib/ntp/ntpdate/ntpdate.c
+++ b/contrib/ntp/ntpdate/ntpdate.c
@@ -149,7 +149,7 @@ int unpriv_port = 0;
/*
* Program name.
*/
-char *progname;
+char const *progname;
/*
* Systemwide parameters and flags
diff --git a/contrib/ntp/ntpdc/Makefile.in b/contrib/ntp/ntpdc/Makefile.in
index be8cd5578412..c85588e8c346 100644
--- a/contrib/ntp/ntpdc/Makefile.in
+++ b/contrib/ntp/ntpdc/Makefile.in
@@ -123,6 +123,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -269,6 +270,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -277,6 +279,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -338,6 +341,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/ntpdc/invoke-ntpdc.texi b/contrib/ntp/ntpdc/invoke-ntpdc.texi
index 253b8ae55327..014606903f50 100644
--- a/contrib/ntp/ntpdc/invoke-ntpdc.texi
+++ b/contrib/ntp/ntpdc/invoke-ntpdc.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:31:05 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:38:54 PM by AutoGen 5.18.5
# 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.8p3
+ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p4
Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/contrib/ntp/ntpdc/ntpdc-opts.c b/contrib/ntp/ntpdc/ntpdc-opts.c
index 3e68aa2c14da..6b4617aa969e 100644
--- a/contrib/ntp/ntpdc/ntpdc-opts.c
+++ b/contrib/ntp/ntpdc/ntpdc-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed June 29, 2015 at 04:30:51 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:38:40 PM by AutoGen 5.18.5
* 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.8p3\n"
+/* 0 */ "ntpdc 4.2.8p4\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.8p3\n"
+/* 1716 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p4\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.8p3";
+/* 1897 */ "ntpdc 4.2.8p4";
/**
* ipv4 option description with
@@ -796,7 +796,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdcOptions.pzCopyright */
- puts(_("ntpdc 4.2.8p3\n\
+ puts(_("ntpdc 4.2.8p4\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.8p3\n\
+ puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p4\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpdcOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpdcOptions.pzFullVersion */
- puts(_("ntpdc 4.2.8p3"));
+ puts(_("ntpdc 4.2.8p4"));
/* referenced via ntpdcOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpdc/ntpdc-opts.h b/contrib/ntp/ntpdc/ntpdc-opts.h
index e4965a0c46cb..d2494fef0a0b 100644
--- a/contrib/ntp/ntpdc/ntpdc-opts.h
+++ b/contrib/ntp/ntpdc/ntpdc-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed June 29, 2015 at 04:30:50 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:38:39 PM by AutoGen 5.18.5
* 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.8p3"
+#define NTPDC_VERSION "4.2.8p4"
/** Full ntpdc version text */
-#define NTPDC_FULL_VERSION "ntpdc 4.2.8p3"
+#define NTPDC_FULL_VERSION "ntpdc 4.2.8p4"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpdc/ntpdc.1ntpdcman b/contrib/ntp/ntpdc/ntpdc.1ntpdcman
index cbc58d096661..71fd5452daaa 100644
--- a/contrib/ntp/ntpdc/ntpdc.1ntpdcman
+++ b/contrib/ntp/ntpdc/ntpdc.1ntpdcman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc 1ntpdcman "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH ntpdc 1ntpdcman "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-91aOeF/ag-i2aGdF)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Gvay7L/ag-Svaq6L)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:01 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:51 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc b/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
index 534a6d45bc0e..ff7656c9f7bf 100644
--- a/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
+++ b/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPDC 1ntpdcmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:08 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:57 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpdc/ntpdc.c b/contrib/ntp/ntpdc/ntpdc.c
index ce35bd4e2308..ab177885b9a5 100644
--- a/contrib/ntp/ntpdc/ntpdc.c
+++ b/contrib/ntp/ntpdc/ntpdc.c
@@ -240,7 +240,7 @@ static FILE *current_output;
*/
extern struct xcmd opcmds[];
-char *progname;
+char const *progname;
#ifdef NO_MAIN_ALLOWED
CALL(ntpdc,"ntpdc",ntpdcmain);
@@ -1443,7 +1443,7 @@ getnetnum(
LENHOSTNAME, NULL, 0, 0);
return 1;
} else if (getaddrinfo(hname, "ntp", &hints, &ai) == 0) {
- NTP_INSIST(sizeof(*num) >= ai->ai_addrlen);
+ INSIST(sizeof(*num) >= ai->ai_addrlen);
memcpy(num, ai->ai_addr, ai->ai_addrlen);
if (fullhost != NULL) {
if (ai->ai_canonname != NULL)
diff --git a/contrib/ntp/ntpdc/ntpdc.html b/contrib/ntp/ntpdc/ntpdc.html
index 34cfcc1bf55c..cc552cae32af 100644
--- a/contrib/ntp/ntpdc/ntpdc.html
+++ b/contrib/ntp/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.8p3 of <code>ntpdc</code>.
+ <p>This document applies to version 4.2.8p4 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.8p3
+<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p4
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/contrib/ntp/ntpdc/ntpdc.man.in b/contrib/ntp/ntpdc/ntpdc.man.in
index 84266fb2ffeb..f5df74457f20 100644
--- a/contrib/ntp/ntpdc/ntpdc.man.in
+++ b/contrib/ntp/ntpdc/ntpdc.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc @NTPDC_MS@ "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH ntpdc @NTPDC_MS@ "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-91aOeF/ag-i2aGdF)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Gvay7L/ag-Svaq6L)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:01 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:51 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/ntpdc/ntpdc.mdoc.in b/contrib/ntp/ntpdc/ntpdc.mdoc.in
index 649e8956c09a..5a6e29244b30 100644
--- a/contrib/ntp/ntpdc/ntpdc.mdoc.in
+++ b/contrib/ntp/ntpdc/ntpdc.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPDC @NTPDC_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:08 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:57 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpq/Makefile.in b/contrib/ntp/ntpq/Makefile.in
index 39b1b65a2f9e..c93c677bbc9d 100644
--- a/contrib/ntp/ntpq/Makefile.in
+++ b/contrib/ntp/ntpq/Makefile.in
@@ -124,6 +124,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -277,6 +278,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -285,6 +287,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -346,6 +349,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/ntpq/invoke-ntpq.texi b/contrib/ntp/ntpq/invoke-ntpq.texi
index 7c28d922a029..fa0f5d7db7a9 100644
--- a/contrib/ntp/ntpq/invoke-ntpq.texi
+++ b/contrib/ntp/ntpq/invoke-ntpq.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:31:39 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:39:27 PM by AutoGen 5.18.5
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -847,7 +847,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.8p3
+ntpq - standard NTP query program - Ver. 4.2.8p4
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/contrib/ntp/ntpq/libntpq.h b/contrib/ntp/ntpq/libntpq.h
index 82a874093c9b..84a622bba642 100644
--- a/contrib/ntp/ntpq/libntpq.h
+++ b/contrib/ntp/ntpq/libntpq.h
@@ -36,7 +36,7 @@
#define NTP_STATUS_INVALID 0
#define NTP_STATUS_FALSETICKER 1
#define NTP_STATUS_EXCESS 2
-#define NTP_STATUS_OUTLYER 3
+#define NTP_STATUS_OUTLIER 3
#define NTP_STATUS_CANDIDATE 4
#define NTP_STATUS_SELECTED 5
#define NTP_STATUS_SYSPEER 6
diff --git a/contrib/ntp/ntpq/ntpq-opts.c b/contrib/ntp/ntpq/ntpq-opts.c
index 798a0cdb34b9..223292878ec5 100644
--- a/contrib/ntp/ntpq/ntpq-opts.c
+++ b/contrib/ntp/ntpq/ntpq-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed June 29, 2015 at 04:31:10 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:39:00 PM by AutoGen 5.18.5
* 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.8p3\n"
+/* 0 */ "ntpq 4.2.8p4\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.8p3\n"
+/* 1744 */ "ntpq - standard NTP query program - Ver. 4.2.8p4\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.8p3";
+/* 1912 */ "ntpq 4.2.8p4";
/**
* ipv4 option description with
@@ -786,7 +786,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpqOptions.pzCopyright */
- puts(_("ntpq 4.2.8p3\n\
+ puts(_("ntpq 4.2.8p4\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.8p3\n\
+ puts(_("ntpq - standard NTP query program - Ver. 4.2.8p4\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */
- puts(_("ntpq 4.2.8p3"));
+ puts(_("ntpq 4.2.8p4"));
/* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpq/ntpq-opts.h b/contrib/ntp/ntpq/ntpq-opts.h
index fecb970f9dd4..f82ccae8a31c 100644
--- a/contrib/ntp/ntpq/ntpq-opts.h
+++ b/contrib/ntp/ntpq/ntpq-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed June 29, 2015 at 04:31:10 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:39:00 PM by AutoGen 5.18.5
* 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.8p3"
+#define NTPQ_VERSION "4.2.8p4"
/** Full ntpq version text */
-#define NTPQ_FULL_VERSION "ntpq 4.2.8p3"
+#define NTPQ_FULL_VERSION "ntpq 4.2.8p4"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpq/ntpq-subs.c b/contrib/ntp/ntpq/ntpq-subs.c
index c6478701eb27..78143b3510ee 100644
--- a/contrib/ntp/ntpq/ntpq-subs.c
+++ b/contrib/ntp/ntpq/ntpq-subs.c
@@ -1202,7 +1202,7 @@ printassoc(
break;
case CTL_PST_SEL_SELCAND:
- condition = "outlyer";
+ condition = "outlier";
break;
case CTL_PST_SEL_SYNCCAND:
@@ -2387,7 +2387,7 @@ add_mru(
}
UNLINK_DLIST(mon, mlink);
UNLINK_SLIST(unlinked, hash_table[hash], mon, hlink, mru);
- NTP_INSIST(unlinked == mon);
+ INSIST(unlinked == mon);
mru_dupes++;
TRACE(2, ("(updated from %08x.%08x) ", mon->last.l_ui,
mon->last.l_uf));
@@ -2482,7 +2482,7 @@ collect_mru_list(
mru_count = 0;
INIT_DLIST(mru_list, mlink);
cb = NTP_HASH_SIZE * sizeof(*hash_table);
- NTP_INSIST(NULL == hash_table);
+ INSIST(NULL == hash_table);
hash_table = emalloc_zero(cb);
c_mru_l_rc = FALSE;
@@ -2526,7 +2526,7 @@ collect_mru_list(
ri);
while (ri--) {
recent = HEAD_DLIST(mru_list, mlink);
- NTP_INSIST(recent != NULL);
+ INSIST(recent != NULL);
if (debug)
fprintf(stderr,
"tossing prior entry %s to resync\n",
@@ -2535,7 +2535,7 @@ collect_mru_list(
hash = NTP_HASH_ADDR(&recent->addr);
UNLINK_SLIST(unlinked, hash_table[hash],
recent, hlink, mru);
- NTP_INSIST(unlinked == recent);
+ INSIST(unlinked == recent);
free(recent);
mru_count--;
}
@@ -2777,7 +2777,7 @@ collect_mru_list(
if (have_now)
list_complete = TRUE;
if (list_complete) {
- NTP_INSIST(0 == ri || have_addr_older);
+ INSIST(0 == ri || have_addr_older);
}
if (mrulist_interrupted) {
printf("mrulist retrieval interrupted by operator.\n"
@@ -3145,13 +3145,13 @@ mrulist(
ppentry = sorted;
if (MRUSORT_R_DEF != order) {
ITER_DLIST_BEGIN(mru_list, recent, mlink, mru)
- NTP_INSIST(ppentry < sorted + mru_count);
+ INSIST(ppentry < sorted + mru_count);
*ppentry = recent;
ppentry++;
ITER_DLIST_END()
} else {
REV_ITER_DLIST_BEGIN(mru_list, recent, mlink, mru)
- NTP_INSIST(ppentry < sorted + mru_count);
+ INSIST(ppentry < sorted + mru_count);
*ppentry = recent;
ppentry++;
REV_ITER_DLIST_END()
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqman b/contrib/ntp/ntpq/ntpq.1ntpqman
index afdd8cbecdbe..b4e45b2d9b8d 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqman
+++ b/contrib/ntp/ntpq/ntpq.1ntpqman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH ntpq 1ntpqman "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6GaipG/ag-fHaaoG)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-joa4fN/ag-voaWeN)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:32 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:39:23 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqmdoc b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
index 4ed69cf03e4c..8239434576f7 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqmdoc
+++ b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPQ 1ntpqmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:41 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:39:29 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpq/ntpq.c b/contrib/ntp/ntpq/ntpq.c
index af5f6815c4f8..c8d5eced800d 100644
--- a/contrib/ntp/ntpq/ntpq.c
+++ b/contrib/ntp/ntpq/ntpq.c
@@ -405,7 +405,7 @@ FILE *current_output;
*/
extern struct xcmd opcmds[];
-char *progname;
+char const *progname;
#ifdef NO_MAIN_ALLOWED
#ifndef BUILD_AS_LIB
@@ -489,7 +489,7 @@ ntpqmain(
builtins[icmd].desc[0] = "md5";
fmt = "set key type to use for authenticated requests (%s)";
#endif
- msg = malloc(strlen(fmt) + strlen(list) - strlen("%s") +1);
+ msg = emalloc(strlen(fmt) + strlen(list) - strlen("%s") +1);
sprintf(msg, fmt, list);
builtins[icmd].comment = msg;
free(list);
@@ -3206,7 +3206,6 @@ tstflags(
register const char *sep;
sep = "";
- i = 0;
s = cp = circ_buf[nextcb];
if (++nextcb >= NUMCB)
nextcb = 0;
@@ -3362,12 +3361,17 @@ cookedprint(
}
if (output_raw != 0) {
+ /* TALOS-CAN-0063: avoid buffer overrun */
atoascii(name, MAXVARLEN, bn, sizeof(bn));
- atoascii(value, MAXVALLEN, bv, sizeof(bv));
if (output_raw != '*') {
+ atoascii(value, MAXVALLEN,
+ bv, sizeof(bv) - 1);
len = strlen(bv);
bv[len] = output_raw;
bv[len+1] = '\0';
+ } else {
+ atoascii(value, MAXVALLEN,
+ bv, sizeof(bv));
}
output(fp, bn, bv);
}
@@ -3503,7 +3507,7 @@ static void list_md_fn(const EVP_MD *m, const char *from, const char *to, void *
if (!strcmp(*seen, name))
return;
n = (seen - hstate->seen) + 2;
- hstate->seen = realloc(hstate->seen, n * sizeof(*seen));
+ hstate->seen = erealloc(hstate->seen, n * sizeof(*seen));
hstate->seen[n-2] = name;
hstate->seen[n-1] = NULL;
@@ -3521,10 +3525,10 @@ static void list_md_fn(const EVP_MD *m, const char *from, const char *to, void *
len += (hstate->idx >= K_PER_LINE)? strlen(K_NL_PFX_STR): strlen(K_DELIM_STR);
if (hstate->list == NULL) {
- hstate->list = (char *)malloc(len);
+ hstate->list = (char *)emalloc(len);
hstate->list[0] = '\0';
} else
- hstate->list = (char *)realloc(hstate->list, len);
+ hstate->list = (char *)erealloc(hstate->list, len);
sprintf(hstate->list + strlen(hstate->list), "%s%s",
((hstate->idx >= K_PER_LINE)? K_NL_PFX_STR : K_DELIM_STR),
@@ -3545,18 +3549,18 @@ static char *list_digest_names(void)
# ifdef HAVE_EVP_MD_DO_ALL_SORTED
struct hstate hstate = { NULL, NULL, K_PER_LINE+1 };
- hstate.seen = (const char **)calloc(1, sizeof( const char * ));
+ hstate.seen = (const char **) emalloc_zero(1*sizeof( const char * )); // replaces -> calloc(1, sizeof( const char * ));
INIT_SSL();
EVP_MD_do_all_sorted(list_md_fn, &hstate);
list = hstate.list;
free(hstate.seen);
# else
- list = (char *)malloc(sizeof("md5, others (upgrade to OpenSSL-1.0 for full list)"));
+ list = (char *)emalloc(sizeof("md5, others (upgrade to OpenSSL-1.0 for full list)"));
strcpy(list, "md5, others (upgrade to OpenSSL-1.0 for full list)");
# endif
#else
- list = (char *)malloc(sizeof("md5"));
+ list = (char *)emalloc(sizeof("md5"));
strcpy(list, "md5");
#endif
diff --git a/contrib/ntp/ntpq/ntpq.html b/contrib/ntp/ntpq/ntpq.html
index e567419f6ed0..e2c37404912e 100644
--- a/contrib/ntp/ntpq/ntpq.html
+++ b/contrib/ntp/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.8p3 of <code>ntpq</code>.
+ <p>This document applies to version 4.2.8p4 of <code>ntpq</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
@@ -769,7 +769,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.8p3-RC3
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p4-sec-RC2
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/contrib/ntp/ntpq/ntpq.man.in b/contrib/ntp/ntpq/ntpq.man.in
index 7d5dcd32f4bf..0c0af5b902b4 100644
--- a/contrib/ntp/ntpq/ntpq.man.in
+++ b/contrib/ntp/ntpq/ntpq.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH ntpq @NTPQ_MS@ "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6GaipG/ag-fHaaoG)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-joa4fN/ag-voaWeN)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:32 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:39:23 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/ntpq/ntpq.mdoc.in b/contrib/ntp/ntpq/ntpq.mdoc.in
index 69c28e4acf59..2b20ddc5bb08 100644
--- a/contrib/ntp/ntpq/ntpq.mdoc.in
+++ b/contrib/ntp/ntpq/ntpq.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPQ @NTPQ_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:41 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:39:29 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpsnmpd/Makefile.in b/contrib/ntp/ntpsnmpd/Makefile.in
index 34a267f6e992..7b7f56628076 100644
--- a/contrib/ntp/ntpsnmpd/Makefile.in
+++ b/contrib/ntp/ntpsnmpd/Makefile.in
@@ -122,6 +122,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -263,6 +264,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -271,6 +273,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -332,6 +335,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi b/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
index c38de6ecba11..ac8e69c19fea 100644
--- a/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
+++ b/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsnmpd.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:31:53 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:39:43 PM by AutoGen 5.18.5
# 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.8p3
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p4
Usage: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-n no nofork Do not fork
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
index dbad371a1409..01013fb8fa0d 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
*
- * It has been AutoGen-ed June 29, 2015 at 04:31:44 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:39:32 PM by AutoGen 5.18.5
* 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.8p3\n"
+/* 0 */ "ntpsnmpd 4.2.8p4\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.8p3\n"
+/* 1439 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p4\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.8p3";
+/* 1593 */ "ntpsnmpd 4.2.8p4";
/**
* nofork option description:
@@ -554,7 +554,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpsnmpdOptions.pzCopyright */
- puts(_("ntpsnmpd 4.2.8p3\n\
+ puts(_("ntpsnmpd 4.2.8p4\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.8p3\n\
+ puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p4\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntpsnmpdOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpsnmpdOptions.pzFullVersion */
- puts(_("ntpsnmpd 4.2.8p3"));
+ puts(_("ntpsnmpd 4.2.8p4"));
/* referenced via ntpsnmpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
index c5000c85bcd6..07756dd5916e 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
*
- * It has been AutoGen-ed June 29, 2015 at 04:31:44 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:39:32 PM by AutoGen 5.18.5
* 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.8p3"
+#define NTPSNMPD_VERSION "4.2.8p4"
/** Full ntpsnmpd version text */
-#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p3"
+#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p4"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
index aaf0297c1af4..1a5dff3d6ea3 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd 1ntpsnmpdman "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH ntpsnmpd 1ntpsnmpdman "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_XaaxH/ag-lYa4vH)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Xna4nO/ag-9naWmO)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:50 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:39:39 PM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
index b93deaf4b9d5..e13b8165ddbd 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPSNMPD 1ntpsnmpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:56 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:39:45 PM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.html b/contrib/ntp/ntpsnmpd/ntpsnmpd.html
index 668eca6fed24..1ad4ffcd9eb5 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.html
+++ b/contrib/ntp/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.8p3 of <code>ntpsnmpd</code>.
+ <p>This document applies to version 4.2.8p4 of <code>ntpsnmpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpsnmpd-Description">ntpsnmpd Description</a>: Description
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in b/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
index 9db71b97f843..0da76ff3ff32 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd @NTPSNMPD_MS@ "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH ntpsnmpd @NTPSNMPD_MS@ "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_XaaxH/ag-lYa4vH)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Xna4nO/ag-9naWmO)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:50 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:39:39 PM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in b/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
index 343b1fa0fa80..d2cebc4525f8 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPSNMPD @NTPSNMPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:31:56 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:39:45 PM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/packageinfo.sh b/contrib/ntp/packageinfo.sh
index 444ad4de7109..1e0a2289df06 100644
--- a/contrib/ntp/packageinfo.sh
+++ b/contrib/ntp/packageinfo.sh
@@ -83,7 +83,7 @@ CLTAG=NTP_4_2_0
# - Numeric values increment
# - empty 'increments' to 1
# - NEW 'increments' to empty
-point=3
+point=4
### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint)
diff --git a/contrib/ntp/parseutil/Makefile.in b/contrib/ntp/parseutil/Makefile.in
index c550bd2c9ce5..a23d6e42bc34 100644
--- a/contrib/ntp/parseutil/Makefile.in
+++ b/contrib/ntp/parseutil/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -224,6 +225,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -232,6 +234,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -293,6 +296,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/scripts/Makefile.in b/contrib/ntp/scripts/Makefile.in
index 9fc296bcebe4..447a1b30cac4 100644
--- a/contrib/ntp/scripts/Makefile.in
+++ b/contrib/ntp/scripts/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -261,6 +262,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -269,6 +271,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -330,6 +333,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/scripts/build/Makefile.in b/contrib/ntp/scripts/build/Makefile.in
index 3d52e817de7d..d758d613fbf7 100644
--- a/contrib/ntp/scripts/build/Makefile.in
+++ b/contrib/ntp/scripts/build/Makefile.in
@@ -116,6 +116,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -166,6 +167,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -174,6 +176,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -235,6 +238,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/scripts/calc_tickadj/Makefile.in b/contrib/ntp/scripts/calc_tickadj/Makefile.in
index c1b6576b0289..c68c31dfd7ab 100644
--- a/contrib/ntp/scripts/calc_tickadj/Makefile.in
+++ b/contrib/ntp/scripts/calc_tickadj/Makefile.in
@@ -118,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -203,6 +204,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -211,6 +213,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -272,6 +275,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
index 8649b811be38..9057b89bb921 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
+++ b/contrib/ntp/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 "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-XJaWrs/ag-9Ja4qs)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-3baGnz/ag-dcaOmz)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:21 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:33:58 PM by AutoGen 5.18.5
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
index 79a1cc6d4523..9c1245b9cdb5 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:25 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:02 PM by AutoGen 5.18.5
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
index c0493a40df66..a88e28fc2da6 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
+++ b/contrib/ntp/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.8p3 of <code>calc_tickadj</code>.
+This document applies to version 4.2.8p4 of <code>calc_tickadj</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
index 8649b811be38..9057b89bb921 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
+++ b/contrib/ntp/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 "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-XJaWrs/ag-9Ja4qs)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-3baGnz/ag-dcaOmz)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:21 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:33:58 PM by AutoGen 5.18.5
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
index 79a1cc6d4523..9c1245b9cdb5 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:25 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:02 PM by AutoGen 5.18.5
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi b/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
index f1d7c71143cd..2c666341d9d4 100644
--- a/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
+++ b/contrib/ntp/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 June 29, 2015 at 04:26:27 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:04 PM by AutoGen 5.18.5
# From the definitions calc_tickadj-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
diff --git a/contrib/ntp/scripts/invoke-plot_summary.texi b/contrib/ntp/scripts/invoke-plot_summary.texi
index 09bb00bcb3c7..914c37b92e57 100644
--- a/contrib/ntp/scripts/invoke-plot_summary.texi
+++ b/contrib/ntp/scripts/invoke-plot_summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:27:09 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:48 PM by AutoGen 5.18.5
# 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.8p3
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p4
USAGE: plot_summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Where the summary files are
diff --git a/contrib/ntp/scripts/invoke-summary.texi b/contrib/ntp/scripts/invoke-summary.texi
index 41563725ad7b..dc0dca7313af 100644
--- a/contrib/ntp/scripts/invoke-summary.texi
+++ b/contrib/ntp/scripts/invoke-summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-summary.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:27:14 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:54 PM by AutoGen 5.18.5
# 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.8p3
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p4
USAGE: summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Directory containing stat files
diff --git a/contrib/ntp/scripts/lib/Makefile.in b/contrib/ntp/scripts/lib/Makefile.in
index 8b05f29af53e..4a416103364f 100644
--- a/contrib/ntp/scripts/lib/Makefile.in
+++ b/contrib/ntp/scripts/lib/Makefile.in
@@ -116,6 +116,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -194,6 +195,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -202,6 +204,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -263,6 +266,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/scripts/lib/NTP/Util.pm b/contrib/ntp/scripts/lib/NTP/Util.pm
index f37aeaa65446..69d4df1c93ae 100644
--- a/contrib/ntp/scripts/lib/NTP/Util.pm
+++ b/contrib/ntp/scripts/lib/NTP/Util.pm
@@ -139,7 +139,14 @@ sub ntp_sntp_line {
my @output = split / /;
$offset = $output[3];
- ($stratum = $output[7]) =~ s/s(\d{1,2})/$1/;
+ if (0) {
+ } elsif ($output[7] =~ /s(\d{1,2})/) {
+ $stratum = $1;
+ # warn "Found stratum at #7\n";
+ } elsif ($output[8] =~ /s(\d{1,2})/) {
+ $stratum = $1;
+ # warn "Found stratum at #8\n";
+ }
}
close $fh or croak "running sntp failed: $! (exit status $?)";
return ($offset, $stratum);
diff --git a/contrib/ntp/scripts/ntp-wait/Makefile.in b/contrib/ntp/scripts/ntp-wait/Makefile.in
index 9b0b1b64b8a7..a16d91fa727d 100644
--- a/contrib/ntp/scripts/ntp-wait/Makefile.in
+++ b/contrib/ntp/scripts/ntp-wait/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -202,6 +203,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -210,6 +212,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -271,6 +274,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi b/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
index 5d5948e7f325..f626f3380d2d 100644
--- a/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
+++ b/contrib/ntp/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 June 29, 2015 at 04:26:33 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:12 PM by AutoGen 5.18.5
# 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.8p3
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p4
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait-opts b/contrib/ntp/scripts/ntp-wait/ntp-wait-opts
index ebb947c56014..e2e2897bdacc 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait-opts
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntp-wait-opts)
#
-# It has been AutoGen-ed June 29, 2015 at 04:26:28 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:06 PM by AutoGen 5.18.5
# 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.8p3
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p4
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
index bc7fda666d75..5a0d3cc05d48 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
+++ b/contrib/ntp/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 "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH ntp-wait 1ntp-waitman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-OSaORt/ag-0SaWQt)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-fzaONA/ag-rzaWMA)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:30 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:08 PM by AutoGen 5.18.5
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
index 9149cfd53db1..aedeec86698c 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTP_WAIT 1ntp-waitmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:36 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:14 PM by AutoGen 5.18.5
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.html b/contrib/ntp/scripts/ntp-wait/ntp-wait.html
index e9c063b843be..1a9ca501e4c1 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.html
+++ b/contrib/ntp/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.8p3 of <code>ntp-wait</code>.
+ <p>This document applies to version 4.2.8p4 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.8p3
+<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p4
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/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in b/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
index b58a569975aa..12395fce25f4 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
+++ b/contrib/ntp/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@ "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH ntp-wait @NTP_WAIT_MS@ "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-OSaORt/ag-0SaWQt)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-fzaONA/ag-rzaWMA)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:30 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:08 PM by AutoGen 5.18.5
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in b/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
index 19e1bdff0e40..079828224896 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTP_WAIT @NTP_WAIT_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:36 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:14 PM by AutoGen 5.18.5
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntpsweep/Makefile.in b/contrib/ntp/scripts/ntpsweep/Makefile.in
index 0bfc785448e7..337340ca7fd8 100644
--- a/contrib/ntp/scripts/ntpsweep/Makefile.in
+++ b/contrib/ntp/scripts/ntpsweep/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -203,6 +204,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -211,6 +213,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -272,6 +275,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi b/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
index 810ca0817cc8..5a2112da9ae4 100644
--- a/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
+++ b/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:26:39 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:18 PM by AutoGen 5.18.5
# 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.8p3
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p4
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep-opts b/contrib/ntp/scripts/ntpsweep/ntpsweep-opts
index 7261dd9fecf2..54d7f0d38cbf 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep-opts
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntpsweep-opts)
#
-# It has been AutoGen-ed June 29, 2015 at 04:26:38 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:16 PM by AutoGen 5.18.5
# 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.8p3
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p4
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
index 60684d8509b6..66deebaac51c 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH ntpsweep 1ntpsweepman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-JEaGhv/ag-VEaOgv)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-kqaGdC/ag-xqaOcC)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:42 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:20 PM by AutoGen 5.18.5
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
index d3016a9c2744..a0f7e8738ae9 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:45 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:23 PM by AutoGen 5.18.5
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.html b/contrib/ntp/scripts/ntpsweep/ntpsweep.html
index c47d36f2a74a..fed2e2a237f6 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.html
+++ b/contrib/ntp/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.8p3 of <code>ntpsweep</code>.
+ <p>This document applies to version 4.2.8p4 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.8p3
+<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p4
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/contrib/ntp/scripts/ntpsweep/ntpsweep.in b/contrib/ntp/scripts/ntpsweep/ntpsweep.in
index fed35d17e1f0..75ac0c8b06d9 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.in
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.in
@@ -138,7 +138,8 @@ sub scan_host {
# got answers ? If so, go on.
if ($daemonversion) {
if ($showpeers) {
- my @peers_tmp = ntp_peers($host);
+ my $peers_ref = ntp_peers($host);
+ my @peers_tmp = @$peers_ref;
for (@peers_tmp) {
$_->{remote} =~ s/^(?: |x|\.|-|\+|#|\*|o)([^ ]+)/$1/;
push @peers, $_->{remote};
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in b/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
index 60684d8509b6..66deebaac51c 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH ntpsweep 1ntpsweepman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-JEaGhv/ag-VEaOgv)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-kqaGdC/ag-xqaOcC)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:42 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:20 PM by AutoGen 5.18.5
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in b/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
index d3016a9c2744..a0f7e8738ae9 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:45 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:23 PM by AutoGen 5.18.5
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntptrace/Makefile.in b/contrib/ntp/scripts/ntptrace/Makefile.in
index b31083d77d17..f8d36ce3ac2b 100644
--- a/contrib/ntp/scripts/ntptrace/Makefile.in
+++ b/contrib/ntp/scripts/ntptrace/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -202,6 +203,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -210,6 +212,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -271,6 +274,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi b/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
index d55d602a740a..4360728a6f9c 100644
--- a/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
+++ b/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:26:52 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:30 PM by AutoGen 5.18.5
# 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.8p3
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p4
USAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace-opts b/contrib/ntp/scripts/ntptrace/ntptrace-opts
index 679f109f18c6..d6dbc53330af 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace-opts
+++ b/contrib/ntp/scripts/ntptrace/ntptrace-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntptrace-opts)
#
-# It has been AutoGen-ed June 29, 2015 at 04:26:46 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:25 PM by AutoGen 5.18.5
# 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.8p3
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p4
USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
index daf73a9dcf1a..c2362b7a0886 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace 1ntptraceman "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH ntptrace 1ntptraceman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-RjaOzw/ag-3jaWyw)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-h.aOvD/ag-u.aWuD)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:48 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:27 PM by AutoGen 5.18.5
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
index ae25afae9510..1734bcc7eb08 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPTRACE 1ntptracemdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:54 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:32 PM by AutoGen 5.18.5
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.html b/contrib/ntp/scripts/ntptrace/ntptrace.html
index 0012517fc639..4a4b7464d7f0 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.html
+++ b/contrib/ntp/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.8p3 of <code>ntptrace</code>.
+This document applies to version 4.2.8p4 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.8p3
+<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p4
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/contrib/ntp/scripts/ntptrace/ntptrace.man.in b/contrib/ntp/scripts/ntptrace/ntptrace.man.in
index 56db22ae68eb..5aca4557c162 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.man.in
+++ b/contrib/ntp/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@ "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH ntptrace @NTPTRACE_MS@ "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-RjaOzw/ag-3jaWyw)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-h.aOvD/ag-u.aWuD)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:48 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:27 PM by AutoGen 5.18.5
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in b/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
index 6e5a75aa5f92..34be2a550473 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTPTRACE @NTPTRACE_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:54 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:32 PM by AutoGen 5.18.5
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/plot_summary-opts b/contrib/ntp/scripts/plot_summary-opts
index 05149f8b2a14..2cb86c41d92c 100644
--- a/contrib/ntp/scripts/plot_summary-opts
+++ b/contrib/ntp/scripts/plot_summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (plot_summary-opts)
#
-# It has been AutoGen-ed June 29, 2015 at 04:27:05 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:45 PM by AutoGen 5.18.5
# 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.8p3
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p4
USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Where the summary files are
diff --git a/contrib/ntp/scripts/plot_summary.1plot_summaryman b/contrib/ntp/scripts/plot_summary.1plot_summaryman
index 8abc2f285560..fea03df8f7cf 100644
--- a/contrib/ntp/scripts/plot_summary.1plot_summaryman
+++ b/contrib/ntp/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 "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH plot_summary 1plot_summaryman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-8Laipz/ag-iMaqoz)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-EXaylG/ag-RXaGkG)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:11 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:51 PM by AutoGen 5.18.5
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/plot_summary.1plot_summarymdoc b/contrib/ntp/scripts/plot_summary.1plot_summarymdoc
index 3971b7439d0e..0eff78f7dae4 100644
--- a/contrib/ntp/scripts/plot_summary.1plot_summarymdoc
+++ b/contrib/ntp/scripts/plot_summary.1plot_summarymdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:13 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:53 PM by AutoGen 5.18.5
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/plot_summary.html b/contrib/ntp/scripts/plot_summary.html
index 360bdc72fe2f..7f0a594fccf6 100644
--- a/contrib/ntp/scripts/plot_summary.html
+++ b/contrib/ntp/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.8p3 of <code>plot_summary</code>.
+This document applies to version 4.2.8p4 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.8p3
+<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p4
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/contrib/ntp/scripts/plot_summary.man.in b/contrib/ntp/scripts/plot_summary.man.in
index 8abc2f285560..fea03df8f7cf 100644
--- a/contrib/ntp/scripts/plot_summary.man.in
+++ b/contrib/ntp/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 "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH plot_summary 1plot_summaryman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-8Laipz/ag-iMaqoz)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-EXaylG/ag-RXaGkG)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:11 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:51 PM by AutoGen 5.18.5
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/plot_summary.mdoc.in b/contrib/ntp/scripts/plot_summary.mdoc.in
index 3971b7439d0e..0eff78f7dae4 100644
--- a/contrib/ntp/scripts/plot_summary.mdoc.in
+++ b/contrib/ntp/scripts/plot_summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:13 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:53 PM by AutoGen 5.18.5
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/summary-opts b/contrib/ntp/scripts/summary-opts
index 166c01ef2204..22f2c49ab409 100644
--- a/contrib/ntp/scripts/summary-opts
+++ b/contrib/ntp/scripts/summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (summary-opts)
#
-# It has been AutoGen-ed June 29, 2015 at 04:27:07 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:47 PM by AutoGen 5.18.5
# 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.8p3
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p4
USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Directory containing stat files
diff --git a/contrib/ntp/scripts/summary.1summaryman b/contrib/ntp/scripts/summary.1summaryman
index ab116d524271..65b0eecdcd2f 100644
--- a/contrib/ntp/scripts/summary.1summaryman
+++ b/contrib/ntp/scripts/summary.1summaryman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH summary 1summaryman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-B9aWCz/ag-N9a4Bz)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-ghaazG/ag-shaiyG)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:16 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:56 PM by AutoGen 5.18.5
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/summary.1summarymdoc b/contrib/ntp/scripts/summary.1summarymdoc
index 4539660fd584..8bb1dfbba73f 100644
--- a/contrib/ntp/scripts/summary.1summarymdoc
+++ b/contrib/ntp/scripts/summary.1summarymdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:18 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:58 PM by AutoGen 5.18.5
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/summary.html b/contrib/ntp/scripts/summary.html
index 68d1e2343cde..13299056df17 100644
--- a/contrib/ntp/scripts/summary.html
+++ b/contrib/ntp/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.8p3 of <code>summary</code>.
+This document applies to version 4.2.8p4 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.8p3
+<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p4
USAGE: summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
--directory=str Directory containing stat files
diff --git a/contrib/ntp/scripts/summary.man.in b/contrib/ntp/scripts/summary.man.in
index ab116d524271..65b0eecdcd2f 100644
--- a/contrib/ntp/scripts/summary.man.in
+++ b/contrib/ntp/scripts/summary.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH summary 1summaryman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-B9aWCz/ag-N9a4Bz)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-ghaazG/ag-shaiyG)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:16 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:56 PM by AutoGen 5.18.5
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/summary.mdoc.in b/contrib/ntp/scripts/summary.mdoc.in
index 4539660fd584..8bb1dfbba73f 100644
--- a/contrib/ntp/scripts/summary.mdoc.in
+++ b/contrib/ntp/scripts/summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:18 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:58 PM by AutoGen 5.18.5
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/update-leap/Makefile.in b/contrib/ntp/scripts/update-leap/Makefile.in
index e23edffdb934..dc4f56814866 100644
--- a/contrib/ntp/scripts/update-leap/Makefile.in
+++ b/contrib/ntp/scripts/update-leap/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -203,6 +204,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -211,6 +213,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -272,6 +275,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/scripts/update-leap/invoke-update-leap.texi b/contrib/ntp/scripts/update-leap/invoke-update-leap.texi
index 99babde7d322..da6df52f0269 100644
--- a/contrib/ntp/scripts/update-leap/invoke-update-leap.texi
+++ b/contrib/ntp/scripts/update-leap/invoke-update-leap.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-update-leap.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:26:59 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:38 PM by AutoGen 5.18.5
# From the definitions update-leap-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
diff --git a/contrib/ntp/scripts/update-leap/update-leap-opts b/contrib/ntp/scripts/update-leap/update-leap-opts
index cd5fdea0203e..debf333392e2 100644
--- a/contrib/ntp/scripts/update-leap/update-leap-opts
+++ b/contrib/ntp/scripts/update-leap/update-leap-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (update-leap-opts)
#
-# It has been AutoGen-ed June 29, 2015 at 04:27:05 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:34:44 PM by AutoGen 5.18.5
# From the definitions update-leap-opts.def
# and the template file perlopt
@@ -46,7 +46,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-update-leap - leap-seconds file manager/updater - Ver. 4.2.8p3
+update-leap - leap-seconds file manager/updater - Ver. 4.2.8p4
USAGE: update-leap [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-s, --source-url=str The URL of the master copy of the leapseconds file
diff --git a/contrib/ntp/scripts/update-leap/update-leap.1update-leapman b/contrib/ntp/scripts/update-leap/update-leap.1update-leapman
index 620b8ad47209..dbe113c7857f 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.1update-leapman
+++ b/contrib/ntp/scripts/update-leap/update-leap.1update-leapman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH update-leap 1update-leapman "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH update-leap 1update-leapman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-h5aqpx/ag-t5ayox)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-tXaylE/ag-FXaGkE)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:56 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:34 PM by AutoGen 5.18.5
.\" From the definitions update-leap-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc b/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
index 4b07ff003a26..cfbe34a74884 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
+++ b/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt UPDATE_LEAP 1update-leapmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:03 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:42 PM by AutoGen 5.18.5
.\" From the definitions update-leap-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.html b/contrib/ntp/scripts/update-leap/update-leap.html
index 21bb294651aa..bea57b8c794c 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.html
+++ b/contrib/ntp/scripts/update-leap/update-leap.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>update-leap</code> program.
- <p>This document applies to version 4.2.8p3 of <code>update-leap</code>.
+ <p>This document applies to version 4.2.8p4 of <code>update-leap</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/contrib/ntp/scripts/update-leap/update-leap.man.in b/contrib/ntp/scripts/update-leap/update-leap.man.in
index 620b8ad47209..dbe113c7857f 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.man.in
+++ b/contrib/ntp/scripts/update-leap/update-leap.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH update-leap 1update-leapman "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH update-leap 1update-leapman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-h5aqpx/ag-t5ayox)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-tXaylE/ag-FXaGkE)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:26:56 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:34 PM by AutoGen 5.18.5
.\" From the definitions update-leap-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.mdoc.in b/contrib/ntp/scripts/update-leap/update-leap.mdoc.in
index 4b07ff003a26..cfbe34a74884 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.mdoc.in
+++ b/contrib/ntp/scripts/update-leap/update-leap.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt UPDATE_LEAP 1update-leapmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:27:03 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:34:42 PM by AutoGen 5.18.5
.\" From the definitions update-leap-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/sntp/Makefile.am b/contrib/ntp/sntp/Makefile.am
index dfd303a72077..5c30fc27d674 100644
--- a/contrib/ntp/sntp/Makefile.am
+++ b/contrib/ntp/sntp/Makefile.am
@@ -38,27 +38,13 @@ bin_PROGRAMS = @SNTP_DB@
libexec_PROGRAMS = @SNTP_DL@
sbin_PROGRAMS = @SNTP_DS@
-##
-## DIST_SUBDIRS is typically automatically derived by automake including
-## all possible SUBDIRS values, as even items which are not built are
-## typically distributed.
-##
-## To allow us to avoid configuring the libevent tearoff entirely when
-## it is not needed, we define DIST_SUBDIRS manually excluding libevent
-## when not building it, and in that case arrange for its distribution
-## with EXTRA_DIST copying the entire directory and libevent-dist-hook
-## cleaning unwanted VCS remnants.
-##
-## When we are building libevent, it is distributed conventionally, by
-## recursive make dist in sntp including libevent.
-##
-
SUBDIRS = include scripts unity
-DIST_SUBDIRS = include scripts unity
+DIST_FAIL =
if BUILD_LIBEVENT
SUBDIRS += libevent
-DIST_SUBDIRS += libevent
+else
+DIST_FAIL += "--enable-local-libevent"
endif
if NEED_LIBOPTS
@@ -70,8 +56,6 @@ noinst_LIBRARIES = libsntp.a
SUBDIRS += tests
endif
-DIST_SUBDIRS += libopts tests
-
libsntp_a_SOURCES = \
crypto.c \
kod_management.c \
@@ -94,7 +78,6 @@ noinst_HEADERS = \
main.h \
networking.h \
sntp-opts.h \
- tests_main.h \
utilities.h \
$(NULL)
@@ -285,11 +268,19 @@ $(srcdir)/sntp.html: $(srcdir)/invoke-sntp.menu $(srcdir)/invoke-sntp.texi $(src
libtool: $(LIBTOOL_DEPS)
./config.status --recheck
-libevent-dist-hook:
- if test -n "$(NTP_FORCE_LIBEVENT_DIST)" ; then rm -rf $(distdir)/libevent/autom4te.cache $(distdir)/libevent/config.h.in~ ; find $(distdir)/libevent -type d -name SCCS -print | xargs rm -rf ; fi
-
-dist-hook: libevent-dist-hook
- @: do-nothing action to avoid default SCCS get
+# HMS: libevent/ is a target if it's in EXTRA_DIST via NTP_FORCE_LIBEVENT_DIST.
+# Note that libevent/ is already in DIST_SUBDIRS (implicit in Makefile.am
+# but explicit in Makefile.in). This check doesn't help with distclean.
+libevent: distdir-pre-check
+
+# HMS: Stops the build for gmake or pmake
+distdir-pre-check:
+ case "$(DIST_FAIL)" in \
+ '') ;; \
+ *) $(error re-run configure adding $(DIST_FAIL) if you want to make a distribution.); \
+ echo "re-run configure adding $(DIST_FAIL) if you want to make a distribution."; \
+ exit 1 ;; \
+ esac
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libntp.mf
diff --git a/contrib/ntp/sntp/Makefile.in b/contrib/ntp/sntp/Makefile.in
index c796888e62b5..39f7dc7dc6f4 100644
--- a/contrib/ntp/sntp/Makefile.in
+++ b/contrib/ntp/sntp/Makefile.in
@@ -97,7 +97,7 @@ build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = sntp$(EXEEXT)
@BUILD_LIBEVENT_TRUE@am__append_1 = libevent
-@BUILD_LIBEVENT_TRUE@am__append_2 = libevent
+@BUILD_LIBEVENT_FALSE@am__append_2 = "--enable-local-libevent"
@NEED_LIBOPTS_TRUE@am__append_3 = libopts
@BUILD_SNTP_TRUE@am__append_4 = tests
subdir = .
@@ -278,6 +278,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
+DIST_SUBDIRS = include scripts unity libevent libopts tests
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf \
$(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf \
@@ -347,6 +348,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -355,6 +357,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -408,6 +411,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_SYSLOG = @LIB_SYSLOG@
LIPO = @LIPO@
LN_S = @LN_S@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -596,7 +600,7 @@ libexec_PROGRAMS = @SNTP_DL@
sbin_PROGRAMS = @SNTP_DS@
SUBDIRS = include scripts unity $(am__append_1) $(am__append_3) \
$(am__append_4)
-DIST_SUBDIRS = include scripts unity $(am__append_2) libopts tests
+DIST_FAIL = $(am__append_2)
@BUILD_SNTP_TRUE@noinst_LIBRARIES = libsntp.a
libsntp_a_SOURCES = \
crypto.c \
@@ -620,7 +624,6 @@ noinst_HEADERS = \
main.h \
networking.h \
sntp-opts.h \
- tests_main.h \
utilities.h \
$(NULL)
@@ -1206,9 +1209,6 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$(top_distdir)" distdir="$(distdir)" \
- dist-hook
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
@@ -1471,9 +1471,9 @@ uninstall-man: uninstall-man1 uninstall-man8
am--refresh check check-am clean clean-binPROGRAMS \
clean-cscope clean-generic clean-libexecPROGRAMS clean-libtool \
clean-noinstLIBRARIES clean-sbinPROGRAMS cscope cscopelist-am \
- ctags ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \
- dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \
- distclean distclean-compile distclean-generic distclean-hdr \
+ ctags ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \
+ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
+ distclean-compile distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-binPROGRAMS install-data \
@@ -1610,11 +1610,19 @@ $(srcdir)/sntp.html: $(srcdir)/invoke-sntp.menu $(srcdir)/invoke-sntp.texi $(src
libtool: $(LIBTOOL_DEPS)
./config.status --recheck
-libevent-dist-hook:
- if test -n "$(NTP_FORCE_LIBEVENT_DIST)" ; then rm -rf $(distdir)/libevent/autom4te.cache $(distdir)/libevent/config.h.in~ ; find $(distdir)/libevent -type d -name SCCS -print | xargs rm -rf ; fi
-
-dist-hook: libevent-dist-hook
- @: do-nothing action to avoid default SCCS get
+# HMS: libevent/ is a target if it's in EXTRA_DIST via NTP_FORCE_LIBEVENT_DIST.
+# Note that libevent/ is already in DIST_SUBDIRS (implicit in Makefile.am
+# but explicit in Makefile.in). This check doesn't help with distclean.
+libevent: distdir-pre-check
+
+# HMS: Stops the build for gmake or pmake
+distdir-pre-check:
+ case "$(DIST_FAIL)" in \
+ '') ;; \
+ *) $(error re-run configure adding $(DIST_FAIL) if you want to make a distribution.); \
+ echo "re-run configure adding $(DIST_FAIL) if you want to make a distribution."; \
+ exit 1 ;; \
+ esac
install-exec-hook:
@test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
diff --git a/contrib/ntp/sntp/configure b/contrib/ntp/sntp/configure
index 579848957619..74d0587cf11d 100755
--- a/contrib/ntp/sntp/configure
+++ b/contrib/ntp/sntp/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sntp 4.2.8p3.
+# Generated by GNU Autoconf 2.69 for sntp 4.2.8p4.
#
# Report bugs to <http://bugs.ntp.org./>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sntp'
PACKAGE_TARNAME='sntp'
-PACKAGE_VERSION='4.2.8p3'
-PACKAGE_STRING='sntp 4.2.8p3'
+PACKAGE_VERSION='4.2.8p4'
+PACKAGE_STRING='sntp 4.2.8p4'
PACKAGE_BUGREPORT='http://bugs.ntp.org./'
PACKAGE_URL='http://www.ntp.org./'
@@ -660,6 +660,7 @@ BUILD_LIBEVENT_FALSE
BUILD_LIBEVENT_TRUE
LDADD_LIBEVENT
CPPFLAGS_LIBEVENT
+CFLAGS_LIBEVENT
PKG_CONFIG
NTP_FORCE_LIBEVENT_DIST
LIBOPTS_DIR
@@ -696,6 +697,8 @@ PTHREADS_FALSE
PTHREADS_TRUE
LIBISC_PTHREADS_NOTHREADS
PTHREAD_LIBS
+LTHREAD_LIBS
+BUILD_THREAD
HAVE_INLINE
LDADD_LIBUTIL
ALLOCA
@@ -1488,7 +1491,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.8p3 to adapt to many kinds of systems.
+\`configure' configures sntp 4.2.8p4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1558,7 +1561,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sntp 4.2.8p3:";;
+ short | recursive ) echo "Configuration of sntp 4.2.8p4:";;
esac
cat <<\_ACEOF
@@ -1703,7 +1706,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sntp configure 4.2.8p3
+sntp configure 4.2.8p4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2533,7 +2536,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.8p3, which was
+It was created by sntp $as_me 4.2.8p4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2912,6 +2915,12 @@ 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.
+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
+
# Bump sntp_configure_cache_version for each change to configure.ac or
# .m4 files which invalidates cached values from previous configure
@@ -3524,7 +3533,7 @@ fi
# Define the identity of the package.
PACKAGE='sntp'
- VERSION='4.2.8p3'
+ VERSION='4.2.8p4'
cat >>confdefs.h <<_ACEOF
@@ -6552,7 +6561,7 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
$as_echo_n "checking additional compiler flags... " >&6; }
- # allow ntp_os_flags to be preset to skip this stuff
+ # allow ntp_os_cflags to be preset to skip this stuff
case "${ntp_os_cflags+set}" in
set)
;;
@@ -6640,7 +6649,7 @@ $as_echo_n "checking additional compiler flags... " >&6; }
;;
esac
esac
- case "$ntp_os_flags" in
+ case "$ntp_os_cflags" in
'')
ntp_os_cflags_msg="none needed"
;;
@@ -6651,6 +6660,38 @@ $as_echo_n "checking additional compiler flags... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
$as_echo "$ntp_os_cflags_msg" >&6; }
{ ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
+ ###
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
+$as_echo_n "checking additional linker flags... " >&6; }
+ # HMS: The following might still need tweaking
+ # allow ntp_os_ldflags to be preset to skip this stuff
+ case "${ntp_os_ldflags+set}" in
+ set)
+ ;;
+ *)
+ ntp_os_ldflags=
+ case "$host_os" in
+ hpux*)
+ case "$GCC" in
+ yes)
+ ntp_os_ldflags="-Wl,+allowdups"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case "$ntp_os_ldflags" in
+ '')
+ ntp_os_ldflags_msg="none needed"
+ ;;
+ *)
+ ntp_os_ldflags_msg="$ntp_os_ldflags"
+ esac
+ LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
+$as_echo "$ntp_os_ldflags_msg" >&6; }
+ { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
@@ -10527,7 +10568,8 @@ fi
have_pthreads=no
case "$enable_thread_support" in
- yes)
+ no) ;;
+ *)
ol_found_pthreads=no
@@ -13944,6 +13986,9 @@ $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
+$as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
+
if test $ol_link_threads != no ; then
LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
@@ -14984,6 +15029,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
case "$ol_found_pthreads" in
yes)
saved_LIBS="$LIBS"
@@ -15009,56 +15058,6 @@ done
yes)
PTHREAD_LIBS="$LTHREAD_LIBS"
have_pthreads=yes
- # Bug 2332: With GCC we need to force a reference to libgcc_s
- # (if libgcc_s exists) or the combination of
- # threads + setuid + mlockall does not work on linux because
- # thread cancellation fails to load libgcc_s with dlopen().
- # We have to pass this all as linker options to avoid argument
- # reordering by libtool.
- case "$GCC$with_gnu_ld" in
- yesyes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -lgcc_s" >&5
-$as_echo_n "checking for exit in -lgcc_s... " >&6; }
-if ${ac_cv_lib_gcc_s_exit+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgcc_s $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 exit ();
-int
-main ()
-{
-return exit ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_gcc_s_exit=yes
-else
- ac_cv_lib_gcc_s_exit=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_gcc_s_exit" >&5
-$as_echo "$ac_cv_lib_gcc_s_exit" >&6; }
-if test "x$ac_cv_lib_gcc_s_exit" = xyes; then :
- PTHREAD_LIBS="$LTHREAD_LIBS -Wl,--no-as-needed,-lgcc_s,--as-needed"
-fi
-
- ;;
- esac
esac
esac
esac
@@ -25132,6 +25131,7 @@ ntp_libevent_tearoff=libevent
+
case "$ntp_use_local_libevent" in
yes)
;;
@@ -25145,6 +25145,7 @@ $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed
ntp_use_local_libevent=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
$as_echo "$as_me: Using the installed libevent" >&6;}
+ CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
# HMS: I hope the following is accurate.
# We don't need -levent, we only need -levent_core.
@@ -25174,6 +25175,9 @@ $as_echo "$as_me: Using the installed libevent" >&6;}
$as_echo "yes" >&6; }
else
ntp_use_local_libevent=yes
+ # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
+ # is "pthreads"?
+ CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
@@ -25199,6 +25203,7 @@ $as_echo "$as_me: Using libevent tearoff" >&6;}
esac
esac
+
if test "x$ntp_use_local_libevent" = "xyes"; then
BUILD_LIBEVENT_TRUE=
BUILD_LIBEVENT_FALSE='#'
@@ -31104,7 +31109,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.8p3, which was
+This file was extended by sntp $as_me 4.2.8p4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -31171,7 +31176,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.8p3
+sntp config.status 4.2.8p4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/contrib/ntp/sntp/configure.ac b/contrib/ntp/sntp/configure.ac
index c0c98dce91fc..a08aa1347701 100644
--- a/contrib/ntp/sntp/configure.ac
+++ b/contrib/ntp/sntp/configure.ac
@@ -11,6 +11,7 @@ AC_INIT(
)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([libevent/build-aux])
+AC_LANG([C])
# Bump sntp_configure_cache_version for each change to configure.ac or
# .m4 files which invalidates cached values from previous configure
diff --git a/contrib/ntp/sntp/include/Makefile.in b/contrib/ntp/sntp/include/Makefile.in
index 8289b417ce81..1c8a179dd2cf 100644
--- a/contrib/ntp/sntp/include/Makefile.in
+++ b/contrib/ntp/sntp/include/Makefile.in
@@ -156,6 +156,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -164,6 +165,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -217,6 +219,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_SYSLOG = @LIB_SYSLOG@
LIPO = @LIPO@
LN_S = @LN_S@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
diff --git a/contrib/ntp/sntp/include/version.def b/contrib/ntp/sntp/include/version.def
index b0076515fea1..9f1ca6b51ccd 100644
--- a/contrib/ntp/sntp/include/version.def
+++ b/contrib/ntp/sntp/include/version.def
@@ -1 +1 @@
-version = '4.2.8p3';
+version = '4.2.8p4';
diff --git a/contrib/ntp/sntp/include/version.texi b/contrib/ntp/sntp/include/version.texi
index 4a13b8f2526c..64f037b28c13 100644
--- a/contrib/ntp/sntp/include/version.texi
+++ b/contrib/ntp/sntp/include/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 29 June 2015
-@set EDITION 4.2.8p3
-@set VERSION 4.2.8p3
+@set UPDATED 21 October 2015
+@set EDITION 4.2.8p4
+@set VERSION 4.2.8p4
diff --git a/contrib/ntp/sntp/invoke-sntp.texi b/contrib/ntp/sntp/invoke-sntp.texi
index 708a370ea9ef..9a726faf7f8f 100644
--- a/contrib/ntp/sntp/invoke-sntp.texi
+++ b/contrib/ntp/sntp/invoke-sntp.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-sntp.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:23:30 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:30:56 PM by AutoGen 5.18.5
# From the definitions sntp-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -101,7 +101,7 @@ with a status code of 0.
@exampleindent 0
@example
-sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p3
+sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p4
Usage: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
diff --git a/contrib/ntp/sntp/libevent/Makefile.am b/contrib/ntp/sntp/libevent/Makefile.am
index 3053cc016a52..1300e8f9ddef 100644
--- a/contrib/ntp/sntp/libevent/Makefile.am
+++ b/contrib/ntp/sntp/libevent/Makefile.am
@@ -140,7 +140,7 @@ CLEANFILES=
DISTCLEANFILES=
BUILT_SOURCES =
include include/include.am
-include sample/include.am
+#include sample/include.am
include test/include.am
if BUILD_WIN32
diff --git a/contrib/ntp/sntp/libevent/Makefile.in b/contrib/ntp/sntp/libevent/Makefile.in
index 61d96f5e04ba..81e121cf7d78 100644
--- a/contrib/ntp/sntp/libevent/Makefile.in
+++ b/contrib/ntp/sntp/libevent/Makefile.in
@@ -26,12 +26,6 @@
#
# See LICENSE for copying information.
-# sample/include.am for libevent
-# Copyright 2000-2007 Niels Provos
-# Copyright 2007-2012 Niels Provos and Nick Mathewson
-#
-# See LICENSE for copying information.
-
# test/Makefile.am for libevent
# Copyright 2000-2007 Niels Provos
# Copyright 2007-2012 Niels Provos and Nick Mathewson
@@ -120,32 +114,26 @@ 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_4) $(am__EXEEXT_6)
+noinst_PROGRAMS = $(am__EXEEXT_3)
EXTRA_PROGRAMS = $(am__EXEEXT_1)
@INSTALL_LIBEVENT_FALSE@am__append_5 = $(EVENT2_EXPORT)
-@OPENSSL_TRUE@am__append_6 = sample/le-proxy sample/https-client
-@OPENSSL_TRUE@am__append_7 = \
-@OPENSSL_TRUE@ sample/hostcheck.h \
-@OPENSSL_TRUE@ sample/openssl_hostname_validation.h
-
-@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)
+@BUILD_REGRESS_TRUE@am__append_6 = $(TESTPROGRAMS)
+@BUILD_REGRESS_TRUE@am__append_7 = test/regress
+@BUILD_REGRESS_TRUE@am__append_8 = test/regress.gen.c test/regress.gen.h
+@PTHREADS_TRUE@am__append_9 = libevent_pthreads.la
+@BUILD_WIN32_TRUE@am__append_10 = test/regress_iocp.c
+@OPENSSL_TRUE@am__append_11 = test/regress_ssl.c
+@OPENSSL_TRUE@am__append_12 = $(OPENSSL_INCS)
+@OPENSSL_TRUE@am__append_13 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
+@STRLCPY_IMPL_TRUE@am__append_14 = strlcpy.c
+@SELECT_BACKEND_TRUE@am__append_15 = select.c
+@POLL_BACKEND_TRUE@am__append_16 = poll.c
+@DEVPOLL_BACKEND_TRUE@am__append_17 = devpoll.c
+@KQUEUE_BACKEND_TRUE@am__append_18 = kqueue.c
+@EPOLL_BACKEND_TRUE@am__append_19 = epoll.c
+@EVPORT_BACKEND_TRUE@am__append_20 = evport.c
+@SIGNAL_SUPPORT_TRUE@am__append_21 = signal.c
+@INSTALL_LIBEVENT_FALSE@am__append_22 = $(EVENT1_HDRS)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_backport_259_ssizet.m4 \
@@ -297,58 +285,16 @@ libevent_pthreads_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@am_libevent_pthreads_la_rpath = \
@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@ -rpath $(libdir)
@BUILD_REGRESS_TRUE@am__EXEEXT_1 = test/regress$(EXEEXT)
-@OPENSSL_TRUE@am__EXEEXT_2 = sample/le-proxy$(EXEEXT) \
-@OPENSSL_TRUE@ sample/https-client$(EXEEXT)
-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)
-@BUILD_SAMPLES_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3)
-am__EXEEXT_5 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
+am__EXEEXT_2 = 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_6 = $(am__EXEEXT_5)
+@BUILD_REGRESS_TRUE@am__EXEEXT_3 = $(am__EXEEXT_2)
PROGRAMS = $(noinst_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
-am_sample_dns_example_OBJECTS = sample/dns-example.$(OBJEXT)
-sample_dns_example_OBJECTS = $(am_sample_dns_example_OBJECTS)
-sample_dns_example_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
-am_sample_event_read_fifo_OBJECTS = sample/event-read-fifo.$(OBJEXT)
-sample_event_read_fifo_OBJECTS = $(am_sample_event_read_fifo_OBJECTS)
-sample_event_read_fifo_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- libevent.la
-am_sample_hello_world_OBJECTS = sample/hello-world.$(OBJEXT)
-sample_hello_world_OBJECTS = $(am_sample_hello_world_OBJECTS)
-sample_hello_world_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
-am_sample_http_server_OBJECTS = sample/http-server.$(OBJEXT)
-sample_http_server_OBJECTS = $(am_sample_http_server_OBJECTS)
-sample_http_server_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
-am__sample_https_client_SOURCES_DIST = sample/https-client.c \
- sample/hostcheck.c sample/openssl_hostname_validation.c
-@OPENSSL_TRUE@am_sample_https_client_OBJECTS = \
-@OPENSSL_TRUE@ sample/https-client.$(OBJEXT) \
-@OPENSSL_TRUE@ sample/hostcheck.$(OBJEXT) \
-@OPENSSL_TRUE@ sample/openssl_hostname_validation.$(OBJEXT)
-sample_https_client_OBJECTS = $(am_sample_https_client_OBJECTS)
-@OPENSSL_TRUE@sample_https_client_DEPENDENCIES = libevent.la \
-@OPENSSL_TRUE@ libevent_openssl.la $(am__DEPENDENCIES_1) \
-@OPENSSL_TRUE@ $(am__DEPENDENCIES_1)
-am__sample_le_proxy_SOURCES_DIST = sample/le-proxy.c
-@OPENSSL_TRUE@am_sample_le_proxy_OBJECTS = sample/le-proxy.$(OBJEXT)
-sample_le_proxy_OBJECTS = $(am_sample_le_proxy_OBJECTS)
-@OPENSSL_TRUE@sample_le_proxy_DEPENDENCIES = libevent.la \
-@OPENSSL_TRUE@ libevent_openssl.la $(am__DEPENDENCIES_1) \
-@OPENSSL_TRUE@ $(am__DEPENDENCIES_1)
-am_sample_signal_test_OBJECTS = sample/signal-test.$(OBJEXT)
-sample_signal_test_OBJECTS = $(am_sample_signal_test_OBJECTS)
-sample_signal_test_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
-am_sample_time_test_OBJECTS = sample/time-test.$(OBJEXT)
-sample_time_test_OBJECTS = $(am_sample_time_test_OBJECTS)
-sample_time_test_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
am_test_bench_OBJECTS = test/bench.$(OBJEXT)
test_bench_OBJECTS = $(am_test_bench_OBJECTS)
test_bench_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
@@ -397,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_12)
+am__DEPENDENCIES_3 = $(am__append_9)
@OPENSSL_TRUE@am__DEPENDENCIES_4 = libevent_openssl.la \
@OPENSSL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
test_regress_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la \
@@ -471,31 +417,21 @@ am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libevent_la_SOURCES) $(libevent_core_la_SOURCES) \
$(libevent_extra_la_SOURCES) $(libevent_openssl_la_SOURCES) \
- $(libevent_pthreads_la_SOURCES) $(sample_dns_example_SOURCES) \
- $(sample_event_read_fifo_SOURCES) \
- $(sample_hello_world_SOURCES) $(sample_http_server_SOURCES) \
- $(sample_https_client_SOURCES) $(sample_le_proxy_SOURCES) \
- $(sample_signal_test_SOURCES) $(sample_time_test_SOURCES) \
- $(test_bench_SOURCES) $(test_bench_cascade_SOURCES) \
- $(test_bench_http_SOURCES) $(test_bench_httpclient_SOURCES) \
- $(test_regress_SOURCES) $(test_test_changelist_SOURCES) \
- $(test_test_closed_SOURCES) $(test_test_dumpevents_SOURCES) \
- $(test_test_eof_SOURCES) $(test_test_fdleak_SOURCES) \
- $(test_test_init_SOURCES) $(test_test_ratelim_SOURCES) \
- $(test_test_time_SOURCES) $(test_test_weof_SOURCES)
+ $(libevent_pthreads_la_SOURCES) $(test_bench_SOURCES) \
+ $(test_bench_cascade_SOURCES) $(test_bench_http_SOURCES) \
+ $(test_bench_httpclient_SOURCES) $(test_regress_SOURCES) \
+ $(test_test_changelist_SOURCES) $(test_test_closed_SOURCES) \
+ $(test_test_dumpevents_SOURCES) $(test_test_eof_SOURCES) \
+ $(test_test_fdleak_SOURCES) $(test_test_init_SOURCES) \
+ $(test_test_ratelim_SOURCES) $(test_test_time_SOURCES) \
+ $(test_test_weof_SOURCES)
DIST_SOURCES = $(am__libevent_la_SOURCES_DIST) \
$(am__libevent_core_la_SOURCES_DIST) \
$(libevent_extra_la_SOURCES) \
$(am__libevent_openssl_la_SOURCES_DIST) \
- $(am__libevent_pthreads_la_SOURCES_DIST) \
- $(sample_dns_example_SOURCES) \
- $(sample_event_read_fifo_SOURCES) \
- $(sample_hello_world_SOURCES) $(sample_http_server_SOURCES) \
- $(am__sample_https_client_SOURCES_DIST) \
- $(am__sample_le_proxy_SOURCES_DIST) \
- $(sample_signal_test_SOURCES) $(sample_time_test_SOURCES) \
- $(test_bench_SOURCES) $(test_bench_cascade_SOURCES) \
- $(test_bench_http_SOURCES) $(test_bench_httpclient_SOURCES) \
+ $(am__libevent_pthreads_la_SOURCES_DIST) $(test_bench_SOURCES) \
+ $(test_bench_cascade_SOURCES) $(test_bench_http_SOURCES) \
+ $(test_bench_httpclient_SOURCES) \
$(am__test_regress_SOURCES_DIST) \
$(test_test_changelist_SOURCES) $(test_test_closed_SOURCES) \
$(test_test_dumpevents_SOURCES) $(test_test_eof_SOURCES) \
@@ -538,7 +474,6 @@ am__noinst_HEADERS_DIST = include/event2/buffer.h \
include/event2/rpc_struct.h include/event2/tag.h \
include/event2/tag_compat.h include/event2/thread.h \
include/event2/util.h include/event2/visibility.h \
- sample/hostcheck.h sample/openssl_hostname_validation.h \
test/regress.h test/regress_thread.h test/tinytest.h \
test/tinytest_local.h test/tinytest_macros.h \
WIN32-Code/nmake/evconfig-private.h \
@@ -757,8 +692,8 @@ TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
am__DIST_COMMON = $(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)/build-aux/compile \
+ $(srcdir)/libevent_pthreads.pc.in $(srcdir)/test/include.am \
+ $(top_srcdir)/build-aux/compile \
$(top_srcdir)/build-aux/config.guess \
$(top_srcdir)/build-aux/config.sub \
$(top_srcdir)/build-aux/depcomp \
@@ -852,7 +787,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_12)
+PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_9)
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -1018,9 +953,9 @@ LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la \
@INSTALL_LIBEVENT_TRUE@pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
@INSTALL_LIBEVENT_FALSE@noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
EXTRA_SOURCE =
-noinst_HEADERS = $(am__append_5) $(am__append_7) test/regress.h \
- test/regress_thread.h test/tinytest.h test/tinytest_local.h \
- test/tinytest_macros.h WIN32-Code/nmake/evconfig-private.h \
+noinst_HEADERS = $(am__append_5) test/regress.h test/regress_thread.h \
+ test/tinytest.h test/tinytest_local.h test/tinytest_macros.h \
+ WIN32-Code/nmake/evconfig-private.h \
WIN32-Code/nmake/event2/event-config.h WIN32-Code/tree.h \
bufferevent-internal.h changelist-internal.h \
compat/sys/queue.h defer-internal.h epolltable-internal.h \
@@ -1030,12 +965,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_25)
+ time-internal.h util-internal.h $(am__append_22)
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_11) include/event2/event-config.h
+BUILT_SOURCES = $(am__append_8) include/event2/event-config.h
include_event2dir = $(includedir)/event2
EVENT2_EXPORT = \
include/event2/buffer.h \
@@ -1067,31 +1002,6 @@ EVENT2_EXPORT = \
@INSTALL_LIBEVENT_TRUE@include_event2_HEADERS = $(EVENT2_EXPORT)
@INSTALL_LIBEVENT_TRUE@nodist_include_event2_HEADERS = include/event2/event-config.h
@INSTALL_LIBEVENT_FALSE@nodist_noinst_HEADERS = include/event2/event-config.h
-SAMPLES = sample/dns-example sample/event-read-fifo sample/hello-world \
- sample/http-server sample/signal-test sample/time-test \
- $(am__append_6)
-@OPENSSL_TRUE@sample_le_proxy_SOURCES = sample/le-proxy.c
-@OPENSSL_TRUE@sample_le_proxy_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
-@OPENSSL_TRUE@sample_le_proxy_INCLUDES = $(OPENSSL_INCS)
-@OPENSSL_TRUE@sample_https_client_SOURCES = \
-@OPENSSL_TRUE@ sample/https-client.c \
-@OPENSSL_TRUE@ sample/hostcheck.c \
-@OPENSSL_TRUE@ sample/openssl_hostname_validation.c
-
-@OPENSSL_TRUE@sample_https_client_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
-@OPENSSL_TRUE@sample_https_client_INCLUDES = $(OPENSSL_INCS)
-sample_event_read_fifo_SOURCES = sample/event-read-fifo.c
-sample_event_read_fifo_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_time_test_SOURCES = sample/time-test.c
-sample_time_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_signal_test_SOURCES = sample/signal-test.c
-sample_signal_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_dns_example_SOURCES = sample/dns-example.c
-sample_dns_example_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_hello_world_SOURCES = sample/hello-world.c
-sample_hello_world_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_http_server_SOURCES = sample/http-server.c
-sample_http_server_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
regress_CPPFLAGS = -DTINYTEST_LOCAL
TESTPROGRAMS = \
test/bench \
@@ -1139,14 +1049,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_13) $(am__append_14)
+ $(regress_zlib_SOURCES) $(am__append_10) $(am__append_11)
@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_16)
+ $(PTHREAD_LIBS) $(ZLIB_LIBS) $(am__append_13)
test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) \
- $(ZLIB_CFLAGS) -Itest $(am__append_15)
+ $(ZLIB_CFLAGS) -Itest $(am__append_12)
test_regress_LDFLAGS = $(PTHREAD_CFLAGS)
test_bench_SOURCES = test/bench.c
test_bench_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
@@ -1157,18 +1067,19 @@ test_bench_http_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
test_bench_httpclient_SOURCES = test/bench_httpclient.c
test_bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la
@BUILD_WIN32_FALSE@SYS_LIBS =
+#include sample/include.am
@BUILD_WIN32_TRUE@SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
-@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_FALSE@SYS_SRC = $(am__append_14) $(am__append_15) \
+@BUILD_WIN32_FALSE@ $(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_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_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_TRUE@ bufferevent_async.c $(am__append_14) \
+@BUILD_WIN32_TRUE@ $(am__append_15) $(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)
@BUILD_WIN32_FALSE@SYS_INCLUDES =
@BUILD_WIN32_TRUE@SYS_INCLUDES = -IWIN32-Code -IWIN32-Code/nmake
CORE_SRC = \
@@ -1231,7 +1142,7 @@ all: $(BUILT_SOURCES) config.h evconfig-private.h
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/include/include.am $(srcdir)/sample/include.am $(srcdir)/test/include.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/include/include.am $(srcdir)/test/include.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -1253,7 +1164,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
-$(srcdir)/include/include.am $(srcdir)/sample/include.am $(srcdir)/test/include.am $(am__empty):
+$(srcdir)/include/include.am $(srcdir)/test/include.am $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@@ -1362,64 +1273,6 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-sample/$(am__dirstamp):
- @$(MKDIR_P) sample
- @: > sample/$(am__dirstamp)
-sample/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) sample/$(DEPDIR)
- @: > sample/$(DEPDIR)/$(am__dirstamp)
-sample/dns-example.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-
-sample/dns-example$(EXEEXT): $(sample_dns_example_OBJECTS) $(sample_dns_example_DEPENDENCIES) $(EXTRA_sample_dns_example_DEPENDENCIES) sample/$(am__dirstamp)
- @rm -f sample/dns-example$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sample_dns_example_OBJECTS) $(sample_dns_example_LDADD) $(LIBS)
-sample/event-read-fifo.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-
-sample/event-read-fifo$(EXEEXT): $(sample_event_read_fifo_OBJECTS) $(sample_event_read_fifo_DEPENDENCIES) $(EXTRA_sample_event_read_fifo_DEPENDENCIES) sample/$(am__dirstamp)
- @rm -f sample/event-read-fifo$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sample_event_read_fifo_OBJECTS) $(sample_event_read_fifo_LDADD) $(LIBS)
-sample/hello-world.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-
-sample/hello-world$(EXEEXT): $(sample_hello_world_OBJECTS) $(sample_hello_world_DEPENDENCIES) $(EXTRA_sample_hello_world_DEPENDENCIES) sample/$(am__dirstamp)
- @rm -f sample/hello-world$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sample_hello_world_OBJECTS) $(sample_hello_world_LDADD) $(LIBS)
-sample/http-server.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-
-sample/http-server$(EXEEXT): $(sample_http_server_OBJECTS) $(sample_http_server_DEPENDENCIES) $(EXTRA_sample_http_server_DEPENDENCIES) sample/$(am__dirstamp)
- @rm -f sample/http-server$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sample_http_server_OBJECTS) $(sample_http_server_LDADD) $(LIBS)
-sample/https-client.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-sample/hostcheck.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-sample/openssl_hostname_validation.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-
-sample/https-client$(EXEEXT): $(sample_https_client_OBJECTS) $(sample_https_client_DEPENDENCIES) $(EXTRA_sample_https_client_DEPENDENCIES) sample/$(am__dirstamp)
- @rm -f sample/https-client$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sample_https_client_OBJECTS) $(sample_https_client_LDADD) $(LIBS)
-sample/le-proxy.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-
-sample/le-proxy$(EXEEXT): $(sample_le_proxy_OBJECTS) $(sample_le_proxy_DEPENDENCIES) $(EXTRA_sample_le_proxy_DEPENDENCIES) sample/$(am__dirstamp)
- @rm -f sample/le-proxy$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sample_le_proxy_OBJECTS) $(sample_le_proxy_LDADD) $(LIBS)
-sample/signal-test.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-
-sample/signal-test$(EXEEXT): $(sample_signal_test_OBJECTS) $(sample_signal_test_DEPENDENCIES) $(EXTRA_sample_signal_test_DEPENDENCIES) sample/$(am__dirstamp)
- @rm -f sample/signal-test$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sample_signal_test_OBJECTS) $(sample_signal_test_LDADD) $(LIBS)
-sample/time-test.$(OBJEXT): sample/$(am__dirstamp) \
- sample/$(DEPDIR)/$(am__dirstamp)
-
-sample/time-test$(EXEEXT): $(sample_time_test_OBJECTS) $(sample_time_test_DEPENDENCIES) $(EXTRA_sample_time_test_DEPENDENCIES) sample/$(am__dirstamp)
- @rm -f sample/time-test$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sample_time_test_OBJECTS) $(sample_time_test_LDADD) $(LIBS)
test/$(am__dirstamp):
@$(MKDIR_P) test
@: > test/$(am__dirstamp)
@@ -1584,7 +1437,6 @@ uninstall-dist_binSCRIPTS:
mostlyclean-compile:
-rm -f *.$(OBJEXT)
- -rm -f sample/*.$(OBJEXT)
-rm -f test/*.$(OBJEXT)
distclean-compile:
@@ -1624,16 +1476,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32select.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/dns-example.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/event-read-fifo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/hello-world.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/hostcheck.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/http-server.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/https-client.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/le-proxy.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/openssl_hostname_validation.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/signal-test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/time-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_cascade.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_http.Po@am__quote@
@@ -1969,7 +1811,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
- -rm -rf sample/.libs sample/_libs
-rm -rf test/.libs test/_libs
distclean-libtool:
@@ -2485,8 +2326,6 @@ 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)
- -rm -f sample/$(DEPDIR)/$(am__dirstamp)
- -rm -f sample/$(am__dirstamp)
-rm -f test/$(DEPDIR)/$(am__dirstamp)
-rm -f test/$(am__dirstamp)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
@@ -2502,7 +2341,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(DEPDIR) ./$(DEPDIR) sample/$(DEPDIR) test/$(DEPDIR)
+ -rm -rf $(DEPDIR) ./$(DEPDIR) test/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
@@ -2551,7 +2390,7 @@ installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf $(DEPDIR) ./$(DEPDIR) sample/$(DEPDIR) test/$(DEPDIR)
+ -rm -rf $(DEPDIR) ./$(DEPDIR) test/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -2601,8 +2440,6 @@ uninstall-am: uninstall-dist_binSCRIPTS uninstall-includeHEADERS \
.PRECIOUS: Makefile
-$(SAMPLES) : libevent.la
-
test/test-script.sh: test/test.sh
cp $(top_srcdir)/test/test.sh $@
diff --git a/contrib/ntp/sntp/libevent/sample/dns-example.c b/contrib/ntp/sntp/libevent/sample/dns-example.c
deleted file mode 100644
index 15e48ce4bc66..000000000000
--- a/contrib/ntp/sntp/libevent/sample/dns-example.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- This example code shows how to use the high-level, low-level, and
- server-level interfaces of evdns.
-
- XXX It's pretty ugly and should probably be cleaned up.
- */
-
-#include <event2/event-config.h>
-
-/* Compatibility for possible missing IPv6 declarations */
-#include "../ipv6-internal.h"
-
-#include <sys/types.h>
-
-#ifdef _WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#endif
-
-#include <event2/event.h>
-#include <event2/dns.h>
-#include <event2/dns_struct.h>
-#include <event2/util.h>
-
-#ifdef EVENT__HAVE_NETINET_IN6_H
-#include <netinet/in6.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define u32 ev_uint32_t
-#define u8 ev_uint8_t
-
-static const char *
-debug_ntoa(u32 address)
-{
- static char buf[32];
- u32 a = ntohl(address);
- evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d",
- (int)(u8)((a>>24)&0xff),
- (int)(u8)((a>>16)&0xff),
- (int)(u8)((a>>8 )&0xff),
- (int)(u8)((a )&0xff));
- return buf;
-}
-
-static void
-main_callback(int result, char type, int count, int ttl,
- void *addrs, void *orig) {
- char *n = (char*)orig;
- int i;
- for (i = 0; i < count; ++i) {
- if (type == DNS_IPv4_A) {
- printf("%s: %s\n", n, debug_ntoa(((u32*)addrs)[i]));
- } else if (type == DNS_PTR) {
- printf("%s: %s\n", n, ((char**)addrs)[i]);
- }
- }
- if (!count) {
- printf("%s: No answer (%d)\n", n, result);
- }
- fflush(stdout);
-}
-
-static void
-gai_callback(int err, struct evutil_addrinfo *ai, void *arg)
-{
- const char *name = arg;
- int i;
- if (err) {
- printf("%s: %s\n", name, evutil_gai_strerror(err));
- }
- if (ai && ai->ai_canonname)
- printf(" %s ==> %s\n", name, ai->ai_canonname);
- for (i=0; ai; ai = ai->ai_next, ++i) {
- char buf[128];
- if (ai->ai_family == PF_INET) {
- struct sockaddr_in *sin =
- (struct sockaddr_in*)ai->ai_addr;
- evutil_inet_ntop(AF_INET, &sin->sin_addr, buf,
- sizeof(buf));
- printf("[%d] %s: %s\n",i,name,buf);
- } else {
- struct sockaddr_in6 *sin6 =
- (struct sockaddr_in6*)ai->ai_addr;
- evutil_inet_ntop(AF_INET6, &sin6->sin6_addr, buf,
- sizeof(buf));
- printf("[%d] %s: %s\n",i,name,buf);
- }
- }
-}
-
-static void
-evdns_server_callback(struct evdns_server_request *req, void *data)
-{
- int i, r;
- (void)data;
- /* dummy; give 192.168.11.11 as an answer for all A questions,
- * give foo.bar.example.com as an answer for all PTR questions. */
- for (i = 0; i < req->nquestions; ++i) {
- u32 ans = htonl(0xc0a80b0bUL);
- if (req->questions[i]->type == EVDNS_TYPE_A &&
- req->questions[i]->dns_question_class == EVDNS_CLASS_INET) {
- printf(" -- replying for %s (A)\n", req->questions[i]->name);
- r = evdns_server_request_add_a_reply(req, req->questions[i]->name,
- 1, &ans, 10);
- if (r<0)
- printf("eeep, didn't work.\n");
- } else if (req->questions[i]->type == EVDNS_TYPE_PTR &&
- req->questions[i]->dns_question_class == EVDNS_CLASS_INET) {
- printf(" -- replying for %s (PTR)\n", req->questions[i]->name);
- r = evdns_server_request_add_ptr_reply(req, NULL, req->questions[i]->name,
- "foo.bar.example.com", 10);
- if (r<0)
- printf("ugh, no luck");
- } else {
- printf(" -- skipping %s [%d %d]\n", req->questions[i]->name,
- req->questions[i]->type, req->questions[i]->dns_question_class);
- }
- }
-
- r = evdns_server_request_respond(req, 0);
- if (r<0)
- printf("eeek, couldn't send reply.\n");
-}
-
-static int verbose = 0;
-
-static void
-logfn(int is_warn, const char *msg) {
- if (!is_warn && !verbose)
- return;
- fprintf(stderr, "%s: %s\n", is_warn?"WARN":"INFO", msg);
-}
-
-int
-main(int c, char **v) {
- int idx;
- int reverse = 0, servertest = 0, use_getaddrinfo = 0;
- struct event_base *event_base = NULL;
- struct evdns_base *evdns_base = NULL;
- const char *resolv_conf = NULL;
- if (c<2) {
- fprintf(stderr, "syntax: %s [-x] [-v] [-c resolv.conf] hostname\n", v[0]);
- fprintf(stderr, "syntax: %s [-servertest]\n", v[0]);
- return 1;
- }
- idx = 1;
- while (idx < c && v[idx][0] == '-') {
- if (!strcmp(v[idx], "-x"))
- reverse = 1;
- else if (!strcmp(v[idx], "-v"))
- verbose = 1;
- else if (!strcmp(v[idx], "-g"))
- use_getaddrinfo = 1;
- else if (!strcmp(v[idx], "-servertest"))
- servertest = 1;
- else if (!strcmp(v[idx], "-c")) {
- if (idx + 1 < c)
- resolv_conf = v[++idx];
- else
- fprintf(stderr, "-c needs an argument\n");
- } else
- fprintf(stderr, "Unknown option %s\n", v[idx]);
- ++idx;
- }
-
-#ifdef _WIN32
- {
- WSADATA WSAData;
- WSAStartup(0x101, &WSAData);
- }
-#endif
-
- event_base = event_base_new();
- evdns_base = evdns_base_new(event_base, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
- evdns_set_log_fn(logfn);
-
- if (servertest) {
- evutil_socket_t sock;
- struct sockaddr_in my_addr;
- sock = socket(PF_INET, SOCK_DGRAM, 0);
- if (sock == -1) {
- perror("socket");
- exit(1);
- }
- evutil_make_socket_nonblocking(sock);
- my_addr.sin_family = AF_INET;
- my_addr.sin_port = htons(10053);
- my_addr.sin_addr.s_addr = INADDR_ANY;
- if (bind(sock, (struct sockaddr*)&my_addr, sizeof(my_addr))<0) {
- perror("bind");
- exit(1);
- }
- evdns_add_server_port_with_base(event_base, sock, 0, evdns_server_callback, NULL);
- }
- if (idx < c) {
- int res;
-#ifdef _WIN32
- if (resolv_conf == NULL)
- res = evdns_base_config_windows_nameservers(evdns_base);
- else
-#endif
- res = evdns_base_resolv_conf_parse(evdns_base,
- DNS_OPTION_NAMESERVERS,
- resolv_conf ? resolv_conf : "/etc/resolv.conf");
-
- if (res < 0) {
- fprintf(stderr, "Couldn't configure nameservers");
- return 1;
- }
- }
-
- printf("EVUTIL_AI_CANONNAME in example = %d\n", EVUTIL_AI_CANONNAME);
- for (; idx < c; ++idx) {
- if (reverse) {
- struct in_addr addr;
- if (evutil_inet_pton(AF_INET, v[idx], &addr)!=1) {
- fprintf(stderr, "Skipping non-IP %s\n", v[idx]);
- continue;
- }
- fprintf(stderr, "resolving %s...\n",v[idx]);
- evdns_base_resolve_reverse(evdns_base, &addr, 0, main_callback, v[idx]);
- } else if (use_getaddrinfo) {
- struct evutil_addrinfo hints;
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = PF_UNSPEC;
- hints.ai_protocol = IPPROTO_TCP;
- hints.ai_flags = EVUTIL_AI_CANONNAME;
- fprintf(stderr, "resolving (fwd) %s...\n",v[idx]);
- evdns_getaddrinfo(evdns_base, v[idx], NULL, &hints,
- gai_callback, v[idx]);
- } else {
- fprintf(stderr, "resolving (fwd) %s...\n",v[idx]);
- evdns_base_resolve_ipv4(evdns_base, v[idx], 0, main_callback, v[idx]);
- }
- }
- fflush(stdout);
- event_base_dispatch(event_base);
- return 0;
-}
-
diff --git a/contrib/ntp/sntp/libevent/sample/event-read-fifo.c b/contrib/ntp/sntp/libevent/sample/event-read-fifo.c
deleted file mode 100644
index 27b0b530d5c1..000000000000
--- a/contrib/ntp/sntp/libevent/sample/event-read-fifo.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * This sample code shows how to use Libevent to read from a named pipe.
- * XXX This code could make better use of the Libevent interfaces.
- *
- * XXX This does not work on Windows; ignore everything inside the _WIN32 block.
- *
- * On UNIX, compile with:
- * cc -I/usr/local/include -o event-read-fifo event-read-fifo.c \
- * -L/usr/local/lib -levent
- */
-
-#include <event2/event-config.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifndef _WIN32
-#include <sys/queue.h>
-#include <unistd.h>
-#include <sys/time.h>
-#include <signal.h>
-#else
-#include <winsock2.h>
-#include <windows.h>
-#endif
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-
-#include <event2/event.h>
-
-static void
-fifo_read(evutil_socket_t fd, short event, void *arg)
-{
- char buf[255];
- int len;
- struct event *ev = arg;
-#ifdef _WIN32
- DWORD dwBytesRead;
-#endif
-
- fprintf(stderr, "fifo_read called with fd: %d, event: %d, arg: %p\n",
- (int)fd, event, arg);
-#ifdef _WIN32
- len = ReadFile((HANDLE)fd, buf, sizeof(buf) - 1, &dwBytesRead, NULL);
-
- /* Check for end of file. */
- if (len && dwBytesRead == 0) {
- fprintf(stderr, "End Of File");
- event_del(ev);
- return;
- }
-
- buf[dwBytesRead] = '\0';
-#else
- len = read(fd, buf, sizeof(buf) - 1);
-
- if (len <= 0) {
- if (len == -1)
- perror("read");
- else if (len == 0)
- fprintf(stderr, "Connection closed\n");
- event_del(ev);
- event_base_loopbreak(event_get_base(ev));
- return;
- }
-
- buf[len] = '\0';
-#endif
- fprintf(stdout, "Read: %s\n", buf);
-}
-
-/* On Unix, cleanup event.fifo if SIGINT is received. */
-#ifndef _WIN32
-static void
-signal_cb(evutil_socket_t fd, short event, void *arg)
-{
- struct event_base *base = arg;
- event_base_loopbreak(base);
-}
-#endif
-
-int
-main(int argc, char **argv)
-{
- struct event *evfifo;
- struct event_base* base;
-#ifdef _WIN32
- HANDLE socket;
- /* Open a file. */
- socket = CreateFileA("test.txt", /* open File */
- GENERIC_READ, /* open for reading */
- 0, /* do not share */
- NULL, /* no security */
- OPEN_EXISTING, /* existing file only */
- FILE_ATTRIBUTE_NORMAL, /* normal file */
- NULL); /* no attr. template */
-
- if (socket == INVALID_HANDLE_VALUE)
- return 1;
-
-#else
- struct event *signal_int;
- struct stat st;
- const char *fifo = "event.fifo";
- int socket;
-
- if (lstat(fifo, &st) == 0) {
- if ((st.st_mode & S_IFMT) == S_IFREG) {
- errno = EEXIST;
- perror("lstat");
- exit(1);
- }
- }
-
- unlink(fifo);
- if (mkfifo(fifo, 0600) == -1) {
- perror("mkfifo");
- exit(1);
- }
-
- socket = open(fifo, O_RDONLY | O_NONBLOCK, 0);
-
- if (socket == -1) {
- perror("open");
- exit(1);
- }
-
- fprintf(stderr, "Write data to %s\n", fifo);
-#endif
- /* Initalize the event library */
- base = event_base_new();
-
- /* Initalize one event */
-#ifdef _WIN32
- evfifo = event_new(base, (evutil_socket_t)socket, EV_READ|EV_PERSIST, fifo_read,
- event_self_cbarg());
-#else
- /* catch SIGINT so that event.fifo can be cleaned up */
- signal_int = evsignal_new(base, SIGINT, signal_cb, base);
- event_add(signal_int, NULL);
-
- evfifo = event_new(base, socket, EV_READ|EV_PERSIST, fifo_read,
- event_self_cbarg());
-#endif
-
- /* Add it to the active events, without a timeout */
- event_add(evfifo, NULL);
-
- event_base_dispatch(base);
- event_base_free(base);
-#ifdef _WIN32
- CloseHandle(socket);
-#else
- close(socket);
- unlink(fifo);
-#endif
- libevent_global_shutdown();
- return (0);
-}
-
diff --git a/contrib/ntp/sntp/libevent/sample/hello-world.c b/contrib/ntp/sntp/libevent/sample/hello-world.c
deleted file mode 100644
index d3cf058a8b55..000000000000
--- a/contrib/ntp/sntp/libevent/sample/hello-world.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- This exmple program provides a trivial server program that listens for TCP
- connections on port 9995. When they arrive, it writes a short message to
- each client connection, and closes each connection once it is flushed.
-
- Where possible, it exits cleanly in response to a SIGINT (ctrl-c).
-*/
-
-
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-#include <signal.h>
-#ifndef _WIN32
-#include <netinet/in.h>
-# ifdef _XOPEN_SOURCE_EXTENDED
-# include <arpa/inet.h>
-# endif
-#include <sys/socket.h>
-#endif
-
-#include <event2/bufferevent.h>
-#include <event2/buffer.h>
-#include <event2/listener.h>
-#include <event2/util.h>
-#include <event2/event.h>
-
-static const char MESSAGE[] = "Hello, World!\n";
-
-static const int PORT = 9995;
-
-static void listener_cb(struct evconnlistener *, evutil_socket_t,
- struct sockaddr *, int socklen, void *);
-static void conn_writecb(struct bufferevent *, void *);
-static void conn_eventcb(struct bufferevent *, short, void *);
-static void signal_cb(evutil_socket_t, short, void *);
-
-int
-main(int argc, char **argv)
-{
- struct event_base *base;
- struct evconnlistener *listener;
- struct event *signal_event;
-
- struct sockaddr_in sin;
-#ifdef _WIN32
- WSADATA wsa_data;
- WSAStartup(0x0201, &wsa_data);
-#endif
-
- base = event_base_new();
- if (!base) {
- fprintf(stderr, "Could not initialize libevent!\n");
- return 1;
- }
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin.sin_port = htons(PORT);
-
- listener = evconnlistener_new_bind(base, listener_cb, (void *)base,
- LEV_OPT_REUSEABLE|LEV_OPT_CLOSE_ON_FREE, -1,
- (struct sockaddr*)&sin,
- sizeof(sin));
-
- if (!listener) {
- fprintf(stderr, "Could not create a listener!\n");
- return 1;
- }
-
- signal_event = evsignal_new(base, SIGINT, signal_cb, (void *)base);
-
- if (!signal_event || event_add(signal_event, NULL)<0) {
- fprintf(stderr, "Could not create/add a signal event!\n");
- return 1;
- }
-
- event_base_dispatch(base);
-
- evconnlistener_free(listener);
- event_free(signal_event);
- event_base_free(base);
-
- printf("done\n");
- return 0;
-}
-
-static void
-listener_cb(struct evconnlistener *listener, evutil_socket_t fd,
- struct sockaddr *sa, int socklen, void *user_data)
-{
- struct event_base *base = user_data;
- struct bufferevent *bev;
-
- bev = bufferevent_socket_new(base, fd, BEV_OPT_CLOSE_ON_FREE);
- if (!bev) {
- fprintf(stderr, "Error constructing bufferevent!");
- event_base_loopbreak(base);
- return;
- }
- bufferevent_setcb(bev, NULL, conn_writecb, conn_eventcb, NULL);
- bufferevent_enable(bev, EV_WRITE);
- bufferevent_disable(bev, EV_READ);
-
- bufferevent_write(bev, MESSAGE, strlen(MESSAGE));
-}
-
-static void
-conn_writecb(struct bufferevent *bev, void *user_data)
-{
- struct evbuffer *output = bufferevent_get_output(bev);
- if (evbuffer_get_length(output) == 0) {
- printf("flushed answer\n");
- bufferevent_free(bev);
- }
-}
-
-static void
-conn_eventcb(struct bufferevent *bev, short events, void *user_data)
-{
- if (events & BEV_EVENT_EOF) {
- printf("Connection closed.\n");
- } else if (events & BEV_EVENT_ERROR) {
- printf("Got an error on the connection: %s\n",
- strerror(errno));/*XXX win32*/
- }
- /* None of the other events can happen here, since we haven't enabled
- * timeouts */
- bufferevent_free(bev);
-}
-
-static void
-signal_cb(evutil_socket_t sig, short events, void *user_data)
-{
- struct event_base *base = user_data;
- struct timeval delay = { 2, 0 };
-
- printf("Caught an interrupt signal; exiting cleanly in two seconds.\n");
-
- event_base_loopexit(base, &delay);
-}
diff --git a/contrib/ntp/sntp/libevent/sample/hostcheck.c b/contrib/ntp/sntp/libevent/sample/hostcheck.c
deleted file mode 100644
index 50709369c07e..000000000000
--- a/contrib/ntp/sntp/libevent/sample/hostcheck.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
- *
- * You may opt to use, copy, modify, merge, publish, distribute and/or sell
- * copies of the Software, and permit persons to whom the Software is
- * furnished to do so, under the terms of the COPYING file.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ***************************************************************************/
-
-/* This file is an amalgamation of hostcheck.c and most of rawstr.c
- from cURL. The contents of the COPYING file mentioned above are:
-
-COPYRIGHT AND PERMISSION NOTICE
-
-Copyright (c) 1996 - 2013, Daniel Stenberg, <daniel@haxx.se>.
-
-All rights reserved.
-
-Permission to use, copy, modify, and distribute this software for any purpose
-with or without fee is hereby granted, provided that the above copyright
-notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
-NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
-OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of a copyright holder shall not
-be used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization of the copyright holder.
-*/
-
-#include "hostcheck.h"
-#include <string.h>
-
-/* Portable, consistent toupper (remember EBCDIC). Do not use toupper() because
- its behavior is altered by the current locale. */
-static char Curl_raw_toupper(char in)
-{
- switch (in) {
- case 'a':
- return 'A';
- case 'b':
- return 'B';
- case 'c':
- return 'C';
- case 'd':
- return 'D';
- case 'e':
- return 'E';
- case 'f':
- return 'F';
- case 'g':
- return 'G';
- case 'h':
- return 'H';
- case 'i':
- return 'I';
- case 'j':
- return 'J';
- case 'k':
- return 'K';
- case 'l':
- return 'L';
- case 'm':
- return 'M';
- case 'n':
- return 'N';
- case 'o':
- return 'O';
- case 'p':
- return 'P';
- case 'q':
- return 'Q';
- case 'r':
- return 'R';
- case 's':
- return 'S';
- case 't':
- return 'T';
- case 'u':
- return 'U';
- case 'v':
- return 'V';
- case 'w':
- return 'W';
- case 'x':
- return 'X';
- case 'y':
- return 'Y';
- case 'z':
- return 'Z';
- }
- return in;
-}
-
-/*
- * Curl_raw_equal() is for doing "raw" case insensitive strings. This is meant
- * to be locale independent and only compare strings we know are safe for
- * this. See http://daniel.haxx.se/blog/2008/10/15/strcasecmp-in-turkish/ for
- * some further explanation to why this function is necessary.
- *
- * The function is capable of comparing a-z case insensitively even for
- * non-ascii.
- */
-
-static int Curl_raw_equal(const char *first, const char *second)
-{
- while(*first && *second) {
- if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
- /* get out of the loop as soon as they don't match */
- break;
- first++;
- second++;
- }
- /* we do the comparison here (possibly again), just to make sure that if the
- loop above is skipped because one of the strings reached zero, we must not
- return this as a successful match */
- return (Curl_raw_toupper(*first) == Curl_raw_toupper(*second));
-}
-
-static int Curl_raw_nequal(const char *first, const char *second, size_t max)
-{
- while(*first && *second && max) {
- if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) {
- break;
- }
- max--;
- first++;
- second++;
- }
- if(0 == max)
- return 1; /* they are equal this far */
-
- return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
-}
-
-/*
- * Match a hostname against a wildcard pattern.
- * E.g.
- * "foo.host.com" matches "*.host.com".
- *
- * We use the matching rule described in RFC6125, section 6.4.3.
- * http://tools.ietf.org/html/rfc6125#section-6.4.3
- */
-
-static int hostmatch(const char *hostname, const char *pattern)
-{
- const char *pattern_label_end, *pattern_wildcard, *hostname_label_end;
- int wildcard_enabled;
- size_t prefixlen, suffixlen;
- pattern_wildcard = strchr(pattern, '*');
- if(pattern_wildcard == NULL)
- return Curl_raw_equal(pattern, hostname) ?
- CURL_HOST_MATCH : CURL_HOST_NOMATCH;
-
- /* We require at least 2 dots in pattern to avoid too wide wildcard
- match. */
- wildcard_enabled = 1;
- pattern_label_end = strchr(pattern, '.');
- if(pattern_label_end == NULL || strchr(pattern_label_end+1, '.') == NULL ||
- pattern_wildcard > pattern_label_end ||
- Curl_raw_nequal(pattern, "xn--", 4)) {
- wildcard_enabled = 0;
- }
- if(!wildcard_enabled)
- return Curl_raw_equal(pattern, hostname) ?
- CURL_HOST_MATCH : CURL_HOST_NOMATCH;
-
- hostname_label_end = strchr(hostname, '.');
- if(hostname_label_end == NULL ||
- !Curl_raw_equal(pattern_label_end, hostname_label_end))
- return CURL_HOST_NOMATCH;
-
- /* The wildcard must match at least one character, so the left-most
- label of the hostname is at least as large as the left-most label
- of the pattern. */
- if(hostname_label_end - hostname < pattern_label_end - pattern)
- return CURL_HOST_NOMATCH;
-
- prefixlen = pattern_wildcard - pattern;
- suffixlen = pattern_label_end - (pattern_wildcard+1);
- return Curl_raw_nequal(pattern, hostname, prefixlen) &&
- Curl_raw_nequal(pattern_wildcard+1, hostname_label_end - suffixlen,
- suffixlen) ?
- CURL_HOST_MATCH : CURL_HOST_NOMATCH;
-}
-
-int Curl_cert_hostcheck(const char *match_pattern, const char *hostname)
-{
- if(!match_pattern || !*match_pattern ||
- !hostname || !*hostname) /* sanity check */
- return 0;
-
- if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */
- return 1;
-
- if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH)
- return 1;
- return 0;
-}
diff --git a/contrib/ntp/sntp/libevent/sample/hostcheck.h b/contrib/ntp/sntp/libevent/sample/hostcheck.h
deleted file mode 100644
index f40bc4343501..000000000000
--- a/contrib/ntp/sntp/libevent/sample/hostcheck.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef HEADER_CURL_HOSTCHECK_H
-#define HEADER_CURL_HOSTCHECK_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
- *
- * You may opt to use, copy, modify, merge, publish, distribute and/or sell
- * copies of the Software, and permit persons to whom the Software is
- * furnished to do so, under the terms of the COPYING file.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ***************************************************************************/
-
-#define CURL_HOST_NOMATCH 0
-#define CURL_HOST_MATCH 1
-int Curl_cert_hostcheck(const char *match_pattern, const char *hostname);
-
-#endif /* HEADER_CURL_HOSTCHECK_H */
-
diff --git a/contrib/ntp/sntp/libevent/sample/http-server.c b/contrib/ntp/sntp/libevent/sample/http-server.c
deleted file mode 100644
index cbb9c914dd8f..000000000000
--- a/contrib/ntp/sntp/libevent/sample/http-server.c
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- A trivial static http webserver using Libevent's evhttp.
-
- This is not the best code in the world, and it does some fairly stupid stuff
- that you would never want to do in a production webserver. Caveat hackor!
-
- */
-
-/* Compatibility for possible missing IPv6 declarations */
-#include "../util-internal.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef _WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <windows.h>
-#include <io.h>
-#include <fcntl.h>
-#ifndef S_ISDIR
-#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
-#endif
-#else
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <dirent.h>
-#endif
-
-#include <event2/event.h>
-#include <event2/http.h>
-#include <event2/buffer.h>
-#include <event2/util.h>
-#include <event2/keyvalq_struct.h>
-
-#ifdef EVENT__HAVE_NETINET_IN_H
-#include <netinet/in.h>
-# ifdef _XOPEN_SOURCE_EXTENDED
-# include <arpa/inet.h>
-# endif
-#endif
-
-#ifdef _WIN32
-#ifndef stat
-#define stat _stat
-#endif
-#ifndef fstat
-#define fstat _fstat
-#endif
-#ifndef open
-#define open _open
-#endif
-#ifndef close
-#define close _close
-#endif
-#ifndef O_RDONLY
-#define O_RDONLY _O_RDONLY
-#endif
-#endif
-
-char uri_root[512];
-
-static const struct table_entry {
- const char *extension;
- const char *content_type;
-} content_type_table[] = {
- { "txt", "text/plain" },
- { "c", "text/plain" },
- { "h", "text/plain" },
- { "html", "text/html" },
- { "htm", "text/htm" },
- { "css", "text/css" },
- { "gif", "image/gif" },
- { "jpg", "image/jpeg" },
- { "jpeg", "image/jpeg" },
- { "png", "image/png" },
- { "pdf", "application/pdf" },
- { "ps", "application/postsript" },
- { NULL, NULL },
-};
-
-/* Try to guess a good content-type for 'path' */
-static const char *
-guess_content_type(const char *path)
-{
- const char *last_period, *extension;
- const struct table_entry *ent;
- last_period = strrchr(path, '.');
- if (!last_period || strchr(last_period, '/'))
- goto not_found; /* no exension */
- extension = last_period + 1;
- for (ent = &content_type_table[0]; ent->extension; ++ent) {
- if (!evutil_ascii_strcasecmp(ent->extension, extension))
- return ent->content_type;
- }
-
-not_found:
- return "application/misc";
-}
-
-/* Callback used for the /dump URI, and for every non-GET request:
- * dumps all information to stdout and gives back a trivial 200 ok */
-static void
-dump_request_cb(struct evhttp_request *req, void *arg)
-{
- const char *cmdtype;
- struct evkeyvalq *headers;
- struct evkeyval *header;
- struct evbuffer *buf;
-
- switch (evhttp_request_get_command(req)) {
- case EVHTTP_REQ_GET: cmdtype = "GET"; break;
- case EVHTTP_REQ_POST: cmdtype = "POST"; break;
- case EVHTTP_REQ_HEAD: cmdtype = "HEAD"; break;
- case EVHTTP_REQ_PUT: cmdtype = "PUT"; break;
- case EVHTTP_REQ_DELETE: cmdtype = "DELETE"; break;
- case EVHTTP_REQ_OPTIONS: cmdtype = "OPTIONS"; break;
- case EVHTTP_REQ_TRACE: cmdtype = "TRACE"; break;
- case EVHTTP_REQ_CONNECT: cmdtype = "CONNECT"; break;
- case EVHTTP_REQ_PATCH: cmdtype = "PATCH"; break;
- default: cmdtype = "unknown"; break;
- }
-
- printf("Received a %s request for %s\nHeaders:\n",
- cmdtype, evhttp_request_get_uri(req));
-
- headers = evhttp_request_get_input_headers(req);
- for (header = headers->tqh_first; header;
- header = header->next.tqe_next) {
- printf(" %s: %s\n", header->key, header->value);
- }
-
- buf = evhttp_request_get_input_buffer(req);
- puts("Input data: <<<");
- while (evbuffer_get_length(buf)) {
- int n;
- char cbuf[128];
- n = evbuffer_remove(buf, cbuf, sizeof(cbuf));
- if (n > 0)
- (void) fwrite(cbuf, 1, n, stdout);
- }
- puts(">>>");
-
- evhttp_send_reply(req, 200, "OK", NULL);
-}
-
-/* This callback gets invoked when we get any http request that doesn't match
- * any other callback. Like any evhttp server callback, it has a simple job:
- * it must eventually call evhttp_send_error() or evhttp_send_reply().
- */
-static void
-send_document_cb(struct evhttp_request *req, void *arg)
-{
- struct evbuffer *evb = NULL;
- const char *docroot = arg;
- const char *uri = evhttp_request_get_uri(req);
- struct evhttp_uri *decoded = NULL;
- const char *path;
- char *decoded_path;
- char *whole_path = NULL;
- size_t len;
- int fd = -1;
- struct stat st;
-
- if (evhttp_request_get_command(req) != EVHTTP_REQ_GET) {
- dump_request_cb(req, arg);
- return;
- }
-
- printf("Got a GET request for <%s>\n", uri);
-
- /* Decode the URI */
- decoded = evhttp_uri_parse(uri);
- if (!decoded) {
- printf("It's not a good URI. Sending BADREQUEST\n");
- evhttp_send_error(req, HTTP_BADREQUEST, 0);
- return;
- }
-
- /* Let's see what path the user asked for. */
- path = evhttp_uri_get_path(decoded);
- if (!path) path = "/";
-
- /* We need to decode it, to see what path the user really wanted. */
- decoded_path = evhttp_uridecode(path, 0, NULL);
- if (decoded_path == NULL)
- goto err;
- /* Don't allow any ".."s in the path, to avoid exposing stuff outside
- * of the docroot. This test is both overzealous and underzealous:
- * it forbids aceptable paths like "/this/one..here", but it doesn't
- * do anything to prevent symlink following." */
- if (strstr(decoded_path, ".."))
- goto err;
-
- len = strlen(decoded_path)+strlen(docroot)+2;
- if (!(whole_path = malloc(len))) {
- perror("malloc");
- goto err;
- }
- evutil_snprintf(whole_path, len, "%s/%s", docroot, decoded_path);
-
- if (stat(whole_path, &st)<0) {
- goto err;
- }
-
- /* This holds the content we're sending. */
- evb = evbuffer_new();
-
- if (S_ISDIR(st.st_mode)) {
- /* If it's a directory, read the comments and make a little
- * index page */
-#ifdef _WIN32
- HANDLE d;
- WIN32_FIND_DATAA ent;
- char *pattern;
- size_t dirlen;
-#else
- DIR *d;
- struct dirent *ent;
-#endif
- const char *trailing_slash = "";
-
- if (!strlen(path) || path[strlen(path)-1] != '/')
- trailing_slash = "/";
-
-#ifdef _WIN32
- dirlen = strlen(whole_path);
- pattern = malloc(dirlen+3);
- memcpy(pattern, whole_path, dirlen);
- pattern[dirlen] = '\\';
- pattern[dirlen+1] = '*';
- pattern[dirlen+2] = '\0';
- d = FindFirstFileA(pattern, &ent);
- free(pattern);
- if (d == INVALID_HANDLE_VALUE)
- goto err;
-#else
- if (!(d = opendir(whole_path)))
- goto err;
-#endif
-
- 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"
- " <body>\n"
- " <h1>%s</h1>\n"
- " <ul>\n",
- decoded_path, /* XXX html-escape this. */
- path, /* XXX html-escape this? */
- trailing_slash,
- decoded_path /* XXX html-escape this */);
-#ifdef _WIN32
- do {
- const char *name = ent.cFileName;
-#else
- while ((ent = readdir(d))) {
- const char *name = ent->d_name;
-#endif
- evbuffer_add_printf(evb,
- " <li><a href=\"%s\">%s</a>\n",
- name, name);/* XXX escape this */
-#ifdef _WIN32
- } while (FindNextFileA(d, &ent));
-#else
- }
-#endif
- evbuffer_add_printf(evb, "</ul></body></html>\n");
-#ifdef _WIN32
- FindClose(d);
-#else
- closedir(d);
-#endif
- evhttp_add_header(evhttp_request_get_output_headers(req),
- "Content-Type", "text/html");
- } else {
- /* Otherwise it's a file; add it to the buffer to get
- * sent via sendfile */
- const char *type = guess_content_type(decoded_path);
- if ((fd = open(whole_path, O_RDONLY)) < 0) {
- perror("open");
- goto err;
- }
-
- if (fstat(fd, &st)<0) {
- /* Make sure the length still matches, now that we
- * opened the file :/ */
- perror("fstat");
- goto err;
- }
- evhttp_add_header(evhttp_request_get_output_headers(req),
- "Content-Type", type);
- evbuffer_add_file(evb, fd, 0, st.st_size);
- }
-
- evhttp_send_reply(req, 200, "OK", evb);
- goto done;
-err:
- evhttp_send_error(req, 404, "Document was not found");
- if (fd>=0)
- close(fd);
-done:
- if (decoded)
- evhttp_uri_free(decoded);
- if (decoded_path)
- free(decoded_path);
- if (whole_path)
- free(whole_path);
- if (evb)
- evbuffer_free(evb);
-}
-
-static void
-syntax(void)
-{
- fprintf(stdout, "Syntax: http-server <docroot>\n");
-}
-
-int
-main(int argc, char **argv)
-{
- struct event_base *base;
- struct evhttp *http;
- struct evhttp_bound_socket *handle;
-
- unsigned short port = 0;
-#ifdef _WIN32
- WSADATA WSAData;
- WSAStartup(0x101, &WSAData);
-#else
- if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
- return (1);
-#endif
- if (argc < 2) {
- syntax();
- return 1;
- }
-
- base = event_base_new();
- if (!base) {
- fprintf(stderr, "Couldn't create an event_base: exiting\n");
- return 1;
- }
-
- /* Create a new evhttp object to handle requests. */
- http = evhttp_new(base);
- if (!http) {
- fprintf(stderr, "couldn't create evhttp. Exiting.\n");
- return 1;
- }
-
- /* The /dump URI will dump all requests to stdout and say 200 ok. */
- evhttp_set_cb(http, "/dump", dump_request_cb, NULL);
-
- /* We want to accept arbitrary requests, so we need to set a "generic"
- * cb. We can also add callbacks for specific paths. */
- evhttp_set_gencb(http, send_document_cb, argv[1]);
-
- /* Now we tell the evhttp what port to listen on */
- handle = evhttp_bind_socket_with_handle(http, "0.0.0.0", port);
- if (!handle) {
- fprintf(stderr, "couldn't bind to port %d. Exiting.\n",
- (int)port);
- return 1;
- }
-
- {
- /* Extract and display the address we're listening on. */
- struct sockaddr_storage ss;
- evutil_socket_t fd;
- ev_socklen_t socklen = sizeof(ss);
- char addrbuf[128];
- void *inaddr;
- const char *addr;
- int got_port = -1;
- fd = evhttp_bound_socket_get_fd(handle);
- memset(&ss, 0, sizeof(ss));
- if (getsockname(fd, (struct sockaddr *)&ss, &socklen)) {
- perror("getsockname() failed");
- return 1;
- }
- if (ss.ss_family == AF_INET) {
- got_port = ntohs(((struct sockaddr_in*)&ss)->sin_port);
- inaddr = &((struct sockaddr_in*)&ss)->sin_addr;
- } else if (ss.ss_family == AF_INET6) {
- got_port = ntohs(((struct sockaddr_in6*)&ss)->sin6_port);
- inaddr = &((struct sockaddr_in6*)&ss)->sin6_addr;
- } else {
- fprintf(stderr, "Weird address family %d\n",
- ss.ss_family);
- return 1;
- }
- addr = evutil_inet_ntop(ss.ss_family, inaddr, addrbuf,
- sizeof(addrbuf));
- if (addr) {
- printf("Listening on %s:%d\n", addr, got_port);
- evutil_snprintf(uri_root, sizeof(uri_root),
- "http://%s:%d",addr,got_port);
- } else {
- fprintf(stderr, "evutil_inet_ntop failed\n");
- return 1;
- }
- }
-
- event_base_dispatch(base);
-
- return 0;
-}
diff --git a/contrib/ntp/sntp/libevent/sample/https-client.c b/contrib/ntp/sntp/libevent/sample/https-client.c
deleted file mode 100644
index fbd5de8c59c2..000000000000
--- a/contrib/ntp/sntp/libevent/sample/https-client.c
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- This is an example of how to hook up evhttp with bufferevent_ssl
-
- It just GETs an https URL given on the command-line and prints the response
- body to stdout.
-
- Actually, it also accepts plain http URLs to make it easy to compare http vs
- https code paths.
-
- Loosely based on le-proxy.c.
- */
-
-// Get rid of OSX 10.7 and greater deprecation warnings.
-#if defined(__APPLE__) && defined(__clang__)
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
-#include <stdio.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#ifdef _WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-
-#define snprintf _snprintf
-#define strcasecmp _stricmp
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#endif
-
-#include <event2/bufferevent_ssl.h>
-#include <event2/bufferevent.h>
-#include <event2/buffer.h>
-#include <event2/listener.h>
-#include <event2/util.h>
-#include <event2/http.h>
-
-#include <openssl/ssl.h>
-#include <openssl/err.h>
-#include <openssl/rand.h>
-
-#include "openssl_hostname_validation.h"
-
-static struct event_base *base;
-static int ignore_cert = 0;
-
-static void
-http_request_done(struct evhttp_request *req, void *ctx)
-{
- char buffer[256];
- int nread;
-
- if (req == NULL) {
- /* If req is NULL, it means an error occurred, but
- * sadly we are mostly left guessing what the error
- * might have been. We'll do our best... */
- struct bufferevent *bev = (struct bufferevent *) ctx;
- unsigned long oslerr;
- int printed_err = 0;
- int errcode = EVUTIL_SOCKET_ERROR();
- fprintf(stderr, "some request failed - no idea which one though!\n");
- /* Print out the OpenSSL error queue that libevent
- * squirreled away for us, if any. */
- while ((oslerr = bufferevent_get_openssl_error(bev))) {
- ERR_error_string_n(oslerr, buffer, sizeof(buffer));
- fprintf(stderr, "%s\n", buffer);
- printed_err = 1;
- }
- /* If the OpenSSL error queue was empty, maybe it was a
- * socket error; let's try printing that. */
- if (! printed_err)
- fprintf(stderr, "socket error = %s (%d)\n",
- evutil_socket_error_to_string(errcode),
- errcode);
- return;
- }
-
- fprintf(stderr, "Response line: %d %s\n",
- evhttp_request_get_response_code(req),
- evhttp_request_get_response_code_line(req));
-
- while ((nread = evbuffer_remove(evhttp_request_get_input_buffer(req),
- buffer, sizeof(buffer)))
- > 0) {
- /* These are just arbitrary chunks of 256 bytes.
- * They are not lines, so we can't treat them as such. */
- fwrite(buffer, nread, 1, stdout);
- }
-}
-
-static void
-syntax(void)
-{
- fputs("Syntax:\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);
-
- exit(1);
-}
-
-static void
-die(const char *msg)
-{
- fputs(msg, stderr);
- exit(1);
-}
-
-static void
-die_openssl(const char *func)
-{
- fprintf (stderr, "%s failed:\n", func);
-
- /* This is the OpenSSL function that prints the contents of the
- * error stack to the specified file handle. */
- ERR_print_errors_fp (stderr);
-
- exit(1);
-}
-
-/* See http://archives.seul.org/libevent/users/Jan-2013/msg00039.html */
-static int cert_verify_callback(X509_STORE_CTX *x509_ctx, void *arg)
-{
- char cert_str[256];
- const char *host = (const char *) arg;
- const char *res_str = "X509_verify_cert failed";
- HostnameValidationResult res = Error;
-
- /* This is the function that OpenSSL would call if we hadn't called
- * SSL_CTX_set_cert_verify_callback(). Therefore, we are "wrapping"
- * the default functionality, rather than replacing it. */
- int ok_so_far = 0;
-
- X509 *server_cert = NULL;
-
- if (ignore_cert) {
- return 1;
- }
-
- ok_so_far = X509_verify_cert(x509_ctx);
-
- server_cert = X509_STORE_CTX_get_current_cert(x509_ctx);
-
- if (ok_so_far) {
- res = validate_hostname(host, server_cert);
-
- switch (res) {
- case MatchFound:
- res_str = "MatchFound";
- break;
- case MatchNotFound:
- res_str = "MatchNotFound";
- break;
- case NoSANPresent:
- res_str = "NoSANPresent";
- break;
- case MalformedCertificate:
- res_str = "MalformedCertificate";
- break;
- case Error:
- res_str = "Error";
- break;
- default:
- res_str = "WTF!";
- break;
- }
- }
-
- X509_NAME_oneline(X509_get_subject_name (server_cert),
- cert_str, sizeof (cert_str));
-
- if (res == MatchFound) {
- printf("https server '%s' has this certificate, "
- "which looks good to me:\n%s\n",
- host, cert_str);
- return 1;
- } else {
- printf("Got '%s' for hostname '%s' and certificate:\n%s\n",
- res_str, host, cert_str);
- return 0;
- }
-}
-
-int
-main(int argc, char **argv)
-{
- int r;
-
- struct evhttp_uri *http_uri;
- const char *url = NULL, *data_file = NULL;
- const char *scheme, *host, *path, *query;
- char uri[256];
- int port;
- int retries = 0;
-
- SSL_CTX *ssl_ctx;
- SSL *ssl;
- struct bufferevent *bev;
- struct evhttp_connection *evcon;
- struct evhttp_request *req;
- struct evkeyvalq *output_headers;
- struct evbuffer * output_buffer;
-
- int i;
-
- for (i = 1; i < argc; i++) {
- if (!strcmp("-url", argv[i])) {
- if (i < argc - 1) {
- url = argv[i + 1];
- } else {
- syntax();
- }
- } else if (!strcmp("-ignore-cert", argv[i])) {
- ignore_cert = 1;
- } else if (!strcmp("-data", argv[i])) {
- if (i < argc - 1) {
- data_file = argv[i + 1];
- } 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();
- }
- }
-
- if (!url) {
- syntax();
- }
-
-#ifdef _WIN32
- {
- WORD wVersionRequested;
- WSADATA wsaData;
- int err;
-
- wVersionRequested = MAKEWORD(2, 2);
-
- err = WSAStartup(wVersionRequested, &wsaData);
- if (err != 0) {
- printf("WSAStartup failed with error: %d\n", err);
- return 1;
- }
- }
-#endif // _WIN32
-
- http_uri = evhttp_uri_parse(url);
- if (http_uri == NULL) {
- die("malformed url");
- }
-
- scheme = evhttp_uri_get_scheme(http_uri);
- if (scheme == NULL || (strcasecmp(scheme, "https") != 0 &&
- strcasecmp(scheme, "http") != 0)) {
- die("url must be http or https");
- }
-
- host = evhttp_uri_get_host(http_uri);
- if (host == NULL) {
- die("url must have a host");
- }
-
- port = evhttp_uri_get_port(http_uri);
- if (port == -1) {
- port = (strcasecmp(scheme, "http") == 0) ? 80 : 443;
- }
-
- path = evhttp_uri_get_path(http_uri);
- if (path == NULL) {
- path = "/";
- }
-
- query = evhttp_uri_get_query(http_uri);
- if (query == NULL) {
- snprintf(uri, sizeof(uri) - 1, "%s", path);
- } else {
- snprintf(uri, sizeof(uri) - 1, "%s?%s", path, query);
- }
- uri[sizeof(uri) - 1] = '\0';
-
- // Initialize OpenSSL
- SSL_library_init();
- ERR_load_crypto_strings();
- SSL_load_error_strings();
- OpenSSL_add_all_algorithms();
-
- /* This isn't strictly necessary... OpenSSL performs RAND_poll
- * automatically on first use of random number generator. */
- r = RAND_poll();
- if (r == 0) {
- die_openssl("RAND_poll");
- }
-
- /* Create a new OpenSSL context */
- ssl_ctx = SSL_CTX_new(SSLv23_method());
- if (!ssl_ctx)
- die_openssl("SSL_CTX_new");
-
- #ifndef _WIN32
- /* TODO: Add certificate loading on Windows as well */
-
- /* Attempt to use the system's trusted root certificates.
- * (This path is only valid for Debian-based systems.) */
- if (1 != SSL_CTX_load_verify_locations(ssl_ctx,
- "/etc/ssl/certs/ca-certificates.crt",
- NULL))
- die_openssl("SSL_CTX_load_verify_locations");
- /* Ask OpenSSL to verify the server certificate. Note that this
- * does NOT include verifying that the hostname is correct.
- * So, by itself, this means anyone with any legitimate
- * CA-issued certificate for any website, can impersonate any
- * other website in the world. This is not good. See "The
- * Most Dangerous Code in the World" article at
- * https://crypto.stanford.edu/~dabo/pubs/abstracts/ssl-client-bugs.html
- */
- SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, NULL);
- /* This is how we solve the problem mentioned in the previous
- * comment. We "wrap" OpenSSL's validation routine in our
- * own routine, which also validates the hostname by calling
- * the code provided by iSECPartners. Note that even though
- * the "Everything You've Always Wanted to Know About
- * Certificate Validation With OpenSSL (But Were Afraid to
- * Ask)" paper from iSECPartners says very explicitly not to
- * call SSL_CTX_set_cert_verify_callback (at the bottom of
- * page 2), what we're doing here is safe because our
- * cert_verify_callback() calls X509_verify_cert(), which is
- * OpenSSL's built-in routine which would have been called if
- * we hadn't set the callback. Therefore, we're just
- * "wrapping" OpenSSL's routine, not replacing it. */
- SSL_CTX_set_cert_verify_callback (ssl_ctx, cert_verify_callback,
- (void *) host);
- #endif // not _WIN32
-
- // Create event base
- base = event_base_new();
- if (!base) {
- perror("event_base_new()");
- return 1;
- }
-
- // Create OpenSSL bufferevent and stack evhttp on top of it
- ssl = SSL_new(ssl_ctx);
- if (ssl == NULL) {
- 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);
- } else {
- bev = bufferevent_openssl_socket_new(base, -1, ssl,
- BUFFEREVENT_SSL_CONNECTING,
- BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
- }
-
- if (bev == NULL) {
- fprintf(stderr, "bufferevent_openssl_socket_new() failed\n");
- return 1;
- }
-
- bufferevent_openssl_set_allow_dirty_shutdown(bev, 1);
-
- // For simplicity, we let DNS resolution block. Everything else should be
- // asynchronous though.
- evcon = evhttp_connection_base_bufferevent_new(base, NULL, bev,
- host, port);
- if (evcon == NULL) {
- fprintf(stderr, "evhttp_connection_base_bufferevent_new() failed\n");
- 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) {
- fprintf(stderr, "evhttp_request_new() failed\n");
- return 1;
- }
-
- output_headers = evhttp_request_get_output_headers(req);
- evhttp_add_header(output_headers, "Host", host);
- evhttp_add_header(output_headers, "Connection", "close");
-
- if (data_file) {
- /* NOTE: In production code, you'd probably want to use
- * evbuffer_add_file() or evbuffer_add_file_segment(), to
- * avoid needless copying. */
- FILE * f = fopen(data_file, "rb");
- char buf[1024];
- size_t s;
- size_t bytes = 0;
-
- if (!f) {
- syntax();
- }
-
- output_buffer = evhttp_request_get_output_buffer(req);
- while ((s = fread(buf, 1, sizeof(buf), f)) > 0) {
- evbuffer_add(output_buffer, buf, s);
- bytes += s;
- }
- evutil_snprintf(buf, sizeof(buf)-1, "%lu", (unsigned long)bytes);
- evhttp_add_header(output_headers, "Content-Length", buf);
- fclose(f);
- }
-
- r = evhttp_make_request(evcon, req, data_file ? EVHTTP_REQ_POST : EVHTTP_REQ_GET, uri);
- if (r != 0) {
- fprintf(stderr, "evhttp_make_request() failed\n");
- return 1;
- }
-
- event_base_dispatch(base);
-
- evhttp_connection_free(evcon);
- event_base_free(base);
-
-#ifdef _WIN32
- WSACleanup();
-#endif
-
- return 0;
-}
diff --git a/contrib/ntp/sntp/libevent/sample/include.am b/contrib/ntp/sntp/libevent/sample/include.am
deleted file mode 100644
index 75f87c70d961..000000000000
--- a/contrib/ntp/sntp/libevent/sample/include.am
+++ /dev/null
@@ -1,53 +0,0 @@
-# sample/include.am for libevent
-# Copyright 2000-2007 Niels Provos
-# Copyright 2007-2012 Niels Provos and Nick Mathewson
-#
-# See LICENSE for copying information.
-
-SAMPLES = \
- sample/dns-example \
- sample/event-read-fifo \
- sample/hello-world \
- sample/http-server \
- sample/signal-test \
- sample/time-test
-
-if OPENSSL
-SAMPLES += sample/le-proxy
-sample_le_proxy_SOURCES = sample/le-proxy.c
-sample_le_proxy_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
-sample_le_proxy_INCLUDES = $(OPENSSL_INCS)
-
-SAMPLES += sample/https-client
-sample_https_client_SOURCES = \
- sample/https-client.c \
- sample/hostcheck.c \
- sample/openssl_hostname_validation.c
-sample_https_client_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
-sample_https_client_INCLUDES = $(OPENSSL_INCS)
-noinst_HEADERS += \
- sample/hostcheck.h \
- sample/openssl_hostname_validation.h
-endif
-
-if BUILD_SAMPLES
-noinst_PROGRAMS += $(SAMPLES)
-endif
-
-$(SAMPLES) : libevent.la
-
-sample_event_read_fifo_SOURCES = sample/event-read-fifo.c
-sample_event_read_fifo_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_time_test_SOURCES = sample/time-test.c
-sample_time_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_signal_test_SOURCES = sample/signal-test.c
-sample_signal_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_dns_example_SOURCES = sample/dns-example.c
-sample_dns_example_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_hello_world_SOURCES = sample/hello-world.c
-sample_hello_world_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-sample_http_server_SOURCES = sample/http-server.c
-sample_http_server_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
-
-
-
diff --git a/contrib/ntp/sntp/libevent/sample/le-proxy.c b/contrib/ntp/sntp/libevent/sample/le-proxy.c
deleted file mode 100644
index 30e0a5f6b9c6..000000000000
--- a/contrib/ntp/sntp/libevent/sample/le-proxy.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- This example code shows how to write an (optionally encrypting) SSL proxy
- with Libevent's bufferevent layer.
-
- XXX It's a little ugly and should probably be cleaned up.
- */
-
-// Get rid of OSX 10.7 and greater deprecation warnings.
-#if defined(__APPLE__) && defined(__clang__)
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
-#include <stdio.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#ifdef _WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#endif
-
-#include <event2/bufferevent_ssl.h>
-#include <event2/bufferevent.h>
-#include <event2/buffer.h>
-#include <event2/listener.h>
-#include <event2/util.h>
-
-#include <openssl/ssl.h>
-#include <openssl/err.h>
-#include <openssl/rand.h>
-
-static struct event_base *base;
-static struct sockaddr_storage listen_on_addr;
-static struct sockaddr_storage connect_to_addr;
-static int connect_to_addrlen;
-static int use_wrapper = 1;
-
-static SSL_CTX *ssl_ctx = NULL;
-
-#define MAX_OUTPUT (512*1024)
-
-static void drained_writecb(struct bufferevent *bev, void *ctx);
-static void eventcb(struct bufferevent *bev, short what, void *ctx);
-
-static void
-readcb(struct bufferevent *bev, void *ctx)
-{
- struct bufferevent *partner = ctx;
- struct evbuffer *src, *dst;
- size_t len;
- src = bufferevent_get_input(bev);
- len = evbuffer_get_length(src);
- if (!partner) {
- evbuffer_drain(src, len);
- return;
- }
- dst = bufferevent_get_output(partner);
- evbuffer_add_buffer(dst, src);
-
- if (evbuffer_get_length(dst) >= MAX_OUTPUT) {
- /* We're giving the other side data faster than it can
- * pass it on. Stop reading here until we have drained the
- * other side to MAX_OUTPUT/2 bytes. */
- bufferevent_setcb(partner, readcb, drained_writecb,
- eventcb, bev);
- bufferevent_setwatermark(partner, EV_WRITE, MAX_OUTPUT/2,
- MAX_OUTPUT);
- bufferevent_disable(bev, EV_READ);
- }
-}
-
-static void
-drained_writecb(struct bufferevent *bev, void *ctx)
-{
- struct bufferevent *partner = ctx;
-
- /* We were choking the other side until we drained our outbuf a bit.
- * Now it seems drained. */
- bufferevent_setcb(bev, readcb, NULL, eventcb, partner);
- bufferevent_setwatermark(bev, EV_WRITE, 0, 0);
- if (partner)
- bufferevent_enable(partner, EV_READ);
-}
-
-static void
-close_on_finished_writecb(struct bufferevent *bev, void *ctx)
-{
- struct evbuffer *b = bufferevent_get_output(bev);
-
- if (evbuffer_get_length(b) == 0) {
- bufferevent_free(bev);
- }
-}
-
-static void
-eventcb(struct bufferevent *bev, short what, void *ctx)
-{
- struct bufferevent *partner = ctx;
-
- if (what & (BEV_EVENT_EOF|BEV_EVENT_ERROR)) {
- if (what & BEV_EVENT_ERROR) {
- unsigned long err;
- while ((err = (bufferevent_get_openssl_error(bev)))) {
- const char *msg = (const char*)
- ERR_reason_error_string(err);
- const char *lib = (const char*)
- ERR_lib_error_string(err);
- const char *func = (const char*)
- ERR_func_error_string(err);
- fprintf(stderr,
- "%s in %s %s\n", msg, lib, func);
- }
- if (errno)
- perror("connection error");
- }
-
- if (partner) {
- /* Flush all pending data */
- readcb(bev, ctx);
-
- if (evbuffer_get_length(
- bufferevent_get_output(partner))) {
- /* We still have to flush data from the other
- * side, but when that's done, close the other
- * side. */
- bufferevent_setcb(partner,
- NULL, close_on_finished_writecb,
- eventcb, NULL);
- bufferevent_disable(partner, EV_READ);
- } else {
- /* We have nothing left to say to the other
- * side; close it. */
- bufferevent_free(partner);
- }
- }
- bufferevent_free(bev);
- }
-}
-
-static void
-syntax(void)
-{
- fputs("Syntax:\n", stderr);
- fputs(" le-proxy [-s] [-W] <listen-on-addr> <connect-to-addr>\n", stderr);
- fputs("Example:\n", stderr);
- fputs(" le-proxy 127.0.0.1:8888 1.2.3.4:80\n", stderr);
-
- exit(1);
-}
-
-static void
-accept_cb(struct evconnlistener *listener, evutil_socket_t fd,
- struct sockaddr *a, int slen, void *p)
-{
- struct bufferevent *b_out, *b_in;
- /* Create two linked bufferevent objects: one to connect, one for the
- * new connection */
- b_in = bufferevent_socket_new(base, fd,
- BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
-
- if (!ssl_ctx || use_wrapper)
- b_out = bufferevent_socket_new(base, -1,
- BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
- else {
- SSL *ssl = SSL_new(ssl_ctx);
- b_out = bufferevent_openssl_socket_new(base, -1, ssl,
- BUFFEREVENT_SSL_CONNECTING,
- BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
- }
-
- assert(b_in && b_out);
-
- if (bufferevent_socket_connect(b_out,
- (struct sockaddr*)&connect_to_addr, connect_to_addrlen)<0) {
- perror("bufferevent_socket_connect");
- bufferevent_free(b_out);
- bufferevent_free(b_in);
- return;
- }
-
- if (ssl_ctx && use_wrapper) {
- struct bufferevent *b_ssl;
- SSL *ssl = SSL_new(ssl_ctx);
- b_ssl = bufferevent_openssl_filter_new(base,
- b_out, ssl, BUFFEREVENT_SSL_CONNECTING,
- BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
- if (!b_ssl) {
- perror("Bufferevent_openssl_new");
- bufferevent_free(b_out);
- bufferevent_free(b_in);
- }
- b_out = b_ssl;
- }
-
- bufferevent_setcb(b_in, readcb, NULL, eventcb, b_out);
- bufferevent_setcb(b_out, readcb, NULL, eventcb, b_in);
-
- bufferevent_enable(b_in, EV_READ|EV_WRITE);
- bufferevent_enable(b_out, EV_READ|EV_WRITE);
-}
-
-int
-main(int argc, char **argv)
-{
- int i;
- int socklen;
-
- int use_ssl = 0;
- struct evconnlistener *listener;
-
- if (argc < 3)
- syntax();
-
- for (i=1; i < argc; ++i) {
- if (!strcmp(argv[i], "-s")) {
- use_ssl = 1;
- } else if (!strcmp(argv[i], "-W")) {
- use_wrapper = 0;
- } else if (argv[i][0] == '-') {
- syntax();
- } else
- break;
- }
-
- if (i+2 != argc)
- syntax();
-
- memset(&listen_on_addr, 0, sizeof(listen_on_addr));
- socklen = sizeof(listen_on_addr);
- if (evutil_parse_sockaddr_port(argv[i],
- (struct sockaddr*)&listen_on_addr, &socklen)<0) {
- int p = atoi(argv[i]);
- struct sockaddr_in *sin = (struct sockaddr_in*)&listen_on_addr;
- if (p < 1 || p > 65535)
- syntax();
- sin->sin_port = htons(p);
- sin->sin_addr.s_addr = htonl(0x7f000001);
- sin->sin_family = AF_INET;
- socklen = sizeof(struct sockaddr_in);
- }
-
- memset(&connect_to_addr, 0, sizeof(connect_to_addr));
- connect_to_addrlen = sizeof(connect_to_addr);
- if (evutil_parse_sockaddr_port(argv[i+1],
- (struct sockaddr*)&connect_to_addr, &connect_to_addrlen)<0)
- syntax();
-
- base = event_base_new();
- if (!base) {
- perror("event_base_new()");
- return 1;
- }
-
- if (use_ssl) {
- int r;
- SSL_library_init();
- ERR_load_crypto_strings();
- SSL_load_error_strings();
- OpenSSL_add_all_algorithms();
- r = RAND_poll();
- if (r == 0) {
- fprintf(stderr, "RAND_poll() failed.\n");
- return 1;
- }
- ssl_ctx = SSL_CTX_new(SSLv23_method());
- }
-
- listener = evconnlistener_new_bind(base, accept_cb, NULL,
- LEV_OPT_CLOSE_ON_FREE|LEV_OPT_CLOSE_ON_EXEC|LEV_OPT_REUSEABLE,
- -1, (struct sockaddr*)&listen_on_addr, socklen);
-
- if (! listener) {
- fprintf(stderr, "Couldn't open listener.\n");
- event_base_free(base);
- return 1;
- }
- event_base_dispatch(base);
-
- evconnlistener_free(listener);
- event_base_free(base);
-
- return 0;
-}
diff --git a/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.c b/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.c
deleted file mode 100644
index b5adc67b8aaf..000000000000
--- a/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* Obtained from: https://github.com/iSECPartners/ssl-conservatory */
-
-/*
-Copyright (C) 2012, iSEC Partners.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
- */
-
-/*
- * Helper functions to perform basic hostname validation using OpenSSL.
- *
- * Please read "everything-you-wanted-to-know-about-openssl.pdf" before
- * attempting to use this code. This whitepaper describes how the code works,
- * how it should be used, and what its limitations are.
- *
- * Author: Alban Diquet
- * License: See LICENSE
- *
- */
-
-// Get rid of OSX 10.7 and greater deprecation warnings.
-#if defined(__APPLE__) && defined(__clang__)
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
-#include <openssl/x509v3.h>
-#include <openssl/ssl.h>
-
-#include "openssl_hostname_validation.h"
-#include "hostcheck.h"
-
-#define HOSTNAME_MAX_SIZE 255
-
-/**
-* Tries to find a match for hostname in the certificate's Common Name field.
-*
-* Returns MatchFound if a match was found.
-* Returns MatchNotFound if no matches were found.
-* Returns MalformedCertificate if the Common Name had a NUL character embedded in it.
-* Returns Error if the Common Name could not be extracted.
-*/
-static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) {
- int common_name_loc = -1;
- X509_NAME_ENTRY *common_name_entry = NULL;
- ASN1_STRING *common_name_asn1 = NULL;
- char *common_name_str = NULL;
-
- // Find the position of the CN field in the Subject field of the certificate
- common_name_loc = X509_NAME_get_index_by_NID(X509_get_subject_name((X509 *) server_cert), NID_commonName, -1);
- if (common_name_loc < 0) {
- return Error;
- }
-
- // Extract the CN field
- common_name_entry = X509_NAME_get_entry(X509_get_subject_name((X509 *) server_cert), common_name_loc);
- if (common_name_entry == NULL) {
- return Error;
- }
-
- // Convert the CN field to a C string
- common_name_asn1 = X509_NAME_ENTRY_get_data(common_name_entry);
- if (common_name_asn1 == NULL) {
- return Error;
- }
- common_name_str = (char *) ASN1_STRING_data(common_name_asn1);
-
- // Make sure there isn't an embedded NUL character in the CN
- if ((size_t)ASN1_STRING_length(common_name_asn1) != strlen(common_name_str)) {
- return MalformedCertificate;
- }
-
- // Compare expected hostname with the CN
- if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) {
- return MatchFound;
- }
- else {
- return MatchNotFound;
- }
-}
-
-
-/**
-* Tries to find a match for hostname in the certificate's Subject Alternative Name extension.
-*
-* Returns MatchFound if a match was found.
-* Returns MatchNotFound if no matches were found.
-* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
-* Returns NoSANPresent if the SAN extension was not present in the certificate.
-*/
-static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *server_cert) {
- HostnameValidationResult result = MatchNotFound;
- int i;
- int san_names_nb = -1;
- STACK_OF(GENERAL_NAME) *san_names = NULL;
-
- // Try to extract the names within the SAN extension from the certificate
- san_names = X509_get_ext_d2i((X509 *) server_cert, NID_subject_alt_name, NULL, NULL);
- if (san_names == NULL) {
- return NoSANPresent;
- }
- san_names_nb = sk_GENERAL_NAME_num(san_names);
-
- // Check each name within the extension
- for (i=0; i<san_names_nb; i++) {
- const GENERAL_NAME *current_name = sk_GENERAL_NAME_value(san_names, i);
-
- if (current_name->type == GEN_DNS) {
- // Current name is a DNS name, let's check it
- char *dns_name = (char *) ASN1_STRING_data(current_name->d.dNSName);
-
- // Make sure there isn't an embedded NUL character in the DNS name
- if ((size_t)ASN1_STRING_length(current_name->d.dNSName) != strlen(dns_name)) {
- result = MalformedCertificate;
- break;
- }
- else { // Compare expected hostname with the DNS name
- if (Curl_cert_hostcheck(dns_name, hostname)
- == CURL_HOST_MATCH) {
- result = MatchFound;
- break;
- }
- }
- }
- }
- sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
-
- return result;
-}
-
-
-/**
-* Validates the server's identity by looking for the expected hostname in the
-* server's certificate. As described in RFC 6125, it first tries to find a match
-* in the Subject Alternative Name extension. If the extension is not present in
-* the certificate, it checks the Common Name instead.
-*
-* Returns MatchFound if a match was found.
-* Returns MatchNotFound if no matches were found.
-* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
-* Returns Error if there was an error.
-*/
-HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) {
- HostnameValidationResult result;
-
- if((hostname == NULL) || (server_cert == NULL))
- return Error;
-
- // First try the Subject Alternative Names extension
- result = matches_subject_alternative_name(hostname, server_cert);
- if (result == NoSANPresent) {
- // Extension was not found: try the Common Name
- result = matches_common_name(hostname, server_cert);
- }
-
- return result;
-}
diff --git a/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.h b/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.h
deleted file mode 100644
index 54aa1c436d74..000000000000
--- a/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Obtained from: https://github.com/iSECPartners/ssl-conservatory */
-
-/*
-Copyright (C) 2012, iSEC Partners.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
- */
-
-/*
- * Helper functions to perform basic hostname validation using OpenSSL.
- *
- * Please read "everything-you-wanted-to-know-about-openssl.pdf" before
- * attempting to use this code. This whitepaper describes how the code works,
- * how it should be used, and what its limitations are.
- *
- * Author: Alban Diquet
- * License: See LICENSE
- *
- */
-
-typedef enum {
- MatchFound,
- MatchNotFound,
- NoSANPresent,
- MalformedCertificate,
- Error
-} HostnameValidationResult;
-
-/**
-* Validates the server's identity by looking for the expected hostname in the
-* server's certificate. As described in RFC 6125, it first tries to find a match
-* in the Subject Alternative Name extension. If the extension is not present in
-* the certificate, it checks the Common Name instead.
-*
-* Returns MatchFound if a match was found.
-* Returns MatchNotFound if no matches were found.
-* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
-* Returns Error if there was an error.
-*/
-HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert);
diff --git a/contrib/ntp/sntp/libevent/sample/signal-test.c b/contrib/ntp/sntp/libevent/sample/signal-test.c
deleted file mode 100644
index a61642f325e3..000000000000
--- a/contrib/ntp/sntp/libevent/sample/signal-test.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Compile with:
- * cc -I/usr/local/include -o signal-test \
- * signal-test.c -L/usr/local/lib -levent
- */
-
-#include <sys/types.h>
-
-#include <event2/event-config.h>
-
-#include <sys/stat.h>
-#ifndef _WIN32
-#include <sys/queue.h>
-#include <unistd.h>
-#include <sys/time.h>
-#else
-#include <winsock2.h>
-#include <windows.h>
-#endif
-#include <signal.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-
-#include <event2/event.h>
-
-#ifdef EVENT____func__
-#define __func__ EVENT____func__
-#endif
-
-int called = 0;
-
-static void
-signal_cb(evutil_socket_t fd, short event, void *arg)
-{
- struct event *signal = arg;
-
- printf("%s: got signal %d\n", __func__, event_get_signal(signal));
-
- if (called >= 2)
- event_del(signal);
-
- called++;
-}
-
-int
-main(int argc, char **argv)
-{
- struct event *signal_int;
- struct event_base* base;
-#ifdef _WIN32
- WORD wVersionRequested;
- WSADATA wsaData;
-
- wVersionRequested = MAKEWORD(2, 2);
-
- (void) WSAStartup(wVersionRequested, &wsaData);
-#endif
-
- /* Initalize the event library */
- base = event_base_new();
-
- /* Initalize one event */
- signal_int = evsignal_new(base, SIGINT, signal_cb, event_self_cbarg());
-
- event_add(signal_int, NULL);
-
- event_base_dispatch(base);
- event_base_free(base);
-
- return (0);
-}
-
diff --git a/contrib/ntp/sntp/libevent/sample/time-test.c b/contrib/ntp/sntp/libevent/sample/time-test.c
deleted file mode 100644
index c94c18a5004e..000000000000
--- a/contrib/ntp/sntp/libevent/sample/time-test.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * XXX This sample code was once meant to show how to use the basic Libevent
- * interfaces, but it never worked on non-Unix platforms, and some of the
- * interfaces have changed since it was first written. It should probably
- * be removed or replaced with something better.
- *
- * Compile with:
- * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
- */
-
-#include <sys/types.h>
-
-#include <event2/event-config.h>
-
-#include <sys/stat.h>
-#ifndef _WIN32
-#include <sys/queue.h>
-#include <unistd.h>
-#endif
-#include <time.h>
-#ifdef EVENT__HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-
-#include <event2/event.h>
-#include <event2/event_struct.h>
-#include <event2/util.h>
-
-#ifdef _WIN32
-#include <winsock2.h>
-#endif
-
-struct timeval lasttime;
-
-int event_is_persistent;
-
-static void
-timeout_cb(evutil_socket_t fd, short event, void *arg)
-{
- struct timeval newtime, difference;
- struct event *timeout = arg;
- double elapsed;
-
- evutil_gettimeofday(&newtime, NULL);
- evutil_timersub(&newtime, &lasttime, &difference);
- elapsed = difference.tv_sec +
- (difference.tv_usec / 1.0e6);
-
- printf("timeout_cb called at %d: %.3f seconds elapsed.\n",
- (int)newtime.tv_sec, elapsed);
- lasttime = newtime;
-
- if (! event_is_persistent) {
- struct timeval tv;
- evutil_timerclear(&tv);
- tv.tv_sec = 2;
- event_add(timeout, &tv);
- }
-}
-
-int
-main(int argc, char **argv)
-{
- struct event timeout;
- struct timeval tv;
- struct event_base *base;
- int flags;
-
-#ifdef _WIN32
- WORD wVersionRequested;
- WSADATA wsaData;
-
- wVersionRequested = MAKEWORD(2, 2);
-
- (void)WSAStartup(wVersionRequested, &wsaData);
-#endif
-
- if (argc == 2 && !strcmp(argv[1], "-p")) {
- event_is_persistent = 1;
- flags = EV_PERSIST;
- } else {
- event_is_persistent = 0;
- flags = 0;
- }
-
- /* Initalize the event library */
- base = event_base_new();
-
- /* Initalize one event */
- event_assign(&timeout, base, -1, flags, timeout_cb, (void*) &timeout);
-
- evutil_timerclear(&tv);
- tv.tv_sec = 2;
- event_add(&timeout, &tv);
-
- evutil_gettimeofday(&lasttime, NULL);
-
- event_base_dispatch(base);
-
- return (0);
-}
-
diff --git a/contrib/ntp/sntp/libevent/test/bench_httpclient.c b/contrib/ntp/sntp/libevent/test/bench_httpclient.c
index 22f174da5b66..1573e365bfd4 100644
--- a/contrib/ntp/sntp/libevent/test/bench_httpclient.c
+++ b/contrib/ntp/sntp/libevent/test/bench_httpclient.c
@@ -159,6 +159,10 @@ launch_request(void)
}
ri = malloc(sizeof(*ri));
+ if (ri == NULL) {
+ printf("Unable to allocate memory in launch_request()\n");
+ return -1;
+ }
ri->n_read = 0;
evutil_gettimeofday(&ri->started, NULL);
diff --git a/contrib/ntp/sntp/libevent/test/regress.c b/contrib/ntp/sntp/libevent/test/regress.c
index 399ba2fbd8d7..2d887f02f8ee 100644
--- a/contrib/ntp/sntp/libevent/test/regress.c
+++ b/contrib/ntp/sntp/libevent/test/regress.c
@@ -2823,6 +2823,10 @@ static void *
dummy_malloc(size_t len)
{
char *mem = malloc(len+16);
+ if (mem == NULL) {
+ fprintf(stderr, "Unable to allocate memory in dummy_malloc()\n");
+ return NULL;
+ }
memcpy(mem, "{[<guardedram>]}", 16);
return mem+16;
}
diff --git a/contrib/ntp/sntp/libevent/test/regress_dns.c b/contrib/ntp/sntp/libevent/test/regress_dns.c
index 6d6b48443df5..31811407e046 100644
--- a/contrib/ntp/sntp/libevent/test/regress_dns.c
+++ b/contrib/ntp/sntp/libevent/test/regress_dns.c
@@ -1322,7 +1322,7 @@ test_getaddrinfo_async(void *arg)
int n_dns_questions = 0;
struct evdns_base *dns_base;
- memset(a_out, 0, sizeof(a_out));
+ memset(&a_out, 0, sizeof(a_out));
memset(&local_outcome, 0, sizeof(local_outcome));
dns_base = evdns_base_new(data->base, 0);
@@ -1746,7 +1746,8 @@ end:
static void
gaic_launch(struct event_base *base, struct evdns_base *dns_base)
{
- struct gaic_request_status *status = calloc(1,sizeof(*status));
+ struct gaic_request_status *status = calloc(1, sizeof(*status));
+ tt_assert(status);
struct timeval tv = { 0, 10000 };
status->magic = GAIC_MAGIC;
status->base = base;
diff --git a/contrib/ntp/sntp/libevent/test/regress_http.c b/contrib/ntp/sntp/libevent/test/regress_http.c
index 35f6dd768961..147f6ff1a76a 100644
--- a/contrib/ntp/sntp/libevent/test/regress_http.c
+++ b/contrib/ntp/sntp/libevent/test/regress_http.c
@@ -367,6 +367,10 @@ http_chunked_cb(struct evhttp_request *req, void *arg)
struct timeval when = { 0, 0 };
struct chunk_req_state *state = malloc(sizeof(struct chunk_req_state));
event_debug(("%s: called\n", __func__));
+ if (state == NULL) {
+ fprintf(stderr, "Unable to allocate memory in http_chunked_cb()\n");
+ exit(1);
+ }
memset(state, 0, sizeof(struct chunk_req_state));
state->req = req;
diff --git a/contrib/ntp/sntp/libevent/test/regress_minheap.c b/contrib/ntp/sntp/libevent/test/regress_minheap.c
index 05db32e26f4d..24ff2933be2c 100644
--- a/contrib/ntp/sntp/libevent/test/regress_minheap.c
+++ b/contrib/ntp/sntp/libevent/test/regress_minheap.c
@@ -63,6 +63,7 @@ test_heap_randomized(void *ptr)
for (i = 0; i < 1024; ++i) {
inserted[i] = malloc(sizeof(struct event));
+ assert(inserted[i] != NULL);
set_random_timeout(inserted[i]);
min_heap_push_(&heap, inserted[i]);
}
diff --git a/contrib/ntp/sntp/libevent/test/test-ratelim.c b/contrib/ntp/sntp/libevent/test/test-ratelim.c
index 17babfdcbcf5..40a1b95984ef 100644
--- a/contrib/ntp/sntp/libevent/test/test-ratelim.c
+++ b/contrib/ntp/sntp/libevent/test/test-ratelim.c
@@ -340,6 +340,10 @@ test_ratelimiting(void)
bevs = calloc(cfg_n_connections, sizeof(struct bufferevent *));
states = calloc(cfg_n_connections, sizeof(struct client_state));
+ if (bevs == NULL || states == NULL) {
+ printf("Unable to allocate memory...\n");
+ return 1;
+ }
for (i = 0; i < cfg_n_connections; ++i) {
bevs[i] = bufferevent_socket_new(base, -1,
diff --git a/contrib/ntp/sntp/libevent/test/test-time.c b/contrib/ntp/sntp/libevent/test/test-time.c
index bcc7086df7ed..e7dff7d7265a 100644
--- a/contrib/ntp/sntp/libevent/test/test-time.c
+++ b/contrib/ntp/sntp/libevent/test/test-time.c
@@ -99,6 +99,7 @@ main(int argc, char **argv)
for (i = 0; i < NEVENT; i++) {
ev[i] = malloc(sizeof(struct event));
+ assert(ev[i] != NULL);
/* Initalize one event */
evtimer_set(ev[i], time_cb, ev[i]);
diff --git a/contrib/ntp/sntp/libopts/Makefile.in b/contrib/ntp/sntp/libopts/Makefile.in
index 4ca06b73abd8..1f138a201f83 100644
--- a/contrib/ntp/sntp/libopts/Makefile.in
+++ b/contrib/ntp/sntp/libopts/Makefile.in
@@ -236,6 +236,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -244,6 +245,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -297,6 +299,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_SYSLOG = @LIB_SYSLOG@
LIPO = @LIPO@
LN_S = @LN_S@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
diff --git a/contrib/ntp/sntp/libopts/compat/pathfind.c b/contrib/ntp/sntp/libopts/compat/pathfind.c
index 5c477caf07a6..d343dcc643de 100644
--- a/contrib/ntp/sntp/libopts/compat/pathfind.c
+++ b/contrib/ntp/sntp/libopts/compat/pathfind.c
@@ -115,9 +115,15 @@ make_absolute( char const * string, char const * dot_path )
if (!dot_path || *string == '/') {
result = strdup( string );
+ if (result == NULL) {
+ return NULL; /* couldn't allocate memory */
+ }
} else {
if (dot_path && dot_path[0]) {
result = malloc( 2 + strlen( dot_path ) + strlen( string ) );
+ if (result == NULL) {
+ return NULL; /* couldn't allocate memory */
+ }
strcpy( result, dot_path );
result_len = (int)strlen(result);
if (result[result_len - 1] != '/') {
@@ -126,6 +132,9 @@ make_absolute( char const * string, char const * dot_path )
}
} else {
result = malloc( 3 + strlen( string ) );
+ if (result == NULL) {
+ return NULL; /* couldn't allocate memory */
+ }
result[0] = '.'; result[1] = '/'; result[2] = '\0';
result_len = 2;
}
@@ -155,7 +164,9 @@ canonicalize_pathname( char *path )
/* The result cannot be larger than the input PATH. */
result = strdup( path );
-
+ if (result == NULL) {
+ return NULL; /* couldn't allocate memory */
+ }
stub_char = (*path == '/') ? '/' : '.';
/* Walk along RESULT looking for things to compact. */
diff --git a/contrib/ntp/sntp/log.c b/contrib/ntp/sntp/log.c
index d7034951528e..db6614d02710 100644
--- a/contrib/ntp/sntp/log.c
+++ b/contrib/ntp/sntp/log.c
@@ -2,7 +2,9 @@
#include "log.h"
-char *progname; /* for msyslog use too */
+const char *progname; /* for msyslog use too */
+
+static int counter = 0;
static void cleanup_log(void);
@@ -11,6 +13,7 @@ sntp_init_logging(
const char *prog
)
{
+
msyslog_term = TRUE;
init_logging(prog, 0, FALSE);
msyslog_term_pid = FALSE;
@@ -24,15 +27,21 @@ open_logfile(
)
{
change_logfile(logfile, FALSE);
+ counter = 1; //counter++;
atexit(cleanup_log);
}
-
+//not sure about this. Are the atexit() functions called by FIFO or LIFO order? The end result is PROBABLY the same
static void
cleanup_log(void)
{
- syslogit = TRUE;
- fflush(syslog_file);
- fclose(syslog_file);
- syslog_file = NULL;
+ //counter--;
+ //if(counter <= 0){
+ if(counter == 1){
+ syslogit = TRUE;
+ fflush(syslog_file);
+ fclose(syslog_file);
+ syslog_file = NULL;
+ counter = 0;
+ }
}
diff --git a/contrib/ntp/sntp/log.h b/contrib/ntp/sntp/log.h
index fdb2ba21bcad..2d047babcb12 100644
--- a/contrib/ntp/sntp/log.h
+++ b/contrib/ntp/sntp/log.h
@@ -22,6 +22,6 @@
void sntp_init_logging(const char *program);
void open_logfile(const char *logfile);
-extern char *progname; /* for msyslog use too */
+extern char const *progname; /* for msyslog use too */
#endif
diff --git a/contrib/ntp/sntp/m4/ntp_libevent.m4 b/contrib/ntp/sntp/m4/ntp_libevent.m4
index 54174f05a21a..895360ee7b76 100644
--- a/contrib/ntp/sntp/m4/ntp_libevent.m4
+++ b/contrib/ntp/sntp/m4/ntp_libevent.m4
@@ -64,6 +64,7 @@ AC_REQUIRE([NTP_ENABLE_LOCAL_LIBEVENT])dnl
ntp_libevent_min_version=m4_default([$1], [2.0.9])
ntp_libevent_tearoff=m4_default([$2], [libevent])
+AC_SUBST([CFLAGS_LIBEVENT])
AC_SUBST([CPPFLAGS_LIBEVENT])
AC_SUBST([LDADD_LIBEVENT])
@@ -78,6 +79,7 @@ case "$ntp_use_local_libevent" in
then
ntp_use_local_libevent=no
AC_MSG_NOTICE([Using the installed libevent])
+ CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
# HMS: I hope the following is accurate.
# We don't need -levent, we only need -levent_core.
@@ -106,6 +108,9 @@ case "$ntp_use_local_libevent" in
AC_MSG_RESULT([yes])
else
ntp_use_local_libevent=yes
+ # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
+ # is "pthreads"?
+ CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
AC_MSG_RESULT([no])
fi
;;
@@ -129,6 +134,22 @@ case "$ntp_use_local_libevent" in
esac
esac
+dnl AC_ARG_ENABLE(
+dnl [cflags-libevent],
+dnl [AC_HELP_STRING(
+dnl [--enable-cflags-libevent=-pthread],
+dnl [CFLAGS value to build with pthreads]
+dnl )],
+dnl [CFLAGS_LIBEVENT=$enableval],
+dnl [# See above about LIBISC_PTHREADS_NOTHREADS
+dnl case "$CFLAGS_LIBEVENT" in
+dnl '') CFLAGS_LIBEVENT="-pthread" ;;
+dnl *) ;;
+dnl esac]
+dnl )
+dnl AC_MSG_NOTICE([LIBISC_PTHREADS_NOTHREADS is <$LIBISC_PTHREADS_NOTHREADS>])
+dnl AC_MSG_NOTICE([CFLAGS_LIBEVENT is <$CFLAGS_LIBEVENT>])
+
AM_CONDITIONAL([BUILD_LIBEVENT], [test "x$ntp_use_local_libevent" = "xyes"])
]) dnl NTP_LIBEVENT_CHECK_NOBUILD
diff --git a/contrib/ntp/sntp/m4/ntp_libntp.m4 b/contrib/ntp/sntp/m4/ntp_libntp.m4
index 89b94b6d4ea2..01d82fcd5504 100644
--- a/contrib/ntp/sntp/m4/ntp_libntp.m4
+++ b/contrib/ntp/sntp/m4/ntp_libntp.m4
@@ -328,7 +328,8 @@ AC_ARG_ENABLE(
)
have_pthreads=no
case "$enable_thread_support" in
- yes)
+ no) ;;
+ *)
ol_found_pthreads=no
OL_THREAD_CHECK([ol_found_pthreads=yes])
case "$ol_found_pthreads" in
@@ -346,18 +347,6 @@ case "$enable_thread_support" in
yes)
PTHREAD_LIBS="$LTHREAD_LIBS"
have_pthreads=yes
- # Bug 2332: With GCC we need to force a reference to libgcc_s
- # (if libgcc_s exists) or the combination of
- # threads + setuid + mlockall does not work on linux because
- # thread cancellation fails to load libgcc_s with dlopen().
- # We have to pass this all as linker options to avoid argument
- # reordering by libtool.
- case "$GCC$with_gnu_ld" in
- yesyes)
- AC_CHECK_LIB([gcc_s], [exit],
- [PTHREAD_LIBS="$LTHREAD_LIBS -Wl,--no-as-needed,-lgcc_s,--as-needed"])
- ;;
- esac
esac
esac
esac
diff --git a/contrib/ntp/sntp/m4/ntp_problemtests.m4 b/contrib/ntp/sntp/m4/ntp_problemtests.m4
new file mode 100644
index 000000000000..4596e8505e73
--- /dev/null
+++ b/contrib/ntp/sntp/m4/ntp_problemtests.m4
@@ -0,0 +1,56 @@
+dnl ######################################################################
+dnl NTP_PROBLEM_TESTS
+dnl
+dnl Some platforms have problems building or running certain tests.
+dnl While we're in the initial phase of the deployment of the test
+dnl framework, sometimes we may need to disable these tests.
+dnl
+dnl This is where we do that.
+dnl
+AC_DEFUN([NTP_PROBLEM_TESTS], [
+case "$build" in
+ $host) cross=0 ;;
+ *) cross=1 ;;
+esac
+
+AC_MSG_CHECKING([if we want to enable tests with undiagnosed problems])
+AC_ARG_ENABLE(
+ [problem-tests],
+ [AS_HELP_STRING(
+ [--enable-problem-tests],
+ [+ enable tests with undiagnosed problems]
+ )],
+ [ntp_ept=$enableval],
+ [ntp_ept=yes]
+)
+AC_MSG_RESULT([$ntp_ept])
+
+AC_MSG_CHECKING([if we can run test-ntp_restrict])
+ntp_test_ntp_restrict="no"
+case "$ntp_ept:$cross:$host" in
+ no:0:*-*-solaris*) ;;
+ no:0:*-*-hpux-11.23*) ;;
+ *) ntp_test_ntp_restrict="yes" ;;
+esac
+AC_MSG_RESULT([$ntp_test_ntp_restrict])
+AM_CONDITIONAL([BUILD_TEST_NTP_RESTRICT], [test x$ntp_test_ntp_restrict = xyes])
+
+AC_MSG_CHECKING([if we can run test-ntp_scanner])
+ntp_test_ntp_scanner="no"
+case "$ntp_ept:$cross:$host" in
+ no:0:*-*-solaris*) ;;
+ *) ntp_test_ntp_scanner="yes" ;;
+esac
+AC_MSG_RESULT([$ntp_test_ntp_scanner])
+AM_CONDITIONAL([BUILD_TEST_NTP_SCANNER], [test x$ntp_test_ntp_scanner = xyes])
+
+AC_MSG_CHECKING([if we can run test-ntp_signd])
+ntp_test_ntp_signd="no"
+case "$ntp_ept:$cross:$host" in
+ no:0:*-*-solaris*) ;;
+ *) ntp_test_ntp_signd="yes" ;;
+esac
+AC_MSG_RESULT([$ntp_test_ntp_signd])
+AM_CONDITIONAL([BUILD_TEST_NTP_SIGND], [test x$ntp_test_ntp_signd = xyes])
+])
+dnl ======================================================================
diff --git a/contrib/ntp/sntp/m4/ntp_rlimit.m4 b/contrib/ntp/sntp/m4/ntp_rlimit.m4
index c1267b771374..b87d56751ea8 100644
--- a/contrib/ntp/sntp/m4/ntp_rlimit.m4
+++ b/contrib/ntp/sntp/m4/ntp_rlimit.m4
@@ -26,10 +26,15 @@ AC_CACHE_CHECK(
[ntp_cv_rlimit_memlock=no]
)]
)
+case "$host" in
+ *-*-*linux*)
+ ntp_dflt_rlimit_memlock="-1" ;;
+ *) ntp_dflt_rlimit_memlock="32" ;;
+esac
case "$ntp_cv_rlimit_memlock" in
yes)
AC_SUBST([HAVE_RLIMIT_MEMLOCK])
- HAVE_RLIMIT_MEMLOCK=" memlock 32"
+ HAVE_RLIMIT_MEMLOCK=" memlock $ntp_dflt_rlimit_memlock" ;;
esac
AC_CACHE_CHECK(
@@ -62,5 +67,59 @@ case "$ntp_cv_rlimit_stack" in
HAVE_RLIMIT_STACK=" stacksize 50"
esac
+# HMS: Only if we are doing the MLOCKALL stuff...
+AC_MSG_CHECKING([for the default number of 4k stack pages])
+AC_ARG_WITH(
+ [stack-limit],
+ [AS_HELP_STRING(
+ [--with-stack-limit],
+ [? =50 (200 for openbsd) 4k pages]
+ )],
+ [ans=$withval],
+ [ans=yes]
+)
+case "$ans" in
+ yes | no)
+ case "$host" in
+ *-*-openbsd*)
+ ans=200
+ ;;
+ *) ans=50
+ ;;
+ esac
+ ;;
+ [[1-9]][[0-9]]*)
+ ;;
+ *) AC_MSG_ERROR(["--with-stack-limit requires an integer argument."])
+ ;;
+esac
+AC_MSG_RESULT([$ans])
+AC_DEFINE_UNQUOTED([DFLT_RLIMIT_STACK], [$ans],
+ [Default number of 4k pages for RLIMIT_STACK])
+
+# HMS: only if we have RLIMIT_MEMLOCK
+AC_MSG_CHECKING([for the default number of megabytes to MEMLOCK])
+AC_ARG_WITH(
+ [memlock],
+ [AS_HELP_STRING(
+ [--with-memlock],
+ [? =32 (-1 on linux) megabytes]
+ )],
+ [ans=$withval],
+ [ans=yes]
+)
+case "$ans" in
+ yes | no)
+ ans=$ntp_dflt_rlimit_memlock
+ ;;
+ [[1-9]][[0-9]]*) ;;
+ *) AC_MSG_ERROR(["--with-memlock requires an integer argument."])
+ ;;
+esac
+AC_MSG_RESULT([$ans])
+AC_DEFINE_UNQUOTED([DFLT_RLIMIT_MEMLOCK], [$ans],
+ [Default number of megabytes for RLIMIT_MEMLOCK])
+
])dnl
+
dnl ======================================================================
diff --git a/contrib/ntp/sntp/m4/openldap-thread-check.m4 b/contrib/ntp/sntp/m4/openldap-thread-check.m4
index 33f9199ff300..7768a5c5b3b5 100644
--- a/contrib/ntp/sntp/m4/openldap-thread-check.m4
+++ b/contrib/ntp/sntp/m4/openldap-thread-check.m4
@@ -15,6 +15,9 @@ dnl <http://www.OpenLDAP.org/license.html>.
dnl
dnl --------------------------------------------------------------------
+dnl This file is a fragment of OpenLDAP's build/openldap.m4 and some
+dnl fragments of OpenLDAP's configure.ac .
+
# OL_THREAD_CHECK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
AC_DEFUN([OL_THREAD_CHECK], [
@@ -202,6 +205,8 @@ dnl [ol_cv_pthread_lpthread_lexc])
OL_PTHREAD_TRY([-lpthreads],[ol_cv_pthread_lib_lpthreads])
+AC_MSG_NOTICE([ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>])
+
if test $ol_link_threads != no ; then
LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
@@ -680,4 +685,8 @@ case "$ol_with_threads" in
esac
AC_LANG_RESTORE
+
+AC_SUBST(BUILD_THREAD)
+AC_SUBST(LTHREAD_LIBS)
+
])
diff --git a/contrib/ntp/sntp/m4/os_cflags.m4 b/contrib/ntp/sntp/m4/os_cflags.m4
index a2161e659ad3..4ff2ac0c0e76 100644
--- a/contrib/ntp/sntp/m4/os_cflags.m4
+++ b/contrib/ntp/sntp/m4/os_cflags.m4
@@ -2,7 +2,7 @@ dnl ######################################################################
dnl Specify additional compile options based on the OS and the compiler
AC_DEFUN([NTP_OS_CFLAGS], [
AC_MSG_CHECKING([additional compiler flags])
- # allow ntp_os_flags to be preset to skip this stuff
+ # allow ntp_os_cflags to be preset to skip this stuff
case "${ntp_os_cflags+set}" in
set)
;;
@@ -90,7 +90,7 @@ AC_DEFUN([NTP_OS_CFLAGS], [
;;
esac
esac
- case "$ntp_os_flags" in
+ case "$ntp_os_cflags" in
'')
ntp_os_cflags_msg="none needed"
;;
@@ -100,5 +100,35 @@ AC_DEFUN([NTP_OS_CFLAGS], [
CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
AC_MSG_RESULT([$ntp_os_cflags_msg])
AS_UNSET([ntp_os_cflags_msg])
+ ###
+ AC_MSG_CHECKING([additional linker flags])
+ # HMS: The following might still need tweaking
+ # allow ntp_os_ldflags to be preset to skip this stuff
+ case "${ntp_os_ldflags+set}" in
+ set)
+ ;;
+ *)
+ ntp_os_ldflags=
+ case "$host_os" in
+ hpux*)
+ case "$GCC" in
+ yes)
+ ntp_os_ldflags="-Wl,+allowdups"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case "$ntp_os_ldflags" in
+ '')
+ ntp_os_ldflags_msg="none needed"
+ ;;
+ *)
+ ntp_os_ldflags_msg="$ntp_os_ldflags"
+ esac
+ LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
+ AC_MSG_RESULT([$ntp_os_ldflags_msg])
+ AS_UNSET([ntp_os_ldflags_msg])
])
dnl ======================================================================
diff --git a/contrib/ntp/sntp/m4/version.m4 b/contrib/ntp/sntp/m4/version.m4
index b83123f3bee4..7d51426624ef 100644
--- a/contrib/ntp/sntp/m4/version.m4
+++ b/contrib/ntp/sntp/m4/version.m4
@@ -1 +1 @@
-m4_define([VERSION_NUMBER],[4.2.8p3])
+m4_define([VERSION_NUMBER],[4.2.8p4])
diff --git a/contrib/ntp/sntp/networking.c b/contrib/ntp/sntp/networking.c
index bef7352d3a63..ddd45efe3cb5 100644
--- a/contrib/ntp/sntp/networking.c
+++ b/contrib/ntp/sntp/networking.c
@@ -113,7 +113,7 @@ process_pkt (
l_fp sent_xmt;
l_fp resp_org;
- key_id = 0;
+ // key_id = 0;
pkt_key = NULL;
is_authentic = (HAVE_OPT(AUTHENTICATION)) ? 0 : -1;
diff --git a/contrib/ntp/sntp/scripts/Makefile.in b/contrib/ntp/sntp/scripts/Makefile.in
index 0eda41de0bf5..0494fc31a036 100644
--- a/contrib/ntp/sntp/scripts/Makefile.in
+++ b/contrib/ntp/sntp/scripts/Makefile.in
@@ -153,6 +153,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -161,6 +162,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -214,6 +216,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_SYSLOG = @LIB_SYSLOG@
LIPO = @LIPO@
LN_S = @LN_S@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
diff --git a/contrib/ntp/sntp/sntp-opts.c b/contrib/ntp/sntp/sntp-opts.c
index be05bb6dbab3..e46a80c43456 100644
--- a/contrib/ntp/sntp/sntp-opts.c
+++ b/contrib/ntp/sntp/sntp-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed June 29, 2015 at 04:23:20 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:30:23 PM by AutoGen 5.18.5
* 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.8p3\n"
+/* 0 */ "sntp 4.2.8p4\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.8p3\n"
+/* 2326 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p4\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.8p3";
+/* 2536 */ "sntp 4.2.8p4";
/**
* ipv4 option description with
@@ -1173,7 +1173,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via sntpOptions.pzCopyright */
- puts(_("sntp 4.2.8p3\n\
+ puts(_("sntp 4.2.8p4\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.8p3\n\
+ puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p4\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.8p3"));
+ puts(_("sntp 4.2.8p4"));
/* referenced via sntpOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/sntp/sntp-opts.h b/contrib/ntp/sntp/sntp-opts.h
index 06fa376c7f2e..895421edd0e5 100644
--- a/contrib/ntp/sntp/sntp-opts.h
+++ b/contrib/ntp/sntp/sntp-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed June 29, 2015 at 04:23:19 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:30:22 PM by AutoGen 5.18.5
* 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.8p3"
+#define SNTP_VERSION "4.2.8p4"
/** Full sntp version text */
-#define SNTP_FULL_VERSION "sntp 4.2.8p3"
+#define SNTP_FULL_VERSION "sntp 4.2.8p4"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/sntp/sntp.1sntpman b/contrib/ntp/sntp/sntp.1sntpman
index 9033a812d766..89facc6de904 100644
--- a/contrib/ntp/sntp/sntp.1sntpman
+++ b/contrib/ntp/sntp/sntp.1sntpman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp 1sntpman "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH sntp 1sntpman "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-JTaaO5/ag-VTa4M5)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-hEaqbg/ag-UEaiag)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:23:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:30:52 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/sntp/sntp.1sntpmdoc b/contrib/ntp/sntp/sntp.1sntpmdoc
index 52bc5ad93083..b1b3940dba1a 100644
--- a/contrib/ntp/sntp/sntp.1sntpmdoc
+++ b/contrib/ntp/sntp/sntp.1sntpmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt SNTP 1sntpmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:23:32 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:30:59 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/sntp/sntp.html b/contrib/ntp/sntp/sntp.html
index c5f11b6de87c..5ea532ef69e3 100644
--- a/contrib/ntp/sntp/sntp.html
+++ b/contrib/ntp/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.8p3 of <code>sntp</code>.
+ <p>This document applies to version 4.2.8p4 of <code>sntp</code>.
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
@@ -176,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.8p3
+<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p4
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/contrib/ntp/sntp/sntp.man.in b/contrib/ntp/sntp/sntp.man.in
index f4607eb4a79c..84afa7e90c39 100644
--- a/contrib/ntp/sntp/sntp.man.in
+++ b/contrib/ntp/sntp/sntp.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp @SNTP_MS@ "29 Jun 2015" "4.2.8p3" "User Commands"
+.TH sntp @SNTP_MS@ "21 Oct 2015" "4.2.8p4" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-JTaaO5/ag-VTa4M5)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-hEaqbg/ag-UEaiag)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:23:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:30:52 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/sntp/sntp.mdoc.in b/contrib/ntp/sntp/sntp.mdoc.in
index f302ab9f18df..0313e5e0ab49 100644
--- a/contrib/ntp/sntp/sntp.mdoc.in
+++ b/contrib/ntp/sntp/sntp.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt SNTP @SNTP_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:23:32 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:30:59 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/sntp/tests/Makefile.am b/contrib/ntp/sntp/tests/Makefile.am
index 2228aa0e73f2..c5338c791816 100644
--- a/contrib/ntp/sntp/tests/Makefile.am
+++ b/contrib/ntp/sntp/tests/Makefile.am
@@ -1,10 +1,31 @@
NULL =
BUILT_SOURCES =
-CLEANFILES = kod-output-blank kod-output-single kod-output-multiple debug-output-lfp-dec debug-output-lfp-bin debug-output-pkt
-DISTCLEANFILES = kod-output-blank kod-output-single kod-output-multiple
EXTRA_PROGRAMS =
-run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
+CLEANFILES = \
+ debug-output-lfp-bin \
+ debug-output-lfp-dec \
+ debug-output-pkt \
+ kod-output-blank \
+ kod-output-multiple \
+ kod-output-single \
+ testLogfile.log \
+ testLogfile2.log \
+ $(NULL)
+
+DISTCLEANFILES = \
+ kod-output-blank \
+ kod-output-single \
+ kod-output-multiple \
+ testLogfile.log \
+ testLogfile2.log \
+ $(NULL)
+
+std_unity_list = \
+ $(srcdir)/../unity/auto/generate_test_runner.rb \
+ $(NULL)
+
+run_unity = cd $(srcdir) && ruby ../unity/auto/generate_test_runner.rb
# Use EXTRA_PROGRAMS for test files that are under development but
# not production-ready
@@ -15,50 +36,15 @@ check_PROGRAMS = \
test-keyFile \
test-kodDatabase \
test-kodFile \
+ test-log \
test-networking \
test-packetHandling \
test-packetProcessing \
test-utilities \
$(NULL)
-if GTEST_AVAILABLE
-check_PROGRAMS += tests
-else
-EXTRA_PROGRAMS += tests
-endif
-
-#if BUILD_SNTP
-#check_PROGRAMS += tests
-#endif
-
-base_SOURCES = \
- ../tests_main.cpp \
- $(NULL)
-
-tests_SOURCES = \
- $(base_SOURCES) \
- g_networking.cpp \
- g_packetHandling.cpp \
- g_packetProcessing.cpp \
- $(NULL)
-
-# HMS: this test was for the 4.2.6 sntp code.
-# g_nameresolution.cpp
-
-# HMS: Somebody needs to audit the following files to
-# make sure all of these tests are now handled by Unity
-#
-# g_utilities.cpp
-# g_kodDatabase.cpp
-# g_keyFile.cpp
-# g_crypto.cpp
-# g_kodFile.cpp
-
noinst_HEADERS = \
- fileHandlingTest.h \
sntptest.h \
- g_fileHandlingTest.h \
- g_sntptest.h \
$(NULL)
dist_check_SCRIPTS = tests-runner
@@ -89,33 +75,32 @@ CLEANFILES += \
$(NULL)
#split into LDADD and tests_LDADD?
-LDADD = \
+base_LDADD = \
../libsntp.a \
$(LIBOPTS_LDADD) \
$(LDADD_LIBEVENT) \
$(top_builddir)/../libntp/libntp.a \
$(LDADD_LIBNTP) \
$(LDADD_NTP) \
- $(GTEST_LDFLAGS) \
- $(GTEST_LIBS) \
$(NULL)
-unity_tests_LDADD = \
- $(LDADD) \
+LDADD = \
+ $(base_LDADD) \
$(top_builddir)/unity/libunity.a \
$(LIBM) \
$(NULL)
-AM_CFLAGS = $(CFLAGS_NTP)
-AM_CXXFLAGS = $(GTEST_CXXFLAGS)
+AM_CFLAGS = $(CFLAGS_NTP)
AM_CPPFLAGS = $(SNTP_INCS)
AM_CPPFLAGS += -I$(srcdir)/..
AM_CPPFLAGS += -I$(top_srcdir)/../tests
AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
AM_CPPFLAGS += $(CPPFLAGS_LIBEVENT)
-AM_CPPFLAGS += $(GTEST_CPPFLAGS)
AM_CPPFLAGS += $(CPPFLAGS_NTP)
+AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H
+#AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
+AM_CPPFLAGS += -I$(top_srcdir)/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
@@ -125,73 +110,9 @@ BUILT_SOURCES += \
$(srcdir)/run-kodDatabase.c \
$(srcdir)/run-kodFile.c \
$(srcdir)/run-networking.c \
+ $(srcdir)/run-packetHandling.c \
$(srcdir)/run-packetProcessing.c \
$(srcdir)/run-utilities.c \
- $(srcdir)/run-packetHandling.c \
- $(NULL)
-
-test_keyFile_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_keyFile_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_kodDatabase_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_kodDatabase_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_kodFile_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_kodFile_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_networking_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_networking_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_utilities_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_utilities_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_crypto_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_crypto_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_packetProcessing_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_packetProcessing_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_packetHandling_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_packetHandling_LDADD = \
- $(unity_tests_LDADD) \
$(NULL)
test_networking_SOURCES = \
@@ -213,34 +134,48 @@ test_kodDatabase_SOURCES = \
$(NULL)
test_keyFile_SOURCES = \
+ fileHandlingTest.c \
keyFile.c \
run-keyFile.c \
$(top_builddir)/version.c \
$(NULL)
test_kodFile_SOURCES = \
+ fileHandlingTest.c \
kodFile.c \
run-kodFile.c \
$(top_builddir)/version.c \
$(NULL)
-# ../version.c
test_packetProcessing_SOURCES = \
packetProcessing.c \
run-packetProcessing.c \
+ sntptest.c \
$(NULL)
test_utilities_SOURCES = \
+ fileHandlingTest.c \
utilities.c \
run-utilities.c \
$(NULL)
+test_crypto_CFLAGS = \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
+ $(NULL)
+
test_crypto_SOURCES = \
crypto.c \
run-crypto.c \
$(top_builddir)/version.c \
$(NULL)
+test_log_SOURCES = \
+ t-log.c \
+ run-t-log.c \
+ $(top_builddir)/version.c \
+ $(NULL)
+
$(srcdir)/run-kodFile.c: $(srcdir)/kodFile.c $(std_unity_list)
$(run_unity) kodFile.c run-kodFile.c
@@ -266,6 +201,10 @@ $(srcdir)/run-utilities.c: $(srcdir)/utilities.c $(std_unity_list)
$(srcdir)/run-crypto.c: $(srcdir)/crypto.c $(std_unity_list)
$(run_unity) crypto.c run-crypto.c
+$(srcdir)/run-t-log.c: $(srcdir)/t-log.c $(std_unity_list)
+ $(run_unity) t-log.c run-t-log.c
+
+
#$(srcdir)/../version.c: $(srcdir)/../version.c
# gcc -o version.o ../version.c
@@ -301,10 +240,10 @@ check-libntp: ../../libntp/libntp.a
../../libntp/libntp.a:
cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
-check-libunity: ../sntp/unity/libunity.a
+check-libunity: ../unity/libunity.a
@echo stamp > $@
-../sntp/unity/libunity.a:
+../unity/libunity.a:
cd ../unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
include $(top_srcdir)/depsver.mf
diff --git a/contrib/ntp/sntp/tests/Makefile.in b/contrib/ntp/sntp/tests/Makefile.in
index 8cc0ba5234db..9803fa896c6b 100644
--- a/contrib/ntp/sntp/tests/Makefile.in
+++ b/contrib/ntp/sntp/tests/Makefile.in
@@ -88,15 +88,13 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-EXTRA_PROGRAMS = $(am__EXEEXT_1)
+EXTRA_PROGRAMS =
check_PROGRAMS = test-crypto$(EXEEXT) test-keyFile$(EXEEXT) \
test-kodDatabase$(EXEEXT) test-kodFile$(EXEEXT) \
- test-networking$(EXEEXT) test-packetHandling$(EXEEXT) \
- test-packetProcessing$(EXEEXT) test-utilities$(EXEEXT) \
- $(am__EXEEXT_2) $(am__EXEEXT_3)
-@GTEST_AVAILABLE_TRUE@am__append_1 = tests
-@GTEST_AVAILABLE_FALSE@am__append_2 = tests
-@NTP_CROSSCOMPILE_FALSE@am__append_3 = $(check_PROGRAMS)
+ test-log$(EXEEXT) test-networking$(EXEEXT) \
+ test-packetHandling$(EXEEXT) test-packetProcessing$(EXEEXT) \
+ test-utilities$(EXEEXT) $(am__EXEEXT_1)
+@NTP_CROSSCOMPILE_FALSE@am__append_1 = $(check_PROGRAMS)
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
@@ -133,24 +131,21 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = fileHandlingTest.h
CONFIG_CLEAN_VPATH_FILES =
-@GTEST_AVAILABLE_FALSE@am__EXEEXT_1 = tests$(EXEEXT)
-am__EXEEXT_2 =
-@GTEST_AVAILABLE_TRUE@am__EXEEXT_3 = tests$(EXEEXT)
+am__EXEEXT_1 =
am__objects_1 =
am_test_crypto_OBJECTS = test_crypto-crypto.$(OBJEXT) \
test_crypto-run-crypto.$(OBJEXT) test_crypto-version.$(OBJEXT) \
$(am__objects_1)
test_crypto_OBJECTS = $(am_test_crypto_OBJECTS)
+test_crypto_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = ../libsntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(top_builddir)/../libntp/libntp.a \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) \
+test_crypto_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-test_crypto_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
@@ -158,85 +153,63 @@ am__v_lt_1 =
test_crypto_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_crypto_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_keyFile_OBJECTS = test_keyFile-keyFile.$(OBJEXT) \
- test_keyFile-run-keyFile.$(OBJEXT) \
- test_keyFile-version.$(OBJEXT) $(am__objects_1)
+am_test_keyFile_OBJECTS = fileHandlingTest.$(OBJEXT) keyFile.$(OBJEXT) \
+ run-keyFile.$(OBJEXT) version.$(OBJEXT) $(am__objects_1)
test_keyFile_OBJECTS = $(am_test_keyFile_OBJECTS)
-test_keyFile_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+test_keyFile_LDADD = $(LDADD)
+test_keyFile_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-test_keyFile_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_keyFile_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_kodDatabase_OBJECTS = test_kodDatabase-kodDatabase.$(OBJEXT) \
- test_kodDatabase-run-kodDatabase.$(OBJEXT) \
- test_kodDatabase-version.$(OBJEXT) $(am__objects_1)
+am_test_kodDatabase_OBJECTS = kodDatabase.$(OBJEXT) \
+ run-kodDatabase.$(OBJEXT) version.$(OBJEXT) $(am__objects_1)
test_kodDatabase_OBJECTS = $(am_test_kodDatabase_OBJECTS)
-test_kodDatabase_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+test_kodDatabase_LDADD = $(LDADD)
+test_kodDatabase_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-test_kodDatabase_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_kodDatabase_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_test_kodFile_OBJECTS = test_kodFile-kodFile.$(OBJEXT) \
- test_kodFile-run-kodFile.$(OBJEXT) \
- test_kodFile-version.$(OBJEXT) $(am__objects_1)
+am_test_kodFile_OBJECTS = fileHandlingTest.$(OBJEXT) kodFile.$(OBJEXT) \
+ run-kodFile.$(OBJEXT) version.$(OBJEXT) $(am__objects_1)
test_kodFile_OBJECTS = $(am_test_kodFile_OBJECTS)
-test_kodFile_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+test_kodFile_LDADD = $(LDADD)
+test_kodFile_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-test_kodFile_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_kodFile_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_networking_OBJECTS = test_networking-networking.$(OBJEXT) \
- test_networking-run-networking.$(OBJEXT) \
- test_networking-version.$(OBJEXT) $(am__objects_1)
+am_test_log_OBJECTS = t-log.$(OBJEXT) run-t-log.$(OBJEXT) \
+ version.$(OBJEXT) $(am__objects_1)
+test_log_OBJECTS = $(am_test_log_OBJECTS)
+test_log_LDADD = $(LDADD)
+test_log_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_test_networking_OBJECTS = networking.$(OBJEXT) \
+ run-networking.$(OBJEXT) version.$(OBJEXT) $(am__objects_1)
test_networking_OBJECTS = $(am_test_networking_OBJECTS)
-test_networking_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+test_networking_LDADD = $(LDADD)
+test_networking_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-test_networking_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_networking_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_test_packetHandling_OBJECTS = \
- test_packetHandling-packetHandling.$(OBJEXT) \
- test_packetHandling-run-packetHandling.$(OBJEXT) \
- test_packetHandling-version.$(OBJEXT) $(am__objects_1)
+am_test_packetHandling_OBJECTS = packetHandling.$(OBJEXT) \
+ run-packetHandling.$(OBJEXT) version.$(OBJEXT) \
+ $(am__objects_1)
test_packetHandling_OBJECTS = $(am_test_packetHandling_OBJECTS)
-test_packetHandling_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+test_packetHandling_LDADD = $(LDADD)
+test_packetHandling_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-test_packetHandling_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_packetHandling_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-am_test_packetProcessing_OBJECTS = \
- test_packetProcessing-packetProcessing.$(OBJEXT) \
- test_packetProcessing-run-packetProcessing.$(OBJEXT) \
+am_test_packetProcessing_OBJECTS = packetProcessing.$(OBJEXT) \
+ run-packetProcessing.$(OBJEXT) sntptest.$(OBJEXT) \
$(am__objects_1)
test_packetProcessing_OBJECTS = $(am_test_packetProcessing_OBJECTS)
-test_packetProcessing_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+test_packetProcessing_LDADD = $(LDADD)
+test_packetProcessing_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-test_packetProcessing_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_packetProcessing_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-am_test_utilities_OBJECTS = test_utilities-utilities.$(OBJEXT) \
- test_utilities-run-utilities.$(OBJEXT) $(am__objects_1)
+am_test_utilities_OBJECTS = fileHandlingTest.$(OBJEXT) \
+ utilities.$(OBJEXT) run-utilities.$(OBJEXT) $(am__objects_1)
test_utilities_OBJECTS = $(am_test_utilities_OBJECTS)
-test_utilities_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_utilities_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_utilities_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
- $@
-am__objects_2 = tests_main.$(OBJEXT) $(am__objects_1)
-am_tests_OBJECTS = $(am__objects_2) g_networking.$(OBJEXT) \
- g_packetHandling.$(OBJEXT) g_packetProcessing.$(OBJEXT) \
- $(am__objects_1)
-tests_OBJECTS = $(am_tests_OBJECTS)
-tests_LDADD = $(LDADD)
-tests_DEPENDENCIES = ../libsntp.a $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(top_builddir)/../libntp/libntp.a \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+test_utilities_LDADD = $(LDADD)
+test_utilities_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -272,34 +245,16 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CXXFLAGS) $(CXXFLAGS)
-AM_V_CXX = $(am__v_CXX_@AM_V@)
-am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
-am__v_CXX_0 = @echo " CXX " $@;
-am__v_CXX_1 =
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
-am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-am__v_CXXLD_1 =
SOURCES = $(test_crypto_SOURCES) $(test_keyFile_SOURCES) \
$(test_kodDatabase_SOURCES) $(test_kodFile_SOURCES) \
- $(test_networking_SOURCES) $(test_packetHandling_SOURCES) \
- $(test_packetProcessing_SOURCES) $(test_utilities_SOURCES) \
- $(tests_SOURCES)
+ $(test_log_SOURCES) $(test_networking_SOURCES) \
+ $(test_packetHandling_SOURCES) \
+ $(test_packetProcessing_SOURCES) $(test_utilities_SOURCES)
DIST_SOURCES = $(test_crypto_SOURCES) $(test_keyFile_SOURCES) \
$(test_kodDatabase_SOURCES) $(test_kodFile_SOURCES) \
- $(test_networking_SOURCES) $(test_packetHandling_SOURCES) \
- $(test_packetProcessing_SOURCES) $(test_utilities_SOURCES) \
- $(tests_SOURCES)
+ $(test_log_SOURCES) $(test_networking_SOURCES) \
+ $(test_packetHandling_SOURCES) \
+ $(test_packetProcessing_SOURCES) $(test_utilities_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -545,6 +500,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -553,6 +509,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -606,6 +563,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_SYSLOG = @LIB_SYSLOG@
LIPO = @LIPO@
LN_S = @LN_S@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -774,49 +732,31 @@ NULL =
#endif
BUILT_SOURCES = $(srcdir)/run-crypto.c $(srcdir)/run-keyFile.c \
$(srcdir)/run-kodDatabase.c $(srcdir)/run-kodFile.c \
- $(srcdir)/run-networking.c $(srcdir)/run-packetProcessing.c \
- $(srcdir)/run-utilities.c $(srcdir)/run-packetHandling.c \
+ $(srcdir)/run-networking.c $(srcdir)/run-packetHandling.c \
+ $(srcdir)/run-packetProcessing.c $(srcdir)/run-utilities.c \
$(NULL) check-libsntp check-libntp check-libunity .deps-ver
-CLEANFILES = kod-output-blank kod-output-single kod-output-multiple \
- debug-output-lfp-dec debug-output-lfp-bin debug-output-pkt \
+CLEANFILES = debug-output-lfp-bin debug-output-lfp-dec \
+ debug-output-pkt kod-output-blank kod-output-multiple \
+ kod-output-single testLogfile.log testLogfile2.log $(NULL) \
data/kod-output-multiple data/kod-output-single \
data/debug-output-pkt data/debug-output-lfp-dec \
data/kod-output-blank data/debug-output-lfp-bin $(NULL) \
check-libsntp check-libntp check-libunity .deps-ver
-DISTCLEANFILES = kod-output-blank kod-output-single kod-output-multiple
-run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
-
-#if BUILD_SNTP
-#check_PROGRAMS += tests
-#endif
-base_SOURCES = \
- ../tests_main.cpp \
+DISTCLEANFILES = \
+ kod-output-blank \
+ kod-output-single \
+ kod-output-multiple \
+ testLogfile.log \
+ testLogfile2.log \
$(NULL)
-tests_SOURCES = \
- $(base_SOURCES) \
- g_networking.cpp \
- g_packetHandling.cpp \
- g_packetProcessing.cpp \
+std_unity_list = \
+ $(srcdir)/../unity/auto/generate_test_runner.rb \
$(NULL)
-
-# HMS: this test was for the 4.2.6 sntp code.
-# g_nameresolution.cpp
-
-# HMS: Somebody needs to audit the following files to
-# make sure all of these tests are now handled by Unity
-#
-# g_utilities.cpp
-# g_kodDatabase.cpp
-# g_keyFile.cpp
-# g_crypto.cpp
-# g_kodFile.cpp
+run_unity = cd $(srcdir) && ruby ../unity/auto/generate_test_runner.rb
noinst_HEADERS = \
- fileHandlingTest.h \
sntptest.h \
- g_fileHandlingTest.h \
- g_sntptest.h \
$(NULL)
dist_check_SCRIPTS = tests-runner
@@ -838,93 +778,27 @@ EXTRA_DIST = \
#split into LDADD and tests_LDADD?
-LDADD = \
+base_LDADD = \
../libsntp.a \
$(LIBOPTS_LDADD) \
$(LDADD_LIBEVENT) \
$(top_builddir)/../libntp/libntp.a \
$(LDADD_LIBNTP) \
$(LDADD_NTP) \
- $(GTEST_LDFLAGS) \
- $(GTEST_LIBS) \
$(NULL)
-unity_tests_LDADD = \
- $(LDADD) \
+LDADD = \
+ $(base_LDADD) \
$(top_builddir)/unity/libunity.a \
$(LIBM) \
$(NULL)
AM_CFLAGS = $(CFLAGS_NTP)
-AM_CXXFLAGS = $(GTEST_CXXFLAGS)
+#AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_CPPFLAGS = $(SNTP_INCS) -I$(srcdir)/.. -I$(top_srcdir)/../tests \
- $(LIBOPTS_CFLAGS) $(CPPFLAGS_LIBEVENT) $(GTEST_CPPFLAGS) \
- $(CPPFLAGS_NTP)
+ $(LIBOPTS_CFLAGS) $(CPPFLAGS_LIBEVENT) $(CPPFLAGS_NTP) \
+ -DUNITY_INCLUDE_CONFIG_H -I$(top_srcdir)/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
-test_keyFile_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_keyFile_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_kodDatabase_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_kodDatabase_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_kodFile_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_kodFile_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_networking_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_networking_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_utilities_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_utilities_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_crypto_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_crypto_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_packetProcessing_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_packetProcessing_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_packetHandling_CFLAGS = \
- -I$(top_srcdir)/unity \
- $(NULL)
-
-test_packetHandling_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_networking_SOURCES = \
networking.c \
run-networking.c \
@@ -944,38 +818,52 @@ test_kodDatabase_SOURCES = \
$(NULL)
test_keyFile_SOURCES = \
+ fileHandlingTest.c \
keyFile.c \
run-keyFile.c \
$(top_builddir)/version.c \
$(NULL)
test_kodFile_SOURCES = \
+ fileHandlingTest.c \
kodFile.c \
run-kodFile.c \
$(top_builddir)/version.c \
$(NULL)
-# ../version.c
test_packetProcessing_SOURCES = \
packetProcessing.c \
run-packetProcessing.c \
+ sntptest.c \
$(NULL)
test_utilities_SOURCES = \
+ fileHandlingTest.c \
utilities.c \
run-utilities.c \
$(NULL)
+test_crypto_CFLAGS = \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
+ $(NULL)
+
test_crypto_SOURCES = \
crypto.c \
run-crypto.c \
$(top_builddir)/version.c \
$(NULL)
+test_log_SOURCES = \
+ t-log.c \
+ run-t-log.c \
+ $(top_builddir)/version.c \
+ $(NULL)
+
#$(srcdir)/../version.c: $(srcdir)/../version.c
# gcc -o version.o ../version.c
-TESTS = $(am__append_3)
+TESTS = $(am__append_1)
SNTP_INCS = -I$(top_srcdir)/../include \
-I$(top_srcdir)/../lib/isc/include \
-I$(top_srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
@@ -984,7 +872,7 @@ all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
-.SUFFIXES: .c .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -1033,35 +921,35 @@ test-crypto$(EXEEXT): $(test_crypto_OBJECTS) $(test_crypto_DEPENDENCIES) $(EXTRA
test-keyFile$(EXEEXT): $(test_keyFile_OBJECTS) $(test_keyFile_DEPENDENCIES) $(EXTRA_test_keyFile_DEPENDENCIES)
@rm -f test-keyFile$(EXEEXT)
- $(AM_V_CCLD)$(test_keyFile_LINK) $(test_keyFile_OBJECTS) $(test_keyFile_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_keyFile_OBJECTS) $(test_keyFile_LDADD) $(LIBS)
test-kodDatabase$(EXEEXT): $(test_kodDatabase_OBJECTS) $(test_kodDatabase_DEPENDENCIES) $(EXTRA_test_kodDatabase_DEPENDENCIES)
@rm -f test-kodDatabase$(EXEEXT)
- $(AM_V_CCLD)$(test_kodDatabase_LINK) $(test_kodDatabase_OBJECTS) $(test_kodDatabase_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_kodDatabase_OBJECTS) $(test_kodDatabase_LDADD) $(LIBS)
test-kodFile$(EXEEXT): $(test_kodFile_OBJECTS) $(test_kodFile_DEPENDENCIES) $(EXTRA_test_kodFile_DEPENDENCIES)
@rm -f test-kodFile$(EXEEXT)
- $(AM_V_CCLD)$(test_kodFile_LINK) $(test_kodFile_OBJECTS) $(test_kodFile_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_kodFile_OBJECTS) $(test_kodFile_LDADD) $(LIBS)
+
+test-log$(EXEEXT): $(test_log_OBJECTS) $(test_log_DEPENDENCIES) $(EXTRA_test_log_DEPENDENCIES)
+ @rm -f test-log$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_log_OBJECTS) $(test_log_LDADD) $(LIBS)
test-networking$(EXEEXT): $(test_networking_OBJECTS) $(test_networking_DEPENDENCIES) $(EXTRA_test_networking_DEPENDENCIES)
@rm -f test-networking$(EXEEXT)
- $(AM_V_CCLD)$(test_networking_LINK) $(test_networking_OBJECTS) $(test_networking_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_networking_OBJECTS) $(test_networking_LDADD) $(LIBS)
test-packetHandling$(EXEEXT): $(test_packetHandling_OBJECTS) $(test_packetHandling_DEPENDENCIES) $(EXTRA_test_packetHandling_DEPENDENCIES)
@rm -f test-packetHandling$(EXEEXT)
- $(AM_V_CCLD)$(test_packetHandling_LINK) $(test_packetHandling_OBJECTS) $(test_packetHandling_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_packetHandling_OBJECTS) $(test_packetHandling_LDADD) $(LIBS)
test-packetProcessing$(EXEEXT): $(test_packetProcessing_OBJECTS) $(test_packetProcessing_DEPENDENCIES) $(EXTRA_test_packetProcessing_DEPENDENCIES)
@rm -f test-packetProcessing$(EXEEXT)
- $(AM_V_CCLD)$(test_packetProcessing_LINK) $(test_packetProcessing_OBJECTS) $(test_packetProcessing_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_packetProcessing_OBJECTS) $(test_packetProcessing_LDADD) $(LIBS)
test-utilities$(EXEEXT): $(test_utilities_OBJECTS) $(test_utilities_DEPENDENCIES) $(EXTRA_test_utilities_DEPENDENCIES)
@rm -f test-utilities$(EXEEXT)
- $(AM_V_CCLD)$(test_utilities_LINK) $(test_utilities_OBJECTS) $(test_utilities_LDADD) $(LIBS)
-
-tests$(EXEEXT): $(tests_OBJECTS) $(tests_DEPENDENCIES) $(EXTRA_tests_DEPENDENCIES)
- @rm -f tests$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tests_OBJECTS) $(tests_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_utilities_OBJECTS) $(test_utilities_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -1069,32 +957,28 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_networking.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_packetHandling.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_packetProcessing.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileHandlingTest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyFile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kodDatabase.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kodFile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networking.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetHandling.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetProcessing.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-keyFile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-kodDatabase.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-kodFile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-networking.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-packetHandling.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-packetProcessing.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-t-log.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-utilities.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sntptest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-log.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-crypto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-run-crypto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-version.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_keyFile-keyFile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_keyFile-run-keyFile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_keyFile-version.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kodDatabase-kodDatabase.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kodDatabase-run-kodDatabase.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kodDatabase-version.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kodFile-kodFile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kodFile-run-kodFile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kodFile-version.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_networking-networking.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_networking-run-networking.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_networking-version.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_packetHandling-packetHandling.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_packetHandling-run-packetHandling.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_packetHandling-version.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_packetProcessing-packetProcessing.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_packetProcessing-run-packetProcessing.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_utilities-run-utilities.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_utilities-utilities.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests_main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -1159,306 +1043,19 @@ test_crypto-version.obj: $(top_builddir)/version.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -c -o test_crypto-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-test_keyFile-keyFile.o: keyFile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -MT test_keyFile-keyFile.o -MD -MP -MF $(DEPDIR)/test_keyFile-keyFile.Tpo -c -o test_keyFile-keyFile.o `test -f 'keyFile.c' || echo '$(srcdir)/'`keyFile.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_keyFile-keyFile.Tpo $(DEPDIR)/test_keyFile-keyFile.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyFile.c' object='test_keyFile-keyFile.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -c -o test_keyFile-keyFile.o `test -f 'keyFile.c' || echo '$(srcdir)/'`keyFile.c
-
-test_keyFile-keyFile.obj: keyFile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -MT test_keyFile-keyFile.obj -MD -MP -MF $(DEPDIR)/test_keyFile-keyFile.Tpo -c -o test_keyFile-keyFile.obj `if test -f 'keyFile.c'; then $(CYGPATH_W) 'keyFile.c'; else $(CYGPATH_W) '$(srcdir)/keyFile.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_keyFile-keyFile.Tpo $(DEPDIR)/test_keyFile-keyFile.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyFile.c' object='test_keyFile-keyFile.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -c -o test_keyFile-keyFile.obj `if test -f 'keyFile.c'; then $(CYGPATH_W) 'keyFile.c'; else $(CYGPATH_W) '$(srcdir)/keyFile.c'; fi`
-
-test_keyFile-run-keyFile.o: run-keyFile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -MT test_keyFile-run-keyFile.o -MD -MP -MF $(DEPDIR)/test_keyFile-run-keyFile.Tpo -c -o test_keyFile-run-keyFile.o `test -f 'run-keyFile.c' || echo '$(srcdir)/'`run-keyFile.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_keyFile-run-keyFile.Tpo $(DEPDIR)/test_keyFile-run-keyFile.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-keyFile.c' object='test_keyFile-run-keyFile.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -c -o test_keyFile-run-keyFile.o `test -f 'run-keyFile.c' || echo '$(srcdir)/'`run-keyFile.c
-
-test_keyFile-run-keyFile.obj: run-keyFile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -MT test_keyFile-run-keyFile.obj -MD -MP -MF $(DEPDIR)/test_keyFile-run-keyFile.Tpo -c -o test_keyFile-run-keyFile.obj `if test -f 'run-keyFile.c'; then $(CYGPATH_W) 'run-keyFile.c'; else $(CYGPATH_W) '$(srcdir)/run-keyFile.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_keyFile-run-keyFile.Tpo $(DEPDIR)/test_keyFile-run-keyFile.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-keyFile.c' object='test_keyFile-run-keyFile.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -c -o test_keyFile-run-keyFile.obj `if test -f 'run-keyFile.c'; then $(CYGPATH_W) 'run-keyFile.c'; else $(CYGPATH_W) '$(srcdir)/run-keyFile.c'; fi`
-
-test_keyFile-version.o: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -MT test_keyFile-version.o -MD -MP -MF $(DEPDIR)/test_keyFile-version.Tpo -c -o test_keyFile-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_keyFile-version.Tpo $(DEPDIR)/test_keyFile-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_keyFile-version.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -c -o test_keyFile-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-
-test_keyFile-version.obj: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -MT test_keyFile-version.obj -MD -MP -MF $(DEPDIR)/test_keyFile-version.Tpo -c -o test_keyFile-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_keyFile-version.Tpo $(DEPDIR)/test_keyFile-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_keyFile-version.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_keyFile_CFLAGS) $(CFLAGS) -c -o test_keyFile-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-
-test_kodDatabase-kodDatabase.o: kodDatabase.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -MT test_kodDatabase-kodDatabase.o -MD -MP -MF $(DEPDIR)/test_kodDatabase-kodDatabase.Tpo -c -o test_kodDatabase-kodDatabase.o `test -f 'kodDatabase.c' || echo '$(srcdir)/'`kodDatabase.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodDatabase-kodDatabase.Tpo $(DEPDIR)/test_kodDatabase-kodDatabase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kodDatabase.c' object='test_kodDatabase-kodDatabase.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -c -o test_kodDatabase-kodDatabase.o `test -f 'kodDatabase.c' || echo '$(srcdir)/'`kodDatabase.c
-
-test_kodDatabase-kodDatabase.obj: kodDatabase.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -MT test_kodDatabase-kodDatabase.obj -MD -MP -MF $(DEPDIR)/test_kodDatabase-kodDatabase.Tpo -c -o test_kodDatabase-kodDatabase.obj `if test -f 'kodDatabase.c'; then $(CYGPATH_W) 'kodDatabase.c'; else $(CYGPATH_W) '$(srcdir)/kodDatabase.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodDatabase-kodDatabase.Tpo $(DEPDIR)/test_kodDatabase-kodDatabase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kodDatabase.c' object='test_kodDatabase-kodDatabase.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -c -o test_kodDatabase-kodDatabase.obj `if test -f 'kodDatabase.c'; then $(CYGPATH_W) 'kodDatabase.c'; else $(CYGPATH_W) '$(srcdir)/kodDatabase.c'; fi`
-
-test_kodDatabase-run-kodDatabase.o: run-kodDatabase.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -MT test_kodDatabase-run-kodDatabase.o -MD -MP -MF $(DEPDIR)/test_kodDatabase-run-kodDatabase.Tpo -c -o test_kodDatabase-run-kodDatabase.o `test -f 'run-kodDatabase.c' || echo '$(srcdir)/'`run-kodDatabase.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodDatabase-run-kodDatabase.Tpo $(DEPDIR)/test_kodDatabase-run-kodDatabase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-kodDatabase.c' object='test_kodDatabase-run-kodDatabase.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -c -o test_kodDatabase-run-kodDatabase.o `test -f 'run-kodDatabase.c' || echo '$(srcdir)/'`run-kodDatabase.c
-
-test_kodDatabase-run-kodDatabase.obj: run-kodDatabase.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -MT test_kodDatabase-run-kodDatabase.obj -MD -MP -MF $(DEPDIR)/test_kodDatabase-run-kodDatabase.Tpo -c -o test_kodDatabase-run-kodDatabase.obj `if test -f 'run-kodDatabase.c'; then $(CYGPATH_W) 'run-kodDatabase.c'; else $(CYGPATH_W) '$(srcdir)/run-kodDatabase.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodDatabase-run-kodDatabase.Tpo $(DEPDIR)/test_kodDatabase-run-kodDatabase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-kodDatabase.c' object='test_kodDatabase-run-kodDatabase.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -c -o test_kodDatabase-run-kodDatabase.obj `if test -f 'run-kodDatabase.c'; then $(CYGPATH_W) 'run-kodDatabase.c'; else $(CYGPATH_W) '$(srcdir)/run-kodDatabase.c'; fi`
-
-test_kodDatabase-version.o: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -MT test_kodDatabase-version.o -MD -MP -MF $(DEPDIR)/test_kodDatabase-version.Tpo -c -o test_kodDatabase-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodDatabase-version.Tpo $(DEPDIR)/test_kodDatabase-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_kodDatabase-version.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -c -o test_kodDatabase-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-
-test_kodDatabase-version.obj: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -MT test_kodDatabase-version.obj -MD -MP -MF $(DEPDIR)/test_kodDatabase-version.Tpo -c -o test_kodDatabase-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodDatabase-version.Tpo $(DEPDIR)/test_kodDatabase-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_kodDatabase-version.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodDatabase_CFLAGS) $(CFLAGS) -c -o test_kodDatabase-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-
-test_kodFile-kodFile.o: kodFile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -MT test_kodFile-kodFile.o -MD -MP -MF $(DEPDIR)/test_kodFile-kodFile.Tpo -c -o test_kodFile-kodFile.o `test -f 'kodFile.c' || echo '$(srcdir)/'`kodFile.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodFile-kodFile.Tpo $(DEPDIR)/test_kodFile-kodFile.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kodFile.c' object='test_kodFile-kodFile.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -c -o test_kodFile-kodFile.o `test -f 'kodFile.c' || echo '$(srcdir)/'`kodFile.c
-
-test_kodFile-kodFile.obj: kodFile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -MT test_kodFile-kodFile.obj -MD -MP -MF $(DEPDIR)/test_kodFile-kodFile.Tpo -c -o test_kodFile-kodFile.obj `if test -f 'kodFile.c'; then $(CYGPATH_W) 'kodFile.c'; else $(CYGPATH_W) '$(srcdir)/kodFile.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodFile-kodFile.Tpo $(DEPDIR)/test_kodFile-kodFile.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kodFile.c' object='test_kodFile-kodFile.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -c -o test_kodFile-kodFile.obj `if test -f 'kodFile.c'; then $(CYGPATH_W) 'kodFile.c'; else $(CYGPATH_W) '$(srcdir)/kodFile.c'; fi`
-
-test_kodFile-run-kodFile.o: run-kodFile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -MT test_kodFile-run-kodFile.o -MD -MP -MF $(DEPDIR)/test_kodFile-run-kodFile.Tpo -c -o test_kodFile-run-kodFile.o `test -f 'run-kodFile.c' || echo '$(srcdir)/'`run-kodFile.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodFile-run-kodFile.Tpo $(DEPDIR)/test_kodFile-run-kodFile.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-kodFile.c' object='test_kodFile-run-kodFile.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -c -o test_kodFile-run-kodFile.o `test -f 'run-kodFile.c' || echo '$(srcdir)/'`run-kodFile.c
-
-test_kodFile-run-kodFile.obj: run-kodFile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -MT test_kodFile-run-kodFile.obj -MD -MP -MF $(DEPDIR)/test_kodFile-run-kodFile.Tpo -c -o test_kodFile-run-kodFile.obj `if test -f 'run-kodFile.c'; then $(CYGPATH_W) 'run-kodFile.c'; else $(CYGPATH_W) '$(srcdir)/run-kodFile.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodFile-run-kodFile.Tpo $(DEPDIR)/test_kodFile-run-kodFile.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-kodFile.c' object='test_kodFile-run-kodFile.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -c -o test_kodFile-run-kodFile.obj `if test -f 'run-kodFile.c'; then $(CYGPATH_W) 'run-kodFile.c'; else $(CYGPATH_W) '$(srcdir)/run-kodFile.c'; fi`
-
-test_kodFile-version.o: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -MT test_kodFile-version.o -MD -MP -MF $(DEPDIR)/test_kodFile-version.Tpo -c -o test_kodFile-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodFile-version.Tpo $(DEPDIR)/test_kodFile-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_kodFile-version.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -c -o test_kodFile-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-
-test_kodFile-version.obj: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -MT test_kodFile-version.obj -MD -MP -MF $(DEPDIR)/test_kodFile-version.Tpo -c -o test_kodFile-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kodFile-version.Tpo $(DEPDIR)/test_kodFile-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_kodFile-version.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kodFile_CFLAGS) $(CFLAGS) -c -o test_kodFile-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-
-test_networking-networking.o: networking.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -MT test_networking-networking.o -MD -MP -MF $(DEPDIR)/test_networking-networking.Tpo -c -o test_networking-networking.o `test -f 'networking.c' || echo '$(srcdir)/'`networking.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_networking-networking.Tpo $(DEPDIR)/test_networking-networking.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='networking.c' object='test_networking-networking.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -c -o test_networking-networking.o `test -f 'networking.c' || echo '$(srcdir)/'`networking.c
-
-test_networking-networking.obj: networking.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -MT test_networking-networking.obj -MD -MP -MF $(DEPDIR)/test_networking-networking.Tpo -c -o test_networking-networking.obj `if test -f 'networking.c'; then $(CYGPATH_W) 'networking.c'; else $(CYGPATH_W) '$(srcdir)/networking.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_networking-networking.Tpo $(DEPDIR)/test_networking-networking.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='networking.c' object='test_networking-networking.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -c -o test_networking-networking.obj `if test -f 'networking.c'; then $(CYGPATH_W) 'networking.c'; else $(CYGPATH_W) '$(srcdir)/networking.c'; fi`
-
-test_networking-run-networking.o: run-networking.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -MT test_networking-run-networking.o -MD -MP -MF $(DEPDIR)/test_networking-run-networking.Tpo -c -o test_networking-run-networking.o `test -f 'run-networking.c' || echo '$(srcdir)/'`run-networking.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_networking-run-networking.Tpo $(DEPDIR)/test_networking-run-networking.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-networking.c' object='test_networking-run-networking.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -c -o test_networking-run-networking.o `test -f 'run-networking.c' || echo '$(srcdir)/'`run-networking.c
-
-test_networking-run-networking.obj: run-networking.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -MT test_networking-run-networking.obj -MD -MP -MF $(DEPDIR)/test_networking-run-networking.Tpo -c -o test_networking-run-networking.obj `if test -f 'run-networking.c'; then $(CYGPATH_W) 'run-networking.c'; else $(CYGPATH_W) '$(srcdir)/run-networking.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_networking-run-networking.Tpo $(DEPDIR)/test_networking-run-networking.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-networking.c' object='test_networking-run-networking.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -c -o test_networking-run-networking.obj `if test -f 'run-networking.c'; then $(CYGPATH_W) 'run-networking.c'; else $(CYGPATH_W) '$(srcdir)/run-networking.c'; fi`
-
-test_networking-version.o: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -MT test_networking-version.o -MD -MP -MF $(DEPDIR)/test_networking-version.Tpo -c -o test_networking-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_networking-version.Tpo $(DEPDIR)/test_networking-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_networking-version.o' libtool=no @AMDEPBACKSLASH@
+version.o: $(top_builddir)/version.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT version.o -MD -MP -MF $(DEPDIR)/version.Tpo -c -o version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/version.Tpo $(DEPDIR)/version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='version.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -c -o test_networking-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-test_networking-version.obj: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -MT test_networking-version.obj -MD -MP -MF $(DEPDIR)/test_networking-version.Tpo -c -o test_networking-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_networking-version.Tpo $(DEPDIR)/test_networking-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_networking-version.obj' libtool=no @AMDEPBACKSLASH@
+version.obj: $(top_builddir)/version.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT version.obj -MD -MP -MF $(DEPDIR)/version.Tpo -c -o version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/version.Tpo $(DEPDIR)/version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='version.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_networking_CFLAGS) $(CFLAGS) -c -o test_networking-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-
-test_packetHandling-packetHandling.o: packetHandling.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -MT test_packetHandling-packetHandling.o -MD -MP -MF $(DEPDIR)/test_packetHandling-packetHandling.Tpo -c -o test_packetHandling-packetHandling.o `test -f 'packetHandling.c' || echo '$(srcdir)/'`packetHandling.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetHandling-packetHandling.Tpo $(DEPDIR)/test_packetHandling-packetHandling.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='packetHandling.c' object='test_packetHandling-packetHandling.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -c -o test_packetHandling-packetHandling.o `test -f 'packetHandling.c' || echo '$(srcdir)/'`packetHandling.c
-
-test_packetHandling-packetHandling.obj: packetHandling.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -MT test_packetHandling-packetHandling.obj -MD -MP -MF $(DEPDIR)/test_packetHandling-packetHandling.Tpo -c -o test_packetHandling-packetHandling.obj `if test -f 'packetHandling.c'; then $(CYGPATH_W) 'packetHandling.c'; else $(CYGPATH_W) '$(srcdir)/packetHandling.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetHandling-packetHandling.Tpo $(DEPDIR)/test_packetHandling-packetHandling.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='packetHandling.c' object='test_packetHandling-packetHandling.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -c -o test_packetHandling-packetHandling.obj `if test -f 'packetHandling.c'; then $(CYGPATH_W) 'packetHandling.c'; else $(CYGPATH_W) '$(srcdir)/packetHandling.c'; fi`
-
-test_packetHandling-run-packetHandling.o: run-packetHandling.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -MT test_packetHandling-run-packetHandling.o -MD -MP -MF $(DEPDIR)/test_packetHandling-run-packetHandling.Tpo -c -o test_packetHandling-run-packetHandling.o `test -f 'run-packetHandling.c' || echo '$(srcdir)/'`run-packetHandling.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetHandling-run-packetHandling.Tpo $(DEPDIR)/test_packetHandling-run-packetHandling.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-packetHandling.c' object='test_packetHandling-run-packetHandling.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -c -o test_packetHandling-run-packetHandling.o `test -f 'run-packetHandling.c' || echo '$(srcdir)/'`run-packetHandling.c
-
-test_packetHandling-run-packetHandling.obj: run-packetHandling.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -MT test_packetHandling-run-packetHandling.obj -MD -MP -MF $(DEPDIR)/test_packetHandling-run-packetHandling.Tpo -c -o test_packetHandling-run-packetHandling.obj `if test -f 'run-packetHandling.c'; then $(CYGPATH_W) 'run-packetHandling.c'; else $(CYGPATH_W) '$(srcdir)/run-packetHandling.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetHandling-run-packetHandling.Tpo $(DEPDIR)/test_packetHandling-run-packetHandling.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-packetHandling.c' object='test_packetHandling-run-packetHandling.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -c -o test_packetHandling-run-packetHandling.obj `if test -f 'run-packetHandling.c'; then $(CYGPATH_W) 'run-packetHandling.c'; else $(CYGPATH_W) '$(srcdir)/run-packetHandling.c'; fi`
-
-test_packetHandling-version.o: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -MT test_packetHandling-version.o -MD -MP -MF $(DEPDIR)/test_packetHandling-version.Tpo -c -o test_packetHandling-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetHandling-version.Tpo $(DEPDIR)/test_packetHandling-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_packetHandling-version.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -c -o test_packetHandling-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-
-test_packetHandling-version.obj: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -MT test_packetHandling-version.obj -MD -MP -MF $(DEPDIR)/test_packetHandling-version.Tpo -c -o test_packetHandling-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetHandling-version.Tpo $(DEPDIR)/test_packetHandling-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_packetHandling-version.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetHandling_CFLAGS) $(CFLAGS) -c -o test_packetHandling-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-
-test_packetProcessing-packetProcessing.o: packetProcessing.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetProcessing_CFLAGS) $(CFLAGS) -MT test_packetProcessing-packetProcessing.o -MD -MP -MF $(DEPDIR)/test_packetProcessing-packetProcessing.Tpo -c -o test_packetProcessing-packetProcessing.o `test -f 'packetProcessing.c' || echo '$(srcdir)/'`packetProcessing.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetProcessing-packetProcessing.Tpo $(DEPDIR)/test_packetProcessing-packetProcessing.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='packetProcessing.c' object='test_packetProcessing-packetProcessing.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetProcessing_CFLAGS) $(CFLAGS) -c -o test_packetProcessing-packetProcessing.o `test -f 'packetProcessing.c' || echo '$(srcdir)/'`packetProcessing.c
-
-test_packetProcessing-packetProcessing.obj: packetProcessing.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetProcessing_CFLAGS) $(CFLAGS) -MT test_packetProcessing-packetProcessing.obj -MD -MP -MF $(DEPDIR)/test_packetProcessing-packetProcessing.Tpo -c -o test_packetProcessing-packetProcessing.obj `if test -f 'packetProcessing.c'; then $(CYGPATH_W) 'packetProcessing.c'; else $(CYGPATH_W) '$(srcdir)/packetProcessing.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetProcessing-packetProcessing.Tpo $(DEPDIR)/test_packetProcessing-packetProcessing.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='packetProcessing.c' object='test_packetProcessing-packetProcessing.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetProcessing_CFLAGS) $(CFLAGS) -c -o test_packetProcessing-packetProcessing.obj `if test -f 'packetProcessing.c'; then $(CYGPATH_W) 'packetProcessing.c'; else $(CYGPATH_W) '$(srcdir)/packetProcessing.c'; fi`
-
-test_packetProcessing-run-packetProcessing.o: run-packetProcessing.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetProcessing_CFLAGS) $(CFLAGS) -MT test_packetProcessing-run-packetProcessing.o -MD -MP -MF $(DEPDIR)/test_packetProcessing-run-packetProcessing.Tpo -c -o test_packetProcessing-run-packetProcessing.o `test -f 'run-packetProcessing.c' || echo '$(srcdir)/'`run-packetProcessing.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetProcessing-run-packetProcessing.Tpo $(DEPDIR)/test_packetProcessing-run-packetProcessing.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-packetProcessing.c' object='test_packetProcessing-run-packetProcessing.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetProcessing_CFLAGS) $(CFLAGS) -c -o test_packetProcessing-run-packetProcessing.o `test -f 'run-packetProcessing.c' || echo '$(srcdir)/'`run-packetProcessing.c
-
-test_packetProcessing-run-packetProcessing.obj: run-packetProcessing.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetProcessing_CFLAGS) $(CFLAGS) -MT test_packetProcessing-run-packetProcessing.obj -MD -MP -MF $(DEPDIR)/test_packetProcessing-run-packetProcessing.Tpo -c -o test_packetProcessing-run-packetProcessing.obj `if test -f 'run-packetProcessing.c'; then $(CYGPATH_W) 'run-packetProcessing.c'; else $(CYGPATH_W) '$(srcdir)/run-packetProcessing.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_packetProcessing-run-packetProcessing.Tpo $(DEPDIR)/test_packetProcessing-run-packetProcessing.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-packetProcessing.c' object='test_packetProcessing-run-packetProcessing.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_packetProcessing_CFLAGS) $(CFLAGS) -c -o test_packetProcessing-run-packetProcessing.obj `if test -f 'run-packetProcessing.c'; then $(CYGPATH_W) 'run-packetProcessing.c'; else $(CYGPATH_W) '$(srcdir)/run-packetProcessing.c'; fi`
-
-test_utilities-utilities.o: utilities.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utilities_CFLAGS) $(CFLAGS) -MT test_utilities-utilities.o -MD -MP -MF $(DEPDIR)/test_utilities-utilities.Tpo -c -o test_utilities-utilities.o `test -f 'utilities.c' || echo '$(srcdir)/'`utilities.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_utilities-utilities.Tpo $(DEPDIR)/test_utilities-utilities.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities.c' object='test_utilities-utilities.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utilities_CFLAGS) $(CFLAGS) -c -o test_utilities-utilities.o `test -f 'utilities.c' || echo '$(srcdir)/'`utilities.c
-
-test_utilities-utilities.obj: utilities.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utilities_CFLAGS) $(CFLAGS) -MT test_utilities-utilities.obj -MD -MP -MF $(DEPDIR)/test_utilities-utilities.Tpo -c -o test_utilities-utilities.obj `if test -f 'utilities.c'; then $(CYGPATH_W) 'utilities.c'; else $(CYGPATH_W) '$(srcdir)/utilities.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_utilities-utilities.Tpo $(DEPDIR)/test_utilities-utilities.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities.c' object='test_utilities-utilities.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utilities_CFLAGS) $(CFLAGS) -c -o test_utilities-utilities.obj `if test -f 'utilities.c'; then $(CYGPATH_W) 'utilities.c'; else $(CYGPATH_W) '$(srcdir)/utilities.c'; fi`
-
-test_utilities-run-utilities.o: run-utilities.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utilities_CFLAGS) $(CFLAGS) -MT test_utilities-run-utilities.o -MD -MP -MF $(DEPDIR)/test_utilities-run-utilities.Tpo -c -o test_utilities-run-utilities.o `test -f 'run-utilities.c' || echo '$(srcdir)/'`run-utilities.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_utilities-run-utilities.Tpo $(DEPDIR)/test_utilities-run-utilities.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-utilities.c' object='test_utilities-run-utilities.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utilities_CFLAGS) $(CFLAGS) -c -o test_utilities-run-utilities.o `test -f 'run-utilities.c' || echo '$(srcdir)/'`run-utilities.c
-
-test_utilities-run-utilities.obj: run-utilities.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utilities_CFLAGS) $(CFLAGS) -MT test_utilities-run-utilities.obj -MD -MP -MF $(DEPDIR)/test_utilities-run-utilities.Tpo -c -o test_utilities-run-utilities.obj `if test -f 'run-utilities.c'; then $(CYGPATH_W) 'run-utilities.c'; else $(CYGPATH_W) '$(srcdir)/run-utilities.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_utilities-run-utilities.Tpo $(DEPDIR)/test_utilities-run-utilities.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-utilities.c' object='test_utilities-run-utilities.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utilities_CFLAGS) $(CFLAGS) -c -o test_utilities-run-utilities.obj `if test -f 'run-utilities.c'; then $(CYGPATH_W) 'run-utilities.c'; else $(CYGPATH_W) '$(srcdir)/run-utilities.c'; fi`
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
-
-.cpp.obj:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cpp.lo:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
-
-tests_main.o: ../tests_main.cpp
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.o -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.o `test -f '../tests_main.cpp' || echo '$(srcdir)/'`../tests_main.cpp
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../tests_main.cpp' object='tests_main.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.o `test -f '../tests_main.cpp' || echo '$(srcdir)/'`../tests_main.cpp
-
-tests_main.obj: ../tests_main.cpp
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.obj -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.obj `if test -f '../tests_main.cpp'; then $(CYGPATH_W) '../tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/../tests_main.cpp'; fi`
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../tests_main.cpp' object='tests_main.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.obj `if test -f '../tests_main.cpp'; then $(CYGPATH_W) '../tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/../tests_main.cpp'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
@@ -1687,6 +1284,13 @@ test-kodFile.log: test-kodFile$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-log.log: test-log$(EXEEXT)
+ @p='test-log$(EXEEXT)'; \
+ b='test-log'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-networking.log: test-networking$(EXEEXT)
@p='test-networking$(EXEEXT)'; \
b='test-networking'; \
@@ -1715,13 +1319,6 @@ test-utilities.log: test-utilities$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-tests.log: tests$(EXEEXT)
- @p='tests$(EXEEXT)'; \
- b='tests'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
@p='$<'; \
$(am__set_b); \
@@ -1926,6 +1523,9 @@ $(srcdir)/run-utilities.c: $(srcdir)/utilities.c $(std_unity_list)
$(srcdir)/run-crypto.c: $(srcdir)/crypto.c $(std_unity_list)
$(run_unity) crypto.c run-crypto.c
+$(srcdir)/run-t-log.c: $(srcdir)/t-log.c $(std_unity_list)
+ $(run_unity) t-log.c run-t-log.c
+
check-libsntp: ../libsntp.a
@echo stamp > $@
@@ -1938,10 +1538,10 @@ check-libntp: ../../libntp/libntp.a
../../libntp/libntp.a:
cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
-check-libunity: ../sntp/unity/libunity.a
+check-libunity: ../unity/libunity.a
@echo stamp > $@
-../sntp/unity/libunity.a:
+../unity/libunity.a:
cd ../unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
diff --git a/contrib/ntp/sntp/tests/crypto.c b/contrib/ntp/sntp/tests/crypto.c
index 254469e63a94..82d285976d4c 100644
--- a/contrib/ntp/sntp/tests/crypto.c
+++ b/contrib/ntp/sntp/tests/crypto.c
@@ -8,7 +8,17 @@
#define MD5_LENGTH 16
#define SHA1_LENGTH 20
-void test_MakeMd5Mac(void) {
+
+void test_MakeMd5Mac(void);
+void test_MakeSHA1Mac(void);
+void test_VerifyCorrectMD5(void);
+void test_VerifySHA1(void);
+void test_VerifyFailure(void);
+void test_PacketSizeNotMultipleOfFourBytes(void);
+
+
+void
+test_MakeMd5Mac(void) {
const char* PKT_DATA = "abcdefgh0123";
const int PKT_LEN = strlen(PKT_DATA);
@@ -30,7 +40,8 @@ void test_MakeMd5Mac(void) {
}
-void test_MakeSHA1Mac(void) {
+void
+test_MakeSHA1Mac(void) {
#ifdef OPENSSL
const char* PKT_DATA = "abcdefgh0123";
const int PKT_LEN = strlen(PKT_DATA);
@@ -49,14 +60,15 @@ void test_MakeSHA1Mac(void) {
TEST_ASSERT_EQUAL(SHA1_LENGTH,
make_mac((char*)PKT_DATA, PKT_LEN, SHA1_LENGTH, &sha1, actual));
- TEST_ASSERT_TRUE(memcmp(EXPECTED_DIGEST, actual, SHA1_LENGTH) == 0);
+ TEST_ASSERT_EQUAL_MEMORY(EXPECTED_DIGEST, actual, SHA1_LENGTH);
#else
TEST_IGNORE_MESSAGE("OpenSSL not found, skipping...");
#endif /* OPENSSL */
}
-void test_VerifyCorrectMD5(void) {
+void
+test_VerifyCorrectMD5(void) {
const char* PKT_DATA =
"sometestdata" // Data
"\0\0\0\0" // Key-ID (unused)
@@ -75,7 +87,8 @@ void test_VerifyCorrectMD5(void) {
}
-void test_VerifySHA1(void) {
+void
+test_VerifySHA1(void) {
#ifdef OPENSSL
const char* PKT_DATA =
"sometestdata" // Data
@@ -97,7 +110,8 @@ void test_VerifySHA1(void) {
#endif /* OPENSSL */
}
-void test_VerifyFailure(void) {
+void
+test_VerifyFailure(void) {
/* We use a copy of the MD5 verification code, but modify
* the last bit to make sure verification fails. */
const char* PKT_DATA =
@@ -117,7 +131,9 @@ void test_VerifyFailure(void) {
TEST_ASSERT_FALSE(auth_md5((char*)PKT_DATA, PKT_LEN, MD5_LENGTH, &md5));
}
-void test_PacketSizeNotMultipleOfFourBytes(void) {
+
+void
+test_PacketSizeNotMultipleOfFourBytes(void) {
const char* PKT_DATA = "123456";
const int PKT_LEN = 6;
char actual[MD5_LENGTH];
@@ -131,4 +147,3 @@ void test_PacketSizeNotMultipleOfFourBytes(void) {
TEST_ASSERT_EQUAL(0, make_mac((char*)PKT_DATA, PKT_LEN, MD5_LENGTH, &md5, actual));
}
-
diff --git a/contrib/ntp/sntp/tests/fileHandlingTest.c b/contrib/ntp/sntp/tests/fileHandlingTest.c
new file mode 100644
index 000000000000..ce3f0de77281
--- /dev/null
+++ b/contrib/ntp/sntp/tests/fileHandlingTest.c
@@ -0,0 +1,74 @@
+
+#include "config.h"
+#include "stdlib.h"
+#include "sntptest.h"
+
+#include "fileHandlingTest.h" //required because of the h.in thingy
+
+#include <string.h>
+#include <unistd.h>
+
+/*
+enum DirectoryType {
+ INPUT_DIR = 0,
+ OUTPUT_DIR = 1
+};
+*/
+//extern const char srcdir[];
+
+const char *
+CreatePath(const char* filename, enum DirectoryType argument) {
+ const char srcdir[] = SRCDIR_DEF;//"@abs_srcdir@/data/";
+ char * path = emalloc (sizeof (char) * (strlen(srcdir) + 256));
+
+ //char cwd[1024];
+
+ strcpy(path, srcdir);
+ strcat(path, filename);
+
+ return path;
+}
+
+
+int
+GetFileSize(FILE *file) {
+ fseek(file, 0L, SEEK_END);
+ int length = ftell(file);
+ fseek(file, 0L, SEEK_SET);
+
+ return length;
+}
+
+
+bool
+CompareFileContent(FILE* expected, FILE* actual) {
+ int currentLine = 1;
+
+ char actualLine[1024];
+ char expectedLine[1024];
+ size_t lenAct = sizeof actualLine;
+ size_t lenExp = sizeof expectedLine;
+
+ while ( ( (fgets(actualLine, lenAct, actual)) != NULL)
+ && ( (fgets(expectedLine, lenExp, expected)) != NULL )
+ ) {
+
+
+ if( strcmp(actualLine,expectedLine) !=0 ){
+ printf("Comparision failed on line %d",currentLine);
+ return FALSE;
+ }
+
+ currentLine++;
+ }
+
+ return TRUE;
+}
+
+
+void
+ClearFile(const char * filename) {
+ if (!truncate(filename, 0))
+ exit(1);
+}
+
diff --git a/contrib/ntp/sntp/tests/fileHandlingTest.h b/contrib/ntp/sntp/tests/fileHandlingTest.h
deleted file mode 100644
index 38c3fa6391c4..000000000000
--- a/contrib/ntp/sntp/tests/fileHandlingTest.h
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifndef FILE_HANDLING_TEST_H
-#define FILE_HANDLING_TEST_H
-
-#include "stdlib.h"
-#include "sntptest.h"
-
-#include <string.h>
-#include <unistd.h>
-
-
-enum DirectoryType {
- INPUT_DIR = 0,
- OUTPUT_DIR = 1
-};
-
-const char * CreatePath(const char* filename, enum DirectoryType argument) {
-
- char * path = malloc (sizeof (char) * 256);
-
- /*
- if (m_params.size() >= argument + 1) {
- path = m_params[argument];
- }
-
- if (path[path.size()-1] != DIR_SEP && !path.empty()) {
- path.append(1, DIR_SEP);
- }
- */
- //strcpy(path,filename);
- //path.append(filename);
-
- //return path;
-
- char cwd[1024];
- if (getcwd(cwd, sizeof(cwd)) != NULL)
- printf("Current working dir: %s\n", cwd);
-
- printf("builddir is <.>\n");
- printf("abs_srcdir is </deacon/backroom/snaps/ntp-stable/sntp/tests>\n");
- strcpy(path,"/deacon/backroom/snaps/ntp-stable/sntp/tests/data/");
-
- //strcpy(path,"");
- strcat(path,filename);
- printf("PATH IS : %s\n",path);
- return path;
-}
-
-int GetFileSize(FILE *file) {
-
- fseek(file, 0L, SEEK_END);
- int length = ftell(file);
- fseek(file, 0L, SEEK_SET);
-
- //int initial = file.tellg();
-
- //file.seekg(0, ios::end);
- //int length = file.tellg();
- //file.seekg(initial);
-
- return length;
-}
-
-bool CompareFileContent(FILE* expected, FILE* actual) {
- int currentLine = 1;
-
- char actualLine[1024];
- char expectedLine[1024];
- size_t lenAct = sizeof actualLine;
- size_t lenExp = sizeof expectedLine;
-
- while ( ( (fgets(actualLine, lenAct, actual)) != NULL)
- && ( (fgets(expectedLine, lenExp, expected)) != NULL )
- ) {
-
- //printf("%s",actualLine);
- //printf("%s",expectedLine);
-
- if( strcmp(actualLine,expectedLine) !=0 ){
- printf("Comparision failed on line %d",currentLine);
- return FALSE;
- }
-
- //I removed this and modified the test kodFile.c, because there shouldn't be any ASSERTs in .h files!
- //TEST_ASSERT_EQUAL_STRING(actualLine,expectedLine);//EXPECT_EQ(expectedLine, actualLine) << "Comparision failed on line " << currentLine;
- currentLine++;
- }
-
- return TRUE;
-}
-
-void ClearFile(const char * filename) {
- FILE * clear = fopen(filename, "w");//ios::trunc); //similar to truncate, I GUESS???!
-
- //I removed this because there shouldn't be any ASSERTs in .h files!
- //TEST_ASSERT_TRUE(clear != NULL);
- fclose(clear);
-}
-
-
-#endif // FILE_HANDLING_TEST_H
diff --git a/contrib/ntp/sntp/tests/fileHandlingTest.h.in b/contrib/ntp/sntp/tests/fileHandlingTest.h.in
index 8ff9d34ec3b7..e7d99ee403df 100644
--- a/contrib/ntp/sntp/tests/fileHandlingTest.h.in
+++ b/contrib/ntp/sntp/tests/fileHandlingTest.h.in
@@ -1,6 +1,7 @@
#ifndef FILE_HANDLING_TEST_H
#define FILE_HANDLING_TEST_H
+#include "config.h"
#include "stdlib.h"
#include "sntptest.h"
@@ -13,88 +14,22 @@ enum DirectoryType {
OUTPUT_DIR = 1
};
-const char * CreatePath(const char* filename, enum DirectoryType argument) {
-
- char * path = malloc (sizeof (char) * 256);
+#define SRCDIR_DEF "@abs_srcdir@/data/";
+//const char srcdir[] = "@abs_srcdir@/data/";
- /*
- if (m_params.size() >= argument + 1) {
- path = m_params[argument];
- }
+const char *
+CreatePath(const char* filename, enum DirectoryType argument);
- if (path[path.size()-1] != DIR_SEP && !path.empty()) {
- path.append(1, DIR_SEP);
- }
- */
- //strcpy(path,filename);
- //path.append(filename);
- //return path;
+int
+GetFileSize(FILE *file);
- char cwd[1024];
- if (getcwd(cwd, sizeof(cwd)) != NULL)
- printf("Current working dir: %s\n", cwd);
-
- printf("builddir is <@builddir@>\n");
- printf("abs_srcdir is <@abs_srcdir@>\n");
- strcpy(path,"@abs_srcdir@/data/");
- //strcpy(path,"");
- strcat(path,filename);
- printf("PATH IS : %s\n",path);
- return path;
-}
+bool
+CompareFileContent(FILE* expected, FILE* actual);
-int GetFileSize(FILE *file) {
-
- fseek(file, 0L, SEEK_END);
- int length = ftell(file);
- fseek(file, 0L, SEEK_SET);
-
- //int initial = file.tellg();
-
- //file.seekg(0, ios::end);
- //int length = file.tellg();
- //file.seekg(initial);
-
- return length;
-}
-
-bool CompareFileContent(FILE* expected, FILE* actual) {
- int currentLine = 1;
-
- char actualLine[1024];
- char expectedLine[1024];
- size_t lenAct = sizeof actualLine;
- size_t lenExp = sizeof expectedLine;
-
- while ( ( (fgets(actualLine, lenAct, actual)) != NULL)
- && ( (fgets(expectedLine, lenExp, expected)) != NULL )
- ) {
-
- //printf("%s",actualLine);
- //printf("%s",expectedLine);
-
- if( strcmp(actualLine,expectedLine) !=0 ){
- printf("Comparision failed on line %d",currentLine);
- return FALSE;
- }
-
- //I removed this and modified the test kodFile.c, because there shouldn't be any ASSERTs in .h files!
- //TEST_ASSERT_EQUAL_STRING(actualLine,expectedLine);//EXPECT_EQ(expectedLine, actualLine) << "Comparision failed on line " << currentLine;
- currentLine++;
- }
-
- return TRUE;
-}
-
-void ClearFile(const char * filename) {
- FILE * clear = fopen(filename, "w");//ios::trunc); //similar to truncate, I GUESS???!
-
- //I removed this because there shouldn't be any ASSERTs in .h files!
- //TEST_ASSERT_TRUE(clear != NULL);
- fclose(clear);
-}
+void
+ClearFile(const char * filename) ;
#endif // FILE_HANDLING_TEST_H
diff --git a/contrib/ntp/sntp/tests/g_fileHandlingTest.h b/contrib/ntp/sntp/tests/g_fileHandlingTest.h
deleted file mode 100644
index 7c8a78a146e3..000000000000
--- a/contrib/ntp/sntp/tests/g_fileHandlingTest.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef FILE_HANDLING_TEST_H
-#define FILE_HANDLING_TEST_H
-
-#include "g_sntptest.h"
-
-#include <fstream>
-#include <string>
-
-using std::ifstream;
-using std::string;
-using std::ios;
-
-class fileHandlingTest : public sntptest {
-protected:
- enum DirectoryType {
- INPUT_DIR = 0,
- OUTPUT_DIR = 1
- };
-
- std::string CreatePath(const char* filename, DirectoryType argument) {
- std::string path;
-
- if (m_params.size() >= argument + 1) {
- path = m_params[argument];
- }
-
- if (path[path.size()-1] != DIR_SEP && !path.empty()) {
- path.append(1, DIR_SEP);
- }
- path.append(filename);
-
- return path;
- }
-
- int GetFileSize(ifstream& file) {
- int initial = file.tellg();
-
- file.seekg(0, ios::end);
- int length = file.tellg();
- file.seekg(initial);
-
- return length;
- }
-
- void CompareFileContent(ifstream& expected, ifstream& actual) {
- int currentLine = 1;
- while (actual.good() && expected.good()) {
- string actualLine, expectedLine;
- getline(actual, actualLine);
- getline(expected, expectedLine);
-
- EXPECT_EQ(expectedLine, actualLine) << "Comparision failed on line " << currentLine;
- currentLine++;
- }
- }
-
- void ClearFile(const std::string& filename) {
- std::ofstream clear(filename.c_str(), ios::trunc);
- ASSERT_TRUE(clear.good());
- clear.close();
- }
-};
-
-#endif // FILE_HANDLING_TEST_H
diff --git a/contrib/ntp/sntp/tests/g_networking.cpp b/contrib/ntp/sntp/tests/g_networking.cpp
deleted file mode 100644
index d75f4a5cc680..000000000000
--- a/contrib/ntp/sntp/tests/g_networking.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "g_sntptest.h"
-
-extern "C" {
-#include "networking.h"
-};
diff --git a/contrib/ntp/sntp/tests/g_packetHandling.cpp b/contrib/ntp/sntp/tests/g_packetHandling.cpp
deleted file mode 100644
index bd5b14e0d70c..000000000000
--- a/contrib/ntp/sntp/tests/g_packetHandling.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-#include "g_sntptest.h"
-
-extern "C" {
-#include "kod_management.h"
-#include "main.h"
-#include "networking.h"
-#include "ntp.h"
-};
-
-class mainTest : public sntptest {
-protected:
- ::testing::AssertionResult LfpEquality(const l_fp &expected, const l_fp &actual) {
- if (L_ISEQU(&expected, &actual)) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << " expected: " << lfptoa(&expected, FRACTION_PREC)
- << " (" << expected.l_ui << "." << expected.l_uf << ")"
- << " but was: " << lfptoa(&actual, FRACTION_PREC)
- << " (" << actual.l_ui << "." << actual.l_uf << ")";
- }
- }
-};
-
-TEST_F(mainTest, GenerateUnauthenticatedPacket) {
- pkt testpkt;
-
- timeval xmt;
- GETTIMEOFDAY(&xmt, NULL);
- xmt.tv_sec += JAN_1970;
-
- EXPECT_EQ(LEN_PKT_NOMAC,
- generate_pkt(&testpkt, &xmt, 0, NULL));
-
- EXPECT_EQ(LEAP_NOTINSYNC, PKT_LEAP(testpkt.li_vn_mode));
- EXPECT_EQ(NTP_VERSION, PKT_VERSION(testpkt.li_vn_mode));
- EXPECT_EQ(MODE_CLIENT, PKT_MODE(testpkt.li_vn_mode));
-
- EXPECT_EQ(STRATUM_UNSPEC, PKT_TO_STRATUM(testpkt.stratum));
- EXPECT_EQ(8, testpkt.ppoll);
-
- l_fp expected_xmt, actual_xmt;
- TVTOTS(&xmt, &expected_xmt);
- NTOHL_FP(&testpkt.xmt, &actual_xmt);
- EXPECT_TRUE(LfpEquality(expected_xmt, actual_xmt));
-}
-
-TEST_F(mainTest, GenerateAuthenticatedPacket) {
- key testkey;
- testkey.next = NULL;
- testkey.key_id = 30;
- testkey.key_len = 9;
- memcpy(testkey.key_seq, "123456789", testkey.key_len);
- memcpy(testkey.type, "MD5", 3);
-
- pkt testpkt;
-
- timeval xmt;
- GETTIMEOFDAY(&xmt, NULL);
- xmt.tv_sec += JAN_1970;
-
- const int EXPECTED_PKTLEN = LEN_PKT_NOMAC + MAX_MD5_LEN;
-
- EXPECT_EQ(EXPECTED_PKTLEN,
- generate_pkt(&testpkt, &xmt, testkey.key_id, &testkey));
-
- EXPECT_EQ(LEAP_NOTINSYNC, PKT_LEAP(testpkt.li_vn_mode));
- EXPECT_EQ(NTP_VERSION, PKT_VERSION(testpkt.li_vn_mode));
- EXPECT_EQ(MODE_CLIENT, PKT_MODE(testpkt.li_vn_mode));
-
- EXPECT_EQ(STRATUM_UNSPEC, PKT_TO_STRATUM(testpkt.stratum));
- EXPECT_EQ(8, testpkt.ppoll);
-
- l_fp expected_xmt, actual_xmt;
- TVTOTS(&xmt, &expected_xmt);
- NTOHL_FP(&testpkt.xmt, &actual_xmt);
- EXPECT_TRUE(LfpEquality(expected_xmt, actual_xmt));
-
- EXPECT_EQ(testkey.key_id, ntohl(testpkt.exten[0]));
-
- char expected_mac[MAX_MD5_LEN];
- ASSERT_EQ(MAX_MD5_LEN - 4, // Remove the key_id, only keep the mac.
- make_mac((char*)&testpkt, LEN_PKT_NOMAC, MAX_MD5_LEN, &testkey, expected_mac));
- EXPECT_TRUE(memcmp(expected_mac, (char*)&testpkt.exten[1], MAX_MD5_LEN -4) == 0);
-}
-
-TEST_F(mainTest, OffsetCalculationPositiveOffset) {
- pkt rpkt;
-
- rpkt.precision = -16; // 0,000015259
- rpkt.rootdelay = HTONS_FP(DTOUFP(0.125));
- rpkt.rootdisp = HTONS_FP(DTOUFP(0.25));
- // Synch Distance: (0.125+0.25)/2.0 == 0.1875
- l_fp reftime;
- get_systime(&reftime);
- HTONL_FP(&reftime, &rpkt.reftime);
-
- l_fp tmp;
-
- // T1 - Originate timestamp
- tmp.l_ui = 1000000000UL;
- tmp.l_uf = 0UL;
- HTONL_FP(&tmp, &rpkt.org);
-
- // T2 - Receive timestamp
- tmp.l_ui = 1000000001UL;
- tmp.l_uf = 2147483648UL;
- HTONL_FP(&tmp, &rpkt.rec);
-
- // T3 - Transmit timestamp
- tmp.l_ui = 1000000002UL;
- tmp.l_uf = 0UL;
- HTONL_FP(&tmp, &rpkt.xmt);
-
- // T4 - Destination timestamp as standard timeval
- tmp.l_ui = 1000000001UL;
- tmp.l_uf = 0UL;
- timeval dst;
- TSTOTV(&tmp, &dst);
- dst.tv_sec -= JAN_1970;
-
- double offset, precision, synch_distance;
- offset_calculation(&rpkt, LEN_PKT_NOMAC, &dst, &offset, &precision, &synch_distance);
-
- EXPECT_DOUBLE_EQ(1.25, offset);
- EXPECT_DOUBLE_EQ(1. / ULOGTOD(16), precision);
- // 1.1250150000000001 ?
- EXPECT_DOUBLE_EQ(1.125015, synch_distance);
-}
-
-TEST_F(mainTest, OffsetCalculationNegativeOffset) {
- pkt rpkt;
-
- rpkt.precision = -1;
- rpkt.rootdelay = HTONS_FP(DTOUFP(0.5));
- rpkt.rootdisp = HTONS_FP(DTOUFP(0.5));
- // Synch Distance is (0.5+0.5)/2.0, or 0.5
- l_fp reftime;
- get_systime(&reftime);
- HTONL_FP(&reftime, &rpkt.reftime);
-
- l_fp tmp;
-
- // T1 - Originate timestamp
- tmp.l_ui = 1000000001UL;
- tmp.l_uf = 0UL;
- HTONL_FP(&tmp, &rpkt.org);
-
- // T2 - Receive timestamp
- tmp.l_ui = 1000000000UL;
- tmp.l_uf = 2147483648UL;
- HTONL_FP(&tmp, &rpkt.rec);
-
- // T3 - Transmit timestamp
- tmp.l_ui = 1000000001UL;
- tmp.l_uf = 2147483648UL;
- HTONL_FP(&tmp, &rpkt.xmt);
-
- // T4 - Destination timestamp as standard timeval
- tmp.l_ui = 1000000003UL;
- tmp.l_uf = 0UL;
- timeval dst;
- TSTOTV(&tmp, &dst);
- dst.tv_sec -= JAN_1970;
-
- double offset, precision, synch_distance;
- offset_calculation(&rpkt, LEN_PKT_NOMAC, &dst, &offset, &precision, &synch_distance);
-
- EXPECT_DOUBLE_EQ(-1, offset);
- EXPECT_DOUBLE_EQ(1. / ULOGTOD(1), precision);
- EXPECT_DOUBLE_EQ(1.3333483333333334, synch_distance);
-}
-
-TEST_F(mainTest, HandleUnusableServer) {
- pkt rpkt;
- sockaddr_u host;
- int rpktl;
-
- ZERO(rpkt);
- ZERO(host);
- rpktl = SERVER_UNUSEABLE;
- EXPECT_EQ(-1, handle_pkt(rpktl, &rpkt, &host, ""));
-}
-
-TEST_F(mainTest, HandleUnusablePacket) {
- pkt rpkt;
- sockaddr_u host;
- int rpktl;
-
- ZERO(rpkt);
- ZERO(host);
- rpktl = PACKET_UNUSEABLE;
- EXPECT_EQ(1, handle_pkt(rpktl, &rpkt, &host, ""));
-}
-
-TEST_F(mainTest, HandleServerAuthenticationFailure) {
- pkt rpkt;
- sockaddr_u host;
- int rpktl;
-
- ZERO(rpkt);
- ZERO(host);
- rpktl = SERVER_AUTH_FAIL;
- EXPECT_EQ(1, handle_pkt(rpktl, &rpkt, &host, ""));
-}
-
-TEST_F(mainTest, HandleKodDemobilize) {
- const char * HOSTNAME = "192.0.2.1";
- const char * REASON = "DENY";
- pkt rpkt;
- sockaddr_u host;
- int rpktl;
- kod_entry * entry;
-
- rpktl = KOD_DEMOBILIZE;
- ZERO(rpkt);
- memcpy(&rpkt.refid, REASON, 4);
- ZERO(host);
- host.sa4.sin_family = AF_INET;
- host.sa4.sin_addr.s_addr = inet_addr(HOSTNAME);
-
- // Test that the KOD-entry is added to the database.
- kod_init_kod_db("/dev/null", TRUE);
-
- EXPECT_EQ(1, handle_pkt(rpktl, &rpkt, &host, HOSTNAME));
-
- ASSERT_EQ(1, search_entry(HOSTNAME, &entry));
- EXPECT_TRUE(memcmp(REASON, entry->type, 4) == 0);
-}
-
-TEST_F(mainTest, HandleKodRate) {
- pkt rpkt;
- sockaddr_u host;
- int rpktl;
-
- ZERO(rpkt);
- ZERO(host);
- rpktl = KOD_RATE;
- EXPECT_EQ(1, handle_pkt(rpktl, &rpkt, &host, ""));
-}
-
-TEST_F(mainTest, HandleCorrectPacket) {
- pkt rpkt;
- sockaddr_u host;
- int rpktl;
- l_fp now;
-
- // We don't want our testing code to actually change the system clock.
- ASSERT_FALSE(ENABLED_OPT(STEP));
- ASSERT_FALSE(ENABLED_OPT(SLEW));
-
- get_systime(&now);
- HTONL_FP(&now, &rpkt.reftime);
- HTONL_FP(&now, &rpkt.org);
- HTONL_FP(&now, &rpkt.rec);
- HTONL_FP(&now, &rpkt.xmt);
- rpktl = LEN_PKT_NOMAC;
- ZERO(host);
- AF(&host) = AF_INET;
-
- EXPECT_EQ(0, handle_pkt(rpktl, &rpkt, &host, ""));
-}
-
-/* packetHandling.cpp */
diff --git a/contrib/ntp/sntp/tests/g_packetProcessing.cpp b/contrib/ntp/sntp/tests/g_packetProcessing.cpp
deleted file mode 100644
index 85659a43dda5..000000000000
--- a/contrib/ntp/sntp/tests/g_packetProcessing.cpp
+++ /dev/null
@@ -1,334 +0,0 @@
-#include "g_sntptest.h"
-
-extern "C" {
-#include "networking.h"
-#include "ntp_stdlib.h"
-};
-
-#include <sstream>
-#include <string>
-
-// Hacks into the key database.
-extern key* key_ptr;
-extern int key_cnt;
-
-class packetProcessingTest : public sntptest {
-protected:
- pkt testpkt;
- pkt testspkt;
- sockaddr_u testsock;
- bool restoreKeyDb;
-
- void PrepareAuthenticationTest(int key_id,
- int key_len,
- const char* type,
- const void* key_seq) {
- std::stringstream ss;
- ss << key_id;
-
- ActivateOption("-a", ss.str().c_str());
-
- key_cnt = 1;
- key_ptr = new key;
- key_ptr->next = NULL;
- key_ptr->key_id = key_id;
- key_ptr->key_len = key_len;
- memcpy(key_ptr->type, "MD5", 3);
-
- ASSERT_TRUE(key_len < sizeof(key_ptr->key_seq));
-
- memcpy(key_ptr->key_seq, key_seq, key_ptr->key_len);
- restoreKeyDb = true;
- }
-
- void PrepareAuthenticationTest(int key_id,
- int key_len,
- const void* key_seq) {
- PrepareAuthenticationTest(key_id, key_len, "MD5", key_seq);
- }
-
- virtual void SetUp() {
- restoreKeyDb = false;
-
- /* Initialize the test packet and socket,
- * so they contain at least some valid data. */
- testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, NTP_VERSION,
- MODE_SERVER);
- testpkt.stratum = STRATUM_REFCLOCK;
- memcpy(&testpkt.refid, "GPS\0", 4);
-
- /* Set the origin timestamp of the received packet to the
- * same value as the transmit timestamp of the sent packet. */
- l_fp tmp;
- tmp.l_ui = 1000UL;
- tmp.l_uf = 0UL;
-
- HTONL_FP(&tmp, &testpkt.org);
- HTONL_FP(&tmp, &testspkt.xmt);
- }
-
- virtual void TearDown() {
- if (restoreKeyDb) {
- key_cnt = 0;
- delete key_ptr;
- key_ptr = NULL;
- }
- }
-};
-
-TEST_F(packetProcessingTest, TooShortLength) {
- EXPECT_EQ(PACKET_UNUSEABLE,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC - 1,
- MODE_SERVER, &testspkt, "UnitTest"));
- EXPECT_EQ(PACKET_UNUSEABLE,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC - 1,
- MODE_BROADCAST, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, LengthNotMultipleOfFour) {
- EXPECT_EQ(PACKET_UNUSEABLE,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC + 6,
- MODE_SERVER, &testspkt, "UnitTest"));
- EXPECT_EQ(PACKET_UNUSEABLE,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC + 3,
- MODE_BROADCAST, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, TooShortExtensionFieldLength) {
- /* The lower 16-bits are the length of the extension field.
- * This lengths must be multiples of 4 bytes, which gives
- * a minimum of 4 byte extension field length. */
- testpkt.exten[7] = htonl(3); // 3 bytes is too short.
-
- /* We send in a pkt_len of header size + 4 byte extension
- * header + 24 byte MAC, this prevents the length error to
- * be caught at an earlier stage */
- int pkt_len = LEN_PKT_NOMAC + 4 + 24;
-
- EXPECT_EQ(PACKET_UNUSEABLE,
- process_pkt(&testpkt, &testsock, pkt_len,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, UnauthenticatedPacketReject) {
- // Activate authentication option
- ActivateOption("-a", "123");
- ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
-
- int pkt_len = LEN_PKT_NOMAC;
-
- // We demand authentication, but no MAC header is present.
- EXPECT_EQ(SERVER_AUTH_FAIL,
- process_pkt(&testpkt, &testsock, pkt_len,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, CryptoNAKPacketReject) {
- // Activate authentication option
- ActivateOption("-a", "123");
- ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
-
- int pkt_len = LEN_PKT_NOMAC + 4; // + 4 byte MAC = Crypto-NAK
-
- EXPECT_EQ(SERVER_AUTH_FAIL,
- process_pkt(&testpkt, &testsock, pkt_len,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, AuthenticatedPacketInvalid) {
- // Activate authentication option
- PrepareAuthenticationTest(50, 9, "123456789");
- ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
-
- // Prepare the packet.
- int pkt_len = LEN_PKT_NOMAC;
-
- testpkt.exten[0] = htonl(50);
- int mac_len = make_mac((char*)&testpkt, pkt_len,
- MAX_MD5_LEN, key_ptr,
- (char*)&testpkt.exten[1]);
-
- pkt_len += 4 + mac_len;
-
- // Now, alter the MAC so it becomes invalid.
- testpkt.exten[1] += 1;
-
- EXPECT_EQ(SERVER_AUTH_FAIL,
- process_pkt(&testpkt, &testsock, pkt_len,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, AuthenticatedPacketUnknownKey) {
- // Activate authentication option
- PrepareAuthenticationTest(30, 9, "123456789");
- ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
-
- // Prepare the packet. Observe that the Key-ID expected is 30,
- // but the packet has a key id of 50.
- int pkt_len = LEN_PKT_NOMAC;
-
- testpkt.exten[0] = htonl(50);
- int mac_len = make_mac((char*)&testpkt, pkt_len,
- MAX_MD5_LEN, key_ptr,
- (char*)&testpkt.exten[1]);
- pkt_len += 4 + mac_len;
-
- EXPECT_EQ(SERVER_AUTH_FAIL,
- process_pkt(&testpkt, &testsock, pkt_len,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, ServerVersionTooOld) {
- ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
-
- testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
- NTP_OLDVERSION - 1,
- MODE_CLIENT);
- ASSERT_LT(PKT_VERSION(testpkt.li_vn_mode), NTP_OLDVERSION);
-
- int pkt_len = LEN_PKT_NOMAC;
-
- EXPECT_EQ(SERVER_UNUSEABLE,
- process_pkt(&testpkt, &testsock, pkt_len,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, ServerVersionTooNew) {
- ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
-
- testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
- NTP_VERSION + 1,
- MODE_CLIENT);
- ASSERT_GT(PKT_VERSION(testpkt.li_vn_mode), NTP_VERSION);
-
- int pkt_len = LEN_PKT_NOMAC;
-
- EXPECT_EQ(SERVER_UNUSEABLE,
- process_pkt(&testpkt, &testsock, pkt_len,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, NonWantedMode) {
- ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
-
- testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
- NTP_VERSION,
- MODE_CLIENT);
-
- // The packet has a mode of MODE_CLIENT, but process_pkt expects MODE_SERVER
-
- EXPECT_EQ(SERVER_UNUSEABLE,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-/* Tests bug 1597 */
-TEST_F(packetProcessingTest, KoDRate) {
- ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
-
- testpkt.stratum = STRATUM_PKT_UNSPEC;
- memcpy(&testpkt.refid, "RATE", 4);
-
- EXPECT_EQ(KOD_RATE,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, KoDDeny) {
- ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
-
- testpkt.stratum = STRATUM_PKT_UNSPEC;
- memcpy(&testpkt.refid, "DENY", 4);
-
- EXPECT_EQ(KOD_DEMOBILIZE,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, RejectUnsyncedServer) {
- ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
-
- testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
- NTP_VERSION,
- MODE_SERVER);
-
- EXPECT_EQ(SERVER_UNUSEABLE,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, RejectWrongResponseServerMode) {
- ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
-
- l_fp tmp;
- tmp.l_ui = 1000UL;
- tmp.l_uf = 0UL;
- HTONL_FP(&tmp, &testpkt.org);
-
- tmp.l_ui = 2000UL;
- tmp.l_uf = 0UL;
- HTONL_FP(&tmp, &testspkt.xmt);
-
- EXPECT_EQ(PACKET_UNUSEABLE,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, AcceptNoSentPacketBroadcastMode) {
- ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
-
- testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
- NTP_VERSION,
- MODE_BROADCAST);
-
- EXPECT_EQ(LEN_PKT_NOMAC,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
- MODE_BROADCAST, NULL, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, CorrectUnauthenticatedPacket) {
- ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
-
- EXPECT_EQ(LEN_PKT_NOMAC,
- process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
-
-TEST_F(packetProcessingTest, CorrectAuthenticatedPacketMD5) {
- PrepareAuthenticationTest(10, 15, "123456789abcdef");
- ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
-
- int pkt_len = LEN_PKT_NOMAC;
-
- // Prepare the packet.
- testpkt.exten[0] = htonl(10);
- int mac_len = make_mac((char*)&testpkt, pkt_len,
- MAX_MD5_LEN, key_ptr,
- (char*)&testpkt.exten[1]);
-
- pkt_len += 4 + mac_len;
-
- EXPECT_EQ(pkt_len,
- process_pkt(&testpkt, &testsock, pkt_len,
- MODE_SERVER, &testspkt, "UnitTest"));
-
-}
-
-TEST_F(packetProcessingTest, CorrectAuthenticatedPacketSHA1) {
- PrepareAuthenticationTest(20, 15, "SHA1", "abcdefghijklmno");
- ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
-
- int pkt_len = LEN_PKT_NOMAC;
-
- // Prepare the packet.
- testpkt.exten[0] = htonl(20);
- int mac_len = make_mac((char*)&testpkt, pkt_len,
- MAX_MAC_LEN, key_ptr,
- (char*)&testpkt.exten[1]);
-
- pkt_len += 4 + mac_len;
-
- EXPECT_EQ(pkt_len,
- process_pkt(&testpkt, &testsock, pkt_len,
- MODE_SERVER, &testspkt, "UnitTest"));
-}
diff --git a/contrib/ntp/sntp/tests/g_sntptest.h b/contrib/ntp/sntp/tests/g_sntptest.h
deleted file mode 100644
index d5add9cbf465..000000000000
--- a/contrib/ntp/sntp/tests/g_sntptest.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef SNTPTEST_H
-#define SNTPTEST_H
-
-#include "tests_main.h"
-
-extern "C" {
-#include "ntp_stdlib.h"
-#include "sntp-opts.h"
-};
-
-class sntptest : public ntptest {
-protected:
- sntptest() {
- optionSaveState(&sntpOptions);
- }
-
- ~sntptest() {
- optionRestore(&sntpOptions);
- }
-
- void ActivateOption(const char* option, const char* argument) {
- const int ARGV_SIZE = 4;
-
- char* opts[ARGV_SIZE];
-
- opts[0] = estrdup("sntpopts");
- opts[1] = estrdup(option);
- opts[2] = estrdup(argument);
- opts[3] = estrdup("127.0.0.1");
-
- optionProcess(&sntpOptions, ARGV_SIZE, opts);
- }
-};
-
-#endif // SNTPTEST_H
diff --git a/contrib/ntp/sntp/tests/keyFile.c b/contrib/ntp/sntp/tests/keyFile.c
index 3769947c5008..77dfee7f0215 100644
--- a/contrib/ntp/sntp/tests/keyFile.c
+++ b/contrib/ntp/sntp/tests/keyFile.c
@@ -7,10 +7,17 @@
#include "unity.h"
-//typedef int bool;
+bool CompareKeys(struct key expected, struct key actual);
+bool CompareKeysAlternative(int key_id,int key_len,const char* type,const char* key_seq,struct key actual);
+void test_ReadEmptyKeyFile(void);
+void test_ReadASCIIKeys(void);
+void test_ReadHexKeys(void);
+void test_ReadKeyFileWithComments(void);
+void test_ReadKeyFileWithInvalidHex(void);
-bool CompareKeys(struct key expected, struct key actual) {
+bool
+CompareKeys(struct key expected, struct key actual) {
if (expected.key_id != actual.key_id){
printf("Expected key_id: %d", expected.key_id);
printf(" but was: %d\n", actual.key_id);
@@ -34,7 +41,9 @@ bool CompareKeys(struct key expected, struct key actual) {
return TRUE;
}
-bool CompareKeysAlternative(int key_id,
+
+bool
+CompareKeysAlternative(int key_id,
int key_len,
const char* type,
const char* key_seq,
@@ -50,91 +59,99 @@ bool CompareKeysAlternative(int key_id,
}
-void test_ReadEmptyKeyFile() {
+void
+test_ReadEmptyKeyFile(void) {
struct key* keys = NULL;
TEST_ASSERT_EQUAL(0, auth_init(CreatePath("key-test-empty", INPUT_DIR), &keys));
-
- TEST_ASSERT_TRUE(keys == NULL);
+ TEST_ASSERT_NULL(keys);
}
-void test_ReadASCIIKeys() {
+
+void
+test_ReadASCIIKeys(void) {
struct key* keys = NULL;
TEST_ASSERT_EQUAL(2, auth_init(CreatePath("key-test-ascii", INPUT_DIR), &keys));
- TEST_ASSERT_TRUE(keys != NULL);
+ TEST_ASSERT_NOT_NULL(keys);
struct key* result = NULL;
get_key(40, &result);
- TEST_ASSERT_TRUE(result != NULL);
+ TEST_ASSERT_NOT_NULL(result);
TEST_ASSERT_TRUE(CompareKeysAlternative(40, 11, "MD5", "asciikeyTwo", *result));
result = NULL;
get_key(50, &result);
- TEST_ASSERT_TRUE(result != NULL);
+ TEST_ASSERT_NOT_NULL(result);
TEST_ASSERT_TRUE(CompareKeysAlternative(50, 11, "MD5", "asciikeyOne", *result));
}
-void test_ReadHexKeys() {
+
+void
+test_ReadHexKeys(void) {
struct key* keys = NULL;
TEST_ASSERT_EQUAL(3, auth_init(CreatePath("key-test-hex", INPUT_DIR), &keys));
- TEST_ASSERT_TRUE(keys != NULL);
+ TEST_ASSERT_NOT_NULL(keys);
struct key* result = NULL;
get_key(10, &result);
- TEST_ASSERT_TRUE(result != NULL);
+ TEST_ASSERT_NOT_NULL(result);
TEST_ASSERT_TRUE(CompareKeysAlternative(10, 13, "MD5",
"\x01\x23\x45\x67\x89\xab\xcd\xef\x01\x23\x45\x67\x89", *result));
result = NULL;
get_key(20, &result);
- TEST_ASSERT_TRUE(result != NULL);
+ TEST_ASSERT_NOT_NULL(result);
char data1[15]; memset(data1, 0x11, 15);
TEST_ASSERT_TRUE(CompareKeysAlternative(20, 15, "MD5", data1, *result));
result = NULL;
get_key(30, &result);
- TEST_ASSERT_TRUE(result != NULL);
+ TEST_ASSERT_NOT_NULL(result);
char data2[13]; memset(data2, 0x01, 13);
TEST_ASSERT_TRUE(CompareKeysAlternative(30, 13, "MD5", data2, *result));
}
-void test_ReadKeyFileWithComments() {
+
+void
+test_ReadKeyFileWithComments(void) {
struct key* keys = NULL;
TEST_ASSERT_EQUAL(2, auth_init(CreatePath("key-test-comments", INPUT_DIR), &keys));
- TEST_ASSERT_TRUE(keys != NULL);
+ TEST_ASSERT_NOT_NULL(keys);
struct key* result = NULL;
get_key(10, &result);
- TEST_ASSERT_TRUE(result != NULL);
+ TEST_ASSERT_NOT_NULL(result);
char data[15]; memset(data, 0x01, 15);
TEST_ASSERT_TRUE(CompareKeysAlternative(10, 15, "MD5", data, *result));
result = NULL;
get_key(34, &result);
- TEST_ASSERT_TRUE(result != NULL);
+ TEST_ASSERT_NOT_NULL(result);
TEST_ASSERT_TRUE(CompareKeysAlternative(34, 3, "MD5", "xyz", *result));
}
-void test_ReadKeyFileWithInvalidHex() {
+
+void
+test_ReadKeyFileWithInvalidHex(void) {
struct key* keys = NULL;
TEST_ASSERT_EQUAL(1, auth_init(CreatePath("key-test-invalid-hex", INPUT_DIR), &keys));
- TEST_ASSERT_TRUE(keys != NULL);
+ TEST_ASSERT_NOT_NULL(keys);
struct key* result = NULL;
get_key(10, &result);
- TEST_ASSERT_TRUE(result != NULL);
+ TEST_ASSERT_NOT_NULL(result);
char data[15]; memset(data, 0x01, 15);
TEST_ASSERT_TRUE(CompareKeysAlternative(10, 15, "MD5", data, *result));
result = NULL;
get_key(30, &result); // Should not exist, and result should remain NULL.
- TEST_ASSERT_TRUE(result == NULL);
+ TEST_ASSERT_NULL(result);
}
diff --git a/contrib/ntp/sntp/tests/kodDatabase.c b/contrib/ntp/sntp/tests/kodDatabase.c
index a6b86d06bf00..0c3615d0eae8 100644
--- a/contrib/ntp/sntp/tests/kodDatabase.c
+++ b/contrib/ntp/sntp/tests/kodDatabase.c
@@ -4,24 +4,29 @@
#include "sntptest.h"
#include "ntp_stdlib.h"
#include "sntp-opts.h"
-
#include "kod_management.h"
+#include "ntp_io.h"
#include "unity.h"
-void setUp(void)
-{
- kod_init_kod_db("/dev/null", TRUE);
-}
+void setUp(void);
+void test_SingleEntryHandling(void);
+void test_MultipleEntryHandling(void);
+void test_NoMatchInSearch(void);
+void test_AddDuplicate(void);
+void test_DeleteEntry(void);
-void tearDown(void)
-{
+
+void
+setUp(void) {
+ kod_init_kod_db("/dev/null", TRUE);
}
-void test_SingleEntryHandling() {
- char HOST[] = "192.0.2.5";
- char REASON[] = "DENY";
+void
+test_SingleEntryHandling(void) {
+ const char HOST[] = "192.0.2.5";
+ const char REASON[] = "DENY";
add_entry(HOST, REASON);
@@ -32,15 +37,17 @@ void test_SingleEntryHandling() {
TEST_ASSERT_EQUAL_STRING(REASON, result->type);
}
-void test_MultipleEntryHandling() {
- char HOST1[] = "192.0.2.3";
- char REASON1[] = "DENY";
- char HOST2[] = "192.0.5.5";
- char REASON2[] = "RATE";
+void
+test_MultipleEntryHandling(void) {
+ const char HOST1[] = "192.0.2.3";
+ const char REASON1[] = "DENY";
- char HOST3[] = "192.0.10.1";
- char REASON3[] = "DENY";
+ const char HOST2[] = "192.0.5.5";
+ const char REASON2[] = "RATE";
+
+ const char HOST3[] = "192.0.10.1";
+ const char REASON3[] = "DENY";
add_entry(HOST1, REASON1);
add_entry(HOST2, REASON2);
@@ -63,10 +70,12 @@ void test_MultipleEntryHandling() {
free(result);
}
-void test_NoMatchInSearch() {
- char HOST_ADD[] = "192.0.2.6";
- char HOST_NOTADD[] = "192.0.6.1";
- char REASON[] = "DENY";
+
+void
+test_NoMatchInSearch(void) {
+ const char HOST_ADD[] = "192.0.2.6";
+ const char HOST_NOTADD[] = "192.0.6.1";
+ const char REASON[] = "DENY";
add_entry(HOST_ADD, REASON);
@@ -76,10 +85,12 @@ void test_NoMatchInSearch() {
TEST_ASSERT_TRUE(result == NULL);
}
-void test_AddDuplicate() {
- char HOST[] = "192.0.2.3";
- char REASON1[] = "RATE";
- char REASON2[] = "DENY";
+
+void
+test_AddDuplicate(void) {
+ const char HOST[] = "192.0.2.3";
+ const char REASON1[] = "RATE";
+ const char REASON2[] = "DENY";
add_entry(HOST, REASON1);
struct kod_entry* result1;
@@ -101,11 +112,13 @@ void test_AddDuplicate() {
free(result2);
}
-void test_DeleteEntry() {
- char HOST1[] = "192.0.2.1";
- char HOST2[] = "192.0.2.2";
- char HOST3[] = "192.0.2.3";
- char REASON[] = "DENY";
+
+void
+test_DeleteEntry(void) {
+ const char HOST1[] = "192.0.2.1";
+ const char HOST2[] = "192.0.2.2";
+ const char HOST3[] = "192.0.2.3";
+ const char REASON[] = "DENY";
add_entry(HOST1, REASON);
add_entry(HOST2, REASON);
diff --git a/contrib/ntp/sntp/tests/kodFile.c b/contrib/ntp/sntp/tests/kodFile.c
index 7daec212692e..6eb0971a996c 100644
--- a/contrib/ntp/sntp/tests/kodFile.c
+++ b/contrib/ntp/sntp/tests/kodFile.c
@@ -1,10 +1,8 @@
#include "config.h"
+
#include "ntp_types.h"
#include "ntp_stdlib.h" // For estrdup()
-
-
#include "fileHandlingTest.h"
-
#include "kod_management.h"
#include "unity.h"
@@ -17,22 +15,32 @@ extern int kod_db_cnt;
extern struct kod_entry** kod_db;
extern char* kod_db_file;
-void setUp() {
- kod_db_cnt = 0;
- kod_db = NULL;
-}
+void setUp(void);
+void test_ReadEmptyFile(void);
+void test_ReadCorrectFile(void);
+void test_ReadFileWithBlankLines(void);
+void test_WriteEmptyFile(void);
+void test_WriteFileWithSingleEntry(void);
+void test_WriteFileWithMultipleEntries(void);
+
-void tearDown() {
+void
+setUp(void) {
+ kod_db_cnt = 0;
+ kod_db = NULL;
}
-void test_ReadEmptyFile() {
+void
+test_ReadEmptyFile(void) {
kod_init_kod_db(CreatePath("kod-test-empty", INPUT_DIR), TRUE);
TEST_ASSERT_EQUAL(0, kod_db_cnt);
}
-void test_ReadCorrectFile() {
+
+void
+test_ReadCorrectFile(void) {
kod_init_kod_db(CreatePath("kod-test-correct", INPUT_DIR), TRUE);
TEST_ASSERT_EQUAL(2, kod_db_cnt);
@@ -50,7 +58,9 @@ void test_ReadCorrectFile() {
TEST_ASSERT_EQUAL(0xfff, res->timestamp);
}
-void test_ReadFileWithBlankLines() {
+
+void
+test_ReadFileWithBlankLines(void) {
kod_init_kod_db(CreatePath("kod-test-blanks", INPUT_DIR), TRUE);
TEST_ASSERT_EQUAL(3, kod_db_cnt);
@@ -73,31 +83,30 @@ void test_ReadFileWithBlankLines() {
TEST_ASSERT_EQUAL(0xabcd, res->timestamp);
}
-void test_WriteEmptyFile() {
- //kod_db_file = estrdup(CreatePath("kod-output-blank", OUTPUT_DIR)); //causing issues on psp-at1, replaced
+
+void
+test_WriteEmptyFile(void) {
kod_db_file = estrdup("kod-output-blank");
- //printf("kod PATH: %s\n",kod_db_file);
write_kod_db();
// Open file and ensure that the filesize is 0 bytes.
- FILE * is;
- is = fopen(kod_db_file, "rb");//std::ios::binary);
- TEST_ASSERT_FALSE(is == NULL );//is.fail());
-
+ FILE * is = fopen(kod_db_file, "rb");
+ TEST_ASSERT_NOT_NULL(is);
+
TEST_ASSERT_EQUAL(0, GetFileSize(is));
fclose(is);
}
-void test_WriteFileWithSingleEntry() {
- //kod_db_file = estrdup(CreatePath("kod-output-single", OUTPUT_DIR)); //causing issues on psp-at1, replaced
+
+void
+test_WriteFileWithSingleEntry(void) {
kod_db_file = estrdup("kod-output-single");
- //printf("kod PATH: %s\n",kod_db_file);
add_entry("host1", "DENY");
// Here we must manipulate the timestamps, so they match the one in
// the expected file.
- //
+
kod_db[0]->timestamp = 1;
write_kod_db();
@@ -105,18 +114,19 @@ void test_WriteFileWithSingleEntry() {
// Open file and compare sizes.
FILE * actual = fopen(kod_db_file, "rb");
FILE * expected = fopen(CreatePath("kod-expected-single", INPUT_DIR),"rb");
- TEST_ASSERT_TRUE(actual !=NULL);//TEST_ASSERT_TRUE(actual.good());
- TEST_ASSERT_TRUE(expected !=NULL);//TEST_ASSERT_TRUE(expected.good());
- TEST_ASSERT_EQUAL(GetFileSize(expected), GetFileSize(actual));
+ TEST_ASSERT_NOT_NULL(actual);
+ TEST_ASSERT_NOT_NULL(expected);
+ TEST_ASSERT_EQUAL(GetFileSize(expected), GetFileSize(actual));
+
TEST_ASSERT_TRUE(CompareFileContent(expected, actual));
}
-void test_WriteFileWithMultipleEntries() {
- //kod_db_file = estrdup(CreatePath("kod-output-multiple", OUTPUT_DIR)); //causing issues on psp-at1, replaced
+
+void
+test_WriteFileWithMultipleEntries(void) {
kod_db_file = estrdup("kod-output-multiple");
- //printf("kod PATH: %s\n",kod_db_file);
add_entry("example.com", "RATE");
add_entry("192.0.2.1", "DENY");
add_entry("192.0.2.5", "RSTR");
@@ -134,12 +144,12 @@ void test_WriteFileWithMultipleEntries() {
// Open file and compare sizes and content.
FILE * actual = fopen(kod_db_file, "rb");
FILE * expected = fopen(CreatePath("kod-expected-multiple", INPUT_DIR),"rb");
- TEST_ASSERT_TRUE(actual !=NULL);//TEST_ASSERT_TRUE(actual.good());
- TEST_ASSERT_TRUE(expected !=NULL);//TEST_ASSERT_TRUE(expected.good());
-
+ TEST_ASSERT_NOT_NULL(actual);
+ TEST_ASSERT_NOT_NULL(expected);
+
+
TEST_ASSERT_EQUAL(GetFileSize(expected), GetFileSize(actual));
TEST_ASSERT_TRUE(CompareFileContent(expected, actual));
}
-
diff --git a/contrib/ntp/sntp/tests/packetHandling.c b/contrib/ntp/sntp/tests/packetHandling.c
index 4cb5a91c9308..1036fc3b8be8 100644
--- a/contrib/ntp/sntp/tests/packetHandling.c
+++ b/contrib/ntp/sntp/tests/packetHandling.c
@@ -12,27 +12,37 @@
#include "unity.h"
-
-int counter = 0;
-
-
-// old code from google test framework, moved to SetUp() for unity
-void setUp(void)
-{
+void setUp(void);
+int LfpEquality(const l_fp expected, const l_fp actual);
+void test_GenerateUnauthenticatedPacket(void);
+void test_GenerateAuthenticatedPacket(void);
+void test_OffsetCalculationPositiveOffset(void);
+void test_OffsetCalculationNegativeOffset(void);
+void test_HandleUnusableServer(void);
+void test_HandleUnusablePacket(void);
+void test_HandleServerAuthenticationFailure(void);
+void test_HandleKodDemobilize(void);
+void test_HandleKodRate(void);
+void test_HandleCorrectPacket(void);
+
+
+void
+setUp(void) {
init_lib();
}
-
-int LfpEquality(const l_fp expected, const l_fp actual) {
- if (L_ISEQU(&expected, &actual)) {
- return TRUE;
- } else {
- return FALSE;
- }
+int
+LfpEquality(const l_fp expected, const l_fp actual) {
+ if (L_ISEQU(&expected, &actual))
+ return TRUE;
+ else
+ return FALSE;
}
-void test_GenerateUnauthenticatedPacket(void) {
+
+void
+test_GenerateUnauthenticatedPacket(void) {
struct pkt testpkt;
struct timeval xmt;
@@ -55,7 +65,9 @@ void test_GenerateUnauthenticatedPacket(void) {
TEST_ASSERT_TRUE(LfpEquality(expected_xmt, actual_xmt));
}
-void test_GenerateAuthenticatedPacket(void) {
+
+void
+test_GenerateAuthenticatedPacket(void) {
struct key testkey;
testkey.next = NULL;
testkey.key_id = 30;
@@ -91,10 +103,12 @@ void test_GenerateAuthenticatedPacket(void) {
char expected_mac[MAX_MD5_LEN];
TEST_ASSERT_EQUAL(MAX_MD5_LEN - 4, // Remove the key_id, only keep the mac.
make_mac((char*)&testpkt, LEN_PKT_NOMAC, MAX_MD5_LEN, &testkey, expected_mac));
- TEST_ASSERT_TRUE(memcmp(expected_mac, (char*)&testpkt.exten[1], MAX_MD5_LEN -4) == 0);
+ TEST_ASSERT_EQUAL_MEMORY(expected_mac, (char*)&testpkt.exten[1], MAX_MD5_LEN -4);
}
-void test_OffsetCalculationPositiveOffset(void) {
+
+void
+test_OffsetCalculationPositiveOffset(void) {
struct pkt rpkt;
rpkt.precision = -16; // 0,000015259
@@ -132,13 +146,15 @@ void test_OffsetCalculationPositiveOffset(void) {
double offset, precision, synch_distance;
offset_calculation(&rpkt, LEN_PKT_NOMAC, &dst, &offset, &precision, &synch_distance);
- TEST_ASSERT_EQUAL_FLOAT(1.25, offset);
- TEST_ASSERT_EQUAL_FLOAT(1. / ULOGTOD(16), precision);
+ TEST_ASSERT_EQUAL_DOUBLE(1.25, offset);
+ TEST_ASSERT_EQUAL_DOUBLE(1. / ULOGTOD(16), precision);
// 1.1250150000000001 ?
- TEST_ASSERT_EQUAL_FLOAT(1.125015, synch_distance);
+ TEST_ASSERT_EQUAL_DOUBLE(1.125015, synch_distance);
}
-void test_OffsetCalculationNegativeOffset(void) {
+
+void
+test_OffsetCalculationNegativeOffset(void) {
struct pkt rpkt;
rpkt.precision = -1;
@@ -176,12 +192,14 @@ void test_OffsetCalculationNegativeOffset(void) {
double offset, precision, synch_distance;
offset_calculation(&rpkt, LEN_PKT_NOMAC, &dst, &offset, &precision, &synch_distance);
- TEST_ASSERT_EQUAL_FLOAT(-1, offset);
- TEST_ASSERT_EQUAL_FLOAT(1. / ULOGTOD(1), precision);
- TEST_ASSERT_EQUAL_FLOAT(1.3333483333333334, synch_distance);
+ TEST_ASSERT_EQUAL_DOUBLE(-1, offset);
+ TEST_ASSERT_EQUAL_DOUBLE(1. / ULOGTOD(1), precision);
+ TEST_ASSERT_EQUAL_DOUBLE(1.3333483333333334, synch_distance);
}
-void test_HandleUnusableServer(void) {
+
+void
+test_HandleUnusableServer(void) {
struct pkt rpkt;
sockaddr_u host;
int rpktl;
@@ -192,7 +210,9 @@ void test_HandleUnusableServer(void) {
TEST_ASSERT_EQUAL(-1, handle_pkt(rpktl, &rpkt, &host, ""));
}
-void test_HandleUnusablePacket(void) {
+
+void
+test_HandleUnusablePacket(void) {
struct pkt rpkt;
sockaddr_u host;
int rpktl;
@@ -203,7 +223,9 @@ void test_HandleUnusablePacket(void) {
TEST_ASSERT_EQUAL(1, handle_pkt(rpktl, &rpkt, &host, ""));
}
-void test_HandleServerAuthenticationFailure(void) {
+
+void
+test_HandleServerAuthenticationFailure(void) {
struct pkt rpkt;
sockaddr_u host;
int rpktl;
@@ -214,7 +236,9 @@ void test_HandleServerAuthenticationFailure(void) {
TEST_ASSERT_EQUAL(1, handle_pkt(rpktl, &rpkt, &host, ""));
}
-void test_HandleKodDemobilize(void) {
+
+void
+test_HandleKodDemobilize(void) {
const char * HOSTNAME = "192.0.2.1";
const char * REASON = "DENY";
struct pkt rpkt;
@@ -235,10 +259,12 @@ void test_HandleKodDemobilize(void) {
TEST_ASSERT_EQUAL(1, handle_pkt(rpktl, &rpkt, &host, HOSTNAME));
TEST_ASSERT_EQUAL(1, search_entry(HOSTNAME, &entry));
- TEST_ASSERT_TRUE(memcmp(REASON, entry->type, 4) == 0);
+ TEST_ASSERT_EQUAL_MEMORY(REASON, entry->type, 4);
}
-void test_HandleKodRate(void) {
+
+void
+test_HandleKodRate(void) {
struct pkt rpkt;
sockaddr_u host;
int rpktl;
@@ -249,7 +275,9 @@ void test_HandleKodRate(void) {
TEST_ASSERT_EQUAL(1, handle_pkt(rpktl, &rpkt, &host, ""));
}
-void test_HandleCorrectPacket(void) {
+
+void
+test_HandleCorrectPacket(void) {
struct pkt rpkt;
sockaddr_u host;
int rpktl;
diff --git a/contrib/ntp/sntp/tests/packetProcessing.c b/contrib/ntp/sntp/tests/packetProcessing.c
index 27ab72e4d433..1fd649ea627c 100644
--- a/contrib/ntp/sntp/tests/packetProcessing.c
+++ b/contrib/ntp/sntp/tests/packetProcessing.c
@@ -4,6 +4,7 @@
#include "ntp_stdlib.h"
#include "unity.h"
+
const char * Version = "stub unit test Version string";
// Hacks into the key database.
@@ -11,21 +12,47 @@ extern struct key* key_ptr;
extern int key_cnt;
+void PrepareAuthenticationTest(int key_id,int key_len,const char* type,const void* key_seq);
+void PrepareAuthenticationTestMD5(int key_id,int key_len,const void* key_seq);
+void setUp(void);
+void tearDown(void);
+void test_TooShortLength(void);
+void test_LengthNotMultipleOfFour(void);
+void test_TooShortExtensionFieldLength(void);
+void test_UnauthenticatedPacketReject(void);
+void test_CryptoNAKPacketReject(void);
+void test_AuthenticatedPacketInvalid(void);
+void test_AuthenticatedPacketUnknownKey(void);
+void test_ServerVersionTooOld(void);
+void test_ServerVersionTooNew(void);
+void test_NonWantedMode(void);
+void test_KoDRate(void);
+void test_KoDDeny(void);
+void test_RejectUnsyncedServer(void);
+void test_RejectWrongResponseServerMode(void);
+void test_AcceptNoSentPacketBroadcastMode(void);
+void test_CorrectUnauthenticatedPacket(void);
+void test_CorrectAuthenticatedPacketMD5(void);
+void test_CorrectAuthenticatedPacketSHA1(void);
+
+
static struct pkt testpkt;
static struct pkt testspkt;
static sockaddr_u testsock;
bool restoreKeyDb;
-void PrepareAuthenticationTest(int key_id,
+
+void
+PrepareAuthenticationTest(int key_id,
int key_len,
const char* type,
const void* key_seq) {
char str[25];
- sprintf(str, "%d", key_id);
+ snprintf(str, 25, "%d", key_id);
ActivateOption("-a", str);
key_cnt = 1;
- key_ptr = malloc(sizeof(struct key));
+ key_ptr = emalloc(sizeof(struct key));
key_ptr->next = NULL;
key_ptr->key_id = key_id;
key_ptr->key_len = key_len;
@@ -37,13 +64,17 @@ void PrepareAuthenticationTest(int key_id,
restoreKeyDb = true;
}
-void PrepareAuthenticationTestMD5(int key_id,
+
+void
+PrepareAuthenticationTestMD5(int key_id,
int key_len,
const void* key_seq) {
PrepareAuthenticationTest(key_id, key_len, "MD5", key_seq);
}
-void setUp() {
+
+void
+setUp(void) {
sntptest();
restoreKeyDb = false;
@@ -63,10 +94,11 @@ void setUp() {
HTONL_FP(&tmp, &testpkt.org);
HTONL_FP(&tmp, &testspkt.xmt);
-
}
-void tearDown() {
+
+void
+tearDown(void) {
if (restoreKeyDb) {
key_cnt = 0;
@@ -75,12 +107,12 @@ void tearDown() {
}
sntptest_destroy(); //only on the final test!! if counter == 0 etc...
-
}
-void test_TooShortLength(void) {
+void
+test_TooShortLength(void) {
TEST_ASSERT_EQUAL(PACKET_UNUSEABLE,
process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC - 1,
MODE_SERVER, &testspkt, "UnitTest"));
@@ -89,7 +121,9 @@ void test_TooShortLength(void) {
MODE_BROADCAST, &testspkt, "UnitTest"));
}
-void test_LengthNotMultipleOfFour(void) {
+
+void
+test_LengthNotMultipleOfFour(void) {
TEST_ASSERT_EQUAL(PACKET_UNUSEABLE,
process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC + 6,
MODE_SERVER, &testspkt, "UnitTest"));
@@ -98,7 +132,9 @@ void test_LengthNotMultipleOfFour(void) {
MODE_BROADCAST, &testspkt, "UnitTest"));
}
-void test_TooShortExtensionFieldLength(void) {
+
+void
+test_TooShortExtensionFieldLength(void) {
/* The lower 16-bits are the length of the extension field.
* This lengths must be multiples of 4 bytes, which gives
* a minimum of 4 byte extension field length. */
@@ -114,7 +150,9 @@ void test_TooShortExtensionFieldLength(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_UnauthenticatedPacketReject(void) {
+
+void
+test_UnauthenticatedPacketReject(void) {
//sntptest();
// Activate authentication option
ActivateOption("-a", "123");
@@ -128,7 +166,9 @@ void test_UnauthenticatedPacketReject(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_CryptoNAKPacketReject(void) {
+
+void
+test_CryptoNAKPacketReject(void) {
// Activate authentication option
ActivateOption("-a", "123");
TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
@@ -140,7 +180,9 @@ void test_CryptoNAKPacketReject(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_AuthenticatedPacketInvalid(void) {
+
+void
+test_AuthenticatedPacketInvalid(void) {
// Activate authentication option
PrepareAuthenticationTestMD5(50, 9, "123456789");
TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
@@ -163,7 +205,9 @@ void test_AuthenticatedPacketInvalid(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_AuthenticatedPacketUnknownKey(void) {
+
+void
+test_AuthenticatedPacketUnknownKey(void) {
// Activate authentication option
PrepareAuthenticationTestMD5(30, 9, "123456789");
TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
@@ -183,7 +227,9 @@ void test_AuthenticatedPacketUnknownKey(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_ServerVersionTooOld(void) {
+
+void
+test_ServerVersionTooOld(void) {
TEST_ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
@@ -198,7 +244,9 @@ void test_ServerVersionTooOld(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_ServerVersionTooNew(void) {
+
+void
+test_ServerVersionTooNew(void) {
TEST_ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
@@ -213,7 +261,9 @@ void test_ServerVersionTooNew(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_NonWantedMode(void) {
+
+void
+test_NonWantedMode(void) {
TEST_ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
@@ -227,8 +277,10 @@ void test_NonWantedMode(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
+
/* Tests bug 1597 */
-void test_KoDRate(void) {
+void
+test_KoDRate(void) {
TEST_ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
testpkt.stratum = STRATUM_PKT_UNSPEC;
@@ -239,7 +291,9 @@ void test_KoDRate(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_KoDDeny(void) {
+
+void
+test_KoDDeny(void) {
TEST_ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
testpkt.stratum = STRATUM_PKT_UNSPEC;
@@ -250,7 +304,9 @@ void test_KoDDeny(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_RejectUnsyncedServer(void) {
+
+void
+test_RejectUnsyncedServer(void) {
TEST_ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
@@ -262,7 +318,9 @@ void test_RejectUnsyncedServer(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_RejectWrongResponseServerMode(void) {
+
+void
+test_RejectWrongResponseServerMode(void) {
TEST_ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
l_fp tmp;
@@ -279,7 +337,9 @@ void test_RejectWrongResponseServerMode(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_AcceptNoSentPacketBroadcastMode(void) {
+
+void
+test_AcceptNoSentPacketBroadcastMode(void) {
TEST_ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
@@ -291,7 +351,9 @@ void test_AcceptNoSentPacketBroadcastMode(void) {
MODE_BROADCAST, NULL, "UnitTest"));
}
-void test_CorrectUnauthenticatedPacket(void) {
+
+void
+test_CorrectUnauthenticatedPacket(void) {
TEST_ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
TEST_ASSERT_EQUAL(LEN_PKT_NOMAC,
@@ -299,7 +361,9 @@ void test_CorrectUnauthenticatedPacket(void) {
MODE_SERVER, &testspkt, "UnitTest"));
}
-void test_CorrectAuthenticatedPacketMD5(void) {
+
+void
+test_CorrectAuthenticatedPacketMD5(void) {
PrepareAuthenticationTestMD5(10, 15, "123456789abcdef");
TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
@@ -319,7 +383,9 @@ void test_CorrectAuthenticatedPacketMD5(void) {
}
-void test_CorrectAuthenticatedPacketSHA1(void) {
+
+void
+test_CorrectAuthenticatedPacketSHA1(void) {
PrepareAuthenticationTest(20, 15, "SHA1", "abcdefghijklmno");
TEST_ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
diff --git a/contrib/ntp/sntp/tests/run-crypto.c b/contrib/ntp/sntp/tests/run-crypto.c
index c5dbaf64dfb5..8b2a73528f4a 100644
--- a/contrib/ntp/sntp/tests/run-crypto.c
+++ b/contrib/ntp/sntp/tests/run-crypto.c
@@ -22,11 +22,14 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_types.h"
+#include "sntptest.h"
+#include "crypto.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_MakeMd5Mac(void);
extern void test_MakeSHA1Mac(void);
extern void test_VerifyCorrectMD5(void);
@@ -36,27 +39,27 @@ extern void test_PacketSizeNotMultipleOfFourBytes(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "crypto.c";
UnityBegin("crypto.c");
- RUN_TEST(test_MakeMd5Mac, 11);
- RUN_TEST(test_MakeSHA1Mac, 33);
- RUN_TEST(test_VerifyCorrectMD5, 59);
- RUN_TEST(test_VerifySHA1, 78);
- RUN_TEST(test_VerifyFailure, 100);
- RUN_TEST(test_PacketSizeNotMultipleOfFourBytes, 120);
+ RUN_TEST(test_MakeMd5Mac, 12);
+ RUN_TEST(test_MakeSHA1Mac, 13);
+ RUN_TEST(test_VerifyCorrectMD5, 14);
+ RUN_TEST(test_VerifySHA1, 15);
+ RUN_TEST(test_VerifyFailure, 16);
+ RUN_TEST(test_PacketSizeNotMultipleOfFourBytes, 17);
return (UnityEnd());
}
diff --git a/contrib/ntp/sntp/tests/run-keyFile.c b/contrib/ntp/sntp/tests/run-keyFile.c
index 0a6380d33b35..862910903f9c 100644
--- a/contrib/ntp/sntp/tests/run-keyFile.c
+++ b/contrib/ntp/sntp/tests/run-keyFile.c
@@ -22,38 +22,43 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "fileHandlingTest.h"
+#include "ntp_stdlib.h"
+#include "ntp_types.h"
+#include "crypto.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_ReadEmptyKeyFile();
-extern void test_ReadASCIIKeys();
-extern void test_ReadHexKeys();
-extern void test_ReadKeyFileWithComments();
-extern void test_ReadKeyFileWithInvalidHex();
+extern void test_ReadEmptyKeyFile(void);
+extern void test_ReadASCIIKeys(void);
+extern void test_ReadHexKeys(void);
+extern void test_ReadKeyFileWithComments(void);
+extern void test_ReadKeyFileWithInvalidHex(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "keyFile.c";
UnityBegin("keyFile.c");
- RUN_TEST(test_ReadEmptyKeyFile, 53);
- RUN_TEST(test_ReadASCIIKeys, 61);
- RUN_TEST(test_ReadHexKeys, 79);
- RUN_TEST(test_ReadKeyFileWithComments, 105);
- RUN_TEST(test_ReadKeyFileWithInvalidHex, 124);
+ RUN_TEST(test_ReadEmptyKeyFile, 12);
+ RUN_TEST(test_ReadASCIIKeys, 13);
+ RUN_TEST(test_ReadHexKeys, 14);
+ RUN_TEST(test_ReadKeyFileWithComments, 15);
+ RUN_TEST(test_ReadKeyFileWithInvalidHex, 16);
return (UnityEnd());
}
diff --git a/contrib/ntp/sntp/tests/run-kodDatabase.c b/contrib/ntp/sntp/tests/run-kodDatabase.c
index 7fc96783e43b..e5bf3d728e12 100644
--- a/contrib/ntp/sntp/tests/run-kodDatabase.c
+++ b/contrib/ntp/sntp/tests/run-kodDatabase.c
@@ -22,38 +22,45 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_types.h"
+#include "sntptest.h"
+#include "ntp_stdlib.h"
+#include "sntp-opts.h"
+#include "kod_management.h"
+#include "ntp_io.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_SingleEntryHandling();
-extern void test_MultipleEntryHandling();
-extern void test_NoMatchInSearch();
-extern void test_AddDuplicate();
-extern void test_DeleteEntry();
+extern void test_SingleEntryHandling(void);
+extern void test_MultipleEntryHandling(void);
+extern void test_NoMatchInSearch(void);
+extern void test_AddDuplicate(void);
+extern void test_DeleteEntry(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "kodDatabase.c";
UnityBegin("kodDatabase.c");
- RUN_TEST(test_SingleEntryHandling, 22);
- RUN_TEST(test_MultipleEntryHandling, 35);
- RUN_TEST(test_NoMatchInSearch, 66);
- RUN_TEST(test_AddDuplicate, 79);
- RUN_TEST(test_DeleteEntry, 104);
+ RUN_TEST(test_SingleEntryHandling, 13);
+ RUN_TEST(test_MultipleEntryHandling, 14);
+ RUN_TEST(test_NoMatchInSearch, 15);
+ RUN_TEST(test_AddDuplicate, 16);
+ RUN_TEST(test_DeleteEntry, 17);
return (UnityEnd());
}
diff --git a/contrib/ntp/sntp/tests/run-kodFile.c b/contrib/ntp/sntp/tests/run-kodFile.c
index 9c5896263ee0..3943550391e9 100644
--- a/contrib/ntp/sntp/tests/run-kodFile.c
+++ b/contrib/ntp/sntp/tests/run-kodFile.c
@@ -22,40 +22,45 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_types.h"
+#include "ntp_stdlib.h"
+#include "fileHandlingTest.h"
+#include "kod_management.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_ReadEmptyFile();
-extern void test_ReadCorrectFile();
-extern void test_ReadFileWithBlankLines();
-extern void test_WriteEmptyFile();
-extern void test_WriteFileWithSingleEntry();
-extern void test_WriteFileWithMultipleEntries();
+extern void test_ReadEmptyFile(void);
+extern void test_ReadCorrectFile(void);
+extern void test_ReadFileWithBlankLines(void);
+extern void test_WriteEmptyFile(void);
+extern void test_WriteFileWithSingleEntry(void);
+extern void test_WriteFileWithMultipleEntries(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "kodFile.c";
UnityBegin("kodFile.c");
- RUN_TEST(test_ReadEmptyFile, 29);
- RUN_TEST(test_ReadCorrectFile, 35);
- RUN_TEST(test_ReadFileWithBlankLines, 53);
- RUN_TEST(test_WriteEmptyFile, 76);
- RUN_TEST(test_WriteFileWithSingleEntry, 92);
- RUN_TEST(test_WriteFileWithMultipleEntries, 116);
+ RUN_TEST(test_ReadEmptyFile, 19);
+ RUN_TEST(test_ReadCorrectFile, 20);
+ RUN_TEST(test_ReadFileWithBlankLines, 21);
+ RUN_TEST(test_WriteEmptyFile, 22);
+ RUN_TEST(test_WriteFileWithSingleEntry, 23);
+ RUN_TEST(test_WriteFileWithMultipleEntries, 24);
return (UnityEnd());
}
diff --git a/contrib/ntp/sntp/tests/run-networking.c b/contrib/ntp/sntp/tests/run-networking.c
index d5e822c719eb..70caaa034fea 100644
--- a/contrib/ntp/sntp/tests/run-networking.c
+++ b/contrib/ntp/sntp/tests/run-networking.c
@@ -22,6 +22,9 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "sntptest.h"
+#include "networking.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -29,20 +32,20 @@ extern void tearDown(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "networking.c";
UnityBegin("networking.c");
return (UnityEnd());
diff --git a/contrib/ntp/sntp/tests/run-packetHandling.c b/contrib/ntp/sntp/tests/run-packetHandling.c
index 69e958e4c15c..bc20d7f48ba4 100644
--- a/contrib/ntp/sntp/tests/run-packetHandling.c
+++ b/contrib/ntp/sntp/tests/run-packetHandling.c
@@ -22,11 +22,19 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_debug.h"
+#include "ntp_stdlib.h"
+#include "ntp_types.h"
+#include "sntptest.h"
+#include "kod_management.h"
+#include "main.h"
+#include "networking.h"
+#include "ntp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_GenerateUnauthenticatedPacket(void);
extern void test_GenerateAuthenticatedPacket(void);
extern void test_OffsetCalculationPositiveOffset(void);
@@ -40,31 +48,31 @@ extern void test_HandleCorrectPacket(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "packetHandling.c";
UnityBegin("packetHandling.c");
- RUN_TEST(test_GenerateUnauthenticatedPacket, 35);
- RUN_TEST(test_GenerateAuthenticatedPacket, 58);
- RUN_TEST(test_OffsetCalculationPositiveOffset, 97);
- RUN_TEST(test_OffsetCalculationNegativeOffset, 141);
- RUN_TEST(test_HandleUnusableServer, 184);
- RUN_TEST(test_HandleUnusablePacket, 195);
- RUN_TEST(test_HandleServerAuthenticationFailure, 206);
- RUN_TEST(test_HandleKodDemobilize, 217);
- RUN_TEST(test_HandleKodRate, 241);
- RUN_TEST(test_HandleCorrectPacket, 252);
+ RUN_TEST(test_GenerateUnauthenticatedPacket, 17);
+ RUN_TEST(test_GenerateAuthenticatedPacket, 18);
+ RUN_TEST(test_OffsetCalculationPositiveOffset, 19);
+ RUN_TEST(test_OffsetCalculationNegativeOffset, 20);
+ RUN_TEST(test_HandleUnusableServer, 21);
+ RUN_TEST(test_HandleUnusablePacket, 22);
+ RUN_TEST(test_HandleServerAuthenticationFailure, 23);
+ RUN_TEST(test_HandleKodDemobilize, 24);
+ RUN_TEST(test_HandleKodRate, 25);
+ RUN_TEST(test_HandleCorrectPacket, 26);
return (UnityEnd());
}
diff --git a/contrib/ntp/sntp/tests/run-packetProcessing.c b/contrib/ntp/sntp/tests/run-packetProcessing.c
index f41d5c7eb2f0..bf3a63eb1cf5 100644
--- a/contrib/ntp/sntp/tests/run-packetProcessing.c
+++ b/contrib/ntp/sntp/tests/run-packetProcessing.c
@@ -22,11 +22,14 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "sntptest.h"
+#include "networking.h"
+#include "ntp_stdlib.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_TooShortLength(void);
extern void test_LengthNotMultipleOfFour(void);
extern void test_TooShortExtensionFieldLength(void);
@@ -48,39 +51,39 @@ extern void test_CorrectAuthenticatedPacketSHA1(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "packetProcessing.c";
UnityBegin("packetProcessing.c");
- RUN_TEST(test_TooShortLength, 83);
- RUN_TEST(test_LengthNotMultipleOfFour, 92);
- RUN_TEST(test_TooShortExtensionFieldLength, 101);
- RUN_TEST(test_UnauthenticatedPacketReject, 117);
- RUN_TEST(test_CryptoNAKPacketReject, 131);
- RUN_TEST(test_AuthenticatedPacketInvalid, 143);
- RUN_TEST(test_AuthenticatedPacketUnknownKey, 166);
- RUN_TEST(test_ServerVersionTooOld, 186);
- RUN_TEST(test_ServerVersionTooNew, 201);
- RUN_TEST(test_NonWantedMode, 216);
- RUN_TEST(test_KoDRate, 231);
- RUN_TEST(test_KoDDeny, 242);
- RUN_TEST(test_RejectUnsyncedServer, 253);
- RUN_TEST(test_RejectWrongResponseServerMode, 265);
- RUN_TEST(test_AcceptNoSentPacketBroadcastMode, 282);
- RUN_TEST(test_CorrectUnauthenticatedPacket, 294);
- RUN_TEST(test_CorrectAuthenticatedPacketMD5, 302);
- RUN_TEST(test_CorrectAuthenticatedPacketSHA1, 322);
+ RUN_TEST(test_TooShortLength, 19);
+ RUN_TEST(test_LengthNotMultipleOfFour, 20);
+ RUN_TEST(test_TooShortExtensionFieldLength, 21);
+ RUN_TEST(test_UnauthenticatedPacketReject, 22);
+ RUN_TEST(test_CryptoNAKPacketReject, 23);
+ RUN_TEST(test_AuthenticatedPacketInvalid, 24);
+ RUN_TEST(test_AuthenticatedPacketUnknownKey, 25);
+ RUN_TEST(test_ServerVersionTooOld, 26);
+ RUN_TEST(test_ServerVersionTooNew, 27);
+ RUN_TEST(test_NonWantedMode, 28);
+ RUN_TEST(test_KoDRate, 29);
+ RUN_TEST(test_KoDDeny, 30);
+ RUN_TEST(test_RejectUnsyncedServer, 31);
+ RUN_TEST(test_RejectWrongResponseServerMode, 32);
+ RUN_TEST(test_AcceptNoSentPacketBroadcastMode, 33);
+ RUN_TEST(test_CorrectUnauthenticatedPacket, 34);
+ RUN_TEST(test_CorrectAuthenticatedPacketMD5, 35);
+ RUN_TEST(test_CorrectAuthenticatedPacketSHA1, 36);
return (UnityEnd());
}
diff --git a/contrib/ntp/sntp/tests/run-t-log.c b/contrib/ntp/sntp/tests/run-t-log.c
new file mode 100644
index 000000000000..dc9fa043bda7
--- /dev/null
+++ b/contrib/ntp/sntp/tests/run-t-log.c
@@ -0,0 +1,57 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+ Unity.CurrentTestName = #TestFunc; \
+ Unity.CurrentTestLineNumber = TestLineNum; \
+ Unity.NumberOfTests++; \
+ if (TEST_PROTECT()) \
+ { \
+ setUp(); \
+ TestFunc(); \
+ } \
+ if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+ { \
+ tearDown(); \
+ } \
+ UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "config.h"
+#include "ntp_types.h"
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void testChangePrognameInMysyslog(void);
+extern void testOpenLogfileTest(void);
+extern void testWriteInCustomLogfile(void);
+
+
+//=======Test Reset Option=====
+void resetTest(void);
+void resetTest(void)
+{
+ tearDown();
+ setUp();
+}
+
+char const *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ UnityBegin("t-log.c");
+ RUN_TEST(testChangePrognameInMysyslog, 9);
+ RUN_TEST(testOpenLogfileTest, 10);
+ RUN_TEST(testWriteInCustomLogfile, 35);
+
+ return (UnityEnd());
+}
diff --git a/contrib/ntp/sntp/tests/run-utilities.c b/contrib/ntp/sntp/tests/run-utilities.c
index 715bd110c2d4..7c2237bbe159 100644
--- a/contrib/ntp/sntp/tests/run-utilities.c
+++ b/contrib/ntp/sntp/tests/run-utilities.c
@@ -22,43 +22,48 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "sntptest.h"
+#include "fileHandlingTest.h"
+#include "main.h"
+#include "utilities.h"
+#include <math.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
-extern void test_IPv4Address();
-extern void test_IPv6Address();
-extern void test_SetLiVnMode1();
-extern void test_SetLiVnMode2();
-extern void test_PktOutput();
-extern void test_LfpOutputBinaryFormat();
-extern void test_LfpOutputDecimalFormat();
+extern void test_IPv4Address(void);
+extern void test_IPv6Address(void);
+extern void test_SetLiVnMode1(void);
+extern void test_SetLiVnMode2(void);
+extern void test_PktOutput(void);
+extern void test_LfpOutputBinaryFormat(void);
+extern void test_LfpOutputDecimalFormat(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "utilities.c";
UnityBegin("utilities.c");
- RUN_TEST(test_IPv4Address, 68);
- RUN_TEST(test_IPv6Address, 78);
- RUN_TEST(test_SetLiVnMode1, 98);
- RUN_TEST(test_SetLiVnMode2, 111);
- RUN_TEST(test_PktOutput, 126);
- RUN_TEST(test_LfpOutputBinaryFormat, 146);
- RUN_TEST(test_LfpOutputDecimalFormat, 162);
+ RUN_TEST(test_IPv4Address, 16);
+ RUN_TEST(test_IPv6Address, 17);
+ RUN_TEST(test_SetLiVnMode1, 18);
+ RUN_TEST(test_SetLiVnMode2, 19);
+ RUN_TEST(test_PktOutput, 20);
+ RUN_TEST(test_LfpOutputBinaryFormat, 21);
+ RUN_TEST(test_LfpOutputDecimalFormat, 22);
return (UnityEnd());
}
diff --git a/contrib/ntp/sntp/tests/sntptest.c b/contrib/ntp/sntp/tests/sntptest.c
new file mode 100644
index 000000000000..73c1ad26f396
--- /dev/null
+++ b/contrib/ntp/sntp/tests/sntptest.c
@@ -0,0 +1,33 @@
+
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "sntp-opts.h"
+#include "sntptest.h"
+
+void
+sntptest(void) {
+ optionSaveState(&sntpOptions);
+}
+
+
+void
+sntptest_destroy(void) {
+ optionRestore(&sntpOptions);
+}
+
+
+void
+ActivateOption(const char* option, const char* argument) {
+
+ const int ARGV_SIZE = 4;
+
+ char* opts[ARGV_SIZE];
+
+ opts[0] = estrdup("sntpopts");
+ opts[1] = estrdup(option);
+ opts[2] = estrdup(argument);
+ opts[3] = estrdup("127.0.0.1");
+
+ optionProcess(&sntpOptions, ARGV_SIZE, opts);
+}
+
diff --git a/contrib/ntp/sntp/tests/sntptest.h b/contrib/ntp/sntp/tests/sntptest.h
index eff6f6e99dcb..82e2562dd290 100644
--- a/contrib/ntp/sntp/tests/sntptest.h
+++ b/contrib/ntp/sntp/tests/sntptest.h
@@ -4,28 +4,8 @@
#include "ntp_stdlib.h"
#include "sntp-opts.h"
-
-sntptest() {
- optionSaveState(&sntpOptions);
-}
-
-sntptest_destroy() {
- optionRestore(&sntpOptions);
-}
-
-void ActivateOption(const char* option, const char* argument) {
-
- const int ARGV_SIZE = 4;
-
- char* opts[ARGV_SIZE];
-
- opts[0] = estrdup("sntpopts");
- opts[1] = estrdup(option);
- opts[2] = estrdup(argument);
- opts[3] = estrdup("127.0.0.1");
-
- optionProcess(&sntpOptions, ARGV_SIZE, opts);
-}
-
+void sntptest(void);
+void sntptest_destroy(void);
+void ActivateOption(const char* option, const char* argument);
#endif // SNTPTEST_H
diff --git a/contrib/ntp/sntp/tests/t-log.c b/contrib/ntp/sntp/tests/t-log.c
new file mode 100644
index 000000000000..154658474e56
--- /dev/null
+++ b/contrib/ntp/sntp/tests/t-log.c
@@ -0,0 +1,68 @@
+#include "config.h"
+#include "unity.h"
+#include "ntp_types.h"
+
+
+//#include "log.h"
+#include "log.c"
+
+void testChangePrognameInMysyslog(void);
+void testOpenLogfileTest(void);
+
+
+//in var/log/syslog (may differ depending on your OS), logged name of the program will be "TEST_PROGNAME".
+
+void testChangePrognameInMysyslog(void){
+ sntp_init_logging("TEST_PROGNAME");
+ msyslog(LOG_ERR, "TESTING sntp_init_logging()"); //%m will print the last errno?
+}
+
+//writes log files in your own file instead of syslog! (MAY BE USEFUL TO SUPPRESS ERROR MESSAGES!)
+
+void testOpenLogfileTest(void){
+ sntp_init_logging("TEST_PROGNAME2"); //this name is consistent through the entire program unless changed
+ open_logfile("testLogfile.log");
+ //open_logfile("/var/log/syslog"); //this gives me "Permission Denied" when i do %m
+
+ msyslog(LOG_ERR, "Cannot open log file %s","abcXX");
+ //cleanup_log(); //unnecessary after log.c fix!
+
+}
+
+
+//multiple cleanup_log() causes segfault. Probably the reason it's static. Opening multiple open_logfile(name) will cause segfault x.x I'm guessing it's not intended to be changed. Cleanup after unity test doesn't fix it, looks like. Calling in tearDown() also causes issues.
+
+void testWriteInCustomLogfile(void){
+ char testString[256] = "12345 ABC";
+ char testName[256] = "TEST_PROGNAME3";
+
+ remove("testLogfile2.log");
+
+ sntp_init_logging(testName);
+ open_logfile("testLogfile2.log"); // ./ causing issues
+ //sntp_init_logging(testName);
+
+
+ msyslog(LOG_ERR, testString);
+ FILE * f = fopen("testLogfile2.log","r");
+ char line[256];
+
+ //should be only 1 line
+ while (fgets(line, sizeof(line), f)) {
+ printf("%s", line);
+ }
+
+
+ char* x = strstr(line,testName);
+
+ TEST_ASSERT_TRUE( x != NULL);
+
+ x = strstr(line,testString);
+ TEST_ASSERT_TRUE( x != NULL);
+ //cleanup_log();
+ fclose(f); //using this will also cause segfault, because at the end, log.c will call (using atexit(func) function) cleanup_log(void)-> fclose(syslog_file);
+ //After the 1st fclose, syslog_file = NULL, and is never reset -> hopefully fixed by editing log.c
+ //TEST_ASSERT_EQUAL_STRING(testString,line); //doesn't work, line is dynamic because the process name is random.
+}
+
+
diff --git a/contrib/ntp/sntp/tests/utilities.c b/contrib/ntp/sntp/tests/utilities.c
index 65be8df9d8e9..39d22d61bdca 100644
--- a/contrib/ntp/sntp/tests/utilities.c
+++ b/contrib/ntp/sntp/tests/utilities.c
@@ -2,18 +2,31 @@
#include "sntptest.h"
#include "fileHandlingTest.h"
-
#include "main.h"
#include "utilities.h"
-#include "math.h"
#include "unity.h"
-const char * Version = "stub unit test Version string";
+#include <math.h>
+sockaddr_u CreateSockaddr4(const char* address);
+struct addrinfo CreateAddrinfo(sockaddr_u* sock);
+void InitDebugTest(const char * filename);
+void FinishDebugTest(const char * expected,const char * actual);
+void test_IPv4Address(void);
+void test_IPv6Address(void);
+void test_SetLiVnMode1(void);
+void test_SetLiVnMode2(void);
+void test_PktOutput(void);
+void test_LfpOutputBinaryFormat(void);
+void test_LfpOutputDecimalFormat(void);
-sockaddr_u CreateSockaddr4(const char* address) {
+const char * Version = "stub unit test Version string";
+
+
+sockaddr_u
+CreateSockaddr4(const char* address) {
sockaddr_u s;
s.sa4.sin_family = AF_INET;
s.sa4.sin_addr.s_addr = inet_addr(address);
@@ -22,7 +35,9 @@ sockaddr_u CreateSockaddr4(const char* address) {
return s;
}
-struct addrinfo CreateAddrinfo( sockaddr_u* sock) {
+
+struct addrinfo
+CreateAddrinfo(sockaddr_u* sock) {
struct addrinfo a;
a.ai_family = sock->sa.sa_family;
a.ai_addrlen = SIZEOF_SOCKADDR(a.ai_family);
@@ -34,26 +49,28 @@ struct addrinfo CreateAddrinfo( sockaddr_u* sock) {
bool outputFileOpened;
FILE* outputFile;
-//debugUtilitiesTest() : outputFileOpened(false) {}
-void InitDebugTest(const char * filename) {
+void
+InitDebugTest(const char * filename) {
// Clear the contents of the current file.
// Open the output file
outputFile = fopen(filename, "w+");
- TEST_ASSERT_TRUE(outputFile != NULL);
+ TEST_ASSERT_NOT_NULL(outputFile);
outputFileOpened = true;
}
+
// Closes outputFile, and compare contents.
-void FinishDebugTest(const char * expected,
+void
+FinishDebugTest(const char * expected,
const char * actual) {
if (outputFileOpened)
fclose(outputFile);
FILE * e = fopen(expected,"rb");
FILE * a = fopen(actual,"rb");
- TEST_ASSERT_TRUE(e != NULL);
- TEST_ASSERT_TRUE(a != NULL);
+ TEST_ASSERT_NOT_NULL(e);
+ TEST_ASSERT_NOT_NULL(a);
CompareFileContent(e, a);
}
@@ -65,7 +82,8 @@ void FinishDebugTest(const char * expected,
* tests can be removed.
*/
-void test_IPv4Address() {
+void
+test_IPv4Address(void) {
const char* ADDR = "192.0.2.10";
sockaddr_u input = CreateSockaddr4(ADDR);
@@ -75,7 +93,9 @@ void test_IPv4Address() {
TEST_ASSERT_EQUAL_STRING(ADDR, addrinfo_to_str(&inputA));
}
-void test_IPv6Address() {
+
+void
+test_IPv6Address(void) {
const struct in6_addr address = {
0x20, 0x01, 0x0d, 0xb8,
0x85, 0xa3, 0x08, 0xd3,
@@ -95,7 +115,9 @@ void test_IPv6Address() {
TEST_ASSERT_EQUAL_STRING(expected, addrinfo_to_str(&inputA));
}
-void test_SetLiVnMode1() {
+
+void
+test_SetLiVnMode1(void) {
struct pkt expected;
expected.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
NTP_VERSION,
@@ -108,7 +130,9 @@ void test_SetLiVnMode1() {
TEST_ASSERT_EQUAL(expected.li_vn_mode, actual.li_vn_mode);
}
-void test_SetLiVnMode2() {
+
+void
+test_SetLiVnMode2(void) {
struct pkt expected;
expected.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
NTP_OLDVERSION,
@@ -123,8 +147,9 @@ void test_SetLiVnMode2() {
/* Debug utilities tests */
-void test_PktOutput() {
- char * filename = "debug-output-pkt";//CreatePath("debug-output-pkt", OUTPUT_DIR);
+void
+test_PktOutput(void) {
+ char * filename = "debug-output-pkt";
InitDebugTest(filename);
struct pkt testpkt;
@@ -143,7 +168,9 @@ void test_PktOutput() {
FinishDebugTest(CreatePath("debug-input-pkt", INPUT_DIR), filename);
}
-void test_LfpOutputBinaryFormat() {
+
+void
+test_LfpOutputBinaryFormat(void) {
char * filename = "debug-output-lfp-bin";//CreatePath("debug-output-lfp-bin", OUTPUT_DIR);
InitDebugTest(filename);
@@ -159,8 +186,10 @@ void test_LfpOutputBinaryFormat() {
FinishDebugTest(CreatePath("debug-input-lfp-bin", INPUT_DIR), filename);
}
-void test_LfpOutputDecimalFormat() {
- char * filename = "debug-output-lfp-dec"; //CreatePath("debug-output-lfp-dec", OUTPUT_DIR);
+
+void
+test_LfpOutputDecimalFormat(void) {
+ char * filename = "debug-output-lfp-dec";
InitDebugTest(filename);
l_fp test;
@@ -174,4 +203,3 @@ void test_LfpOutputDecimalFormat() {
FinishDebugTest(CreatePath("debug-input-lfp-dec", INPUT_DIR), filename);
}
-
diff --git a/contrib/ntp/sntp/tests_main.cpp b/contrib/ntp/sntp/tests_main.cpp
deleted file mode 100644
index 584165d66d87..000000000000
--- a/contrib/ntp/sntp/tests_main.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "tests_main.h"
-
-extern "C" {
-const char * Version = "stub unit test Version string";
-};
-
-int main(int argc, char **argv) {
- ::testing::InitGoogleTest(&argc, argv);
-
- init_lib();
- init_auth();
-
- // Some tests makes use of extra parameters passed to the tests
- // executable. Save these params as static members of the base class.
- if (argc > 1) {
- ntptest::SetExtraParams(1, argc-1, argv);
- }
-
- return RUN_ALL_TESTS();
-}
-
-std::vector<std::string> ntptest::m_params;
-
-void ntptest::SetExtraParams(int start, int count, char** argv)
-{
- for (int i=0; i<count; i++) {
- m_params.push_back(argv[i+start]);
- }
-}
diff --git a/contrib/ntp/sntp/tests_main.h b/contrib/ntp/sntp/tests_main.h
deleted file mode 100644
index 991f4b6d0da3..000000000000
--- a/contrib/ntp/sntp/tests_main.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef TESTS_MAIN_H
-#define TESTS_MAIN_H
-
-#include "config.h"
-
-#include <string>
-#include <vector>
-
-#include <gtest/gtest.h>
-
-extern "C" {
-#include "ntp_stdlib.h"
-}
-
-class ntptest : public ::testing::Test {
-public:
- static void SetExtraParams(int start, int count, char** argv);
-protected:
- static std::vector<std::string> m_params;
-};
-
-#endif // TESTS_MAIN_H
diff --git a/contrib/ntp/sntp/unity/Makefile.am b/contrib/ntp/sntp/unity/Makefile.am
index a09e36eb8795..31029ffcb5a6 100644
--- a/contrib/ntp/sntp/unity/Makefile.am
+++ b/contrib/ntp/sntp/unity/Makefile.am
@@ -6,18 +6,20 @@ CLEANFILES =
noinst_LIBRARIES = libunity.a
libunity_a_CFLAGS = \
- -DUNITY_INCLUDE_DOUBLE \
+ -DUNITY_INCLUDE_CONFIG_H \
$(NULL)
libunity_a_SOURCES = \
../libpkgver/colcomp.c \
unity.c \
unity.h \
+ unity_config.h \
unity_internals.h \
unity_fixture.c \
unity_fixture.h \
unity_fixture_internals.h \
unity_fixture_malloc_overrides.h \
+ unity_config.h \
$(NULL)
include $(top_srcdir)/depsver.mf
diff --git a/contrib/ntp/sntp/unity/Makefile.in b/contrib/ntp/sntp/unity/Makefile.in
index 956ff1e20e35..a5758b489025 100644
--- a/contrib/ntp/sntp/unity/Makefile.in
+++ b/contrib/ntp/sntp/unity/Makefile.in
@@ -213,6 +213,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -221,6 +222,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -274,6 +276,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_SYSLOG = @LIB_SYSLOG@
LIPO = @LIPO@
LN_S = @LN_S@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -443,18 +446,20 @@ BUILT_SOURCES = .deps-ver
CLEANFILES = .deps-ver
noinst_LIBRARIES = libunity.a
libunity_a_CFLAGS = \
- -DUNITY_INCLUDE_DOUBLE \
+ -DUNITY_INCLUDE_CONFIG_H \
$(NULL)
libunity_a_SOURCES = \
../libpkgver/colcomp.c \
unity.c \
unity.h \
+ unity_config.h \
unity_internals.h \
unity_fixture.c \
unity_fixture.h \
unity_fixture_internals.h \
unity_fixture_malloc_overrides.h \
+ unity_config.h \
$(NULL)
SNTP_INCS = -I$(top_srcdir)/../include \
diff --git a/contrib/ntp/sntp/unity/auto/generate_test_runner.rb b/contrib/ntp/sntp/unity/auto/generate_test_runner.rb
index c115fadccfee..5b1d45190a56 100644
--- a/contrib/ntp/sntp/unity/auto/generate_test_runner.rb
+++ b/contrib/ntp/sntp/unity/auto/generate_test_runner.rb
@@ -2,28 +2,44 @@
# Unity Project - A Test Framework for C
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
# [Released under MIT License. Please refer to license.txt for details]
-# ==========================================
+# ==========================================
+$QUICK_RUBY_VERSION = RUBY_VERSION.split('.').inject(0){|vv,v| vv * 100 + v.to_i }
File.expand_path(File.join(File.dirname(__FILE__),'colour_prompt'))
class UnityTestRunnerGenerator
def initialize(options = nil)
- @options = { :includes => [], :plugins => [], :framework => :unity }
+ @options = UnityTestRunnerGenerator.default_options
+
case(options)
when NilClass then @options
when String then @options.merge!(UnityTestRunnerGenerator.grab_config(options))
when Hash then @options.merge!(options)
else raise "If you specify arguments, it should be a filename or a hash of options"
end
+ require "#{File.expand_path(File.dirname(__FILE__))}/type_sanitizer"
+ end
+
+ def self.default_options
+ {
+ :includes => [],
+ :plugins => [],
+ :framework => :unity,
+ :test_prefix => "test|spec|should",
+ :setup_name => "setUp",
+ :teardown_name => "tearDown",
+ }
end
-
+
+
def self.grab_config(config_file)
- options = { :includes => [], :plugins => [], :framework => :unity }
+ options = self.default_options
+
unless (config_file.nil? or config_file.empty?)
require 'yaml'
yaml_guts = YAML.load_file(config_file)
- options.merge!(yaml_guts[:unity] ? yaml_guts[:unity] : yaml_guts[:cmock])
+ options.merge!(yaml_guts[:unity] || yaml_guts[:cmock])
raise "No :unity or :cmock section found in #{config_file}" unless options
end
return(options)
@@ -31,126 +47,167 @@ class UnityTestRunnerGenerator
def run(input_file, output_file, options=nil)
tests = []
- includes = []
+ testfile_includes = []
used_mocks = []
-
+
+
@options.merge!(options) unless options.nil?
module_name = File.basename(input_file)
-
+
+
#pull required data from source file
- File.open(input_file, 'r') do |input|
- tests = find_tests(input)
- includes = find_includes(input)
- used_mocks = find_mocks(includes)
- end
+ source = File.read(input_file)
+ source = source.force_encoding("ISO-8859-1").encode("utf-8", :replace => nil) if ($QUICK_RUBY_VERSION > 10900)
+ tests = find_tests(source)
+ headers = find_includes(source)
+ testfile_includes = headers[:local] + headers[:system]
+ used_mocks = find_mocks(testfile_includes)
+
#build runner file
+ generate(input_file, output_file, tests, used_mocks, testfile_includes)
+
+ #determine which files were used to return them
+ all_files_used = [input_file, output_file]
+ all_files_used += testfile_includes.map {|filename| filename + '.c'} unless testfile_includes.empty?
+ all_files_used += @options[:includes] unless @options[:includes].empty?
+ return all_files_used.uniq
+ end
+
+ def generate(input_file, output_file, tests, used_mocks, testfile_includes)
File.open(output_file, 'w') do |output|
- create_header(output, used_mocks)
+ create_header(output, used_mocks, testfile_includes)
create_externs(output, tests, used_mocks)
create_mock_management(output, used_mocks)
create_suite_setup_and_teardown(output)
create_reset(output, used_mocks)
- create_main(output, input_file, tests)
+ create_main(output, input_file, tests, used_mocks)
end
-
- all_files_used = [input_file, output_file]
- all_files_used += includes.map {|filename| filename + '.c'} unless includes.empty?
- all_files_used += @options[:includes] unless @options[:includes].empty?
- return all_files_used.uniq
+
+
+
+
+
end
-
- def find_tests(input_file)
- tests_raw = []
- tests_args = []
+
+
+ def find_tests(source)
+
+
tests_and_line_numbers = []
-
- input_file.rewind
- source_raw = input_file.read
- source_scrubbed = source_raw.gsub(/\/\/.*$/, '') # remove line comments
+
+
+
+
+ source_scrubbed = source.gsub(/\/\/.*$/, '') # remove line comments
source_scrubbed = source_scrubbed.gsub(/\/\*.*?\*\//m, '') # remove block comments
lines = source_scrubbed.split(/(^\s*\#.*$) # Treat preprocessor directives as a logical line
| (;|\{|\}) /x) # Match ;, {, and } as end of lines
lines.each_with_index do |line, index|
#find tests
- if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+(test.*?)\s*\(\s*(.*)\s*\)/
+ if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+((?:#{@options[:test_prefix]}).*)\s*\(\s*(.*)\s*\)/
+ arguments = $1
name = $2
call = $3
- args = (@options[:use_param_tests] and $1) ? ($1.gsub(/\s*TEST_CASE\s*\(\s*/,'').strip.split(/\s*\)/).compact) : nil
- tests_and_line_numbers << { :name => name, :args => args, :call => call, :line_number => 0 }
- tests_args = []
+ args = nil
+ if (@options[:use_param_tests] and !arguments.empty?)
+ args = []
+ arguments.scan(/\s*TEST_CASE\s*\((.*)\)\s*$/) {|a| args << a[0]}
+ end
+ tests_and_line_numbers << { :test => name, :args => args, :call => call, :line_number => 0 }
+
end
end
+ tests_and_line_numbers.uniq! {|v| v[:test] }
#determine line numbers and create tests to run
- source_lines = source_raw.split("\n")
+ source_lines = source.split("\n")
source_index = 0;
tests_and_line_numbers.size.times do |i|
source_lines[source_index..-1].each_with_index do |line, index|
- if (line =~ /#{tests_and_line_numbers[i][:name]}/)
+ if (line =~ /#{tests_and_line_numbers[i][:test]}/)
source_index += index
tests_and_line_numbers[i][:line_number] = source_index + 1
break
end
end
end
-
+
+
return tests_and_line_numbers
end
- def find_includes(input_file)
- input_file.rewind
- includes = []
- input_file.readlines.each do |line|
- scan_results = line.scan(/^\s*#include\s+\"\s*(.+)\.[hH]\s*\"/)
- includes << scan_results[0][0] if (scan_results.size > 0)
- end
+ def find_includes(source)
+
+ #remove comments (block and line, in three steps to ensure correct precedence)
+ source.gsub!(/\/\/(?:.+\/\*|\*(?:$|[^\/])).*$/, '') # remove line comments that comment out the start of blocks
+ source.gsub!(/\/\*.*?\*\//m, '') # remove block comments
+ source.gsub!(/\/\/.*$/, '') # remove line comments (all that remain)
+
+ #parse out includes
+
+ includes = {
+
+ :local => source.scan(/^\s*#include\s+\"\s*(.+)\.[hH]\s*\"/).flatten,
+ :system => source.scan(/^\s*#include\s+<\s*(.+)\s*>/).flatten.map { |inc| "<#{inc}>" }
+ }
+
+
return includes
end
-
+
+
def find_mocks(includes)
mock_headers = []
includes.each do |include_file|
mock_headers << File.basename(include_file) if (include_file =~ /^mock/i)
end
- return mock_headers
+ return mock_headers
end
-
- def create_header(output, mocks)
+
+
+ def create_header(output, mocks, testfile_includes=[])
output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
create_runtest(output, mocks)
output.puts("\n//=======Automagically Detected Files To Include=====")
output.puts("#include \"#{@options[:framework].to_s}.h\"")
output.puts('#include "cmock.h"') unless (mocks.empty?)
- @options[:includes].flatten.uniq.compact.each do |includes|
- output.puts("#include \"#{includes.gsub('.h','')}.h\"")
+ @options[:includes].flatten.uniq.compact.each do |inc|
+ output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
end
output.puts('#include <setjmp.h>')
output.puts('#include <stdio.h>')
output.puts('#include "CException.h"') if @options[:plugins].include?(:cexception)
+ testfile_includes.delete_if{|inc| inc =~ /(unity|cmock)/}
+ testrunner_includes = testfile_includes - mocks
+ testrunner_includes.each do |inc|
+ output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
+ end
mocks.each do |mock|
output.puts("#include \"#{mock.gsub('.h','')}.h\"")
end
if @options[:enforce_strict_ordering]
- output.puts('')
- output.puts('int GlobalExpectCount;')
- output.puts('int GlobalVerifyOrder;')
- output.puts('char* GlobalOrderError;')
+ output.puts('')
+ output.puts('int GlobalExpectCount;')
+ output.puts('int GlobalVerifyOrder;')
+ output.puts('char* GlobalOrderError;')
end
end
-
+
+
def create_externs(output, tests, mocks)
output.puts("\n//=======External Functions This Runner Calls=====")
- output.puts("extern void setUp(void);")
- output.puts("extern void tearDown(void);")
- output.puts("void resetTest(void);")
+ output.puts("extern void #{@options[:setup_name]}(void);")
+ output.puts("extern void #{@options[:teardown_name]}(void);")
+
tests.each do |test|
- output.puts("extern void #{test[:name]}(#{test[:call]});")
+ output.puts("extern void #{test[:test]}(#{test[:call] || 'void'});")
end
output.puts('')
end
-
+
+
def create_mock_management(output, mocks)
unless (mocks.empty?)
output.puts("\n//=======Mock Management=====")
@@ -158,30 +215,34 @@ class UnityTestRunnerGenerator
output.puts("{")
if @options[:enforce_strict_ordering]
output.puts(" GlobalExpectCount = 0;")
- output.puts(" GlobalVerifyOrder = 0;")
- output.puts(" GlobalOrderError = NULL;")
+ output.puts(" GlobalVerifyOrder = 0;")
+ output.puts(" GlobalOrderError = NULL;")
end
mocks.each do |mock|
- output.puts(" #{mock}_Init();")
+ mock_clean = TypeSanitizer.sanitize_c_identifier(mock)
+ output.puts(" #{mock_clean}_Init();")
end
output.puts("}\n")
output.puts("static void CMock_Verify(void)")
output.puts("{")
mocks.each do |mock|
- output.puts(" #{mock}_Verify();")
+ mock_clean = TypeSanitizer.sanitize_c_identifier(mock)
+ output.puts(" #{mock_clean}_Verify();")
end
output.puts("}\n")
output.puts("static void CMock_Destroy(void)")
output.puts("{")
mocks.each do |mock|
- output.puts(" #{mock}_Destroy();")
+ mock_clean = TypeSanitizer.sanitize_c_identifier(mock)
+ output.puts(" #{mock_clean}_Destroy();")
end
output.puts("}\n")
end
end
-
+
+
def create_suite_setup_and_teardown(output)
unless (@options[:suite_setup].nil?)
output.puts("\n//=======Suite Setup=====")
@@ -198,78 +259,91 @@ class UnityTestRunnerGenerator
output.puts("}")
end
end
-
+
+
def create_runtest(output, used_mocks)
cexception = @options[:plugins].include? :cexception
va_args1 = @options[:use_param_tests] ? ', ...' : ''
va_args2 = @options[:use_param_tests] ? '__VA_ARGS__' : ''
output.puts("\n//=======Test Runner Used To Run Each Test Below=====")
- output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests]
+ output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests]
output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\")
output.puts("{ \\")
output.puts(" Unity.CurrentTestName = #TestFunc#{va_args2.empty? ? '' : " \"(\" ##{va_args2} \")\""}; \\")
output.puts(" Unity.CurrentTestLineNumber = TestLineNum; \\")
output.puts(" Unity.NumberOfTests++; \\")
+ output.puts(" CMock_Init(); \\") unless (used_mocks.empty?)
output.puts(" if (TEST_PROTECT()) \\")
output.puts(" { \\")
output.puts(" CEXCEPTION_T e; \\") if cexception
output.puts(" Try { \\") if cexception
- output.puts(" CMock_Init(); \\") unless (used_mocks.empty?)
- output.puts(" setUp(); \\")
+ output.puts(" #{@options[:setup_name]}(); \\")
+
+
output.puts(" TestFunc(#{va_args2}); \\")
- output.puts(" CMock_Verify(); \\") unless (used_mocks.empty?)
+
output.puts(" } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, \"Unhandled Exception!\"); } \\") if cexception
output.puts(" } \\")
- output.puts(" CMock_Destroy(); \\") unless (used_mocks.empty?)
+
output.puts(" if (TEST_PROTECT() && !TEST_IS_IGNORED) \\")
output.puts(" { \\")
- output.puts(" tearDown(); \\")
+ output.puts(" #{@options[:teardown_name]}(); \\")
+ output.puts(" CMock_Verify(); \\") unless (used_mocks.empty?)
+
output.puts(" } \\")
+ output.puts(" CMock_Destroy(); \\") unless (used_mocks.empty?)
output.puts(" UnityConcludeTest(); \\")
output.puts("}\n")
end
-
+
+
def create_reset(output, used_mocks)
output.puts("\n//=======Test Reset Option=====")
- output.puts("void resetTest()")
+ output.puts("void resetTest(void);")
+ output.puts("void resetTest(void)")
+
output.puts("{")
output.puts(" CMock_Verify();") unless (used_mocks.empty?)
output.puts(" CMock_Destroy();") unless (used_mocks.empty?)
- output.puts(" tearDown();")
- output.puts(" CMock_Init();") unless (used_mocks.empty?)
- output.puts(" setUp();")
+ output.puts(" #{@options[:teardown_name]}();")
+
+ output.puts(" CMock_Init();") unless (used_mocks.empty?)
+ output.puts(" #{@options[:setup_name]}();")
+
output.puts("}")
end
-
- def create_main(output, filename, tests)
- output.puts("\nchar *progname;\n")
+
+
+ def create_main(output, filename, tests, used_mocks)
+ output.puts("\nchar const *progname;\n")
output.puts("\n\n//=======MAIN=====")
-
+
output.puts("int main(int argc, char *argv[])")
output.puts("{")
- #new stuff added
- #output.puts("\nu_long current_time = 4; // needed by authkeys. Used only in to calculate lifetime.\n");
-
- output.puts(" progname = argv[0];\n")
- #not necessary after all
- #output.puts(" init_lib();\n")
- #output.puts(" init_auth();\n")
+ output.puts(" progname = argv[0];\n")
+
+
+
+
+
+
output.puts(" suite_setup();") unless @options[:suite_setup].nil?
- output.puts(" Unity.TestFile = \"#{filename}\";")
+
output.puts(" UnityBegin(\"#{filename}\");")
if (@options[:use_param_tests])
tests.each do |test|
if ((test[:args].nil?) or (test[:args].empty?))
- output.puts(" RUN_TEST(#{test[:name]}, #{test[:line_number]}, RUN_TEST_NO_ARGS);")
+ output.puts(" RUN_TEST(#{test[:test]}, #{test[:line_number]}, RUN_TEST_NO_ARGS);")
else
- test[:args].each {|args| output.puts(" RUN_TEST(#{test[:name]}, #{test[:line_number]}, #{args});")}
+ test[:args].each {|args| output.puts(" RUN_TEST(#{test[:test]}, #{test[:line_number]}, #{args});")}
end
end
else
- tests.each { |test| output.puts(" RUN_TEST(#{test[:name]}, #{test[:line_number]});") }
+ tests.each { |test| output.puts(" RUN_TEST(#{test[:test]}, #{test[:line_number]});") }
end
output.puts()
+ output.puts(" CMock_Guts_MemFreeFinal();") unless used_mocks.empty?
output.puts(" return #{@options[:suite_teardown].nil? ? "" : "suite_teardown"}(UnityEnd());")
output.puts("}")
end
@@ -279,31 +353,56 @@ end
if ($0 == __FILE__)
options = { :includes => [] }
yaml_file = nil
-
- #parse out all the options first
- ARGV.reject! do |arg|
+
+
+ #parse out all the options first (these will all be removed as we go)
+ ARGV.reject! do |arg|
case(arg)
- when '-cexception'
+ when '-cexception'
options[:plugins] = [:cexception]; true
- when /\w+\.yml/
+ when /\.*\.ya?ml/
+
options = UnityTestRunnerGenerator.grab_config(arg); true
+ when /\.*\.h/
+ options[:includes] << arg; true
+ when /--(\w+)=\"?(.*)\"?/
+ options[$1.to_sym] = $2; true
else false
end
- end
-
+ end
+
+
#make sure there is at least one parameter left (the input file)
if !ARGV[0]
- puts ["usage: ruby #{__FILE__} (yaml) (options) input_test_file output_test_runner (includes)",
- " blah.yml - will use config options in the yml file (see docs)",
- " -cexception - include cexception support"].join("\n")
+ puts ["\nusage: ruby #{__FILE__} (files) (options) input_test_file (output)",
+ "\n input_test_file - this is the C file you want to create a runner for",
+ " output - this is the name of the runner file to generate",
+ " defaults to (input_test_file)_Runner",
+ " files:",
+ " *.yml / *.yaml - loads configuration from here in :unity or :cmock",
+ " *.h - header files are added as #includes in runner",
+ " options:",
+
+ " -cexception - include cexception support",
+ " --setup_name=\"\" - redefine setUp func name to something else",
+ " --teardown_name=\"\" - redefine tearDown func name to something else",
+ " --test_prefix=\"\" - redefine test prefix from default test|spec|should",
+ " --suite_setup=\"\" - code to execute for setup of entire suite",
+ " --suite_teardown=\"\" - code to execute for teardown of entire suite",
+ " --use_param_tests=1 - enable parameterized tests (disabled by default)",
+ ].join("\n")
exit 1
end
-
+
+
#create the default test runner name if not specified
ARGV[1] = ARGV[0].gsub(".c","_Runner.c") if (!ARGV[1])
-
- #everything else is an include file
- options[:includes] = (ARGV.slice(2..-1).flatten.compact) if (ARGV.size > 2)
-
+
+
+
+
+
+
UnityTestRunnerGenerator.new(options).run(ARGV[0], ARGV[1])
end
+
diff --git a/contrib/ntp/sntp/unity/auto/parseOutput.rb b/contrib/ntp/sntp/unity/auto/parseOutput.rb
new file mode 100755
index 000000000000..7ea180f4c9cd
--- /dev/null
+++ b/contrib/ntp/sntp/unity/auto/parseOutput.rb
@@ -0,0 +1,191 @@
+#============================================================
+# Author: John Theofanopoulos
+# A simple parser. Takes the output files generated during the build process and
+# extracts information relating to the tests.
+#
+# Notes:
+# To capture an output file under VS builds use the following:
+# devenv [build instructions] > Output.txt & type Output.txt
+#
+# To capture an output file under GCC/Linux builds use the following:
+# make | tee Output.txt
+#
+# To use this parser use the following command
+# ruby parseOutput.rb [options] [file]
+# options: -xml : produce a JUnit compatible XML file
+# file : file to scan for results
+#============================================================
+
+
+class ParseOutput
+# The following flag is set to true when a test is found or false otherwise.
+ @testFlag
+ @xmlOut
+ @arrayList
+ @totalTests
+ @classIndex
+
+# Set the flag to indicate if there will be an XML output file or not
+ def setXmlOutput()
+ @xmlOut = true
+ end
+
+# if write our output to XML
+ def writeXmlOuput()
+ output = File.open("report.xml", "w")
+ output << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ @arrayList.each do |item|
+ output << item << "\n"
+ end
+ output << "</testsuite>\n"
+ end
+
+# This function will try and determine when the suite is changed. This is
+# is the name that gets added to the classname parameter.
+ def testSuiteVerify(testSuiteName)
+ if @testFlag == false
+ @testFlag = true;
+ # Split the path name
+ testName = testSuiteName.split("/")
+ # Remove the extension
+ baseName = testName[testName.size - 1].split(".")
+ @testSuite = "test." + baseName[0]
+ printf "New Test: %s\n", @testSuite
+ end
+ end
+
+
+# Test was flagged as having passed so format the output
+ def testPassed(array)
+ lastItem = array.length - 1
+ testName = array[lastItem - 1]
+ testSuiteVerify(array[@className])
+ printf "%-40s PASS\n", testName
+ if @xmlOut == true
+ @arrayList.push " <testcase classname=\"" + @testSuite + "\" name=\"" + testName + "\"/>"
+ end
+ end
+
+# Test was flagged as being ingored so format the output
+ def testIgnored(array)
+ lastItem = array.length - 1
+ testName = array[lastItem - 2]
+ reason = array[lastItem].chomp
+ testSuiteVerify(array[@className])
+ printf "%-40s IGNORED\n", testName
+ if @xmlOut == true
+ @arrayList.push " <testcase classname=\"" + @testSuite + "\" name=\"" + testName + "\">"
+ @arrayList.push " <skipped type=\"TEST IGNORED\"> " + reason + " </skipped>"
+ @arrayList.push " </testcase>"
+ end
+ end
+
+# Test was flagged as having failed so format the line
+ def testFailed(array)
+ lastItem = array.length - 1
+ testName = array[lastItem - 2]
+ reason = array[lastItem].chomp + " at line: " + array[lastItem - 3]
+ testSuiteVerify(array[@className])
+ printf "%-40s FAILED\n", testName
+ if @xmlOut == true
+ @arrayList.push " <testcase classname=\"" + @testSuite + "\" name=\"" + testName + "\">"
+ @arrayList.push " <failure type=\"ASSERT FAILED\"> " + reason + " </failure>"
+ @arrayList.push " </testcase>"
+ end
+ end
+
+
+# Figure out what OS we are running on. For now we are assuming if it's not Windows it must
+# be Unix based.
+ def detectOS()
+ myOS = RUBY_PLATFORM.split("-")
+ if myOS.size == 2
+ if myOS[1] == "mingw32"
+ @className = 1
+ else
+ @className = 0
+ end
+ else
+ @className = 0
+ end
+
+ end
+
+# Main function used to parse the file that was captured.
+ def process(name)
+ @testFlag = false
+ @arrayList = Array.new
+
+ detectOS()
+
+ puts "Parsing file: " + name
+
+
+ testPass = 0
+ testFail = 0
+ testIgnore = 0
+ puts ""
+ puts "=================== RESULTS ====================="
+ puts ""
+ File.open(name).each do |line|
+ # Typical test lines look like this:
+ # <path>/<test_file>.c:36:test_tc1000_opsys:FAIL: Expected 1 Was 0
+ # <path>/<test_file>.c:112:test_tc5004_initCanChannel:IGNORE: Not Yet Implemented
+ # <path>/<test_file>.c:115:test_tc5100_initCanVoidPtrs:PASS
+ #
+ # where path is different on Unix vs Windows devices (Windows leads with a drive letter)
+ lineArray = line.split(":")
+ lineSize = lineArray.size
+ # If we were able to split the line then we can look to see if any of our target words
+ # were found. Case is important.
+ if lineSize >= 4
+ # Determine if this test passed
+ if line.include? ":PASS"
+ testPassed(lineArray)
+ testPass += 1
+ elsif line.include? ":FAIL:"
+ testFailed(lineArray)
+ testFail += 1
+ elsif line.include? ":IGNORE:"
+ testIgnored(lineArray)
+ testIgnore += 1
+ # If none of the keywords are found there are no more tests for this suite so clear
+ # the test flag
+ else
+ @testFlag = false
+ end
+ else
+ @testFlag = false
+ end
+ end
+ puts ""
+ puts "=================== SUMMARY ====================="
+ puts ""
+ puts "Tests Passed : " + testPass.to_s
+ puts "Tests Failed : " + testFail.to_s
+ puts "Tests Ignored : " + testIgnore.to_s
+ @totalTests = testPass + testFail + testIgnore
+ if @xmlOut == true
+ heading = "<testsuite tests=\"" + @totalTests.to_s + "\" failures=\"" + testFail.to_s + "\"" + " skips=\"" + testIgnore.to_s + "\">"
+ @arrayList.insert(0, heading)
+ writeXmlOuput()
+ end
+
+ # return result
+ end
+
+ end
+
+# If the command line has no values in, used a default value of Output.txt
+parseMyFile = ParseOutput.new
+
+if ARGV.size >= 1
+ ARGV.each do |a|
+ if a == "-xml"
+ parseMyFile.setXmlOutput();
+ else
+ parseMyFile.process(a)
+ break
+ end
+ end
+end
diff --git a/contrib/ntp/sntp/unity/auto/type_sanitizer.rb b/contrib/ntp/sntp/unity/auto/type_sanitizer.rb
new file mode 100755
index 000000000000..7c2c0ac2c4ec
--- /dev/null
+++ b/contrib/ntp/sntp/unity/auto/type_sanitizer.rb
@@ -0,0 +1,8 @@
+module TypeSanitizer
+
+ def self.sanitize_c_identifier(unsanitized)
+ # convert filename to valid C identifier by replacing invalid chars with '_'
+ return unsanitized.gsub(/[-\/\\\.\,\s]/, "_")
+ end
+
+end
diff --git a/contrib/ntp/sntp/unity/auto/unity_test_summary.py b/contrib/ntp/sntp/unity/auto/unity_test_summary.py
new file mode 100755
index 000000000000..c64f6c5df28a
--- /dev/null
+++ b/contrib/ntp/sntp/unity/auto/unity_test_summary.py
@@ -0,0 +1,135 @@
+#! python3
+# ==========================================
+# Unity Project - A Test Framework for C
+# Copyright (c) 2015 Alexander Mueller / XelaRellum@web.de
+# [Released under MIT License. Please refer to license.txt for details]
+# Based on the ruby script by Mike Karlesky, Mark VanderVoord, Greg Williams
+# ==========================================
+import sys
+import os
+import re
+from glob import glob
+
+class UnityTestSummary:
+ def __init__(self):
+ self.report = ''
+ self.total_tests = 0
+ self.failures = 0
+ self.ignored = 0
+
+ def run(self):
+ # Clean up result file names
+ results = []
+ for target in self.targets:
+ results.append(target.replace('\\', '/'))
+
+ # Dig through each result file, looking for details on pass/fail:
+ failure_output = []
+ ignore_output = []
+
+ for result_file in results:
+ lines = list(map(lambda line: line.rstrip(), open(result_file, "r").read().split('\n')))
+ if len(lines) == 0:
+ raise Exception("Empty test result file: %s" % result_file)
+
+ details = self.get_details(result_file, lines)
+ failures = details['failures']
+ ignores = details['ignores']
+ if len(failures) > 0: failure_output.append('\n'.join(failures))
+ if len(ignores) > 0: ignore_output.append('n'.join(ignores))
+ tests,failures,ignored = self.parse_test_summary('\n'.join(lines))
+ self.total_tests += tests
+ self.failures += failures
+ self.ignored += ignored
+
+ if self.ignored > 0:
+ self.report += "\n"
+ self.report += "--------------------------\n"
+ self.report += "UNITY IGNORED TEST SUMMARY\n"
+ self.report += "--------------------------\n"
+ self.report += "\n".join(ignore_output)
+
+ if self.failures > 0:
+ self.report += "\n"
+ self.report += "--------------------------\n"
+ self.report += "UNITY FAILED TEST SUMMARY\n"
+ self.report += "--------------------------\n"
+ self.report += '\n'.join(failure_output)
+
+ self.report += "\n"
+ self.report += "--------------------------\n"
+ self.report += "OVERALL UNITY TEST SUMMARY\n"
+ self.report += "--------------------------\n"
+ self.report += "{total_tests} TOTAL TESTS {failures} TOTAL FAILURES {ignored} IGNORED\n".format(total_tests = self.total_tests, failures=self.failures, ignored=self.ignored)
+ self.report += "\n"
+
+ return self.report
+
+ def set_targets(self, target_array):
+ self.targets = target_array
+
+ def set_root_path(self, path):
+ self.root = path
+
+ def usage(self, err_msg=None):
+ print("\nERROR: ")
+ if err_msg:
+ print(err_msg)
+ print("\nUsage: unity_test_summary.rb result_file_directory/ root_path/")
+ print(" result_file_directory - The location of your results files.")
+ print(" Defaults to current directory if not specified.")
+ print(" Should end in / if specified.")
+ print(" root_path - Helpful for producing more verbose output if using relative paths.")
+ sys.exit(1)
+
+ def get_details(self, result_file, lines):
+ results = { 'failures': [], 'ignores': [], 'successes': [] }
+ for line in lines:
+ parts = line.split(':')
+ if len(parts) != 5:
+ continue
+ src_file,src_line,test_name,status,msg = parts
+ if len(self.root) > 0:
+ line_out = "%s%s" % (self.root, line)
+ else:
+ line_out = line
+ if status == 'IGNORE':
+ results['ignores'].append(line_out)
+ elif status == 'FAIL':
+ results['failures'].append(line_out)
+ elif status == 'PASS':
+ results['successes'].append(line_out)
+ return results
+
+ def parse_test_summary(self, summary):
+ m = re.search(r"([0-9]+) Tests ([0-9]+) Failures ([0-9]+) Ignored", summary)
+ if not m:
+ raise Exception("Couldn't parse test results: %s" % summary)
+
+ return int(m.group(1)), int(m.group(2)), int(m.group(3))
+
+
+if __name__ == '__main__':
+ uts = UnityTestSummary()
+ try:
+ #look in the specified or current directory for result files
+ if len(sys.argv) > 1:
+ targets_dir = sys.argv[1]
+ else:
+ targets_dir = './'
+ targets = list(map(lambda x: x.replace('\\', '/'), glob(targets_dir + '*.test*')))
+ if len(targets) == 0:
+ raise Exception("No *.testpass or *.testfail files found in '%s'" % targets_dir)
+ uts.set_targets(targets)
+
+ #set the root path
+ if len(sys.argv) > 2:
+ root_path = sys.argv[2]
+ else:
+ root_path = os.path.split(__file__)[0]
+ uts.set_root_path(root_path)
+
+ #run the summarizer
+ print(uts.run())
+ except Exception as e:
+ uts.usage(e)
diff --git a/contrib/ntp/sntp/unity/auto/unity_test_summary.rb b/contrib/ntp/sntp/unity/auto/unity_test_summary.rb
index 69ec2e8d9588..78d727efe652 100644
--- a/contrib/ntp/sntp/unity/auto/unity_test_summary.rb
+++ b/contrib/ntp/sntp/unity/auto/unity_test_summary.rb
@@ -2,7 +2,7 @@
# Unity Project - A Test Framework for C
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
# [Released under MIT License. Please refer to license.txt for details]
-# ==========================================
+# ==========================================
#!/usr/bin/ruby
#
@@ -15,22 +15,24 @@ class UnityTestSummary
include FileUtils::Verbose
attr_reader :report, :total_tests, :failures, :ignored
-
- def initialize
+
+ def initialize(opts = {})
@report = ''
@total_tests = 0
@failures = 0
@ignored = 0
+
+
end
-
+
def run
# Clean up result file names
results = @targets.map {|target| target.gsub(/\\/,'/')}
-
- # Dig through each result file, looking for details on pass/fail:
+
+ # Dig through each result file, looking for details on pass/fail:
failure_output = []
ignore_output = []
-
+
results.each do |result_file|
lines = File.readlines(result_file).map { |line| line.chomp }
if lines.length == 0
@@ -45,7 +47,7 @@ class UnityTestSummary
@ignored += ignored
end
end
-
+
if @ignored > 0
@report += "\n"
@report += "--------------------------\n"
@@ -53,7 +55,7 @@ class UnityTestSummary
@report += "--------------------------\n"
@report += ignore_output.flatten.join("\n")
end
-
+
if @failures > 0
@report += "\n"
@report += "--------------------------\n"
@@ -61,7 +63,7 @@ class UnityTestSummary
@report += "--------------------------\n"
@report += failure_output.flatten.join("\n")
end
-
+
@report += "\n"
@report += "--------------------------\n"
@report += "OVERALL UNITY TEST SUMMARY\n"
@@ -69,32 +71,33 @@ class UnityTestSummary
@report += "#{@total_tests} TOTAL TESTS #{@failures} TOTAL FAILURES #{@ignored} IGNORED\n"
@report += "\n"
end
-
+
def set_targets(target_array)
@targets = target_array
end
-
+
def set_root_path(path)
@root = path
end
def usage(err_msg=nil)
+ puts "\nERROR: "
puts err_msg if err_msg
- puts "Usage: unity_test_summary.rb"
+ puts "\nUsage: unity_test_summary.rb result_file_directory/ root_path/"
+ puts " result_file_directory - The location of your results files."
+ puts " Defaults to current directory if not specified."
+ puts " Should end in / if specified."
+ puts " root_path - Helpful for producing more verbose output if using relative paths."
exit 1
end
-
+
protected
-
- @@targets=nil
- @@path=nil
- @@root=nil
def get_details(result_file, lines)
results = { :failures => [], :ignores => [], :successes => [] }
lines.each do |line|
src_file,src_line,test_name,status,msg = line.split(/:/)
- line_out = ((@root and (@root != 0)) ? "#{@root}#{line}" : line ).gsub(/\//, "\\")
+ line_out = ((@root && (@root != 0)) ? "#{@root}#{line}" : line ).gsub(/\//, "\\")
case(status)
when 'IGNORE' then results[:ignores] << line_out
when 'FAIL' then results[:failures] << line_out
@@ -103,9 +106,9 @@ class UnityTestSummary
end
return results
end
-
+
def parse_test_summary(summary)
- if summary[-3..-1].join("\n") =~ /(\d+) Tests (\d+) Failures (\d+) Ignored/
+ if summary.find { |v| v =~ /(\d+) Tests (\d+) Failures (\d+) Ignored/ }
[$1.to_i,$2.to_i,$3.to_i]
else
raise "Couldn't parse test results: #{summary}"
@@ -113,14 +116,34 @@ class UnityTestSummary
end
def here; File.expand_path(File.dirname(__FILE__)); end
-
+
end
if $0 == __FILE__
- script = UnityTestSummary.new
+
+ #parse out the command options
+ opts, args = ARGV.partition {|v| v =~ /^--\w+/}
+ opts.map! {|v| v[2..-1].to_sym }
+
+ #create an instance to work with
+ uts = UnityTestSummary.new(opts)
+
begin
- script.run
+ #look in the specified or current directory for result files
+ args[0] ||= './'
+ targets = "#{ARGV[0].gsub(/\\/, '/')}**/*.test*"
+ results = Dir[targets]
+ raise "No *.testpass, *.testfail, or *.testresults files found in '#{targets}'" if results.empty?
+ uts.set_targets(results)
+
+ #set the root path
+ args[1] ||= Dir.pwd + '/'
+ uts.set_root_path(ARGV[1])
+
+ #run the summarizer
+ puts uts.run
rescue Exception => e
- script.usage e.message
+ uts.usage e.message
end
end
+
diff --git a/contrib/ntp/sntp/unity/unity.c b/contrib/ntp/sntp/unity/unity.c
index cbdef3bb0a12..0161f8f18cf9 100644
--- a/contrib/ntp/sntp/unity/unity.c
+++ b/contrib/ntp/sntp/unity/unity.c
@@ -327,16 +327,14 @@ void UnityConcludeTest(void)
}
printf("| ");
- printf(Unity.XFAILMessage);
+ printf("%s", Unity.XFAILMessage);
Unity.XFAILMessage = NULL;
}
else
{
printf(" - EXPECTED FAIL!");
}
-
}
-
else
if (Unity.CurrentTestIgnored)
diff --git a/contrib/ntp/sntp/unity/unity_config.h b/contrib/ntp/sntp/unity/unity_config.h
new file mode 100644
index 000000000000..25418bd33fd3
--- /dev/null
+++ b/contrib/ntp/sntp/unity/unity_config.h
@@ -0,0 +1,12 @@
+/* unity_config.h */
+
+#ifndef UNITY_CONFIG_H
+#define UNITY_CONFIG_H
+
+#define UNITY_INCLUDE_DOUBLE
+
+#ifndef HAVE_STDINT_H
+# define UNITY_EXCLUDE_STDINT_H
+#endif
+
+#endif /* UNITY_CONFIG_H */
diff --git a/contrib/ntp/sntp/unity/unity_internals.h b/contrib/ntp/sntp/unity/unity_internals.h
index a38e1014a007..c2aabc3aa6d7 100644
--- a/contrib/ntp/sntp/unity/unity_internals.h
+++ b/contrib/ntp/sntp/unity/unity_internals.h
@@ -82,22 +82,22 @@
// UNITY_INT_WIDTH.
#ifndef UNITY_POINTER_WIDTH
#ifdef UINTPTR_MAX
- #if (UINTPTR_MAX <= 0xFFFF)
+ #if (UINTPTR_MAX+0 <= 0xFFFF)
#define UNITY_POINTER_WIDTH (16)
- #elif (UINTPTR_MAX <= 0xFFFFFFFF)
+ #elif (UINTPTR_MAX+0 <= 0xFFFFFFFF)
#define UNITY_POINTER_WIDTH (32)
- #elif (UINTPTR_MAX <= 0xFFFFFFFFFFFFFFFF)
+ #elif (UINTPTR_MAX+0 <= 0xFFFFFFFFFFFFFFFF)
#define UNITY_POINTER_WIDTH (64)
#endif
#endif
#endif
#ifndef UNITY_POINTER_WIDTH
#ifdef INTPTR_MAX
- #if (INTPTR_MAX <= 0x7FFF)
+ #if (INTPTR_MAX+0 <= 0x7FFF)
#define UNITY_POINTER_WIDTH (16)
- #elif (INTPTR_MAX <= 0x7FFFFFFF)
+ #elif (INTPTR_MAX+0 <= 0x7FFFFFFF)
#define UNITY_POINTER_WIDTH (32)
- #elif (INTPTR_MAX <= 0x7FFFFFFFFFFFFFFF)
+ #elif (INTPTR_MAX+0 <= 0x7FFFFFFFFFFFFFFF)
#define UNITY_POINTER_WIDTH (64)
#endif
#endif
diff --git a/contrib/ntp/sntp/version.c b/contrib/ntp/sntp/version.c
index 885dd31b0f77..4c87128ff5ee 100644
--- a/contrib/ntp/sntp/version.c
+++ b/contrib/ntp/sntp/version.c
@@ -2,4 +2,4 @@
* version file for sntp
*/
#include <config.h>
-const char * Version = "sntp 4.2.8p3-RCGO@1.3265-o Mon Jun 29 20:23:24 UTC 2015 (21)";
+const char * Version = "sntp 4.2.8p4@1.3265-o Wed Oct 21 16:41:07 UTC 2015 (25)";
diff --git a/contrib/ntp/tests/Makefile.am b/contrib/ntp/tests/Makefile.am
index 75890a42c22a..af502b9a3455 100644
--- a/contrib/ntp/tests/Makefile.am
+++ b/contrib/ntp/tests/Makefile.am
@@ -1,23 +1,11 @@
NULL =
SUBDIRS =
-DIST_SUBDIRS =
-
-if GTEST_AVAILABLE
-SUBDIRS += \
- ntpd \
- $(NULL)
-endif
SUBDIRS += \
bug-2803 \
libntp \
- sec-2853 \
- $(NULL)
-
-DIST_SUBDIRS += \
- bug-2803 \
- libntp \
ntpd \
+ ntpq \
sandbox \
sec-2853 \
$(NULL)
diff --git a/contrib/ntp/tests/Makefile.in b/contrib/ntp/tests/Makefile.in
index ac29e8e3f466..597b37798549 100644
--- a/contrib/ntp/tests/Makefile.in
+++ b/contrib/ntp/tests/Makefile.in
@@ -87,10 +87,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@GTEST_AVAILABLE_TRUE@am__append_1 = \
-@GTEST_AVAILABLE_TRUE@ ntpd \
-@GTEST_AVAILABLE_TRUE@ $(NULL)
-
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -119,6 +115,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -191,6 +188,7 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
@@ -227,6 +225,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -235,6 +234,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -296,6 +296,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@@ -482,8 +483,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-SUBDIRS = $(am__append_1) bug-2803 libntp sec-2853 $(NULL)
-DIST_SUBDIRS = bug-2803 libntp ntpd sandbox sec-2853 $(NULL)
+SUBDIRS = bug-2803 libntp ntpd ntpq sandbox sec-2853 $(NULL)
all: all-recursive
.SUFFIXES:
diff --git a/contrib/ntp/tests/bug-2803/Makefile.am b/contrib/ntp/tests/bug-2803/Makefile.am
index eaf825feaab0..1e0cd9cf373f 100644
--- a/contrib/ntp/tests/bug-2803/Makefile.am
+++ b/contrib/ntp/tests/bug-2803/Makefile.am
@@ -27,6 +27,8 @@ AM_CPPFLAGS = $(NTP_INCS)
AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_CPPFLAGS += -I$(top_srcdir)/include
AM_CPPFLAGS += $(CPPFLAGS_NTP)
+AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H
+AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
diff --git a/contrib/ntp/tests/bug-2803/Makefile.in b/contrib/ntp/tests/bug-2803/Makefile.in
index 920c01b9ac3f..7febe6ae8541 100644
--- a/contrib/ntp/tests/bug-2803/Makefile.in
+++ b/contrib/ntp/tests/bug-2803/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -429,6 +430,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -437,6 +439,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -498,6 +501,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@@ -707,7 +711,8 @@ AM_CFLAGS = $(CFLAGS_NTP)
# HMS: we may not need some of these:
AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/sntp/unity \
- -I$(top_srcdir)/include $(CPPFLAGS_NTP)
+ -I$(top_srcdir)/include $(CPPFLAGS_NTP) \
+ -DUNITY_INCLUDE_CONFIG_H -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
bug_2803_SOURCES = \
bug-2803.c \
diff --git a/contrib/ntp/tests/bug-2803/run-bug-2803.c b/contrib/ntp/tests/bug-2803/run-bug-2803.c
index 8382c5aa898a..05e6a5d03c45 100644
--- a/contrib/ntp/tests/bug-2803/run-bug-2803.c
+++ b/contrib/ntp/tests/bug-2803/run-bug-2803.c
@@ -22,29 +22,33 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include <config.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <ntp_fp.h>
+#include <timevalops.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_main(void );
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "bug-2803.c";
UnityBegin("bug-2803.c");
RUN_TEST(test_main, 18);
diff --git a/contrib/ntp/tests/libntp/Makefile.am b/contrib/ntp/tests/libntp/Makefile.am
index 288d38c79b7b..7bfe9eea8859 100644
--- a/contrib/ntp/tests/libntp/Makefile.am
+++ b/contrib/ntp/tests/libntp/Makefile.am
@@ -2,9 +2,12 @@ NULL =
BUILT_SOURCES =
CLEANFILES =
+std_unity_list = \
+ $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \
+ $(NULL)
+
run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
-#removed test-libntp
check_PROGRAMS = \
test-a_md5encrypt \
test-atoint \
@@ -46,84 +49,25 @@ check_PROGRAMS = \
test-ymd2yd \
$(NULL)
-if GTEST_AVAILABLE
-check_PROGRAMS += tests
-else
-EXTRA_PROGRAMS = tests
-endif
-
LDADD = \
$(top_builddir)/libntp/libntp.a \
$(LDADD_LIBNTP) \
$(PTHREAD_LIBS) \
$(LDADD_NTP) \
$(LIBM) \
- $(NULL)
-
-tests_LDADD = \
- $(LDADD) \
- $(GTEST_LDFLAGS) \
- $(GTEST_LIBS) \
- $(NULL)
-
-unity_tests_LDADD = \
- $(LDADD) \
$(top_builddir)/sntp/unity/libunity.a \
$(NULL)
AM_CFLAGS = $(CFLAGS_NTP)
-AM_CXXFLAGS = $(GTEST_CXXFLAGS)
AM_CPPFLAGS = $(NTP_INCS)
AM_CPPFLAGS += -I$(top_srcdir)/sntp
-AM_CPPFLAGS += $(GTEST_CPPFLAGS)
AM_CPPFLAGS += $(CPPFLAGS_NTP)
+AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H
+AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
-tests_SOURCES = \
- $(top_srcdir)/sntp/tests_main.cpp \
- g_libntptest.cpp \
- g_a_md5encrypt.cpp \
- g_atoint.cpp \
- g_atouint.cpp \
- g_authkeys.cpp \
- g_buftvtots.cpp \
- g_calendar.cpp \
- g_caljulian.cpp \
- g_caltontp.cpp \
- g_calyearstart.cpp \
- g_clocktime.cpp \
- g_decodenetnum.cpp \
- g_hextoint.cpp \
- g_hextolfp.cpp \
- g_humandate.cpp \
- g_lfpfunc.cpp \
- g_lfptostr.cpp \
- g_modetoa.cpp \
- g_msyslog.cpp \
- g_netof.cpp \
- g_numtoa.cpp \
- g_numtohost.cpp \
- g_octtoint.cpp \
- g_prettydate.cpp \
- g_recvbuff.cpp \
- g_refnumtoa.cpp \
- g_sfptostr.cpp \
- g_socktoa.cpp \
- g_ssl_init.cpp \
- g_statestr.cpp \
- g_strtolfp.cpp \
- g_timespecops.cpp \
- g_timestructs.cpp \
- g_timevalops.cpp \
- g_tstotv.cpp \
- g_tvtots.cpp \
- g_uglydate.cpp \
- g_vi64ops.cpp \
- g_ymd2yd.cpp \
- $(NULL)
-
BUILT_SOURCES += \
$(srcdir)/run-a_md5encrypt.c \
$(srcdir)/run-atoint.c \
@@ -166,28 +110,16 @@ BUILT_SOURCES += \
$(NULL)
noinst_HEADERS = \
- g_lfptest.h \
lfptest.h \
- g_libntptest.h \
- g_sockaddrtest.h \
sockaddrtest.h \
- g_timestructs.h \
test-libntp.h \
$(NULL)
###
-test_a_md5encrypt_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_a_md5encrypt_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_a_md5encrypt_SOURCES = \
- a_md5encrypt.c \
- run-a_md5encrypt.c \
+test_a_md5encrypt_SOURCES = \
+ a_md5encrypt.c \
+ run-a_md5encrypt.c \
$(NULL)
$(srcdir)/run-a_md5encrypt.c: $(srcdir)/a_md5encrypt.c $(std_unity_list)
@@ -195,17 +127,9 @@ $(srcdir)/run-a_md5encrypt.c: $(srcdir)/a_md5encrypt.c $(std_unity_list)
###
-test_atoint_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_atoint_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_atoint_SOURCES = \
- atoint.c \
- run-atoint.c \
+test_atoint_SOURCES = \
+ atoint.c \
+ run-atoint.c \
$(NULL)
$(srcdir)/run-atoint.c: $(srcdir)/atoint.c $(std_unity_list)
@@ -213,17 +137,9 @@ $(srcdir)/run-atoint.c: $(srcdir)/atoint.c $(std_unity_list)
###
-test_atouint_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_atouint_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_atouint_SOURCES = \
- atouint.c \
- run-atouint.c \
+test_atouint_SOURCES = \
+ atouint.c \
+ run-atouint.c \
$(NULL)
$(srcdir)/run-atouint.c: $(srcdir)/atouint.c $(std_unity_list)
@@ -231,17 +147,9 @@ $(srcdir)/run-atouint.c: $(srcdir)/atouint.c $(std_unity_list)
###
-test_authkeys_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_authkeys_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_authkeys_SOURCES = \
- authkeys.c \
- run-authkeys.c \
+test_authkeys_SOURCES = \
+ authkeys.c \
+ run-authkeys.c \
$(NULL)
$(srcdir)/run-authkeys.c: $(srcdir)/authkeys.c $(std_unity_list)
@@ -249,18 +157,10 @@ $(srcdir)/run-authkeys.c: $(srcdir)/authkeys.c $(std_unity_list)
###
-test_buftvtots_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_buftvtots_SOURCES = \
- buftvtots.c \
- run-buftvtots.c \
- $(NULL)
-
-test_buftvtots_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- -DUNITY_INCLUDE_DOUBLE \
+test_buftvtots_SOURCES = \
+ buftvtots.c \
+ run-buftvtots.c \
+ lfptest.c \
$(NULL)
$(srcdir)/run-buftvtots.c: $(srcdir)/buftvtots.c $(std_unity_list)
@@ -268,18 +168,10 @@ $(srcdir)/run-buftvtots.c: $(srcdir)/buftvtots.c $(std_unity_list)
###
-test_calendar_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_calendar_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_calendar_SOURCES = \
- calendar.c \
- run-calendar.c \
- test-libntp.c \
+test_calendar_SOURCES = \
+ calendar.c \
+ run-calendar.c \
+ test-libntp.c \
$(NULL)
$(srcdir)/run-calendar.c: $(srcdir)/calendar.c $(std_unity_list)
@@ -287,18 +179,14 @@ $(srcdir)/run-calendar.c: $(srcdir)/calendar.c $(std_unity_list)
###
-test_caltontp_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
+test_caltontp_CFLAGS = \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
$(NULL)
-test_caltontp_LDADD = \
- $(unity_tests_LDADD) \
- -lpthread \
- $(NULL)
-
-test_caltontp_SOURCES = \
- caltontp.c \
- run-caltontp.c \
+test_caltontp_SOURCES = \
+ caltontp.c \
+ run-caltontp.c \
$(NULL)
$(srcdir)/run-caltontp.c: $(srcdir)/caltontp.c $(std_unity_list)
@@ -306,19 +194,15 @@ $(srcdir)/run-caltontp.c: $(srcdir)/caltontp.c $(std_unity_list)
###
-test_caljulian_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_caljulian_LDADD = \
- $(unity_tests_LDADD) \
- -lpthread \
+test_caljulian_CFLAGS = \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
$(NULL)
-test_caljulian_SOURCES = \
- caljulian.c \
- run-caljulian.c \
- test-libntp.c \
+test_caljulian_SOURCES = \
+ caljulian.c \
+ run-caljulian.c \
+ test-libntp.c \
$(NULL)
$(srcdir)/run-caljulian.c: $(srcdir)/caljulian.c $(std_unity_list)
@@ -326,18 +210,10 @@ $(srcdir)/run-caljulian.c: $(srcdir)/caljulian.c $(std_unity_list)
###
-test_calyearstart_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_calyearstart_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_calyearstart_SOURCES = \
- calyearstart.c \
- run-calyearstart.c \
- test-libntp.c \
+test_calyearstart_SOURCES = \
+ calyearstart.c \
+ run-calyearstart.c \
+ test-libntp.c \
$(NULL)
$(srcdir)/run-calyearstart.c: $(srcdir)/calyearstart.c $(std_unity_list)
@@ -345,18 +221,10 @@ $(srcdir)/run-calyearstart.c: $(srcdir)/calyearstart.c $(std_unity_list)
###
-test_clocktime_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_clocktime_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_clocktime_SOURCES = \
- clocktime.c \
- run-clocktime.c \
- test-libntp.c \
+test_clocktime_SOURCES = \
+ clocktime.c \
+ run-clocktime.c \
+ test-libntp.c \
$(NULL)
$(srcdir)/run-clocktime.c: $(srcdir)/clocktime.c $(std_unity_list)
@@ -364,18 +232,15 @@ $(srcdir)/run-clocktime.c: $(srcdir)/clocktime.c $(std_unity_list)
###
-test_decodenetnum_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
+test_decodenetnum_CFLAGS = \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
$(NULL)
-test_decodenetnum_LDADD = \
- $(unity_tests_LDADD) \
- -lpthread \
- $(NULL)
-
-test_decodenetnum_SOURCES = \
- decodenetnum.c \
- run-decodenetnum.c \
+test_decodenetnum_SOURCES = \
+ decodenetnum.c \
+ run-decodenetnum.c \
+ sockaddrtest.c \
$(NULL)
$(srcdir)/run-decodenetnum.c: $(srcdir)/decodenetnum.c $(std_unity_list)
@@ -383,17 +248,9 @@ $(srcdir)/run-decodenetnum.c: $(srcdir)/decodenetnum.c $(std_unity_list)
###
-test_hextoint_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_hextoint_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_hextoint_SOURCES = \
- hextoint.c \
- run-hextoint.c \
+test_hextoint_SOURCES = \
+ hextoint.c \
+ run-hextoint.c \
$(NULL)
$(srcdir)/run-hextoint.c: $(srcdir)/hextoint.c $(std_unity_list)
@@ -401,17 +258,10 @@ $(srcdir)/run-hextoint.c: $(srcdir)/hextoint.c $(std_unity_list)
###
-test_hextolfp_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_hextolfp_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_hextolfp_SOURCES = \
- hextolfp.c \
- run-hextolfp.c \
+test_hextolfp_SOURCES = \
+ hextolfp.c \
+ run-hextolfp.c \
+ lfptest.c \
$(NULL)
$(srcdir)/run-hextolfp.c: $(srcdir)/hextolfp.c $(std_unity_list)
@@ -419,17 +269,9 @@ $(srcdir)/run-hextolfp.c: $(srcdir)/hextolfp.c $(std_unity_list)
###
-test_humandate_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_humandate_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_humandate_SOURCES = \
- humandate.c \
- run-humandate.c \
+test_humandate_SOURCES = \
+ humandate.c \
+ run-humandate.c \
$(NULL)
$(srcdir)/run-humandate.c: $(srcdir)/humandate.c $(std_unity_list)
@@ -437,18 +279,9 @@ $(srcdir)/run-humandate.c: $(srcdir)/humandate.c $(std_unity_list)
###
-test_lfpfunc_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- -DUNITY_INCLUDE_DOUBLE \
- $(NULL)
-
-test_lfpfunc_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_lfpfunc_SOURCES = \
- lfpfunc.c \
- run-lfpfunc.c \
+test_lfpfunc_SOURCES = \
+ lfpfunc.c \
+ run-lfpfunc.c \
$(NULL)
$(srcdir)/run-lfpfunc.c: $(srcdir)/lfpfunc.c $(std_unity_list)
@@ -456,17 +289,9 @@ $(srcdir)/run-lfpfunc.c: $(srcdir)/lfpfunc.c $(std_unity_list)
###
-test_lfptostr_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_lfptostr_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_lfptostr_SOURCES = \
- lfptostr.c \
- run-lfptostr.c \
+test_lfptostr_SOURCES = \
+ lfptostr.c \
+ run-lfptostr.c \
$(NULL)
$(srcdir)/run-lfptostr.c: $(srcdir)/lfptostr.c $(std_unity_list)
@@ -474,17 +299,9 @@ $(srcdir)/run-lfptostr.c: $(srcdir)/lfptostr.c $(std_unity_list)
###
-test_modetoa_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_modetoa_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_modetoa_SOURCES = \
- modetoa.c \
- run-modetoa.c \
+test_modetoa_SOURCES = \
+ modetoa.c \
+ run-modetoa.c \
$(NULL)
$(srcdir)/run-modetoa.c: $(srcdir)/modetoa.c $(std_unity_list)
@@ -492,17 +309,9 @@ $(srcdir)/run-modetoa.c: $(srcdir)/modetoa.c $(std_unity_list)
###
-test_msyslog_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_msyslog_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_msyslog_SOURCES = \
- msyslog.c \
- run-msyslog.c \
+test_msyslog_SOURCES = \
+ msyslog.c \
+ run-msyslog.c \
$(NULL)
$(srcdir)/run-msyslog.c: $(srcdir)/msyslog.c $(std_unity_list)
@@ -510,17 +319,10 @@ $(srcdir)/run-msyslog.c: $(srcdir)/msyslog.c $(std_unity_list)
###
-test_netof_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_netof_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_netof_SOURCES = \
- netof.c \
- run-netof.c \
+test_netof_SOURCES = \
+ netof.c \
+ run-netof.c \
+ sockaddrtest.c \
$(NULL)
$(srcdir)/run-netof.c: $(srcdir)/netof.c $(std_unity_list)
@@ -528,17 +330,9 @@ $(srcdir)/run-netof.c: $(srcdir)/netof.c $(std_unity_list)
###
-test_numtoa_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_numtoa_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_numtoa_SOURCES = \
- numtoa.c \
- run-numtoa.c \
+test_numtoa_SOURCES = \
+ numtoa.c \
+ run-numtoa.c \
$(NULL)
$(srcdir)/run-numtoa.c: $(srcdir)/numtoa.c $(std_unity_list)
@@ -546,17 +340,9 @@ $(srcdir)/run-numtoa.c: $(srcdir)/numtoa.c $(std_unity_list)
###
-test_numtohost_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_numtohost_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_numtohost_SOURCES = \
- numtohost.c \
- run-numtohost.c \
+test_numtohost_SOURCES = \
+ numtohost.c \
+ run-numtohost.c \
$(NULL)
$(srcdir)/run-numtohost.c: $(srcdir)/numtohost.c $(std_unity_list)
@@ -564,17 +350,9 @@ $(srcdir)/run-numtohost.c: $(srcdir)/numtohost.c $(std_unity_list)
###
-test_octtoint_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_octtoint_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_octtoint_SOURCES = \
- octtoint.c \
- run-octtoint.c \
+test_octtoint_SOURCES = \
+ octtoint.c \
+ run-octtoint.c \
$(NULL)
$(srcdir)/run-octtoint.c: $(srcdir)/octtoint.c $(std_unity_list)
@@ -582,17 +360,9 @@ $(srcdir)/run-octtoint.c: $(srcdir)/octtoint.c $(std_unity_list)
###
-test_prettydate_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_prettydate_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_prettydate_SOURCES = \
- prettydate.c \
- run-prettydate.c \
+test_prettydate_SOURCES = \
+ prettydate.c \
+ run-prettydate.c \
$(NULL)
$(srcdir)/run-prettydate.c: $(srcdir)/prettydate.c $(std_unity_list)
@@ -600,17 +370,9 @@ $(srcdir)/run-prettydate.c: $(srcdir)/prettydate.c $(std_unity_list)
###
-test_recvbuff_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_recvbuff_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_recvbuff_SOURCES = \
- recvbuff.c \
- run-recvbuff.c \
+test_recvbuff_SOURCES = \
+ recvbuff.c \
+ run-recvbuff.c \
$(NULL)
$(srcdir)/run-recvbuff.c: $(srcdir)/recvbuff.c $(std_unity_list)
@@ -618,17 +380,9 @@ $(srcdir)/run-recvbuff.c: $(srcdir)/recvbuff.c $(std_unity_list)
###
-test_refidsmear_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_refidsmear_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_refidsmear_SOURCES = \
- refidsmear.c \
- run-refidsmear.c \
+test_refidsmear_SOURCES = \
+ refidsmear.c \
+ run-refidsmear.c \
$(NULL)
$(srcdir)/run-refidsmear.c: $(srcdir)/refidsmear.c $(std_unity_list)
@@ -636,17 +390,9 @@ $(srcdir)/run-refidsmear.c: $(srcdir)/refidsmear.c $(std_unity_list)
###
-test_refnumtoa_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_refnumtoa_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_refnumtoa_SOURCES = \
- refnumtoa.c \
- run-refnumtoa.c \
+test_refnumtoa_SOURCES = \
+ refnumtoa.c \
+ run-refnumtoa.c \
$(NULL)
$(srcdir)/run-refnumtoa.c: $(srcdir)/refnumtoa.c $(std_unity_list)
@@ -654,18 +400,9 @@ $(srcdir)/run-refnumtoa.c: $(srcdir)/refnumtoa.c $(std_unity_list)
###
-test_sfptostr_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- -DUNITY_INCLUDE_DOUBLE \
- $(NULL)
-
-test_sfptostr_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_sfptostr_SOURCES = \
- sfptostr.c \
- run-sfptostr.c \
+test_sfptostr_SOURCES = \
+ sfptostr.c \
+ run-sfptostr.c \
$(NULL)
$(srcdir)/run-sfptostr.c: $(srcdir)/sfptostr.c $(std_unity_list)
@@ -673,17 +410,10 @@ $(srcdir)/run-sfptostr.c: $(srcdir)/sfptostr.c $(std_unity_list)
###
-test_socktoa_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_socktoa_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_socktoa_SOURCES = \
- socktoa.c \
- run-socktoa.c \
+test_socktoa_SOURCES = \
+ socktoa.c \
+ run-socktoa.c \
+ sockaddrtest.c \
$(NULL)
$(srcdir)/run-socktoa.c: $(srcdir)/socktoa.c $(std_unity_list)
@@ -691,17 +421,9 @@ $(srcdir)/run-socktoa.c: $(srcdir)/socktoa.c $(std_unity_list)
###
-test_ssl_init_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_ssl_init_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_ssl_init_SOURCES = \
- ssl_init.c \
- run-ssl_init.c \
+test_ssl_init_SOURCES = \
+ ssl_init.c \
+ run-ssl_init.c \
$(NULL)
$(srcdir)/run-ssl_init.c: $(srcdir)/ssl_init.c $(std_unity_list)
@@ -709,17 +431,9 @@ $(srcdir)/run-ssl_init.c: $(srcdir)/ssl_init.c $(std_unity_list)
###
-test_statestr_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_statestr_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_statestr_SOURCES = \
- statestr.c \
- run-statestr.c \
+test_statestr_SOURCES = \
+ statestr.c \
+ run-statestr.c \
$(NULL)
$(srcdir)/run-statestr.c: $(srcdir)/statestr.c $(std_unity_list)
@@ -727,18 +441,15 @@ $(srcdir)/run-statestr.c: $(srcdir)/statestr.c $(std_unity_list)
###
-test_strtolfp_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_strtolfp_LDADD = \
- $(unity_tests_LDADD) \
- -lpthread \
+test_strtolfp_CFLAGS = \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
$(NULL)
-test_strtolfp_SOURCES = \
- strtolfp.c \
- run-strtolfp.c \
+test_strtolfp_SOURCES = \
+ strtolfp.c \
+ run-strtolfp.c \
+ lfptest.c \
$(NULL)
$(srcdir)/run-strtolfp.c: $(srcdir)/strtolfp.c $(std_unity_list)
@@ -746,17 +457,9 @@ $(srcdir)/run-strtolfp.c: $(srcdir)/strtolfp.c $(std_unity_list)
###
-test_timespecops_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_timespecops_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_timespecops_SOURCES = \
- timespecops.c \
- run-timespecops.c \
+test_timespecops_SOURCES = \
+ timespecops.c \
+ run-timespecops.c \
$(NULL)
$(srcdir)/run-timespecops.c: $(srcdir)/timespecops.c $(std_unity_list)
@@ -764,17 +467,9 @@ $(srcdir)/run-timespecops.c: $(srcdir)/timespecops.c $(std_unity_list)
###
-test_timevalops_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_timevalops_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_timevalops_SOURCES = \
- timevalops.c \
- run-timevalops.c \
+test_timevalops_SOURCES = \
+ timevalops.c \
+ run-timevalops.c \
$(NULL)
$(srcdir)/run-timevalops.c: $(srcdir)/timevalops.c $(std_unity_list)
@@ -782,17 +477,9 @@ $(srcdir)/run-timevalops.c: $(srcdir)/timevalops.c $(std_unity_list)
###
-test_tstotv_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_tstotv_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_tstotv_SOURCES = \
- tstotv.c \
- run-tstotv.c \
+test_tstotv_SOURCES = \
+ tstotv.c \
+ run-tstotv.c \
$(NULL)
$(srcdir)/run-tstotv.c: $(srcdir)/tstotv.c $(std_unity_list)
@@ -800,18 +487,10 @@ $(srcdir)/run-tstotv.c: $(srcdir)/tstotv.c $(std_unity_list)
###
-test_tvtots_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- -DUNITY_INCLUDE_DOUBLE \
- $(NULL)
-
-test_tvtots_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_tvtots_SOURCES = \
- tvtots.c \
- run-tvtots.c \
+test_tvtots_SOURCES = \
+ tvtots.c \
+ run-tvtots.c \
+ lfptest.c \
$(NULL)
$(srcdir)/run-tvtots.c: $(srcdir)/tvtots.c $(std_unity_list)
@@ -819,17 +498,9 @@ $(srcdir)/run-tvtots.c: $(srcdir)/tvtots.c $(std_unity_list)
###
-test_uglydate_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_uglydate_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_uglydate_SOURCES = \
- uglydate.c \
- run-uglydate.c \
+test_uglydate_SOURCES = \
+ uglydate.c \
+ run-uglydate.c \
$(NULL)
$(srcdir)/run-uglydate.c: $(srcdir)/uglydate.c $(std_unity_list)
@@ -837,17 +508,9 @@ $(srcdir)/run-uglydate.c: $(srcdir)/uglydate.c $(std_unity_list)
###
-test_vi64ops_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_vi64ops_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_vi64ops_SOURCES = \
- vi64ops.c \
- run-vi64ops.c \
+test_vi64ops_SOURCES = \
+ vi64ops.c \
+ run-vi64ops.c \
$(NULL)
$(srcdir)/run-vi64ops.c: $(srcdir)/vi64ops.c $(std_unity_list)
@@ -855,17 +518,9 @@ $(srcdir)/run-vi64ops.c: $(srcdir)/vi64ops.c $(std_unity_list)
###
-test_ymd2yd_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_ymd2yd_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
-test_ymd2yd_SOURCES = \
- ymd2yd.c \
- run-ymd2yd.c \
+test_ymd2yd_SOURCES = \
+ ymd2yd.c \
+ run-ymd2yd.c \
$(NULL)
$(srcdir)/run-ymd2yd.c: $(srcdir)/ymd2yd.c $(std_unity_list)
diff --git a/contrib/ntp/tests/libntp/Makefile.in b/contrib/ntp/tests/libntp/Makefile.in
index e0f9222f4fff..32e884bda194 100644
--- a/contrib/ntp/tests/libntp/Makefile.in
+++ b/contrib/ntp/tests/libntp/Makefile.in
@@ -106,11 +106,8 @@ check_PROGRAMS = test-a_md5encrypt$(EXEEXT) test-atoint$(EXEEXT) \
test-strtolfp$(EXEEXT) test-timespecops$(EXEEXT) \
test-timevalops$(EXEEXT) test-tstotv$(EXEEXT) \
test-tvtots$(EXEEXT) test-uglydate$(EXEEXT) \
- test-vi64ops$(EXEEXT) test-ymd2yd$(EXEEXT) $(am__EXEEXT_1) \
- $(am__EXEEXT_2)
-@GTEST_AVAILABLE_TRUE@am__append_1 = tests
-@GTEST_AVAILABLE_FALSE@EXTRA_PROGRAMS = tests$(EXEEXT)
-@NTP_CROSSCOMPILE_FALSE@am__append_2 = $(check_PROGRAMS)
+ test-vi64ops$(EXEEXT) test-ymd2yd$(EXEEXT) $(am__EXEEXT_1)
+@NTP_CROSSCOMPILE_FALSE@am__append_1 = $(check_PROGRAMS)
subdir = tests/libntp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -139,6 +136,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -159,76 +157,69 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__EXEEXT_1 =
-@GTEST_AVAILABLE_TRUE@am__EXEEXT_2 = tests$(EXEEXT)
am__objects_1 =
-am_test_a_md5encrypt_OBJECTS = \
- test_a_md5encrypt-a_md5encrypt.$(OBJEXT) \
- test_a_md5encrypt-run-a_md5encrypt.$(OBJEXT) $(am__objects_1)
+am_test_a_md5encrypt_OBJECTS = a_md5encrypt.$(OBJEXT) \
+ run-a_md5encrypt.$(OBJEXT) $(am__objects_1)
test_a_md5encrypt_OBJECTS = $(am_test_a_md5encrypt_OBJECTS)
+test_a_md5encrypt_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = $(top_builddir)/libntp/libntp.a \
+test_a_md5encrypt_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) \
$(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
-test_a_md5encrypt_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-test_a_md5encrypt_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_a_md5encrypt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_test_atoint_OBJECTS = test_atoint-atoint.$(OBJEXT) \
- test_atoint-run-atoint.$(OBJEXT) $(am__objects_1)
+am_test_atoint_OBJECTS = atoint.$(OBJEXT) run-atoint.$(OBJEXT) \
+ $(am__objects_1)
test_atoint_OBJECTS = $(am_test_atoint_OBJECTS)
-test_atoint_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-test_atoint_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_atoint_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_atouint_OBJECTS = test_atouint-atouint.$(OBJEXT) \
- test_atouint-run-atouint.$(OBJEXT) $(am__objects_1)
+test_atoint_LDADD = $(LDADD)
+test_atoint_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_atouint_OBJECTS = atouint.$(OBJEXT) run-atouint.$(OBJEXT) \
+ $(am__objects_1)
test_atouint_OBJECTS = $(am_test_atouint_OBJECTS)
-test_atouint_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_atouint_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_atouint_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_authkeys_OBJECTS = test_authkeys-authkeys.$(OBJEXT) \
- test_authkeys-run-authkeys.$(OBJEXT) $(am__objects_1)
+test_atouint_LDADD = $(LDADD)
+test_atouint_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_authkeys_OBJECTS = authkeys.$(OBJEXT) run-authkeys.$(OBJEXT) \
+ $(am__objects_1)
test_authkeys_OBJECTS = $(am_test_authkeys_OBJECTS)
-test_authkeys_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_authkeys_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_authkeys_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_buftvtots_OBJECTS = test_buftvtots-buftvtots.$(OBJEXT) \
- test_buftvtots-run-buftvtots.$(OBJEXT) $(am__objects_1)
+test_authkeys_LDADD = $(LDADD)
+test_authkeys_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_buftvtots_OBJECTS = buftvtots.$(OBJEXT) \
+ run-buftvtots.$(OBJEXT) lfptest.$(OBJEXT) $(am__objects_1)
test_buftvtots_OBJECTS = $(am_test_buftvtots_OBJECTS)
-test_buftvtots_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_buftvtots_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_buftvtots_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
- $@
-am_test_calendar_OBJECTS = test_calendar-calendar.$(OBJEXT) \
- test_calendar-run-calendar.$(OBJEXT) \
- test_calendar-test-libntp.$(OBJEXT) $(am__objects_1)
+test_buftvtots_LDADD = $(LDADD)
+test_buftvtots_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_calendar_OBJECTS = calendar.$(OBJEXT) run-calendar.$(OBJEXT) \
+ test-libntp.$(OBJEXT) $(am__objects_1)
test_calendar_OBJECTS = $(am_test_calendar_OBJECTS)
-test_calendar_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_calendar_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_calendar_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+test_calendar_LDADD = $(LDADD)
+test_calendar_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
am_test_caljulian_OBJECTS = test_caljulian-caljulian.$(OBJEXT) \
test_caljulian-run-caljulian.$(OBJEXT) \
test_caljulian-test-libntp.$(OBJEXT) $(am__objects_1)
test_caljulian_OBJECTS = $(am_test_caljulian_OBJECTS)
-test_caljulian_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
+test_caljulian_LDADD = $(LDADD)
+test_caljulian_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
test_caljulian_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(test_caljulian_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
@@ -236,280 +227,265 @@ test_caljulian_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
am_test_caltontp_OBJECTS = test_caltontp-caltontp.$(OBJEXT) \
test_caltontp-run-caltontp.$(OBJEXT) $(am__objects_1)
test_caltontp_OBJECTS = $(am_test_caltontp_OBJECTS)
-test_caltontp_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
+test_caltontp_LDADD = $(LDADD)
+test_caltontp_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
test_caltontp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_caltontp_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_calyearstart_OBJECTS = \
- test_calyearstart-calyearstart.$(OBJEXT) \
- test_calyearstart-run-calyearstart.$(OBJEXT) \
- test_calyearstart-test-libntp.$(OBJEXT) $(am__objects_1)
+am_test_calyearstart_OBJECTS = calyearstart.$(OBJEXT) \
+ run-calyearstart.$(OBJEXT) test-libntp.$(OBJEXT) \
+ $(am__objects_1)
test_calyearstart_OBJECTS = $(am_test_calyearstart_OBJECTS)
-test_calyearstart_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_calyearstart_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_calyearstart_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_test_clocktime_OBJECTS = test_clocktime-clocktime.$(OBJEXT) \
- test_clocktime-run-clocktime.$(OBJEXT) \
- test_clocktime-test-libntp.$(OBJEXT) $(am__objects_1)
+test_calyearstart_LDADD = $(LDADD)
+test_calyearstart_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_clocktime_OBJECTS = clocktime.$(OBJEXT) \
+ run-clocktime.$(OBJEXT) test-libntp.$(OBJEXT) $(am__objects_1)
test_clocktime_OBJECTS = $(am_test_clocktime_OBJECTS)
-test_clocktime_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_clocktime_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_clocktime_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
- $@
+test_clocktime_LDADD = $(LDADD)
+test_clocktime_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
am_test_decodenetnum_OBJECTS = \
test_decodenetnum-decodenetnum.$(OBJEXT) \
- test_decodenetnum-run-decodenetnum.$(OBJEXT) $(am__objects_1)
+ test_decodenetnum-run-decodenetnum.$(OBJEXT) \
+ test_decodenetnum-sockaddrtest.$(OBJEXT) $(am__objects_1)
test_decodenetnum_OBJECTS = $(am_test_decodenetnum_OBJECTS)
-test_decodenetnum_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
+test_decodenetnum_LDADD = $(LDADD)
+test_decodenetnum_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
test_decodenetnum_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(test_decodenetnum_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
-am_test_hextoint_OBJECTS = test_hextoint-hextoint.$(OBJEXT) \
- test_hextoint-run-hextoint.$(OBJEXT) $(am__objects_1)
+am_test_hextoint_OBJECTS = hextoint.$(OBJEXT) run-hextoint.$(OBJEXT) \
+ $(am__objects_1)
test_hextoint_OBJECTS = $(am_test_hextoint_OBJECTS)
-test_hextoint_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_hextoint_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_hextoint_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_hextolfp_OBJECTS = test_hextolfp-hextolfp.$(OBJEXT) \
- test_hextolfp-run-hextolfp.$(OBJEXT) $(am__objects_1)
+test_hextoint_LDADD = $(LDADD)
+test_hextoint_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_hextolfp_OBJECTS = hextolfp.$(OBJEXT) run-hextolfp.$(OBJEXT) \
+ lfptest.$(OBJEXT) $(am__objects_1)
test_hextolfp_OBJECTS = $(am_test_hextolfp_OBJECTS)
-test_hextolfp_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_hextolfp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_hextolfp_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_humandate_OBJECTS = test_humandate-humandate.$(OBJEXT) \
- test_humandate-run-humandate.$(OBJEXT) $(am__objects_1)
+test_hextolfp_LDADD = $(LDADD)
+test_hextolfp_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_humandate_OBJECTS = humandate.$(OBJEXT) \
+ run-humandate.$(OBJEXT) $(am__objects_1)
test_humandate_OBJECTS = $(am_test_humandate_OBJECTS)
-test_humandate_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_humandate_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_humandate_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
- $@
-am_test_lfpfunc_OBJECTS = test_lfpfunc-lfpfunc.$(OBJEXT) \
- test_lfpfunc-run-lfpfunc.$(OBJEXT) $(am__objects_1)
+test_humandate_LDADD = $(LDADD)
+test_humandate_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_lfpfunc_OBJECTS = lfpfunc.$(OBJEXT) run-lfpfunc.$(OBJEXT) \
+ $(am__objects_1)
test_lfpfunc_OBJECTS = $(am_test_lfpfunc_OBJECTS)
-test_lfpfunc_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_lfpfunc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_lfpfunc_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_lfptostr_OBJECTS = test_lfptostr-lfptostr.$(OBJEXT) \
- test_lfptostr-run-lfptostr.$(OBJEXT) $(am__objects_1)
+test_lfpfunc_LDADD = $(LDADD)
+test_lfpfunc_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_lfptostr_OBJECTS = lfptostr.$(OBJEXT) run-lfptostr.$(OBJEXT) \
+ $(am__objects_1)
test_lfptostr_OBJECTS = $(am_test_lfptostr_OBJECTS)
-test_lfptostr_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_lfptostr_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_lfptostr_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_modetoa_OBJECTS = test_modetoa-modetoa.$(OBJEXT) \
- test_modetoa-run-modetoa.$(OBJEXT) $(am__objects_1)
+test_lfptostr_LDADD = $(LDADD)
+test_lfptostr_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_modetoa_OBJECTS = modetoa.$(OBJEXT) run-modetoa.$(OBJEXT) \
+ $(am__objects_1)
test_modetoa_OBJECTS = $(am_test_modetoa_OBJECTS)
-test_modetoa_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_modetoa_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_modetoa_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_msyslog_OBJECTS = test_msyslog-msyslog.$(OBJEXT) \
- test_msyslog-run-msyslog.$(OBJEXT) $(am__objects_1)
+test_modetoa_LDADD = $(LDADD)
+test_modetoa_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_msyslog_OBJECTS = msyslog.$(OBJEXT) run-msyslog.$(OBJEXT) \
+ $(am__objects_1)
test_msyslog_OBJECTS = $(am_test_msyslog_OBJECTS)
-test_msyslog_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_msyslog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_msyslog_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_netof_OBJECTS = test_netof-netof.$(OBJEXT) \
- test_netof-run-netof.$(OBJEXT) $(am__objects_1)
+test_msyslog_LDADD = $(LDADD)
+test_msyslog_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_netof_OBJECTS = netof.$(OBJEXT) run-netof.$(OBJEXT) \
+ sockaddrtest.$(OBJEXT) $(am__objects_1)
test_netof_OBJECTS = $(am_test_netof_OBJECTS)
-test_netof_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-test_netof_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_netof_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_numtoa_OBJECTS = test_numtoa-numtoa.$(OBJEXT) \
- test_numtoa-run-numtoa.$(OBJEXT) $(am__objects_1)
+test_netof_LDADD = $(LDADD)
+test_netof_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_numtoa_OBJECTS = numtoa.$(OBJEXT) run-numtoa.$(OBJEXT) \
+ $(am__objects_1)
test_numtoa_OBJECTS = $(am_test_numtoa_OBJECTS)
-test_numtoa_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-test_numtoa_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_numtoa_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_numtohost_OBJECTS = test_numtohost-numtohost.$(OBJEXT) \
- test_numtohost-run-numtohost.$(OBJEXT) $(am__objects_1)
+test_numtoa_LDADD = $(LDADD)
+test_numtoa_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_numtohost_OBJECTS = numtohost.$(OBJEXT) \
+ run-numtohost.$(OBJEXT) $(am__objects_1)
test_numtohost_OBJECTS = $(am_test_numtohost_OBJECTS)
-test_numtohost_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_numtohost_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_numtohost_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
- $@
-am_test_octtoint_OBJECTS = test_octtoint-octtoint.$(OBJEXT) \
- test_octtoint-run-octtoint.$(OBJEXT) $(am__objects_1)
+test_numtohost_LDADD = $(LDADD)
+test_numtohost_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_octtoint_OBJECTS = octtoint.$(OBJEXT) run-octtoint.$(OBJEXT) \
+ $(am__objects_1)
test_octtoint_OBJECTS = $(am_test_octtoint_OBJECTS)
-test_octtoint_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_octtoint_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_octtoint_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_prettydate_OBJECTS = test_prettydate-prettydate.$(OBJEXT) \
- test_prettydate-run-prettydate.$(OBJEXT) $(am__objects_1)
+test_octtoint_LDADD = $(LDADD)
+test_octtoint_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_prettydate_OBJECTS = prettydate.$(OBJEXT) \
+ run-prettydate.$(OBJEXT) $(am__objects_1)
test_prettydate_OBJECTS = $(am_test_prettydate_OBJECTS)
-test_prettydate_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_prettydate_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_prettydate_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_test_recvbuff_OBJECTS = test_recvbuff-recvbuff.$(OBJEXT) \
- test_recvbuff-run-recvbuff.$(OBJEXT) $(am__objects_1)
+test_prettydate_LDADD = $(LDADD)
+test_prettydate_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_recvbuff_OBJECTS = recvbuff.$(OBJEXT) run-recvbuff.$(OBJEXT) \
+ $(am__objects_1)
test_recvbuff_OBJECTS = $(am_test_recvbuff_OBJECTS)
-test_recvbuff_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_recvbuff_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_recvbuff_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_refidsmear_OBJECTS = test_refidsmear-refidsmear.$(OBJEXT) \
- test_refidsmear-run-refidsmear.$(OBJEXT) $(am__objects_1)
+test_recvbuff_LDADD = $(LDADD)
+test_recvbuff_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_refidsmear_OBJECTS = refidsmear.$(OBJEXT) \
+ run-refidsmear.$(OBJEXT) $(am__objects_1)
test_refidsmear_OBJECTS = $(am_test_refidsmear_OBJECTS)
-test_refidsmear_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_refidsmear_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_refidsmear_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_test_refnumtoa_OBJECTS = test_refnumtoa-refnumtoa.$(OBJEXT) \
- test_refnumtoa-run-refnumtoa.$(OBJEXT) $(am__objects_1)
+test_refidsmear_LDADD = $(LDADD)
+test_refidsmear_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_refnumtoa_OBJECTS = refnumtoa.$(OBJEXT) \
+ run-refnumtoa.$(OBJEXT) $(am__objects_1)
test_refnumtoa_OBJECTS = $(am_test_refnumtoa_OBJECTS)
-test_refnumtoa_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_refnumtoa_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_refnumtoa_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
- $@
-am_test_sfptostr_OBJECTS = test_sfptostr-sfptostr.$(OBJEXT) \
- test_sfptostr-run-sfptostr.$(OBJEXT) $(am__objects_1)
+test_refnumtoa_LDADD = $(LDADD)
+test_refnumtoa_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_sfptostr_OBJECTS = sfptostr.$(OBJEXT) run-sfptostr.$(OBJEXT) \
+ $(am__objects_1)
test_sfptostr_OBJECTS = $(am_test_sfptostr_OBJECTS)
-test_sfptostr_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_sfptostr_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_sfptostr_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_socktoa_OBJECTS = test_socktoa-socktoa.$(OBJEXT) \
- test_socktoa-run-socktoa.$(OBJEXT) $(am__objects_1)
+test_sfptostr_LDADD = $(LDADD)
+test_sfptostr_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_socktoa_OBJECTS = socktoa.$(OBJEXT) run-socktoa.$(OBJEXT) \
+ sockaddrtest.$(OBJEXT) $(am__objects_1)
test_socktoa_OBJECTS = $(am_test_socktoa_OBJECTS)
-test_socktoa_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_socktoa_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_socktoa_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_ssl_init_OBJECTS = test_ssl_init-ssl_init.$(OBJEXT) \
- test_ssl_init-run-ssl_init.$(OBJEXT) $(am__objects_1)
+test_socktoa_LDADD = $(LDADD)
+test_socktoa_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_ssl_init_OBJECTS = ssl_init.$(OBJEXT) run-ssl_init.$(OBJEXT) \
+ $(am__objects_1)
test_ssl_init_OBJECTS = $(am_test_ssl_init_OBJECTS)
-test_ssl_init_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_ssl_init_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_ssl_init_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_statestr_OBJECTS = test_statestr-statestr.$(OBJEXT) \
- test_statestr-run-statestr.$(OBJEXT) $(am__objects_1)
+test_ssl_init_LDADD = $(LDADD)
+test_ssl_init_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_statestr_OBJECTS = statestr.$(OBJEXT) run-statestr.$(OBJEXT) \
+ $(am__objects_1)
test_statestr_OBJECTS = $(am_test_statestr_OBJECTS)
-test_statestr_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_statestr_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_statestr_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+test_statestr_LDADD = $(LDADD)
+test_statestr_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
am_test_strtolfp_OBJECTS = test_strtolfp-strtolfp.$(OBJEXT) \
- test_strtolfp-run-strtolfp.$(OBJEXT) $(am__objects_1)
+ test_strtolfp-run-strtolfp.$(OBJEXT) \
+ test_strtolfp-lfptest.$(OBJEXT) $(am__objects_1)
test_strtolfp_OBJECTS = $(am_test_strtolfp_OBJECTS)
-test_strtolfp_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
+test_strtolfp_LDADD = $(LDADD)
+test_strtolfp_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
test_strtolfp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_strtolfp_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_timespecops_OBJECTS = test_timespecops-timespecops.$(OBJEXT) \
- test_timespecops-run-timespecops.$(OBJEXT) $(am__objects_1)
+am_test_timespecops_OBJECTS = timespecops.$(OBJEXT) \
+ run-timespecops.$(OBJEXT) $(am__objects_1)
test_timespecops_OBJECTS = $(am_test_timespecops_OBJECTS)
-test_timespecops_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_timespecops_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_timespecops_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_test_timevalops_OBJECTS = test_timevalops-timevalops.$(OBJEXT) \
- test_timevalops-run-timevalops.$(OBJEXT) $(am__objects_1)
+test_timespecops_LDADD = $(LDADD)
+test_timespecops_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_timevalops_OBJECTS = timevalops.$(OBJEXT) \
+ run-timevalops.$(OBJEXT) $(am__objects_1)
test_timevalops_OBJECTS = $(am_test_timevalops_OBJECTS)
-test_timevalops_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_timevalops_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(test_timevalops_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_test_tstotv_OBJECTS = test_tstotv-tstotv.$(OBJEXT) \
- test_tstotv-run-tstotv.$(OBJEXT) $(am__objects_1)
+test_timevalops_LDADD = $(LDADD)
+test_timevalops_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_tstotv_OBJECTS = tstotv.$(OBJEXT) run-tstotv.$(OBJEXT) \
+ $(am__objects_1)
test_tstotv_OBJECTS = $(am_test_tstotv_OBJECTS)
-test_tstotv_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-test_tstotv_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_tstotv_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_tvtots_OBJECTS = test_tvtots-tvtots.$(OBJEXT) \
- test_tvtots-run-tvtots.$(OBJEXT) $(am__objects_1)
+test_tstotv_LDADD = $(LDADD)
+test_tstotv_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_tvtots_OBJECTS = tvtots.$(OBJEXT) run-tvtots.$(OBJEXT) \
+ lfptest.$(OBJEXT) $(am__objects_1)
test_tvtots_OBJECTS = $(am_test_tvtots_OBJECTS)
-test_tvtots_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-test_tvtots_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_tvtots_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_uglydate_OBJECTS = test_uglydate-uglydate.$(OBJEXT) \
- test_uglydate-run-uglydate.$(OBJEXT) $(am__objects_1)
+test_tvtots_LDADD = $(LDADD)
+test_tvtots_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_uglydate_OBJECTS = uglydate.$(OBJEXT) run-uglydate.$(OBJEXT) \
+ $(am__objects_1)
test_uglydate_OBJECTS = $(am_test_uglydate_OBJECTS)
-test_uglydate_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_uglydate_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_uglydate_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_vi64ops_OBJECTS = test_vi64ops-vi64ops.$(OBJEXT) \
- test_vi64ops-run-vi64ops.$(OBJEXT) $(am__objects_1)
+test_uglydate_LDADD = $(LDADD)
+test_uglydate_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_vi64ops_OBJECTS = vi64ops.$(OBJEXT) run-vi64ops.$(OBJEXT) \
+ $(am__objects_1)
test_vi64ops_OBJECTS = $(am_test_vi64ops_OBJECTS)
-test_vi64ops_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- $(am__DEPENDENCIES_1)
-test_vi64ops_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_vi64ops_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_test_ymd2yd_OBJECTS = test_ymd2yd-ymd2yd.$(OBJEXT) \
- test_ymd2yd-run-ymd2yd.$(OBJEXT) $(am__objects_1)
-test_ymd2yd_OBJECTS = $(am_test_ymd2yd_OBJECTS)
-test_ymd2yd_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-test_ymd2yd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_ymd2yd_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_tests_OBJECTS = tests_main.$(OBJEXT) g_libntptest.$(OBJEXT) \
- g_a_md5encrypt.$(OBJEXT) g_atoint.$(OBJEXT) \
- g_atouint.$(OBJEXT) g_authkeys.$(OBJEXT) g_buftvtots.$(OBJEXT) \
- g_calendar.$(OBJEXT) g_caljulian.$(OBJEXT) \
- g_caltontp.$(OBJEXT) g_calyearstart.$(OBJEXT) \
- g_clocktime.$(OBJEXT) g_decodenetnum.$(OBJEXT) \
- g_hextoint.$(OBJEXT) g_hextolfp.$(OBJEXT) \
- g_humandate.$(OBJEXT) g_lfpfunc.$(OBJEXT) g_lfptostr.$(OBJEXT) \
- g_modetoa.$(OBJEXT) g_msyslog.$(OBJEXT) g_netof.$(OBJEXT) \
- g_numtoa.$(OBJEXT) g_numtohost.$(OBJEXT) g_octtoint.$(OBJEXT) \
- g_prettydate.$(OBJEXT) g_recvbuff.$(OBJEXT) \
- g_refnumtoa.$(OBJEXT) g_sfptostr.$(OBJEXT) g_socktoa.$(OBJEXT) \
- g_ssl_init.$(OBJEXT) g_statestr.$(OBJEXT) g_strtolfp.$(OBJEXT) \
- g_timespecops.$(OBJEXT) g_timestructs.$(OBJEXT) \
- g_timevalops.$(OBJEXT) g_tstotv.$(OBJEXT) g_tvtots.$(OBJEXT) \
- g_uglydate.$(OBJEXT) g_vi64ops.$(OBJEXT) g_ymd2yd.$(OBJEXT) \
+test_vi64ops_LDADD = $(LDADD)
+test_vi64ops_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
+am_test_ymd2yd_OBJECTS = ymd2yd.$(OBJEXT) run-ymd2yd.$(OBJEXT) \
$(am__objects_1)
-tests_OBJECTS = $(am_tests_OBJECTS)
-tests_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_ymd2yd_OBJECTS = $(am_test_ymd2yd_OBJECTS)
+test_ymd2yd_LDADD = $(LDADD)
+test_ymd2yd_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -544,24 +520,6 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CXXFLAGS) $(CXXFLAGS)
-AM_V_CXX = $(am__v_CXX_@AM_V@)
-am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
-am__v_CXX_0 = @echo " CXX " $@;
-am__v_CXX_1 =
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
-am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-am__v_CXXLD_1 =
SOURCES = $(test_a_md5encrypt_SOURCES) $(test_atoint_SOURCES) \
$(test_atouint_SOURCES) $(test_authkeys_SOURCES) \
$(test_buftvtots_SOURCES) $(test_calendar_SOURCES) \
@@ -580,8 +538,7 @@ SOURCES = $(test_a_md5encrypt_SOURCES) $(test_atoint_SOURCES) \
$(test_strtolfp_SOURCES) $(test_timespecops_SOURCES) \
$(test_timevalops_SOURCES) $(test_tstotv_SOURCES) \
$(test_tvtots_SOURCES) $(test_uglydate_SOURCES) \
- $(test_vi64ops_SOURCES) $(test_ymd2yd_SOURCES) \
- $(tests_SOURCES)
+ $(test_vi64ops_SOURCES) $(test_ymd2yd_SOURCES)
DIST_SOURCES = $(test_a_md5encrypt_SOURCES) $(test_atoint_SOURCES) \
$(test_atouint_SOURCES) $(test_authkeys_SOURCES) \
$(test_buftvtots_SOURCES) $(test_calendar_SOURCES) \
@@ -600,8 +557,7 @@ DIST_SOURCES = $(test_a_md5encrypt_SOURCES) $(test_atoint_SOURCES) \
$(test_strtolfp_SOURCES) $(test_timespecops_SOURCES) \
$(test_timevalops_SOURCES) $(test_tstotv_SOURCES) \
$(test_tvtots_SOURCES) $(test_uglydate_SOURCES) \
- $(test_vi64ops_SOURCES) $(test_ymd2yd_SOURCES) \
- $(tests_SOURCES)
+ $(test_vi64ops_SOURCES) $(test_ymd2yd_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -847,6 +803,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -855,6 +812,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -916,6 +874,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@@ -1123,6 +1082,10 @@ BUILT_SOURCES = $(srcdir)/run-a_md5encrypt.c $(srcdir)/run-atoint.c \
$(srcdir)/run-vi64ops.c $(srcdir)/run-ymd2yd.c $(NULL) \
check-libntp check-libunity .deps-ver
CLEANFILES = check-libntp check-libunity .deps-ver
+std_unity_list = \
+ $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \
+ $(NULL)
+
run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
LDADD = \
$(top_builddir)/libntp/libntp.a \
@@ -1130,662 +1093,319 @@ LDADD = \
$(PTHREAD_LIBS) \
$(LDADD_NTP) \
$(LIBM) \
- $(NULL)
-
-tests_LDADD = \
- $(LDADD) \
- $(GTEST_LDFLAGS) \
- $(GTEST_LIBS) \
- $(NULL)
-
-unity_tests_LDADD = \
- $(LDADD) \
$(top_builddir)/sntp/unity/libunity.a \
$(NULL)
AM_CFLAGS = $(CFLAGS_NTP)
-AM_CXXFLAGS = $(GTEST_CXXFLAGS)
-AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/sntp $(GTEST_CPPFLAGS) \
- $(CPPFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/sntp $(CPPFLAGS_NTP) \
+ -DUNITY_INCLUDE_CONFIG_H -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
-tests_SOURCES = \
- $(top_srcdir)/sntp/tests_main.cpp \
- g_libntptest.cpp \
- g_a_md5encrypt.cpp \
- g_atoint.cpp \
- g_atouint.cpp \
- g_authkeys.cpp \
- g_buftvtots.cpp \
- g_calendar.cpp \
- g_caljulian.cpp \
- g_caltontp.cpp \
- g_calyearstart.cpp \
- g_clocktime.cpp \
- g_decodenetnum.cpp \
- g_hextoint.cpp \
- g_hextolfp.cpp \
- g_humandate.cpp \
- g_lfpfunc.cpp \
- g_lfptostr.cpp \
- g_modetoa.cpp \
- g_msyslog.cpp \
- g_netof.cpp \
- g_numtoa.cpp \
- g_numtohost.cpp \
- g_octtoint.cpp \
- g_prettydate.cpp \
- g_recvbuff.cpp \
- g_refnumtoa.cpp \
- g_sfptostr.cpp \
- g_socktoa.cpp \
- g_ssl_init.cpp \
- g_statestr.cpp \
- g_strtolfp.cpp \
- g_timespecops.cpp \
- g_timestructs.cpp \
- g_timevalops.cpp \
- g_tstotv.cpp \
- g_tvtots.cpp \
- g_uglydate.cpp \
- g_vi64ops.cpp \
- g_ymd2yd.cpp \
- $(NULL)
-
noinst_HEADERS = \
- g_lfptest.h \
lfptest.h \
- g_libntptest.h \
- g_sockaddrtest.h \
sockaddrtest.h \
- g_timestructs.h \
test-libntp.h \
$(NULL)
###
-test_a_md5encrypt_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_a_md5encrypt_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_a_md5encrypt_SOURCES = \
- a_md5encrypt.c \
- run-a_md5encrypt.c \
+ a_md5encrypt.c \
+ run-a_md5encrypt.c \
$(NULL)
###
-test_atoint_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_atoint_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_atoint_SOURCES = \
- atoint.c \
- run-atoint.c \
+ atoint.c \
+ run-atoint.c \
$(NULL)
###
-test_atouint_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_atouint_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_atouint_SOURCES = \
- atouint.c \
- run-atouint.c \
+ atouint.c \
+ run-atouint.c \
$(NULL)
###
-test_authkeys_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_authkeys_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_authkeys_SOURCES = \
- authkeys.c \
- run-authkeys.c \
+ authkeys.c \
+ run-authkeys.c \
$(NULL)
###
-test_buftvtots_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_buftvtots_SOURCES = \
- buftvtots.c \
- run-buftvtots.c \
- $(NULL)
-
-test_buftvtots_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- -DUNITY_INCLUDE_DOUBLE \
+ buftvtots.c \
+ run-buftvtots.c \
+ lfptest.c \
$(NULL)
###
-test_calendar_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_calendar_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_calendar_SOURCES = \
- calendar.c \
- run-calendar.c \
- test-libntp.c \
+ calendar.c \
+ run-calendar.c \
+ test-libntp.c \
$(NULL)
###
test_caltontp_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_caltontp_LDADD = \
- $(unity_tests_LDADD) \
- -lpthread \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
$(NULL)
test_caltontp_SOURCES = \
- caltontp.c \
- run-caltontp.c \
+ caltontp.c \
+ run-caltontp.c \
$(NULL)
###
test_caljulian_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_caljulian_LDADD = \
- $(unity_tests_LDADD) \
- -lpthread \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
$(NULL)
test_caljulian_SOURCES = \
- caljulian.c \
- run-caljulian.c \
- test-libntp.c \
+ caljulian.c \
+ run-caljulian.c \
+ test-libntp.c \
$(NULL)
###
-test_calyearstart_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_calyearstart_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_calyearstart_SOURCES = \
- calyearstart.c \
- run-calyearstart.c \
- test-libntp.c \
+ calyearstart.c \
+ run-calyearstart.c \
+ test-libntp.c \
$(NULL)
###
-test_clocktime_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_clocktime_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_clocktime_SOURCES = \
- clocktime.c \
- run-clocktime.c \
- test-libntp.c \
+ clocktime.c \
+ run-clocktime.c \
+ test-libntp.c \
$(NULL)
###
test_decodenetnum_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_decodenetnum_LDADD = \
- $(unity_tests_LDADD) \
- -lpthread \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
$(NULL)
test_decodenetnum_SOURCES = \
- decodenetnum.c \
- run-decodenetnum.c \
+ decodenetnum.c \
+ run-decodenetnum.c \
+ sockaddrtest.c \
$(NULL)
###
-test_hextoint_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_hextoint_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_hextoint_SOURCES = \
- hextoint.c \
- run-hextoint.c \
+ hextoint.c \
+ run-hextoint.c \
$(NULL)
###
-test_hextolfp_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_hextolfp_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_hextolfp_SOURCES = \
- hextolfp.c \
- run-hextolfp.c \
+ hextolfp.c \
+ run-hextolfp.c \
+ lfptest.c \
$(NULL)
###
-test_humandate_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_humandate_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_humandate_SOURCES = \
- humandate.c \
- run-humandate.c \
+ humandate.c \
+ run-humandate.c \
$(NULL)
###
-test_lfpfunc_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- -DUNITY_INCLUDE_DOUBLE \
- $(NULL)
-
-test_lfpfunc_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_lfpfunc_SOURCES = \
- lfpfunc.c \
- run-lfpfunc.c \
+ lfpfunc.c \
+ run-lfpfunc.c \
$(NULL)
###
-test_lfptostr_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_lfptostr_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_lfptostr_SOURCES = \
- lfptostr.c \
- run-lfptostr.c \
+ lfptostr.c \
+ run-lfptostr.c \
$(NULL)
###
-test_modetoa_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_modetoa_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_modetoa_SOURCES = \
- modetoa.c \
- run-modetoa.c \
+ modetoa.c \
+ run-modetoa.c \
$(NULL)
###
-test_msyslog_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_msyslog_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_msyslog_SOURCES = \
- msyslog.c \
- run-msyslog.c \
+ msyslog.c \
+ run-msyslog.c \
$(NULL)
###
-test_netof_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_netof_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_netof_SOURCES = \
- netof.c \
- run-netof.c \
+ netof.c \
+ run-netof.c \
+ sockaddrtest.c \
$(NULL)
###
-test_numtoa_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_numtoa_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_numtoa_SOURCES = \
- numtoa.c \
- run-numtoa.c \
+ numtoa.c \
+ run-numtoa.c \
$(NULL)
###
-test_numtohost_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_numtohost_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_numtohost_SOURCES = \
- numtohost.c \
- run-numtohost.c \
+ numtohost.c \
+ run-numtohost.c \
$(NULL)
###
-test_octtoint_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_octtoint_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_octtoint_SOURCES = \
- octtoint.c \
- run-octtoint.c \
+ octtoint.c \
+ run-octtoint.c \
$(NULL)
###
-test_prettydate_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_prettydate_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_prettydate_SOURCES = \
- prettydate.c \
- run-prettydate.c \
+ prettydate.c \
+ run-prettydate.c \
$(NULL)
###
-test_recvbuff_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_recvbuff_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_recvbuff_SOURCES = \
- recvbuff.c \
- run-recvbuff.c \
+ recvbuff.c \
+ run-recvbuff.c \
$(NULL)
###
-test_refidsmear_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_refidsmear_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_refidsmear_SOURCES = \
- refidsmear.c \
- run-refidsmear.c \
+ refidsmear.c \
+ run-refidsmear.c \
$(NULL)
###
-test_refnumtoa_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_refnumtoa_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_refnumtoa_SOURCES = \
- refnumtoa.c \
- run-refnumtoa.c \
+ refnumtoa.c \
+ run-refnumtoa.c \
$(NULL)
###
-test_sfptostr_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- -DUNITY_INCLUDE_DOUBLE \
- $(NULL)
-
-test_sfptostr_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_sfptostr_SOURCES = \
- sfptostr.c \
- run-sfptostr.c \
+ sfptostr.c \
+ run-sfptostr.c \
$(NULL)
###
-test_socktoa_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_socktoa_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_socktoa_SOURCES = \
- socktoa.c \
- run-socktoa.c \
+ socktoa.c \
+ run-socktoa.c \
+ sockaddrtest.c \
$(NULL)
###
-test_ssl_init_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_ssl_init_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_ssl_init_SOURCES = \
- ssl_init.c \
- run-ssl_init.c \
+ ssl_init.c \
+ run-ssl_init.c \
$(NULL)
###
-test_statestr_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_statestr_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_statestr_SOURCES = \
- statestr.c \
- run-statestr.c \
+ statestr.c \
+ run-statestr.c \
$(NULL)
###
test_strtolfp_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_strtolfp_LDADD = \
- $(unity_tests_LDADD) \
- -lpthread \
+ $(CFLAGS_LIBEVENT) \
+ $(AM_CFLAGS) \
$(NULL)
test_strtolfp_SOURCES = \
- strtolfp.c \
- run-strtolfp.c \
+ strtolfp.c \
+ run-strtolfp.c \
+ lfptest.c \
$(NULL)
###
-test_timespecops_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_timespecops_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_timespecops_SOURCES = \
- timespecops.c \
- run-timespecops.c \
+ timespecops.c \
+ run-timespecops.c \
$(NULL)
###
-test_timevalops_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_timevalops_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_timevalops_SOURCES = \
- timevalops.c \
- run-timevalops.c \
+ timevalops.c \
+ run-timevalops.c \
$(NULL)
###
-test_tstotv_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_tstotv_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_tstotv_SOURCES = \
- tstotv.c \
- run-tstotv.c \
+ tstotv.c \
+ run-tstotv.c \
$(NULL)
###
-test_tvtots_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- -DUNITY_INCLUDE_DOUBLE \
- $(NULL)
-
-test_tvtots_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_tvtots_SOURCES = \
- tvtots.c \
- run-tvtots.c \
+ tvtots.c \
+ run-tvtots.c \
+ lfptest.c \
$(NULL)
###
-test_uglydate_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_uglydate_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_uglydate_SOURCES = \
- uglydate.c \
- run-uglydate.c \
+ uglydate.c \
+ run-uglydate.c \
$(NULL)
###
-test_vi64ops_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_vi64ops_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_vi64ops_SOURCES = \
- vi64ops.c \
- run-vi64ops.c \
+ vi64ops.c \
+ run-vi64ops.c \
$(NULL)
###
-test_ymd2yd_CFLAGS = \
- -I$(top_srcdir)/sntp/unity \
- $(NULL)
-
-test_ymd2yd_LDADD = \
- $(unity_tests_LDADD) \
- $(NULL)
-
test_ymd2yd_SOURCES = \
- ymd2yd.c \
- run-ymd2yd.c \
+ ymd2yd.c \
+ run-ymd2yd.c \
$(NULL)
###
-TESTS = $(am__append_2)
+TESTS = $(am__append_1)
NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
-I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
-I$(top_srcdir)/lib/isc/unix/include
@@ -1793,7 +1413,7 @@ all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
-.SUFFIXES: .c .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -1836,27 +1456,27 @@ clean-checkPROGRAMS:
test-a_md5encrypt$(EXEEXT): $(test_a_md5encrypt_OBJECTS) $(test_a_md5encrypt_DEPENDENCIES) $(EXTRA_test_a_md5encrypt_DEPENDENCIES)
@rm -f test-a_md5encrypt$(EXEEXT)
- $(AM_V_CCLD)$(test_a_md5encrypt_LINK) $(test_a_md5encrypt_OBJECTS) $(test_a_md5encrypt_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_a_md5encrypt_OBJECTS) $(test_a_md5encrypt_LDADD) $(LIBS)
test-atoint$(EXEEXT): $(test_atoint_OBJECTS) $(test_atoint_DEPENDENCIES) $(EXTRA_test_atoint_DEPENDENCIES)
@rm -f test-atoint$(EXEEXT)
- $(AM_V_CCLD)$(test_atoint_LINK) $(test_atoint_OBJECTS) $(test_atoint_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_atoint_OBJECTS) $(test_atoint_LDADD) $(LIBS)
test-atouint$(EXEEXT): $(test_atouint_OBJECTS) $(test_atouint_DEPENDENCIES) $(EXTRA_test_atouint_DEPENDENCIES)
@rm -f test-atouint$(EXEEXT)
- $(AM_V_CCLD)$(test_atouint_LINK) $(test_atouint_OBJECTS) $(test_atouint_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_atouint_OBJECTS) $(test_atouint_LDADD) $(LIBS)
test-authkeys$(EXEEXT): $(test_authkeys_OBJECTS) $(test_authkeys_DEPENDENCIES) $(EXTRA_test_authkeys_DEPENDENCIES)
@rm -f test-authkeys$(EXEEXT)
- $(AM_V_CCLD)$(test_authkeys_LINK) $(test_authkeys_OBJECTS) $(test_authkeys_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_authkeys_OBJECTS) $(test_authkeys_LDADD) $(LIBS)
test-buftvtots$(EXEEXT): $(test_buftvtots_OBJECTS) $(test_buftvtots_DEPENDENCIES) $(EXTRA_test_buftvtots_DEPENDENCIES)
@rm -f test-buftvtots$(EXEEXT)
- $(AM_V_CCLD)$(test_buftvtots_LINK) $(test_buftvtots_OBJECTS) $(test_buftvtots_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_buftvtots_OBJECTS) $(test_buftvtots_LDADD) $(LIBS)
test-calendar$(EXEEXT): $(test_calendar_OBJECTS) $(test_calendar_DEPENDENCIES) $(EXTRA_test_calendar_DEPENDENCIES)
@rm -f test-calendar$(EXEEXT)
- $(AM_V_CCLD)$(test_calendar_LINK) $(test_calendar_OBJECTS) $(test_calendar_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_calendar_OBJECTS) $(test_calendar_LDADD) $(LIBS)
test-caljulian$(EXEEXT): $(test_caljulian_OBJECTS) $(test_caljulian_DEPENDENCIES) $(EXTRA_test_caljulian_DEPENDENCIES)
@rm -f test-caljulian$(EXEEXT)
@@ -1868,11 +1488,11 @@ test-caltontp$(EXEEXT): $(test_caltontp_OBJECTS) $(test_caltontp_DEPENDENCIES) $
test-calyearstart$(EXEEXT): $(test_calyearstart_OBJECTS) $(test_calyearstart_DEPENDENCIES) $(EXTRA_test_calyearstart_DEPENDENCIES)
@rm -f test-calyearstart$(EXEEXT)
- $(AM_V_CCLD)$(test_calyearstart_LINK) $(test_calyearstart_OBJECTS) $(test_calyearstart_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_calyearstart_OBJECTS) $(test_calyearstart_LDADD) $(LIBS)
test-clocktime$(EXEEXT): $(test_clocktime_OBJECTS) $(test_clocktime_DEPENDENCIES) $(EXTRA_test_clocktime_DEPENDENCIES)
@rm -f test-clocktime$(EXEEXT)
- $(AM_V_CCLD)$(test_clocktime_LINK) $(test_clocktime_OBJECTS) $(test_clocktime_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_clocktime_OBJECTS) $(test_clocktime_LDADD) $(LIBS)
test-decodenetnum$(EXEEXT): $(test_decodenetnum_OBJECTS) $(test_decodenetnum_DEPENDENCIES) $(EXTRA_test_decodenetnum_DEPENDENCIES)
@rm -f test-decodenetnum$(EXEEXT)
@@ -1880,79 +1500,79 @@ test-decodenetnum$(EXEEXT): $(test_decodenetnum_OBJECTS) $(test_decodenetnum_DEP
test-hextoint$(EXEEXT): $(test_hextoint_OBJECTS) $(test_hextoint_DEPENDENCIES) $(EXTRA_test_hextoint_DEPENDENCIES)
@rm -f test-hextoint$(EXEEXT)
- $(AM_V_CCLD)$(test_hextoint_LINK) $(test_hextoint_OBJECTS) $(test_hextoint_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_hextoint_OBJECTS) $(test_hextoint_LDADD) $(LIBS)
test-hextolfp$(EXEEXT): $(test_hextolfp_OBJECTS) $(test_hextolfp_DEPENDENCIES) $(EXTRA_test_hextolfp_DEPENDENCIES)
@rm -f test-hextolfp$(EXEEXT)
- $(AM_V_CCLD)$(test_hextolfp_LINK) $(test_hextolfp_OBJECTS) $(test_hextolfp_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_hextolfp_OBJECTS) $(test_hextolfp_LDADD) $(LIBS)
test-humandate$(EXEEXT): $(test_humandate_OBJECTS) $(test_humandate_DEPENDENCIES) $(EXTRA_test_humandate_DEPENDENCIES)
@rm -f test-humandate$(EXEEXT)
- $(AM_V_CCLD)$(test_humandate_LINK) $(test_humandate_OBJECTS) $(test_humandate_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_humandate_OBJECTS) $(test_humandate_LDADD) $(LIBS)
test-lfpfunc$(EXEEXT): $(test_lfpfunc_OBJECTS) $(test_lfpfunc_DEPENDENCIES) $(EXTRA_test_lfpfunc_DEPENDENCIES)
@rm -f test-lfpfunc$(EXEEXT)
- $(AM_V_CCLD)$(test_lfpfunc_LINK) $(test_lfpfunc_OBJECTS) $(test_lfpfunc_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_lfpfunc_OBJECTS) $(test_lfpfunc_LDADD) $(LIBS)
test-lfptostr$(EXEEXT): $(test_lfptostr_OBJECTS) $(test_lfptostr_DEPENDENCIES) $(EXTRA_test_lfptostr_DEPENDENCIES)
@rm -f test-lfptostr$(EXEEXT)
- $(AM_V_CCLD)$(test_lfptostr_LINK) $(test_lfptostr_OBJECTS) $(test_lfptostr_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_lfptostr_OBJECTS) $(test_lfptostr_LDADD) $(LIBS)
test-modetoa$(EXEEXT): $(test_modetoa_OBJECTS) $(test_modetoa_DEPENDENCIES) $(EXTRA_test_modetoa_DEPENDENCIES)
@rm -f test-modetoa$(EXEEXT)
- $(AM_V_CCLD)$(test_modetoa_LINK) $(test_modetoa_OBJECTS) $(test_modetoa_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_modetoa_OBJECTS) $(test_modetoa_LDADD) $(LIBS)
test-msyslog$(EXEEXT): $(test_msyslog_OBJECTS) $(test_msyslog_DEPENDENCIES) $(EXTRA_test_msyslog_DEPENDENCIES)
@rm -f test-msyslog$(EXEEXT)
- $(AM_V_CCLD)$(test_msyslog_LINK) $(test_msyslog_OBJECTS) $(test_msyslog_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_msyslog_OBJECTS) $(test_msyslog_LDADD) $(LIBS)
test-netof$(EXEEXT): $(test_netof_OBJECTS) $(test_netof_DEPENDENCIES) $(EXTRA_test_netof_DEPENDENCIES)
@rm -f test-netof$(EXEEXT)
- $(AM_V_CCLD)$(test_netof_LINK) $(test_netof_OBJECTS) $(test_netof_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_netof_OBJECTS) $(test_netof_LDADD) $(LIBS)
test-numtoa$(EXEEXT): $(test_numtoa_OBJECTS) $(test_numtoa_DEPENDENCIES) $(EXTRA_test_numtoa_DEPENDENCIES)
@rm -f test-numtoa$(EXEEXT)
- $(AM_V_CCLD)$(test_numtoa_LINK) $(test_numtoa_OBJECTS) $(test_numtoa_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_numtoa_OBJECTS) $(test_numtoa_LDADD) $(LIBS)
test-numtohost$(EXEEXT): $(test_numtohost_OBJECTS) $(test_numtohost_DEPENDENCIES) $(EXTRA_test_numtohost_DEPENDENCIES)
@rm -f test-numtohost$(EXEEXT)
- $(AM_V_CCLD)$(test_numtohost_LINK) $(test_numtohost_OBJECTS) $(test_numtohost_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_numtohost_OBJECTS) $(test_numtohost_LDADD) $(LIBS)
test-octtoint$(EXEEXT): $(test_octtoint_OBJECTS) $(test_octtoint_DEPENDENCIES) $(EXTRA_test_octtoint_DEPENDENCIES)
@rm -f test-octtoint$(EXEEXT)
- $(AM_V_CCLD)$(test_octtoint_LINK) $(test_octtoint_OBJECTS) $(test_octtoint_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_octtoint_OBJECTS) $(test_octtoint_LDADD) $(LIBS)
test-prettydate$(EXEEXT): $(test_prettydate_OBJECTS) $(test_prettydate_DEPENDENCIES) $(EXTRA_test_prettydate_DEPENDENCIES)
@rm -f test-prettydate$(EXEEXT)
- $(AM_V_CCLD)$(test_prettydate_LINK) $(test_prettydate_OBJECTS) $(test_prettydate_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_prettydate_OBJECTS) $(test_prettydate_LDADD) $(LIBS)
test-recvbuff$(EXEEXT): $(test_recvbuff_OBJECTS) $(test_recvbuff_DEPENDENCIES) $(EXTRA_test_recvbuff_DEPENDENCIES)
@rm -f test-recvbuff$(EXEEXT)
- $(AM_V_CCLD)$(test_recvbuff_LINK) $(test_recvbuff_OBJECTS) $(test_recvbuff_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_recvbuff_OBJECTS) $(test_recvbuff_LDADD) $(LIBS)
test-refidsmear$(EXEEXT): $(test_refidsmear_OBJECTS) $(test_refidsmear_DEPENDENCIES) $(EXTRA_test_refidsmear_DEPENDENCIES)
@rm -f test-refidsmear$(EXEEXT)
- $(AM_V_CCLD)$(test_refidsmear_LINK) $(test_refidsmear_OBJECTS) $(test_refidsmear_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_refidsmear_OBJECTS) $(test_refidsmear_LDADD) $(LIBS)
test-refnumtoa$(EXEEXT): $(test_refnumtoa_OBJECTS) $(test_refnumtoa_DEPENDENCIES) $(EXTRA_test_refnumtoa_DEPENDENCIES)
@rm -f test-refnumtoa$(EXEEXT)
- $(AM_V_CCLD)$(test_refnumtoa_LINK) $(test_refnumtoa_OBJECTS) $(test_refnumtoa_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_refnumtoa_OBJECTS) $(test_refnumtoa_LDADD) $(LIBS)
test-sfptostr$(EXEEXT): $(test_sfptostr_OBJECTS) $(test_sfptostr_DEPENDENCIES) $(EXTRA_test_sfptostr_DEPENDENCIES)
@rm -f test-sfptostr$(EXEEXT)
- $(AM_V_CCLD)$(test_sfptostr_LINK) $(test_sfptostr_OBJECTS) $(test_sfptostr_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_sfptostr_OBJECTS) $(test_sfptostr_LDADD) $(LIBS)
test-socktoa$(EXEEXT): $(test_socktoa_OBJECTS) $(test_socktoa_DEPENDENCIES) $(EXTRA_test_socktoa_DEPENDENCIES)
@rm -f test-socktoa$(EXEEXT)
- $(AM_V_CCLD)$(test_socktoa_LINK) $(test_socktoa_OBJECTS) $(test_socktoa_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_socktoa_OBJECTS) $(test_socktoa_LDADD) $(LIBS)
test-ssl_init$(EXEEXT): $(test_ssl_init_OBJECTS) $(test_ssl_init_DEPENDENCIES) $(EXTRA_test_ssl_init_DEPENDENCIES)
@rm -f test-ssl_init$(EXEEXT)
- $(AM_V_CCLD)$(test_ssl_init_LINK) $(test_ssl_init_OBJECTS) $(test_ssl_init_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_ssl_init_OBJECTS) $(test_ssl_init_LDADD) $(LIBS)
test-statestr$(EXEEXT): $(test_statestr_OBJECTS) $(test_statestr_DEPENDENCIES) $(EXTRA_test_statestr_DEPENDENCIES)
@rm -f test-statestr$(EXEEXT)
- $(AM_V_CCLD)$(test_statestr_LINK) $(test_statestr_OBJECTS) $(test_statestr_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_statestr_OBJECTS) $(test_statestr_LDADD) $(LIBS)
test-strtolfp$(EXEEXT): $(test_strtolfp_OBJECTS) $(test_strtolfp_DEPENDENCIES) $(EXTRA_test_strtolfp_DEPENDENCIES)
@rm -f test-strtolfp$(EXEEXT)
@@ -1960,35 +1580,31 @@ test-strtolfp$(EXEEXT): $(test_strtolfp_OBJECTS) $(test_strtolfp_DEPENDENCIES) $
test-timespecops$(EXEEXT): $(test_timespecops_OBJECTS) $(test_timespecops_DEPENDENCIES) $(EXTRA_test_timespecops_DEPENDENCIES)
@rm -f test-timespecops$(EXEEXT)
- $(AM_V_CCLD)$(test_timespecops_LINK) $(test_timespecops_OBJECTS) $(test_timespecops_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_timespecops_OBJECTS) $(test_timespecops_LDADD) $(LIBS)
test-timevalops$(EXEEXT): $(test_timevalops_OBJECTS) $(test_timevalops_DEPENDENCIES) $(EXTRA_test_timevalops_DEPENDENCIES)
@rm -f test-timevalops$(EXEEXT)
- $(AM_V_CCLD)$(test_timevalops_LINK) $(test_timevalops_OBJECTS) $(test_timevalops_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_timevalops_OBJECTS) $(test_timevalops_LDADD) $(LIBS)
test-tstotv$(EXEEXT): $(test_tstotv_OBJECTS) $(test_tstotv_DEPENDENCIES) $(EXTRA_test_tstotv_DEPENDENCIES)
@rm -f test-tstotv$(EXEEXT)
- $(AM_V_CCLD)$(test_tstotv_LINK) $(test_tstotv_OBJECTS) $(test_tstotv_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_tstotv_OBJECTS) $(test_tstotv_LDADD) $(LIBS)
test-tvtots$(EXEEXT): $(test_tvtots_OBJECTS) $(test_tvtots_DEPENDENCIES) $(EXTRA_test_tvtots_DEPENDENCIES)
@rm -f test-tvtots$(EXEEXT)
- $(AM_V_CCLD)$(test_tvtots_LINK) $(test_tvtots_OBJECTS) $(test_tvtots_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_tvtots_OBJECTS) $(test_tvtots_LDADD) $(LIBS)
test-uglydate$(EXEEXT): $(test_uglydate_OBJECTS) $(test_uglydate_DEPENDENCIES) $(EXTRA_test_uglydate_DEPENDENCIES)
@rm -f test-uglydate$(EXEEXT)
- $(AM_V_CCLD)$(test_uglydate_LINK) $(test_uglydate_OBJECTS) $(test_uglydate_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_uglydate_OBJECTS) $(test_uglydate_LDADD) $(LIBS)
test-vi64ops$(EXEEXT): $(test_vi64ops_OBJECTS) $(test_vi64ops_DEPENDENCIES) $(EXTRA_test_vi64ops_DEPENDENCIES)
@rm -f test-vi64ops$(EXEEXT)
- $(AM_V_CCLD)$(test_vi64ops_LINK) $(test_vi64ops_OBJECTS) $(test_vi64ops_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_vi64ops_OBJECTS) $(test_vi64ops_LDADD) $(LIBS)
test-ymd2yd$(EXEEXT): $(test_ymd2yd_OBJECTS) $(test_ymd2yd_DEPENDENCIES) $(EXTRA_test_ymd2yd_DEPENDENCIES)
@rm -f test-ymd2yd$(EXEEXT)
- $(AM_V_CCLD)$(test_ymd2yd_LINK) $(test_ymd2yd_OBJECTS) $(test_ymd2yd_LDADD) $(LIBS)
-
-tests$(EXEEXT): $(tests_OBJECTS) $(tests_DEPENDENCIES) $(EXTRA_tests_DEPENDENCIES)
- @rm -f tests$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tests_OBJECTS) $(tests_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(test_ymd2yd_OBJECTS) $(test_ymd2yd_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -1996,126 +1612,88 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_a_md5encrypt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_atoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_atouint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_authkeys.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_buftvtots.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_calendar.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_caljulian.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_caltontp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_calyearstart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_clocktime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_decodenetnum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_hextoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_hextolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_humandate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_lfpfunc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_lfptostr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_libntptest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_modetoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_msyslog.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_netof.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_numtoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_numtohost.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_octtoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_prettydate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_recvbuff.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_refnumtoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_sfptostr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_socktoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_ssl_init.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_statestr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_strtolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_timespecops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_timestructs.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_timevalops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_tstotv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_tvtots.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_uglydate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_vi64ops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_ymd2yd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_a_md5encrypt-a_md5encrypt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_a_md5encrypt-run-a_md5encrypt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_atoint-atoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_atoint-run-atoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_atouint-atouint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_atouint-run-atouint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_authkeys-authkeys.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_authkeys-run-authkeys.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_buftvtots-buftvtots.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_buftvtots-run-buftvtots.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_calendar-calendar.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_calendar-run-calendar.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_calendar-test-libntp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/a_md5encrypt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atouint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authkeys.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buftvtots.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calyearstart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clocktime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextolfp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/humandate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfpfunc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfptest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfptostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modetoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msyslog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netof.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtohost.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/octtoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prettydate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvbuff.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refidsmear.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refnumtoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-a_md5encrypt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-atoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-atouint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-authkeys.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-buftvtots.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-calendar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-calyearstart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-clocktime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-hextoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-hextolfp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-humandate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-lfpfunc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-lfptostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-modetoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-msyslog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-netof.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-numtoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-numtohost.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-octtoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-prettydate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-recvbuff.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-refidsmear.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-refnumtoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-sfptostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-socktoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-ssl_init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-statestr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-timespecops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-timevalops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-tstotv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-tvtots.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-uglydate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-vi64ops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-ymd2yd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfptostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockaddrtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl_init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statestr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-libntp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_caljulian-caljulian.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_caljulian-run-caljulian.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_caljulian-test-libntp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_caltontp-caltontp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_caltontp-run-caltontp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_calyearstart-calyearstart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_calyearstart-run-calyearstart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_calyearstart-test-libntp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_clocktime-clocktime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_clocktime-run-clocktime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_clocktime-test-libntp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_decodenetnum-decodenetnum.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_decodenetnum-run-decodenetnum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hextoint-hextoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hextoint-run-hextoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hextolfp-hextolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hextolfp-run-hextolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_humandate-humandate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_humandate-run-humandate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_lfpfunc-lfpfunc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_lfpfunc-run-lfpfunc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_lfptostr-lfptostr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_lfptostr-run-lfptostr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_modetoa-modetoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_modetoa-run-modetoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_msyslog-msyslog.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_msyslog-run-msyslog.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_netof-netof.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_netof-run-netof.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_numtoa-numtoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_numtoa-run-numtoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_numtohost-numtohost.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_numtohost-run-numtohost.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_octtoint-octtoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_octtoint-run-octtoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_prettydate-prettydate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_prettydate-run-prettydate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_recvbuff-recvbuff.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_recvbuff-run-recvbuff.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_refidsmear-refidsmear.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_refidsmear-run-refidsmear.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_refnumtoa-refnumtoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_refnumtoa-run-refnumtoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sfptostr-run-sfptostr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sfptostr-sfptostr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_socktoa-run-socktoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_socktoa-socktoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ssl_init-run-ssl_init.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ssl_init-ssl_init.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_statestr-run-statestr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_statestr-statestr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_decodenetnum-sockaddrtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_strtolfp-lfptest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_strtolfp-run-strtolfp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_strtolfp-strtolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_timespecops-run-timespecops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_timespecops-timespecops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_timevalops-run-timevalops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_timevalops-timevalops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tstotv-run-tstotv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tstotv-tstotv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tvtots-run-tvtots.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tvtots-tvtots.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_uglydate-run-uglydate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_uglydate-uglydate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_vi64ops-run-vi64ops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_vi64ops-vi64ops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ymd2yd-run-ymd2yd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ymd2yd-ymd2yd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests_main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespecops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timevalops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstotv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvtots.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uglydate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vi64ops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ymd2yd.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -2138,188 +1716,6 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-test_a_md5encrypt-a_md5encrypt.o: a_md5encrypt.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_a_md5encrypt_CFLAGS) $(CFLAGS) -MT test_a_md5encrypt-a_md5encrypt.o -MD -MP -MF $(DEPDIR)/test_a_md5encrypt-a_md5encrypt.Tpo -c -o test_a_md5encrypt-a_md5encrypt.o `test -f 'a_md5encrypt.c' || echo '$(srcdir)/'`a_md5encrypt.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_a_md5encrypt-a_md5encrypt.Tpo $(DEPDIR)/test_a_md5encrypt-a_md5encrypt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='a_md5encrypt.c' object='test_a_md5encrypt-a_md5encrypt.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_a_md5encrypt_CFLAGS) $(CFLAGS) -c -o test_a_md5encrypt-a_md5encrypt.o `test -f 'a_md5encrypt.c' || echo '$(srcdir)/'`a_md5encrypt.c
-
-test_a_md5encrypt-a_md5encrypt.obj: a_md5encrypt.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_a_md5encrypt_CFLAGS) $(CFLAGS) -MT test_a_md5encrypt-a_md5encrypt.obj -MD -MP -MF $(DEPDIR)/test_a_md5encrypt-a_md5encrypt.Tpo -c -o test_a_md5encrypt-a_md5encrypt.obj `if test -f 'a_md5encrypt.c'; then $(CYGPATH_W) 'a_md5encrypt.c'; else $(CYGPATH_W) '$(srcdir)/a_md5encrypt.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_a_md5encrypt-a_md5encrypt.Tpo $(DEPDIR)/test_a_md5encrypt-a_md5encrypt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='a_md5encrypt.c' object='test_a_md5encrypt-a_md5encrypt.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_a_md5encrypt_CFLAGS) $(CFLAGS) -c -o test_a_md5encrypt-a_md5encrypt.obj `if test -f 'a_md5encrypt.c'; then $(CYGPATH_W) 'a_md5encrypt.c'; else $(CYGPATH_W) '$(srcdir)/a_md5encrypt.c'; fi`
-
-test_a_md5encrypt-run-a_md5encrypt.o: run-a_md5encrypt.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_a_md5encrypt_CFLAGS) $(CFLAGS) -MT test_a_md5encrypt-run-a_md5encrypt.o -MD -MP -MF $(DEPDIR)/test_a_md5encrypt-run-a_md5encrypt.Tpo -c -o test_a_md5encrypt-run-a_md5encrypt.o `test -f 'run-a_md5encrypt.c' || echo '$(srcdir)/'`run-a_md5encrypt.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_a_md5encrypt-run-a_md5encrypt.Tpo $(DEPDIR)/test_a_md5encrypt-run-a_md5encrypt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-a_md5encrypt.c' object='test_a_md5encrypt-run-a_md5encrypt.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_a_md5encrypt_CFLAGS) $(CFLAGS) -c -o test_a_md5encrypt-run-a_md5encrypt.o `test -f 'run-a_md5encrypt.c' || echo '$(srcdir)/'`run-a_md5encrypt.c
-
-test_a_md5encrypt-run-a_md5encrypt.obj: run-a_md5encrypt.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_a_md5encrypt_CFLAGS) $(CFLAGS) -MT test_a_md5encrypt-run-a_md5encrypt.obj -MD -MP -MF $(DEPDIR)/test_a_md5encrypt-run-a_md5encrypt.Tpo -c -o test_a_md5encrypt-run-a_md5encrypt.obj `if test -f 'run-a_md5encrypt.c'; then $(CYGPATH_W) 'run-a_md5encrypt.c'; else $(CYGPATH_W) '$(srcdir)/run-a_md5encrypt.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_a_md5encrypt-run-a_md5encrypt.Tpo $(DEPDIR)/test_a_md5encrypt-run-a_md5encrypt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-a_md5encrypt.c' object='test_a_md5encrypt-run-a_md5encrypt.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_a_md5encrypt_CFLAGS) $(CFLAGS) -c -o test_a_md5encrypt-run-a_md5encrypt.obj `if test -f 'run-a_md5encrypt.c'; then $(CYGPATH_W) 'run-a_md5encrypt.c'; else $(CYGPATH_W) '$(srcdir)/run-a_md5encrypt.c'; fi`
-
-test_atoint-atoint.o: atoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atoint_CFLAGS) $(CFLAGS) -MT test_atoint-atoint.o -MD -MP -MF $(DEPDIR)/test_atoint-atoint.Tpo -c -o test_atoint-atoint.o `test -f 'atoint.c' || echo '$(srcdir)/'`atoint.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_atoint-atoint.Tpo $(DEPDIR)/test_atoint-atoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atoint.c' object='test_atoint-atoint.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atoint_CFLAGS) $(CFLAGS) -c -o test_atoint-atoint.o `test -f 'atoint.c' || echo '$(srcdir)/'`atoint.c
-
-test_atoint-atoint.obj: atoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atoint_CFLAGS) $(CFLAGS) -MT test_atoint-atoint.obj -MD -MP -MF $(DEPDIR)/test_atoint-atoint.Tpo -c -o test_atoint-atoint.obj `if test -f 'atoint.c'; then $(CYGPATH_W) 'atoint.c'; else $(CYGPATH_W) '$(srcdir)/atoint.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_atoint-atoint.Tpo $(DEPDIR)/test_atoint-atoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atoint.c' object='test_atoint-atoint.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atoint_CFLAGS) $(CFLAGS) -c -o test_atoint-atoint.obj `if test -f 'atoint.c'; then $(CYGPATH_W) 'atoint.c'; else $(CYGPATH_W) '$(srcdir)/atoint.c'; fi`
-
-test_atoint-run-atoint.o: run-atoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atoint_CFLAGS) $(CFLAGS) -MT test_atoint-run-atoint.o -MD -MP -MF $(DEPDIR)/test_atoint-run-atoint.Tpo -c -o test_atoint-run-atoint.o `test -f 'run-atoint.c' || echo '$(srcdir)/'`run-atoint.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_atoint-run-atoint.Tpo $(DEPDIR)/test_atoint-run-atoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-atoint.c' object='test_atoint-run-atoint.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atoint_CFLAGS) $(CFLAGS) -c -o test_atoint-run-atoint.o `test -f 'run-atoint.c' || echo '$(srcdir)/'`run-atoint.c
-
-test_atoint-run-atoint.obj: run-atoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atoint_CFLAGS) $(CFLAGS) -MT test_atoint-run-atoint.obj -MD -MP -MF $(DEPDIR)/test_atoint-run-atoint.Tpo -c -o test_atoint-run-atoint.obj `if test -f 'run-atoint.c'; then $(CYGPATH_W) 'run-atoint.c'; else $(CYGPATH_W) '$(srcdir)/run-atoint.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_atoint-run-atoint.Tpo $(DEPDIR)/test_atoint-run-atoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-atoint.c' object='test_atoint-run-atoint.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atoint_CFLAGS) $(CFLAGS) -c -o test_atoint-run-atoint.obj `if test -f 'run-atoint.c'; then $(CYGPATH_W) 'run-atoint.c'; else $(CYGPATH_W) '$(srcdir)/run-atoint.c'; fi`
-
-test_atouint-atouint.o: atouint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atouint_CFLAGS) $(CFLAGS) -MT test_atouint-atouint.o -MD -MP -MF $(DEPDIR)/test_atouint-atouint.Tpo -c -o test_atouint-atouint.o `test -f 'atouint.c' || echo '$(srcdir)/'`atouint.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_atouint-atouint.Tpo $(DEPDIR)/test_atouint-atouint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atouint.c' object='test_atouint-atouint.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atouint_CFLAGS) $(CFLAGS) -c -o test_atouint-atouint.o `test -f 'atouint.c' || echo '$(srcdir)/'`atouint.c
-
-test_atouint-atouint.obj: atouint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atouint_CFLAGS) $(CFLAGS) -MT test_atouint-atouint.obj -MD -MP -MF $(DEPDIR)/test_atouint-atouint.Tpo -c -o test_atouint-atouint.obj `if test -f 'atouint.c'; then $(CYGPATH_W) 'atouint.c'; else $(CYGPATH_W) '$(srcdir)/atouint.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_atouint-atouint.Tpo $(DEPDIR)/test_atouint-atouint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atouint.c' object='test_atouint-atouint.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atouint_CFLAGS) $(CFLAGS) -c -o test_atouint-atouint.obj `if test -f 'atouint.c'; then $(CYGPATH_W) 'atouint.c'; else $(CYGPATH_W) '$(srcdir)/atouint.c'; fi`
-
-test_atouint-run-atouint.o: run-atouint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atouint_CFLAGS) $(CFLAGS) -MT test_atouint-run-atouint.o -MD -MP -MF $(DEPDIR)/test_atouint-run-atouint.Tpo -c -o test_atouint-run-atouint.o `test -f 'run-atouint.c' || echo '$(srcdir)/'`run-atouint.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_atouint-run-atouint.Tpo $(DEPDIR)/test_atouint-run-atouint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-atouint.c' object='test_atouint-run-atouint.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atouint_CFLAGS) $(CFLAGS) -c -o test_atouint-run-atouint.o `test -f 'run-atouint.c' || echo '$(srcdir)/'`run-atouint.c
-
-test_atouint-run-atouint.obj: run-atouint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atouint_CFLAGS) $(CFLAGS) -MT test_atouint-run-atouint.obj -MD -MP -MF $(DEPDIR)/test_atouint-run-atouint.Tpo -c -o test_atouint-run-atouint.obj `if test -f 'run-atouint.c'; then $(CYGPATH_W) 'run-atouint.c'; else $(CYGPATH_W) '$(srcdir)/run-atouint.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_atouint-run-atouint.Tpo $(DEPDIR)/test_atouint-run-atouint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-atouint.c' object='test_atouint-run-atouint.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_atouint_CFLAGS) $(CFLAGS) -c -o test_atouint-run-atouint.obj `if test -f 'run-atouint.c'; then $(CYGPATH_W) 'run-atouint.c'; else $(CYGPATH_W) '$(srcdir)/run-atouint.c'; fi`
-
-test_authkeys-authkeys.o: authkeys.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_authkeys_CFLAGS) $(CFLAGS) -MT test_authkeys-authkeys.o -MD -MP -MF $(DEPDIR)/test_authkeys-authkeys.Tpo -c -o test_authkeys-authkeys.o `test -f 'authkeys.c' || echo '$(srcdir)/'`authkeys.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_authkeys-authkeys.Tpo $(DEPDIR)/test_authkeys-authkeys.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='authkeys.c' object='test_authkeys-authkeys.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_authkeys_CFLAGS) $(CFLAGS) -c -o test_authkeys-authkeys.o `test -f 'authkeys.c' || echo '$(srcdir)/'`authkeys.c
-
-test_authkeys-authkeys.obj: authkeys.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_authkeys_CFLAGS) $(CFLAGS) -MT test_authkeys-authkeys.obj -MD -MP -MF $(DEPDIR)/test_authkeys-authkeys.Tpo -c -o test_authkeys-authkeys.obj `if test -f 'authkeys.c'; then $(CYGPATH_W) 'authkeys.c'; else $(CYGPATH_W) '$(srcdir)/authkeys.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_authkeys-authkeys.Tpo $(DEPDIR)/test_authkeys-authkeys.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='authkeys.c' object='test_authkeys-authkeys.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_authkeys_CFLAGS) $(CFLAGS) -c -o test_authkeys-authkeys.obj `if test -f 'authkeys.c'; then $(CYGPATH_W) 'authkeys.c'; else $(CYGPATH_W) '$(srcdir)/authkeys.c'; fi`
-
-test_authkeys-run-authkeys.o: run-authkeys.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_authkeys_CFLAGS) $(CFLAGS) -MT test_authkeys-run-authkeys.o -MD -MP -MF $(DEPDIR)/test_authkeys-run-authkeys.Tpo -c -o test_authkeys-run-authkeys.o `test -f 'run-authkeys.c' || echo '$(srcdir)/'`run-authkeys.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_authkeys-run-authkeys.Tpo $(DEPDIR)/test_authkeys-run-authkeys.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-authkeys.c' object='test_authkeys-run-authkeys.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_authkeys_CFLAGS) $(CFLAGS) -c -o test_authkeys-run-authkeys.o `test -f 'run-authkeys.c' || echo '$(srcdir)/'`run-authkeys.c
-
-test_authkeys-run-authkeys.obj: run-authkeys.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_authkeys_CFLAGS) $(CFLAGS) -MT test_authkeys-run-authkeys.obj -MD -MP -MF $(DEPDIR)/test_authkeys-run-authkeys.Tpo -c -o test_authkeys-run-authkeys.obj `if test -f 'run-authkeys.c'; then $(CYGPATH_W) 'run-authkeys.c'; else $(CYGPATH_W) '$(srcdir)/run-authkeys.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_authkeys-run-authkeys.Tpo $(DEPDIR)/test_authkeys-run-authkeys.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-authkeys.c' object='test_authkeys-run-authkeys.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_authkeys_CFLAGS) $(CFLAGS) -c -o test_authkeys-run-authkeys.obj `if test -f 'run-authkeys.c'; then $(CYGPATH_W) 'run-authkeys.c'; else $(CYGPATH_W) '$(srcdir)/run-authkeys.c'; fi`
-
-test_buftvtots-buftvtots.o: buftvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_buftvtots_CFLAGS) $(CFLAGS) -MT test_buftvtots-buftvtots.o -MD -MP -MF $(DEPDIR)/test_buftvtots-buftvtots.Tpo -c -o test_buftvtots-buftvtots.o `test -f 'buftvtots.c' || echo '$(srcdir)/'`buftvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_buftvtots-buftvtots.Tpo $(DEPDIR)/test_buftvtots-buftvtots.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='buftvtots.c' object='test_buftvtots-buftvtots.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_buftvtots_CFLAGS) $(CFLAGS) -c -o test_buftvtots-buftvtots.o `test -f 'buftvtots.c' || echo '$(srcdir)/'`buftvtots.c
-
-test_buftvtots-buftvtots.obj: buftvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_buftvtots_CFLAGS) $(CFLAGS) -MT test_buftvtots-buftvtots.obj -MD -MP -MF $(DEPDIR)/test_buftvtots-buftvtots.Tpo -c -o test_buftvtots-buftvtots.obj `if test -f 'buftvtots.c'; then $(CYGPATH_W) 'buftvtots.c'; else $(CYGPATH_W) '$(srcdir)/buftvtots.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_buftvtots-buftvtots.Tpo $(DEPDIR)/test_buftvtots-buftvtots.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='buftvtots.c' object='test_buftvtots-buftvtots.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_buftvtots_CFLAGS) $(CFLAGS) -c -o test_buftvtots-buftvtots.obj `if test -f 'buftvtots.c'; then $(CYGPATH_W) 'buftvtots.c'; else $(CYGPATH_W) '$(srcdir)/buftvtots.c'; fi`
-
-test_buftvtots-run-buftvtots.o: run-buftvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_buftvtots_CFLAGS) $(CFLAGS) -MT test_buftvtots-run-buftvtots.o -MD -MP -MF $(DEPDIR)/test_buftvtots-run-buftvtots.Tpo -c -o test_buftvtots-run-buftvtots.o `test -f 'run-buftvtots.c' || echo '$(srcdir)/'`run-buftvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_buftvtots-run-buftvtots.Tpo $(DEPDIR)/test_buftvtots-run-buftvtots.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-buftvtots.c' object='test_buftvtots-run-buftvtots.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_buftvtots_CFLAGS) $(CFLAGS) -c -o test_buftvtots-run-buftvtots.o `test -f 'run-buftvtots.c' || echo '$(srcdir)/'`run-buftvtots.c
-
-test_buftvtots-run-buftvtots.obj: run-buftvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_buftvtots_CFLAGS) $(CFLAGS) -MT test_buftvtots-run-buftvtots.obj -MD -MP -MF $(DEPDIR)/test_buftvtots-run-buftvtots.Tpo -c -o test_buftvtots-run-buftvtots.obj `if test -f 'run-buftvtots.c'; then $(CYGPATH_W) 'run-buftvtots.c'; else $(CYGPATH_W) '$(srcdir)/run-buftvtots.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_buftvtots-run-buftvtots.Tpo $(DEPDIR)/test_buftvtots-run-buftvtots.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-buftvtots.c' object='test_buftvtots-run-buftvtots.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_buftvtots_CFLAGS) $(CFLAGS) -c -o test_buftvtots-run-buftvtots.obj `if test -f 'run-buftvtots.c'; then $(CYGPATH_W) 'run-buftvtots.c'; else $(CYGPATH_W) '$(srcdir)/run-buftvtots.c'; fi`
-
-test_calendar-calendar.o: calendar.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -MT test_calendar-calendar.o -MD -MP -MF $(DEPDIR)/test_calendar-calendar.Tpo -c -o test_calendar-calendar.o `test -f 'calendar.c' || echo '$(srcdir)/'`calendar.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calendar-calendar.Tpo $(DEPDIR)/test_calendar-calendar.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='calendar.c' object='test_calendar-calendar.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -c -o test_calendar-calendar.o `test -f 'calendar.c' || echo '$(srcdir)/'`calendar.c
-
-test_calendar-calendar.obj: calendar.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -MT test_calendar-calendar.obj -MD -MP -MF $(DEPDIR)/test_calendar-calendar.Tpo -c -o test_calendar-calendar.obj `if test -f 'calendar.c'; then $(CYGPATH_W) 'calendar.c'; else $(CYGPATH_W) '$(srcdir)/calendar.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calendar-calendar.Tpo $(DEPDIR)/test_calendar-calendar.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='calendar.c' object='test_calendar-calendar.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -c -o test_calendar-calendar.obj `if test -f 'calendar.c'; then $(CYGPATH_W) 'calendar.c'; else $(CYGPATH_W) '$(srcdir)/calendar.c'; fi`
-
-test_calendar-run-calendar.o: run-calendar.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -MT test_calendar-run-calendar.o -MD -MP -MF $(DEPDIR)/test_calendar-run-calendar.Tpo -c -o test_calendar-run-calendar.o `test -f 'run-calendar.c' || echo '$(srcdir)/'`run-calendar.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calendar-run-calendar.Tpo $(DEPDIR)/test_calendar-run-calendar.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-calendar.c' object='test_calendar-run-calendar.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -c -o test_calendar-run-calendar.o `test -f 'run-calendar.c' || echo '$(srcdir)/'`run-calendar.c
-
-test_calendar-run-calendar.obj: run-calendar.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -MT test_calendar-run-calendar.obj -MD -MP -MF $(DEPDIR)/test_calendar-run-calendar.Tpo -c -o test_calendar-run-calendar.obj `if test -f 'run-calendar.c'; then $(CYGPATH_W) 'run-calendar.c'; else $(CYGPATH_W) '$(srcdir)/run-calendar.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calendar-run-calendar.Tpo $(DEPDIR)/test_calendar-run-calendar.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-calendar.c' object='test_calendar-run-calendar.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -c -o test_calendar-run-calendar.obj `if test -f 'run-calendar.c'; then $(CYGPATH_W) 'run-calendar.c'; else $(CYGPATH_W) '$(srcdir)/run-calendar.c'; fi`
-
-test_calendar-test-libntp.o: test-libntp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -MT test_calendar-test-libntp.o -MD -MP -MF $(DEPDIR)/test_calendar-test-libntp.Tpo -c -o test_calendar-test-libntp.o `test -f 'test-libntp.c' || echo '$(srcdir)/'`test-libntp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calendar-test-libntp.Tpo $(DEPDIR)/test_calendar-test-libntp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-libntp.c' object='test_calendar-test-libntp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -c -o test_calendar-test-libntp.o `test -f 'test-libntp.c' || echo '$(srcdir)/'`test-libntp.c
-
-test_calendar-test-libntp.obj: test-libntp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -MT test_calendar-test-libntp.obj -MD -MP -MF $(DEPDIR)/test_calendar-test-libntp.Tpo -c -o test_calendar-test-libntp.obj `if test -f 'test-libntp.c'; then $(CYGPATH_W) 'test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/test-libntp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calendar-test-libntp.Tpo $(DEPDIR)/test_calendar-test-libntp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-libntp.c' object='test_calendar-test-libntp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calendar_CFLAGS) $(CFLAGS) -c -o test_calendar-test-libntp.obj `if test -f 'test-libntp.c'; then $(CYGPATH_W) 'test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/test-libntp.c'; fi`
-
test_caljulian-caljulian.o: caljulian.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_caljulian_CFLAGS) $(CFLAGS) -MT test_caljulian-caljulian.o -MD -MP -MF $(DEPDIR)/test_caljulian-caljulian.Tpo -c -o test_caljulian-caljulian.o `test -f 'caljulian.c' || echo '$(srcdir)/'`caljulian.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_caljulian-caljulian.Tpo $(DEPDIR)/test_caljulian-caljulian.Po
@@ -2390,90 +1786,6 @@ test_caltontp-run-caltontp.obj: run-caltontp.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_caltontp_CFLAGS) $(CFLAGS) -c -o test_caltontp-run-caltontp.obj `if test -f 'run-caltontp.c'; then $(CYGPATH_W) 'run-caltontp.c'; else $(CYGPATH_W) '$(srcdir)/run-caltontp.c'; fi`
-test_calyearstart-calyearstart.o: calyearstart.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -MT test_calyearstart-calyearstart.o -MD -MP -MF $(DEPDIR)/test_calyearstart-calyearstart.Tpo -c -o test_calyearstart-calyearstart.o `test -f 'calyearstart.c' || echo '$(srcdir)/'`calyearstart.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calyearstart-calyearstart.Tpo $(DEPDIR)/test_calyearstart-calyearstart.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='calyearstart.c' object='test_calyearstart-calyearstart.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -c -o test_calyearstart-calyearstart.o `test -f 'calyearstart.c' || echo '$(srcdir)/'`calyearstart.c
-
-test_calyearstart-calyearstart.obj: calyearstart.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -MT test_calyearstart-calyearstart.obj -MD -MP -MF $(DEPDIR)/test_calyearstart-calyearstart.Tpo -c -o test_calyearstart-calyearstart.obj `if test -f 'calyearstart.c'; then $(CYGPATH_W) 'calyearstart.c'; else $(CYGPATH_W) '$(srcdir)/calyearstart.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calyearstart-calyearstart.Tpo $(DEPDIR)/test_calyearstart-calyearstart.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='calyearstart.c' object='test_calyearstart-calyearstart.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -c -o test_calyearstart-calyearstart.obj `if test -f 'calyearstart.c'; then $(CYGPATH_W) 'calyearstart.c'; else $(CYGPATH_W) '$(srcdir)/calyearstart.c'; fi`
-
-test_calyearstart-run-calyearstart.o: run-calyearstart.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -MT test_calyearstart-run-calyearstart.o -MD -MP -MF $(DEPDIR)/test_calyearstart-run-calyearstart.Tpo -c -o test_calyearstart-run-calyearstart.o `test -f 'run-calyearstart.c' || echo '$(srcdir)/'`run-calyearstart.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calyearstart-run-calyearstart.Tpo $(DEPDIR)/test_calyearstart-run-calyearstart.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-calyearstart.c' object='test_calyearstart-run-calyearstart.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -c -o test_calyearstart-run-calyearstart.o `test -f 'run-calyearstart.c' || echo '$(srcdir)/'`run-calyearstart.c
-
-test_calyearstart-run-calyearstart.obj: run-calyearstart.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -MT test_calyearstart-run-calyearstart.obj -MD -MP -MF $(DEPDIR)/test_calyearstart-run-calyearstart.Tpo -c -o test_calyearstart-run-calyearstart.obj `if test -f 'run-calyearstart.c'; then $(CYGPATH_W) 'run-calyearstart.c'; else $(CYGPATH_W) '$(srcdir)/run-calyearstart.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calyearstart-run-calyearstart.Tpo $(DEPDIR)/test_calyearstart-run-calyearstart.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-calyearstart.c' object='test_calyearstart-run-calyearstart.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -c -o test_calyearstart-run-calyearstart.obj `if test -f 'run-calyearstart.c'; then $(CYGPATH_W) 'run-calyearstart.c'; else $(CYGPATH_W) '$(srcdir)/run-calyearstart.c'; fi`
-
-test_calyearstart-test-libntp.o: test-libntp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -MT test_calyearstart-test-libntp.o -MD -MP -MF $(DEPDIR)/test_calyearstart-test-libntp.Tpo -c -o test_calyearstart-test-libntp.o `test -f 'test-libntp.c' || echo '$(srcdir)/'`test-libntp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calyearstart-test-libntp.Tpo $(DEPDIR)/test_calyearstart-test-libntp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-libntp.c' object='test_calyearstart-test-libntp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -c -o test_calyearstart-test-libntp.o `test -f 'test-libntp.c' || echo '$(srcdir)/'`test-libntp.c
-
-test_calyearstart-test-libntp.obj: test-libntp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -MT test_calyearstart-test-libntp.obj -MD -MP -MF $(DEPDIR)/test_calyearstart-test-libntp.Tpo -c -o test_calyearstart-test-libntp.obj `if test -f 'test-libntp.c'; then $(CYGPATH_W) 'test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/test-libntp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_calyearstart-test-libntp.Tpo $(DEPDIR)/test_calyearstart-test-libntp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-libntp.c' object='test_calyearstart-test-libntp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_calyearstart_CFLAGS) $(CFLAGS) -c -o test_calyearstart-test-libntp.obj `if test -f 'test-libntp.c'; then $(CYGPATH_W) 'test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/test-libntp.c'; fi`
-
-test_clocktime-clocktime.o: clocktime.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -MT test_clocktime-clocktime.o -MD -MP -MF $(DEPDIR)/test_clocktime-clocktime.Tpo -c -o test_clocktime-clocktime.o `test -f 'clocktime.c' || echo '$(srcdir)/'`clocktime.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_clocktime-clocktime.Tpo $(DEPDIR)/test_clocktime-clocktime.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='clocktime.c' object='test_clocktime-clocktime.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -c -o test_clocktime-clocktime.o `test -f 'clocktime.c' || echo '$(srcdir)/'`clocktime.c
-
-test_clocktime-clocktime.obj: clocktime.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -MT test_clocktime-clocktime.obj -MD -MP -MF $(DEPDIR)/test_clocktime-clocktime.Tpo -c -o test_clocktime-clocktime.obj `if test -f 'clocktime.c'; then $(CYGPATH_W) 'clocktime.c'; else $(CYGPATH_W) '$(srcdir)/clocktime.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_clocktime-clocktime.Tpo $(DEPDIR)/test_clocktime-clocktime.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='clocktime.c' object='test_clocktime-clocktime.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -c -o test_clocktime-clocktime.obj `if test -f 'clocktime.c'; then $(CYGPATH_W) 'clocktime.c'; else $(CYGPATH_W) '$(srcdir)/clocktime.c'; fi`
-
-test_clocktime-run-clocktime.o: run-clocktime.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -MT test_clocktime-run-clocktime.o -MD -MP -MF $(DEPDIR)/test_clocktime-run-clocktime.Tpo -c -o test_clocktime-run-clocktime.o `test -f 'run-clocktime.c' || echo '$(srcdir)/'`run-clocktime.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_clocktime-run-clocktime.Tpo $(DEPDIR)/test_clocktime-run-clocktime.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-clocktime.c' object='test_clocktime-run-clocktime.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -c -o test_clocktime-run-clocktime.o `test -f 'run-clocktime.c' || echo '$(srcdir)/'`run-clocktime.c
-
-test_clocktime-run-clocktime.obj: run-clocktime.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -MT test_clocktime-run-clocktime.obj -MD -MP -MF $(DEPDIR)/test_clocktime-run-clocktime.Tpo -c -o test_clocktime-run-clocktime.obj `if test -f 'run-clocktime.c'; then $(CYGPATH_W) 'run-clocktime.c'; else $(CYGPATH_W) '$(srcdir)/run-clocktime.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_clocktime-run-clocktime.Tpo $(DEPDIR)/test_clocktime-run-clocktime.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-clocktime.c' object='test_clocktime-run-clocktime.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -c -o test_clocktime-run-clocktime.obj `if test -f 'run-clocktime.c'; then $(CYGPATH_W) 'run-clocktime.c'; else $(CYGPATH_W) '$(srcdir)/run-clocktime.c'; fi`
-
-test_clocktime-test-libntp.o: test-libntp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -MT test_clocktime-test-libntp.o -MD -MP -MF $(DEPDIR)/test_clocktime-test-libntp.Tpo -c -o test_clocktime-test-libntp.o `test -f 'test-libntp.c' || echo '$(srcdir)/'`test-libntp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_clocktime-test-libntp.Tpo $(DEPDIR)/test_clocktime-test-libntp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-libntp.c' object='test_clocktime-test-libntp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -c -o test_clocktime-test-libntp.o `test -f 'test-libntp.c' || echo '$(srcdir)/'`test-libntp.c
-
-test_clocktime-test-libntp.obj: test-libntp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -MT test_clocktime-test-libntp.obj -MD -MP -MF $(DEPDIR)/test_clocktime-test-libntp.Tpo -c -o test_clocktime-test-libntp.obj `if test -f 'test-libntp.c'; then $(CYGPATH_W) 'test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/test-libntp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_clocktime-test-libntp.Tpo $(DEPDIR)/test_clocktime-test-libntp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-libntp.c' object='test_clocktime-test-libntp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_clocktime_CFLAGS) $(CFLAGS) -c -o test_clocktime-test-libntp.obj `if test -f 'test-libntp.c'; then $(CYGPATH_W) 'test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/test-libntp.c'; fi`
-
test_decodenetnum-decodenetnum.o: decodenetnum.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_decodenetnum_CFLAGS) $(CFLAGS) -MT test_decodenetnum-decodenetnum.o -MD -MP -MF $(DEPDIR)/test_decodenetnum-decodenetnum.Tpo -c -o test_decodenetnum-decodenetnum.o `test -f 'decodenetnum.c' || echo '$(srcdir)/'`decodenetnum.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_decodenetnum-decodenetnum.Tpo $(DEPDIR)/test_decodenetnum-decodenetnum.Po
@@ -2502,537 +1814,19 @@ test_decodenetnum-run-decodenetnum.obj: run-decodenetnum.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_decodenetnum_CFLAGS) $(CFLAGS) -c -o test_decodenetnum-run-decodenetnum.obj `if test -f 'run-decodenetnum.c'; then $(CYGPATH_W) 'run-decodenetnum.c'; else $(CYGPATH_W) '$(srcdir)/run-decodenetnum.c'; fi`
-test_hextoint-hextoint.o: hextoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextoint_CFLAGS) $(CFLAGS) -MT test_hextoint-hextoint.o -MD -MP -MF $(DEPDIR)/test_hextoint-hextoint.Tpo -c -o test_hextoint-hextoint.o `test -f 'hextoint.c' || echo '$(srcdir)/'`hextoint.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_hextoint-hextoint.Tpo $(DEPDIR)/test_hextoint-hextoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hextoint.c' object='test_hextoint-hextoint.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextoint_CFLAGS) $(CFLAGS) -c -o test_hextoint-hextoint.o `test -f 'hextoint.c' || echo '$(srcdir)/'`hextoint.c
-
-test_hextoint-hextoint.obj: hextoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextoint_CFLAGS) $(CFLAGS) -MT test_hextoint-hextoint.obj -MD -MP -MF $(DEPDIR)/test_hextoint-hextoint.Tpo -c -o test_hextoint-hextoint.obj `if test -f 'hextoint.c'; then $(CYGPATH_W) 'hextoint.c'; else $(CYGPATH_W) '$(srcdir)/hextoint.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_hextoint-hextoint.Tpo $(DEPDIR)/test_hextoint-hextoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hextoint.c' object='test_hextoint-hextoint.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextoint_CFLAGS) $(CFLAGS) -c -o test_hextoint-hextoint.obj `if test -f 'hextoint.c'; then $(CYGPATH_W) 'hextoint.c'; else $(CYGPATH_W) '$(srcdir)/hextoint.c'; fi`
-
-test_hextoint-run-hextoint.o: run-hextoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextoint_CFLAGS) $(CFLAGS) -MT test_hextoint-run-hextoint.o -MD -MP -MF $(DEPDIR)/test_hextoint-run-hextoint.Tpo -c -o test_hextoint-run-hextoint.o `test -f 'run-hextoint.c' || echo '$(srcdir)/'`run-hextoint.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_hextoint-run-hextoint.Tpo $(DEPDIR)/test_hextoint-run-hextoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-hextoint.c' object='test_hextoint-run-hextoint.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextoint_CFLAGS) $(CFLAGS) -c -o test_hextoint-run-hextoint.o `test -f 'run-hextoint.c' || echo '$(srcdir)/'`run-hextoint.c
-
-test_hextoint-run-hextoint.obj: run-hextoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextoint_CFLAGS) $(CFLAGS) -MT test_hextoint-run-hextoint.obj -MD -MP -MF $(DEPDIR)/test_hextoint-run-hextoint.Tpo -c -o test_hextoint-run-hextoint.obj `if test -f 'run-hextoint.c'; then $(CYGPATH_W) 'run-hextoint.c'; else $(CYGPATH_W) '$(srcdir)/run-hextoint.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_hextoint-run-hextoint.Tpo $(DEPDIR)/test_hextoint-run-hextoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-hextoint.c' object='test_hextoint-run-hextoint.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextoint_CFLAGS) $(CFLAGS) -c -o test_hextoint-run-hextoint.obj `if test -f 'run-hextoint.c'; then $(CYGPATH_W) 'run-hextoint.c'; else $(CYGPATH_W) '$(srcdir)/run-hextoint.c'; fi`
-
-test_hextolfp-hextolfp.o: hextolfp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextolfp_CFLAGS) $(CFLAGS) -MT test_hextolfp-hextolfp.o -MD -MP -MF $(DEPDIR)/test_hextolfp-hextolfp.Tpo -c -o test_hextolfp-hextolfp.o `test -f 'hextolfp.c' || echo '$(srcdir)/'`hextolfp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_hextolfp-hextolfp.Tpo $(DEPDIR)/test_hextolfp-hextolfp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hextolfp.c' object='test_hextolfp-hextolfp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextolfp_CFLAGS) $(CFLAGS) -c -o test_hextolfp-hextolfp.o `test -f 'hextolfp.c' || echo '$(srcdir)/'`hextolfp.c
-
-test_hextolfp-hextolfp.obj: hextolfp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextolfp_CFLAGS) $(CFLAGS) -MT test_hextolfp-hextolfp.obj -MD -MP -MF $(DEPDIR)/test_hextolfp-hextolfp.Tpo -c -o test_hextolfp-hextolfp.obj `if test -f 'hextolfp.c'; then $(CYGPATH_W) 'hextolfp.c'; else $(CYGPATH_W) '$(srcdir)/hextolfp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_hextolfp-hextolfp.Tpo $(DEPDIR)/test_hextolfp-hextolfp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hextolfp.c' object='test_hextolfp-hextolfp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextolfp_CFLAGS) $(CFLAGS) -c -o test_hextolfp-hextolfp.obj `if test -f 'hextolfp.c'; then $(CYGPATH_W) 'hextolfp.c'; else $(CYGPATH_W) '$(srcdir)/hextolfp.c'; fi`
-
-test_hextolfp-run-hextolfp.o: run-hextolfp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextolfp_CFLAGS) $(CFLAGS) -MT test_hextolfp-run-hextolfp.o -MD -MP -MF $(DEPDIR)/test_hextolfp-run-hextolfp.Tpo -c -o test_hextolfp-run-hextolfp.o `test -f 'run-hextolfp.c' || echo '$(srcdir)/'`run-hextolfp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_hextolfp-run-hextolfp.Tpo $(DEPDIR)/test_hextolfp-run-hextolfp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-hextolfp.c' object='test_hextolfp-run-hextolfp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextolfp_CFLAGS) $(CFLAGS) -c -o test_hextolfp-run-hextolfp.o `test -f 'run-hextolfp.c' || echo '$(srcdir)/'`run-hextolfp.c
-
-test_hextolfp-run-hextolfp.obj: run-hextolfp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextolfp_CFLAGS) $(CFLAGS) -MT test_hextolfp-run-hextolfp.obj -MD -MP -MF $(DEPDIR)/test_hextolfp-run-hextolfp.Tpo -c -o test_hextolfp-run-hextolfp.obj `if test -f 'run-hextolfp.c'; then $(CYGPATH_W) 'run-hextolfp.c'; else $(CYGPATH_W) '$(srcdir)/run-hextolfp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_hextolfp-run-hextolfp.Tpo $(DEPDIR)/test_hextolfp-run-hextolfp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-hextolfp.c' object='test_hextolfp-run-hextolfp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_hextolfp_CFLAGS) $(CFLAGS) -c -o test_hextolfp-run-hextolfp.obj `if test -f 'run-hextolfp.c'; then $(CYGPATH_W) 'run-hextolfp.c'; else $(CYGPATH_W) '$(srcdir)/run-hextolfp.c'; fi`
-
-test_humandate-humandate.o: humandate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_humandate_CFLAGS) $(CFLAGS) -MT test_humandate-humandate.o -MD -MP -MF $(DEPDIR)/test_humandate-humandate.Tpo -c -o test_humandate-humandate.o `test -f 'humandate.c' || echo '$(srcdir)/'`humandate.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_humandate-humandate.Tpo $(DEPDIR)/test_humandate-humandate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='humandate.c' object='test_humandate-humandate.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_humandate_CFLAGS) $(CFLAGS) -c -o test_humandate-humandate.o `test -f 'humandate.c' || echo '$(srcdir)/'`humandate.c
-
-test_humandate-humandate.obj: humandate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_humandate_CFLAGS) $(CFLAGS) -MT test_humandate-humandate.obj -MD -MP -MF $(DEPDIR)/test_humandate-humandate.Tpo -c -o test_humandate-humandate.obj `if test -f 'humandate.c'; then $(CYGPATH_W) 'humandate.c'; else $(CYGPATH_W) '$(srcdir)/humandate.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_humandate-humandate.Tpo $(DEPDIR)/test_humandate-humandate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='humandate.c' object='test_humandate-humandate.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_humandate_CFLAGS) $(CFLAGS) -c -o test_humandate-humandate.obj `if test -f 'humandate.c'; then $(CYGPATH_W) 'humandate.c'; else $(CYGPATH_W) '$(srcdir)/humandate.c'; fi`
-
-test_humandate-run-humandate.o: run-humandate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_humandate_CFLAGS) $(CFLAGS) -MT test_humandate-run-humandate.o -MD -MP -MF $(DEPDIR)/test_humandate-run-humandate.Tpo -c -o test_humandate-run-humandate.o `test -f 'run-humandate.c' || echo '$(srcdir)/'`run-humandate.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_humandate-run-humandate.Tpo $(DEPDIR)/test_humandate-run-humandate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-humandate.c' object='test_humandate-run-humandate.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_humandate_CFLAGS) $(CFLAGS) -c -o test_humandate-run-humandate.o `test -f 'run-humandate.c' || echo '$(srcdir)/'`run-humandate.c
-
-test_humandate-run-humandate.obj: run-humandate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_humandate_CFLAGS) $(CFLAGS) -MT test_humandate-run-humandate.obj -MD -MP -MF $(DEPDIR)/test_humandate-run-humandate.Tpo -c -o test_humandate-run-humandate.obj `if test -f 'run-humandate.c'; then $(CYGPATH_W) 'run-humandate.c'; else $(CYGPATH_W) '$(srcdir)/run-humandate.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_humandate-run-humandate.Tpo $(DEPDIR)/test_humandate-run-humandate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-humandate.c' object='test_humandate-run-humandate.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_humandate_CFLAGS) $(CFLAGS) -c -o test_humandate-run-humandate.obj `if test -f 'run-humandate.c'; then $(CYGPATH_W) 'run-humandate.c'; else $(CYGPATH_W) '$(srcdir)/run-humandate.c'; fi`
-
-test_lfpfunc-lfpfunc.o: lfpfunc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfpfunc_CFLAGS) $(CFLAGS) -MT test_lfpfunc-lfpfunc.o -MD -MP -MF $(DEPDIR)/test_lfpfunc-lfpfunc.Tpo -c -o test_lfpfunc-lfpfunc.o `test -f 'lfpfunc.c' || echo '$(srcdir)/'`lfpfunc.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_lfpfunc-lfpfunc.Tpo $(DEPDIR)/test_lfpfunc-lfpfunc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lfpfunc.c' object='test_lfpfunc-lfpfunc.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfpfunc_CFLAGS) $(CFLAGS) -c -o test_lfpfunc-lfpfunc.o `test -f 'lfpfunc.c' || echo '$(srcdir)/'`lfpfunc.c
-
-test_lfpfunc-lfpfunc.obj: lfpfunc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfpfunc_CFLAGS) $(CFLAGS) -MT test_lfpfunc-lfpfunc.obj -MD -MP -MF $(DEPDIR)/test_lfpfunc-lfpfunc.Tpo -c -o test_lfpfunc-lfpfunc.obj `if test -f 'lfpfunc.c'; then $(CYGPATH_W) 'lfpfunc.c'; else $(CYGPATH_W) '$(srcdir)/lfpfunc.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_lfpfunc-lfpfunc.Tpo $(DEPDIR)/test_lfpfunc-lfpfunc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lfpfunc.c' object='test_lfpfunc-lfpfunc.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfpfunc_CFLAGS) $(CFLAGS) -c -o test_lfpfunc-lfpfunc.obj `if test -f 'lfpfunc.c'; then $(CYGPATH_W) 'lfpfunc.c'; else $(CYGPATH_W) '$(srcdir)/lfpfunc.c'; fi`
-
-test_lfpfunc-run-lfpfunc.o: run-lfpfunc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfpfunc_CFLAGS) $(CFLAGS) -MT test_lfpfunc-run-lfpfunc.o -MD -MP -MF $(DEPDIR)/test_lfpfunc-run-lfpfunc.Tpo -c -o test_lfpfunc-run-lfpfunc.o `test -f 'run-lfpfunc.c' || echo '$(srcdir)/'`run-lfpfunc.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_lfpfunc-run-lfpfunc.Tpo $(DEPDIR)/test_lfpfunc-run-lfpfunc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-lfpfunc.c' object='test_lfpfunc-run-lfpfunc.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfpfunc_CFLAGS) $(CFLAGS) -c -o test_lfpfunc-run-lfpfunc.o `test -f 'run-lfpfunc.c' || echo '$(srcdir)/'`run-lfpfunc.c
-
-test_lfpfunc-run-lfpfunc.obj: run-lfpfunc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfpfunc_CFLAGS) $(CFLAGS) -MT test_lfpfunc-run-lfpfunc.obj -MD -MP -MF $(DEPDIR)/test_lfpfunc-run-lfpfunc.Tpo -c -o test_lfpfunc-run-lfpfunc.obj `if test -f 'run-lfpfunc.c'; then $(CYGPATH_W) 'run-lfpfunc.c'; else $(CYGPATH_W) '$(srcdir)/run-lfpfunc.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_lfpfunc-run-lfpfunc.Tpo $(DEPDIR)/test_lfpfunc-run-lfpfunc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-lfpfunc.c' object='test_lfpfunc-run-lfpfunc.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfpfunc_CFLAGS) $(CFLAGS) -c -o test_lfpfunc-run-lfpfunc.obj `if test -f 'run-lfpfunc.c'; then $(CYGPATH_W) 'run-lfpfunc.c'; else $(CYGPATH_W) '$(srcdir)/run-lfpfunc.c'; fi`
-
-test_lfptostr-lfptostr.o: lfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfptostr_CFLAGS) $(CFLAGS) -MT test_lfptostr-lfptostr.o -MD -MP -MF $(DEPDIR)/test_lfptostr-lfptostr.Tpo -c -o test_lfptostr-lfptostr.o `test -f 'lfptostr.c' || echo '$(srcdir)/'`lfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_lfptostr-lfptostr.Tpo $(DEPDIR)/test_lfptostr-lfptostr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lfptostr.c' object='test_lfptostr-lfptostr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfptostr_CFLAGS) $(CFLAGS) -c -o test_lfptostr-lfptostr.o `test -f 'lfptostr.c' || echo '$(srcdir)/'`lfptostr.c
-
-test_lfptostr-lfptostr.obj: lfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfptostr_CFLAGS) $(CFLAGS) -MT test_lfptostr-lfptostr.obj -MD -MP -MF $(DEPDIR)/test_lfptostr-lfptostr.Tpo -c -o test_lfptostr-lfptostr.obj `if test -f 'lfptostr.c'; then $(CYGPATH_W) 'lfptostr.c'; else $(CYGPATH_W) '$(srcdir)/lfptostr.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_lfptostr-lfptostr.Tpo $(DEPDIR)/test_lfptostr-lfptostr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lfptostr.c' object='test_lfptostr-lfptostr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfptostr_CFLAGS) $(CFLAGS) -c -o test_lfptostr-lfptostr.obj `if test -f 'lfptostr.c'; then $(CYGPATH_W) 'lfptostr.c'; else $(CYGPATH_W) '$(srcdir)/lfptostr.c'; fi`
-
-test_lfptostr-run-lfptostr.o: run-lfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfptostr_CFLAGS) $(CFLAGS) -MT test_lfptostr-run-lfptostr.o -MD -MP -MF $(DEPDIR)/test_lfptostr-run-lfptostr.Tpo -c -o test_lfptostr-run-lfptostr.o `test -f 'run-lfptostr.c' || echo '$(srcdir)/'`run-lfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_lfptostr-run-lfptostr.Tpo $(DEPDIR)/test_lfptostr-run-lfptostr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-lfptostr.c' object='test_lfptostr-run-lfptostr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfptostr_CFLAGS) $(CFLAGS) -c -o test_lfptostr-run-lfptostr.o `test -f 'run-lfptostr.c' || echo '$(srcdir)/'`run-lfptostr.c
-
-test_lfptostr-run-lfptostr.obj: run-lfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfptostr_CFLAGS) $(CFLAGS) -MT test_lfptostr-run-lfptostr.obj -MD -MP -MF $(DEPDIR)/test_lfptostr-run-lfptostr.Tpo -c -o test_lfptostr-run-lfptostr.obj `if test -f 'run-lfptostr.c'; then $(CYGPATH_W) 'run-lfptostr.c'; else $(CYGPATH_W) '$(srcdir)/run-lfptostr.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_lfptostr-run-lfptostr.Tpo $(DEPDIR)/test_lfptostr-run-lfptostr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-lfptostr.c' object='test_lfptostr-run-lfptostr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lfptostr_CFLAGS) $(CFLAGS) -c -o test_lfptostr-run-lfptostr.obj `if test -f 'run-lfptostr.c'; then $(CYGPATH_W) 'run-lfptostr.c'; else $(CYGPATH_W) '$(srcdir)/run-lfptostr.c'; fi`
-
-test_modetoa-modetoa.o: modetoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_modetoa_CFLAGS) $(CFLAGS) -MT test_modetoa-modetoa.o -MD -MP -MF $(DEPDIR)/test_modetoa-modetoa.Tpo -c -o test_modetoa-modetoa.o `test -f 'modetoa.c' || echo '$(srcdir)/'`modetoa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_modetoa-modetoa.Tpo $(DEPDIR)/test_modetoa-modetoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='modetoa.c' object='test_modetoa-modetoa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_modetoa_CFLAGS) $(CFLAGS) -c -o test_modetoa-modetoa.o `test -f 'modetoa.c' || echo '$(srcdir)/'`modetoa.c
-
-test_modetoa-modetoa.obj: modetoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_modetoa_CFLAGS) $(CFLAGS) -MT test_modetoa-modetoa.obj -MD -MP -MF $(DEPDIR)/test_modetoa-modetoa.Tpo -c -o test_modetoa-modetoa.obj `if test -f 'modetoa.c'; then $(CYGPATH_W) 'modetoa.c'; else $(CYGPATH_W) '$(srcdir)/modetoa.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_modetoa-modetoa.Tpo $(DEPDIR)/test_modetoa-modetoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='modetoa.c' object='test_modetoa-modetoa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_modetoa_CFLAGS) $(CFLAGS) -c -o test_modetoa-modetoa.obj `if test -f 'modetoa.c'; then $(CYGPATH_W) 'modetoa.c'; else $(CYGPATH_W) '$(srcdir)/modetoa.c'; fi`
-
-test_modetoa-run-modetoa.o: run-modetoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_modetoa_CFLAGS) $(CFLAGS) -MT test_modetoa-run-modetoa.o -MD -MP -MF $(DEPDIR)/test_modetoa-run-modetoa.Tpo -c -o test_modetoa-run-modetoa.o `test -f 'run-modetoa.c' || echo '$(srcdir)/'`run-modetoa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_modetoa-run-modetoa.Tpo $(DEPDIR)/test_modetoa-run-modetoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-modetoa.c' object='test_modetoa-run-modetoa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_modetoa_CFLAGS) $(CFLAGS) -c -o test_modetoa-run-modetoa.o `test -f 'run-modetoa.c' || echo '$(srcdir)/'`run-modetoa.c
-
-test_modetoa-run-modetoa.obj: run-modetoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_modetoa_CFLAGS) $(CFLAGS) -MT test_modetoa-run-modetoa.obj -MD -MP -MF $(DEPDIR)/test_modetoa-run-modetoa.Tpo -c -o test_modetoa-run-modetoa.obj `if test -f 'run-modetoa.c'; then $(CYGPATH_W) 'run-modetoa.c'; else $(CYGPATH_W) '$(srcdir)/run-modetoa.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_modetoa-run-modetoa.Tpo $(DEPDIR)/test_modetoa-run-modetoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-modetoa.c' object='test_modetoa-run-modetoa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_modetoa_CFLAGS) $(CFLAGS) -c -o test_modetoa-run-modetoa.obj `if test -f 'run-modetoa.c'; then $(CYGPATH_W) 'run-modetoa.c'; else $(CYGPATH_W) '$(srcdir)/run-modetoa.c'; fi`
-
-test_msyslog-msyslog.o: msyslog.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_msyslog_CFLAGS) $(CFLAGS) -MT test_msyslog-msyslog.o -MD -MP -MF $(DEPDIR)/test_msyslog-msyslog.Tpo -c -o test_msyslog-msyslog.o `test -f 'msyslog.c' || echo '$(srcdir)/'`msyslog.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_msyslog-msyslog.Tpo $(DEPDIR)/test_msyslog-msyslog.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='msyslog.c' object='test_msyslog-msyslog.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_msyslog_CFLAGS) $(CFLAGS) -c -o test_msyslog-msyslog.o `test -f 'msyslog.c' || echo '$(srcdir)/'`msyslog.c
-
-test_msyslog-msyslog.obj: msyslog.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_msyslog_CFLAGS) $(CFLAGS) -MT test_msyslog-msyslog.obj -MD -MP -MF $(DEPDIR)/test_msyslog-msyslog.Tpo -c -o test_msyslog-msyslog.obj `if test -f 'msyslog.c'; then $(CYGPATH_W) 'msyslog.c'; else $(CYGPATH_W) '$(srcdir)/msyslog.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_msyslog-msyslog.Tpo $(DEPDIR)/test_msyslog-msyslog.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='msyslog.c' object='test_msyslog-msyslog.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_msyslog_CFLAGS) $(CFLAGS) -c -o test_msyslog-msyslog.obj `if test -f 'msyslog.c'; then $(CYGPATH_W) 'msyslog.c'; else $(CYGPATH_W) '$(srcdir)/msyslog.c'; fi`
-
-test_msyslog-run-msyslog.o: run-msyslog.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_msyslog_CFLAGS) $(CFLAGS) -MT test_msyslog-run-msyslog.o -MD -MP -MF $(DEPDIR)/test_msyslog-run-msyslog.Tpo -c -o test_msyslog-run-msyslog.o `test -f 'run-msyslog.c' || echo '$(srcdir)/'`run-msyslog.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_msyslog-run-msyslog.Tpo $(DEPDIR)/test_msyslog-run-msyslog.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-msyslog.c' object='test_msyslog-run-msyslog.o' libtool=no @AMDEPBACKSLASH@
+test_decodenetnum-sockaddrtest.o: sockaddrtest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_decodenetnum_CFLAGS) $(CFLAGS) -MT test_decodenetnum-sockaddrtest.o -MD -MP -MF $(DEPDIR)/test_decodenetnum-sockaddrtest.Tpo -c -o test_decodenetnum-sockaddrtest.o `test -f 'sockaddrtest.c' || echo '$(srcdir)/'`sockaddrtest.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_decodenetnum-sockaddrtest.Tpo $(DEPDIR)/test_decodenetnum-sockaddrtest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sockaddrtest.c' object='test_decodenetnum-sockaddrtest.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_msyslog_CFLAGS) $(CFLAGS) -c -o test_msyslog-run-msyslog.o `test -f 'run-msyslog.c' || echo '$(srcdir)/'`run-msyslog.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_decodenetnum_CFLAGS) $(CFLAGS) -c -o test_decodenetnum-sockaddrtest.o `test -f 'sockaddrtest.c' || echo '$(srcdir)/'`sockaddrtest.c
-test_msyslog-run-msyslog.obj: run-msyslog.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_msyslog_CFLAGS) $(CFLAGS) -MT test_msyslog-run-msyslog.obj -MD -MP -MF $(DEPDIR)/test_msyslog-run-msyslog.Tpo -c -o test_msyslog-run-msyslog.obj `if test -f 'run-msyslog.c'; then $(CYGPATH_W) 'run-msyslog.c'; else $(CYGPATH_W) '$(srcdir)/run-msyslog.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_msyslog-run-msyslog.Tpo $(DEPDIR)/test_msyslog-run-msyslog.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-msyslog.c' object='test_msyslog-run-msyslog.obj' libtool=no @AMDEPBACKSLASH@
+test_decodenetnum-sockaddrtest.obj: sockaddrtest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_decodenetnum_CFLAGS) $(CFLAGS) -MT test_decodenetnum-sockaddrtest.obj -MD -MP -MF $(DEPDIR)/test_decodenetnum-sockaddrtest.Tpo -c -o test_decodenetnum-sockaddrtest.obj `if test -f 'sockaddrtest.c'; then $(CYGPATH_W) 'sockaddrtest.c'; else $(CYGPATH_W) '$(srcdir)/sockaddrtest.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_decodenetnum-sockaddrtest.Tpo $(DEPDIR)/test_decodenetnum-sockaddrtest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sockaddrtest.c' object='test_decodenetnum-sockaddrtest.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_msyslog_CFLAGS) $(CFLAGS) -c -o test_msyslog-run-msyslog.obj `if test -f 'run-msyslog.c'; then $(CYGPATH_W) 'run-msyslog.c'; else $(CYGPATH_W) '$(srcdir)/run-msyslog.c'; fi`
-
-test_netof-netof.o: netof.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_netof_CFLAGS) $(CFLAGS) -MT test_netof-netof.o -MD -MP -MF $(DEPDIR)/test_netof-netof.Tpo -c -o test_netof-netof.o `test -f 'netof.c' || echo '$(srcdir)/'`netof.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_netof-netof.Tpo $(DEPDIR)/test_netof-netof.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='netof.c' object='test_netof-netof.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_netof_CFLAGS) $(CFLAGS) -c -o test_netof-netof.o `test -f 'netof.c' || echo '$(srcdir)/'`netof.c
-
-test_netof-netof.obj: netof.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_netof_CFLAGS) $(CFLAGS) -MT test_netof-netof.obj -MD -MP -MF $(DEPDIR)/test_netof-netof.Tpo -c -o test_netof-netof.obj `if test -f 'netof.c'; then $(CYGPATH_W) 'netof.c'; else $(CYGPATH_W) '$(srcdir)/netof.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_netof-netof.Tpo $(DEPDIR)/test_netof-netof.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='netof.c' object='test_netof-netof.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_netof_CFLAGS) $(CFLAGS) -c -o test_netof-netof.obj `if test -f 'netof.c'; then $(CYGPATH_W) 'netof.c'; else $(CYGPATH_W) '$(srcdir)/netof.c'; fi`
-
-test_netof-run-netof.o: run-netof.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_netof_CFLAGS) $(CFLAGS) -MT test_netof-run-netof.o -MD -MP -MF $(DEPDIR)/test_netof-run-netof.Tpo -c -o test_netof-run-netof.o `test -f 'run-netof.c' || echo '$(srcdir)/'`run-netof.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_netof-run-netof.Tpo $(DEPDIR)/test_netof-run-netof.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-netof.c' object='test_netof-run-netof.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_netof_CFLAGS) $(CFLAGS) -c -o test_netof-run-netof.o `test -f 'run-netof.c' || echo '$(srcdir)/'`run-netof.c
-
-test_netof-run-netof.obj: run-netof.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_netof_CFLAGS) $(CFLAGS) -MT test_netof-run-netof.obj -MD -MP -MF $(DEPDIR)/test_netof-run-netof.Tpo -c -o test_netof-run-netof.obj `if test -f 'run-netof.c'; then $(CYGPATH_W) 'run-netof.c'; else $(CYGPATH_W) '$(srcdir)/run-netof.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_netof-run-netof.Tpo $(DEPDIR)/test_netof-run-netof.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-netof.c' object='test_netof-run-netof.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_netof_CFLAGS) $(CFLAGS) -c -o test_netof-run-netof.obj `if test -f 'run-netof.c'; then $(CYGPATH_W) 'run-netof.c'; else $(CYGPATH_W) '$(srcdir)/run-netof.c'; fi`
-
-test_numtoa-numtoa.o: numtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtoa_CFLAGS) $(CFLAGS) -MT test_numtoa-numtoa.o -MD -MP -MF $(DEPDIR)/test_numtoa-numtoa.Tpo -c -o test_numtoa-numtoa.o `test -f 'numtoa.c' || echo '$(srcdir)/'`numtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numtoa-numtoa.Tpo $(DEPDIR)/test_numtoa-numtoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='numtoa.c' object='test_numtoa-numtoa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtoa_CFLAGS) $(CFLAGS) -c -o test_numtoa-numtoa.o `test -f 'numtoa.c' || echo '$(srcdir)/'`numtoa.c
-
-test_numtoa-numtoa.obj: numtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtoa_CFLAGS) $(CFLAGS) -MT test_numtoa-numtoa.obj -MD -MP -MF $(DEPDIR)/test_numtoa-numtoa.Tpo -c -o test_numtoa-numtoa.obj `if test -f 'numtoa.c'; then $(CYGPATH_W) 'numtoa.c'; else $(CYGPATH_W) '$(srcdir)/numtoa.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numtoa-numtoa.Tpo $(DEPDIR)/test_numtoa-numtoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='numtoa.c' object='test_numtoa-numtoa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtoa_CFLAGS) $(CFLAGS) -c -o test_numtoa-numtoa.obj `if test -f 'numtoa.c'; then $(CYGPATH_W) 'numtoa.c'; else $(CYGPATH_W) '$(srcdir)/numtoa.c'; fi`
-
-test_numtoa-run-numtoa.o: run-numtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtoa_CFLAGS) $(CFLAGS) -MT test_numtoa-run-numtoa.o -MD -MP -MF $(DEPDIR)/test_numtoa-run-numtoa.Tpo -c -o test_numtoa-run-numtoa.o `test -f 'run-numtoa.c' || echo '$(srcdir)/'`run-numtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numtoa-run-numtoa.Tpo $(DEPDIR)/test_numtoa-run-numtoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-numtoa.c' object='test_numtoa-run-numtoa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtoa_CFLAGS) $(CFLAGS) -c -o test_numtoa-run-numtoa.o `test -f 'run-numtoa.c' || echo '$(srcdir)/'`run-numtoa.c
-
-test_numtoa-run-numtoa.obj: run-numtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtoa_CFLAGS) $(CFLAGS) -MT test_numtoa-run-numtoa.obj -MD -MP -MF $(DEPDIR)/test_numtoa-run-numtoa.Tpo -c -o test_numtoa-run-numtoa.obj `if test -f 'run-numtoa.c'; then $(CYGPATH_W) 'run-numtoa.c'; else $(CYGPATH_W) '$(srcdir)/run-numtoa.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numtoa-run-numtoa.Tpo $(DEPDIR)/test_numtoa-run-numtoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-numtoa.c' object='test_numtoa-run-numtoa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtoa_CFLAGS) $(CFLAGS) -c -o test_numtoa-run-numtoa.obj `if test -f 'run-numtoa.c'; then $(CYGPATH_W) 'run-numtoa.c'; else $(CYGPATH_W) '$(srcdir)/run-numtoa.c'; fi`
-
-test_numtohost-numtohost.o: numtohost.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtohost_CFLAGS) $(CFLAGS) -MT test_numtohost-numtohost.o -MD -MP -MF $(DEPDIR)/test_numtohost-numtohost.Tpo -c -o test_numtohost-numtohost.o `test -f 'numtohost.c' || echo '$(srcdir)/'`numtohost.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numtohost-numtohost.Tpo $(DEPDIR)/test_numtohost-numtohost.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='numtohost.c' object='test_numtohost-numtohost.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtohost_CFLAGS) $(CFLAGS) -c -o test_numtohost-numtohost.o `test -f 'numtohost.c' || echo '$(srcdir)/'`numtohost.c
-
-test_numtohost-numtohost.obj: numtohost.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtohost_CFLAGS) $(CFLAGS) -MT test_numtohost-numtohost.obj -MD -MP -MF $(DEPDIR)/test_numtohost-numtohost.Tpo -c -o test_numtohost-numtohost.obj `if test -f 'numtohost.c'; then $(CYGPATH_W) 'numtohost.c'; else $(CYGPATH_W) '$(srcdir)/numtohost.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numtohost-numtohost.Tpo $(DEPDIR)/test_numtohost-numtohost.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='numtohost.c' object='test_numtohost-numtohost.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtohost_CFLAGS) $(CFLAGS) -c -o test_numtohost-numtohost.obj `if test -f 'numtohost.c'; then $(CYGPATH_W) 'numtohost.c'; else $(CYGPATH_W) '$(srcdir)/numtohost.c'; fi`
-
-test_numtohost-run-numtohost.o: run-numtohost.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtohost_CFLAGS) $(CFLAGS) -MT test_numtohost-run-numtohost.o -MD -MP -MF $(DEPDIR)/test_numtohost-run-numtohost.Tpo -c -o test_numtohost-run-numtohost.o `test -f 'run-numtohost.c' || echo '$(srcdir)/'`run-numtohost.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numtohost-run-numtohost.Tpo $(DEPDIR)/test_numtohost-run-numtohost.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-numtohost.c' object='test_numtohost-run-numtohost.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtohost_CFLAGS) $(CFLAGS) -c -o test_numtohost-run-numtohost.o `test -f 'run-numtohost.c' || echo '$(srcdir)/'`run-numtohost.c
-
-test_numtohost-run-numtohost.obj: run-numtohost.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtohost_CFLAGS) $(CFLAGS) -MT test_numtohost-run-numtohost.obj -MD -MP -MF $(DEPDIR)/test_numtohost-run-numtohost.Tpo -c -o test_numtohost-run-numtohost.obj `if test -f 'run-numtohost.c'; then $(CYGPATH_W) 'run-numtohost.c'; else $(CYGPATH_W) '$(srcdir)/run-numtohost.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_numtohost-run-numtohost.Tpo $(DEPDIR)/test_numtohost-run-numtohost.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-numtohost.c' object='test_numtohost-run-numtohost.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_numtohost_CFLAGS) $(CFLAGS) -c -o test_numtohost-run-numtohost.obj `if test -f 'run-numtohost.c'; then $(CYGPATH_W) 'run-numtohost.c'; else $(CYGPATH_W) '$(srcdir)/run-numtohost.c'; fi`
-
-test_octtoint-octtoint.o: octtoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_octtoint_CFLAGS) $(CFLAGS) -MT test_octtoint-octtoint.o -MD -MP -MF $(DEPDIR)/test_octtoint-octtoint.Tpo -c -o test_octtoint-octtoint.o `test -f 'octtoint.c' || echo '$(srcdir)/'`octtoint.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_octtoint-octtoint.Tpo $(DEPDIR)/test_octtoint-octtoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='octtoint.c' object='test_octtoint-octtoint.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_octtoint_CFLAGS) $(CFLAGS) -c -o test_octtoint-octtoint.o `test -f 'octtoint.c' || echo '$(srcdir)/'`octtoint.c
-
-test_octtoint-octtoint.obj: octtoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_octtoint_CFLAGS) $(CFLAGS) -MT test_octtoint-octtoint.obj -MD -MP -MF $(DEPDIR)/test_octtoint-octtoint.Tpo -c -o test_octtoint-octtoint.obj `if test -f 'octtoint.c'; then $(CYGPATH_W) 'octtoint.c'; else $(CYGPATH_W) '$(srcdir)/octtoint.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_octtoint-octtoint.Tpo $(DEPDIR)/test_octtoint-octtoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='octtoint.c' object='test_octtoint-octtoint.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_octtoint_CFLAGS) $(CFLAGS) -c -o test_octtoint-octtoint.obj `if test -f 'octtoint.c'; then $(CYGPATH_W) 'octtoint.c'; else $(CYGPATH_W) '$(srcdir)/octtoint.c'; fi`
-
-test_octtoint-run-octtoint.o: run-octtoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_octtoint_CFLAGS) $(CFLAGS) -MT test_octtoint-run-octtoint.o -MD -MP -MF $(DEPDIR)/test_octtoint-run-octtoint.Tpo -c -o test_octtoint-run-octtoint.o `test -f 'run-octtoint.c' || echo '$(srcdir)/'`run-octtoint.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_octtoint-run-octtoint.Tpo $(DEPDIR)/test_octtoint-run-octtoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-octtoint.c' object='test_octtoint-run-octtoint.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_octtoint_CFLAGS) $(CFLAGS) -c -o test_octtoint-run-octtoint.o `test -f 'run-octtoint.c' || echo '$(srcdir)/'`run-octtoint.c
-
-test_octtoint-run-octtoint.obj: run-octtoint.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_octtoint_CFLAGS) $(CFLAGS) -MT test_octtoint-run-octtoint.obj -MD -MP -MF $(DEPDIR)/test_octtoint-run-octtoint.Tpo -c -o test_octtoint-run-octtoint.obj `if test -f 'run-octtoint.c'; then $(CYGPATH_W) 'run-octtoint.c'; else $(CYGPATH_W) '$(srcdir)/run-octtoint.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_octtoint-run-octtoint.Tpo $(DEPDIR)/test_octtoint-run-octtoint.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-octtoint.c' object='test_octtoint-run-octtoint.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_octtoint_CFLAGS) $(CFLAGS) -c -o test_octtoint-run-octtoint.obj `if test -f 'run-octtoint.c'; then $(CYGPATH_W) 'run-octtoint.c'; else $(CYGPATH_W) '$(srcdir)/run-octtoint.c'; fi`
-
-test_prettydate-prettydate.o: prettydate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_prettydate_CFLAGS) $(CFLAGS) -MT test_prettydate-prettydate.o -MD -MP -MF $(DEPDIR)/test_prettydate-prettydate.Tpo -c -o test_prettydate-prettydate.o `test -f 'prettydate.c' || echo '$(srcdir)/'`prettydate.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_prettydate-prettydate.Tpo $(DEPDIR)/test_prettydate-prettydate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prettydate.c' object='test_prettydate-prettydate.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_prettydate_CFLAGS) $(CFLAGS) -c -o test_prettydate-prettydate.o `test -f 'prettydate.c' || echo '$(srcdir)/'`prettydate.c
-
-test_prettydate-prettydate.obj: prettydate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_prettydate_CFLAGS) $(CFLAGS) -MT test_prettydate-prettydate.obj -MD -MP -MF $(DEPDIR)/test_prettydate-prettydate.Tpo -c -o test_prettydate-prettydate.obj `if test -f 'prettydate.c'; then $(CYGPATH_W) 'prettydate.c'; else $(CYGPATH_W) '$(srcdir)/prettydate.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_prettydate-prettydate.Tpo $(DEPDIR)/test_prettydate-prettydate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prettydate.c' object='test_prettydate-prettydate.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_prettydate_CFLAGS) $(CFLAGS) -c -o test_prettydate-prettydate.obj `if test -f 'prettydate.c'; then $(CYGPATH_W) 'prettydate.c'; else $(CYGPATH_W) '$(srcdir)/prettydate.c'; fi`
-
-test_prettydate-run-prettydate.o: run-prettydate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_prettydate_CFLAGS) $(CFLAGS) -MT test_prettydate-run-prettydate.o -MD -MP -MF $(DEPDIR)/test_prettydate-run-prettydate.Tpo -c -o test_prettydate-run-prettydate.o `test -f 'run-prettydate.c' || echo '$(srcdir)/'`run-prettydate.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_prettydate-run-prettydate.Tpo $(DEPDIR)/test_prettydate-run-prettydate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-prettydate.c' object='test_prettydate-run-prettydate.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_prettydate_CFLAGS) $(CFLAGS) -c -o test_prettydate-run-prettydate.o `test -f 'run-prettydate.c' || echo '$(srcdir)/'`run-prettydate.c
-
-test_prettydate-run-prettydate.obj: run-prettydate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_prettydate_CFLAGS) $(CFLAGS) -MT test_prettydate-run-prettydate.obj -MD -MP -MF $(DEPDIR)/test_prettydate-run-prettydate.Tpo -c -o test_prettydate-run-prettydate.obj `if test -f 'run-prettydate.c'; then $(CYGPATH_W) 'run-prettydate.c'; else $(CYGPATH_W) '$(srcdir)/run-prettydate.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_prettydate-run-prettydate.Tpo $(DEPDIR)/test_prettydate-run-prettydate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-prettydate.c' object='test_prettydate-run-prettydate.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_prettydate_CFLAGS) $(CFLAGS) -c -o test_prettydate-run-prettydate.obj `if test -f 'run-prettydate.c'; then $(CYGPATH_W) 'run-prettydate.c'; else $(CYGPATH_W) '$(srcdir)/run-prettydate.c'; fi`
-
-test_recvbuff-recvbuff.o: recvbuff.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_recvbuff_CFLAGS) $(CFLAGS) -MT test_recvbuff-recvbuff.o -MD -MP -MF $(DEPDIR)/test_recvbuff-recvbuff.Tpo -c -o test_recvbuff-recvbuff.o `test -f 'recvbuff.c' || echo '$(srcdir)/'`recvbuff.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_recvbuff-recvbuff.Tpo $(DEPDIR)/test_recvbuff-recvbuff.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='recvbuff.c' object='test_recvbuff-recvbuff.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_recvbuff_CFLAGS) $(CFLAGS) -c -o test_recvbuff-recvbuff.o `test -f 'recvbuff.c' || echo '$(srcdir)/'`recvbuff.c
-
-test_recvbuff-recvbuff.obj: recvbuff.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_recvbuff_CFLAGS) $(CFLAGS) -MT test_recvbuff-recvbuff.obj -MD -MP -MF $(DEPDIR)/test_recvbuff-recvbuff.Tpo -c -o test_recvbuff-recvbuff.obj `if test -f 'recvbuff.c'; then $(CYGPATH_W) 'recvbuff.c'; else $(CYGPATH_W) '$(srcdir)/recvbuff.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_recvbuff-recvbuff.Tpo $(DEPDIR)/test_recvbuff-recvbuff.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='recvbuff.c' object='test_recvbuff-recvbuff.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_recvbuff_CFLAGS) $(CFLAGS) -c -o test_recvbuff-recvbuff.obj `if test -f 'recvbuff.c'; then $(CYGPATH_W) 'recvbuff.c'; else $(CYGPATH_W) '$(srcdir)/recvbuff.c'; fi`
-
-test_recvbuff-run-recvbuff.o: run-recvbuff.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_recvbuff_CFLAGS) $(CFLAGS) -MT test_recvbuff-run-recvbuff.o -MD -MP -MF $(DEPDIR)/test_recvbuff-run-recvbuff.Tpo -c -o test_recvbuff-run-recvbuff.o `test -f 'run-recvbuff.c' || echo '$(srcdir)/'`run-recvbuff.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_recvbuff-run-recvbuff.Tpo $(DEPDIR)/test_recvbuff-run-recvbuff.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-recvbuff.c' object='test_recvbuff-run-recvbuff.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_recvbuff_CFLAGS) $(CFLAGS) -c -o test_recvbuff-run-recvbuff.o `test -f 'run-recvbuff.c' || echo '$(srcdir)/'`run-recvbuff.c
-
-test_recvbuff-run-recvbuff.obj: run-recvbuff.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_recvbuff_CFLAGS) $(CFLAGS) -MT test_recvbuff-run-recvbuff.obj -MD -MP -MF $(DEPDIR)/test_recvbuff-run-recvbuff.Tpo -c -o test_recvbuff-run-recvbuff.obj `if test -f 'run-recvbuff.c'; then $(CYGPATH_W) 'run-recvbuff.c'; else $(CYGPATH_W) '$(srcdir)/run-recvbuff.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_recvbuff-run-recvbuff.Tpo $(DEPDIR)/test_recvbuff-run-recvbuff.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-recvbuff.c' object='test_recvbuff-run-recvbuff.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_recvbuff_CFLAGS) $(CFLAGS) -c -o test_recvbuff-run-recvbuff.obj `if test -f 'run-recvbuff.c'; then $(CYGPATH_W) 'run-recvbuff.c'; else $(CYGPATH_W) '$(srcdir)/run-recvbuff.c'; fi`
-
-test_refidsmear-refidsmear.o: refidsmear.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refidsmear_CFLAGS) $(CFLAGS) -MT test_refidsmear-refidsmear.o -MD -MP -MF $(DEPDIR)/test_refidsmear-refidsmear.Tpo -c -o test_refidsmear-refidsmear.o `test -f 'refidsmear.c' || echo '$(srcdir)/'`refidsmear.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refidsmear-refidsmear.Tpo $(DEPDIR)/test_refidsmear-refidsmear.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='refidsmear.c' object='test_refidsmear-refidsmear.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refidsmear_CFLAGS) $(CFLAGS) -c -o test_refidsmear-refidsmear.o `test -f 'refidsmear.c' || echo '$(srcdir)/'`refidsmear.c
-
-test_refidsmear-refidsmear.obj: refidsmear.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refidsmear_CFLAGS) $(CFLAGS) -MT test_refidsmear-refidsmear.obj -MD -MP -MF $(DEPDIR)/test_refidsmear-refidsmear.Tpo -c -o test_refidsmear-refidsmear.obj `if test -f 'refidsmear.c'; then $(CYGPATH_W) 'refidsmear.c'; else $(CYGPATH_W) '$(srcdir)/refidsmear.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refidsmear-refidsmear.Tpo $(DEPDIR)/test_refidsmear-refidsmear.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='refidsmear.c' object='test_refidsmear-refidsmear.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refidsmear_CFLAGS) $(CFLAGS) -c -o test_refidsmear-refidsmear.obj `if test -f 'refidsmear.c'; then $(CYGPATH_W) 'refidsmear.c'; else $(CYGPATH_W) '$(srcdir)/refidsmear.c'; fi`
-
-test_refidsmear-run-refidsmear.o: run-refidsmear.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refidsmear_CFLAGS) $(CFLAGS) -MT test_refidsmear-run-refidsmear.o -MD -MP -MF $(DEPDIR)/test_refidsmear-run-refidsmear.Tpo -c -o test_refidsmear-run-refidsmear.o `test -f 'run-refidsmear.c' || echo '$(srcdir)/'`run-refidsmear.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refidsmear-run-refidsmear.Tpo $(DEPDIR)/test_refidsmear-run-refidsmear.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-refidsmear.c' object='test_refidsmear-run-refidsmear.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refidsmear_CFLAGS) $(CFLAGS) -c -o test_refidsmear-run-refidsmear.o `test -f 'run-refidsmear.c' || echo '$(srcdir)/'`run-refidsmear.c
-
-test_refidsmear-run-refidsmear.obj: run-refidsmear.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refidsmear_CFLAGS) $(CFLAGS) -MT test_refidsmear-run-refidsmear.obj -MD -MP -MF $(DEPDIR)/test_refidsmear-run-refidsmear.Tpo -c -o test_refidsmear-run-refidsmear.obj `if test -f 'run-refidsmear.c'; then $(CYGPATH_W) 'run-refidsmear.c'; else $(CYGPATH_W) '$(srcdir)/run-refidsmear.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refidsmear-run-refidsmear.Tpo $(DEPDIR)/test_refidsmear-run-refidsmear.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-refidsmear.c' object='test_refidsmear-run-refidsmear.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refidsmear_CFLAGS) $(CFLAGS) -c -o test_refidsmear-run-refidsmear.obj `if test -f 'run-refidsmear.c'; then $(CYGPATH_W) 'run-refidsmear.c'; else $(CYGPATH_W) '$(srcdir)/run-refidsmear.c'; fi`
-
-test_refnumtoa-refnumtoa.o: refnumtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refnumtoa_CFLAGS) $(CFLAGS) -MT test_refnumtoa-refnumtoa.o -MD -MP -MF $(DEPDIR)/test_refnumtoa-refnumtoa.Tpo -c -o test_refnumtoa-refnumtoa.o `test -f 'refnumtoa.c' || echo '$(srcdir)/'`refnumtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refnumtoa-refnumtoa.Tpo $(DEPDIR)/test_refnumtoa-refnumtoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='refnumtoa.c' object='test_refnumtoa-refnumtoa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refnumtoa_CFLAGS) $(CFLAGS) -c -o test_refnumtoa-refnumtoa.o `test -f 'refnumtoa.c' || echo '$(srcdir)/'`refnumtoa.c
-
-test_refnumtoa-refnumtoa.obj: refnumtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refnumtoa_CFLAGS) $(CFLAGS) -MT test_refnumtoa-refnumtoa.obj -MD -MP -MF $(DEPDIR)/test_refnumtoa-refnumtoa.Tpo -c -o test_refnumtoa-refnumtoa.obj `if test -f 'refnumtoa.c'; then $(CYGPATH_W) 'refnumtoa.c'; else $(CYGPATH_W) '$(srcdir)/refnumtoa.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refnumtoa-refnumtoa.Tpo $(DEPDIR)/test_refnumtoa-refnumtoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='refnumtoa.c' object='test_refnumtoa-refnumtoa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refnumtoa_CFLAGS) $(CFLAGS) -c -o test_refnumtoa-refnumtoa.obj `if test -f 'refnumtoa.c'; then $(CYGPATH_W) 'refnumtoa.c'; else $(CYGPATH_W) '$(srcdir)/refnumtoa.c'; fi`
-
-test_refnumtoa-run-refnumtoa.o: run-refnumtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refnumtoa_CFLAGS) $(CFLAGS) -MT test_refnumtoa-run-refnumtoa.o -MD -MP -MF $(DEPDIR)/test_refnumtoa-run-refnumtoa.Tpo -c -o test_refnumtoa-run-refnumtoa.o `test -f 'run-refnumtoa.c' || echo '$(srcdir)/'`run-refnumtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refnumtoa-run-refnumtoa.Tpo $(DEPDIR)/test_refnumtoa-run-refnumtoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-refnumtoa.c' object='test_refnumtoa-run-refnumtoa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refnumtoa_CFLAGS) $(CFLAGS) -c -o test_refnumtoa-run-refnumtoa.o `test -f 'run-refnumtoa.c' || echo '$(srcdir)/'`run-refnumtoa.c
-
-test_refnumtoa-run-refnumtoa.obj: run-refnumtoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refnumtoa_CFLAGS) $(CFLAGS) -MT test_refnumtoa-run-refnumtoa.obj -MD -MP -MF $(DEPDIR)/test_refnumtoa-run-refnumtoa.Tpo -c -o test_refnumtoa-run-refnumtoa.obj `if test -f 'run-refnumtoa.c'; then $(CYGPATH_W) 'run-refnumtoa.c'; else $(CYGPATH_W) '$(srcdir)/run-refnumtoa.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_refnumtoa-run-refnumtoa.Tpo $(DEPDIR)/test_refnumtoa-run-refnumtoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-refnumtoa.c' object='test_refnumtoa-run-refnumtoa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_refnumtoa_CFLAGS) $(CFLAGS) -c -o test_refnumtoa-run-refnumtoa.obj `if test -f 'run-refnumtoa.c'; then $(CYGPATH_W) 'run-refnumtoa.c'; else $(CYGPATH_W) '$(srcdir)/run-refnumtoa.c'; fi`
-
-test_sfptostr-sfptostr.o: sfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sfptostr_CFLAGS) $(CFLAGS) -MT test_sfptostr-sfptostr.o -MD -MP -MF $(DEPDIR)/test_sfptostr-sfptostr.Tpo -c -o test_sfptostr-sfptostr.o `test -f 'sfptostr.c' || echo '$(srcdir)/'`sfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_sfptostr-sfptostr.Tpo $(DEPDIR)/test_sfptostr-sfptostr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sfptostr.c' object='test_sfptostr-sfptostr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sfptostr_CFLAGS) $(CFLAGS) -c -o test_sfptostr-sfptostr.o `test -f 'sfptostr.c' || echo '$(srcdir)/'`sfptostr.c
-
-test_sfptostr-sfptostr.obj: sfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sfptostr_CFLAGS) $(CFLAGS) -MT test_sfptostr-sfptostr.obj -MD -MP -MF $(DEPDIR)/test_sfptostr-sfptostr.Tpo -c -o test_sfptostr-sfptostr.obj `if test -f 'sfptostr.c'; then $(CYGPATH_W) 'sfptostr.c'; else $(CYGPATH_W) '$(srcdir)/sfptostr.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_sfptostr-sfptostr.Tpo $(DEPDIR)/test_sfptostr-sfptostr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sfptostr.c' object='test_sfptostr-sfptostr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sfptostr_CFLAGS) $(CFLAGS) -c -o test_sfptostr-sfptostr.obj `if test -f 'sfptostr.c'; then $(CYGPATH_W) 'sfptostr.c'; else $(CYGPATH_W) '$(srcdir)/sfptostr.c'; fi`
-
-test_sfptostr-run-sfptostr.o: run-sfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sfptostr_CFLAGS) $(CFLAGS) -MT test_sfptostr-run-sfptostr.o -MD -MP -MF $(DEPDIR)/test_sfptostr-run-sfptostr.Tpo -c -o test_sfptostr-run-sfptostr.o `test -f 'run-sfptostr.c' || echo '$(srcdir)/'`run-sfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_sfptostr-run-sfptostr.Tpo $(DEPDIR)/test_sfptostr-run-sfptostr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-sfptostr.c' object='test_sfptostr-run-sfptostr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sfptostr_CFLAGS) $(CFLAGS) -c -o test_sfptostr-run-sfptostr.o `test -f 'run-sfptostr.c' || echo '$(srcdir)/'`run-sfptostr.c
-
-test_sfptostr-run-sfptostr.obj: run-sfptostr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sfptostr_CFLAGS) $(CFLAGS) -MT test_sfptostr-run-sfptostr.obj -MD -MP -MF $(DEPDIR)/test_sfptostr-run-sfptostr.Tpo -c -o test_sfptostr-run-sfptostr.obj `if test -f 'run-sfptostr.c'; then $(CYGPATH_W) 'run-sfptostr.c'; else $(CYGPATH_W) '$(srcdir)/run-sfptostr.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_sfptostr-run-sfptostr.Tpo $(DEPDIR)/test_sfptostr-run-sfptostr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-sfptostr.c' object='test_sfptostr-run-sfptostr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sfptostr_CFLAGS) $(CFLAGS) -c -o test_sfptostr-run-sfptostr.obj `if test -f 'run-sfptostr.c'; then $(CYGPATH_W) 'run-sfptostr.c'; else $(CYGPATH_W) '$(srcdir)/run-sfptostr.c'; fi`
-
-test_socktoa-socktoa.o: socktoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_socktoa_CFLAGS) $(CFLAGS) -MT test_socktoa-socktoa.o -MD -MP -MF $(DEPDIR)/test_socktoa-socktoa.Tpo -c -o test_socktoa-socktoa.o `test -f 'socktoa.c' || echo '$(srcdir)/'`socktoa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_socktoa-socktoa.Tpo $(DEPDIR)/test_socktoa-socktoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='socktoa.c' object='test_socktoa-socktoa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_socktoa_CFLAGS) $(CFLAGS) -c -o test_socktoa-socktoa.o `test -f 'socktoa.c' || echo '$(srcdir)/'`socktoa.c
-
-test_socktoa-socktoa.obj: socktoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_socktoa_CFLAGS) $(CFLAGS) -MT test_socktoa-socktoa.obj -MD -MP -MF $(DEPDIR)/test_socktoa-socktoa.Tpo -c -o test_socktoa-socktoa.obj `if test -f 'socktoa.c'; then $(CYGPATH_W) 'socktoa.c'; else $(CYGPATH_W) '$(srcdir)/socktoa.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_socktoa-socktoa.Tpo $(DEPDIR)/test_socktoa-socktoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='socktoa.c' object='test_socktoa-socktoa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_socktoa_CFLAGS) $(CFLAGS) -c -o test_socktoa-socktoa.obj `if test -f 'socktoa.c'; then $(CYGPATH_W) 'socktoa.c'; else $(CYGPATH_W) '$(srcdir)/socktoa.c'; fi`
-
-test_socktoa-run-socktoa.o: run-socktoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_socktoa_CFLAGS) $(CFLAGS) -MT test_socktoa-run-socktoa.o -MD -MP -MF $(DEPDIR)/test_socktoa-run-socktoa.Tpo -c -o test_socktoa-run-socktoa.o `test -f 'run-socktoa.c' || echo '$(srcdir)/'`run-socktoa.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_socktoa-run-socktoa.Tpo $(DEPDIR)/test_socktoa-run-socktoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-socktoa.c' object='test_socktoa-run-socktoa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_socktoa_CFLAGS) $(CFLAGS) -c -o test_socktoa-run-socktoa.o `test -f 'run-socktoa.c' || echo '$(srcdir)/'`run-socktoa.c
-
-test_socktoa-run-socktoa.obj: run-socktoa.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_socktoa_CFLAGS) $(CFLAGS) -MT test_socktoa-run-socktoa.obj -MD -MP -MF $(DEPDIR)/test_socktoa-run-socktoa.Tpo -c -o test_socktoa-run-socktoa.obj `if test -f 'run-socktoa.c'; then $(CYGPATH_W) 'run-socktoa.c'; else $(CYGPATH_W) '$(srcdir)/run-socktoa.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_socktoa-run-socktoa.Tpo $(DEPDIR)/test_socktoa-run-socktoa.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-socktoa.c' object='test_socktoa-run-socktoa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_socktoa_CFLAGS) $(CFLAGS) -c -o test_socktoa-run-socktoa.obj `if test -f 'run-socktoa.c'; then $(CYGPATH_W) 'run-socktoa.c'; else $(CYGPATH_W) '$(srcdir)/run-socktoa.c'; fi`
-
-test_ssl_init-ssl_init.o: ssl_init.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ssl_init_CFLAGS) $(CFLAGS) -MT test_ssl_init-ssl_init.o -MD -MP -MF $(DEPDIR)/test_ssl_init-ssl_init.Tpo -c -o test_ssl_init-ssl_init.o `test -f 'ssl_init.c' || echo '$(srcdir)/'`ssl_init.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ssl_init-ssl_init.Tpo $(DEPDIR)/test_ssl_init-ssl_init.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ssl_init.c' object='test_ssl_init-ssl_init.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ssl_init_CFLAGS) $(CFLAGS) -c -o test_ssl_init-ssl_init.o `test -f 'ssl_init.c' || echo '$(srcdir)/'`ssl_init.c
-
-test_ssl_init-ssl_init.obj: ssl_init.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ssl_init_CFLAGS) $(CFLAGS) -MT test_ssl_init-ssl_init.obj -MD -MP -MF $(DEPDIR)/test_ssl_init-ssl_init.Tpo -c -o test_ssl_init-ssl_init.obj `if test -f 'ssl_init.c'; then $(CYGPATH_W) 'ssl_init.c'; else $(CYGPATH_W) '$(srcdir)/ssl_init.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ssl_init-ssl_init.Tpo $(DEPDIR)/test_ssl_init-ssl_init.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ssl_init.c' object='test_ssl_init-ssl_init.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ssl_init_CFLAGS) $(CFLAGS) -c -o test_ssl_init-ssl_init.obj `if test -f 'ssl_init.c'; then $(CYGPATH_W) 'ssl_init.c'; else $(CYGPATH_W) '$(srcdir)/ssl_init.c'; fi`
-
-test_ssl_init-run-ssl_init.o: run-ssl_init.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ssl_init_CFLAGS) $(CFLAGS) -MT test_ssl_init-run-ssl_init.o -MD -MP -MF $(DEPDIR)/test_ssl_init-run-ssl_init.Tpo -c -o test_ssl_init-run-ssl_init.o `test -f 'run-ssl_init.c' || echo '$(srcdir)/'`run-ssl_init.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ssl_init-run-ssl_init.Tpo $(DEPDIR)/test_ssl_init-run-ssl_init.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-ssl_init.c' object='test_ssl_init-run-ssl_init.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ssl_init_CFLAGS) $(CFLAGS) -c -o test_ssl_init-run-ssl_init.o `test -f 'run-ssl_init.c' || echo '$(srcdir)/'`run-ssl_init.c
-
-test_ssl_init-run-ssl_init.obj: run-ssl_init.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ssl_init_CFLAGS) $(CFLAGS) -MT test_ssl_init-run-ssl_init.obj -MD -MP -MF $(DEPDIR)/test_ssl_init-run-ssl_init.Tpo -c -o test_ssl_init-run-ssl_init.obj `if test -f 'run-ssl_init.c'; then $(CYGPATH_W) 'run-ssl_init.c'; else $(CYGPATH_W) '$(srcdir)/run-ssl_init.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ssl_init-run-ssl_init.Tpo $(DEPDIR)/test_ssl_init-run-ssl_init.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-ssl_init.c' object='test_ssl_init-run-ssl_init.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ssl_init_CFLAGS) $(CFLAGS) -c -o test_ssl_init-run-ssl_init.obj `if test -f 'run-ssl_init.c'; then $(CYGPATH_W) 'run-ssl_init.c'; else $(CYGPATH_W) '$(srcdir)/run-ssl_init.c'; fi`
-
-test_statestr-statestr.o: statestr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_statestr_CFLAGS) $(CFLAGS) -MT test_statestr-statestr.o -MD -MP -MF $(DEPDIR)/test_statestr-statestr.Tpo -c -o test_statestr-statestr.o `test -f 'statestr.c' || echo '$(srcdir)/'`statestr.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_statestr-statestr.Tpo $(DEPDIR)/test_statestr-statestr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statestr.c' object='test_statestr-statestr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_statestr_CFLAGS) $(CFLAGS) -c -o test_statestr-statestr.o `test -f 'statestr.c' || echo '$(srcdir)/'`statestr.c
-
-test_statestr-statestr.obj: statestr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_statestr_CFLAGS) $(CFLAGS) -MT test_statestr-statestr.obj -MD -MP -MF $(DEPDIR)/test_statestr-statestr.Tpo -c -o test_statestr-statestr.obj `if test -f 'statestr.c'; then $(CYGPATH_W) 'statestr.c'; else $(CYGPATH_W) '$(srcdir)/statestr.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_statestr-statestr.Tpo $(DEPDIR)/test_statestr-statestr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statestr.c' object='test_statestr-statestr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_statestr_CFLAGS) $(CFLAGS) -c -o test_statestr-statestr.obj `if test -f 'statestr.c'; then $(CYGPATH_W) 'statestr.c'; else $(CYGPATH_W) '$(srcdir)/statestr.c'; fi`
-
-test_statestr-run-statestr.o: run-statestr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_statestr_CFLAGS) $(CFLAGS) -MT test_statestr-run-statestr.o -MD -MP -MF $(DEPDIR)/test_statestr-run-statestr.Tpo -c -o test_statestr-run-statestr.o `test -f 'run-statestr.c' || echo '$(srcdir)/'`run-statestr.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_statestr-run-statestr.Tpo $(DEPDIR)/test_statestr-run-statestr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-statestr.c' object='test_statestr-run-statestr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_statestr_CFLAGS) $(CFLAGS) -c -o test_statestr-run-statestr.o `test -f 'run-statestr.c' || echo '$(srcdir)/'`run-statestr.c
-
-test_statestr-run-statestr.obj: run-statestr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_statestr_CFLAGS) $(CFLAGS) -MT test_statestr-run-statestr.obj -MD -MP -MF $(DEPDIR)/test_statestr-run-statestr.Tpo -c -o test_statestr-run-statestr.obj `if test -f 'run-statestr.c'; then $(CYGPATH_W) 'run-statestr.c'; else $(CYGPATH_W) '$(srcdir)/run-statestr.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_statestr-run-statestr.Tpo $(DEPDIR)/test_statestr-run-statestr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-statestr.c' object='test_statestr-run-statestr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_statestr_CFLAGS) $(CFLAGS) -c -o test_statestr-run-statestr.obj `if test -f 'run-statestr.c'; then $(CYGPATH_W) 'run-statestr.c'; else $(CYGPATH_W) '$(srcdir)/run-statestr.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_decodenetnum_CFLAGS) $(CFLAGS) -c -o test_decodenetnum-sockaddrtest.obj `if test -f 'sockaddrtest.c'; then $(CYGPATH_W) 'sockaddrtest.c'; else $(CYGPATH_W) '$(srcdir)/sockaddrtest.c'; fi`
test_strtolfp-strtolfp.o: strtolfp.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_strtolfp_CFLAGS) $(CFLAGS) -MT test_strtolfp-strtolfp.o -MD -MP -MF $(DEPDIR)/test_strtolfp-strtolfp.Tpo -c -o test_strtolfp-strtolfp.o `test -f 'strtolfp.c' || echo '$(srcdir)/'`strtolfp.c
@@ -3062,236 +1856,19 @@ test_strtolfp-run-strtolfp.obj: run-strtolfp.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_strtolfp_CFLAGS) $(CFLAGS) -c -o test_strtolfp-run-strtolfp.obj `if test -f 'run-strtolfp.c'; then $(CYGPATH_W) 'run-strtolfp.c'; else $(CYGPATH_W) '$(srcdir)/run-strtolfp.c'; fi`
-test_timespecops-timespecops.o: timespecops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timespecops_CFLAGS) $(CFLAGS) -MT test_timespecops-timespecops.o -MD -MP -MF $(DEPDIR)/test_timespecops-timespecops.Tpo -c -o test_timespecops-timespecops.o `test -f 'timespecops.c' || echo '$(srcdir)/'`timespecops.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_timespecops-timespecops.Tpo $(DEPDIR)/test_timespecops-timespecops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='timespecops.c' object='test_timespecops-timespecops.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timespecops_CFLAGS) $(CFLAGS) -c -o test_timespecops-timespecops.o `test -f 'timespecops.c' || echo '$(srcdir)/'`timespecops.c
-
-test_timespecops-timespecops.obj: timespecops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timespecops_CFLAGS) $(CFLAGS) -MT test_timespecops-timespecops.obj -MD -MP -MF $(DEPDIR)/test_timespecops-timespecops.Tpo -c -o test_timespecops-timespecops.obj `if test -f 'timespecops.c'; then $(CYGPATH_W) 'timespecops.c'; else $(CYGPATH_W) '$(srcdir)/timespecops.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_timespecops-timespecops.Tpo $(DEPDIR)/test_timespecops-timespecops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='timespecops.c' object='test_timespecops-timespecops.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timespecops_CFLAGS) $(CFLAGS) -c -o test_timespecops-timespecops.obj `if test -f 'timespecops.c'; then $(CYGPATH_W) 'timespecops.c'; else $(CYGPATH_W) '$(srcdir)/timespecops.c'; fi`
-
-test_timespecops-run-timespecops.o: run-timespecops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timespecops_CFLAGS) $(CFLAGS) -MT test_timespecops-run-timespecops.o -MD -MP -MF $(DEPDIR)/test_timespecops-run-timespecops.Tpo -c -o test_timespecops-run-timespecops.o `test -f 'run-timespecops.c' || echo '$(srcdir)/'`run-timespecops.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_timespecops-run-timespecops.Tpo $(DEPDIR)/test_timespecops-run-timespecops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-timespecops.c' object='test_timespecops-run-timespecops.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timespecops_CFLAGS) $(CFLAGS) -c -o test_timespecops-run-timespecops.o `test -f 'run-timespecops.c' || echo '$(srcdir)/'`run-timespecops.c
-
-test_timespecops-run-timespecops.obj: run-timespecops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timespecops_CFLAGS) $(CFLAGS) -MT test_timespecops-run-timespecops.obj -MD -MP -MF $(DEPDIR)/test_timespecops-run-timespecops.Tpo -c -o test_timespecops-run-timespecops.obj `if test -f 'run-timespecops.c'; then $(CYGPATH_W) 'run-timespecops.c'; else $(CYGPATH_W) '$(srcdir)/run-timespecops.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_timespecops-run-timespecops.Tpo $(DEPDIR)/test_timespecops-run-timespecops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-timespecops.c' object='test_timespecops-run-timespecops.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timespecops_CFLAGS) $(CFLAGS) -c -o test_timespecops-run-timespecops.obj `if test -f 'run-timespecops.c'; then $(CYGPATH_W) 'run-timespecops.c'; else $(CYGPATH_W) '$(srcdir)/run-timespecops.c'; fi`
-
-test_timevalops-timevalops.o: timevalops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timevalops_CFLAGS) $(CFLAGS) -MT test_timevalops-timevalops.o -MD -MP -MF $(DEPDIR)/test_timevalops-timevalops.Tpo -c -o test_timevalops-timevalops.o `test -f 'timevalops.c' || echo '$(srcdir)/'`timevalops.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_timevalops-timevalops.Tpo $(DEPDIR)/test_timevalops-timevalops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='timevalops.c' object='test_timevalops-timevalops.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timevalops_CFLAGS) $(CFLAGS) -c -o test_timevalops-timevalops.o `test -f 'timevalops.c' || echo '$(srcdir)/'`timevalops.c
-
-test_timevalops-timevalops.obj: timevalops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timevalops_CFLAGS) $(CFLAGS) -MT test_timevalops-timevalops.obj -MD -MP -MF $(DEPDIR)/test_timevalops-timevalops.Tpo -c -o test_timevalops-timevalops.obj `if test -f 'timevalops.c'; then $(CYGPATH_W) 'timevalops.c'; else $(CYGPATH_W) '$(srcdir)/timevalops.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_timevalops-timevalops.Tpo $(DEPDIR)/test_timevalops-timevalops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='timevalops.c' object='test_timevalops-timevalops.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timevalops_CFLAGS) $(CFLAGS) -c -o test_timevalops-timevalops.obj `if test -f 'timevalops.c'; then $(CYGPATH_W) 'timevalops.c'; else $(CYGPATH_W) '$(srcdir)/timevalops.c'; fi`
-
-test_timevalops-run-timevalops.o: run-timevalops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timevalops_CFLAGS) $(CFLAGS) -MT test_timevalops-run-timevalops.o -MD -MP -MF $(DEPDIR)/test_timevalops-run-timevalops.Tpo -c -o test_timevalops-run-timevalops.o `test -f 'run-timevalops.c' || echo '$(srcdir)/'`run-timevalops.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_timevalops-run-timevalops.Tpo $(DEPDIR)/test_timevalops-run-timevalops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-timevalops.c' object='test_timevalops-run-timevalops.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timevalops_CFLAGS) $(CFLAGS) -c -o test_timevalops-run-timevalops.o `test -f 'run-timevalops.c' || echo '$(srcdir)/'`run-timevalops.c
-
-test_timevalops-run-timevalops.obj: run-timevalops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timevalops_CFLAGS) $(CFLAGS) -MT test_timevalops-run-timevalops.obj -MD -MP -MF $(DEPDIR)/test_timevalops-run-timevalops.Tpo -c -o test_timevalops-run-timevalops.obj `if test -f 'run-timevalops.c'; then $(CYGPATH_W) 'run-timevalops.c'; else $(CYGPATH_W) '$(srcdir)/run-timevalops.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_timevalops-run-timevalops.Tpo $(DEPDIR)/test_timevalops-run-timevalops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-timevalops.c' object='test_timevalops-run-timevalops.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_timevalops_CFLAGS) $(CFLAGS) -c -o test_timevalops-run-timevalops.obj `if test -f 'run-timevalops.c'; then $(CYGPATH_W) 'run-timevalops.c'; else $(CYGPATH_W) '$(srcdir)/run-timevalops.c'; fi`
-
-test_tstotv-tstotv.o: tstotv.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tstotv_CFLAGS) $(CFLAGS) -MT test_tstotv-tstotv.o -MD -MP -MF $(DEPDIR)/test_tstotv-tstotv.Tpo -c -o test_tstotv-tstotv.o `test -f 'tstotv.c' || echo '$(srcdir)/'`tstotv.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_tstotv-tstotv.Tpo $(DEPDIR)/test_tstotv-tstotv.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tstotv.c' object='test_tstotv-tstotv.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tstotv_CFLAGS) $(CFLAGS) -c -o test_tstotv-tstotv.o `test -f 'tstotv.c' || echo '$(srcdir)/'`tstotv.c
-
-test_tstotv-tstotv.obj: tstotv.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tstotv_CFLAGS) $(CFLAGS) -MT test_tstotv-tstotv.obj -MD -MP -MF $(DEPDIR)/test_tstotv-tstotv.Tpo -c -o test_tstotv-tstotv.obj `if test -f 'tstotv.c'; then $(CYGPATH_W) 'tstotv.c'; else $(CYGPATH_W) '$(srcdir)/tstotv.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_tstotv-tstotv.Tpo $(DEPDIR)/test_tstotv-tstotv.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tstotv.c' object='test_tstotv-tstotv.obj' libtool=no @AMDEPBACKSLASH@
+test_strtolfp-lfptest.o: lfptest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_strtolfp_CFLAGS) $(CFLAGS) -MT test_strtolfp-lfptest.o -MD -MP -MF $(DEPDIR)/test_strtolfp-lfptest.Tpo -c -o test_strtolfp-lfptest.o `test -f 'lfptest.c' || echo '$(srcdir)/'`lfptest.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_strtolfp-lfptest.Tpo $(DEPDIR)/test_strtolfp-lfptest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lfptest.c' object='test_strtolfp-lfptest.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tstotv_CFLAGS) $(CFLAGS) -c -o test_tstotv-tstotv.obj `if test -f 'tstotv.c'; then $(CYGPATH_W) 'tstotv.c'; else $(CYGPATH_W) '$(srcdir)/tstotv.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_strtolfp_CFLAGS) $(CFLAGS) -c -o test_strtolfp-lfptest.o `test -f 'lfptest.c' || echo '$(srcdir)/'`lfptest.c
-test_tstotv-run-tstotv.o: run-tstotv.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tstotv_CFLAGS) $(CFLAGS) -MT test_tstotv-run-tstotv.o -MD -MP -MF $(DEPDIR)/test_tstotv-run-tstotv.Tpo -c -o test_tstotv-run-tstotv.o `test -f 'run-tstotv.c' || echo '$(srcdir)/'`run-tstotv.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_tstotv-run-tstotv.Tpo $(DEPDIR)/test_tstotv-run-tstotv.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-tstotv.c' object='test_tstotv-run-tstotv.o' libtool=no @AMDEPBACKSLASH@
+test_strtolfp-lfptest.obj: lfptest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_strtolfp_CFLAGS) $(CFLAGS) -MT test_strtolfp-lfptest.obj -MD -MP -MF $(DEPDIR)/test_strtolfp-lfptest.Tpo -c -o test_strtolfp-lfptest.obj `if test -f 'lfptest.c'; then $(CYGPATH_W) 'lfptest.c'; else $(CYGPATH_W) '$(srcdir)/lfptest.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_strtolfp-lfptest.Tpo $(DEPDIR)/test_strtolfp-lfptest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lfptest.c' object='test_strtolfp-lfptest.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tstotv_CFLAGS) $(CFLAGS) -c -o test_tstotv-run-tstotv.o `test -f 'run-tstotv.c' || echo '$(srcdir)/'`run-tstotv.c
-
-test_tstotv-run-tstotv.obj: run-tstotv.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tstotv_CFLAGS) $(CFLAGS) -MT test_tstotv-run-tstotv.obj -MD -MP -MF $(DEPDIR)/test_tstotv-run-tstotv.Tpo -c -o test_tstotv-run-tstotv.obj `if test -f 'run-tstotv.c'; then $(CYGPATH_W) 'run-tstotv.c'; else $(CYGPATH_W) '$(srcdir)/run-tstotv.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_tstotv-run-tstotv.Tpo $(DEPDIR)/test_tstotv-run-tstotv.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-tstotv.c' object='test_tstotv-run-tstotv.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tstotv_CFLAGS) $(CFLAGS) -c -o test_tstotv-run-tstotv.obj `if test -f 'run-tstotv.c'; then $(CYGPATH_W) 'run-tstotv.c'; else $(CYGPATH_W) '$(srcdir)/run-tstotv.c'; fi`
-
-test_tvtots-tvtots.o: tvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tvtots_CFLAGS) $(CFLAGS) -MT test_tvtots-tvtots.o -MD -MP -MF $(DEPDIR)/test_tvtots-tvtots.Tpo -c -o test_tvtots-tvtots.o `test -f 'tvtots.c' || echo '$(srcdir)/'`tvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_tvtots-tvtots.Tpo $(DEPDIR)/test_tvtots-tvtots.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tvtots.c' object='test_tvtots-tvtots.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tvtots_CFLAGS) $(CFLAGS) -c -o test_tvtots-tvtots.o `test -f 'tvtots.c' || echo '$(srcdir)/'`tvtots.c
-
-test_tvtots-tvtots.obj: tvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tvtots_CFLAGS) $(CFLAGS) -MT test_tvtots-tvtots.obj -MD -MP -MF $(DEPDIR)/test_tvtots-tvtots.Tpo -c -o test_tvtots-tvtots.obj `if test -f 'tvtots.c'; then $(CYGPATH_W) 'tvtots.c'; else $(CYGPATH_W) '$(srcdir)/tvtots.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_tvtots-tvtots.Tpo $(DEPDIR)/test_tvtots-tvtots.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tvtots.c' object='test_tvtots-tvtots.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tvtots_CFLAGS) $(CFLAGS) -c -o test_tvtots-tvtots.obj `if test -f 'tvtots.c'; then $(CYGPATH_W) 'tvtots.c'; else $(CYGPATH_W) '$(srcdir)/tvtots.c'; fi`
-
-test_tvtots-run-tvtots.o: run-tvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tvtots_CFLAGS) $(CFLAGS) -MT test_tvtots-run-tvtots.o -MD -MP -MF $(DEPDIR)/test_tvtots-run-tvtots.Tpo -c -o test_tvtots-run-tvtots.o `test -f 'run-tvtots.c' || echo '$(srcdir)/'`run-tvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_tvtots-run-tvtots.Tpo $(DEPDIR)/test_tvtots-run-tvtots.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-tvtots.c' object='test_tvtots-run-tvtots.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tvtots_CFLAGS) $(CFLAGS) -c -o test_tvtots-run-tvtots.o `test -f 'run-tvtots.c' || echo '$(srcdir)/'`run-tvtots.c
-
-test_tvtots-run-tvtots.obj: run-tvtots.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tvtots_CFLAGS) $(CFLAGS) -MT test_tvtots-run-tvtots.obj -MD -MP -MF $(DEPDIR)/test_tvtots-run-tvtots.Tpo -c -o test_tvtots-run-tvtots.obj `if test -f 'run-tvtots.c'; then $(CYGPATH_W) 'run-tvtots.c'; else $(CYGPATH_W) '$(srcdir)/run-tvtots.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_tvtots-run-tvtots.Tpo $(DEPDIR)/test_tvtots-run-tvtots.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-tvtots.c' object='test_tvtots-run-tvtots.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tvtots_CFLAGS) $(CFLAGS) -c -o test_tvtots-run-tvtots.obj `if test -f 'run-tvtots.c'; then $(CYGPATH_W) 'run-tvtots.c'; else $(CYGPATH_W) '$(srcdir)/run-tvtots.c'; fi`
-
-test_uglydate-uglydate.o: uglydate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_uglydate_CFLAGS) $(CFLAGS) -MT test_uglydate-uglydate.o -MD -MP -MF $(DEPDIR)/test_uglydate-uglydate.Tpo -c -o test_uglydate-uglydate.o `test -f 'uglydate.c' || echo '$(srcdir)/'`uglydate.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_uglydate-uglydate.Tpo $(DEPDIR)/test_uglydate-uglydate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uglydate.c' object='test_uglydate-uglydate.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_uglydate_CFLAGS) $(CFLAGS) -c -o test_uglydate-uglydate.o `test -f 'uglydate.c' || echo '$(srcdir)/'`uglydate.c
-
-test_uglydate-uglydate.obj: uglydate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_uglydate_CFLAGS) $(CFLAGS) -MT test_uglydate-uglydate.obj -MD -MP -MF $(DEPDIR)/test_uglydate-uglydate.Tpo -c -o test_uglydate-uglydate.obj `if test -f 'uglydate.c'; then $(CYGPATH_W) 'uglydate.c'; else $(CYGPATH_W) '$(srcdir)/uglydate.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_uglydate-uglydate.Tpo $(DEPDIR)/test_uglydate-uglydate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uglydate.c' object='test_uglydate-uglydate.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_uglydate_CFLAGS) $(CFLAGS) -c -o test_uglydate-uglydate.obj `if test -f 'uglydate.c'; then $(CYGPATH_W) 'uglydate.c'; else $(CYGPATH_W) '$(srcdir)/uglydate.c'; fi`
-
-test_uglydate-run-uglydate.o: run-uglydate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_uglydate_CFLAGS) $(CFLAGS) -MT test_uglydate-run-uglydate.o -MD -MP -MF $(DEPDIR)/test_uglydate-run-uglydate.Tpo -c -o test_uglydate-run-uglydate.o `test -f 'run-uglydate.c' || echo '$(srcdir)/'`run-uglydate.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_uglydate-run-uglydate.Tpo $(DEPDIR)/test_uglydate-run-uglydate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-uglydate.c' object='test_uglydate-run-uglydate.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_uglydate_CFLAGS) $(CFLAGS) -c -o test_uglydate-run-uglydate.o `test -f 'run-uglydate.c' || echo '$(srcdir)/'`run-uglydate.c
-
-test_uglydate-run-uglydate.obj: run-uglydate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_uglydate_CFLAGS) $(CFLAGS) -MT test_uglydate-run-uglydate.obj -MD -MP -MF $(DEPDIR)/test_uglydate-run-uglydate.Tpo -c -o test_uglydate-run-uglydate.obj `if test -f 'run-uglydate.c'; then $(CYGPATH_W) 'run-uglydate.c'; else $(CYGPATH_W) '$(srcdir)/run-uglydate.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_uglydate-run-uglydate.Tpo $(DEPDIR)/test_uglydate-run-uglydate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-uglydate.c' object='test_uglydate-run-uglydate.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_uglydate_CFLAGS) $(CFLAGS) -c -o test_uglydate-run-uglydate.obj `if test -f 'run-uglydate.c'; then $(CYGPATH_W) 'run-uglydate.c'; else $(CYGPATH_W) '$(srcdir)/run-uglydate.c'; fi`
-
-test_vi64ops-vi64ops.o: vi64ops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_vi64ops_CFLAGS) $(CFLAGS) -MT test_vi64ops-vi64ops.o -MD -MP -MF $(DEPDIR)/test_vi64ops-vi64ops.Tpo -c -o test_vi64ops-vi64ops.o `test -f 'vi64ops.c' || echo '$(srcdir)/'`vi64ops.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_vi64ops-vi64ops.Tpo $(DEPDIR)/test_vi64ops-vi64ops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vi64ops.c' object='test_vi64ops-vi64ops.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_vi64ops_CFLAGS) $(CFLAGS) -c -o test_vi64ops-vi64ops.o `test -f 'vi64ops.c' || echo '$(srcdir)/'`vi64ops.c
-
-test_vi64ops-vi64ops.obj: vi64ops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_vi64ops_CFLAGS) $(CFLAGS) -MT test_vi64ops-vi64ops.obj -MD -MP -MF $(DEPDIR)/test_vi64ops-vi64ops.Tpo -c -o test_vi64ops-vi64ops.obj `if test -f 'vi64ops.c'; then $(CYGPATH_W) 'vi64ops.c'; else $(CYGPATH_W) '$(srcdir)/vi64ops.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_vi64ops-vi64ops.Tpo $(DEPDIR)/test_vi64ops-vi64ops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vi64ops.c' object='test_vi64ops-vi64ops.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_vi64ops_CFLAGS) $(CFLAGS) -c -o test_vi64ops-vi64ops.obj `if test -f 'vi64ops.c'; then $(CYGPATH_W) 'vi64ops.c'; else $(CYGPATH_W) '$(srcdir)/vi64ops.c'; fi`
-
-test_vi64ops-run-vi64ops.o: run-vi64ops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_vi64ops_CFLAGS) $(CFLAGS) -MT test_vi64ops-run-vi64ops.o -MD -MP -MF $(DEPDIR)/test_vi64ops-run-vi64ops.Tpo -c -o test_vi64ops-run-vi64ops.o `test -f 'run-vi64ops.c' || echo '$(srcdir)/'`run-vi64ops.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_vi64ops-run-vi64ops.Tpo $(DEPDIR)/test_vi64ops-run-vi64ops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-vi64ops.c' object='test_vi64ops-run-vi64ops.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_vi64ops_CFLAGS) $(CFLAGS) -c -o test_vi64ops-run-vi64ops.o `test -f 'run-vi64ops.c' || echo '$(srcdir)/'`run-vi64ops.c
-
-test_vi64ops-run-vi64ops.obj: run-vi64ops.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_vi64ops_CFLAGS) $(CFLAGS) -MT test_vi64ops-run-vi64ops.obj -MD -MP -MF $(DEPDIR)/test_vi64ops-run-vi64ops.Tpo -c -o test_vi64ops-run-vi64ops.obj `if test -f 'run-vi64ops.c'; then $(CYGPATH_W) 'run-vi64ops.c'; else $(CYGPATH_W) '$(srcdir)/run-vi64ops.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_vi64ops-run-vi64ops.Tpo $(DEPDIR)/test_vi64ops-run-vi64ops.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-vi64ops.c' object='test_vi64ops-run-vi64ops.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_vi64ops_CFLAGS) $(CFLAGS) -c -o test_vi64ops-run-vi64ops.obj `if test -f 'run-vi64ops.c'; then $(CYGPATH_W) 'run-vi64ops.c'; else $(CYGPATH_W) '$(srcdir)/run-vi64ops.c'; fi`
-
-test_ymd2yd-ymd2yd.o: ymd2yd.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ymd2yd_CFLAGS) $(CFLAGS) -MT test_ymd2yd-ymd2yd.o -MD -MP -MF $(DEPDIR)/test_ymd2yd-ymd2yd.Tpo -c -o test_ymd2yd-ymd2yd.o `test -f 'ymd2yd.c' || echo '$(srcdir)/'`ymd2yd.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ymd2yd-ymd2yd.Tpo $(DEPDIR)/test_ymd2yd-ymd2yd.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ymd2yd.c' object='test_ymd2yd-ymd2yd.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ymd2yd_CFLAGS) $(CFLAGS) -c -o test_ymd2yd-ymd2yd.o `test -f 'ymd2yd.c' || echo '$(srcdir)/'`ymd2yd.c
-
-test_ymd2yd-ymd2yd.obj: ymd2yd.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ymd2yd_CFLAGS) $(CFLAGS) -MT test_ymd2yd-ymd2yd.obj -MD -MP -MF $(DEPDIR)/test_ymd2yd-ymd2yd.Tpo -c -o test_ymd2yd-ymd2yd.obj `if test -f 'ymd2yd.c'; then $(CYGPATH_W) 'ymd2yd.c'; else $(CYGPATH_W) '$(srcdir)/ymd2yd.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ymd2yd-ymd2yd.Tpo $(DEPDIR)/test_ymd2yd-ymd2yd.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ymd2yd.c' object='test_ymd2yd-ymd2yd.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ymd2yd_CFLAGS) $(CFLAGS) -c -o test_ymd2yd-ymd2yd.obj `if test -f 'ymd2yd.c'; then $(CYGPATH_W) 'ymd2yd.c'; else $(CYGPATH_W) '$(srcdir)/ymd2yd.c'; fi`
-
-test_ymd2yd-run-ymd2yd.o: run-ymd2yd.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ymd2yd_CFLAGS) $(CFLAGS) -MT test_ymd2yd-run-ymd2yd.o -MD -MP -MF $(DEPDIR)/test_ymd2yd-run-ymd2yd.Tpo -c -o test_ymd2yd-run-ymd2yd.o `test -f 'run-ymd2yd.c' || echo '$(srcdir)/'`run-ymd2yd.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ymd2yd-run-ymd2yd.Tpo $(DEPDIR)/test_ymd2yd-run-ymd2yd.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-ymd2yd.c' object='test_ymd2yd-run-ymd2yd.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ymd2yd_CFLAGS) $(CFLAGS) -c -o test_ymd2yd-run-ymd2yd.o `test -f 'run-ymd2yd.c' || echo '$(srcdir)/'`run-ymd2yd.c
-
-test_ymd2yd-run-ymd2yd.obj: run-ymd2yd.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ymd2yd_CFLAGS) $(CFLAGS) -MT test_ymd2yd-run-ymd2yd.obj -MD -MP -MF $(DEPDIR)/test_ymd2yd-run-ymd2yd.Tpo -c -o test_ymd2yd-run-ymd2yd.obj `if test -f 'run-ymd2yd.c'; then $(CYGPATH_W) 'run-ymd2yd.c'; else $(CYGPATH_W) '$(srcdir)/run-ymd2yd.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ymd2yd-run-ymd2yd.Tpo $(DEPDIR)/test_ymd2yd-run-ymd2yd.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-ymd2yd.c' object='test_ymd2yd-run-ymd2yd.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ymd2yd_CFLAGS) $(CFLAGS) -c -o test_ymd2yd-run-ymd2yd.obj `if test -f 'run-ymd2yd.c'; then $(CYGPATH_W) 'run-ymd2yd.c'; else $(CYGPATH_W) '$(srcdir)/run-ymd2yd.c'; fi`
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
-
-.cpp.obj:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cpp.lo:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
-
-tests_main.o: $(top_srcdir)/sntp/tests_main.cpp
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.o -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.o `test -f '$(top_srcdir)/sntp/tests_main.cpp' || echo '$(srcdir)/'`$(top_srcdir)/sntp/tests_main.cpp
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/sntp/tests_main.cpp' object='tests_main.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.o `test -f '$(top_srcdir)/sntp/tests_main.cpp' || echo '$(srcdir)/'`$(top_srcdir)/sntp/tests_main.cpp
-
-tests_main.obj: $(top_srcdir)/sntp/tests_main.cpp
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.obj -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.obj `if test -f '$(top_srcdir)/sntp/tests_main.cpp'; then $(CYGPATH_W) '$(top_srcdir)/sntp/tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/sntp/tests_main.cpp'; fi`
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/sntp/tests_main.cpp' object='tests_main.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.obj `if test -f '$(top_srcdir)/sntp/tests_main.cpp'; then $(CYGPATH_W) '$(top_srcdir)/sntp/tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/sntp/tests_main.cpp'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_strtolfp_CFLAGS) $(CFLAGS) -c -o test_strtolfp-lfptest.obj `if test -f 'lfptest.c'; then $(CYGPATH_W) 'lfptest.c'; else $(CYGPATH_W) '$(srcdir)/lfptest.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
@@ -3758,13 +2335,6 @@ test-ymd2yd.log: test-ymd2yd$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-tests.log: tests$(EXEEXT)
- @p='tests$(EXEEXT)'; \
- b='tests'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
@p='$<'; \
$(am__set_b); \
diff --git a/contrib/ntp/tests/libntp/a_md5encrypt.c b/contrib/ntp/tests/libntp/a_md5encrypt.c
index 1738200d314f..f46376efd343 100644
--- a/contrib/ntp/tests/libntp/a_md5encrypt.c
+++ b/contrib/ntp/tests/libntp/a_md5encrypt.c
@@ -12,14 +12,6 @@
u_long current_time = 4;
-void setUp(void)
-{
-}
-
-void tearDown(void)
-{
-}
-
/*
* Example packet with MD5 hash calculated manually.
*/
@@ -27,37 +19,51 @@ const int keytype = KEY_TYPE_MD5;
const char *key = "abcdefgh";
const u_short keyLength = 8;
const char *packet = "ijklmnopqrstuvwx";
-#define packetLength 16 //const int packetLength = 16;
-#define keyIdLength 4 //const int keyIdLength = 4;
-#define digestLength 16 //const int digestLength = 16;
+#define packetLength 16
+#define keyIdLength 4
+#define digestLength 16
const int totalLength = packetLength + keyIdLength + digestLength;
const char *expectedPacket = "ijklmnopqrstuvwx\0\0\0\0\x0c\x0e\x84\xcf\x0b\xb7\xa8\x68\x8e\x52\x38\xdb\xbc\x1c\x39\x53";
-void test_Encrypt() {
- char *packetPtr = malloc(totalLength*sizeof(*packetPtr)); //new char[totalLength];
- memset(packetPtr+packetLength, 0, keyIdLength);
+void test_Encrypt(void);
+void test_DecryptValid(void);
+void test_DecryptInvalid(void);
+void test_IPv4AddressToRefId(void);
+void test_IPv6AddressToRefId(void);
+
+
+void
+test_Encrypt(void) {
+ char *packetPtr;
+ int length;
+
+ packetPtr = emalloc(totalLength * sizeof(*packetPtr));
+
+ memset(packetPtr + packetLength, 0, keyIdLength);
memcpy(packetPtr, packet, packetLength);
cache_secretsize = keyLength;
- int length = MD5authencrypt(keytype, (u_char*)key, (u_int32*)packetPtr, packetLength);
+ length = MD5authencrypt(keytype, (u_char*)key, (u_int32*)packetPtr, packetLength);
TEST_ASSERT_TRUE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)packetPtr, packetLength, length));
TEST_ASSERT_EQUAL(20, length);
- TEST_ASSERT_TRUE(memcmp(expectedPacket, packetPtr, totalLength) == 0);
+ TEST_ASSERT_EQUAL_MEMORY(expectedPacket, packetPtr, totalLength);
- free(packetPtr); //delete[] packetPtr;
+ free(packetPtr);
}
-void test_DecryptValid() {
+void
+test_DecryptValid(void) {
cache_secretsize = keyLength;
TEST_ASSERT_TRUE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)expectedPacket, packetLength, 20));
}
-void test_DecryptInvalid() {
+void
+test_DecryptInvalid(void) {
cache_secretsize = keyLength;
const char *invalidPacket = "ijklmnopqrstuvwx\0\0\0\0\x0c\x0e\x84\xcf\x0b\xb7\xa8\x68\x8e\x52\x38\xdb\xbc\x1c\x39\x54";
@@ -65,18 +71,22 @@ void test_DecryptInvalid() {
TEST_ASSERT_FALSE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)invalidPacket, packetLength, 20));
}
-void test_IPv4AddressToRefId() {
+void
+test_IPv4AddressToRefId(void) {
sockaddr_u addr;
addr.sa4.sin_family = AF_INET;
+ u_int32 address;
+
addr.sa4.sin_port = htons(80);
- u_int32 address = inet_addr("192.0.2.1");
+ address = inet_addr("192.0.2.1");
addr.sa4.sin_addr.s_addr = address;
TEST_ASSERT_EQUAL(address, addr2refid(&addr));
}
-void test_IPv6AddressToRefId() {
+void
+test_IPv6AddressToRefId(void) {
const struct in6_addr address = {
0x20, 0x01, 0x0d, 0xb8,
0x85, 0xa3, 0x08, 0xd3,
diff --git a/contrib/ntp/tests/libntp/atoint.c b/contrib/ntp/tests/libntp/atoint.c
index aca6ef596655..e640c36d0fb9 100644
--- a/contrib/ntp/tests/libntp/atoint.c
+++ b/contrib/ntp/tests/libntp/atoint.c
@@ -4,6 +4,15 @@
#include "ntp_calendar.h"
#include "unity.h"
+void test_RegularPositive(void);
+void test_RegularNegative(void);
+void test_PositiveOverflowBoundary(void);
+void test_NegativeOverflowBoundary(void);
+void test_PositiveOverflowBig(void);
+void test_IllegalCharacter(void);
+
+
+
void test_RegularPositive(void) {
const char *str = "17";
long val;
diff --git a/contrib/ntp/tests/libntp/atouint.c b/contrib/ntp/tests/libntp/atouint.c
index 33c15a9141c3..460bf1caf554 100644
--- a/contrib/ntp/tests/libntp/atouint.c
+++ b/contrib/ntp/tests/libntp/atouint.c
@@ -6,7 +6,15 @@
#include "unity.h"
-void test_RegularPositive() {
+void test_RegularPositive(void);
+void test_PositiveOverflowBoundary(void);
+void test_PositiveOverflowBig(void);
+void test_Negative(void);
+void test_IllegalChar(void);
+
+
+
+void test_RegularPositive(void) {
const char *str = "305";
u_long actual;
@@ -14,28 +22,28 @@ void test_RegularPositive() {
TEST_ASSERT_EQUAL(305, actual);
}
-void test_PositiveOverflowBoundary() {
+void test_PositiveOverflowBoundary(void) {
const char *str = "4294967296";
u_long actual;
TEST_ASSERT_FALSE(atouint(str, &actual));
}
-void test_PositiveOverflowBig() {
+void test_PositiveOverflowBig(void) {
const char *str = "8000000000";
u_long actual;
TEST_ASSERT_FALSE(atouint(str, &actual));
}
-void test_Negative() {
+void test_Negative(void) {
const char *str = "-1";
u_long actual;
TEST_ASSERT_FALSE(atouint(str, &actual));
}
-void test_IllegalChar() {
+void test_IllegalChar(void) {
const char *str = "50c3";
u_long actual;
diff --git a/contrib/ntp/tests/libntp/authkeys.c b/contrib/ntp/tests/libntp/authkeys.c
index b949628da3bd..6a10c01c5c66 100644
--- a/contrib/ntp/tests/libntp/authkeys.c
+++ b/contrib/ntp/tests/libntp/authkeys.c
@@ -17,16 +17,26 @@
u_long current_time = 4;
int counter = 0;
-
-// old code from google test framework, moved to SetUp() for unity
-void setUp(void)
+void setUp(void);
+void tearDown(void);
+void AddTrustedKey(keyid_t keyno);
+void AddUntrustedKey(keyid_t keyno);
+void test_AddTrustedKeys(void);
+void test_AddUntrustedKey(void);
+void test_HaveKeyCorrect(void);
+void test_HaveKeyIncorrect(void);
+void test_AddWithAuthUseKey(void);
+void test_EmptyKey(void);
+
+
+void
+setUp(void)
{
-// init_lib();
- if(counter ==0){
- counter++;
- init_auth(); //causes segfault if called more than once
+ if (counter == 0) {
+ counter++;
+ init_auth(); // causes segfault if called more than once
}
-/*
+ /*
* init_auth() is called by tests_main.cpp earlier. It
* does not initialize global variables like
* authnumkeys, so let's reset them to zero here.
@@ -41,20 +51,18 @@ void setUp(void)
cache_flags = 0;
cache_secret = NULL;
cache_secretsize = 0;
-
}
-void tearDown(void)
+void
+tearDown(void)
{
-}
+}
static const int KEYTYPE = KEY_TYPE_MD5;
-
-
-
-void AddTrustedKey(keyid_t keyno) {
+void
+AddTrustedKey(keyid_t keyno) {
/*
* We need to add a MD5-key in addition to setting the
* trust, because authhavekey() requires type != 0.
@@ -64,11 +72,13 @@ void AddTrustedKey(keyid_t keyno) {
authtrust(keyno, TRUE);
}
-void AddUntrustedKey(keyid_t keyno) {
+void
+AddUntrustedKey(keyid_t keyno) {
authtrust(keyno, FALSE);
}
-void test_AddTrustedKeys() {
+void
+test_AddTrustedKeys(void) {
const keyid_t KEYNO1 = 5;
const keyid_t KEYNO2 = 8;
@@ -79,7 +89,8 @@ void test_AddTrustedKeys() {
TEST_ASSERT_TRUE(authistrusted(KEYNO2));
}
-void test_AddUntrustedKey() {
+void
+test_AddUntrustedKey(void) {
const keyid_t KEYNO = 3;
AddUntrustedKey(KEYNO);
@@ -87,7 +98,8 @@ void test_AddUntrustedKey() {
TEST_ASSERT_FALSE(authistrusted(KEYNO));
}
-void test_HaveKeyCorrect() {
+void
+test_HaveKeyCorrect(void) {
const keyid_t KEYNO = 3;
AddTrustedKey(KEYNO);
@@ -96,21 +108,24 @@ void test_HaveKeyCorrect() {
TEST_ASSERT_TRUE(authhavekey(KEYNO));
}
-void test_HaveKeyIncorrect() {
+void
+test_HaveKeyIncorrect(void) {
const keyid_t KEYNO = 2;
TEST_ASSERT_FALSE(auth_havekey(KEYNO));
TEST_ASSERT_FALSE(authhavekey(KEYNO));
}
-void test_AddWithAuthUseKey() {
+void
+test_AddWithAuthUseKey(void) {
const keyid_t KEYNO = 5;
const char* KEY = "52a";
TEST_ASSERT_TRUE(authusekey(KEYNO, KEYTYPE, (u_char*)KEY));
}
-void test_EmptyKey() {
+void
+test_EmptyKey(void) {
const keyid_t KEYNO = 3;
const char* KEY = "";
diff --git a/contrib/ntp/tests/libntp/buftvtots.c b/contrib/ntp/tests/libntp/buftvtots.c
index edeedf63ad2b..efde0090440a 100644
--- a/contrib/ntp/tests/libntp/buftvtots.c
+++ b/contrib/ntp/tests/libntp/buftvtots.c
@@ -8,15 +8,20 @@
#include "unity.h"
-// Required for Solaris.
+/* Required for Solaris. */
#include <math.h>
+void test_ZeroBuffer(void);
+void test_IntegerAndFractionalBuffer(void);
+void test_IllegalMicroseconds(void);
+void test_AlwaysFalseOnWindows(void);
-void test_ZeroBuffer() {
+void
+test_ZeroBuffer(void) {
#ifndef SYS_WINNT
const struct timeval input = {0, 0};
- const l_fp expected = {0 + JAN_1970, 0};
+ const l_fp expected = {{0 + JAN_1970}, 0};
l_fp actual;
@@ -27,32 +32,33 @@ void test_ZeroBuffer() {
#endif
}
-void test_IntegerAndFractionalBuffer() {
+void
+test_IntegerAndFractionalBuffer(void) {
#ifndef SYS_WINNT
- const struct timeval input = {5, 500000}; // 5.5
- const l_fp expected = {5 + JAN_1970, HALF};
-
+ const struct timeval input = {5, 500000}; /* 5.5 */
+ const l_fp expected = {{5 + JAN_1970}, HALF};
+ double expectedDouble, actualDouble;
l_fp actual;
TEST_ASSERT_TRUE(buftvtots((const char*)(&input), &actual));
- // Compare the fractional part with an absolute error given.
+ /* Compare the fractional part with an absolute error given. */
TEST_ASSERT_EQUAL(expected.l_ui, actual.l_ui);
- double expectedDouble, actualDouble;
M_LFPTOD(0, expected.l_uf, expectedDouble);
M_LFPTOD(0, actual.l_uf, actualDouble);
- // The error should be less than 0.5 us
- TEST_ASSERT_DOUBLE_WITHIN(0.0000005,expectedDouble,actualDouble); //delta,epected,actual //_EXPECT_NEAR(expectedDouble, actualDouble, 0.0000005);
+ /* The error should be less than 0.5 us */
+ TEST_ASSERT_DOUBLE_WITHIN(0.0000005, expectedDouble, actualDouble);
#else
TEST_IGNORE_MESSAGE("Test only for Windows, skipping...");
#endif
}
-void test_IllegalMicroseconds() {
+void
+test_IllegalMicroseconds(void) {
#ifndef SYS_WINNT
- const struct timeval input = {0, 1100000}; // > 999 999 microseconds.
+ const struct timeval input = {0, 1100000}; /* > 999 999 microseconds. */
l_fp actual;
@@ -63,7 +69,8 @@ void test_IllegalMicroseconds() {
}
-void test_AlwaysFalseOnWindows() {
+void
+test_AlwaysFalseOnWindows(void) {
#ifdef SYS_WINNT
/*
* Under Windows, buftvtots will just return
diff --git a/contrib/ntp/tests/libntp/calendar.c b/contrib/ntp/tests/libntp/calendar.c
index 4ac1df469c70..2c8a2d52afb0 100644
--- a/contrib/ntp/tests/libntp/calendar.c
+++ b/contrib/ntp/tests/libntp/calendar.c
@@ -1,50 +1,56 @@
#include "config.h"
-#include "ntp_stdlib.h" //test fail without this include, for some reason
+#include "ntp_stdlib.h" /* test fail without this include, for some reason */
#include "ntp_calendar.h"
#include "unity.h"
-//#include "test-libntp.h"
-
-
#include <string.h>
-//#include <sstream>
static int leapdays(int year);
-char * CalendarFromCalToString(const struct calendar cal); //&
-char * CalendarFromIsoToString(const struct isodate iso); //&
-
-//tehnically, booleans
-int IsEqualCal(const struct calendar expected, const struct calendar actual); //&&
-int IsEqualIso(const struct isodate expected, const struct isodate actual); //&&
-
-char * DateFromCalToStringCal(const struct calendar cal); //&
-char * DateFromIsoToStringIso(const struct isodate iso); //&
-
-//tehnically, booleans
-int sEqualDateCal(const struct calendar expected, const struct calendar actual); //&&
-int IsEqualDateIso(const struct isodate expected, const struct isodate actual); //&&
-
-
-
-// ---------------------------------------------------------------------
-// test support stuff
-// ---------------------------------------------------------------------
-
-//function which, in combination with TEST_ASSERT_TRUE replaces google test framework's EXPECT_GT(a,b); -> GT means Greather Than
-//boolean
-int isGT(int first,int second){
- if(first > second){
-
- return TRUE;
+int isGT(int first, int second);
+int leapdays(int year);
+char * CalendarFromCalToString(const struct calendar *cal);
+char * CalendarFromIsoToString(const struct isodate *iso);
+int IsEqualCal(const struct calendar *expected, const struct calendar *actual);
+int IsEqualIso(const struct isodate *expected, const struct isodate *actual);
+char * DateFromCalToString(const struct calendar *cal);
+char * DateFromIsoToString(const struct isodate *iso);
+int IsEqualDateCal(const struct calendar *expected, const struct calendar *actual);
+int IsEqualDateIso(const struct isodate *expected, const struct isodate *actual);
+void test_DaySplitMerge(void);
+void test_SplitYearDays1(void);
+void test_SplitYearDays2(void);
+void test_RataDie1(void);
+void test_LeapYears1(void);
+void test_LeapYears2(void);
+void test_RoundTripDate(void);
+void test_RoundTripYearStart(void);
+void test_RoundTripMonthStart(void);
+void test_RoundTripWeekStart(void);
+void test_RoundTripDayStart(void);
+void test_IsoCalYearsToWeeks(void);
+void test_IsoCalWeeksToYearStart(void);
+void test_IsoCalWeeksToYearEnd(void);
+void test_DaySecToDate(void);
+
+/*
+ * ---------------------------------------------------------------------
+ * test support stuff
+ * ---------------------------------------------------------------------
+ */
+int
+isGT(int first, int second)
+{
+ if(first > second) {
+ return TRUE;
+ } else {
+ return FALSE;
}
-
- else return FALSE;
}
-
-int leapdays(int year)
+int
+leapdays(int year)
{
if (year % 400 == 0)
return 1;
@@ -55,160 +61,140 @@ int leapdays(int year)
return 0;
}
-char * CalendarFromCalToString(const struct calendar cal) { //&
- char * ss = malloc (sizeof (char) * 100);
-
- char buffer[100] ="";
- sprintf(buffer, "%u", cal.year);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)cal.month);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)cal.monthday);
- strcat(ss,buffer);
- strcat(ss," (");
- sprintf(buffer, "%u", cal.yearday);
- strcat(ss,buffer);
- strcat(ss,") ");
- sprintf(buffer, "%u", (u_int)cal.hour);
- strcat(ss,buffer);
- strcat(ss,":");
- sprintf(buffer, "%u", (u_int)cal.minute);
- strcat(ss,buffer);
- strcat(ss,":");
- sprintf(buffer, "%u", (u_int)cal.second);
- strcat(ss,buffer);
- //ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday << " (" << cal.yearday << ") " << (u_int)cal.hour << ":" << (u_int)cal.minute << ":" << (u_int)cal.second;
- return ss;
-
+char *
+CalendarFromCalToString(
+ const struct calendar *cal)
+{
+ char * str = malloc(sizeof (char) * 100);
+ snprintf(str, 100, "%u-%02u-%02u (%u) %02u:%02u:%02u",
+ cal->year, (u_int)cal->month, (u_int)cal->monthday,
+ cal->yearday,
+ (u_int)cal->hour, (u_int)cal->minute, (u_int)cal->second);
+ str[99] = '\0'; /* paranoia rulez! */
+ return str;
}
-char * CalendarFromIsoToString(const struct isodate iso) { //&
-
- char * ss = malloc (sizeof (char) * 100);
-
- char buffer[100] ="";
- sprintf(buffer, "%u", iso.year);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)iso.week);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)iso.weekday);
- strcat(ss,buffer);
- sprintf(buffer, "%u", (u_int)iso.hour);
- strcat(ss,buffer);
- strcat(ss,":");
- sprintf(buffer, "%u", (u_int)iso.minute);
- strcat(ss,buffer);
- strcat(ss,":");
- sprintf(buffer, "%u", (u_int)iso.second);
- strcat(ss,buffer);
- //ss << iso.year << "-" << (u_int)iso.week << "-" << (u_int)iso.weekday << (u_int)iso.hour << ":" << (u_int)iso.minute << ":" << (u_int)iso.second;
- return ss;
-
+char *
+CalendarFromIsoToString(
+ const struct isodate *iso)
+{
+ char * str = emalloc (sizeof (char) * 100);
+ snprintf(str, 100, "%u-W%02u-%02u %02u:%02u:%02u",
+ iso->year, (u_int)iso->week, (u_int)iso->weekday,
+ (u_int)iso->hour, (u_int)iso->minute, (u_int)iso->second);
+ str[99] = '\0'; /* paranoia rulez! */
+ return str;
}
-int IsEqualCal(const struct calendar expected, const struct calendar actual) { //&&
- if (expected.year == actual.year &&
- (!expected.yearday || expected.yearday == actual.yearday) &&
- expected.month == actual.month &&
- expected.monthday == actual.monthday &&
- expected.hour == actual.hour &&
- expected.minute == actual.minute &&
- expected.second == actual.second) {
+int
+IsEqualCal(
+ const struct calendar *expected,
+ const struct calendar *actual)
+{
+ if (expected->year == actual->year &&
+ (!expected->yearday || expected->yearday == actual->yearday) &&
+ expected->month == actual->month &&
+ expected->monthday == actual->monthday &&
+ expected->hour == actual->hour &&
+ expected->minute == actual->minute &&
+ expected->second == actual->second) {
return TRUE;
} else {
- printf("expected: %s but was %s", CalendarFromCalToString(expected) , CalendarFromCalToString(actual));
+ printf("expected: %s but was %s",
+ CalendarFromCalToString(expected),
+ CalendarFromCalToString(actual));
return FALSE;
}
}
-int IsEqualIso(const struct isodate expected, const struct isodate actual) { //&&
- if (expected.year == actual.year &&
- expected.week == actual.week &&
- expected.weekday == actual.weekday &&
- expected.hour == actual.hour &&
- expected.minute == actual.minute &&
- expected.second == actual.second) {
+int
+IsEqualIso(
+ const struct isodate *expected,
+ const struct isodate *actual)
+{
+ if (expected->year == actual->year &&
+ expected->week == actual->week &&
+ expected->weekday == actual->weekday &&
+ expected->hour == actual->hour &&
+ expected->minute == actual->minute &&
+ expected->second == actual->second) {
return TRUE;
} else {
- printf("expected: %s but was %s", CalendarFromIsoToString(expected) , CalendarFromIsoToString(actual));
+ printf("expected: %s but was %s",
+ CalendarFromIsoToString(expected),
+ CalendarFromIsoToString(actual));
return FALSE;
}
}
-char * DateFromCalToString(const struct calendar cal) { //&
-
- char * ss = malloc (sizeof (char) * 100);
-
- char buffer[100] ="";
- sprintf(buffer, "%u", cal.year);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)cal.month);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)cal.monthday);
- strcat(ss,buffer);
- strcat(ss," (");
- sprintf(buffer, "%u", cal.yearday);
- strcat(ss,buffer);
- strcat(ss,")");
-
- return ss;
- //ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday << " (" << cal.yearday << ")";
+char *
+DateFromCalToString(
+ const struct calendar *cal)
+{
+
+ char * str = emalloc (sizeof (char) * 100);
+ snprintf(str, 100, "%u-%02u-%02u (%u)",
+ cal->year, (u_int)cal->month, (u_int)cal->monthday,
+ cal->yearday);
+ str[99] = '\0'; /* paranoia rulez! */
+ return str;
}
-char * DateFromIsoToString(const struct isodate iso) { //&
-
- char * ss = malloc (sizeof (char) * 100);
-
- char buffer[100] ="";
- sprintf(buffer, "%u", iso.year);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)iso.week);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)iso.weekday);
- strcat(ss,buffer);
-
- return ss;
- //ss << iso.year << "-" << (u_int)iso.week << "-" << (u_int)iso.weekday;
-
+char *
+DateFromIsoToString(
+ const struct isodate *iso)
+{
+
+ char * str = emalloc (sizeof (char) * 100);
+ snprintf(str, 100, "%u-W%02u-%02u",
+ iso->year, (u_int)iso->week, (u_int)iso->weekday);
+ str[99] = '\0'; /* paranoia rulez! */
+ return str;
}
-//boolean
-int IsEqualDateCal(const struct calendar expected, const struct calendar actual) { //&&
- if (expected.year == actual.year &&
- (!expected.yearday || expected.yearday == actual.yearday) &&
- expected.month == actual.month &&
- expected.monthday == actual.monthday) {
+int/*BOOL*/
+IsEqualDateCal(
+ const struct calendar *expected,
+ const struct calendar *actual)
+{
+ if (expected->year == actual->year &&
+ (!expected->yearday || expected->yearday == actual->yearday) &&
+ expected->month == actual->month &&
+ expected->monthday == actual->monthday) {
return TRUE;
} else {
- printf("expected: %s but was %s", DateFromCalToString(expected) ,DateFromCalToString(actual));
+ printf("expected: %s but was %s",
+ DateFromCalToString(expected),
+ DateFromCalToString(actual));
return FALSE;
}
}
-//boolean
-int IsEqualDateIso(const struct isodate expected, const struct isodate actual) { //&&
- if (expected.year == actual.year &&
- expected.week == actual.week &&
- expected.weekday == actual.weekday) {
+int/*BOOL*/
+IsEqualDateIso(
+ const struct isodate *expected,
+ const struct isodate *actual)
+{
+ if (expected->year == actual->year &&
+ expected->week == actual->week &&
+ expected->weekday == actual->weekday) {
return TRUE;
} else {
- printf("expected: %s but was %s", DateFromIsoToString(expected) ,DateFromIsoToString(actual));
+ printf("expected: %s but was %s",
+ DateFromIsoToString(expected),
+ DateFromIsoToString(actual));
return FALSE;
}
}
-// ---------------------------------------------------------------------
-// test cases
-// ---------------------------------------------------------------------
+/*
+ * ---------------------------------------------------------------------
+ * test cases
+ * ---------------------------------------------------------------------
+ */
+
+/* days before month, with a full-year pad at the upper end */
static const u_short real_month_table[2][13] = {
/* -*- table for regular years -*- */
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
@@ -216,7 +202,7 @@ static const u_short real_month_table[2][13] = {
{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
};
-// days in month, with one month wrap-around at both ends
+/* days in month, with one month wrap-around at both ends */
static const u_short real_month_days[2][14] = {
/* -*- table for regular years -*- */
{ 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 },
@@ -224,17 +210,24 @@ static const u_short real_month_days[2][14] = {
{ 31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 }
};
-// test the day/sec join & split ops, making sure that 32bit
-// intermediate results would definitely overflow and the hi DWORD of
-// the 'vint64' is definitely needed.
-void test_DaySplitMerge() {
+/* test the day/sec join & split ops, making sure that 32bit
+ * intermediate results would definitely overflow and the hi DWORD of
+ * the 'vint64' is definitely needed.
+ */
+void
+test_DaySplitMerge(void) {
int32 day,sec;
for (day = -1000000; day <= 1000000; day += 100) {
for (sec = -100000; sec <= 186400; sec += 10000) {
- vint64 merge = ntpcal_dayjoin(day, sec);
- ntpcal_split split = ntpcal_daysplit(&merge);
- int32 eday = day;
- int32 esec = sec;
+ vint64 merge;
+ ntpcal_split split;
+ int32 eday;
+ int32 esec;
+
+ merge = ntpcal_dayjoin(day, sec);
+ split = ntpcal_daysplit(&merge);
+ eday = day;
+ esec = sec;
while (esec >= 86400) {
eday += 1;
@@ -251,13 +244,14 @@ void test_DaySplitMerge() {
}
}
-void test_SplitYearDays1() {
+void
+test_SplitYearDays1(void) {
int32 eyd;
for (eyd = -1; eyd <= 365; eyd++) {
ntpcal_split split = ntpcal_split_yeardays(eyd, 0);
if (split.lo >= 0 && split.hi >= 0) {
- TEST_ASSERT_TRUE(isGT(12,split.hi));//EXPECT_GT(12, split.hi);
- TEST_ASSERT_TRUE(isGT(real_month_days[0][split.hi+1], split.lo));//EXPECT_GT(real_month_days[0][split.hi+1], split.lo);
+ TEST_ASSERT_TRUE(isGT(12,split.hi));
+ TEST_ASSERT_TRUE(isGT(real_month_days[0][split.hi+1], split.lo));
int32 tyd = real_month_table[0][split.hi] + split.lo;
TEST_ASSERT_EQUAL(eyd, tyd);
} else
@@ -265,14 +259,16 @@ void test_SplitYearDays1() {
}
}
-void test_SplitYearDays2() {
+void
+test_SplitYearDays2(void) {
int32 eyd;
for (eyd = -1; eyd <= 366; eyd++) {
ntpcal_split split = ntpcal_split_yeardays(eyd, 1);
if (split.lo >= 0 && split.hi >= 0) {
- //TEST_ASSERT_TRUE(12 > split.hi); //simpler version, works for basic types, doesn't work for complex structs
- TEST_ASSERT_TRUE(isGT(12,split.hi));//EXPECT_GT(12, split.hi);
- TEST_ASSERT_TRUE(isGT(real_month_days[1][split.hi+1], split.lo));//EXPECT_GT(real_month_days[1][split.hi+1], split.lo);
+ /* basic checks do not work on compunds :( */
+ /* would like: TEST_ASSERT_TRUE(12 > split.hi); */
+ TEST_ASSERT_TRUE(isGT(12,split.hi));
+ TEST_ASSERT_TRUE(isGT(real_month_days[1][split.hi+1], split.lo));
int32 tyd = real_month_table[1][split.hi] + split.lo;
TEST_ASSERT_EQUAL(eyd, tyd);
} else
@@ -280,17 +276,19 @@ void test_SplitYearDays2() {
}
}
-void test_RataDie1() {
- int32 testDate = 1; // 0001-01-01 (proleptic date)
+void
+test_RataDie1(void) {
+ int32 testDate = 1; /* 0001-01-01 (proleptic date) */
struct calendar expected = { 1, 1, 1, 1 };
struct calendar actual;
ntpcal_rd_to_date(&actual, testDate);
- TEST_ASSERT_TRUE(IsEqualDateCal(expected, actual));
+ TEST_ASSERT_TRUE(IsEqualDateCal(&expected, &actual));
}
-// check last day of february for first 10000 years
-void test_LeapYears1() {
+/* check last day of february for first 10000 years */
+void
+test_LeapYears1(void) {
struct calendar dateIn, dateOut;
for (dateIn.year = 1; dateIn.year < 10000; ++dateIn.year) {
@@ -300,12 +298,13 @@ void test_LeapYears1() {
ntpcal_rd_to_date(&dateOut, ntpcal_date_to_rd(&dateIn));
- TEST_ASSERT_TRUE(IsEqualDateCal(dateIn, dateOut));
+ TEST_ASSERT_TRUE(IsEqualDateCal(&dateIn, &dateOut));
}
}
-// check first day of march for first 10000 years
-void test_LeapYears2() {
+/* check first day of march for first 10000 years */
+void
+test_LeapYears2(void) {
struct calendar dateIn, dateOut;
for (dateIn.year = 1; dateIn.year < 10000; ++dateIn.year) {
@@ -314,19 +313,21 @@ void test_LeapYears2() {
dateIn.yearday = 60 + leapdays(dateIn.year);
ntpcal_rd_to_date(&dateOut, ntpcal_date_to_rd(&dateIn));
- TEST_ASSERT_TRUE(IsEqualDateCal(dateIn, dateOut));
+ TEST_ASSERT_TRUE(IsEqualDateCal(&dateIn, &dateOut));
}
}
-// Full roundtrip for 1601-01-01 to 2400-12-31
-// checks sequence of rata die numbers and validates date output
-// (since the input is all nominal days of the calendar in that range
-// and the result of the inverse calculation must match the input no
-// invalid output can occur.)
-void test_RoundTripDate() {
+/* Full roundtrip from 1601-01-01 to 2400-12-31
+ * checks sequence of rata die numbers and validates date output
+ * (since the input is all nominal days of the calendar in that range
+ * and the result of the inverse calculation must match the input no
+ * invalid output can occur.)
+ */
+void
+test_RoundTripDate(void) {
struct calendar truDate, expDate = { 1600, 0, 12, 31 };;
- int32 truRdn, expRdn = ntpcal_date_to_rd(&expDate);
int leaps;
+ int32 truRdn, expRdn = ntpcal_date_to_rd(&expDate);
while (expDate.year < 2400) {
expDate.year++;
@@ -345,14 +346,15 @@ void test_RoundTripDate() {
TEST_ASSERT_EQUAL(expRdn, truRdn);
ntpcal_rd_to_date(&truDate, truRdn);
- TEST_ASSERT_TRUE(IsEqualDateCal(expDate, truDate));
+ TEST_ASSERT_TRUE(IsEqualDateCal(&expDate, &truDate));
}
}
}
}
-// Roundtrip testing on calyearstart
-void test_RoundTripYearStart() {
+/* Roundtrip testing on calyearstart */
+void
+test_RoundTripYearStart(void) {
static const time_t pivot = 0;
u_int32 ntp, expys, truys;
struct calendar date;
@@ -367,8 +369,9 @@ void test_RoundTripYearStart() {
}
}
-// Roundtrip testing on calymonthstart
-void test_RoundTripMonthStart() {
+/* Roundtrip testing on calmonthstart */
+void
+test_RoundTripMonthStart(void) {
static const time_t pivot = 0;
u_int32 ntp, expms, trums;
struct calendar date;
@@ -383,8 +386,9 @@ void test_RoundTripMonthStart() {
}
}
-// Roundtrip testing on calweekstart
-void test_RoundTripWeekStart() {
+/* Roundtrip testing on calweekstart */
+void
+test_RoundTripWeekStart(void) {
static const time_t pivot = 0;
u_int32 ntp, expws, truws;
struct isodate date;
@@ -399,8 +403,9 @@ void test_RoundTripWeekStart() {
}
}
-// Roundtrip testing on caldaystart
-void test_RoundTripDayStart() {
+/* Roundtrip testing on caldaystart */
+void
+test_RoundTripDayStart(void) {
static const time_t pivot = 0;
u_int32 ntp, expds, truds;
struct calendar date;
@@ -412,5 +417,125 @@ void test_RoundTripDayStart() {
expds = ntpcal_date_to_ntp(&date);
TEST_ASSERT_EQUAL(expds, truds);
}
-}
+}
+
+/* ---------------------------------------------------------------------
+ * ISO8601 week calendar internals
+ *
+ * The ISO8601 week calendar implementation is simple in the terms of
+ * the math involved, but the implementation of the calculations must
+ * take care of a few things like overflow, floor division, and sign
+ * corrections.
+ *
+ * Most of the functions are straight forward, but converting from years
+ * to weeks and from weeks to years warrants some extra tests. These use
+ * an independent reference implementation of the conversion from years
+ * to weeks.
+ * ---------------------------------------------------------------------
+ */
+
+/* helper / reference implementation for the first week of year in the
+ * ISO8601 week calendar. This is based on the reference definition of
+ * the ISO week calendar start: The Monday closest to January,1st of the
+ * corresponding year in the Gregorian calendar.
+ */
+static int32_t
+refimpl_WeeksInIsoYears(
+ int32_t years)
+{
+ int32_t days, weeks;
+ days = ntpcal_weekday_close(
+ ntpcal_days_in_years(years) + 1,
+ CAL_MONDAY) - 1;
+ /* the weekday functions operate on RDN, while we want elapsed
+ * units here -- we have to add / sub 1 in the midlle / at the
+ * end of the operation that gets us the first day of the ISO
+ * week calendar day.
+ */
+ weeks = days / 7;
+ days = days % 7;
+ TEST_ASSERT_EQUAL(0, days); /* paranoia check... */
+ return weeks;
+}
+
+/* The next tests loop over 5000yrs, but should still be very fast. If
+ * they are not, the calendar needs a better implementation...
+ */
+void
+test_IsoCalYearsToWeeks(void) {
+ int32_t years;
+ int32_t wref, wcal;
+ for (years = -1000; years < 4000; ++years) {
+ /* get number of weeks before years (reference) */
+ wref = refimpl_WeeksInIsoYears(years);
+ /* get number of weeks before years (object-under-test) */
+ wcal = isocal_weeks_in_years(years);
+ TEST_ASSERT_EQUAL(wref, wcal);
+ }
+}
+
+void
+test_IsoCalWeeksToYearStart(void) {
+ int32_t years;
+ int32_t wref;
+ ntpcal_split ysplit;
+ for (years = -1000; years < 4000; ++years) {
+ /* get number of weeks before years (reference) */
+ wref = refimpl_WeeksInIsoYears(years);
+ /* reverse split */
+ ysplit = isocal_split_eraweeks(wref);
+ /* check invariants: same year, week 0 */
+ TEST_ASSERT_EQUAL(years, ysplit.hi);
+ TEST_ASSERT_EQUAL(0, ysplit.lo);
+ }
+}
+
+void
+test_IsoCalWeeksToYearEnd(void) {
+ int32_t years;
+ int32_t wref;
+ ntpcal_split ysplit;
+ for (years = -1000; years < 4000; ++years) {
+ /* get last week of previous year */
+ wref = refimpl_WeeksInIsoYears(years) - 1;
+ /* reverse split */
+ ysplit = isocal_split_eraweeks(wref);
+ /* check invariants: previous year, week 51 or 52 */
+ TEST_ASSERT_EQUAL(years-1, ysplit.hi);
+ TEST_ASSERT(ysplit.lo == 51 || ysplit.lo == 52);
+ }
+}
+
+void
+test_DaySecToDate(void) {
+ struct calendar cal;
+ int32_t days;
+
+ days = ntpcal_daysec_to_date(&cal, -86400);
+ TEST_ASSERT_MESSAGE((days==-1 && cal.hour==0 && cal.minute==0 && cal.second==0),
+ "failed for -86400");
+ days = ntpcal_daysec_to_date(&cal, -86399);
+ TEST_ASSERT_MESSAGE((days==-1 && cal.hour==0 && cal.minute==0 && cal.second==1),
+ "failed for -86399");
+
+ days = ntpcal_daysec_to_date(&cal, -1);
+ TEST_ASSERT_MESSAGE((days==-1 && cal.hour==23 && cal.minute==59 && cal.second==59),
+ "failed for -1");
+
+ days = ntpcal_daysec_to_date(&cal, 0);
+ TEST_ASSERT_MESSAGE((days==0 && cal.hour==0 && cal.minute==0 && cal.second==0),
+ "failed for 0");
+
+ days = ntpcal_daysec_to_date(&cal, 1);
+ TEST_ASSERT_MESSAGE((days==0 && cal.hour==0 && cal.minute==0 && cal.second==1),
+ "failed for 1");
+
+ days = ntpcal_daysec_to_date(&cal, 86399);
+ TEST_ASSERT_MESSAGE((days==0 && cal.hour==23 && cal.minute==59 && cal.second==59),
+ "failed for 86399");
+
+ days = ntpcal_daysec_to_date(&cal, 86400);
+ TEST_ASSERT_MESSAGE((days==1 && cal.hour==0 && cal.minute==0 && cal.second==0),
+ "failed for 86400");
+}
diff --git a/contrib/ntp/tests/libntp/caljulian.c b/contrib/ntp/tests/libntp/caljulian.c
index 907f25d86edc..ecf5d9255620 100644
--- a/contrib/ntp/tests/libntp/caljulian.c
+++ b/contrib/ntp/tests/libntp/caljulian.c
@@ -2,46 +2,53 @@
#include "ntp_calendar.h"
#include "ntp_stdlib.h"
-#include "unity.h"
+#include "unity.h"
#include "test-libntp.h"
-
#include <string.h>
-//#include <stdlib.h>
-//added struct to calendar!
-char * CalendarToString(const struct calendar cal) {
- char * ss = malloc (sizeof (char) * 100);
+char * CalendarToString(const struct calendar cal);
+int IsEqual(const struct calendar expected, const struct calendar actual);
+void setUp(void);
+void tearDown(void);
+void test_RegularTime(void);
+void test_LeapYear(void);
+void test_uLongBoundary(void);
+void test_uLongWrapped(void);
+
+
+char *
+CalendarToString(const struct calendar cal) {
+ char * str = emalloc (sizeof (char) * 100);
char buffer[100] ="";
- sprintf(buffer, "%u", cal.year);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)cal.month);
- strcat(ss,buffer);
- strcat(ss,"-");
- sprintf(buffer, "%u", (u_int)cal.monthday);
- strcat(ss,buffer);
- strcat(ss," (");
- sprintf(buffer, "%u", (u_int) cal.yearday);
- strcat(ss,buffer);
- strcat(ss,") ");
- sprintf(buffer, "%u", (u_int)cal.hour);
- strcat(ss,buffer);
- strcat(ss,":");
- sprintf(buffer, "%u", (u_int)cal.minute);
- strcat(ss,buffer);
- strcat(ss,":");
- sprintf(buffer, "%u", (u_int)cal.second);
- strcat(ss,buffer);
- //ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday << " (" << cal.yearday << ") " << (u_int)cal.hour << ":" << (u_int)cal.minute << ":" << (u_int)cal.second;
- return ss;
+ snprintf(buffer, 100, "%u", cal.year);
+ strcat(str, buffer);
+ strcat(str, "-");
+ snprintf(buffer, 100, "%u", (u_int)cal.month);
+ strcat(str, buffer);
+ strcat(str, "-");
+ snprintf(buffer, 100, "%u", (u_int)cal.monthday);
+ strcat(str, buffer);
+ strcat(str, " (");
+ snprintf(buffer, 100, "%u", (u_int) cal.yearday);
+ strcat(str, buffer);
+ strcat(str, ") ");
+ snprintf(buffer, 100, "%u", (u_int)cal.hour);
+ strcat(str, buffer);
+ strcat(str, ":");
+ snprintf(buffer, 100, "%u", (u_int)cal.minute);
+ strcat(str, buffer);
+ strcat(str, ":");
+ snprintf(buffer, 100, "%u", (u_int)cal.second);
+ strcat(str, buffer);
+ return str;
}
-//tehnically boolean
-int IsEqual(const struct calendar expected, const struct calendar actual) {
+int // technically boolean
+IsEqual(const struct calendar expected, const struct calendar actual) {
if (expected.year == actual.year &&
(expected.yearday == actual.yearday ||
(expected.month == actual.month &&
@@ -58,20 +65,22 @@ int IsEqual(const struct calendar expected, const struct calendar actual) {
}
-void setUp()
+void
+setUp()
{
-
ntpcal_set_timefunc(timefunc);
settime(1970, 1, 1, 0, 0, 0);
}
-void tearDown()
+void
+tearDown()
{
ntpcal_set_timefunc(NULL);
}
-void test_RegularTime() {
+void
+test_RegularTime(void) {
u_long testDate = 3485080800UL; // 2010-06-09 14:00:00
struct calendar expected = {2010,160,6,9,14,0,0};
@@ -82,7 +91,8 @@ void test_RegularTime() {
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_LeapYear() {
+void
+test_LeapYear(void) {
u_long input = 3549902400UL; // 2012-06-28 20:00:00Z
struct calendar expected = {2012, 179, 6, 28, 20, 0, 0};
@@ -93,7 +103,8 @@ void test_LeapYear() {
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_uLongBoundary() {
+void
+test_uLongBoundary(void) {
u_long time = 4294967295UL; // 2036-02-07 6:28:15
struct calendar expected = {2036,0,2,7,6,28,15};
@@ -104,7 +115,8 @@ void test_uLongBoundary() {
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_uLongWrapped() {
+void
+test_uLongWrapped(void) {
u_long time = 0;
struct calendar expected = {2036,0,2,7,6,28,16};
diff --git a/contrib/ntp/tests/libntp/caltontp.c b/contrib/ntp/tests/libntp/caltontp.c
index 9ce485440502..34173d27eb9c 100644
--- a/contrib/ntp/tests/libntp/caltontp.c
+++ b/contrib/ntp/tests/libntp/caltontp.c
@@ -1,6 +1,11 @@
#include "config.h"
-#include "unity.h"
#include "ntp_calendar.h"
+#include "unity.h"
+
+void test_DateGivenMonthDay(void);
+void test_DateGivenYearDay(void);
+void test_DateLeapYear(void);
+void test_WraparoundDateIn2036(void);
void
test_DateGivenMonthDay(void) {
diff --git a/contrib/ntp/tests/libntp/calyearstart.c b/contrib/ntp/tests/libntp/calyearstart.c
index b293c9339d97..271ea12b6892 100644
--- a/contrib/ntp/tests/libntp/calyearstart.c
+++ b/contrib/ntp/tests/libntp/calyearstart.c
@@ -1,25 +1,30 @@
#include "config.h"
-#include "ntp_stdlib.h" //test fail without this include, for some reason
+#include "ntp_stdlib.h"
#include "ntp_calendar.h"
#include "unity.h"
#include "test-libntp.h"
+void setUp(void);
+void tearDown(void);
+void test_NoWrapInDateRange(void);
+void test_NoWrapInDateRangeLeapYear(void);
+void test_WrapInDateRange(void);
-void setUp()
+void setUp(void)
{
ntpcal_set_timefunc(timefunc);
settime(1970, 1, 1, 0, 0, 0);
}
-void tearDown()
+void tearDown(void)
{
ntpcal_set_timefunc(NULL);
}
-void test_NoWrapInDateRange() {
+void test_NoWrapInDateRange(void) {
const u_int32 input = 3486372600UL; // 2010-06-24 12:50:00.
const u_int32 expected = 3471292800UL; // 2010-01-01 00:00:00
@@ -27,7 +32,7 @@ void test_NoWrapInDateRange() {
TEST_ASSERT_EQUAL(expected, calyearstart(input, NULL));
}
-void test_NoWrapInDateRangeLeapYear() {
+void test_NoWrapInDateRangeLeapYear(void) {
const u_int32 input = 3549528000UL; // 2012-06-24 12:00:00
const u_int32 expected = 3534364800UL; // 2012-01-01 00:00:00
@@ -35,7 +40,7 @@ void test_NoWrapInDateRangeLeapYear() {
TEST_ASSERT_EQUAL(expected, calyearstart(input, NULL));
}
-void test_WrapInDateRange() {
+void test_WrapInDateRange(void) {
const u_int32 input = 19904UL; // 2036-02-07 12:00:00
const u_int32 expected = 4291747200UL; // 2036-01-01 00:00:00
diff --git a/contrib/ntp/tests/libntp/clocktime.c b/contrib/ntp/tests/libntp/clocktime.c
index a9c0fec82648..67ca40180def 100644
--- a/contrib/ntp/tests/libntp/clocktime.c
+++ b/contrib/ntp/tests/libntp/clocktime.c
@@ -6,33 +6,49 @@
#include "unity.h"
#include "test-libntp.h"
-
-// ---------------------------------------------------------------------
-// test fixture
-//
-// The clocktimeTest uses the NTP calendar feature to use a mockup
-// function for getting the current system time, so the tests are not
-// dependent on the actual system time.
-
-
-void setUp()
+void setUp(void);
+void tearDown(void);
+void test_CurrentYear(void);
+void test_CurrentYearFuzz(void);
+void test_TimeZoneOffset(void);
+void test_WrongYearStart(void);
+void test_PreviousYear(void);
+void test_NextYear(void);
+void test_NoReasonableConversion(void);
+int isLE(u_int32 diff,u_int32 actual);
+void test_AlwaysInLimit(void);
+
+
+/* ---------------------------------------------------------------------
+ * test fixture
+ *
+ * The clocktimeTest uses the NTP calendar feature to use a mockup
+ * function for getting the current system time, so the tests are not
+ * dependent on the actual system time.
+ */
+
+void
+setUp()
{
ntpcal_set_timefunc(timefunc);
settime(2000, 1, 1, 0, 0, 0);
}
-void tearDown()
+void
+tearDown()
{
ntpcal_set_timefunc(NULL);
}
-// ---------------------------------------------------------------------
-// test cases
+/* ---------------------------------------------------------------------
+ * test cases
+ */
-void test_CurrentYear() {
- // Timestamp: 2010-06-24 12:50:00Z
+void
+test_CurrentYear(void) {
+ /* Timestamp: 2010-06-24 12:50:00Z */
const u_int32 timestamp = 3486372600UL;
- const u_int32 expected = timestamp; // exactly the same.
+ const u_int32 expected = timestamp; /* exactly the same. */
const int yday=175, hour=12, minute=50, second=0, tzoff=0;
@@ -44,7 +60,8 @@ void test_CurrentYear() {
TEST_ASSERT_EQUAL(expected, actual);
}
-void test_CurrentYearFuzz() {
+void
+test_CurrentYearFuzz(void) {
/*
* Timestamp (rec_ui) is: 2010-06-24 12:50:00
* Time sent into function is 12:00:00.
@@ -53,8 +70,8 @@ void test_CurrentYearFuzz() {
* timestamp for the 12:00:00 time.
*/
- const u_int32 timestamp = 3486372600UL; // 2010-06-24 12:50:00Z
- const u_int32 expected = 3486369600UL; // 2010-06-24 12:00:00Z
+ const u_int32 timestamp = 3486372600UL; /* 2010-06-24 12:50:00Z */
+ const u_int32 expected = 3486369600UL; /* 2010-06-24 12:00:00Z */
const int yday=175, hour=12, minute=0, second=0, tzoff=0;
@@ -66,7 +83,8 @@ void test_CurrentYearFuzz() {
TEST_ASSERT_EQUAL(expected, actual);
}
-void test_TimeZoneOffset() {
+void
+test_TimeZoneOffset(void) {
/*
* Timestamp (rec_ui) is: 2010-06-24 12:00:00 +0800
* (which is 2010-06-24 04:00:00Z)
@@ -86,7 +104,8 @@ void test_TimeZoneOffset() {
TEST_ASSERT_EQUAL(expected, actual);
}
-void test_WrongYearStart() {
+void
+test_WrongYearStart(void) {
/*
* Timestamp (rec_ui) is: 2010-01-02 11:00:00Z
* Time sent into function is 11:00:00.
@@ -97,7 +116,7 @@ void test_WrongYearStart() {
const int yday=2, hour=11, minute=0, second=0, tzoff=0;
- u_long yearstart = 302024100UL; // Yearstart of 2009.
+ u_long yearstart = 302024100UL; /* Yearstart of 2009. */
u_int32 actual;
TEST_ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
@@ -105,7 +124,8 @@ void test_WrongYearStart() {
TEST_ASSERT_EQUAL(expected, actual);
}
-void test_PreviousYear() {
+void
+test_PreviousYear(void) {
/*
* Timestamp is: 2010-01-01 01:00:00Z
* Time sent into function is 23:00:00
@@ -124,7 +144,8 @@ void test_PreviousYear() {
TEST_ASSERT_EQUAL(expected, actual);
}
-void test_NextYear() {
+void
+test_NextYear(void) {
/*
* Timestamp is: 2009-12-31 23:00:00Z
* Time sent into function is 01:00:00
@@ -142,7 +163,8 @@ void test_NextYear() {
TEST_ASSERT_EQUAL(expected, actual);
}
-void test_NoReasonableConversion() {
+void
+test_NoReasonableConversion(void) {
/* Timestamp is: 2010-01-02 11:00:00Z */
const u_int32 timestamp = 3471418800UL;
@@ -154,9 +176,9 @@ void test_NoReasonableConversion() {
&yearstart, &actual));
}
-// *** FUNCTION isLE, to simulate gtest's ASSERT_LE using Unity's TEST_ASSERT_TRUE
-//tehnically boolean
-int isLE(u_int32 diff,u_int32 actual){
+
+int/*BOOL*/
+isLE(u_int32 diff,u_int32 actual){
if(diff <= actual){
return TRUE;
}
@@ -164,7 +186,8 @@ int isLE(u_int32 diff,u_int32 actual){
}
-void test_AlwaysInLimit() {
+void
+test_AlwaysInLimit(void) {
/* Timestamp is: 2010-01-02 11:00:00Z */
const u_int32 timestamp = 3471418800UL;
const u_short prime_incs[] = { 127, 151, 163, 179 };
@@ -174,7 +197,6 @@ void test_AlwaysInLimit() {
u_short ydayinc;
int hour;
int minute;
- int second;
u_long yearstart;
u_int32 actual;
u_int32 diff;
@@ -192,8 +214,7 @@ void test_AlwaysInLimit() {
diff = actual - timestamp;
if (diff >= 0x80000000UL)
diff = ~diff + 1;
- TEST_ASSERT_TRUE(isLE(diff, (183u * SECSPERDAY))); // adding new function to return TRUE if first number is less or equal the second
- //TEST_ASSERT_LE(diff, (183u * SECSPERDAY));
+ TEST_ASSERT_TRUE(isLE(diff, (183u * SECSPERDAY)));
}
}
}
diff --git a/contrib/ntp/tests/libntp/decodenetnum.c b/contrib/ntp/tests/libntp/decodenetnum.c
index 681b7125a017..0e9bc34922b7 100644
--- a/contrib/ntp/tests/libntp/decodenetnum.c
+++ b/contrib/ntp/tests/libntp/decodenetnum.c
@@ -1,12 +1,21 @@
#include "config.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
+#include "sockaddrtest.h"
+
#include "unity.h"
-#include "sockaddrtest.h"
+extern void test_IPv4AddressOnly(void);
+extern void test_IPv4AddressWithPort(void);
+//#ifdef ISC_PLATFORM_HAVEIPV6
+extern void test_IPv6AddressOnly(void);
+extern void test_IPv6AddressWithPort(void);
+//#endif /* ISC_PLATFORM_HAVEIPV6 */
+extern void test_IllegalAddress(void);
+extern void test_IllegalCharInPort(void);
-void test_IPv4AddressOnly(void) {
+void
+test_IPv4AddressOnly(void) {
const char *str = "192.0.2.1";
sockaddr_u actual;
@@ -19,7 +28,8 @@ void test_IPv4AddressOnly(void) {
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_IPv4AddressWithPort(void) {
+void
+test_IPv4AddressWithPort(void) {
const char *str = "192.0.2.2:2000";
sockaddr_u actual;
@@ -32,10 +42,15 @@ void test_IPv4AddressWithPort(void) {
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_IPv6AddressOnly(void) {
+
+void
+test_IPv6AddressOnly(void) {
+
+//#ifdef ISC_PLATFORM_HAVEIPV6 //looks like HAVEIPV6 checks if system has IPV6 capabilies. WANTIPV6 can be changed with build --disable-ipv6
+#ifdef ISC_PLATFORM_WANTIPV6
const struct in6_addr address = {
0x20, 0x01, 0x0d, 0xb8,
- 0x85, 0xa3, 0x08, 0xd3,
+ 0x85, 0xa3, 0x08, 0xd3,
0x13, 0x19, 0x8a, 0x2e,
0x03, 0x70, 0x73, 0x34
};
@@ -50,12 +65,24 @@ void test_IPv6AddressOnly(void) {
TEST_ASSERT_TRUE(decodenetnum(str, &actual));
TEST_ASSERT_TRUE(IsEqual(expected, actual));
+
+#else
+ TEST_IGNORE_MESSAGE("IPV6 disabled in build, skipping.");
+#endif /* ISC_PLATFORM_HAVEIPV6 */
+
+
}
-void test_IPv6AddressWithPort(void) {
+
+
+void
+test_IPv6AddressWithPort(void) {
+
+#ifdef ISC_PLATFORM_WANTIPV6
+
const struct in6_addr address = {
0x20, 0x01, 0x0d, 0xb8,
- 0x85, 0xa3, 0x08, 0xd3,
+ 0x85, 0xa3, 0x08, 0xd3,
0x13, 0x19, 0x8a, 0x2e,
0x03, 0x70, 0x73, 0x34
};
@@ -70,16 +97,23 @@ void test_IPv6AddressWithPort(void) {
TEST_ASSERT_TRUE(decodenetnum(str, &actual));
TEST_ASSERT_TRUE(IsEqual(expected, actual));
+
+#else
+ TEST_IGNORE_MESSAGE("IPV6 disabled in build, skipping.");
+#endif /* ISC_PLATFORM_HAVEIPV6 */
}
-void test_IllegalAddress(void) {
+
+void
+test_IllegalAddress(void) {
const char *str = "192.0.2.270:2000";
sockaddr_u actual;
TEST_ASSERT_FALSE(decodenetnum(str, &actual));
}
-void test_IllegalCharInPort(void) {
+void
+test_IllegalCharInPort(void) {
/* An illegal port does not make the decodenetnum fail, but instead
* makes it use the standard port.
*/
diff --git a/contrib/ntp/tests/libntp/g_a_md5encrypt.cpp b/contrib/ntp/tests/libntp/g_a_md5encrypt.cpp
deleted file mode 100644
index 691bf78e2722..000000000000
--- a/contrib/ntp/tests/libntp/g_a_md5encrypt.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#ifdef OPENSSL
-# include "openssl/err.h"
-# include "openssl/rand.h"
-# include "openssl/evp.h"
-#endif
-#include "ntp.h"
-#include "ntp_stdlib.h"
-};
-
-class a_md5encryptTest : public libntptest {
-protected:
-};
-
-/*
- * Example packet with MD5 hash calculated manually.
- */
-const int keytype = KEY_TYPE_MD5;
-const char *key = "abcdefgh";
-const u_short keyLength = 8;
-const char *packet = "ijklmnopqrstuvwx";
-const int packetLength = 16;
-const int keyIdLength = 4;
-const int digestLength = 16;
-const int totalLength = packetLength + keyIdLength + digestLength;
-const char *expectedPacket = "ijklmnopqrstuvwx\0\0\0\0\x0c\x0e\x84\xcf\x0b\xb7\xa8\x68\x8e\x52\x38\xdb\xbc\x1c\x39\x53";
-
-TEST_F(a_md5encryptTest, Encrypt) {
- char *packetPtr = new char[totalLength];
- memset(packetPtr+packetLength, 0, keyIdLength);
- memcpy(packetPtr, packet, packetLength);
-
- cache_secretsize = keyLength;
-
- int length = MD5authencrypt(keytype, (u_char*)key, (u_int32*)packetPtr, packetLength);
-
- EXPECT_TRUE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)packetPtr, packetLength, length));
-
- EXPECT_EQ(20, length);
- EXPECT_TRUE(memcmp(expectedPacket, packetPtr, totalLength) == 0);
-
- delete[] packetPtr;
-}
-
-TEST_F(a_md5encryptTest, DecryptValid) {
- cache_secretsize = keyLength;
-
- EXPECT_TRUE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)expectedPacket, packetLength, 20));
-}
-
-TEST_F(a_md5encryptTest, DecryptInvalid) {
- cache_secretsize = keyLength;
-
- const char *invalidPacket = "ijklmnopqrstuvwx\0\0\0\0\x0c\x0e\x84\xcf\x0b\xb7\xa8\x68\x8e\x52\x38\xdb\xbc\x1c\x39\x54";
-
- EXPECT_FALSE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)invalidPacket, packetLength, 20));
-}
-
-TEST_F(a_md5encryptTest, IPv4AddressToRefId) {
- sockaddr_u addr;
- addr.sa4.sin_family = AF_INET;
- addr.sa4.sin_port = htons(80);
-
- u_int32 address = inet_addr("192.0.2.1");
- addr.sa4.sin_addr.s_addr = address;
-
- EXPECT_EQ(address, addr2refid(&addr));
-}
-
-TEST_F(a_md5encryptTest, IPv6AddressToRefId) {
- const struct in6_addr address = {
- 0x20, 0x01, 0x0d, 0xb8,
- 0x85, 0xa3, 0x08, 0xd3,
- 0x13, 0x19, 0x8a, 0x2e,
- 0x03, 0x70, 0x73, 0x34
- };
-
-
- sockaddr_u addr;
- addr.sa6.sin6_family = AF_INET6;
-
- addr.sa6.sin6_addr = address;
-
- const int expected = 0x75cffd52;
-
- EXPECT_EQ(expected, addr2refid(&addr));
-}
diff --git a/contrib/ntp/tests/libntp/g_atoint.cpp b/contrib/ntp/tests/libntp/g_atoint.cpp
deleted file mode 100644
index 9a8283fd2a26..000000000000
--- a/contrib/ntp/tests/libntp/g_atoint.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#include "g_libntptest.h"
-
-class atointTest : public libntptest {
-};
-
-TEST_F(atointTest, RegularPositive) {
- const char *str = "17";
- long val;
-
- ASSERT_TRUE(atoint(str, &val));
- EXPECT_EQ(17, val);
-}
-
-TEST_F(atointTest, RegularNegative) {
- const char *str = "-20";
- long val;
-
- ASSERT_TRUE(atoint(str, &val));
- EXPECT_EQ(-20, val);
-}
-
-TEST_F(atointTest, PositiveOverflowBoundary) {
- const char *str = "2147483648";
- long val;
-
- EXPECT_FALSE(atoint(str, &val));
-}
-
-TEST_F(atointTest, NegativeOverflowBoundary) {
- const char *str = "-2147483649";
- long val;
-
- EXPECT_FALSE(atoint(str, &val));
-}
-
-TEST_F(atointTest, PositiveOverflowBig) {
- const char *str = "2300000000";
- long val;
-
- EXPECT_FALSE(atoint(str, &val));
-}
-
-TEST_F(atointTest, IllegalCharacter) {
- const char *str = "4500l";
- long val;
-
- EXPECT_FALSE(atoint(str, &val));
-}
diff --git a/contrib/ntp/tests/libntp/g_atouint.cpp b/contrib/ntp/tests/libntp/g_atouint.cpp
deleted file mode 100644
index ba261dbb10ac..000000000000
--- a/contrib/ntp/tests/libntp/g_atouint.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "g_libntptest.h"
-
-class atouintTest : public libntptest {
-};
-
-TEST_F(atouintTest, RegularPositive) {
- const char *str = "305";
- u_long actual;
-
- ASSERT_TRUE(atouint(str, &actual));
- EXPECT_EQ(305, actual);
-}
-
-TEST_F(atouintTest, PositiveOverflowBoundary) {
- const char *str = "4294967296";
- u_long actual;
-
- ASSERT_FALSE(atouint(str, &actual));
-}
-
-TEST_F(atouintTest, PositiveOverflowBig) {
- const char *str = "8000000000";
- u_long actual;
-
- ASSERT_FALSE(atouint(str, &actual));
-}
-
-TEST_F(atouintTest, Negative) {
- const char *str = "-1";
- u_long actual;
-
- ASSERT_FALSE(atouint(str, &actual));
-}
-
-TEST_F(atouintTest, IllegalChar) {
- const char *str = "50c3";
- u_long actual;
-
- ASSERT_FALSE(atouint(str, &actual));
-}
diff --git a/contrib/ntp/tests/libntp/g_authkeys.cpp b/contrib/ntp/tests/libntp/g_authkeys.cpp
deleted file mode 100644
index 773112e52323..000000000000
--- a/contrib/ntp/tests/libntp/g_authkeys.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/* This file contains test for both libntp/authkeys.c and libntp/authusekey.c */
-
-#include "g_libntptest.h"
-
-extern "C" {
-#ifdef OPENSSL
-# include "openssl/err.h"
-# include "openssl/rand.h"
-# include "openssl/evp.h"
-#endif
-#include "ntp.h"
-#include "ntp_stdlib.h"
-};
-
-class authkeysTest : public libntptest {
-protected:
- static const int KEYTYPE = KEY_TYPE_MD5;
-
- virtual void SetUp() {
- /*
- * init_auth() is called by tests_main.cpp earlier. It
- * does not initialize global variables like
- * authnumkeys, so let's reset them to zero here.
- */
- authnumkeys = 0;
-
- /*
- * Especially, empty the key cache!
- */
- cache_keyid = 0;
- cache_type = 0;
- cache_flags = 0;
- cache_secret = NULL;
- cache_secretsize = 0;
- }
-
- void AddTrustedKey(keyid_t keyno) {
- /*
- * We need to add a MD5-key in addition to setting the
- * trust, because authhavekey() requires type != 0.
- */
- MD5auth_setkey(keyno, KEYTYPE, NULL, 0);
-
- authtrust(keyno, TRUE);
- }
-
- void AddUntrustedKey(keyid_t keyno) {
- authtrust(keyno, FALSE);
- }
-};
-
-TEST_F(authkeysTest, AddTrustedKeys) {
- const keyid_t KEYNO1 = 5;
- const keyid_t KEYNO2 = 8;
-
- AddTrustedKey(KEYNO1);
- AddTrustedKey(KEYNO2);
-
- EXPECT_TRUE(authistrusted(KEYNO1));
- EXPECT_TRUE(authistrusted(KEYNO2));
-}
-
-TEST_F(authkeysTest, AddUntrustedKey) {
- const keyid_t KEYNO = 3;
-
- AddUntrustedKey(KEYNO);
-
- EXPECT_FALSE(authistrusted(KEYNO));
-}
-
-TEST_F(authkeysTest, HaveKeyCorrect) {
- const keyid_t KEYNO = 3;
-
- AddTrustedKey(KEYNO);
-
- EXPECT_TRUE(auth_havekey(KEYNO));
- EXPECT_TRUE(authhavekey(KEYNO));
-}
-
-TEST_F(authkeysTest, HaveKeyIncorrect) {
- const keyid_t KEYNO = 2;
-
- EXPECT_FALSE(auth_havekey(KEYNO));
- EXPECT_FALSE(authhavekey(KEYNO));
-}
-
-TEST_F(authkeysTest, AddWithAuthUseKey) {
- const keyid_t KEYNO = 5;
- const char* KEY = "52a";
-
- EXPECT_TRUE(authusekey(KEYNO, KEYTYPE, (u_char*)KEY));
-}
-
-TEST_F(authkeysTest, EmptyKey) {
- const keyid_t KEYNO = 3;
- const char* KEY = "";
-
-
- EXPECT_FALSE(authusekey(KEYNO, KEYTYPE, (u_char*)KEY));
-}
diff --git a/contrib/ntp/tests/libntp/g_buftvtots.cpp b/contrib/ntp/tests/libntp/g_buftvtots.cpp
deleted file mode 100644
index 050398b28369..000000000000
--- a/contrib/ntp/tests/libntp/g_buftvtots.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-#include "g_lfptest.h"
-
-extern "C" {
-#include "ntp_unixtime.h"
-};
-
-// Required for Solaris.
-#include <math.h>
-
-class buftvtotsTest : public lfptest {
-};
-
-#ifndef SYS_WINNT
-TEST_F(buftvtotsTest, ZeroBuffer) {
- const timeval input = {0, 0};
- const l_fp expected = {0 + JAN_1970, 0};
-
- l_fp actual;
-
- ASSERT_TRUE(buftvtots((const char*)(&input), &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(buftvtotsTest, IntegerAndFractionalBuffer) {
- const timeval input = {5, 500000}; // 5.5
- const l_fp expected = {5 + JAN_1970, HALF};
-
- l_fp actual;
-
- ASSERT_TRUE(buftvtots((const char*)(&input), &actual));
-
- // Compare the fractional part with an absolute error given.
- EXPECT_EQ(expected.l_ui, actual.l_ui);
-
- double expectedDouble, actualDouble;
- M_LFPTOD(0, expected.l_uf, expectedDouble);
- M_LFPTOD(0, actual.l_uf, actualDouble);
-
- // The error should be less than 0.5 us
- EXPECT_NEAR(expectedDouble, actualDouble, 0.0000005);
-}
-
-TEST_F(buftvtotsTest, IllegalMicroseconds) {
- const timeval input = {0, 1100000}; // > 999 999 microseconds.
-
- l_fp actual;
-
- ASSERT_FALSE(buftvtots((const char*)(&input), &actual));
-}
-
-#else
-TEST_F(buftvtotsTest, AlwaysFalseOnWindows) {
- /*
- * Under Windows, buftvtots will just return
- * 0 (false).
- */
- l_fp actual;
- ASSERT_FALSE(buftvtots("", &actual));
-}
-
-#endif
diff --git a/contrib/ntp/tests/libntp/g_calendar.cpp b/contrib/ntp/tests/libntp/g_calendar.cpp
deleted file mode 100644
index 2db9ff78f496..000000000000
--- a/contrib/ntp/tests/libntp/g_calendar.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_calendar.h"
-}
-
-#include <string>
-#include <sstream>
-
-class calendarTest : public libntptest {
-protected:
- static int leapdays(int year);
-
- std::string CalendarToString(const calendar &cal);
- std::string CalendarToString(const isodate &iso);
- ::testing::AssertionResult IsEqual(const calendar &expected, const calendar &actual);
- ::testing::AssertionResult IsEqual(const isodate &expected, const isodate &actual);
-
- std::string DateToString(const calendar &cal);
- std::string DateToString(const isodate &iso);
- ::testing::AssertionResult IsEqualDate(const calendar &expected, const calendar &actual);
- ::testing::AssertionResult IsEqualDate(const isodate &expected, const isodate &actual);
-};
-
-
-// ---------------------------------------------------------------------
-// test support stuff
-// ---------------------------------------------------------------------
-int
-calendarTest::leapdays(int year)
-{
- if (year % 400 == 0)
- return 1;
- if (year % 100 == 0)
- return 0;
- if (year % 4 == 0)
- return 1;
- return 0;
-}
-
-std::string
-calendarTest::CalendarToString(const calendar &cal) {
- std::ostringstream ss;
- ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday
- << " (" << cal.yearday << ") " << (u_int)cal.hour << ":"
- << (u_int)cal.minute << ":" << (u_int)cal.second;
- return ss.str();
-}
-
-std::string
-calendarTest:: CalendarToString(const isodate &iso) {
- std::ostringstream ss;
- ss << iso.year << "-" << (u_int)iso.week << "-" << (u_int)iso.weekday
- << (u_int)iso.hour << ":" << (u_int)iso.minute << ":" << (u_int)iso.second;
- return ss.str();
-}
-
-::testing::AssertionResult
-calendarTest:: IsEqual(const calendar &expected, const calendar &actual) {
- if (expected.year == actual.year &&
- (!expected.yearday || expected.yearday == actual.yearday) &&
- expected.month == actual.month &&
- expected.monthday == actual.monthday &&
- expected.hour == actual.hour &&
- expected.minute == actual.minute &&
- expected.second == actual.second) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "expected: " << CalendarToString(expected) << " but was "
- << CalendarToString(actual);
- }
-}
-
-::testing::AssertionResult
-calendarTest:: IsEqual(const isodate &expected, const isodate &actual) {
- if (expected.year == actual.year &&
- expected.week == actual.week &&
- expected.weekday == actual.weekday &&
- expected.hour == actual.hour &&
- expected.minute == actual.minute &&
- expected.second == actual.second) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "expected: " << CalendarToString(expected) << " but was "
- << CalendarToString(actual);
- }
-}
-
-std::string
-calendarTest:: DateToString(const calendar &cal) {
- std::ostringstream ss;
- ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday
- << " (" << cal.yearday << ")";
- return ss.str();
-}
-
-std::string
-calendarTest:: DateToString(const isodate &iso) {
- std::ostringstream ss;
- ss << iso.year << "-" << (u_int)iso.week << "-" << (u_int)iso.weekday;
- return ss.str();
-}
-
-::testing::AssertionResult
-calendarTest:: IsEqualDate(const calendar &expected, const calendar &actual) {
- if (expected.year == actual.year &&
- (!expected.yearday || expected.yearday == actual.yearday) &&
- expected.month == actual.month &&
- expected.monthday == actual.monthday) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "expected: " << DateToString(expected) << " but was "
- << DateToString(actual);
- }
-}
-
-::testing::AssertionResult
-calendarTest:: IsEqualDate(const isodate &expected, const isodate &actual) {
- if (expected.year == actual.year &&
- expected.week == actual.week &&
- expected.weekday == actual.weekday) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "expected: " << DateToString(expected) << " but was "
- << DateToString(actual);
- }
-}
-
-
-// ---------------------------------------------------------------------
-// test cases
-// ---------------------------------------------------------------------
-static const u_short real_month_table[2][13] = {
- /* -*- table for regular years -*- */
- { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
- /* -*- table for leap years -*- */
- { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
-};
-
-// days in month, with one month wrap-around at both ends
-static const u_short real_month_days[2][14] = {
- /* -*- table for regular years -*- */
- { 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 },
- /* -*- table for leap years -*- */
- { 31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 }
-};
-
-// test the day/sec join & split ops, making sure that 32bit
-// intermediate results would definitely overflow and the hi DWORD of
-// the 'vint64' is definitely needed.
-TEST_F(calendarTest, DaySplitMerge) {
- for (int32 day = -1000000; day <= 1000000; day += 100) {
- for (int32 sec = -100000; sec <= 186400; sec += 10000) {
- vint64 merge = ntpcal_dayjoin(day, sec);
- ntpcal_split split = ntpcal_daysplit(&merge);
- int32 eday = day;
- int32 esec = sec;
-
- while (esec >= 86400) {
- eday += 1;
- esec -= 86400;
- }
- while (esec < 0) {
- eday -= 1;
- esec += 86400;
- }
-
- EXPECT_EQ(eday, split.hi);
- EXPECT_EQ(esec, split.lo);
- }
- }
-}
-
-TEST_F(calendarTest, SplitYearDays1) {
- for (int32 eyd = -1; eyd <= 365; eyd++) {
- ntpcal_split split = ntpcal_split_yeardays(eyd, 0);
- if (split.lo >= 0 && split.hi >= 0) {
- EXPECT_GT(12, split.hi);
- EXPECT_GT(real_month_days[0][split.hi+1], split.lo);
- int32 tyd = real_month_table[0][split.hi] + split.lo;
- EXPECT_EQ(eyd, tyd);
- } else
- EXPECT_TRUE(eyd < 0 || eyd > 364);
- }
-}
-
-TEST_F(calendarTest, SplitYearDays2) {
- for (int32 eyd = -1; eyd <= 366; eyd++) {
- ntpcal_split split = ntpcal_split_yeardays(eyd, 1);
- if (split.lo >= 0 && split.hi >= 0) {
- EXPECT_GT(12, split.hi);
- EXPECT_GT(real_month_days[1][split.hi+1], split.lo);
- int32 tyd = real_month_table[1][split.hi] + split.lo;
- EXPECT_EQ(eyd, tyd);
- } else
- EXPECT_TRUE(eyd < 0 || eyd > 365);
- }
-}
-
-TEST_F(calendarTest, RataDie1) {
- int32 testDate = 1; // 0001-01-01 (proleptic date)
- calendar expected = { 1, 1, 1, 1 };
- calendar actual;
-
- ntpcal_rd_to_date(&actual, testDate);
- EXPECT_TRUE(IsEqualDate(expected, actual));
-}
-
-// check last day of february for first 10000 years
-TEST_F(calendarTest, LeapYears1) {
- calendar dateIn, dateOut;
-
- for (dateIn.year = 1; dateIn.year < 10000; ++dateIn.year) {
- dateIn.month = 2;
- dateIn.monthday = 28 + leapdays(dateIn.year);
- dateIn.yearday = 31 + dateIn.monthday;
-
- ntpcal_rd_to_date(&dateOut, ntpcal_date_to_rd(&dateIn));
-
- EXPECT_TRUE(IsEqualDate(dateIn, dateOut));
- }
-}
-
-// check first day of march for first 10000 years
-TEST_F(calendarTest, LeapYears2) {
- calendar dateIn, dateOut;
-
- for (dateIn.year = 1; dateIn.year < 10000; ++dateIn.year) {
- dateIn.month = 3;
- dateIn.monthday = 1;
- dateIn.yearday = 60 + leapdays(dateIn.year);
-
- ntpcal_rd_to_date(&dateOut, ntpcal_date_to_rd(&dateIn));
- EXPECT_TRUE(IsEqualDate(dateIn, dateOut));
- }
-}
-
-// Full roundtrip for 1601-01-01 to 2400-12-31
-// checks sequence of rata die numbers and validates date output
-// (since the input is all nominal days of the calendar in that range
-// and the result of the inverse calculation must match the input no
-// invalid output can occur.)
-TEST_F(calendarTest, RoundTripDate) {
- calendar truDate, expDate = { 1600, 0, 12, 31 };;
- int32 truRdn, expRdn = ntpcal_date_to_rd(&expDate);
- int leaps;
-
- while (expDate.year < 2400) {
- expDate.year++;
- expDate.month = 0;
- expDate.yearday = 0;
- leaps = leapdays(expDate.year);
- while (expDate.month < 12) {
- expDate.month++;
- expDate.monthday = 0;
- while (expDate.monthday < real_month_days[leaps][expDate.month]) {
- expDate.monthday++;
- expDate.yearday++;
- expRdn++;
-
- truRdn = ntpcal_date_to_rd(&expDate);
- EXPECT_EQ(expRdn, truRdn);
-
- ntpcal_rd_to_date(&truDate, truRdn);
- EXPECT_TRUE(IsEqualDate(expDate, truDate));
- }
- }
- }
-}
-
-// Roundtrip testing on calyearstart
-TEST_F(calendarTest, RoundTripYearStart) {
- static const time_t pivot = 0;
- u_int32 ntp, expys, truys;
- calendar date;
-
- for (ntp = 0; ntp < 0xFFFFFFFFu - 30000000u; ntp += 30000000u) {
- truys = calyearstart(ntp, &pivot);
- ntpcal_ntp_to_date(&date, ntp, &pivot);
- date.month = date.monthday = 1;
- date.hour = date.minute = date.second = 0;
- expys = ntpcal_date_to_ntp(&date);
- EXPECT_EQ(expys, truys);
- }
-}
-
-// Roundtrip testing on calymonthstart
-TEST_F(calendarTest, RoundTripMonthStart) {
- static const time_t pivot = 0;
- u_int32 ntp, expms, trums;
- calendar date;
-
- for (ntp = 0; ntp < 0xFFFFFFFFu - 2000000u; ntp += 2000000u) {
- trums = calmonthstart(ntp, &pivot);
- ntpcal_ntp_to_date(&date, ntp, &pivot);
- date.monthday = 1;
- date.hour = date.minute = date.second = 0;
- expms = ntpcal_date_to_ntp(&date);
- EXPECT_EQ(expms, trums);
- }
-}
-
-// Roundtrip testing on calweekstart
-TEST_F(calendarTest, RoundTripWeekStart) {
- static const time_t pivot = 0;
- u_int32 ntp, expws, truws;
- isodate date;
-
- for (ntp = 0; ntp < 0xFFFFFFFFu - 600000u; ntp += 600000u) {
- truws = calweekstart(ntp, &pivot);
- isocal_ntp_to_date(&date, ntp, &pivot);
- date.hour = date.minute = date.second = 0;
- date.weekday = 1;
- expws = isocal_date_to_ntp(&date);
- EXPECT_EQ(expws, truws);
- }
-}
-
-// Roundtrip testing on caldaystart
-TEST_F(calendarTest, RoundTripDayStart) {
- static const time_t pivot = 0;
- u_int32 ntp, expds, truds;
- calendar date;
-
- for (ntp = 0; ntp < 0xFFFFFFFFu - 80000u; ntp += 80000u) {
- truds = caldaystart(ntp, &pivot);
- ntpcal_ntp_to_date(&date, ntp, &pivot);
- date.hour = date.minute = date.second = 0;
- expds = ntpcal_date_to_ntp(&date);
- EXPECT_EQ(expds, truds);
- }
-}
-
diff --git a/contrib/ntp/tests/libntp/g_caljulian.cpp b/contrib/ntp/tests/libntp/g_caljulian.cpp
deleted file mode 100644
index 7ed38c43b6d9..000000000000
--- a/contrib/ntp/tests/libntp/g_caljulian.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_calendar.h"
-}
-
-#include <string>
-#include <sstream>
-
-class caljulianTest : public libntptest {
-protected:
- virtual void SetUp();
- virtual void TearDown();
-
- std::string CalendarToString(const calendar &cal) {
- std::ostringstream ss;
- ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday
- << " (" << cal.yearday << ") " << (u_int)cal.hour << ":"
- << (u_int)cal.minute << ":" << (u_int)cal.second;
- return ss.str();
- }
-
- ::testing::AssertionResult IsEqual(const calendar &expected, const calendar &actual) {
- if (expected.year == actual.year &&
- (expected.yearday == actual.yearday ||
- (expected.month == actual.month &&
- expected.monthday == actual.monthday)) &&
- expected.hour == actual.hour &&
- expected.minute == actual.minute &&
- expected.second == actual.second) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "expected: " << CalendarToString(expected) << " but was "
- << CalendarToString(actual);
- }
- }
-};
-
-void caljulianTest::SetUp()
-{
- ntpcal_set_timefunc(timefunc);
- settime(1970, 1, 1, 0, 0, 0);
-}
-
-void caljulianTest::TearDown()
-{
- ntpcal_set_timefunc(NULL);
-}
-
-
-TEST_F(caljulianTest, RegularTime) {
- u_long testDate = 3485080800UL; // 2010-06-09 14:00:00
- calendar expected = {2010,160,6,9,14,0,0};
-
- calendar actual;
-
- caljulian(testDate, &actual);
-
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(caljulianTest, LeapYear) {
- u_long input = 3549902400UL; // 2012-06-28 20:00:00Z
- calendar expected = {2012, 179, 6, 28, 20, 0, 0};
-
- calendar actual;
-
- caljulian(input, &actual);
-
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(caljulianTest, uLongBoundary) {
- u_long time = 4294967295UL; // 2036-02-07 6:28:15
- calendar expected = {2036,0,2,7,6,28,15};
-
- calendar actual;
-
- caljulian(time, &actual);
-
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(caljulianTest, uLongWrapped) {
- u_long time = 0;
- calendar expected = {2036,0,2,7,6,28,16};
-
- calendar actual;
-
- caljulian(time, &actual);
-
- EXPECT_TRUE(IsEqual(expected, actual));
-}
diff --git a/contrib/ntp/tests/libntp/g_caltontp.cpp b/contrib/ntp/tests/libntp/g_caltontp.cpp
deleted file mode 100644
index 7dafec0ab19c..000000000000
--- a/contrib/ntp/tests/libntp/g_caltontp.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_calendar.h"
-}
-
-class caltontpTest : public libntptest {
-};
-
-TEST_F(caltontpTest, DateGivenMonthDay) {
- // 2010-06-24 12:50:00
- calendar input = {2010, 0, 6, 24, 12, 50, 0};
-
- u_long expected = 3486372600UL; // This is the timestamp above.
-
- EXPECT_EQ(expected, caltontp(&input));
-}
-
-TEST_F(caltontpTest, DateGivenYearDay) {
- // 2010-06-24 12:50:00
- // This is the 175th day of 2010.
- calendar input = {2010, 175, 0, 0, 12, 50, 0};
-
- u_long expected = 3486372600UL; // This is the timestamp above.
-
- EXPECT_EQ(expected, caltontp(&input));
-}
-
-TEST_F(caltontpTest, DateLeapYear) {
- // 2012-06-24 12:00:00
- // This is the 176th day of 2012 (since 2012 is a leap year).
- calendar inputYd = {2012, 176, 0, 0, 12, 00, 00};
- calendar inputMd = {2012, 0, 6, 24, 12, 00, 00};
-
- u_long expected = 3549528000UL;
-
- EXPECT_EQ(expected, caltontp(&inputYd));
- EXPECT_EQ(expected, caltontp(&inputMd));
-}
-
-TEST_F(caltontpTest, WraparoundDateIn2036) {
- // 2036-02-07 06:28:16
- // This is (one) wrapping boundary where we go from ULONG_MAX to 0.
- calendar input = {2036, 0, 2, 7, 6, 28, 16};
-
- u_long expected = 0UL;
-
- EXPECT_EQ(expected, caltontp(&input));
-}
diff --git a/contrib/ntp/tests/libntp/g_calyearstart.cpp b/contrib/ntp/tests/libntp/g_calyearstart.cpp
deleted file mode 100644
index 59859be61c57..000000000000
--- a/contrib/ntp/tests/libntp/g_calyearstart.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "g_libntptest.h"
-
-class calyearstartTest : public libntptest {
-protected:
- virtual void SetUp();
- virtual void TearDown();
-};
-
-void calyearstartTest::SetUp()
-{
- ntpcal_set_timefunc(timefunc);
- settime(1970, 1, 1, 0, 0, 0);
-}
-
-void calyearstartTest::TearDown()
-{
- ntpcal_set_timefunc(NULL);
-}
-
-
-TEST_F(calyearstartTest, NoWrapInDateRange) {
- const u_int32 input = 3486372600UL; // 2010-06-24 12:50:00.
- const u_int32 expected = 3471292800UL; // 2010-01-01 00:00:00
-
- EXPECT_EQ(expected, calyearstart(input, &nowtime));
- EXPECT_EQ(expected, calyearstart(input, NULL));
-}
-
-TEST_F(calyearstartTest, NoWrapInDateRangeLeapYear) {
- const u_int32 input = 3549528000UL; // 2012-06-24 12:00:00
- const u_int32 expected = 3534364800UL; // 2012-01-01 00:00:00
-
- EXPECT_EQ(expected, calyearstart(input, &nowtime));
- EXPECT_EQ(expected, calyearstart(input, NULL));
-}
-
-TEST_F(calyearstartTest, WrapInDateRange) {
- const u_int32 input = 19904UL; // 2036-02-07 12:00:00
- const u_int32 expected = 4291747200UL; // 2036-01-01 00:00:00
-
- EXPECT_EQ(expected, calyearstart(input, &nowtime));
- EXPECT_EQ(expected, calyearstart(input, NULL));
-}
diff --git a/contrib/ntp/tests/libntp/g_clocktime.cpp b/contrib/ntp/tests/libntp/g_clocktime.cpp
deleted file mode 100644
index ee496d252773..000000000000
--- a/contrib/ntp/tests/libntp/g_clocktime.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-#include "g_libntptest.h"
-
-// ---------------------------------------------------------------------
-// test fixture
-//
-// The clocktimeTest uses the NTP calendar feature to use a mockup
-// function for getting the current system time, so the tests are not
-// dependent on the actual system time.
-
-class clocktimeTest : public libntptest {
- virtual void SetUp();
- virtual void TearDown();
-};
-
-void clocktimeTest::SetUp()
-{
- ntpcal_set_timefunc(timefunc);
- settime(2000, 1, 1, 0, 0, 0);
-}
-
-void clocktimeTest::TearDown()
-{
- ntpcal_set_timefunc(NULL);
-}
-
-// ---------------------------------------------------------------------
-// test cases
-
-TEST_F(clocktimeTest, CurrentYear) {
- // Timestamp: 2010-06-24 12:50:00Z
- const u_int32 timestamp = 3486372600UL;
- const u_int32 expected = timestamp; // exactly the same.
-
- const int yday=175, hour=12, minute=50, second=0, tzoff=0;
-
- u_long yearstart=0;
- u_int32 actual;
-
- ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
- &yearstart, &actual));
- EXPECT_EQ(expected, actual);
-}
-
-TEST_F(clocktimeTest, CurrentYearFuzz) {
- /*
- * Timestamp (rec_ui) is: 2010-06-24 12:50:00
- * Time sent into function is 12:00:00.
- *
- * Since the fuzz is rather small, we should get a NTP
- * timestamp for the 12:00:00 time.
- */
-
- const u_int32 timestamp = 3486372600UL; // 2010-06-24 12:50:00Z
- const u_int32 expected = 3486369600UL; // 2010-06-24 12:00:00Z
-
- const int yday=175, hour=12, minute=0, second=0, tzoff=0;
-
- u_long yearstart=0;
- u_int32 actual;
-
- ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
- &yearstart, &actual));
- EXPECT_EQ(expected, actual);
-}
-
-TEST_F(clocktimeTest, TimeZoneOffset) {
- /*
- * Timestamp (rec_ui) is: 2010-06-24 12:00:00 +0800
- * (which is 2010-06-24 04:00:00Z)
- *
- * Time sent into function is 04:00:00 +0800
- */
- const u_int32 timestamp = 3486369600UL;
- const u_int32 expected = timestamp;
-
- const int yday=175, hour=4, minute=0, second=0, tzoff=8;
-
- u_long yearstart=0;
- u_int32 actual;
-
- ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
- &yearstart, &actual));
- EXPECT_EQ(expected, actual);
-}
-
-TEST_F(clocktimeTest, WrongYearStart) {
- /*
- * Timestamp (rec_ui) is: 2010-01-02 11:00:00Z
- * Time sent into function is 11:00:00.
- * Yearstart sent into function is the yearstart of 2009!
- */
- const u_int32 timestamp = 3471418800UL;
- const u_int32 expected = timestamp;
-
- const int yday=2, hour=11, minute=0, second=0, tzoff=0;
-
- u_long yearstart = 302024100UL; // Yearstart of 2009.
- u_int32 actual;
-
- ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
- &yearstart, &actual));
- EXPECT_EQ(expected, actual);
-}
-
-TEST_F(clocktimeTest, PreviousYear) {
- /*
- * Timestamp is: 2010-01-01 01:00:00Z
- * Time sent into function is 23:00:00
- * (which is meant to be 2009-12-31 23:00:00Z)
- */
- const u_int32 timestamp = 3471296400UL;
- const u_int32 expected = 3471289200UL;
-
- const int yday=365, hour=23, minute=0, second=0, tzoff=0;
-
- u_long yearstart = 0;
- u_int32 actual;
-
- ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
- &yearstart, &actual));
- EXPECT_EQ(expected, actual);
-}
-
-TEST_F(clocktimeTest, NextYear) {
- /*
- * Timestamp is: 2009-12-31 23:00:00Z
- * Time sent into function is 01:00:00
- * (which is meant to be 2010-01-01 01:00:00Z)
- */
- const u_int32 timestamp = 3471289200UL;
- const u_int32 expected = 3471296400UL;
-
- const int yday=1, hour=1, minute=0, second=0, tzoff=0;
- u_long yearstart = 0;
- u_int32 actual;
-
- ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
- &yearstart, &actual));
- EXPECT_EQ(expected, actual);
-}
-
-TEST_F(clocktimeTest, NoReasonableConversion) {
- /* Timestamp is: 2010-01-02 11:00:00Z */
- const u_int32 timestamp = 3471418800UL;
-
- const int yday=100, hour=12, minute=0, second=0, tzoff=0;
- u_long yearstart = 0;
- u_int32 actual;
-
- ASSERT_FALSE(clocktime(yday, hour, minute, second, tzoff, timestamp,
- &yearstart, &actual));
-}
-
-TEST_F(clocktimeTest, AlwaysInLimit) {
- /* Timestamp is: 2010-01-02 11:00:00Z */
- const u_int32 timestamp = 3471418800UL;
- const u_short prime_incs[] = { 127, 151, 163, 179 };
- int cyc;
- int yday;
- u_char whichprime;
- u_short ydayinc;
- int hour;
- int minute;
- int second;
- u_long yearstart;
- u_int32 actual;
- u_int32 diff;
-
- yearstart = 0;
- for (cyc = 0; cyc < 5; cyc++) {
- settime(1900 + cyc * 65, 1, 1, 0, 0, 0);
- for (yday = -26000; yday < 26000; yday += ydayinc) {
- whichprime = abs(yday) % COUNTOF(prime_incs);
- ydayinc = prime_incs[whichprime];
- for (hour = -204; hour < 204; hour += 2) {
- for (minute = -60; minute < 60; minute++) {
- clocktime(yday, hour, minute, 30, 0,
- timestamp, &yearstart, &actual);
- diff = actual - timestamp;
- if (diff >= 0x80000000UL)
- diff = ~diff + 1;
- ASSERT_LE(diff, (183u * SECSPERDAY));
- }
- }
- }
- }
-}
diff --git a/contrib/ntp/tests/libntp/g_decodenetnum.cpp b/contrib/ntp/tests/libntp/g_decodenetnum.cpp
deleted file mode 100644
index 059642890601..000000000000
--- a/contrib/ntp/tests/libntp/g_decodenetnum.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-#include "g_sockaddrtest.h"
-
-class decodenetnumTest : public sockaddrtest {
-};
-
-TEST_F(decodenetnumTest, IPv4AddressOnly) {
- const char *str = "192.0.2.1";
- sockaddr_u actual;
-
- sockaddr_u expected;
- expected.sa4.sin_family = AF_INET;
- expected.sa4.sin_addr.s_addr = inet_addr("192.0.2.1");
- SET_PORT(&expected, NTP_PORT);
-
- ASSERT_TRUE(decodenetnum(str, &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(decodenetnumTest, IPv4AddressWithPort) {
- const char *str = "192.0.2.2:2000";
- sockaddr_u actual;
-
- sockaddr_u expected;
- expected.sa4.sin_family = AF_INET;
- expected.sa4.sin_addr.s_addr = inet_addr("192.0.2.2");
- SET_PORT(&expected, 2000);
-
- ASSERT_TRUE(decodenetnum(str, &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(decodenetnumTest, IPv6AddressOnly) {
- const struct in6_addr address = {
- 0x20, 0x01, 0x0d, 0xb8,
- 0x85, 0xa3, 0x08, 0xd3,
- 0x13, 0x19, 0x8a, 0x2e,
- 0x03, 0x70, 0x73, 0x34
- };
-
- const char *str = "2001:0db8:85a3:08d3:1319:8a2e:0370:7334";
- sockaddr_u actual;
-
- sockaddr_u expected;
- expected.sa6.sin6_family = AF_INET6;
- expected.sa6.sin6_addr = address;
- SET_PORT(&expected, NTP_PORT);
-
- ASSERT_TRUE(decodenetnum(str, &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(decodenetnumTest, IPv6AddressWithPort) {
- const struct in6_addr address = {
- 0x20, 0x01, 0x0d, 0xb8,
- 0x85, 0xa3, 0x08, 0xd3,
- 0x13, 0x19, 0x8a, 0x2e,
- 0x03, 0x70, 0x73, 0x34
- };
-
- const char *str = "[2001:0db8:85a3:08d3:1319:8a2e:0370:7334]:3000";
- sockaddr_u actual;
-
- sockaddr_u expected;
- expected.sa6.sin6_family = AF_INET6;
- expected.sa6.sin6_addr = address;
- SET_PORT(&expected, 3000);
-
- ASSERT_TRUE(decodenetnum(str, &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(decodenetnumTest, IllegalAddress) {
- const char *str = "192.0.2.270:2000";
- sockaddr_u actual;
-
- ASSERT_FALSE(decodenetnum(str, &actual));
-}
-
-TEST_F(decodenetnumTest, IllegalCharInPort) {
- /* An illegal port does not make the decodenetnum fail, but instead
- * makes it use the standard port.
- */
- const char *str = "192.0.2.1:a700";
- sockaddr_u actual;
-
- sockaddr_u expected;
- expected.sa4.sin_family = AF_INET;
- expected.sa4.sin_addr.s_addr = inet_addr("192.0.2.1");
- SET_PORT(&expected, NTP_PORT);
-
- ASSERT_TRUE(decodenetnum(str, &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
diff --git a/contrib/ntp/tests/libntp/g_hextoint.cpp b/contrib/ntp/tests/libntp/g_hextoint.cpp
deleted file mode 100644
index c20821a9b5e8..000000000000
--- a/contrib/ntp/tests/libntp/g_hextoint.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "g_libntptest.h"
-
-class hextointTest : public libntptest {
-};
-
-TEST_F(hextointTest, SingleDigit) {
- const char *str = "a"; // 10 decimal
- u_long actual;
-
- ASSERT_TRUE(hextoint(str, &actual));
- EXPECT_EQ(10, actual);
-}
-
-TEST_F(hextointTest, MultipleDigits) {
- const char *str = "8F3"; // 2291 decimal
- u_long actual;
-
- ASSERT_TRUE(hextoint(str, &actual));
- EXPECT_EQ(2291, actual);
-}
-
-TEST_F(hextointTest, MaxUnsigned) {
- const char *str = "ffffffff"; // 4294967295 decimal
- u_long actual;
-
- ASSERT_TRUE(hextoint(str, &actual));
- EXPECT_EQ(4294967295UL, actual);
-}
-
-TEST_F(hextointTest, Overflow) {
- const char *str = "100000000"; // Overflow by 1
- u_long actual;
-
- ASSERT_FALSE(hextoint(str, &actual));
-}
-
-TEST_F(hextointTest, IllegalChar) {
- const char *str = "5gb"; // Illegal character g
- u_long actual;
-
- ASSERT_FALSE(hextoint(str, &actual));
-}
diff --git a/contrib/ntp/tests/libntp/g_hextolfp.cpp b/contrib/ntp/tests/libntp/g_hextolfp.cpp
deleted file mode 100644
index bcfb094f902b..000000000000
--- a/contrib/ntp/tests/libntp/g_hextolfp.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "g_lfptest.h"
-
-class hextolfpTest : public lfptest {
-};
-
-TEST_F(hextolfpTest, PositiveInteger) {
- const char *str = "00001000.00000000";
- l_fp actual;
-
- l_fp expected = {4096, 0}; // 16^3, no fraction part.
-
- ASSERT_TRUE(hextolfp(str, &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(hextolfpTest, NegativeInteger) {
- const char *str = "ffffffff.00000000"; // -1 decimal
- l_fp actual;
-
- l_fp expected = {-1, 0};
-
- ASSERT_TRUE(hextolfp(str, &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(hextolfpTest, PositiveFraction) {
- const char *str = "00002000.80000000"; // 8196.5 decimal
- l_fp actual;
-
- l_fp expected = {8192, HALF};
-
- ASSERT_TRUE(hextolfp(str, &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(hextolfpTest, NegativeFraction) {
- const char *str = "ffffffff.40000000"; // -1 + 0.25 decimal
- l_fp actual;
-
- l_fp expected = {-1, QUARTER}; //-1 + 0.25
-
- ASSERT_TRUE(hextolfp(str, &actual));
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(hextolfpTest, IllegalNumberOfInteger) {
- const char *str = "1000000.00000000"; // Missing one digit in integral part.
- l_fp actual;
-
- ASSERT_FALSE(hextolfp(str, &actual));
-}
-
-TEST_F(hextolfpTest, IllegalChar) {
- const char *str = "10000000.0000h000"; // Illegal character h.
- l_fp actual;
-
- ASSERT_FALSE(hextolfp(str, &actual));
-}
diff --git a/contrib/ntp/tests/libntp/g_humandate.cpp b/contrib/ntp/tests/libntp/g_humandate.cpp
deleted file mode 100644
index a50ae5340893..000000000000
--- a/contrib/ntp/tests/libntp/g_humandate.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "g_libntptest.h"
-
-#include <sstream>
-#include <string>
-
-class humandateTest : public libntptest {
-};
-
-TEST_F(humandateTest, RegularTime) {
- time_t sample = 1276601278;
- std::ostringstream expected;
-
- tm* time;
- time = localtime(&sample);
- ASSERT_TRUE(time != NULL);
-
- expected << std::setfill('0')
- << std::setw(2) << time->tm_hour << ":"
- << std::setw(2) << time->tm_min << ":"
- << std::setw(2) << time->tm_sec;
-
- EXPECT_STREQ(expected.str().c_str(), humantime(sample));
-}
-
-TEST_F(humandateTest, CurrentTime) {
- time_t sample;
- std::ostringstream expected;
-
- time(&sample);
-
- tm* time;
- time = localtime(&sample);
- ASSERT_TRUE(time != NULL);
-
- expected << std::setfill('0')
- << std::setw(2) << time->tm_hour << ":"
- << std::setw(2) << time->tm_min << ":"
- << std::setw(2) << time->tm_sec;
-
- EXPECT_STREQ(expected.str().c_str(), humantime(sample));
-}
diff --git a/contrib/ntp/tests/libntp/g_lfpfunc.cpp b/contrib/ntp/tests/libntp/g_lfpfunc.cpp
deleted file mode 100644
index c9aaf9f2352f..000000000000
--- a/contrib/ntp/tests/libntp/g_lfpfunc.cpp
+++ /dev/null
@@ -1,547 +0,0 @@
-#include "g_libntptest.h"
-#include "g_timestructs.h"
-
-extern "C" {
-#include "ntp_fp.h"
-}
-
-#include <float.h>
-#include <math.h>
-
-#include <string>
-#include <sstream>
-
-class lfpTest : public libntptest
-{
- // nothing new right now
-};
-
-struct lfp_hl {
- uint32_t h, l;
-};
-
-//----------------------------------------------------------------------
-// OO-wrapper for 'l_fp'
-//----------------------------------------------------------------------
-
-class LFP
-{
-public:
- ~LFP();
- LFP();
- LFP(const LFP& rhs);
- LFP(int32 i, u_int32 f);
-
- LFP operator+ (const LFP &rhs) const;
- LFP& operator+=(const LFP &rhs);
-
- LFP operator- (const LFP &rhs) const;
- LFP& operator-=(const LFP &rhs);
-
- LFP& operator=(const LFP &rhs);
- LFP operator-() const;
-
- bool operator==(const LFP &rhs) const;
-
- LFP neg() const;
- LFP abs() const;
- int signum() const;
-
- bool l_isgt (const LFP &rhs) const
- { return L_ISGT(&_v, &rhs._v); }
- bool l_isgtu(const LFP &rhs) const
- { return L_ISGTU(&_v, &rhs._v); }
- bool l_ishis(const LFP &rhs) const
- { return L_ISHIS(&_v, &rhs._v); }
- bool l_isgeq(const LFP &rhs) const
- { return L_ISGEQ(&_v, &rhs._v); }
- bool l_isequ(const LFP &rhs) const
- { return L_ISEQU(&_v, &rhs._v); }
-
- int ucmp(const LFP & rhs) const;
- int scmp(const LFP & rhs) const;
-
- std::string toString() const;
- std::ostream& toStream(std::ostream &oo) const;
-
- operator double() const;
- explicit LFP(double);
-
-protected:
- LFP(const l_fp &rhs);
-
- static int cmp_work(u_int32 a[3], u_int32 b[3]);
-
- l_fp _v;
-};
-
-static std::ostream& operator<<(std::ostream &oo, const LFP& rhs)
-{
- return rhs.toStream(oo);
-}
-
-//----------------------------------------------------------------------
-// reference comparision
-// This is implementad as a full signed MP-subtract in 3 limbs, where
-// the operands are zero or sign extended before the subtraction is
-// executed.
-//----------------------------------------------------------------------
-int LFP::scmp(const LFP & rhs) const
-{
- u_int32 a[3], b[3];
- const l_fp &op1(_v), &op2(rhs._v);
-
- a[0] = op1.l_uf; a[1] = op1.l_ui; a[2] = 0;
- b[0] = op2.l_uf; b[1] = op2.l_ui; b[2] = 0;
-
- a[2] -= (op1.l_i < 0);
- b[2] -= (op2.l_i < 0);
-
- return cmp_work(a,b);
-}
-
-int LFP::ucmp(const LFP & rhs) const
-{
- u_int32 a[3], b[3];
- const l_fp &op1(_v), &op2(rhs._v);
-
- a[0] = op1.l_uf; a[1] = op1.l_ui; a[2] = 0;
- b[0] = op2.l_uf; b[1] = op2.l_ui; b[2] = 0;
-
- return cmp_work(a,b);
-}
-
-int LFP::cmp_work(u_int32 a[3], u_int32 b[3])
-{
- u_int32 cy, idx, tmp;
- for (cy = idx = 0; idx < 3; ++idx) {
- tmp = a[idx]; cy = (a[idx] -= cy ) > tmp;
- tmp = a[idx]; cy |= (a[idx] -= b[idx]) > tmp;
- }
- if (a[2])
- return -1;
- return a[0] || a[1];
-}
-
-//----------------------------------------------------------------------
-// imlementation of the LFP stuff
-// This should be easy enough...
-//----------------------------------------------------------------------
-
-LFP::~LFP()
-{
- // NOP
-}
-
-LFP::LFP()
-{
- _v.l_ui = 0;
- _v.l_uf = 0;
-}
-
-LFP::LFP(int32 i, u_int32 f)
-{
- _v.l_i = i;
- _v.l_uf = f;
-}
-
-LFP::LFP(const LFP &rhs)
-{
- _v = rhs._v;
-}
-
-LFP::LFP(const l_fp & rhs)
-{
- _v = rhs;
-}
-
-LFP& LFP::operator=(const LFP & rhs)
-{
- _v = rhs._v;
- return *this;
-}
-
-LFP& LFP::operator+=(const LFP & rhs)
-{
- L_ADD(&_v, &rhs._v);
- return *this;
-}
-
-LFP& LFP::operator-=(const LFP & rhs)
-{
- L_SUB(&_v, &rhs._v);
- return *this;
-}
-
-LFP LFP::operator+(const LFP &rhs) const
-{
- LFP tmp(*this);
- return tmp += rhs;
-}
-
-LFP LFP::operator-(const LFP &rhs) const
-{
- LFP tmp(*this);
- return tmp -= rhs;
-}
-
-LFP LFP::operator-() const
-{
- LFP tmp(*this);
- L_NEG(&tmp._v);
- return tmp;
-}
-
-LFP
-LFP::neg() const
-{
- LFP tmp(*this);
- L_NEG(&tmp._v);
- return tmp;
-}
-
-LFP
-LFP::abs() const
-{
- LFP tmp(*this);
- if (L_ISNEG(&tmp._v))
- L_NEG(&tmp._v);
- return tmp;
-}
-
-int
-LFP::signum() const
-{
- if (_v.l_ui & 0x80000000u)
- return -1;
- return (_v.l_ui || _v.l_uf);
-}
-
-std::string
-LFP::toString() const
-{
- std::ostringstream oss;
- toStream(oss);
- return oss.str();
-}
-
-std::ostream&
-LFP::toStream(std::ostream &os) const
-{
- return os
- << mfptoa(_v.l_ui, _v.l_uf, 9)
- << " [$" << std::setw(8) << std::setfill('0') << std::hex << _v.l_ui
- << ':' << std::setw(8) << std::setfill('0') << std::hex << _v.l_uf
- << ']';
-}
-
-bool LFP::operator==(const LFP &rhs) const
-{
- return L_ISEQU(&_v, &rhs._v);
-}
-
-
-LFP::operator double() const
-{
- double res;
- LFPTOD(&_v, res);
- return res;
-}
-
-LFP::LFP(double rhs)
-{
- DTOLFP(rhs, &_v);
-}
-
-
-//----------------------------------------------------------------------
-// testing the relational macros works better with proper predicate
-// formatting functions; it slows down the tests a bit, but makes for
-// readable failure messages.
-//----------------------------------------------------------------------
-
-testing::AssertionResult isgt_p(
- const LFP &op1, const LFP &op2)
-{
- if (op1.l_isgt(op2))
- return testing::AssertionSuccess()
- << "L_ISGT(" << op1 << "," << op2 << ") is true";
- else
- return testing::AssertionFailure()
- << "L_ISGT(" << op1 << "," << op2 << ") is false";
-}
-
-testing::AssertionResult isgeq_p(
- const LFP &op1, const LFP &op2)
-{
- if (op1.l_isgeq(op2))
- return testing::AssertionSuccess()
- << "L_ISGEQ(" << op1 << "," << op2 << ") is true";
- else
- return testing::AssertionFailure()
- << "L_ISGEQ(" << op1 << "," << op2 << ") is false";
-}
-
-testing::AssertionResult isgtu_p(
- const LFP &op1, const LFP &op2)
-{
- if (op1.l_isgtu(op2))
- return testing::AssertionSuccess()
- << "L_ISGTU(" << op1 << "," << op2 << ") is true";
- else
- return testing::AssertionFailure()
- << "L_ISGTU(" << op1 << "," << op2 << ") is false";
-}
-
-testing::AssertionResult ishis_p(
- const LFP &op1, const LFP &op2)
-{
- if (op1.l_ishis(op2))
- return testing::AssertionSuccess()
- << "L_ISHIS(" << op1 << "," << op2 << ") is true";
- else
- return testing::AssertionFailure()
- << "L_ISHIS(" << op1 << "," << op2 << ") is false";
-}
-
-testing::AssertionResult isequ_p(
- const LFP &op1, const LFP &op2)
-{
- if (op1.l_isequ(op2))
- return testing::AssertionSuccess()
- << "L_ISEQU(" << op1 << "," << op2 << ") is true";
- else
- return testing::AssertionFailure()
- << "L_ISEQU(" << op1 << "," << op2 << ") is false";
-}
-
-//----------------------------------------------------------------------
-// test data table for add/sub and compare
-//----------------------------------------------------------------------
-
-static const lfp_hl addsub_tab[][3] = {
- // trivial idendity:
- {{0 ,0 }, { 0,0 }, { 0,0}},
- // with carry from fraction and sign change:
- {{-1,0x80000000}, { 0,0x80000000}, { 0,0}},
- // without carry from fraction
- {{ 1,0x40000000}, { 1,0x40000000}, { 2,0x80000000}},
- // with carry from fraction:
- {{ 1,0xC0000000}, { 1,0xC0000000}, { 3,0x80000000}},
- // with carry from fraction and sign change:
- {{0x7FFFFFFF, 0x7FFFFFFF}, {0x7FFFFFFF,0x7FFFFFFF}, {0xFFFFFFFE,0xFFFFFFFE}},
- // two tests w/o carry (used for l_fp<-->double):
- {{0x55555555,0xAAAAAAAA}, {0x11111111,0x11111111}, {0x66666666,0xBBBBBBBB}},
- {{0x55555555,0x55555555}, {0x11111111,0x11111111}, {0x66666666,0x66666666}},
- // wide-range test, triggers compare trouble
- {{0x80000000,0x00000001}, {0xFFFFFFFF,0xFFFFFFFE}, {0x7FFFFFFF,0xFFFFFFFF}}
-};
-static const size_t addsub_cnt(sizeof(addsub_tab)/sizeof(addsub_tab[0]));
-static const size_t addsub_tot(sizeof(addsub_tab)/sizeof(addsub_tab[0][0]));
-
-
-//----------------------------------------------------------------------
-// epsilon estimation for the precision of a conversion double --> l_fp
-//
-// The error estimation limit is as follows:
-// * The 'l_fp' fixed point fraction has 32 bits precision, so we allow
-// for the LSB to toggle by clamping the epsilon to be at least 2^(-31)
-//
-// * The double mantissa has a precsion 54 bits, so the other minimum is
-// dval * (2^(-53))
-//
-// The maximum of those two boundaries is used for the check.
-//
-// Note: once there are more than 54 bits between the highest and lowest
-// '1'-bit of the l_fp value, the roundtrip *will* create truncation
-// errors. This is an inherent property caused by the 54-bit mantissa of
-// the 'double' type.
-double eps(double d)
-{
- return std::max<double>(ldexp(1.0, -31), ldexp(fabs(d), -53));
-}
-
-//----------------------------------------------------------------------
-// test addition
-//----------------------------------------------------------------------
-TEST_F(lfpTest, AdditionLR) {
- for (size_t idx=0; idx < addsub_cnt; ++idx) {
- LFP op1(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
- LFP op2(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
- LFP exp(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
- LFP res(op1 + op2);
-
- ASSERT_EQ(exp, res);
- }
-}
-
-TEST_F(lfpTest, AdditionRL) {
- for (size_t idx=0; idx < addsub_cnt; ++idx) {
- LFP op2(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
- LFP op1(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
- LFP exp(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
- LFP res(op1 + op2);
-
- ASSERT_EQ(exp, res);
- }
-}
-
-//----------------------------------------------------------------------
-// test subtraction
-//----------------------------------------------------------------------
-TEST_F(lfpTest, SubtractionLR) {
- for (size_t idx=0; idx < addsub_cnt; ++idx) {
- LFP op2(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
- LFP exp(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
- LFP op1(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
- LFP res(op1 - op2);
-
- ASSERT_EQ(exp, res);
- }
-}
-
-TEST_F(lfpTest, SubtractionRL) {
- for (size_t idx=0; idx < addsub_cnt; ++idx) {
- LFP exp(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
- LFP op2(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
- LFP op1(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
- LFP res(op1 - op2);
-
- ASSERT_EQ(exp, res);
- }
-}
-
-//----------------------------------------------------------------------
-// test negation
-//----------------------------------------------------------------------
-TEST_F(lfpTest, Negation) {
- for (size_t idx=0; idx < addsub_cnt; ++idx) {
- LFP op1(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
- LFP op2(-op1);
- LFP sum(op1 + op2);
-
- ASSERT_EQ(LFP(0,0), sum);
- }
-}
-
-//----------------------------------------------------------------------
-// test absolute value
-//----------------------------------------------------------------------
-TEST_F(lfpTest, Absolute) {
- for (size_t idx=0; idx < addsub_cnt; ++idx) {
- LFP op1(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
- LFP op2(op1.abs());
-
- ASSERT_TRUE(op2.signum() >= 0);
-
- if (op1.signum() >= 0)
- op1 -= op2;
- else
- op1 += op2;
- ASSERT_EQ(LFP(0,0), op1);
- }
-
- // There is one special case we have to check: the minimum
- // value cannot be negated, or, to be more precise, the
- // negation reproduces the original pattern.
- LFP minVal(0x80000000, 0x00000000);
- LFP minAbs(minVal.abs());
- ASSERT_EQ(-1, minVal.signum());
- ASSERT_EQ(minVal, minAbs);
-}
-
-//----------------------------------------------------------------------
-// fp -> double -> fp rountrip test
-//----------------------------------------------------------------------
-TEST_F(lfpTest, FDF_RoundTrip) {
- // since a l_fp has 64 bits in it's mantissa and a double has
- // only 54 bits available (including the hidden '1') we have to
- // make a few concessions on the roundtrip precision. The 'eps()'
- // function makes an educated guess about the avilable precision
- // and checks the difference in the two 'l_fp' values against
- // that limit.
- for (size_t idx=0; idx < addsub_cnt; ++idx) {
- LFP op1(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
- double op2(op1);
- LFP op3(op2);
- // for manual checks only:
- // std::cout << std::setprecision(16) << op2 << std::endl;
- ASSERT_LE(fabs(op1-op3), eps(op2));
- }
-}
-
-//----------------------------------------------------------------------
-// test the compare stuff
-//
-// This uses the local compare and checks if the operations using the
-// macros in 'ntp_fp.h' produce mathing results.
-// ----------------------------------------------------------------------
-TEST_F(lfpTest, SignedRelOps) {
- const lfp_hl * tv(&addsub_tab[0][0]);
- for (size_t lc=addsub_tot-1; lc; --lc,++tv) {
- LFP op1(tv[0].h,tv[0].l);
- LFP op2(tv[1].h,tv[1].l);
- int cmp(op1.scmp(op2));
-
- switch (cmp) {
- case -1:
- std::swap(op1, op2);
- case 1:
- EXPECT_TRUE (isgt_p(op1,op2));
- EXPECT_FALSE(isgt_p(op2,op1));
-
- EXPECT_TRUE (isgeq_p(op1,op2));
- EXPECT_FALSE(isgeq_p(op2,op1));
-
- EXPECT_FALSE(isequ_p(op1,op2));
- EXPECT_FALSE(isequ_p(op2,op1));
- break;
- case 0:
- EXPECT_FALSE(isgt_p(op1,op2));
- EXPECT_FALSE(isgt_p(op2,op1));
-
- EXPECT_TRUE (isgeq_p(op1,op2));
- EXPECT_TRUE (isgeq_p(op2,op1));
-
- EXPECT_TRUE (isequ_p(op1,op2));
- EXPECT_TRUE (isequ_p(op2,op1));
- break;
- default:
- FAIL() << "unexpected SCMP result: " << cmp;
- }
- }
-}
-
-TEST_F(lfpTest, UnsignedRelOps) {
- const lfp_hl * tv(&addsub_tab[0][0]);
- for (size_t lc=addsub_tot-1; lc; --lc,++tv) {
- LFP op1(tv[0].h,tv[0].l);
- LFP op2(tv[1].h,tv[1].l);
- int cmp(op1.ucmp(op2));
-
- switch (cmp) {
- case -1:
- std::swap(op1, op2);
- case 1:
- EXPECT_TRUE (isgtu_p(op1,op2));
- EXPECT_FALSE(isgtu_p(op2,op1));
-
- EXPECT_TRUE (ishis_p(op1,op2));
- EXPECT_FALSE(ishis_p(op2,op1));
- break;
- case 0:
- EXPECT_FALSE(isgtu_p(op1,op2));
- EXPECT_FALSE(isgtu_p(op2,op1));
-
- EXPECT_TRUE (ishis_p(op1,op2));
- EXPECT_TRUE (ishis_p(op2,op1));
- break;
- default:
- FAIL() << "unexpected UCMP result: " << cmp;
- }
- }
-}
-
-//----------------------------------------------------------------------
-// that's all folks... but feel free to add things!
-//----------------------------------------------------------------------
diff --git a/contrib/ntp/tests/libntp/g_lfptest.h b/contrib/ntp/tests/libntp/g_lfptest.h
deleted file mode 100644
index 1daffef944d7..000000000000
--- a/contrib/ntp/tests/libntp/g_lfptest.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef NTP_TESTS_LFPTEST_H
-#define NTP_TESTS_LFPTEST_H
-
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_fp.h"
-};
-
-class lfptest : public libntptest {
-protected:
- ::testing::AssertionResult IsEqual(const l_fp &expected, const l_fp &actual) {
- if (L_ISEQU(&expected, &actual)) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << " expected: " << lfptoa(&expected, FRACTION_PREC)
- << " (" << expected.l_ui << "." << expected.l_uf << ")"
- << " but was: " << lfptoa(&actual, FRACTION_PREC)
- << " (" << actual.l_ui << "." << actual.l_uf << ")";
- }
- }
-
- static const int32 HALF = -2147483647L - 1L;
- static const int32 HALF_PROMILLE_UP = 2147484; // slightly more than 0.0005
- static const int32 HALF_PROMILLE_DOWN = 2147483; // slightly less than 0.0005
- static const int32 QUARTER = 1073741824L;
- static const int32 QUARTER_PROMILLE_APPRX = 1073742L;
-};
-
-#endif
-/* NTP_TESTS_LFPTEST_H */
diff --git a/contrib/ntp/tests/libntp/g_lfptostr.cpp b/contrib/ntp/tests/libntp/g_lfptostr.cpp
deleted file mode 100644
index ae594a67cf9a..000000000000
--- a/contrib/ntp/tests/libntp/g_lfptostr.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * This file contains test for both mfptoa and mfptoms (which uses dolfptoa),
- * since all these functions are very similar. It also tests ulfptoa, which is
- * a macro.
- */
-
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_fp.h"
-};
-
-class lfptostrTest : public libntptest {
-protected:
- static const int LFP_MAX_PRECISION = 10;
- static const int LFP_MAX_PRECISION_MS = 7;
-
- static const int ONE_FOURTH = 1073741824; // (1 << 30)
- static const int HALF = (1 << 31);
- static const int THREE_FOURTH = -ONE_FOURTH;
- static const int HALF_PROMILLE_UP = 2147484; // slightly more than 0.0005
- static const int HALF_PROMILLE_DOWN = 2147483; // slightly less than 0.0005
-};
-
-TEST_F(lfptostrTest, PositiveInteger) {
- l_fp test = {200, 0}; // exact 200.0000000000
-
- EXPECT_STREQ("200.0000000000", mfptoa(test.l_ui, test.l_uf, LFP_MAX_PRECISION));
- EXPECT_STREQ("200000.0000000", mfptoms(test.l_ui, test.l_uf, LFP_MAX_PRECISION_MS));
-}
-
-TEST_F(lfptostrTest, NegativeInteger) {
- l_fp test = {-100, 0}; // -100
-
- EXPECT_STREQ("-100.0000000000", lfptoa(&test, LFP_MAX_PRECISION));
- EXPECT_STREQ("-100000.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS));
-}
-
-TEST_F(lfptostrTest, PositiveIntegerWithFraction) {
- l_fp test = {200, ONE_FOURTH}; // 200.25
-
- EXPECT_STREQ("200.2500000000", lfptoa(&test, LFP_MAX_PRECISION));
- EXPECT_STREQ("200250.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS));
-}
-
-TEST_F(lfptostrTest, NegativeIntegerWithFraction) {
- l_fp test = {-100, ONE_FOURTH}; // -99.75
-
- EXPECT_STREQ("-99.7500000000", lfptoa(&test, LFP_MAX_PRECISION));
- EXPECT_STREQ("-99750.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS));
-}
-
-TEST_F(lfptostrTest, RoundingDownToInteger) {
- l_fp test = {10, ONE_FOURTH}; // 10.25
-
- EXPECT_STREQ("10", lfptoa(&test, 0));
- EXPECT_STREQ("10250", lfptoms(&test, 0));
-}
-
-TEST_F(lfptostrTest, RoundingMiddleToInteger) {
- l_fp test = {10, HALF}; // 10.5
-
- EXPECT_STREQ("11", lfptoa(&test, 0));
- EXPECT_STREQ("10500", lfptoms(&test, 0));
-}
-
-TEST_F(lfptostrTest, RoundingUpToInteger) {
- l_fp test = {5, THREE_FOURTH}; // 5.75
-
- EXPECT_STREQ("6", lfptoa(&test, 0));
- EXPECT_STREQ("5750", lfptoms(&test, 0));
-}
-
-TEST_F(lfptostrTest, SingleDecimal) {
- l_fp test = {8, ONE_FOURTH}; // 8.25
-
- EXPECT_STREQ("8.3", lfptoa(&test, 1));
- EXPECT_STREQ("8250.0", lfptoms(&test, 1));
-}
-
-TEST_F(lfptostrTest, MillisecondsRoundingUp) {
- l_fp test = {1, HALF_PROMILLE_UP}; //slightly more than 1.0005
-
- EXPECT_STREQ("1.0", lfptoa(&test, 1));
-
- EXPECT_STREQ("1000.5", lfptoms(&test, 1));
- EXPECT_STREQ("1001", lfptoms(&test, 0));
-}
-
-TEST_F(lfptostrTest, MillisecondsRoundingDown) {
- l_fp test = {1, HALF_PROMILLE_DOWN}; // slightly less than 1.0005
-
- EXPECT_STREQ("1.0", lfptoa(&test, 1));
-
- EXPECT_STREQ("1000.5", lfptoms(&test, 1));
- EXPECT_STREQ("1000", lfptoms(&test, 0));
-}
-
-TEST_F(lfptostrTest, UnsignedInteger) {
- l_fp test = {3000000000UL, 0};
-
- EXPECT_STREQ("3000000000.0", ulfptoa(&test, 1));
-}
diff --git a/contrib/ntp/tests/libntp/g_libntptest.cpp b/contrib/ntp/tests/libntp/g_libntptest.cpp
deleted file mode 100644
index 8897b5c098c3..000000000000
--- a/contrib/ntp/tests/libntp/g_libntptest.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "g_libntptest.h"
-
-/* This file contains various constants that libntp needs to be set
- * and that is normally defined in ntpd/ntpq/...
- */
-
-u_long current_time = 4; // needed by authkeys. Used only in to calculate lifetime.
-const char *progname = "libntptest";
-
-time_t libntptest::nowtime = 0;
-
-time_t libntptest::timefunc(time_t *ptr)
-{
- if (ptr)
- *ptr = nowtime;
- return nowtime;
-}
-
-void libntptest::settime(int y, int m, int d, int H, int M, int S)
-{
-
- time_t days(ntpcal_edate_to_eradays(y-1, m-1, d-1) + 1 - DAY_UNIX_STARTS);
- time_t secs(ntpcal_etime_to_seconds(H, M, S));
-
- nowtime = days * SECSPERDAY + secs;
-}
-
diff --git a/contrib/ntp/tests/libntp/g_libntptest.h b/contrib/ntp/tests/libntp/g_libntptest.h
deleted file mode 100644
index ef2daa88a268..000000000000
--- a/contrib/ntp/tests/libntp/g_libntptest.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "tests_main.h"
-
-extern "C" {
-#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
-};
-
-class libntptest : public ntptest {
-
-protected:
- static time_t timefunc(time_t*);
- static time_t nowtime;
- static void settime(int y, int m, int d, int H, int M, int S);
-
-};
diff --git a/contrib/ntp/tests/libntp/g_modetoa.cpp b/contrib/ntp/tests/libntp/g_modetoa.cpp
deleted file mode 100644
index 96bf3ce59952..000000000000
--- a/contrib/ntp/tests/libntp/g_modetoa.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "g_libntptest.h"
-
-class modetoaTest : public libntptest {
-};
-
-TEST_F(modetoaTest, KnownMode) {
- const int MODE = 3; // Should be "client"
-
- EXPECT_STREQ("client", modetoa(MODE));
-}
-
-TEST_F(modetoaTest, UnknownMode) {
- const int MODE = 100;
-
- EXPECT_STREQ("mode#100", modetoa(MODE));
-}
diff --git a/contrib/ntp/tests/libntp/g_msyslog.cpp b/contrib/ntp/tests/libntp/g_msyslog.cpp
deleted file mode 100644
index 273600d3a84a..000000000000
--- a/contrib/ntp/tests/libntp/g_msyslog.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#ifndef VSNPRINTF_PERCENT_M
-// format_errmsg() is normally private to msyslog.c
-void format_errmsg (char *, size_t, const char *, int);
-#endif
-};
-
-class msyslogTest : public libntptest {
-};
-
-// msnprintf()
-TEST_F(msyslogTest, msnprintf)
-{
-#define FMT_PREFIX "msyslog.cpp ENOENT: "
- char exp_buf[512];
- char act_buf[512];
- int exp_cnt;
- int act_cnt;
-
- exp_cnt = snprintf(exp_buf, sizeof(exp_buf), FMT_PREFIX "%s",
- strerror(ENOENT));
- errno = ENOENT;
- act_cnt = msnprintf(act_buf, sizeof(act_buf), FMT_PREFIX "%m");
- EXPECT_EQ(exp_cnt, act_cnt);
- EXPECT_STREQ(exp_buf, act_buf);
-}
-
-TEST_F(msyslogTest, msnprintfLiteralPercentm)
-{
- char exp_buf[32];
- char act_buf[32];
- int exp_cnt;
- int act_cnt;
-
- exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "%%m");
- errno = ENOENT;
- act_cnt = msnprintf(act_buf, sizeof(act_buf), "%%m");
- EXPECT_EQ(exp_cnt, act_cnt);
- EXPECT_STREQ(exp_buf, act_buf);
-}
-
-TEST_F(msyslogTest, msnprintfBackslashLiteralPercentm)
-{
- char exp_buf[32];
- char act_buf[32];
- int exp_cnt;
- int act_cnt;
-
- exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "\%%m");
- errno = ENOENT;
- act_cnt = msnprintf(act_buf, sizeof(act_buf), "\%%m");
- EXPECT_EQ(exp_cnt, act_cnt);
- EXPECT_STREQ(exp_buf, act_buf);
-}
-
-TEST_F(msyslogTest, msnprintfBackslashPercent)
-{
- char exp_buf[32];
- char act_buf[32];
- int exp_cnt;
- int act_cnt;
-
- exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "\%s",
- strerror(ENOENT));
- errno = ENOENT;
- act_cnt = msnprintf(act_buf, sizeof(act_buf), "\%m");
- EXPECT_EQ(exp_cnt, act_cnt);
- EXPECT_STREQ(exp_buf, act_buf);
-}
-
-TEST_F(msyslogTest, msnprintfHangingPercent)
-{
- static char fmt[] = "percent then nul term then non-nul %\0oops!";
- char exp_buf[64];
- char act_buf[64];
- int exp_cnt;
- int act_cnt;
-
- ZERO(exp_buf);
- ZERO(act_buf);
- exp_cnt = snprintf(exp_buf, sizeof(exp_buf), fmt);
- act_cnt = msnprintf(act_buf, sizeof(act_buf), fmt);
- EXPECT_EQ(exp_cnt, act_cnt);
- EXPECT_STREQ(exp_buf, act_buf);
- EXPECT_STREQ("", act_buf + 1 + strlen(act_buf));
-}
-
-#ifndef VSNPRINTF_PERCENT_M
-TEST_F(msyslogTest, format_errmsgHangingPercent)
-{
- static char fmt[] = "percent then nul term then non-nul %\0oops!";
- char act_buf[64];
-
- ZERO(act_buf);
- format_errmsg(act_buf, sizeof(act_buf), fmt, ENOENT);
- EXPECT_STREQ(fmt, act_buf);
- EXPECT_STREQ("", act_buf + 1 + strlen(act_buf));
-}
-#endif
-
-TEST_F(msyslogTest, msnprintfNullTarget)
-{
- int exp_cnt;
- int act_cnt;
-
- exp_cnt = snprintf(NULL, 0, "%d", 123);
- errno = ENOENT;
- act_cnt = msnprintf(NULL, 0, "%d", 123);
- EXPECT_EQ(exp_cnt, act_cnt);
-}
-
-TEST_F(msyslogTest, msnprintfTruncate)
-{
- char undist[] = "undisturbed";
- char exp_buf[512];
- char act_buf[512];
- int exp_cnt;
- int act_cnt;
-
- memcpy(exp_buf + 3, undist, sizeof(undist));
- memcpy(act_buf + 3, undist, sizeof(undist));
- exp_cnt = snprintf(exp_buf, 3, "%s", strerror(ENOENT));
- errno = ENOENT;
- act_cnt = msnprintf(act_buf, 3, "%m");
- EXPECT_EQ('\0', exp_buf[2]);
- EXPECT_EQ('\0', act_buf[2]);
- EXPECT_TRUE(act_cnt > 0);
- EXPECT_EQ(exp_cnt, act_cnt);
- EXPECT_STREQ(exp_buf, act_buf);
- EXPECT_STREQ(exp_buf + 3, undist);
- EXPECT_STREQ(act_buf + 3, undist);
-}
diff --git a/contrib/ntp/tests/libntp/g_netof.cpp b/contrib/ntp/tests/libntp/g_netof.cpp
deleted file mode 100644
index 8fc9ac7689be..000000000000
--- a/contrib/ntp/tests/libntp/g_netof.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#include "g_sockaddrtest.h"
-
-class netofTest : public sockaddrtest {
-};
-
-TEST_F(netofTest, ClassBAddress) {
- sockaddr_u input = CreateSockaddr4("172.16.2.1", NTP_PORT);
- sockaddr_u expected = CreateSockaddr4("172.16.0.0", NTP_PORT);
-
- sockaddr_u* actual = netof(&input);
-
- ASSERT_TRUE(actual != NULL);
- EXPECT_TRUE(IsEqual(expected, *actual));
-}
-
-TEST_F(netofTest, ClassCAddress) {
- sockaddr_u input = CreateSockaddr4("192.0.2.255", NTP_PORT);
- sockaddr_u expected = CreateSockaddr4("192.0.2.0", NTP_PORT);
-
- sockaddr_u* actual = netof(&input);
-
- ASSERT_TRUE(actual != NULL);
- EXPECT_TRUE(IsEqual(expected, *actual));
-}
-
-TEST_F(netofTest, ClassAAddress) {
- /* Class A addresses are assumed to be classless,
- * thus the same address should be returned.
- */
- sockaddr_u input = CreateSockaddr4("10.20.30.40", NTP_PORT);
- sockaddr_u expected = CreateSockaddr4("10.20.30.40", NTP_PORT);
-
- sockaddr_u* actual = netof(&input);
-
- ASSERT_TRUE(actual != NULL);
- EXPECT_TRUE(IsEqual(expected, *actual));
-}
-
-TEST_F(netofTest, IPv6Address) {
- /* IPv6 addresses are assumed to have 64-bit host- and 64-bit network parts. */
- const struct in6_addr input_address = {
- 0x20, 0x01, 0x0d, 0xb8,
- 0x85, 0xa3, 0x08, 0xd3,
- 0x13, 0x19, 0x8a, 0x2e,
- 0x03, 0x70, 0x73, 0x34
- }; // 2001:0db8:85a3:08d3:1319:8a2e:0370:7334
-
- const struct in6_addr expected_address = {
- 0x20, 0x01, 0x0d, 0xb8,
- 0x85, 0xa3, 0x08, 0xd3,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00
- }; // 2001:0db8:85a3:08d3:0000:0000:0000:0000
-
- sockaddr_u input;
- input.sa6.sin6_family = AF_INET6;
- input.sa6.sin6_addr = input_address;
- SET_PORT(&input, 3000);
-
- sockaddr_u expected;
- expected.sa6.sin6_family = AF_INET6;
- expected.sa6.sin6_addr = expected_address;
- SET_PORT(&expected, 3000);
-
- sockaddr_u* actual = netof(&input);
-
- ASSERT_TRUE(actual != NULL);
- EXPECT_TRUE(IsEqual(expected, *actual));
-}
diff --git a/contrib/ntp/tests/libntp/g_numtoa.cpp b/contrib/ntp/tests/libntp/g_numtoa.cpp
deleted file mode 100644
index a68e80dbd65d..000000000000
--- a/contrib/ntp/tests/libntp/g_numtoa.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "g_libntptest.h"
-
-class numtoaTest : public libntptest {
-};
-
-TEST_F(numtoaTest, Address) {
- u_int32 input = htonl(3221225472UL+512UL+1UL); // 192.0.2.1
-
- EXPECT_STREQ("192.0.2.1", numtoa(input));
-}
-
-TEST_F(numtoaTest, Netmask) {
- // 255.255.255.0
- u_int32 hostOrder = 255UL*256UL*256UL*256UL + 255UL*256UL*256UL + 255UL*256UL;
- u_int32 input = htonl(hostOrder);
-
- EXPECT_STREQ("255.255.255.0", numtoa(input));
-}
diff --git a/contrib/ntp/tests/libntp/g_numtohost.cpp b/contrib/ntp/tests/libntp/g_numtohost.cpp
deleted file mode 100644
index e04cad8a6833..000000000000
--- a/contrib/ntp/tests/libntp/g_numtohost.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "g_libntptest.h"
-
-class numtohostTest : public libntptest {
-};
-
-TEST_F(numtohostTest, LoopbackNetNonResolve) {
- /* A loopback address in 127.0.0.0/8 is chosen, and
- * numtohost() should not try to resolve it unless
- * it is 127.0.0.1
- */
-
- u_int32 input = 127*256*256*256 + 1*256 + 1; // 127.0.1.1
-
- EXPECT_STREQ("127.0.1.1", numtohost(htonl(input)));
-}
diff --git a/contrib/ntp/tests/libntp/g_octtoint.cpp b/contrib/ntp/tests/libntp/g_octtoint.cpp
deleted file mode 100644
index 8731eed63240..000000000000
--- a/contrib/ntp/tests/libntp/g_octtoint.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "g_libntptest.h"
-
-class octtointTest : public libntptest {
-};
-
-TEST_F(octtointTest, SingleDigit) {
- const char* str = "5";
- u_long actual;
-
- ASSERT_TRUE(octtoint(str, &actual));
- EXPECT_EQ(5, actual);
-}
-
-TEST_F(octtointTest, MultipleDigits) {
- const char* str = "271";
- u_long actual;
-
- ASSERT_TRUE(octtoint(str, &actual));
- EXPECT_EQ(185, actual);
-}
-
-TEST_F(octtointTest, Zero) {
- const char* str = "0";
- u_long actual;
-
- ASSERT_TRUE(octtoint(str, &actual));
- EXPECT_EQ(0, actual);
-}
-
-TEST_F(octtointTest, MaximumUnsigned32bit) {
- const char* str = "37777777777";
- u_long actual;
-
- ASSERT_TRUE(octtoint(str, &actual));
- EXPECT_EQ(4294967295UL, actual);
-}
-
-TEST_F(octtointTest, Overflow) {
- const char* str = "40000000000";
- u_long actual;
-
- ASSERT_FALSE(octtoint(str, &actual));
-}
-
-TEST_F(octtointTest, IllegalCharacter) {
- const char* str = "5ac2";
- u_long actual;
-
- ASSERT_FALSE(octtoint(str, &actual));
-}
-
-TEST_F(octtointTest, IllegalDigit) {
- const char* str = "5283";
- u_long actual;
-
- ASSERT_FALSE(octtoint(str, &actual));
-}
diff --git a/contrib/ntp/tests/libntp/g_prettydate.cpp b/contrib/ntp/tests/libntp/g_prettydate.cpp
deleted file mode 100644
index 45741b5a93de..000000000000
--- a/contrib/ntp/tests/libntp/g_prettydate.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_fp.h"
-};
-
-class prettydateTest : public libntptest {
-protected:
- static const u_int32 HALF = 2147483648UL;
-};
-
-TEST_F(prettydateTest, ConstantDate) {
- l_fp time = {3485080800UL, HALF}; // 2010-06-09 14:00:00.5
-
- ASSERT_STREQ("cfba1ce0.80000000 Wed, Jun 9 2010 14:00:00.500", gmprettydate(&time));
-}
diff --git a/contrib/ntp/tests/libntp/g_recvbuff.cpp b/contrib/ntp/tests/libntp/g_recvbuff.cpp
deleted file mode 100644
index 799802d8b484..000000000000
--- a/contrib/ntp/tests/libntp/g_recvbuff.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "recvbuff.h"
-};
-
-class recvbuffTest : public libntptest {
-protected:
- virtual void SetUp() {
- init_recvbuff(RECV_INIT);
- }
-};
-
-TEST_F(recvbuffTest, Initialization) {
- EXPECT_EQ(RECV_INIT, free_recvbuffs());
- EXPECT_EQ(0, full_recvbuffs());
- EXPECT_FALSE(has_full_recv_buffer());
- EXPECT_TRUE(get_full_recv_buffer() == NULL);
-}
-
-TEST_F(recvbuffTest, GetAndFree) {
- int initial = free_recvbuffs();
- recvbuf_t* buf = get_free_recv_buffer();
-
- EXPECT_EQ(initial-1, free_recvbuffs());
- freerecvbuf(buf);
- EXPECT_EQ(initial, free_recvbuffs());
-}
-
-TEST_F(recvbuffTest, GetAndFill) {
- int initial = free_recvbuffs();
- recvbuf_t* buf = get_free_recv_buffer();
-
- add_full_recv_buffer(buf);
- EXPECT_EQ(1, full_recvbuffs());
- EXPECT_TRUE(has_full_recv_buffer());
- EXPECT_EQ(buf, get_full_recv_buffer());
-}
diff --git a/contrib/ntp/tests/libntp/g_refnumtoa.cpp b/contrib/ntp/tests/libntp/g_refnumtoa.cpp
deleted file mode 100644
index 91648aa024b4..000000000000
--- a/contrib/ntp/tests/libntp/g_refnumtoa.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "g_libntptest.h"
-
-#include "ntp_net.h"
-#include "ntp_refclock.h"
-
-#include <sstream>
-
-class refnumtoaTest : public libntptest {
-protected:
- /* Might need to be updated if a new refclock gets this id. */
- static const int UNUSED_REFCLOCK_ID = 250;
-};
-
-#ifdef REFCLOCK /* clockname() is useless otherwise */
-TEST_F(refnumtoaTest, LocalClock) {
- /* We test with a refclock address of type LOCALCLOCK.
- * with id 8
- */
- u_int32 addr = REFCLOCK_ADDR;
- addr |= REFCLK_LOCALCLOCK << 8;
- addr |= 0x8;
-
- sockaddr_u address;
- address.sa4.sin_family = AF_INET;
- address.sa4.sin_addr.s_addr = htonl(addr);
-
- std::ostringstream expected;
- expected << clockname(REFCLK_LOCALCLOCK)
- << "(8)";
-
- EXPECT_STREQ(expected.str().c_str(), refnumtoa(&address));
-}
-#endif /* REFCLOCK */
-
-#ifdef REFCLOCK /* refnumtoa() is useless otherwise */
-TEST_F(refnumtoaTest, UnknownId) {
- /* We test with a currently unused refclock ID */
- u_int32 addr = REFCLOCK_ADDR;
- addr |= UNUSED_REFCLOCK_ID << 8;
- addr |= 0x4;
-
- sockaddr_u address;
- address.sa4.sin_family = AF_INET;
- address.sa4.sin_addr.s_addr = htonl(addr);
-
- std::ostringstream expected;
- expected << "REFCLK(" << UNUSED_REFCLOCK_ID
- << ",4)";
-
- EXPECT_STREQ(expected.str().c_str(), refnumtoa(&address));
-}
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/tests/libntp/g_sfptostr.cpp b/contrib/ntp/tests/libntp/g_sfptostr.cpp
deleted file mode 100644
index c31b30c90be5..000000000000
--- a/contrib/ntp/tests/libntp/g_sfptostr.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * This file contains test for both fptoa and fptoms (which uses dofptoa),
- * since all these functions are very similar.
- */
-
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_fp.h"
-};
-
-class sfptostr : public libntptest {
-protected:
- static const int SFP_MAX_PRECISION = 6;
-};
-
-TEST_F(sfptostr, PositiveInteger) {
- s_fp test = 300 << 16; // exact 300.000000
-
- EXPECT_STREQ("300.000000", fptoa(test, SFP_MAX_PRECISION));
- EXPECT_STREQ("300000.000", fptoms(test, SFP_MAX_PRECISION));
-}
-
-TEST_F(sfptostr, NegativeInteger) {
- s_fp test = -200 << 16; // exact -200.000000
-
- EXPECT_STREQ("-200.000000", fptoa(test, SFP_MAX_PRECISION));
- EXPECT_STREQ("-200000.000", fptoms(test, SFP_MAX_PRECISION));
-}
-
-TEST_F(sfptostr, PositiveIntegerPositiveFraction) {
- s_fp test = (300 << 16) + (1 << 15); // 300 + 0.5
-
- EXPECT_STREQ("300.500000", fptoa(test, SFP_MAX_PRECISION));
- EXPECT_STREQ("300500.000", fptoms(test, SFP_MAX_PRECISION));
-}
-
-TEST_F(sfptostr, NegativeIntegerNegativeFraction) {
- s_fp test = (-200 << 16) - (1 << 15); // -200 - 0.5
-
- EXPECT_STREQ("-200.500000", fptoa(test, SFP_MAX_PRECISION));
- EXPECT_STREQ("-200500.000", fptoms(test, SFP_MAX_PRECISION));
-}
-
-TEST_F(sfptostr, PositiveIntegerNegativeFraction) {
- s_fp test = (300 << 16) - (1 << 14); // 300 - 0.25
-
- EXPECT_STREQ("299.750000", fptoa(test, SFP_MAX_PRECISION));
- EXPECT_STREQ("299750.000", fptoms(test, SFP_MAX_PRECISION));
-}
-
-TEST_F(sfptostr, NegativeIntegerPositiveFraction) {
- s_fp test = (-200 << 16) + (1 << 14)*3; // -200 + 0.75
-
- EXPECT_STREQ("-199.250000", fptoa(test, SFP_MAX_PRECISION));
- EXPECT_STREQ("-199250.000", fptoms(test, SFP_MAX_PRECISION));
-}
-
-TEST_F(sfptostr, SingleDecimalInteger) {
- s_fp test = 300 << 16; // 300
-
- EXPECT_STREQ("300.0", fptoa(test, 1));
- EXPECT_STREQ("300000.0", fptoms(test, 1));
-}
-
-TEST_F(sfptostr, SingleDecimalRounding) {
- s_fp test = (2 << 16) + (1 << 14)*3; // 2 + 0.25*3 = 2.75
-
- EXPECT_STREQ("2.8", fptoa(test, 1));
- EXPECT_STREQ("2750.0", fptoms(test, 1));
-}
diff --git a/contrib/ntp/tests/libntp/g_sockaddrtest.h b/contrib/ntp/tests/libntp/g_sockaddrtest.h
deleted file mode 100644
index 819a54f711dc..000000000000
--- a/contrib/ntp/tests/libntp/g_sockaddrtest.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef TESTS_SOCKADDRTEST_H
-#define TESTS_SOCKADDRTEST_H
-
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp.h"
-};
-
-class sockaddrtest : public libntptest {
-protected:
- ::testing::AssertionResult IsEqual(const sockaddr_u &expected, const sockaddr_u &actual) {
- if (expected.sa.sa_family != actual.sa.sa_family) {
- return ::testing::AssertionFailure()
- << "Expected sa_family: " << expected.sa.sa_family
- << " but got: " << actual.sa.sa_family;
- }
-
- if (actual.sa.sa_family == AF_INET) { // IPv4
- if (expected.sa4.sin_port == actual.sa4.sin_port &&
- memcmp(&expected.sa4.sin_addr, &actual.sa4.sin_addr,
- sizeof(in_addr)) == 0) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "IPv4 comparision failed, expected: "
- << expected.sa4.sin_addr.s_addr
- << "(" << socktoa(&expected) << ")"
- << " but was: "
- << actual.sa4.sin_addr.s_addr
- << "(" << socktoa(&actual) << ")";
- }
- } else if (actual.sa.sa_family == AF_INET6) { //IPv6
- if (expected.sa6.sin6_port == actual.sa6.sin6_port &&
- memcmp(&expected.sa6.sin6_addr, &actual.sa6.sin6_addr,
- sizeof(in6_addr)) == 0) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "IPv6 comparision failed";
- }
- } else { // Unknown family
- return ::testing::AssertionFailure()
- << "Unknown sa_family: " << actual.sa.sa_family;
- }
- }
-
- sockaddr_u CreateSockaddr4(const char* address, unsigned int port) {
- sockaddr_u s;
- s.sa4.sin_family = AF_INET;
- s.sa4.sin_addr.s_addr = inet_addr(address);
- SET_PORT(&s, port);
-
- return s;
- }
-};
-
-#endif // TESTS_SOCKADDRTEST_H
-
diff --git a/contrib/ntp/tests/libntp/g_socktoa.cpp b/contrib/ntp/tests/libntp/g_socktoa.cpp
deleted file mode 100644
index 2bb2fb1e779c..000000000000
--- a/contrib/ntp/tests/libntp/g_socktoa.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-#include "g_sockaddrtest.h"
-
-class socktoaTest : public sockaddrtest {
-};
-
-TEST_F(socktoaTest, IPv4AddressWithPort) {
- sockaddr_u input = CreateSockaddr4("192.0.2.10", 123);
-
- EXPECT_STREQ("192.0.2.10", socktoa(&input));
- EXPECT_STREQ("192.0.2.10:123", sockporttoa(&input));
-}
-
-TEST_F(socktoaTest, IPv6AddressWithPort) {
- const struct in6_addr address = {
- 0x20, 0x01, 0x0d, 0xb8,
- 0x85, 0xa3, 0x08, 0xd3,
- 0x13, 0x19, 0x8a, 0x2e,
- 0x03, 0x70, 0x73, 0x34
- };
-
- const char* expected =
- "2001:db8:85a3:8d3:1319:8a2e:370:7334";
- const char* expected_port =
- "[2001:db8:85a3:8d3:1319:8a2e:370:7334]:123";
-
- sockaddr_u input;
- memset(&input, 0, sizeof(input));
- AF(&input) = AF_INET6;
- SET_ADDR6N(&input, address);
- SET_PORT(&input, 123);
-
- EXPECT_STREQ(expected, socktoa(&input));
- EXPECT_STREQ(expected_port, sockporttoa(&input));
-}
-
-#ifdef ISC_PLATFORM_HAVESCOPEID
-TEST_F(socktoaTest, ScopedIPv6AddressWithPort) {
- const struct in6_addr address = {
- 0xfe, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x02, 0x12, 0x3f, 0xff,
- 0xfe, 0x29, 0xff, 0xfa
- };
-
- const char* expected =
- "fe80::212:3fff:fe29:fffa%5";
- const char* expected_port =
- "[fe80::212:3fff:fe29:fffa%5]:123";
-
- sockaddr_u input;
- memset(&input, 0, sizeof(input));
- AF(&input) = AF_INET6;
- SET_ADDR6N(&input, address);
- SET_PORT(&input, 123);
- SCOPE_VAR(&input) = 5;
-
- EXPECT_STREQ(expected, socktoa(&input));
- EXPECT_STREQ(expected_port, sockporttoa(&input));
-}
-#endif /* ISC_PLATFORM_HAVESCOPEID */
-
-TEST_F(socktoaTest, HashEqual) {
- sockaddr_u input1 = CreateSockaddr4("192.00.2.2", 123);
- sockaddr_u input2 = CreateSockaddr4("192.0.2.2", 123);
-
- ASSERT_TRUE(IsEqual(input1, input2));
- EXPECT_EQ(sock_hash(&input1), sock_hash(&input2));
-}
-
-TEST_F(socktoaTest, HashNotEqual) {
- /* These two addresses should not generate the same hash. */
- sockaddr_u input1 = CreateSockaddr4("192.0.2.1", 123);
- sockaddr_u input2 = CreateSockaddr4("192.0.2.2", 123);
-
- ASSERT_FALSE(IsEqual(input1, input2));
- EXPECT_NE(sock_hash(&input1), sock_hash(&input2));
-}
-
-TEST_F(socktoaTest, IgnoreIPv6Fields) {
- const struct in6_addr address = {
- 0x20, 0x01, 0x0d, 0xb8,
- 0x85, 0xa3, 0x08, 0xd3,
- 0x13, 0x19, 0x8a, 0x2e,
- 0x03, 0x70, 0x73, 0x34
- };
-
- sockaddr_u input1, input2;
-
- input1.sa6.sin6_family = AF_INET6;
- input1.sa6.sin6_addr = address;
- input1.sa6.sin6_flowinfo = 30L; // This value differs from input2.
- SET_PORT(&input1, NTP_PORT);
-
- input2.sa6.sin6_family = AF_INET6;
- input2.sa6.sin6_addr = address;
- input2.sa6.sin6_flowinfo = 10L; // This value differs from input1.
- SET_PORT(&input2, NTP_PORT);
-
- EXPECT_EQ(sock_hash(&input1), sock_hash(&input2));
-}
diff --git a/contrib/ntp/tests/libntp/g_ssl_init.cpp b/contrib/ntp/tests/libntp/g_ssl_init.cpp
deleted file mode 100644
index 16b2f4d4384a..000000000000
--- a/contrib/ntp/tests/libntp/g_ssl_init.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#ifdef OPENSSL
-# include "openssl/err.h"
-# include "openssl/rand.h"
-# include "openssl/evp.h"
-#endif
-#include "ntp.h"
-};
-
-class ssl_initTest : public libntptest {
-protected:
- static const size_t TEST_MD5_DIGEST_LENGTH = 16;
- static const size_t TEST_SHA1_DIGEST_LENGTH = 20;
-};
-
-// keytype_from_text()
-TEST_F(ssl_initTest, MD5KeyTypeWithoutDigestLength) {
- ASSERT_EQ(KEY_TYPE_MD5, keytype_from_text("MD5", NULL));
-}
-
-TEST_F(ssl_initTest, MD5KeyTypeWithDigestLength) {
- size_t digestLength;
- size_t expected = TEST_MD5_DIGEST_LENGTH;
-
- EXPECT_EQ(KEY_TYPE_MD5, keytype_from_text("MD5", &digestLength));
- EXPECT_EQ(expected, digestLength);
-}
-
-#ifdef OPENSSL
-TEST_F(ssl_initTest, SHA1KeyTypeWithDigestLength) {
- size_t digestLength;
- size_t expected = TEST_SHA1_DIGEST_LENGTH;
-
- EXPECT_EQ(NID_sha, keytype_from_text("SHA", &digestLength));
- EXPECT_EQ(expected, digestLength);
-}
-#endif /* OPENSSL */
-
-// keytype_name()
-TEST_F(ssl_initTest, MD5KeyName) {
- EXPECT_STREQ("MD5", keytype_name(KEY_TYPE_MD5));
-}
-
-#ifdef OPENSSL
-TEST_F(ssl_initTest, SHA1KeyName) {
- EXPECT_STREQ("SHA", keytype_name(NID_sha));
-}
-#endif /* OPENSSL */
diff --git a/contrib/ntp/tests/libntp/g_statestr.cpp b/contrib/ntp/tests/libntp/g_statestr.cpp
deleted file mode 100644
index dedbf5b002b0..000000000000
--- a/contrib/ntp/tests/libntp/g_statestr.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp.h" // Needed for MAX_MAC_LEN used in ntp_control.h
-#include "ntp_control.h"
-};
-
-class statestrTest : public libntptest {
-};
-
-// eventstr()
-TEST_F(statestrTest, PeerRestart) {
- EXPECT_STREQ("restart", eventstr(PEVNT_RESTART));
-}
-
-TEST_F(statestrTest, SysUnspecified) {
- EXPECT_STREQ("unspecified", eventstr(EVNT_UNSPEC));
-}
-
-// ceventstr()
-TEST_F(statestrTest, ClockCodeExists) {
- EXPECT_STREQ("clk_unspec", ceventstr(CTL_CLK_OKAY));
-}
-
-TEST_F(statestrTest, ClockCodeUnknown) {
- EXPECT_STREQ("clk_-1", ceventstr(-1));
-}
-
diff --git a/contrib/ntp/tests/libntp/g_strtolfp.cpp b/contrib/ntp/tests/libntp/g_strtolfp.cpp
deleted file mode 100644
index d1b361e86e99..000000000000
--- a/contrib/ntp/tests/libntp/g_strtolfp.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-#include "g_lfptest.h"
-
-/* This class tests both atolfp and mstolfp */
-
-class strtolfpTest : public lfptest {
-};
-
-TEST_F(strtolfpTest, PositiveInteger) {
- const char *str = "500";
- const char *str_ms = "500000";
-
- l_fp expected = {500,0};
- l_fp actual, actual_ms;
-
- ASSERT_TRUE(atolfp(str, &actual));
- ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
-
- EXPECT_TRUE(IsEqual(expected, actual));
- EXPECT_TRUE(IsEqual(expected, actual_ms));
-}
-
-TEST_F(strtolfpTest, NegativeInteger) {
- const char *str = "-300";
- const char *str_ms = "-300000";
-
- l_fp expected;
- expected.l_i = -300;
- expected.l_uf = 0;
-
- l_fp actual, actual_ms;
-
- ASSERT_TRUE(atolfp(str, &actual));
- ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
-
- EXPECT_TRUE(IsEqual(expected, actual));
- EXPECT_TRUE(IsEqual(expected, actual_ms));
-}
-
-TEST_F(strtolfpTest, PositiveFraction) {
- const char *str = "+500.5";
- const char *str_ms = "500500.0";
-
- l_fp expected = {500, HALF};
- l_fp actual, actual_ms;
-
- ASSERT_TRUE(atolfp(str, &actual));
- ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
-
- EXPECT_TRUE(IsEqual(expected, actual));
- EXPECT_TRUE(IsEqual(expected, actual_ms));
-}
-
-TEST_F(strtolfpTest, NegativeFraction) {
- const char *str = "-300.75";
- const char *str_ms = "-300750";
-
- l_fp expected;
- expected.l_i = -301;
- expected.l_uf = QUARTER;
-
- l_fp actual, actual_ms;
-
- ASSERT_TRUE(atolfp(str, &actual));
- ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
-
- EXPECT_TRUE(IsEqual(expected, actual));
- EXPECT_TRUE(IsEqual(expected, actual_ms));
-}
-
-TEST_F(strtolfpTest, PositiveMsFraction) {
- const char *str = "300.00025";
- const char *str_ms = "300000.25";
-
- l_fp expected = {300, QUARTER_PROMILLE_APPRX};
- l_fp actual, actual_ms;
-
- ASSERT_TRUE(atolfp(str, &actual));
- ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
-
- EXPECT_TRUE(IsEqual(expected, actual));
- EXPECT_TRUE(IsEqual(expected, actual_ms));
-}
-
-TEST_F(strtolfpTest, NegativeMsFraction) {
- const char *str = "-199.99975";
- const char *str_ms = "-199999.75";
-
- l_fp expected;
- expected.l_i = -200;
- expected.l_uf = QUARTER_PROMILLE_APPRX;
-
- l_fp actual, actual_ms;
-
- ASSERT_TRUE(atolfp(str, &actual));
- ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
-
- EXPECT_TRUE(IsEqual(expected, actual));
- EXPECT_TRUE(IsEqual(expected, actual_ms));
-}
-
-TEST_F(strtolfpTest, InvalidChars) {
- const char *str = "500.4a2";
- l_fp actual, actual_ms;
-
- ASSERT_FALSE(atolfp(str, &actual));
- ASSERT_FALSE(mstolfp(str, &actual_ms));
-}
diff --git a/contrib/ntp/tests/libntp/g_timespecops.cpp b/contrib/ntp/tests/libntp/g_timespecops.cpp
deleted file mode 100644
index 0cc573ff4f14..000000000000
--- a/contrib/ntp/tests/libntp/g_timespecops.cpp
+++ /dev/null
@@ -1,475 +0,0 @@
-#include "g_libntptest.h"
-#include "g_timestructs.h"
-
-extern "C" {
-#include <math.h>
-#include "timespecops.h"
-}
-
-#include <string>
-#include <sstream>
-
-using namespace timeStruct;
-
-class timespecTest : public libntptest {
-protected:
- static u_int32 my_tick_to_tsf(u_int32 ticks);
- static u_int32 my_tsf_to_tick(u_int32 tsf);
-
- // that's it...
- struct lfpfracdata {
- long nsec;
- u_int32 frac;
- };
- static const lfpfracdata fdata[];
-};
-
-u_int32
-timespecTest::my_tick_to_tsf(
- u_int32 ticks
- )
-{
- // convert nanoseconds to l_fp fractional units, using double
- // precision float calculations or, if available, 64bit integer
- // arithmetic. This should give the precise fraction, rounded to
- // the nearest representation.
-#ifdef HAVE_U_INT64
- return u_int32(((u_int64(ticks) << 32) + 500000000) / 1000000000);
-#else
- return u_int32(double(ticks) * 4.294967296 + 0.5);
-#endif
- // And before you ask: if ticks >= 1000000000, the result is
- // truncated nonsense, so don't use it out-of-bounds.
-}
-
-u_int32
-timespecTest::my_tsf_to_tick(
- u_int32 tsf
- )
-{
- // Inverse operation: converts fraction to microseconds.
-#ifdef HAVE_U_INT64
- return u_int32((u_int64(tsf) * 1000000000 + 0x80000000) >> 32);
-#else
- return u_int32(double(tsf) / 4.294967296 + 0.5);
-#endif
- // Beware: The result might be 10^9 due to rounding!
-}
-
-const timespecTest::lfpfracdata timespecTest::fdata [] = {
- { 0, 0x00000000 }, { 2218896, 0x00916ae6 },
- { 16408100, 0x0433523d }, { 125000000, 0x20000000 },
- { 250000000, 0x40000000 }, { 287455871, 0x4996b53d },
- { 375000000, 0x60000000 }, { 500000000, 0x80000000 },
- { 518978897, 0x84dbcd0e }, { 563730222, 0x90509fb3 },
- { 563788007, 0x9054692c }, { 583289882, 0x95527c57 },
- { 607074509, 0x9b693c2a }, { 625000000, 0xa0000000 },
- { 645184059, 0xa52ac851 }, { 676497788, 0xad2ef583 },
- { 678910895, 0xadcd1abb }, { 679569625, 0xadf84663 },
- { 690926741, 0xb0e0932d }, { 705656483, 0xb4a5e73d },
- { 723553854, 0xb93ad34c }, { 750000000, 0xc0000000 },
- { 763550253, 0xc3780785 }, { 775284917, 0xc6791284 },
- { 826190764, 0xd3813ce8 }, { 875000000, 0xe0000000 },
- { 956805507, 0xf4f134a9 }, { 982570733, 0xfb89c16c }
-};
-
-
-// ---------------------------------------------------------------------
-// test support stuff -- part 1
-// ---------------------------------------------------------------------
-
-TEST_F(timespecTest, Helpers1) {
- timespec_wrap x;
-
- for (x.V.tv_sec = -2; x.V.tv_sec < 3; x.V.tv_sec++) {
- x.V.tv_nsec = -1;
- ASSERT_FALSE(x.valid());
- x.V.tv_nsec = 0;
- ASSERT_TRUE(x.valid());
- x.V.tv_nsec = 999999999;
- ASSERT_TRUE(x.valid());
- x.V.tv_nsec = 1000000000;
- ASSERT_FALSE(x.valid());
- }
-}
-
-//----------------------------------------------------------------------
-// test normalisation
-//----------------------------------------------------------------------
-
-TEST_F(timespecTest, Normalise) {
- for (long ns = -2000000000; ns <= 2000000000; ns += 10000000) {
- timespec_wrap x(0, ns);
-
- x = normalize_tspec(x);
- ASSERT_TRUE(x.valid());
- }
-}
-
-//----------------------------------------------------------------------
-// test classification
-//----------------------------------------------------------------------
-
-TEST_F(timespecTest, SignNoFrac) {
- // sign test, no fraction
- for (int i = -4; i <= 4; ++i) {
- timespec_wrap a(i, 0);
- int E = (i > 0) - (i < 0);
- int r = test_tspec(a);
-
- ASSERT_EQ(E, r);
- }
-}
-
-TEST_F(timespecTest, SignWithFrac) {
- // sign test, with fraction
- for (int i = -4; i <= 4; ++i) {
- timespec_wrap a(i, 10);
- int E = (i >= 0) - (i < 0);
- int r = test_tspec(a);
- ASSERT_EQ(E, r);
- }
-}
-
-//----------------------------------------------------------------------
-// test compare
-//----------------------------------------------------------------------
-TEST_F(timespecTest, CmpFracEQ) {
- // fractions are equal
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timespec_wrap a( i , 200);
- timespec_wrap b( j , 200);
- int E = (i > j) - (i < j);
- int r = cmp_tspec_denorm(a, b);
- ASSERT_EQ(E, r);
- }
-}
-
-TEST_F(timespecTest, CmpFracGT) {
- // fraction a bigger fraction b
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timespec_wrap a(i, 999999800);
- timespec_wrap b(j, 200);
- int E = (i >= j) - (i < j);
- int r = cmp_tspec_denorm(a, b);
- ASSERT_EQ(E, r);
- }
-}
-
-TEST_F(timespecTest, CmpFracLT) {
- // fraction a less fraction b
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timespec_wrap a(i, 200);
- timespec_wrap b(j, 999999800);
- int E = (i > j) - (i <= j);
- int r = cmp_tspec_denorm(a, b);
- ASSERT_EQ(E, r);
- }
-}
-
-//----------------------------------------------------------------------
-// Test addition (sum)
-//----------------------------------------------------------------------
-
-TEST_F(timespecTest, AddFullNorm) {
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timespec_wrap a(i, 200);
- timespec_wrap b(j, 400);
- timespec_wrap E(i + j, 200 + 400);
- timespec_wrap c;
-
- c = add_tspec(a, b);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timespecTest, AddFullOflow1) {
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timespec_wrap a(i, 200);
- timespec_wrap b(j, 999999900);
- timespec_wrap E(i + j + 1, 100);
- timespec_wrap c;
-
- c = add_tspec(a, b);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timespecTest, AddNsecNorm) {
- for (int i = -4; i <= 4; ++i) {
- timespec_wrap a(i, 200);
- timespec_wrap E(i, 600);
- timespec_wrap c;
-
- c = add_tspec_ns(a, 600 - 200);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timespecTest, AddNsecOflow1) {
- for (int i = -4; i <= 4; ++i) {
- timespec_wrap a(i, 200);
- timespec_wrap E(i + 1, 100);
- timespec_wrap c;
-
- c = add_tspec_ns(a, NANOSECONDS - 100);
- ASSERT_EQ(E, c);
- }
-}
-
-//----------------------------------------------------------------------
-// test subtraction (difference)
-//----------------------------------------------------------------------
-
-TEST_F(timespecTest, SubFullNorm) {
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timespec_wrap a( i , 600);
- timespec_wrap b( j , 400);
- timespec_wrap E(i-j, 200);
- timespec_wrap c;
-
- c = sub_tspec(a, b);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timespecTest, SubFullOflow) {
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timespec_wrap a( i , 100);
- timespec_wrap b( j , 999999900);
- timespec_wrap E(i-j-1, 200);
- timespec_wrap c;
-
- c = sub_tspec(a, b);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timespecTest, SubNsecNorm) {
- for (int i = -4; i <= 4; ++i) {
- timespec_wrap a(i, 600);
- timespec_wrap E(i, 200);
- timespec_wrap c;
-
- c = sub_tspec_ns(a, 600 - 200);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timespecTest, SubNsecOflow) {
- for (int i = -4; i <= 4; ++i) {
- timespec_wrap a( i , 100);
- timespec_wrap E(i-1, 200);
- timespec_wrap c;
-
- c = sub_tspec_ns(a, NANOSECONDS - 100);
- ASSERT_EQ(E, c);
- }
-}
-
-//----------------------------------------------------------------------
-// test negation
-//----------------------------------------------------------------------
-
-TEST_F(timespecTest, Neg) {
- for (int i = -4; i <= 4; ++i) {
- timespec_wrap a(i, 100);
- timespec_wrap b;
- timespec_wrap c;
-
- b = neg_tspec(a);
- c = add_tspec(a, b);
- ASSERT_EQ(0, test_tspec(c));
- }
-}
-
-//----------------------------------------------------------------------
-// test abs value
-//----------------------------------------------------------------------
-
-TEST_F(timespecTest, AbsNoFrac) {
- for (int i = -4; i <= 4; ++i) {
- timespec_wrap a(i , 0);
- timespec_wrap b;
-
- b = abs_tspec(a);
- ASSERT_EQ((i != 0), test_tspec(b));
- }
-}
-
-TEST_F(timespecTest, AbsWithFrac) {
- for (int i = -4; i <= 4; ++i) {
- timespec_wrap a(i, 100);
- timespec_wrap b;
-
- b = abs_tspec(a);
- ASSERT_EQ(1, test_tspec(b));
- }
-}
-
-// ---------------------------------------------------------------------
-// test support stuff -- part 2
-// ---------------------------------------------------------------------
-
-TEST_F(timespecTest, Helpers2) {
- AssertTimespecClose isClose(0, 2);
- timespec_wrap x, y;
-
- for (x.V.tv_sec = -2; x.V.tv_sec < 3; x.V.tv_sec++)
- for (x.V.tv_nsec = 1;
- x.V.tv_nsec < 1000000000;
- x.V.tv_nsec += 499999999) {
- for (long i = -4; i < 5; i++) {
- y = x;
- y.V.tv_nsec += i;
- if (i >= -2 && i <= 2)
- ASSERT_PRED_FORMAT2(isClose, x, y);
- else
- ASSERT_PRED_FORMAT2(!isClose, x, y);
- }
- }
-}
-
-// global predicate instances we're using here
-static AssertFpClose FpClose(0, 1);
-static AssertTimespecClose TimespecClose(0, 2);
-
-//----------------------------------------------------------------------
-// conversion to l_fp
-//----------------------------------------------------------------------
-
-TEST_F(timespecTest, ToLFPbittest) {
- for (u_int32 i = 0; i < 1000000000; i+=1000) {
- timespec_wrap a(1, i);
- l_fp_wrap E(1, my_tick_to_tsf(i));
- l_fp_wrap r;
-
- r = tspec_intv_to_lfp(a);
- ASSERT_PRED_FORMAT2(FpClose, E, r);
- }
-}
-
-TEST_F(timespecTest, ToLFPrelPos) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- timespec_wrap a(1, fdata[i].nsec);
- l_fp_wrap E(1, fdata[i].frac);
- l_fp_wrap r;
-
- r = tspec_intv_to_lfp(a);
- ASSERT_EQ(E, r);
- }
-}
-
-TEST_F(timespecTest, ToLFPrelNeg) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- timespec_wrap a(-1, fdata[i].nsec);
- l_fp_wrap E(~0, fdata[i].frac);
- l_fp_wrap r;
-
- r = tspec_intv_to_lfp(a);
- ASSERT_EQ(E, r);
- }
-}
-
-TEST_F(timespecTest, ToLFPabs) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- timespec_wrap a(1, fdata[i].nsec);
- l_fp_wrap E(1 + JAN_1970, fdata[i].frac);
- l_fp_wrap r;
-
- r = tspec_stamp_to_lfp(a);
- ASSERT_EQ(E, r);
- }
-}
-
-//----------------------------------------------------------------------
-// conversion from l_fp
-//----------------------------------------------------------------------
-TEST_F(timespecTest, FromLFPbittest) {
- // Not *exactly* a bittest, because 2**32 tests would take a
- // really long time even on very fast machines! So we do test
- // every 1000 fractional units.
- for (u_int32 tsf = 0; tsf < ~u_int32(1000); tsf += 1000) {
- timespec_wrap E(1, my_tsf_to_tick(tsf));
- l_fp_wrap a(1, tsf);
- timespec_wrap r;
-
- r = lfp_intv_to_tspec(a);
- // The conversion might be off by one nanosecond when
- // comparing to calculated value.
- ASSERT_PRED_FORMAT2(TimespecClose, E, r);
- }
-}
-
-TEST_F(timespecTest, FromLFPrelPos) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- l_fp_wrap a(1, fdata[i].frac);
- timespec_wrap E(1, fdata[i].nsec);
- timespec_wrap r;
-
- r = lfp_intv_to_tspec(a);
- ASSERT_PRED_FORMAT2(TimespecClose, E, r);
- }
-}
-
-TEST_F(timespecTest, FromLFPrelNeg) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- l_fp_wrap a(~0, fdata[i].frac);
- timespec_wrap E(-1, fdata[i].nsec);
- timespec_wrap r;
-
- r = lfp_intv_to_tspec(a);
- ASSERT_PRED_FORMAT2(TimespecClose, E, r);
- }
-}
-
-
-// nsec -> frac -> nsec roundtrip, using a prime start and increment
-TEST_F(timespecTest, LFProundtrip) {
- for (int32_t t = -1; t < 2; ++t)
- for (u_int32 i = 4999; i < 1000000000; i+=10007) {
- timespec_wrap E(t, i);
- l_fp_wrap a;
- timespec_wrap r;
-
- a = tspec_intv_to_lfp(E);
- r = lfp_intv_to_tspec(a);
- ASSERT_EQ(E, r);
- }
-}
-
-//----------------------------------------------------------------------
-// string formatting
-//----------------------------------------------------------------------
-
-TEST_F(timespecTest, ToString) {
- static const struct {
- time_t sec;
- long nsec;
- const char * repr;
- } data [] = {
- { 0, 0, "0.000000000" },
- { 2, 0, "2.000000000" },
- {-2, 0, "-2.000000000" },
- { 0, 1, "0.000000001" },
- { 0,-1, "-0.000000001" },
- { 1,-1, "0.999999999" },
- {-1, 1, "-0.999999999" },
- {-1,-1, "-1.000000001" },
- };
- for (int i = 0; i < COUNTOF(data); i++) {
- timespec_wrap a(data[i].sec, data[i].nsec);
- std::string E(data[i].repr);
- std::string r(tspectoa(a));
- ASSERT_EQ(E, r);
- }
-}
-
-// -*- EOF -*-
diff --git a/contrib/ntp/tests/libntp/g_timestructs.cpp b/contrib/ntp/tests/libntp/g_timestructs.cpp
deleted file mode 100644
index 15b5ec164aa3..000000000000
--- a/contrib/ntp/tests/libntp/g_timestructs.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * timestructs.cpp -- test bed adaptors for time structs.
- *
- * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
- * The contents of 'html/copyright.html' apply.
- */
-#include "g_libntptest.h"
-#include "g_timestructs.h"
-
-extern "C" {
-#include "timetoa.h"
-#include "timevalops.h"
-#include "timespecops.h"
-}
-
-namespace timeStruct {
-
-std::ostream&
-operator << (std::ostream& os, const timeStruct::l_fp_wrap& val)
-{
- // raw data formatting
- os << "0x" << std::hex << val.V.l_ui << ':'
- << std::setfill('0') << std::setw(8) << val.V.l_uf
- << std::dec;
- // human-readable format
- os << '[' << lfptoa(&val.V, 10) << ']';
- return os;
-}
-
-std::ostream&
-operator << (std::ostream& os, const timeStruct::timeval_wrap& val)
-{
- // raw data formatting
- os << val.V.tv_sec << ':' << val.V.tv_usec;
- // human-readable format
- os << '['
- << format_time_fraction(val.V.tv_sec, val.V.tv_usec, 6)
- << ']';
- return os;
-}
-
-std::ostream&
-operator << (std::ostream& os, const timeStruct::timespec_wrap& val)
-{
- // raw data formatting
- os << val.V.tv_sec << ':' << val.V.tv_nsec;
- // human-readable format
- os << '['
- << format_time_fraction(val.V.tv_sec, val.V.tv_nsec, 9)
- << ']';
- return os;
-}
-
-// Implementation of the l_fp closeness predicate
-
-AssertFpClose::AssertFpClose(
- u_int32 hi,
- u_int32 lo
- )
-{
- limit.l_ui = hi;
- limit.l_uf = lo;
-}
-
-::testing::AssertionResult
-AssertFpClose::operator()(
- const char* m_expr,
- const char* n_expr,
- const l_fp & m,
- const l_fp & n
- )
-{
- l_fp diff;
-
- if (L_ISGEQ(&m, &n)) {
- diff = m;
- L_SUB(&diff, &n);
- } else {
- diff = n;
- L_SUB(&diff, &m);
- }
- if (L_ISGEQ(&limit, &diff))
- return ::testing::AssertionSuccess();
-
- return ::testing::AssertionFailure()
- << m_expr << " which is " << l_fp_wrap(m)
- << "\nand\n"
- << n_expr << " which is " << l_fp_wrap(n)
- << "\nare not close; diff=" << l_fp_wrap(diff);
-}
-
-// Implementation of the timeval closeness predicate
-
-AssertTimevalClose::AssertTimevalClose(
- time_t hi,
- int32 lo
- )
-{
- limit.tv_sec = hi;
- limit.tv_usec = lo;
-}
-
-::testing::AssertionResult
-AssertTimevalClose::operator()(
- const char* m_expr,
- const char* n_expr,
- const struct timeval & m,
- const struct timeval & n
- )
-{
- struct timeval diff;
-
- diff = abs_tval(sub_tval(m, n));
- if (cmp_tval(limit, diff) >= 0)
- return ::testing::AssertionSuccess();
-
- return ::testing::AssertionFailure()
- << m_expr << " which is " << timeval_wrap(m)
- << "\nand\n"
- << n_expr << " which is " << timeval_wrap(n)
- << "\nare not close; diff=" << timeval_wrap(diff);
-}
-
-// Implementation of the timespec closeness predicate
-
-AssertTimespecClose::AssertTimespecClose(
- time_t hi,
- int32 lo
- )
-{
- limit.tv_sec = hi;
- limit.tv_nsec = lo;
-}
-
-::testing::AssertionResult
-AssertTimespecClose::operator()(
- const char* m_expr,
- const char* n_expr,
- const struct timespec & m,
- const struct timespec & n
- )
-{
- struct timespec diff;
-
- diff = abs_tspec(sub_tspec(m, n));
- if (cmp_tspec(limit, diff) >= 0)
- return ::testing::AssertionSuccess();
-
- return ::testing::AssertionFailure()
- << m_expr << " which is " << timespec_wrap(m)
- << "\nand\n"
- << n_expr << " which is " << timespec_wrap(n)
- << "\nare not close; diff=" << timespec_wrap(diff);
-}
-
-} // namespace timeStruct
diff --git a/contrib/ntp/tests/libntp/g_timestructs.h b/contrib/ntp/tests/libntp/g_timestructs.h
deleted file mode 100644
index 7bc4ffdcf8ca..000000000000
--- a/contrib/ntp/tests/libntp/g_timestructs.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * timestructs.h -- test bed adaptors for time structs.
- *
- * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
- * The contents of 'html/copyright.html' apply.
- *
- * Some wrapper classes and a closeness predicate that are used to
- * bridge the gap between the goggletest framework and the structs used
- * for representing time stamps (l_fp, struct timeval, struct timespec).
- *
- * Some ostream conversion operators are provided to give diagnostic
- * output on errors. The normal string conversion functions will give
- * HRVs (human readable values) but we might also be interested in the
- * machine representation for diagnostic purposes.
- */
-#ifndef TIMESTRUCTS_H
-#define TIMESTRUCTS_H
-
-extern "C" {
-#include "ntp_fp.h"
-}
-
-namespace timeStruct {
-
-// wrap a l_fp struct with common operations
-class l_fp_wrap {
- public:
- l_fp V;
-
- l_fp_wrap()
- { ZERO(V); }
- l_fp_wrap(u_int32 hi, u_int32 lo)
- { V.l_ui = hi; V.l_uf = lo; }
- l_fp_wrap(const l_fp &rhs)
- { V = rhs; }
- bool operator == (const l_fp_wrap& rhs) const
- { return L_ISEQU(&V, &rhs.V); }
- operator l_fp* ()
- { return &V; }
- operator l_fp& ()
- { return V; }
- l_fp_wrap & operator = (const l_fp_wrap& rhs)
- { V = rhs.V; return *this; }
- l_fp_wrap& operator = (const l_fp& rhs)
- { V = rhs; return *this; }
- };
-
-// wrap a 'struct timeval' with common operations
-class timeval_wrap {
-public:
- struct timeval V;
-
- timeval_wrap()
- { ZERO(V); }
- timeval_wrap(time_t hi, long lo)
- { V.tv_sec = hi; V.tv_usec = lo; }
- timeval_wrap(const struct timeval & rhs)
- { V = rhs; }
- timeval_wrap(const timeval_wrap & rhs)
- { V = rhs.V; }
- bool operator == (const timeval_wrap& rhs) const
- { return V.tv_sec == rhs.V.tv_sec &&
- V.tv_usec == rhs.V.tv_usec ; }
- bool valid() const
- { return V.tv_usec >= 0 && V.tv_usec < 1000000; }
- operator struct timeval* ()
- { return &V; }
- operator struct timeval& ()
- { return V; }
- timeval_wrap& operator = (const timeval_wrap& rhs)
- { V = rhs.V; return *this; }
- timeval_wrap& operator = (const struct timeval& rhs)
- { V = rhs; return *this; }
-};
-
-// wrap a 'struct timespec' with common operations
-class timespec_wrap {
-public:
- struct timespec V;
-
- timespec_wrap()
- { ZERO(V); }
- timespec_wrap(time_t hi, long lo)
- { V.tv_sec = hi; V.tv_nsec = lo; }
- timespec_wrap(const struct timespec & rhs)
- { V = rhs; }
- timespec_wrap(const timespec_wrap & rhs)
- { V = rhs.V; }
- bool operator == (const timespec_wrap& rhs) const
- { return V.tv_sec == rhs.V.tv_sec &&
- V.tv_nsec == rhs.V.tv_nsec ; }
- bool valid() const
- { return V.tv_nsec >= 0 && V.tv_nsec < 1000000000; }
- operator struct timespec* ()
- { return &V; }
- operator struct timespec& ()
- { return V; }
- timespec_wrap& operator = (const timespec_wrap& rhs)
- { V = rhs.V; return *this; }
- timespec_wrap& operator = (const struct timespec& rhs)
- { V = rhs; return *this; }
-};
-
-// l_fp closeness testing predicate
-//
-// This predicate is used for the closeness ('near') testing of l_fp
-// values. Once constructed with a limit, it can be used to check the
-// absolute difference of two l_fp structs against that limit; if the
-// difference is less or equal to this limit, the test passes.
-class AssertFpClose {
-private:
- l_fp limit;
-
-public:
- AssertFpClose(u_int32 hi, u_int32 lo);
-
- ::testing::AssertionResult
- operator()(const char* m_expr, const char* n_expr,
- const l_fp & m, const l_fp & n);
-};
-
-
-// timeval closeness testing predicate
-//
-// CAVEAT: This class uses the timevalops functions
-// - sub_tval
-// - abs_tval
-// - cmp_tval
-//
-// This creates a dependency loop of sorts. The loop is defused by the
-// fact that these basic operations can be tested by exact value tests,
-// so once the basic timeval operations passed it's safe to use this
-// predicate.
-class AssertTimevalClose {
-private:
- struct timeval limit;
-
-public:
- // note: (hi,lo) should be a positive normalised timeval;
- // the constructor does not normalise the values!
- AssertTimevalClose(time_t hi, int32 lo);
-
- ::testing::AssertionResult
- operator()(const char* m_expr, const char* n_expr,
- const struct timeval & m, const struct timeval & n);
-};
-
-
-// timespec closeness testing predicate
-//
-// CAVEAT: This class uses the timespecops functions
-// - sub_tspec
-// - abs_tspec
-// - cmp_tspec
-//
-// See the equivalent timeval helper.
-class AssertTimespecClose {
-private:
- struct timespec limit;
-
-public:
- // note: (hi,lo) should be a positive normalised timespec;
- // the constructor does not normalise the values!
- AssertTimespecClose(time_t hi, int32 lo);
-
- ::testing::AssertionResult
- operator()(const char* m_expr, const char* n_expr,
- const struct timespec & m, const struct timespec & n);
-};
-
-
-// since googletest wants to string format items, we declare the
-// necessary operators. Since all adaptors have only public members
-// there is need for friend declarations anywhere.
-
-extern std::ostream& operator << (std::ostream& os,
- const timeStruct::l_fp_wrap& val);
-extern std::ostream& operator << (std::ostream& os,
- const timeStruct::timeval_wrap& val);
-extern std::ostream& operator << (std::ostream& os,
- const timeStruct::timespec_wrap& val);
-
-} // namespace timeStruct
-
-#endif // TIMESTRUCTS_H
diff --git a/contrib/ntp/tests/libntp/g_timevalops.cpp b/contrib/ntp/tests/libntp/g_timevalops.cpp
deleted file mode 100644
index 8c171fca0928..000000000000
--- a/contrib/ntp/tests/libntp/g_timevalops.cpp
+++ /dev/null
@@ -1,480 +0,0 @@
-#include "g_libntptest.h"
-#include "g_timestructs.h"
-
-extern "C" {
-#include <math.h>
-#include "timevalops.h"
-}
-
-#include <string>
-#include <sstream>
-
-using namespace timeStruct;
-
-class timevalTest : public libntptest {
-protected:
- static u_int32 my_tick_to_tsf(u_int32 ticks);
- static u_int32 my_tsf_to_tick(u_int32 tsf);
-
- // that's it...
- struct lfpfracdata {
- long usec;
- u_int32 frac;
- };
- static const lfpfracdata fdata[];
-};
-
-u_int32
-timevalTest::my_tick_to_tsf(
- u_int32 ticks
- )
-{
- // convert microseconds to l_fp fractional units, using double
- // precision float calculations or, if available, 64bit integer
- // arithmetic. This should give the precise fraction, rounded to
- // the nearest representation.
-#ifdef HAVE_U_INT64
- return u_int32(((u_int64(ticks) << 32) + 500000) / 1000000);
-#else
- return u_int32(double(ticks) * 4294.967296 + 0.5);
-#endif
- // And before you ask: if ticks >= 1000000, the result is
- // truncated nonsense, so don't use it out-of-bounds.
-}
-
-u_int32
-timevalTest::my_tsf_to_tick(
- u_int32 tsf
- )
-{
- // Inverse operation: converts fraction to microseconds.
-#ifdef HAVE_U_INT64
- return u_int32((u_int64(tsf) * 1000000 + 0x80000000) >> 32);
-#else
- return u_int32(double(tsf) / 4294.967296 + 0.5);
-#endif
- // Beware: The result might be 10^6 due to rounding!
-}
-
-const timevalTest::lfpfracdata timevalTest::fdata [] = {
- { 0, 0x00000000 }, { 7478, 0x01ea1405 },
- { 22077, 0x05a6d699 }, { 125000, 0x20000000 },
- { 180326, 0x2e29d841 }, { 207979, 0x353e1c9b },
- { 250000, 0x40000000 }, { 269509, 0x44fe8ab5 },
- { 330441, 0x5497c808 }, { 333038, 0x5541fa76 },
- { 375000, 0x60000000 }, { 394734, 0x650d4995 },
- { 446327, 0x72427c7c }, { 500000, 0x80000000 },
- { 517139, 0x846338b4 }, { 571953, 0x926b8306 },
- { 587353, 0x965cc426 }, { 625000, 0xa0000000 },
- { 692136, 0xb12fd32c }, { 750000, 0xc0000000 },
- { 834068, 0xd5857aff }, { 848454, 0xd9344806 },
- { 854222, 0xdaae4b02 }, { 861465, 0xdc88f862 },
- { 875000, 0xe0000000 }, { 910661, 0xe921144d },
- { 922162, 0xec12cf10 }, { 942190, 0xf1335d25 }
-};
-
-
-// ---------------------------------------------------------------------
-// test support stuff - part1
-// ---------------------------------------------------------------------
-
-TEST_F(timevalTest, Helpers1) {
- timeval_wrap x;
-
- for (x.V.tv_sec = -2; x.V.tv_sec < 3; x.V.tv_sec++) {
- x.V.tv_usec = -1;
- ASSERT_FALSE(x.valid());
- x.V.tv_usec = 0;
- ASSERT_TRUE(x.valid());
- x.V.tv_usec = 999999;
- ASSERT_TRUE(x.valid());
- x.V.tv_usec = 1000000;
- ASSERT_FALSE(x.valid());
- }
-}
-
-//----------------------------------------------------------------------
-// test normalisation
-//----------------------------------------------------------------------
-
-TEST_F(timevalTest, Normalise) {
- for (long ns = -2000000000; ns <= 2000000000; ns += 10000000) {
- timeval_wrap x(0, ns);
-
- x = normalize_tval(x);
- ASSERT_TRUE(x.valid());
- }
-}
-
-//----------------------------------------------------------------------
-// test classification
-//----------------------------------------------------------------------
-
-TEST_F(timevalTest, SignNoFrac) {
- // sign test, no fraction
- for (int i = -4; i <= 4; ++i) {
- timeval_wrap a(i, 0);
- int E = (i > 0) - (i < 0);
- int r = test_tval(a);
-
- ASSERT_EQ(E, r);
- }
-}
-
-TEST_F(timevalTest, SignWithFrac) {
- // sign test, with fraction
- for (int i = -4; i <= 4; ++i) {
- timeval_wrap a(i, 10);
- int E = (i >= 0) - (i < 0);
- int r = test_tval(a);
-
- ASSERT_EQ(E, r);
- }
-}
-
-//----------------------------------------------------------------------
-// test compare
-//----------------------------------------------------------------------
-TEST_F(timevalTest, CmpFracEQ) {
- // fractions are equal
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timeval_wrap a(i, 200);
- timeval_wrap b(j, 200);
- int E = (i > j) - (i < j);
- int r = cmp_tval_denorm(a, b);
-
- ASSERT_EQ(E, r);
- }
-}
-
-TEST_F(timevalTest, CmpFracGT) {
- // fraction a bigger fraction b
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timeval_wrap a( i , 999800);
- timeval_wrap b( j , 200);
- int E = (i >= j) - (i < j);
- int r = cmp_tval_denorm(a, b);
-
- ASSERT_EQ(E, r);
- }
-}
-
-TEST_F(timevalTest, CmpFracLT) {
- // fraction a less fraction b
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timeval_wrap a(i, 200);
- timeval_wrap b(j, 999800);
- int E = (i > j) - (i <= j);
- int r = cmp_tval_denorm(a, b);
-
- ASSERT_EQ(E, r);
- }
-}
-
-//----------------------------------------------------------------------
-// Test addition (sum)
-//----------------------------------------------------------------------
-
-TEST_F(timevalTest, AddFullNorm) {
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timeval_wrap a(i, 200);
- timeval_wrap b(j, 400);
- timeval_wrap E(i + j, 200 + 400);
- timeval_wrap c;
-
- c = add_tval(a, b);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timevalTest, AddFullOflow1) {
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timeval_wrap a(i, 200);
- timeval_wrap b(j, 999900);
- timeval_wrap E(i + j + 1, 100);
- timeval_wrap c;
-
- c = add_tval(a, b);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timevalTest, AddUsecNorm) {
- for (int i = -4; i <= 4; ++i) {
- timeval_wrap a(i, 200);
- timeval_wrap E(i, 600);
- timeval_wrap c;
-
- c = add_tval_us(a, 600 - 200);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timevalTest, AddUsecOflow1) {
- for (int i = -4; i <= 4; ++i) {
- timeval_wrap a(i, 200);
- timeval_wrap E(i + 1, 100);
- timeval_wrap c;
-
- c = add_tval_us(a, MICROSECONDS - 100);
- ASSERT_EQ(E, c);
- }
-}
-
-//----------------------------------------------------------------------
-// test subtraction (difference)
-//----------------------------------------------------------------------
-
-TEST_F(timevalTest, SubFullNorm) {
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timeval_wrap a(i, 600);
- timeval_wrap b(j, 400);
- timeval_wrap E(i - j, 600 - 400);
- timeval_wrap c;
-
- c = sub_tval(a, b);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timevalTest, SubFullOflow) {
- for (int i = -4; i <= 4; ++i)
- for (int j = -4; j <= 4; ++j) {
- timeval_wrap a(i, 100);
- timeval_wrap b(j, 999900);
- timeval_wrap E(i - j - 1, 200);
- timeval_wrap c;
-
- c = sub_tval(a, b);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timevalTest, SubUsecNorm) {
- for (int i = -4; i <= 4; ++i) {
- timeval_wrap a(i, 600);
- timeval_wrap E(i, 200);
- timeval_wrap c;
-
- c = sub_tval_us(a, 600 - 200);
- ASSERT_EQ(E, c);
- }
-}
-
-TEST_F(timevalTest, SubUsecOflow) {
- for (int i = -4; i <= 4; ++i) {
- timeval_wrap a(i, 100);
- timeval_wrap E(i - 1, 200);
- timeval_wrap c;
-
- c = sub_tval_us(a, MICROSECONDS - 100);
- ASSERT_EQ(E, c);
- }
-}
-
-//----------------------------------------------------------------------
-// test negation
-//----------------------------------------------------------------------
-
-TEST_F(timevalTest, Neg) {
- for (int i = -4; i <= 4; ++i) {
- timeval_wrap a(i, 100);
- timeval_wrap b;
- timeval_wrap c;
-
- b = neg_tval(a);
- c = add_tval(a, b);
- ASSERT_EQ(0, test_tval(c));
- }
-}
-
-//----------------------------------------------------------------------
-// test abs value
-//----------------------------------------------------------------------
-
-TEST_F(timevalTest, AbsNoFrac) {
- for (int i = -4; i <= 4; ++i) {
- timeval_wrap a(i, 0);
- timeval_wrap b;
-
- b = abs_tval(a);
- ASSERT_EQ((i != 0), test_tval(b));
- }
-}
-
-TEST_F(timevalTest, AbsWithFrac) {
- for (int i = -4; i <= 4; ++i) {
- timeval_wrap a(i, 100);
- timeval_wrap b;
-
- b = abs_tval(a);
- ASSERT_EQ(1, test_tval(b));
- }
-}
-
-// ---------------------------------------------------------------------
-// test support stuff -- part 2
-// ---------------------------------------------------------------------
-
-TEST_F(timevalTest, Helpers2) {
- AssertTimevalClose isClose(0, 2);
- timeval_wrap x, y;
-
- for (x.V.tv_sec = -2; x.V.tv_sec < 3; x.V.tv_sec++)
- for (x.V.tv_usec = 1;
- x.V.tv_usec < 1000000;
- x.V.tv_usec += 499999) {
- for (long i = -4; i < 5; i++) {
- y = x;
- y.V.tv_usec += i;
- if (i >= -2 && i <= 2)
- ASSERT_PRED_FORMAT2(isClose, x, y);
- else
- ASSERT_PRED_FORMAT2(!isClose, x, y);
- }
- }
-}
-
-// and the global predicate instances we're using here
-static AssertFpClose FpClose(0, 1);
-static AssertTimevalClose TimevalClose(0, 1);
-
-//----------------------------------------------------------------------
-// conversion to l_fp
-//----------------------------------------------------------------------
-
-TEST_F(timevalTest, ToLFPbittest) {
- for (u_int32 i = 0; i < 1000000; i++) {
- timeval_wrap a(1, i);
- l_fp_wrap E(1, my_tick_to_tsf(i));
- l_fp_wrap r;
-
- r = tval_intv_to_lfp(a);
- ASSERT_PRED_FORMAT2(FpClose, E, r);
- }
-}
-
-TEST_F(timevalTest, ToLFPrelPos) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- timeval_wrap a(1, fdata[i].usec);
- l_fp_wrap E(1, fdata[i].frac);
- l_fp_wrap r;
-
- r = tval_intv_to_lfp(a);
- ASSERT_PRED_FORMAT2(FpClose, E, r);
- }
-}
-
-TEST_F(timevalTest, ToLFPrelNeg) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- timeval_wrap a(-1, fdata[i].usec);
- l_fp_wrap E(~0, fdata[i].frac);
- l_fp_wrap r;
-
- r = tval_intv_to_lfp(a);
- ASSERT_PRED_FORMAT2(FpClose, E, r);
- }
-}
-
-TEST_F(timevalTest, ToLFPabs) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- timeval_wrap a(1, fdata[i].usec);
- l_fp_wrap E(1 + JAN_1970, fdata[i].frac);
- l_fp_wrap r;
-
- r = tval_stamp_to_lfp(a);
- ASSERT_PRED_FORMAT2(FpClose, E, r);
- }
-}
-
-//----------------------------------------------------------------------
-// conversion from l_fp
-//----------------------------------------------------------------------
-
-TEST_F(timevalTest, FromLFPbittest) {
- // Not *exactly* a bittest, because 2**32 tests would take a
- // really long time even on very fast machines! So we do test
- // every 1000 fractional units.
- for (u_int32 tsf = 0; tsf < ~u_int32(1000); tsf += 1000) {
- timeval_wrap E(1, my_tsf_to_tick(tsf));
- l_fp_wrap a(1, tsf);
- timeval_wrap r;
-
- r = lfp_intv_to_tval(a);
- // The conversion might be off by one microsecond when
- // comparing to calculated value.
- ASSERT_PRED_FORMAT2(TimevalClose, E, r);
- }
-}
-
-TEST_F(timevalTest, FromLFPrelPos) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- l_fp_wrap a(1, fdata[i].frac);
- timeval_wrap E(1, fdata[i].usec);
- timeval_wrap r;
-
- r = lfp_intv_to_tval(a);
- ASSERT_PRED_FORMAT2(TimevalClose, E, r);
- }
-}
-
-TEST_F(timevalTest, FromLFPrelNeg) {
- for (int i = 0; i < COUNTOF(fdata); i++) {
- l_fp_wrap a(~0, fdata[i].frac);
- timeval_wrap E(-1, fdata[i].usec);
- timeval_wrap r;
-
- r = lfp_intv_to_tval(a);
- ASSERT_PRED_FORMAT2(TimevalClose, E, r);
- }
-}
-
-// usec -> frac -> usec roundtrip, using a prime start and increment
-TEST_F(timevalTest, LFProundtrip) {
- for (int32_t t = -1; t < 2; ++t)
- for (u_int32 i = 5; i < 1000000; i+=11) {
- timeval_wrap E(t, i);
- l_fp_wrap a;
- timeval_wrap r;
-
- a = tval_intv_to_lfp(E);
- r = lfp_intv_to_tval(a);
- ASSERT_EQ(E, r);
- }
-}
-
-//----------------------------------------------------------------------
-// string formatting
-//----------------------------------------------------------------------
-
-TEST_F(timevalTest, ToString) {
- static const struct {
- time_t sec;
- long usec;
- const char * repr;
- } data [] = {
- { 0, 0, "0.000000" },
- { 2, 0, "2.000000" },
- {-2, 0, "-2.000000" },
- { 0, 1, "0.000001" },
- { 0,-1, "-0.000001" },
- { 1,-1, "0.999999" },
- {-1, 1, "-0.999999" },
- {-1,-1, "-1.000001" },
- };
- for (int i = 0; i < COUNTOF(data); ++i) {
- timeval_wrap a(data[i].sec, data[i].usec);
- std::string E(data[i].repr);
- std::string r(tvaltoa(a));
-
- ASSERT_EQ(E, r);
- }
-}
-
-// -*- EOF -*-
diff --git a/contrib/ntp/tests/libntp/g_tstotv.cpp b/contrib/ntp/tests/libntp/g_tstotv.cpp
deleted file mode 100644
index 30f4ca6a758f..000000000000
--- a/contrib/ntp/tests/libntp/g_tstotv.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_fp.h"
-#include "timevalops.h"
-};
-
-class tstotvTest : public libntptest {
-protected:
- ::testing::AssertionResult IsEqual(const timeval& expected,
- const timeval& actual) {
- if (expected.tv_sec == actual.tv_sec &&
- expected.tv_usec == actual.tv_usec) {
- // Success
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "expected: " << expected.tv_sec << "."
- << expected.tv_usec
- << " but was: " << actual.tv_sec << "."
- << actual.tv_usec;
- }
- }
-
- static const u_long HALF = 2147483648UL;
-};
-
-TEST_F(tstotvTest, Seconds) {
- const l_fp input = {50, 0}; // 50.0 s
- const timeval expected = {50, 0};
- timeval actual;
-
- TSTOTV(&input, &actual);
-
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(tstotvTest, MicrosecondsExact) {
- const l_fp input = {50, HALF}; // 10.5 s
- const timeval expected = {50, 500000};
- timeval actual;
-
- TSTOTV(&input, &actual);
-
- EXPECT_TRUE(IsEqual(expected, actual));
-
-}
-
-TEST_F(tstotvTest, MicrosecondsRounding) {
- const l_fp input = {50, 3865471UL}; // Should round to 50.0009
- const timeval expected = {50, 900};
- timeval actual;
-
- TSTOTV(&input, &actual);
-
- EXPECT_TRUE(IsEqual(expected, actual));
-}
diff --git a/contrib/ntp/tests/libntp/g_tvtots.cpp b/contrib/ntp/tests/libntp/g_tvtots.cpp
deleted file mode 100644
index fcb82a30bdc6..000000000000
--- a/contrib/ntp/tests/libntp/g_tvtots.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-#include "g_lfptest.h"
-
-extern "C" {
-#include "timevalops.h"
-};
-
-// Required on Solaris for ldexp.
-#include <math.h>
-
-class tvtotsTest : public lfptest {
-};
-
-TEST_F(tvtotsTest, Seconds) {
- timeval input = {500, 0}; // 500.0 s
- l_fp expected = {500, 0};
- l_fp actual;
-
- TVTOTS(&input, &actual);
-
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(tvtotsTest, MicrosecondsRounded) {
- /* 0.0005 can not be represented exact in a l_fp structure.
- * It would equal to 2147483,648. This means that
- * HALF_PROMILLE_UP (which is 2147484) should be
- * the correct rounding. */
-
- timeval input = {0, 500}; // 0.0005 exact
- l_fp expected = {0, HALF_PROMILLE_UP};
- l_fp actual;
-
- TVTOTS(&input, &actual);
- EXPECT_TRUE(IsEqual(expected, actual));
-}
-
-TEST_F(tvtotsTest, MicrosecondsExact) {
- // 0.5 can be represented exact in both l_fp and timeval.
- const timeval input = {10, 500000}; // 0.5 exact
- const l_fp expected = {10, HALF}; // 0.5 exact
- l_fp actual;
-
- TVTOTS(&input, &actual);
-
- // Compare the fractional part with an absolute error given.
- EXPECT_EQ(expected.l_ui, actual.l_ui);
-
- double expectedDouble, actualDouble;
- M_LFPTOD(0, expected.l_uf, expectedDouble);
- M_LFPTOD(0, actual.l_uf, actualDouble);
-
- // The error should be less than 0.5 us
- EXPECT_NEAR(expectedDouble, actualDouble, 0.0000005);
-}
diff --git a/contrib/ntp/tests/libntp/g_uglydate.cpp b/contrib/ntp/tests/libntp/g_uglydate.cpp
deleted file mode 100644
index 12aa0025cab2..000000000000
--- a/contrib/ntp/tests/libntp/g_uglydate.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_fp.h"
-};
-
-class uglydateTest : public libntptest {
-protected:
- static const u_int32 HALF = 2147483648UL;
-};
-
-TEST_F(uglydateTest, ConstantDateTime) {
- l_fp time = {3485080800UL, HALF}; // 2010-06-09 14:00:00.5
-
- EXPECT_STREQ("3485080800.500000 10:159:14:00:00.500",
- uglydate(&time));
-}
-
diff --git a/contrib/ntp/tests/libntp/g_vi64ops.cpp b/contrib/ntp/tests/libntp/g_vi64ops.cpp
deleted file mode 100644
index 29f7932b37a0..000000000000
--- a/contrib/ntp/tests/libntp/g_vi64ops.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "vint64ops.h"
-}
-
-class vi64Test : public libntptest {
-public:
- ::testing::AssertionResult IsEqual(const vint64 &expected, const vint64 &actual) {
- if (0 == memcmp(&expected, &actual, sizeof(vint64))) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "expected: "
- << std::hex << expected.D_s.hi << '.'
- << std::hex << expected.D_s.lo
- << " but was "
- << std::hex << actual.D_s.hi << '.'
- << std::hex << actual.D_s.lo;
- }
- }
-};
-
-// ----------------------------------------------------------------------
-// test number parser
-TEST_F(vi64Test, ParseVUI64_pos) {
- vint64 act, exp;
- const char *sp;
- char *ep;
-
- sp = "1234x";
- exp.D_s.hi = 0;
- exp.D_s.lo = 1234;
- act = strtouv64(sp, &ep, 0);
- EXPECT_TRUE(IsEqual(exp, act));
- EXPECT_EQ(*ep, 'x');
-}
-
-TEST_F(vi64Test, ParseVUI64_neg) {
- vint64 act, exp;
- const char *sp;
- char *ep;
-
- sp = "-1234x";
- exp.D_s.hi = ~0;
- exp.D_s.lo = -1234;
- act = strtouv64(sp, &ep, 0);
- EXPECT_TRUE(IsEqual(exp, act));
- EXPECT_EQ(*ep, 'x');
-}
-
-TEST_F(vi64Test, ParseVUI64_case) {
- vint64 act, exp;
- const char *sp;
- char *ep;
-
- sp = "0123456789AbCdEf";
- exp.D_s.hi = 0x01234567;
- exp.D_s.lo = 0x89ABCDEF;
- act = strtouv64(sp, &ep, 16);
- EXPECT_TRUE(IsEqual(exp, act));
- EXPECT_EQ(*ep, '\0');
-}
-
diff --git a/contrib/ntp/tests/libntp/g_ymd2yd.cpp b/contrib/ntp/tests/libntp/g_ymd2yd.cpp
deleted file mode 100644
index 7e2599960124..000000000000
--- a/contrib/ntp/tests/libntp/g_ymd2yd.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "g_libntptest.h"
-
-class ymd2ydTest : public libntptest {
-};
-
-TEST_F(ymd2ydTest, NonLeapYearFebruary) {
- EXPECT_EQ(31+20, ymd2yd(2010,2,20)); //2010-02-20
-}
-
-TEST_F(ymd2ydTest, NonLeapYearJune) {
- int expected = 31+28+31+30+31+18; // 18 June non-leap year
- EXPECT_EQ(expected, ymd2yd(2011,6,18));
-}
-
-TEST_F(ymd2ydTest, LeapYearFebruary) {
- EXPECT_EQ(31+20, ymd2yd(2012,2,20)); //2012-02-20 (leap year)
-}
-
-TEST_F(ymd2ydTest, LeapYearDecember) {
- // 2012-12-31
- int expected = 31+29+31+30+31+30+31+31+30+31+30+31;
- EXPECT_EQ(expected, ymd2yd(2012,12,31));
-}
diff --git a/contrib/ntp/tests/libntp/hextoint.c b/contrib/ntp/tests/libntp/hextoint.c
index e9f0d398fee8..443a1b8310d1 100644
--- a/contrib/ntp/tests/libntp/hextoint.c
+++ b/contrib/ntp/tests/libntp/hextoint.c
@@ -6,6 +6,12 @@
#include "unity.h"
+void test_SingleDigit(void);
+void test_MultipleDigits(void);
+void test_MaxUnsigned(void);
+void test_Overflow(void);
+void test_IllegalChar(void);
+
void test_SingleDigit(void) {
const char *str = "a"; // 10 decimal
diff --git a/contrib/ntp/tests/libntp/hextolfp.c b/contrib/ntp/tests/libntp/hextolfp.c
index a2f548f56644..bb650a525a01 100644
--- a/contrib/ntp/tests/libntp/hextolfp.c
+++ b/contrib/ntp/tests/libntp/hextolfp.c
@@ -6,58 +6,70 @@
#include "unity.h"
#include "lfptest.h"
+void test_PositiveInteger(void);
+void test_NegativeInteger(void);
+void test_PositiveFraction(void);
+void test_NegativeFraction(void);
+void test_IllegalNumberOfInteger(void);
+void test_IllegalChar(void);
-void test_PositiveInteger(void) {
+
+void
+test_PositiveInteger(void) {
const char *str = "00001000.00000000";
l_fp actual;
- l_fp expected = {4096, 0}; // 16^3, no fraction part.
+ l_fp expected = {{4096}, 0}; /* 16^3, no fraction part. */
TEST_ASSERT_TRUE(hextolfp(str, &actual));
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_NegativeInteger(void) {
- const char *str = "ffffffff.00000000"; // -1 decimal
+void
+test_NegativeInteger(void) {
+ const char *str = "ffffffff.00000000"; /* -1 decimal */
l_fp actual;
- l_fp expected = {-1, 0};
+ l_fp expected = {{-1}, 0};
TEST_ASSERT_TRUE(hextolfp(str, &actual));
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_PositiveFraction(void) {
- const char *str = "00002000.80000000"; // 8196.5 decimal
+void
+test_PositiveFraction(void) {
+ const char *str = "00002000.80000000"; /* 8196.5 decimal */
l_fp actual;
- l_fp expected = {8192, HALF};
+ l_fp expected = {{8192}, HALF};
TEST_ASSERT_TRUE(hextolfp(str, &actual));
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_NegativeFraction(void) {
- const char *str = "ffffffff.40000000"; // -1 + 0.25 decimal
+void
+test_NegativeFraction(void) {
+ const char *str = "ffffffff.40000000"; /* -1 + 0.25 decimal */
l_fp actual;
- l_fp expected = {-1, QUARTER}; //-1 + 0.25
+ l_fp expected = {{-1}, QUARTER}; /* -1 + 0.25 */
TEST_ASSERT_TRUE(hextolfp(str, &actual));
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_IllegalNumberOfInteger(void) {
- const char *str = "1000000.00000000"; // Missing one digit in integral part.
+void
+test_IllegalNumberOfInteger(void) {
+ const char *str = "1000000.00000000"; /* Missing one digit in integral part. */
l_fp actual;
TEST_ASSERT_FALSE(hextolfp(str, &actual));
}
-void test_IllegalChar(void) {
- const char *str = "10000000.0000h000"; // Illegal character h.
+void
+test_IllegalChar(void) {
+ const char *str = "10000000.0000h000"; /* Illegal character h. */
l_fp actual;
TEST_ASSERT_FALSE(hextolfp(str, &actual));
}
-
diff --git a/contrib/ntp/tests/libntp/humandate.c b/contrib/ntp/tests/libntp/humandate.c
index 071fa4159900..3a28f59dc4b0 100644
--- a/contrib/ntp/tests/libntp/humandate.c
+++ b/contrib/ntp/tests/libntp/humandate.c
@@ -5,32 +5,38 @@
#include "unity.h"
-void test_RegularTime(void)
+void test_RegularTime(void);
+void test_CurrentTime(void);
+
+
+void
+test_RegularTime(void)
{
time_t sample = 1276601278;
char expected[15];
+ struct tm* tm;
- struct tm* time;
- time = localtime(&sample);
+ tm = localtime(&sample);
TEST_ASSERT_TRUE(time != NULL);
- snprintf(expected, 15, "%02d:%02d:%02d", time->tm_hour, time->tm_min, time->tm_sec);
+ snprintf(expected, 15, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec);
TEST_ASSERT_EQUAL_STRING(expected, humantime(sample));
}
-void test_CurrentTime(void)
+void
+test_CurrentTime(void)
{
time_t sample;
char expected[15];
+ struct tm* tm;
time(&sample);
- struct tm* time;
- time = localtime(&sample);
+ tm = localtime(&sample);
TEST_ASSERT_TRUE(time != NULL);
- snprintf(expected, 15, "%02d:%02d:%02d", time->tm_hour, time->tm_min, time->tm_sec);
+ snprintf(expected, 15, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec);
TEST_ASSERT_EQUAL_STRING(expected, humantime(sample));
}
diff --git a/contrib/ntp/tests/libntp/lfpfunc.c b/contrib/ntp/tests/libntp/lfpfunc.c
index 188478d10c07..1a13f37a0ae1 100644
--- a/contrib/ntp/tests/libntp/lfpfunc.c
+++ b/contrib/ntp/tests/libntp/lfpfunc.c
@@ -1,7 +1,6 @@
#include "config.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
#include "ntp_fp.h"
#include "unity.h"
@@ -10,82 +9,72 @@
#include <math.h>
-//replaced TEST_ASSERT_EQUAL_MEMORY(&a,&b,sizeof(a)) with TEST_ASSERT_EQUAL_l_fp(a,b). It's safer this way, because structs can be compared even if they aren't initiated with memset (due to padding bytes)
+/* replaced TEST_ASSERT_EQUAL_MEMORY(&a, &b, sizeof(a)) with TEST_ASSERT_EQUAL_l_fp(a, b).
+ It's safer this way, because structs can be compared even if they aren't initiated
+ with memset (due to padding bytes).
+*/
#define TEST_ASSERT_EQUAL_l_fp(a, b) { \
TEST_ASSERT_EQUAL_MESSAGE(a.l_i, b.l_i, "Field l_i"); \
TEST_ASSERT_EQUAL_UINT_MESSAGE(a.l_uf, b.l_uf, "Field l_uf"); \
}
-typedef struct {
- uint32_t h, l;
-} lfp_hl;
-
-
-static int cmp_work(u_int32 a[3], u_int32 b[3]);
-
-/*
-//----------------------------------------------------------------------
-// OO-wrapper for 'l_fp'
-//----------------------------------------------------------------------
-
-
- ~LFP();
- LFP();
- LFP(const LFP& rhs);
- LFP(int32 i, u_int32 f);
- LFP operator+ (const LFP &rhs) const;
- LFP& operator+=(const LFP &rhs);
- LFP operator- (const LFP &rhs) const;
- LFP& operator-=(const LFP &rhs);
+typedef int bool; // typedef enum { FALSE, TRUE } boolean; -> can't use this because TRUE and FALSE are already defined
- LFP& operator=(const LFP &rhs);
- LFP operator-() const;
- bool operator==(const LFP &rhs) const;
+typedef struct {
+ uint32_t h, l;
+} lfp_hl;
- LFP neg() const;
- LFP abs() const;
- int signum() const;
-
+int l_fp_scmp(const l_fp first, const l_fp second);
+int l_fp_ucmp(const l_fp first, l_fp second );
+l_fp l_fp_init(int32 i, u_int32 f);
+l_fp l_fp_add(const l_fp first, const l_fp second);
+l_fp l_fp_subtract(const l_fp first, const l_fp second);
+l_fp l_fp_negate(const l_fp first);
+l_fp l_fp_abs(const l_fp first);
+int l_fp_signum(const l_fp first);
+double l_fp_convert_to_double(const l_fp first);
+l_fp l_fp_init_from_double( double rhs);
+void l_fp_swap(l_fp * first, l_fp *second);
+bool l_isgt(const l_fp first, const l_fp second);
+bool l_isgtu(const l_fp first, const l_fp second);
+bool l_ishis(const l_fp first, const l_fp second);
+bool l_isgeq(const l_fp first, const l_fp second);
+bool l_isequ(const l_fp first, const l_fp second);
+double eps(double d);
+
+
+void test_AdditionLR(void);
+void test_AdditionRL(void);
+void test_SubtractionLR(void);
+void test_SubtractionRL(void);
+void test_Negation(void);
+void test_Absolute(void);
+void test_FDF_RoundTrip(void);
+void test_SignedRelOps(void);
+void test_UnsignedRelOps(void);
- int ucmp(const LFP & rhs) const;
- int scmp(const LFP & rhs) const;
-
- std::string toString() const;
- std::ostream& toStream(std::ostream &oo) const;
-
- operator double() const;
- explicit LFP(double);
-
- LFP(const l_fp &rhs);
- static int cmp_work(u_int32 a[3], u_int32 b[3]);
-
- l_fp _v;
+static int cmp_work(u_int32 a[3], u_int32 b[3]);
-
-static std::ostream& operator<<(std::ostream &oo, const LFP& rhs)
-{
- return rhs.toStream(oo);
-}
-*/
//----------------------------------------------------------------------
// reference comparision
// This is implementad as a full signed MP-subtract in 3 limbs, where
// the operands are zero or sign extended before the subtraction is
// executed.
//----------------------------------------------------------------------
-int l_fp_scmp(const l_fp first, const l_fp second)
+
+int
+l_fp_scmp(const l_fp first, const l_fp second)
{
u_int32 a[3], b[3];
const l_fp op1 = first;
const l_fp op2 = second;
- //const l_fp &op1(_v), &op2(rhs._v);
a[0] = op1.l_uf; a[1] = op1.l_ui; a[2] = 0;
b[0] = op2.l_uf; b[1] = op2.l_ui; b[2] = 0;
@@ -96,7 +85,8 @@ int l_fp_scmp(const l_fp first, const l_fp second)
return cmp_work(a,b);
}
-int l_fp_ucmp(const l_fp first, l_fp second )
+int
+l_fp_ucmp(const l_fp first, l_fp second )
{
u_int32 a[3], b[3];
const l_fp op1 = first;
@@ -108,9 +98,9 @@ int l_fp_ucmp(const l_fp first, l_fp second )
return cmp_work(a,b);
}
-
-//maybe rename it to lf_cmp_work ???
-int cmp_work(u_int32 a[3], u_int32 b[3])
+// maybe rename it to lf_cmp_work
+int
+cmp_work(u_int32 a[3], u_int32 b[3])
{
u_int32 cy, idx, tmp;
for (cy = idx = 0; idx < 3; ++idx) {
@@ -128,9 +118,8 @@ int cmp_work(u_int32 a[3], u_int32 b[3])
// This should be easy enough...
//----------------------------------------------------------------------
-
-
-l_fp l_fp_init(int32 i, u_int32 f)
+l_fp
+l_fp_init(int32 i, u_int32 f)
{
l_fp temp;
temp.l_i = i;
@@ -139,35 +128,35 @@ l_fp l_fp_init(int32 i, u_int32 f)
return temp;
}
-
-
-l_fp l_fp_add(const l_fp first, const l_fp second)
+l_fp
+l_fp_add(const l_fp first, const l_fp second)
{
- l_fp temp;
- temp = first;
+ l_fp temp = first;
L_ADD(&temp, &second);
+
return temp;
}
-l_fp l_fp_subtract(const l_fp first, const l_fp second)
+l_fp
+l_fp_subtract(const l_fp first, const l_fp second)
{
- l_fp temp;
- temp = first;
+ l_fp temp = first;
L_SUB(&temp, &second);
return temp;
}
-l_fp l_fp_negate(const l_fp first)
+l_fp
+l_fp_negate(const l_fp first)
{
- l_fp temp;
- temp = first; //is this line really necessary?
+ l_fp temp = first;
L_NEG(&temp);
return temp;
}
-l_fp l_fp_abs(const l_fp first)
+l_fp
+l_fp_abs(const l_fp first)
{
l_fp temp = first;
if (L_ISNEG(&temp))
@@ -175,74 +164,38 @@ l_fp l_fp_abs(const l_fp first)
return temp;
}
-int l_fp_signum(const l_fp first)
+int
+l_fp_signum(const l_fp first)
{
if (first.l_ui & 0x80000000u)
return -1;
return (first.l_ui || first.l_uf);
}
-double l_fp_convert_to_double(const l_fp first)
+double
+l_fp_convert_to_double(const l_fp first)
{
double res;
LFPTOD(&first, res);
return res;
}
-l_fp l_fp_init_from_double( double rhs)
+l_fp
+l_fp_init_from_double( double rhs)
{
l_fp temp;
DTOLFP(rhs, &temp);
return temp;
}
-
-
-void l_fp_swap(l_fp * first, l_fp *second){
+void
+l_fp_swap(l_fp * first, l_fp *second){
l_fp temp = *second;
*second = *first;
*first = temp;
-
-}
-
-
-/*
-LFP::LFP()
-{
- _v.l_ui = 0;
- _v.l_uf = 0;
-}
-
-
-
-std::string
-LFP::toString() const
-{
- std::ostringstream oss;
- toStream(oss);
- return oss.str();
-}
-
-std::ostream&
-LFP::toStream(std::ostream &os) const
-{
- return os
- << mfptoa(_v.l_ui, _v.l_uf, 9)
- << " [$" << std::setw(8) << std::setfill('0') << std::hex << _v.l_ui
- << ':' << std::setw(8) << std::setfill('0') << std::hex << _v.l_uf
- << ']';
}
-bool LFP::operator==(const LFP &rhs) const
-{
- return L_ISEQU(&_v, &rhs._v);
-}
-
-
-
-*/
-
//----------------------------------------------------------------------
// testing the relational macros works better with proper predicate
// formatting functions; it slows down the tests a bit, but makes for
@@ -250,19 +203,30 @@ bool LFP::operator==(const LFP &rhs) const
//----------------------------------------------------------------------
-typedef int bool; //typedef enum { FALSE, TRUE } boolean; -> can't use this because TRUE and FALSE are already defined
+bool
+l_isgt (const l_fp first, const l_fp second) {
+ return L_ISGT(&first, &second);
+}
+
+bool
+l_isgtu(const l_fp first, const l_fp second) {
+ return L_ISGTU(&first, &second);
+}
+
+bool
+l_ishis(const l_fp first, const l_fp second) {
+ return L_ISHIS(&first, &second);
+}
+bool
+l_isgeq(const l_fp first, const l_fp second) {
+ return L_ISGEQ(&first, &second);
+}
-bool l_isgt (const l_fp first, const l_fp second)
- { return L_ISGT(&first, &second); }
-bool l_isgtu(const l_fp first, const l_fp second)
- { return L_ISGTU(&first, &second); }
-bool l_ishis(const l_fp first, const l_fp second)
- { return L_ISHIS(&first, &second); }
-bool l_isgeq(const l_fp first, const l_fp second)
- { return L_ISGEQ(&first, &second); }
-bool l_isequ(const l_fp first, const l_fp second)
- { return L_ISEQU(&first, &second); }
+bool
+l_isequ(const l_fp first, const l_fp second) {
+ return L_ISEQU(&first, &second);
+}
//----------------------------------------------------------------------
@@ -308,46 +272,39 @@ static const size_t addsub_tot = (sizeof(addsub_tab)/sizeof(addsub_tab[0][0]));
// '1'-bit of the l_fp value, the roundtrip *will* create truncation
// errors. This is an inherent property caused by the 54-bit mantissa of
// the 'double' type.
-double eps(double d)
+double
+eps(double d)
{
- return fmax(ldexp(1.0, -31), ldexp(fabs(d), -53)); //max<double>
+ return fmax(ldexp(1.0, -31), ldexp(fabs(d), -53));
}
-
-
//----------------------------------------------------------------------
// test addition
//----------------------------------------------------------------------
-void test_AdditionLR() {
+void
+test_AdditionLR(void) {
- size_t idx=0;
- for (idx=0; idx < addsub_cnt; ++idx) {
-
-
+ size_t idx = 0;
+ for (idx = 0; idx < addsub_cnt; ++idx) {
l_fp op1 = l_fp_init(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
- //LFP op1(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
l_fp op2 = l_fp_init(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
- //LFP exp(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
l_fp exp = l_fp_init(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
- //LFP res(op1 + op2);
- l_fp res = l_fp_add(op1,op2);
+ l_fp res = l_fp_add(op1, op2);
- TEST_ASSERT_EQUAL_l_fp(exp,res);
- //TEST_ASSERT_EQUAL_MEMORY(&exp, &res,sizeof(exp));
+ TEST_ASSERT_EQUAL_l_fp(exp, res);
}
}
-void test_AdditionRL() {
-
- size_t idx=0;
- for (idx=0; idx < addsub_cnt; ++idx) {
+void
+test_AdditionRL(void) {
+ size_t idx = 0;
+ for (idx = 0; idx < addsub_cnt; ++idx) {
l_fp op2 = l_fp_init(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
l_fp op1 = l_fp_init(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
l_fp exp = l_fp_init(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
- l_fp res = l_fp_add(op1,op2);
+ l_fp res = l_fp_add(op1, op2);
- TEST_ASSERT_EQUAL_l_fp(exp,res);
- //TEST_ASSERT_EQUAL_MEMORY(&exp, &res,sizeof(exp));
+ TEST_ASSERT_EQUAL_l_fp(exp, res);
}
}
@@ -356,32 +313,29 @@ void test_AdditionRL() {
//----------------------------------------------------------------------
// test subtraction
//----------------------------------------------------------------------
-void test_SubtractionLR() {
-
- size_t idx=0;
- for (idx=0; idx < addsub_cnt; ++idx) {
+void
+test_SubtractionLR(void) {
+ size_t idx = 0;
+ for (idx = 0; idx < addsub_cnt; ++idx) {
l_fp op2 = l_fp_init(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
l_fp exp = l_fp_init(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
l_fp op1 = l_fp_init(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
- l_fp res = l_fp_subtract(op1,op2);
- //LFP res(op1 - op2);
+ l_fp res = l_fp_subtract(op1, op2);
- TEST_ASSERT_EQUAL_l_fp(exp,res);
- //TEST_ASSERT_EQUAL_MEMORY(&exp, &res,sizeof(exp));
+ TEST_ASSERT_EQUAL_l_fp(exp, res);
}
}
-void test_SubtractionRL() {
-
- size_t idx=0;
- for (idx=0; idx < addsub_cnt; ++idx) {
+void
+test_SubtractionRL(void) {
+ size_t idx = 0;
+ for (idx = 0; idx < addsub_cnt; ++idx) {
l_fp exp = l_fp_init(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
l_fp op2 = l_fp_init(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
l_fp op1 = l_fp_init(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
- l_fp res = l_fp_subtract(op1,op2);
+ l_fp res = l_fp_subtract(op1, op2);
- TEST_ASSERT_EQUAL_l_fp(exp,res);
- //TEST_ASSERT_EQUAL_MEMORY(&exp, &res,sizeof(exp));
+ TEST_ASSERT_EQUAL_l_fp(exp, res);
}
}
@@ -389,19 +343,18 @@ void test_SubtractionRL() {
// test negation
//----------------------------------------------------------------------
-void test_Negation() {
+void
+test_Negation(void) {
- size_t idx=0;
- for (idx=0; idx < addsub_cnt; ++idx) {
+ size_t idx = 0;
+ for (idx = 0; idx < addsub_cnt; ++idx) {
l_fp op1 = l_fp_init(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
l_fp op2 = l_fp_negate(op1);
l_fp sum = l_fp_add(op1, op2);
- l_fp zero = l_fp_init(0,0);
+ l_fp zero = l_fp_init(0, 0);
- TEST_ASSERT_EQUAL_l_fp(zero,sum);
- //TEST_ASSERT_EQUAL_MEMORY(&zero, &sum,sizeof(sum));
-
+ TEST_ASSERT_EQUAL_l_fp(zero, sum);
}
}
@@ -410,24 +363,23 @@ void test_Negation() {
//----------------------------------------------------------------------
// test absolute value
//----------------------------------------------------------------------
-void test_Absolute() {
- size_t idx=0;
- for (idx=0; idx < addsub_cnt; ++idx) {
+void
+test_Absolute(void) {
+ size_t idx = 0;
+ for (idx = 0; idx < addsub_cnt; ++idx) {
l_fp op1 = l_fp_init(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
l_fp op2 = l_fp_abs(op1);
TEST_ASSERT_TRUE(l_fp_signum(op2) >= 0);
if (l_fp_signum(op1) >= 0)
- op1 = l_fp_subtract(op1,op2); //op1 -= op2;
-
+ op1 = l_fp_subtract(op1, op2);
else
- op1 = l_fp_add(op1,op2);
+ op1 = l_fp_add(op1, op2);
- l_fp zero = l_fp_init(0,0);
+ l_fp zero = l_fp_init(0, 0);
- TEST_ASSERT_EQUAL_l_fp(zero,op1);
- //TEST_ASSERT_EQUAL_MEMORY(&zero, &op1,sizeof(op1));
+ TEST_ASSERT_EQUAL_l_fp(zero, op1);
}
// There is one special case we have to check: the minimum
@@ -437,36 +389,30 @@ void test_Absolute() {
l_fp minAbs = l_fp_abs(minVal);
TEST_ASSERT_EQUAL(-1, l_fp_signum(minVal));
- TEST_ASSERT_EQUAL_l_fp(minVal,minAbs);
- //TEST_ASSERT_EQUAL_MEMORY(&minVal, &minAbs,sizeof(minAbs));
+ TEST_ASSERT_EQUAL_l_fp(minVal, minAbs);
}
//----------------------------------------------------------------------
// fp -> double -> fp rountrip test
//----------------------------------------------------------------------
-void test_FDF_RoundTrip() {
+void
+test_FDF_RoundTrip(void) {
// since a l_fp has 64 bits in it's mantissa and a double has
// only 54 bits available (including the hidden '1') we have to
// make a few concessions on the roundtrip precision. The 'eps()'
// function makes an educated guess about the avilable precision
// and checks the difference in the two 'l_fp' values against
// that limit.
- size_t idx=0;
- for (idx=0; idx < addsub_cnt; ++idx) {
+ size_t idx = 0;
+ for (idx = 0; idx < addsub_cnt; ++idx) {
l_fp op1 = l_fp_init(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
double op2 = l_fp_convert_to_double(op1);
l_fp op3 = l_fp_init_from_double(op2);
- // for manual checks only:
- // std::cout << std::setprecision(16) << op2 << std::endl;
-
- l_fp temp = l_fp_subtract(op1,op3);
+ l_fp temp = l_fp_subtract(op1, op3);
double d = l_fp_convert_to_double(temp);
- TEST_ASSERT_DOUBLE_WITHIN(eps(op2),0.0, fabs(d)); //delta,epected,actual
-
- //ASSERT_LE(fabs(op1-op3), eps(op2)); //unity has no equivalent of LE!!!
- //you could use TEST_ASSERT_TRUE(IsLE(fabs(op1-op3), eps(op2)));
+ TEST_ASSERT_DOUBLE_WITHIN(eps(op2), 0.0, fabs(d));
}
}
@@ -477,56 +423,54 @@ void test_FDF_RoundTrip() {
// This uses the local compare and checks if the operations using the
// macros in 'ntp_fp.h' produce mathing results.
// ----------------------------------------------------------------------
-void test_SignedRelOps() {
- //const lfp_hl * tv(&addsub_tab[0][0]);
+void
+test_SignedRelOps(void) {
const lfp_hl * tv = (&addsub_tab[0][0]);
size_t lc ;
- for (lc=addsub_tot-1; lc; --lc,++tv) {
- l_fp op1 = l_fp_init(tv[0].h,tv[0].l);
- l_fp op2 = l_fp_init(tv[1].h,tv[1].l);
- //int cmp(op1.scmp(op2));
- int cmp = l_fp_scmp(op1,op2);
+ for (lc = addsub_tot - 1; lc; --lc, ++tv) {
+ l_fp op1 = l_fp_init(tv[0].h, tv[0].l);
+ l_fp op2 = l_fp_init(tv[1].h, tv[1].l);
+ int cmp = l_fp_scmp(op1, op2);
switch (cmp) {
case -1:
//printf("op1:%d %d, op2:%d %d\n",op1.l_uf,op1.l_ui,op2.l_uf,op2.l_ui);
- //std::swap(op1, op2);
- l_fp_swap(&op1,&op2);
+ l_fp_swap(&op1, &op2);
//printf("op1:%d %d, op2:%d %d\n",op1.l_uf,op1.l_ui,op2.l_uf,op2.l_ui);
case 1:
- TEST_ASSERT_TRUE (l_isgt(op1,op2));
- TEST_ASSERT_FALSE(l_isgt(op2,op1));
+ TEST_ASSERT_TRUE (l_isgt(op1, op2));
+ TEST_ASSERT_FALSE(l_isgt(op2, op1));
- TEST_ASSERT_TRUE (l_isgeq(op1,op2));
- TEST_ASSERT_FALSE(l_isgeq(op2,op1));
+ TEST_ASSERT_TRUE (l_isgeq(op1, op2));
+ TEST_ASSERT_FALSE(l_isgeq(op2, op1));
- TEST_ASSERT_FALSE(l_isequ(op1,op2));
- TEST_ASSERT_FALSE(l_isequ(op2,op1));
+ TEST_ASSERT_FALSE(l_isequ(op1, op2));
+ TEST_ASSERT_FALSE(l_isequ(op2, op1));
break;
case 0:
- TEST_ASSERT_FALSE(l_isgt(op1,op2));
- TEST_ASSERT_FALSE(l_isgt(op2,op1));
+ TEST_ASSERT_FALSE(l_isgt(op1, op2));
+ TEST_ASSERT_FALSE(l_isgt(op2, op1));
- TEST_ASSERT_TRUE (l_isgeq(op1,op2));
- TEST_ASSERT_TRUE (l_isgeq(op2,op1));
+ TEST_ASSERT_TRUE (l_isgeq(op1, op2));
+ TEST_ASSERT_TRUE (l_isgeq(op2, op1));
- TEST_ASSERT_TRUE (l_isequ(op1,op2));
- TEST_ASSERT_TRUE (l_isequ(op2,op1));
+ TEST_ASSERT_TRUE (l_isequ(op1, op2));
+ TEST_ASSERT_TRUE (l_isequ(op2, op1));
break;
default:
TEST_FAIL_MESSAGE("unexpected UCMP result: " );
- //TEST_ASSERT_FAIL() << "unexpected SCMP result: " << cmp;
}
}
}
-void test_UnsignedRelOps() {
+void
+test_UnsignedRelOps(void) {
const lfp_hl * tv =(&addsub_tab[0][0]);
size_t lc;
- for (lc=addsub_tot-1; lc; --lc,++tv) {
- l_fp op1 = l_fp_init(tv[0].h,tv[0].l);
- l_fp op2 = l_fp_init(tv[1].h,tv[1].l);
- int cmp = l_fp_ucmp(op1,op2);
+ for (lc = addsub_tot - 1; lc; --lc, ++tv) {
+ l_fp op1 = l_fp_init(tv[0].h, tv[0].l);
+ l_fp op2 = l_fp_init(tv[1].h, tv[1].l);
+ int cmp = l_fp_ucmp(op1, op2);
switch (cmp) {
case -1:
@@ -534,22 +478,21 @@ void test_UnsignedRelOps() {
l_fp_swap(&op1, &op2);
//printf("op1:%d %d, op2:%d %d\n",op1.l_uf,op1.l_ui,op2.l_uf,op2.l_ui);
case 1:
- TEST_ASSERT_TRUE (l_isgtu(op1,op2));
- TEST_ASSERT_FALSE(l_isgtu(op2,op1));
+ TEST_ASSERT_TRUE (l_isgtu(op1, op2));
+ TEST_ASSERT_FALSE(l_isgtu(op2, op1));
- TEST_ASSERT_TRUE (l_ishis(op1,op2));
- TEST_ASSERT_FALSE(l_ishis(op2,op1));
+ TEST_ASSERT_TRUE (l_ishis(op1, op2));
+ TEST_ASSERT_FALSE(l_ishis(op2, op1));
break;
case 0:
- TEST_ASSERT_FALSE(l_isgtu(op1,op2));
- TEST_ASSERT_FALSE(l_isgtu(op2,op1));
+ TEST_ASSERT_FALSE(l_isgtu(op1, op2));
+ TEST_ASSERT_FALSE(l_isgtu(op2, op1));
- TEST_ASSERT_TRUE (l_ishis(op1,op2));
- TEST_ASSERT_TRUE (l_ishis(op2,op1));
+ TEST_ASSERT_TRUE (l_ishis(op1, op2));
+ TEST_ASSERT_TRUE (l_ishis(op2, op1));
break;
default:
TEST_FAIL_MESSAGE("unexpected UCMP result: " );
- //FAIL() << "unexpected UCMP result: " << cmp;
}
}
}
diff --git a/contrib/ntp/tests/libntp/lfptest.c b/contrib/ntp/tests/libntp/lfptest.c
new file mode 100644
index 000000000000..7b4dccf99f1f
--- /dev/null
+++ b/contrib/ntp/tests/libntp/lfptest.c
@@ -0,0 +1,11 @@
+#include "config.h"
+#include "ntp_fp.h"
+#include "lfptest.h"
+
+int IsEqual(const l_fp expected, const l_fp actual) {
+ if (L_ISEQU(&expected, &actual)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
diff --git a/contrib/ntp/tests/libntp/lfptest.h b/contrib/ntp/tests/libntp/lfptest.h
index 7949821a2063..30a85f5b3f56 100644
--- a/contrib/ntp/tests/libntp/lfptest.h
+++ b/contrib/ntp/tests/libntp/lfptest.h
@@ -1,23 +1,9 @@
#ifndef NTP_TESTS_LFPTEST_H
#define NTP_TESTS_LFPTEST_H
+#include "config.h"
#include "ntp_fp.h"
-int IsEqual(const l_fp expected, const l_fp actual) {
- if (L_ISEQU(&expected, &actual)) {
- return TRUE;
- } else {
- //printf(" expected: ...");
- /*
- << " expected: " << lfptoa(&expected, FRACTION_PREC)
- << " (" << expected.l_ui << "." << expected.l_uf << ")"
- << " but was: " << lfptoa(&actual, FRACTION_PREC)
- << " (" << actual.l_ui << "." << actual.l_uf << ")";
- */
- return FALSE;
- }
-
-}
static const int32 HALF = -2147483647L - 1L;
static const int32 HALF_PROMILLE_UP = 2147484; // slightly more than 0.0005
@@ -25,6 +11,6 @@ static const int32 HALF_PROMILLE_DOWN = 2147483; // slightly less than 0.0005
static const int32 QUARTER = 1073741824L;
static const int32 QUARTER_PROMILLE_APPRX = 1073742L;
-#endif
-
+int IsEqual(const l_fp expected, const l_fp actual);
+#endif
diff --git a/contrib/ntp/tests/libntp/lfptostr.c b/contrib/ntp/tests/libntp/lfptostr.c
index c76e07fb0ed8..142e6c772ebb 100644
--- a/contrib/ntp/tests/libntp/lfptostr.c
+++ b/contrib/ntp/tests/libntp/lfptostr.c
@@ -6,7 +6,6 @@
#include "config.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
#include "ntp_fp.h"
#include "unity.h"
@@ -14,70 +13,94 @@
static const int LFP_MAX_PRECISION = 10;
static const int LFP_MAX_PRECISION_MS = 7;
-static const int ONE_FOURTH = 1073741824; // (1 << 30)
+static const int ONE_FOURTH = 1073741824; /* (1 << 30) */
static const int HALF = (1 << 31);
static const int THREE_FOURTH = -1073741824;
-static const int HALF_PROMILLE_UP = 2147484; // slightly more than 0.0005
-static const int HALF_PROMILLE_DOWN = 2147483; // slightly less than 0.0005
+static const int HALF_PROMILLE_UP = 2147484; /* slightly more than 0.0005 */
+static const int HALF_PROMILLE_DOWN = 2147483; /* slightly less than 0.0005 */
-void test_PositiveInteger(void) {
- l_fp test = {200, 0}; // exact 200.0000000000
+
+void test_PositiveInteger(void);
+void test_NegativeInteger(void);
+void test_PositiveIntegerWithFraction(void);
+void test_NegativeIntegerWithFraction(void);
+void test_RoundingDownToInteger(void);
+void test_RoundingMiddleToInteger(void);
+void test_RoundingUpToInteger(void);
+void test_SingleDecimal(void);
+void test_MillisecondsRoundingUp(void);
+void test_MillisecondsRoundingDown(void);
+void test_UnsignedInteger(void);
+
+
+
+void
+test_PositiveInteger(void) {
+ l_fp test = {{200}, 0}; /* exact 200.0000000000 */
TEST_ASSERT_EQUAL_STRING("200.0000000000", mfptoa(test.l_ui, test.l_uf, LFP_MAX_PRECISION));
TEST_ASSERT_EQUAL_STRING("200000.0000000", mfptoms(test.l_ui, test.l_uf, LFP_MAX_PRECISION_MS));
}
-void test_NegativeInteger(void) {
- l_fp test = {-100, 0}; // -100
+void
+test_NegativeInteger(void) {
+ l_fp test = {{-100}, 0}; /* -100 */
TEST_ASSERT_EQUAL_STRING("-100.0000000000", lfptoa(&test, LFP_MAX_PRECISION));
TEST_ASSERT_EQUAL_STRING("-100000.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS));
}
-void test_PositiveIntegerWithFraction(void) {
- l_fp test = {200, ONE_FOURTH}; // 200.25
+void
+test_PositiveIntegerWithFraction(void) {
+ l_fp test = {{200}, ONE_FOURTH}; /* 200.25 */
TEST_ASSERT_EQUAL_STRING("200.2500000000", lfptoa(&test, LFP_MAX_PRECISION));
TEST_ASSERT_EQUAL_STRING("200250.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS));
}
-void test_NegativeIntegerWithFraction(void) {
- l_fp test = {-100, ONE_FOURTH}; // -99.75
+void
+test_NegativeIntegerWithFraction(void) {
+ l_fp test = {{-100}, ONE_FOURTH}; /* -99.75 */
TEST_ASSERT_EQUAL_STRING("-99.7500000000", lfptoa(&test, LFP_MAX_PRECISION));
TEST_ASSERT_EQUAL_STRING("-99750.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS));
}
-void test_RoundingDownToInteger(void) {
- l_fp test = {10, ONE_FOURTH}; // 10.25
+void
+test_RoundingDownToInteger(void) {
+ l_fp test = {{10}, ONE_FOURTH}; /* 10.25 */
TEST_ASSERT_EQUAL_STRING("10", lfptoa(&test, 0));
TEST_ASSERT_EQUAL_STRING("10250", lfptoms(&test, 0));
}
-void test_RoundingMiddleToInteger(void) {
- l_fp test = {10, HALF}; // 10.5
+void
+test_RoundingMiddleToInteger(void) {
+ l_fp test = {{10}, HALF}; /* 10.5 */
TEST_ASSERT_EQUAL_STRING("11", lfptoa(&test, 0));
TEST_ASSERT_EQUAL_STRING("10500", lfptoms(&test, 0));
}
-void test_RoundingUpToInteger(void) {
- l_fp test = {5, THREE_FOURTH}; // 5.75
+void
+test_RoundingUpToInteger(void) {
+ l_fp test = {{5}, THREE_FOURTH}; /* 5.75 */
TEST_ASSERT_EQUAL_STRING("6", lfptoa(&test, 0));
TEST_ASSERT_EQUAL_STRING("5750", lfptoms(&test, 0));
}
-void test_SingleDecimal(void) {
- l_fp test = {8, ONE_FOURTH}; // 8.25
+void
+test_SingleDecimal(void) {
+ l_fp test = {{8}, ONE_FOURTH}; /* 8.25 */
TEST_ASSERT_EQUAL_STRING("8.3", lfptoa(&test, 1));
TEST_ASSERT_EQUAL_STRING("8250.0", lfptoms(&test, 1));
}
-void test_MillisecondsRoundingUp(void) {
- l_fp test = {1, HALF_PROMILLE_UP}; //slightly more than 1.0005
+void
+test_MillisecondsRoundingUp(void) {
+ l_fp test = {{1}, HALF_PROMILLE_UP}; /* slightly more than 1.0005 */
TEST_ASSERT_EQUAL_STRING("1.0", lfptoa(&test, 1));
@@ -85,8 +108,9 @@ void test_MillisecondsRoundingUp(void) {
TEST_ASSERT_EQUAL_STRING("1001", lfptoms(&test, 0));
}
-void test_MillisecondsRoundingDown(void) {
- l_fp test = {1, HALF_PROMILLE_DOWN}; // slightly less than 1.0005
+void
+test_MillisecondsRoundingDown(void) {
+ l_fp test = {{1}, HALF_PROMILLE_DOWN}; /* slightly less than 1.0005 */
TEST_ASSERT_EQUAL_STRING("1.0", lfptoa(&test, 1));
@@ -95,9 +119,7 @@ void test_MillisecondsRoundingDown(void) {
}
void test_UnsignedInteger(void) {
- l_fp test = {3000000000UL, 0};
+ l_fp test = {{3000000000UL}, 0};
TEST_ASSERT_EQUAL_STRING("3000000000.0", ulfptoa(&test, 1));
}
-
-
diff --git a/contrib/ntp/tests/libntp/modetoa.c b/contrib/ntp/tests/libntp/modetoa.c
index 19a76d5851ed..267b44e010a7 100644
--- a/contrib/ntp/tests/libntp/modetoa.c
+++ b/contrib/ntp/tests/libntp/modetoa.c
@@ -1,20 +1,23 @@
#include "config.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
#include "unity.h"
+void test_KnownMode(void);
+void test_UnknownMode(void);
-void test_KnownMode(void) {
+
+void
+test_KnownMode(void) {
const int MODE = 3; // Should be "client"
- TEST_ASSERT_EQUAL_STRING("client", modetoa(MODE));
+ TEST_ASSERT_EQUAL_STRING("client", modetoa(MODE));
}
-void test_UnknownMode(void) {
+void
+test_UnknownMode(void) {
const int MODE = 100;
TEST_ASSERT_EQUAL_STRING("mode#100", modetoa(MODE));
-// EXPECT_STREQ("mode#100", modetoa(MODE));
}
diff --git a/contrib/ntp/tests/libntp/msyslog.c b/contrib/ntp/tests/libntp/msyslog.c
index 23ec40110557..dec8d8592698 100644
--- a/contrib/ntp/tests/libntp/msyslog.c
+++ b/contrib/ntp/tests/libntp/msyslog.c
@@ -6,12 +6,22 @@
#ifndef VSNPRINTF_PERCENT_M
// format_errmsg() is normally private to msyslog.c
-void format_errmsg (char *, size_t, const char *, int);
+void format_errmsg(char *, size_t, const char *, int);
#endif
+void test_msnprintf(void);
+void test_msnprintfLiteralPercentm(void);
+void test_msnprintfBackslashLiteralPercentm(void);
+void test_msnprintfBackslashPercent(void);
+void test_msnprintfHangingPercent(void);
+void test_format_errmsgHangingPercent(void);
+void test_msnprintfNullTarget(void);
+void test_msnprintfTruncate(void);
-void test_msnprintf(void) {
+
+void
+test_msnprintf(void) {
#define FMT_PREFIX "msyslog.cpp ENOENT: "
char exp_buf[512];
char act_buf[512];
@@ -22,6 +32,7 @@ void test_msnprintf(void) {
strerror(ENOENT));
errno = ENOENT;
act_cnt = msnprintf(act_buf, sizeof(act_buf), FMT_PREFIX "%m");
+
TEST_ASSERT_EQUAL(exp_cnt, act_cnt);
TEST_ASSERT_EQUAL_STRING(exp_buf, act_buf);
}
@@ -37,6 +48,7 @@ test_msnprintfLiteralPercentm(void)
exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "%%m");
errno = ENOENT;
act_cnt = msnprintf(act_buf, sizeof(act_buf), "%%m");
+
TEST_ASSERT_EQUAL(exp_cnt, act_cnt);
TEST_ASSERT_EQUAL_STRING(exp_buf, act_buf);
}
@@ -51,6 +63,7 @@ test_msnprintfBackslashLiteralPercentm(void) {
exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "\%%m");
errno = ENOENT;
act_cnt = msnprintf(act_buf, sizeof(act_buf), "\%%m");
+
TEST_ASSERT_EQUAL(exp_cnt, act_cnt);
TEST_ASSERT_EQUAL_STRING(exp_buf, act_buf);
}
@@ -66,6 +79,7 @@ test_msnprintfBackslashPercent(void) {
strerror(ENOENT));
errno = ENOENT;
act_cnt = msnprintf(act_buf, sizeof(act_buf), "\%m");
+
TEST_ASSERT_EQUAL(exp_cnt, act_cnt);
TEST_ASSERT_EQUAL_STRING(exp_buf, act_buf);
}
@@ -82,6 +96,7 @@ test_msnprintfHangingPercent(void) {
ZERO(act_buf);
exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "%s", fmt);
act_cnt = msnprintf(act_buf, sizeof(act_buf), "%s", fmt);
+
TEST_ASSERT_EQUAL(exp_cnt, act_cnt);
TEST_ASSERT_EQUAL_STRING(exp_buf, act_buf);
TEST_ASSERT_EQUAL_STRING("", act_buf + 1 + strlen(act_buf));
@@ -95,6 +110,7 @@ test_format_errmsgHangingPercent(void) {
ZERO(act_buf);
format_errmsg(act_buf, sizeof(act_buf), fmt, ENOENT);
+
TEST_ASSERT_EQUAL_STRING(fmt, act_buf);
TEST_ASSERT_EQUAL_STRING("", act_buf + 1 + strlen(act_buf));
#else
@@ -110,6 +126,7 @@ test_msnprintfNullTarget(void) {
exp_cnt = snprintf(NULL, 0, "%d", 123);
errno = ENOENT;
act_cnt = msnprintf(NULL, 0, "%d", 123);
+
TEST_ASSERT_EQUAL(exp_cnt, act_cnt);
}
@@ -126,6 +143,7 @@ test_msnprintfTruncate(void) {
exp_cnt = snprintf(exp_buf, 3, "%s", strerror(ENOENT));
errno = ENOENT;
act_cnt = msnprintf(act_buf, 3, "%m");
+
TEST_ASSERT_EQUAL('\0', exp_buf[2]);
TEST_ASSERT_EQUAL('\0', act_buf[2]);
TEST_ASSERT_TRUE(act_cnt > 0);
diff --git a/contrib/ntp/tests/libntp/netof.c b/contrib/ntp/tests/libntp/netof.c
index 010b16429365..2fde6cc2e448 100644
--- a/contrib/ntp/tests/libntp/netof.c
+++ b/contrib/ntp/tests/libntp/netof.c
@@ -7,6 +7,14 @@
#include "sockaddrtest.h"
+
+void test_ClassBAddress(void);
+void test_ClassCAddress(void);
+void test_ClassAAddress(void);
+void test_IPv6Address(void);
+
+
+
void test_ClassBAddress(void) {
sockaddr_u input = CreateSockaddr4("172.16.2.1", NTP_PORT);
sockaddr_u expected = CreateSockaddr4("172.16.0.0", NTP_PORT);
diff --git a/contrib/ntp/tests/libntp/numtoa.c b/contrib/ntp/tests/libntp/numtoa.c
index 1d01c7843856..5c7a663f4a21 100644
--- a/contrib/ntp/tests/libntp/numtoa.c
+++ b/contrib/ntp/tests/libntp/numtoa.c
@@ -1,31 +1,25 @@
#include "config.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
#include "ntp_fp.h"
#include "unity.h"
+void test_Address(void);
+void test_Netmask(void);
-void setUp(void)
-{
-}
+void
+test_Address(void) {
+ const u_int32 input = htonl(3221225472UL + 512UL + 1UL); // 192.0.2.1
-void tearDown(void)
-{
+ TEST_ASSERT_EQUAL_STRING("192.0.2.1", numtoa(input));
}
-void test_Address(void) {
- u_int32 input = htonl(3221225472UL+512UL+1UL); // 192.0.2.1
+void
+test_Netmask(void) {
+ // 255.255.255.0
+ const u_int32 hostOrder = 255UL*256UL*256UL*256UL + 255UL*256UL*256UL + 255UL*256UL;
+ const u_int32 input = htonl(hostOrder);
- TEST_ASSERT_EQUAL_STRING("192.0.2.1", numtoa(input));
+ TEST_ASSERT_EQUAL_STRING("255.255.255.0", numtoa(input));
}
-
-void test_Netmask(void) {
- // 255.255.255.0
- u_int32 hostOrder = 255UL*256UL*256UL*256UL + 255UL*256UL*256UL + 255UL*256UL;
- u_int32 input = htonl(hostOrder);
-
- TEST_ASSERT_EQUAL_STRING("255.255.255.0", numtoa(input));
-}
-
diff --git a/contrib/ntp/tests/libntp/numtohost.c b/contrib/ntp/tests/libntp/numtohost.c
index 7472f46f66fa..cfce2d8a309a 100644
--- a/contrib/ntp/tests/libntp/numtohost.c
+++ b/contrib/ntp/tests/libntp/numtohost.c
@@ -1,19 +1,20 @@
#include "config.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
#include "ntp_fp.h"
#include "unity.h"
-void test_LoopbackNetNonResolve(void) {
+void test_LoopbackNetNonResolve(void);
+
+void
+test_LoopbackNetNonResolve(void) {
/* A loopback address in 127.0.0.0/8 is chosen, and
* numtohost() should not try to resolve it unless
* it is 127.0.0.1
*/
- u_int32 input = 127*256*256*256 + 1*256 + 1; // 127.0.1.1
+ const u_int32 input = 127*256*256*256 + 1*256 + 1; // 127.0.1.1
TEST_ASSERT_EQUAL_STRING("127.0.1.1", numtohost(htonl(input)));
}
-
diff --git a/contrib/ntp/tests/libntp/octtoint.c b/contrib/ntp/tests/libntp/octtoint.c
index 4b0f94ceaa36..5c03d6d1b807 100644
--- a/contrib/ntp/tests/libntp/octtoint.c
+++ b/contrib/ntp/tests/libntp/octtoint.c
@@ -4,6 +4,16 @@
#include "unity.h"
+
+void test_SingleDigit(void);
+void test_MultipleDigits(void);
+void test_Zero(void);
+void test_MaximumUnsigned32bit(void);
+void test_Overflow(void);
+void test_IllegalCharacter(void);
+void test_IllegalDigit(void);
+
+
void test_SingleDigit(void) {
const char* str = "5";
u_long actual;
diff --git a/contrib/ntp/tests/libntp/prettydate.c b/contrib/ntp/tests/libntp/prettydate.c
index 9a331e828db4..e1292bf6156e 100644
--- a/contrib/ntp/tests/libntp/prettydate.c
+++ b/contrib/ntp/tests/libntp/prettydate.c
@@ -6,11 +6,14 @@
#include "unity.h"
+void test_ConstantDate(void);
+
+
void
test_ConstantDate(void) {
const u_int32 HALF = 2147483648UL;
- l_fp time = {3485080800UL, HALF}; // 2010-06-09 14:00:00.5
+ l_fp time = {{3485080800UL}, HALF}; /* 2010-06-09 14:00:00.5 */
TEST_ASSERT_EQUAL_STRING("cfba1ce0.80000000 Wed, Jun 9 2010 14:00:00.500",
gmprettydate(&time));
diff --git a/contrib/ntp/tests/libntp/recvbuff.c b/contrib/ntp/tests/libntp/recvbuff.c
index e9c14da88cdd..6d6cf8e5fe9b 100644
--- a/contrib/ntp/tests/libntp/recvbuff.c
+++ b/contrib/ntp/tests/libntp/recvbuff.c
@@ -4,6 +4,10 @@
#include "unity.h"
+void setUp(void);
+void test_Initialization(void);
+void test_GetAndFree(void);
+void test_GetAndFill(void);
void
setUp(void)
diff --git a/contrib/ntp/tests/libntp/refidsmear.c b/contrib/ntp/tests/libntp/refidsmear.c
index 5e9d27c72a3d..04f396cb0a17 100644
--- a/contrib/ntp/tests/libntp/refidsmear.c
+++ b/contrib/ntp/tests/libntp/refidsmear.c
@@ -28,7 +28,12 @@
* 254.255.255.255
*/
+
+
void rtol(uint32_t r, char *es);
+void rtoltor(uint32_t er, char *es);
+void ltor(l_fp l, char *er);
+void test_refidsmear(void);
void
rtol(uint32_t r, char *es)
@@ -53,7 +58,7 @@ rtol(uint32_t r, char *es)
}
-void rtoltor(uint32_t er, char *es);
+
void
rtoltor(uint32_t er, char *es)
@@ -82,8 +87,6 @@ rtoltor(uint32_t er, char *es)
}
-void ltor(l_fp l, char *er);
-
void
ltor(l_fp l, char *er)
{
diff --git a/contrib/ntp/tests/libntp/refnumtoa.c b/contrib/ntp/tests/libntp/refnumtoa.c
index 8a37690ce200..33ad3aa48d16 100644
--- a/contrib/ntp/tests/libntp/refnumtoa.c
+++ b/contrib/ntp/tests/libntp/refnumtoa.c
@@ -9,8 +9,12 @@
/* Might need to be updated if a new refclock gets this id. */
static const int UNUSED_REFCLOCK_ID = 250;
+void test_LocalClock(void);
+void test_UnknownId(void);
-void test_LocalClock() {
+
+void
+test_LocalClock(void) {
#ifdef REFCLOCK /* clockname() is useless otherwise */
/* We test with a refclock address of type LOCALCLOCK.
* with id 8
@@ -23,10 +27,10 @@ void test_LocalClock() {
address.sa4.sin_family = AF_INET;
address.sa4.sin_addr.s_addr = htonl(addr);
- char stringStart [100]= "";
+ char stringStart[100]= "";
- strcat(stringStart,clockname(REFCLK_LOCALCLOCK));
- strcat(stringStart,"(8)");
+ strcat(stringStart, clockname(REFCLK_LOCALCLOCK));
+ strcat(stringStart, "(8)");
char * expected = stringStart;
@@ -36,9 +40,8 @@ void test_LocalClock() {
#endif /* REFCLOCK */
}
-
-
-void test_UnknownId() {
+void
+test_UnknownId(void) {
#ifdef REFCLOCK /* refnumtoa() is useless otherwise */
/* We test with a currently unused refclock ID */
u_int32 addr = REFCLOCK_ADDR;
@@ -49,8 +52,8 @@ void test_UnknownId() {
address.sa4.sin_family = AF_INET;
address.sa4.sin_addr.s_addr = htonl(addr);
- char stringStart [100]= "REFCLK(";
- char value [100] ;
+ char stringStart[100]= "REFCLK(";
+ char value[100] ;
snprintf(value, sizeof(value), "%d", UNUSED_REFCLOCK_ID);
strcat(stringStart,value);
strcat(stringStart,",4)");
@@ -61,4 +64,3 @@ void test_UnknownId() {
TEST_IGNORE_MESSAGE("REFCLOCK NOT DEFINED, SKIPPING TEST");
#endif /* REFCLOCK */
}
-
diff --git a/contrib/ntp/tests/libntp/run-a_md5encrypt.c b/contrib/ntp/tests/libntp/run-a_md5encrypt.c
index 1c46e3f83673..122ed931cd91 100644
--- a/contrib/ntp/tests/libntp/run-a_md5encrypt.c
+++ b/contrib/ntp/tests/libntp/run-a_md5encrypt.c
@@ -22,38 +22,41 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp.h"
+#include "ntp_stdlib.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_Encrypt();
-extern void test_DecryptValid();
-extern void test_DecryptInvalid();
-extern void test_IPv4AddressToRefId();
-extern void test_IPv6AddressToRefId();
+extern void test_Encrypt(void);
+extern void test_DecryptValid(void);
+extern void test_DecryptInvalid(void);
+extern void test_IPv4AddressToRefId(void);
+extern void test_IPv6AddressToRefId(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "a_md5encrypt.c";
UnityBegin("a_md5encrypt.c");
- RUN_TEST(test_Encrypt, 36);
- RUN_TEST(test_DecryptValid, 54);
- RUN_TEST(test_DecryptInvalid, 60);
- RUN_TEST(test_IPv4AddressToRefId, 68);
- RUN_TEST(test_IPv6AddressToRefId, 79);
+ RUN_TEST(test_Encrypt, 29);
+ RUN_TEST(test_DecryptValid, 30);
+ RUN_TEST(test_DecryptInvalid, 31);
+ RUN_TEST(test_IPv4AddressToRefId, 32);
+ RUN_TEST(test_IPv6AddressToRefId, 33);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-atoint.c b/contrib/ntp/tests/libntp/run-atoint.c
index 2764c9a47706..e8405fd7dd19 100644
--- a/contrib/ntp/tests/libntp/run-atoint.c
+++ b/contrib/ntp/tests/libntp/run-atoint.c
@@ -22,6 +22,9 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -35,27 +38,27 @@ extern void test_IllegalCharacter(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "atoint.c";
UnityBegin("atoint.c");
RUN_TEST(test_RegularPositive, 7);
- RUN_TEST(test_RegularNegative, 15);
- RUN_TEST(test_PositiveOverflowBoundary, 23);
- RUN_TEST(test_NegativeOverflowBoundary, 30);
- RUN_TEST(test_PositiveOverflowBig, 37);
- RUN_TEST(test_IllegalCharacter, 44);
+ RUN_TEST(test_RegularNegative, 8);
+ RUN_TEST(test_PositiveOverflowBoundary, 9);
+ RUN_TEST(test_NegativeOverflowBoundary, 10);
+ RUN_TEST(test_PositiveOverflowBig, 11);
+ RUN_TEST(test_IllegalCharacter, 12);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-atouint.c b/contrib/ntp/tests/libntp/run-atouint.c
index 7adb0840c923..b7c17320a2a5 100644
--- a/contrib/ntp/tests/libntp/run-atouint.c
+++ b/contrib/ntp/tests/libntp/run-atouint.c
@@ -22,38 +22,42 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "ntp_fp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_RegularPositive();
-extern void test_PositiveOverflowBoundary();
-extern void test_PositiveOverflowBig();
-extern void test_Negative();
-extern void test_IllegalChar();
+extern void test_RegularPositive(void);
+extern void test_PositiveOverflowBoundary(void);
+extern void test_PositiveOverflowBig(void);
+extern void test_Negative(void);
+extern void test_IllegalChar(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "atouint.c";
UnityBegin("atouint.c");
RUN_TEST(test_RegularPositive, 9);
- RUN_TEST(test_PositiveOverflowBoundary, 17);
- RUN_TEST(test_PositiveOverflowBig, 24);
- RUN_TEST(test_Negative, 31);
- RUN_TEST(test_IllegalChar, 38);
+ RUN_TEST(test_PositiveOverflowBoundary, 10);
+ RUN_TEST(test_PositiveOverflowBig, 11);
+ RUN_TEST(test_Negative, 12);
+ RUN_TEST(test_IllegalChar, 13);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-authkeys.c b/contrib/ntp/tests/libntp/run-authkeys.c
index 5e65cc9dc517..6a2b67081f9e 100644
--- a/contrib/ntp/tests/libntp/run-authkeys.c
+++ b/contrib/ntp/tests/libntp/run-authkeys.c
@@ -22,40 +22,44 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_AddTrustedKeys();
-extern void test_AddUntrustedKey();
-extern void test_HaveKeyCorrect();
-extern void test_HaveKeyIncorrect();
-extern void test_AddWithAuthUseKey();
-extern void test_EmptyKey();
+extern void test_AddTrustedKeys(void);
+extern void test_AddUntrustedKey(void);
+extern void test_HaveKeyCorrect(void);
+extern void test_HaveKeyIncorrect(void);
+extern void test_AddWithAuthUseKey(void);
+extern void test_EmptyKey(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "authkeys.c";
UnityBegin("authkeys.c");
- RUN_TEST(test_AddTrustedKeys, 71);
- RUN_TEST(test_AddUntrustedKey, 82);
- RUN_TEST(test_HaveKeyCorrect, 90);
- RUN_TEST(test_HaveKeyIncorrect, 99);
- RUN_TEST(test_AddWithAuthUseKey, 106);
- RUN_TEST(test_EmptyKey, 113);
+ RUN_TEST(test_AddTrustedKeys, 24);
+ RUN_TEST(test_AddUntrustedKey, 25);
+ RUN_TEST(test_HaveKeyCorrect, 26);
+ RUN_TEST(test_HaveKeyIncorrect, 27);
+ RUN_TEST(test_AddWithAuthUseKey, 28);
+ RUN_TEST(test_EmptyKey, 29);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-buftvtots.c b/contrib/ntp/tests/libntp/run-buftvtots.c
index c54c33912ab7..82a19698ef00 100644
--- a/contrib/ntp/tests/libntp/run-buftvtots.c
+++ b/contrib/ntp/tests/libntp/run-buftvtots.c
@@ -22,36 +22,42 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_types.h"
+#include "ntp_stdlib.h"
+#include "lfptest.h"
+#include "ntp_unixtime.h"
+#include <math.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_ZeroBuffer();
-extern void test_IntegerAndFractionalBuffer();
-extern void test_IllegalMicroseconds();
-extern void test_AlwaysFalseOnWindows();
+extern void test_ZeroBuffer(void);
+extern void test_IntegerAndFractionalBuffer(void);
+extern void test_IllegalMicroseconds(void);
+extern void test_AlwaysFalseOnWindows(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "buftvtots.c";
UnityBegin("buftvtots.c");
- RUN_TEST(test_ZeroBuffer, 16);
- RUN_TEST(test_IntegerAndFractionalBuffer, 30);
- RUN_TEST(test_IllegalMicroseconds, 53);
- RUN_TEST(test_AlwaysFalseOnWindows, 66);
+ RUN_TEST(test_ZeroBuffer, 14);
+ RUN_TEST(test_IntegerAndFractionalBuffer, 15);
+ RUN_TEST(test_IllegalMicroseconds, 16);
+ RUN_TEST(test_AlwaysFalseOnWindows, 17);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-calendar.c b/contrib/ntp/tests/libntp/run-calendar.c
index 07a5092f3fae..50c5b201491c 100644
--- a/contrib/ntp/tests/libntp/run-calendar.c
+++ b/contrib/ntp/tests/libntp/run-calendar.c
@@ -22,50 +22,62 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include <string.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_DaySplitMerge();
-extern void test_SplitYearDays1();
-extern void test_SplitYearDays2();
-extern void test_RataDie1();
-extern void test_LeapYears1();
-extern void test_LeapYears2();
-extern void test_RoundTripDate();
-extern void test_RoundTripYearStart();
-extern void test_RoundTripMonthStart();
-extern void test_RoundTripWeekStart();
-extern void test_RoundTripDayStart();
+extern void test_DaySplitMerge(void);
+extern void test_SplitYearDays1(void);
+extern void test_SplitYearDays2(void);
+extern void test_RataDie1(void);
+extern void test_LeapYears1(void);
+extern void test_LeapYears2(void);
+extern void test_RoundTripDate(void);
+extern void test_RoundTripYearStart(void);
+extern void test_RoundTripMonthStart(void);
+extern void test_RoundTripWeekStart(void);
+extern void test_RoundTripDayStart(void);
+extern void test_IsoCalYearsToWeeks(void);
+extern void test_IsoCalWeeksToYearStart(void);
+extern void test_IsoCalWeeksToYearEnd(void);
+extern void test_DaySecToDate(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "calendar.c";
UnityBegin("calendar.c");
- RUN_TEST(test_DaySplitMerge, 230);
- RUN_TEST(test_SplitYearDays1, 254);
- RUN_TEST(test_SplitYearDays2, 268);
- RUN_TEST(test_RataDie1, 283);
- RUN_TEST(test_LeapYears1, 293);
- RUN_TEST(test_LeapYears2, 308);
- RUN_TEST(test_RoundTripDate, 326);
- RUN_TEST(test_RoundTripYearStart, 355);
- RUN_TEST(test_RoundTripMonthStart, 371);
- RUN_TEST(test_RoundTripWeekStart, 387);
- RUN_TEST(test_RoundTripDayStart, 403);
+ RUN_TEST(test_DaySplitMerge, 21);
+ RUN_TEST(test_SplitYearDays1, 22);
+ RUN_TEST(test_SplitYearDays2, 23);
+ RUN_TEST(test_RataDie1, 24);
+ RUN_TEST(test_LeapYears1, 25);
+ RUN_TEST(test_LeapYears2, 26);
+ RUN_TEST(test_RoundTripDate, 27);
+ RUN_TEST(test_RoundTripYearStart, 28);
+ RUN_TEST(test_RoundTripMonthStart, 29);
+ RUN_TEST(test_RoundTripWeekStart, 30);
+ RUN_TEST(test_RoundTripDayStart, 31);
+ RUN_TEST(test_IsoCalYearsToWeeks, 32);
+ RUN_TEST(test_IsoCalWeeksToYearStart, 33);
+ RUN_TEST(test_IsoCalWeeksToYearEnd, 34);
+ RUN_TEST(test_DaySecToDate, 35);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-caljulian.c b/contrib/ntp/tests/libntp/run-caljulian.c
index b4e3f480ec7c..a11389cbd7f9 100644
--- a/contrib/ntp/tests/libntp/run-caljulian.c
+++ b/contrib/ntp/tests/libntp/run-caljulian.c
@@ -22,37 +22,41 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+#include "test-libntp.h"
+#include <string.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
-extern void test_RegularTime();
-extern void test_LeapYear();
-extern void test_uLongBoundary();
-extern void test_uLongWrapped();
+extern void test_RegularTime(void);
+extern void test_LeapYear(void);
+extern void test_uLongBoundary(void);
+extern void test_uLongWrapped(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "caljulian.c";
UnityBegin("caljulian.c");
- RUN_TEST(test_RegularTime, 74);
- RUN_TEST(test_LeapYear, 85);
- RUN_TEST(test_uLongBoundary, 96);
- RUN_TEST(test_uLongWrapped, 107);
+ RUN_TEST(test_RegularTime, 16);
+ RUN_TEST(test_LeapYear, 17);
+ RUN_TEST(test_uLongBoundary, 18);
+ RUN_TEST(test_uLongWrapped, 19);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-caltontp.c b/contrib/ntp/tests/libntp/run-caltontp.c
index b7b6626bfd05..c80e0a4a70e4 100644
--- a/contrib/ntp/tests/libntp/run-caltontp.c
+++ b/contrib/ntp/tests/libntp/run-caltontp.c
@@ -22,6 +22,8 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_calendar.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -33,25 +35,25 @@ extern void test_WraparoundDateIn2036(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "caltontp.c";
UnityBegin("caltontp.c");
- RUN_TEST(test_DateGivenMonthDay, 6);
- RUN_TEST(test_DateGivenYearDay, 16);
- RUN_TEST(test_DateLeapYear, 27);
- RUN_TEST(test_WraparoundDateIn2036, 40);
+ RUN_TEST(test_DateGivenMonthDay, 5);
+ RUN_TEST(test_DateGivenYearDay, 6);
+ RUN_TEST(test_DateLeapYear, 7);
+ RUN_TEST(test_WraparoundDateIn2036, 8);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-calyearstart.c b/contrib/ntp/tests/libntp/run-calyearstart.c
index d54a0b5625e8..374e9d5eb143 100644
--- a/contrib/ntp/tests/libntp/run-calyearstart.c
+++ b/contrib/ntp/tests/libntp/run-calyearstart.c
@@ -22,34 +22,38 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "test-libntp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_NoWrapInDateRange();
-extern void test_NoWrapInDateRangeLeapYear();
-extern void test_WrapInDateRange();
+extern void test_NoWrapInDateRange(void);
+extern void test_NoWrapInDateRangeLeapYear(void);
+extern void test_WrapInDateRange(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "calyearstart.c";
UnityBegin("calyearstart.c");
- RUN_TEST(test_NoWrapInDateRange, 22);
- RUN_TEST(test_NoWrapInDateRangeLeapYear, 30);
- RUN_TEST(test_WrapInDateRange, 38);
+ RUN_TEST(test_NoWrapInDateRange, 11);
+ RUN_TEST(test_NoWrapInDateRangeLeapYear, 12);
+ RUN_TEST(test_WrapInDateRange, 13);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-clocktime.c b/contrib/ntp/tests/libntp/run-clocktime.c
index f21de83eac00..8d19831f6494 100644
--- a/contrib/ntp/tests/libntp/run-clocktime.c
+++ b/contrib/ntp/tests/libntp/run-clocktime.c
@@ -22,44 +22,48 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+#include "test-libntp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_CurrentYear();
-extern void test_CurrentYearFuzz();
-extern void test_TimeZoneOffset();
-extern void test_WrongYearStart();
-extern void test_PreviousYear();
-extern void test_NextYear();
-extern void test_NoReasonableConversion();
-extern void test_AlwaysInLimit();
+extern void test_CurrentYear(void);
+extern void test_CurrentYearFuzz(void);
+extern void test_TimeZoneOffset(void);
+extern void test_WrongYearStart(void);
+extern void test_PreviousYear(void);
+extern void test_NextYear(void);
+extern void test_NoReasonableConversion(void);
+extern void test_AlwaysInLimit(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "clocktime.c";
UnityBegin("clocktime.c");
- RUN_TEST(test_CurrentYear, 32);
- RUN_TEST(test_CurrentYearFuzz, 47);
- RUN_TEST(test_TimeZoneOffset, 69);
- RUN_TEST(test_WrongYearStart, 89);
- RUN_TEST(test_PreviousYear, 108);
- RUN_TEST(test_NextYear, 127);
- RUN_TEST(test_NoReasonableConversion, 145);
- RUN_TEST(test_AlwaysInLimit, 167);
+ RUN_TEST(test_CurrentYear, 11);
+ RUN_TEST(test_CurrentYearFuzz, 12);
+ RUN_TEST(test_TimeZoneOffset, 13);
+ RUN_TEST(test_WrongYearStart, 14);
+ RUN_TEST(test_PreviousYear, 15);
+ RUN_TEST(test_NextYear, 16);
+ RUN_TEST(test_NoReasonableConversion, 17);
+ RUN_TEST(test_AlwaysInLimit, 19);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-decodenetnum.c b/contrib/ntp/tests/libntp/run-decodenetnum.c
index 2e0a7e593214..014151e98dd5 100644
--- a/contrib/ntp/tests/libntp/run-decodenetnum.c
+++ b/contrib/ntp/tests/libntp/run-decodenetnum.c
@@ -22,11 +22,13 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "sockaddrtest.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_IPv4AddressOnly(void);
extern void test_IPv4AddressWithPort(void);
extern void test_IPv6AddressOnly(void);
@@ -36,27 +38,27 @@ extern void test_IllegalCharInPort(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "decodenetnum.c";
UnityBegin("decodenetnum.c");
- RUN_TEST(test_IPv4AddressOnly, 9);
- RUN_TEST(test_IPv4AddressWithPort, 22);
- RUN_TEST(test_IPv6AddressOnly, 35);
- RUN_TEST(test_IPv6AddressWithPort, 55);
- RUN_TEST(test_IllegalAddress, 75);
- RUN_TEST(test_IllegalCharInPort, 82);
+ RUN_TEST(test_IPv4AddressOnly, 7);
+ RUN_TEST(test_IPv4AddressWithPort, 8);
+ RUN_TEST(test_IPv6AddressOnly, 10);
+ RUN_TEST(test_IPv6AddressWithPort, 11);
+ RUN_TEST(test_IllegalAddress, 13);
+ RUN_TEST(test_IllegalCharInPort, 14);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-hextoint.c b/contrib/ntp/tests/libntp/run-hextoint.c
index a69792177116..66cc57dcd5c0 100644
--- a/contrib/ntp/tests/libntp/run-hextoint.c
+++ b/contrib/ntp/tests/libntp/run-hextoint.c
@@ -22,6 +22,10 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "ntp_fp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -34,26 +38,26 @@ extern void test_IllegalChar(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "hextoint.c";
UnityBegin("hextoint.c");
- RUN_TEST(test_SingleDigit, 10);
- RUN_TEST(test_MultipleDigits, 18);
- RUN_TEST(test_MaxUnsigned, 26);
- RUN_TEST(test_Overflow, 34);
- RUN_TEST(test_IllegalChar, 41);
+ RUN_TEST(test_SingleDigit, 9);
+ RUN_TEST(test_MultipleDigits, 10);
+ RUN_TEST(test_MaxUnsigned, 11);
+ RUN_TEST(test_Overflow, 12);
+ RUN_TEST(test_IllegalChar, 13);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-hextolfp.c b/contrib/ntp/tests/libntp/run-hextolfp.c
index 0ef9f63b863f..e894c3bbe3a6 100644
--- a/contrib/ntp/tests/libntp/run-hextolfp.c
+++ b/contrib/ntp/tests/libntp/run-hextolfp.c
@@ -22,11 +22,14 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "lfptest.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_PositiveInteger(void);
extern void test_NegativeInteger(void);
extern void test_PositiveFraction(void);
@@ -36,27 +39,27 @@ extern void test_IllegalChar(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "hextolfp.c";
UnityBegin("hextolfp.c");
- RUN_TEST(test_PositiveInteger, 10);
- RUN_TEST(test_NegativeInteger, 20);
- RUN_TEST(test_PositiveFraction, 30);
- RUN_TEST(test_NegativeFraction, 40);
- RUN_TEST(test_IllegalNumberOfInteger, 50);
- RUN_TEST(test_IllegalChar, 57);
+ RUN_TEST(test_PositiveInteger, 9);
+ RUN_TEST(test_NegativeInteger, 10);
+ RUN_TEST(test_PositiveFraction, 11);
+ RUN_TEST(test_NegativeFraction, 12);
+ RUN_TEST(test_IllegalNumberOfInteger, 13);
+ RUN_TEST(test_IllegalChar, 14);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-humandate.c b/contrib/ntp/tests/libntp/run-humandate.c
index 291415f532e4..1f2e717c620a 100644
--- a/contrib/ntp/tests/libntp/run-humandate.c
+++ b/contrib/ntp/tests/libntp/run-humandate.c
@@ -22,6 +22,9 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -31,23 +34,23 @@ extern void test_CurrentTime(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "humandate.c";
UnityBegin("humandate.c");
RUN_TEST(test_RegularTime, 8);
- RUN_TEST(test_CurrentTime, 22);
+ RUN_TEST(test_CurrentTime, 9);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-lfpfunc.c b/contrib/ntp/tests/libntp/run-lfpfunc.c
index 2f0e1c254d13..ac6700f78987 100644
--- a/contrib/ntp/tests/libntp/run-lfpfunc.c
+++ b/contrib/ntp/tests/libntp/run-lfpfunc.c
@@ -22,47 +22,51 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_fp.h"
+#include <float.h>
+#include <math.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
-extern void test_AdditionLR();
-extern void test_AdditionRL();
-extern void test_SubtractionLR();
-extern void test_SubtractionRL();
-extern void test_Negation();
-extern void test_Absolute();
-extern void test_FDF_RoundTrip();
-extern void test_SignedRelOps();
-extern void test_UnsignedRelOps();
+extern void test_AdditionLR(void);
+extern void test_AdditionRL(void);
+extern void test_SubtractionLR(void);
+extern void test_SubtractionRL(void);
+extern void test_Negation(void);
+extern void test_Absolute(void);
+extern void test_FDF_RoundTrip(void);
+extern void test_SignedRelOps(void);
+extern void test_UnsignedRelOps(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "lfpfunc.c";
UnityBegin("lfpfunc.c");
- RUN_TEST(test_AdditionLR, 320);
- RUN_TEST(test_AdditionRL, 339);
- RUN_TEST(test_SubtractionLR, 358);
- RUN_TEST(test_SubtractionRL, 373);
- RUN_TEST(test_Negation, 391);
- RUN_TEST(test_Absolute, 412);
- RUN_TEST(test_FDF_RoundTrip, 447);
- RUN_TEST(test_SignedRelOps, 479);
- RUN_TEST(test_UnsignedRelOps, 522);
+ RUN_TEST(test_AdditionLR, 50);
+ RUN_TEST(test_AdditionRL, 51);
+ RUN_TEST(test_SubtractionLR, 52);
+ RUN_TEST(test_SubtractionRL, 53);
+ RUN_TEST(test_Negation, 54);
+ RUN_TEST(test_Absolute, 55);
+ RUN_TEST(test_FDF_RoundTrip, 56);
+ RUN_TEST(test_SignedRelOps, 57);
+ RUN_TEST(test_UnsignedRelOps, 58);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-lfptostr.c b/contrib/ntp/tests/libntp/run-lfptostr.c
index 7e54a4f0c370..bae0f85b1709 100644
--- a/contrib/ntp/tests/libntp/run-lfptostr.c
+++ b/contrib/ntp/tests/libntp/run-lfptostr.c
@@ -22,6 +22,9 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_fp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -40,32 +43,32 @@ extern void test_UnsignedInteger(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "lfptostr.c";
UnityBegin("lfptostr.c");
RUN_TEST(test_PositiveInteger, 23);
- RUN_TEST(test_NegativeInteger, 30);
- RUN_TEST(test_PositiveIntegerWithFraction, 37);
- RUN_TEST(test_NegativeIntegerWithFraction, 44);
- RUN_TEST(test_RoundingDownToInteger, 51);
- RUN_TEST(test_RoundingMiddleToInteger, 58);
- RUN_TEST(test_RoundingUpToInteger, 65);
- RUN_TEST(test_SingleDecimal, 72);
- RUN_TEST(test_MillisecondsRoundingUp, 79);
- RUN_TEST(test_MillisecondsRoundingDown, 88);
- RUN_TEST(test_UnsignedInteger, 97);
+ RUN_TEST(test_NegativeInteger, 24);
+ RUN_TEST(test_PositiveIntegerWithFraction, 25);
+ RUN_TEST(test_NegativeIntegerWithFraction, 26);
+ RUN_TEST(test_RoundingDownToInteger, 27);
+ RUN_TEST(test_RoundingMiddleToInteger, 28);
+ RUN_TEST(test_RoundingUpToInteger, 29);
+ RUN_TEST(test_SingleDecimal, 30);
+ RUN_TEST(test_MillisecondsRoundingUp, 31);
+ RUN_TEST(test_MillisecondsRoundingDown, 32);
+ RUN_TEST(test_UnsignedInteger, 33);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-modetoa.c b/contrib/ntp/tests/libntp/run-modetoa.c
index 334e08d63afc..20e2d9516e5b 100644
--- a/contrib/ntp/tests/libntp/run-modetoa.c
+++ b/contrib/ntp/tests/libntp/run-modetoa.c
@@ -22,6 +22,8 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -31,23 +33,23 @@ extern void test_UnknownMode(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "modetoa.c";
UnityBegin("modetoa.c");
- RUN_TEST(test_KnownMode, 9);
- RUN_TEST(test_UnknownMode, 15);
+ RUN_TEST(test_KnownMode, 7);
+ RUN_TEST(test_UnknownMode, 8);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-msyslog.c b/contrib/ntp/tests/libntp/run-msyslog.c
index ea566a716abc..544fbc119174 100644
--- a/contrib/ntp/tests/libntp/run-msyslog.c
+++ b/contrib/ntp/tests/libntp/run-msyslog.c
@@ -22,11 +22,12 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_msnprintf(void);
extern void test_msnprintfLiteralPercentm(void);
extern void test_msnprintfBackslashLiteralPercentm(void);
@@ -38,29 +39,29 @@ extern void test_msnprintfTruncate(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "msyslog.c";
UnityBegin("msyslog.c");
- RUN_TEST(test_msnprintf, 14);
- RUN_TEST(test_msnprintfLiteralPercentm, 30);
- RUN_TEST(test_msnprintfBackslashLiteralPercentm, 45);
- RUN_TEST(test_msnprintfBackslashPercent, 59);
- RUN_TEST(test_msnprintfHangingPercent, 74);
- RUN_TEST(test_format_errmsgHangingPercent, 91);
- RUN_TEST(test_msnprintfNullTarget, 106);
- RUN_TEST(test_msnprintfTruncate, 117);
+ RUN_TEST(test_msnprintf, 13);
+ RUN_TEST(test_msnprintfLiteralPercentm, 14);
+ RUN_TEST(test_msnprintfBackslashLiteralPercentm, 15);
+ RUN_TEST(test_msnprintfBackslashPercent, 16);
+ RUN_TEST(test_msnprintfHangingPercent, 17);
+ RUN_TEST(test_format_errmsgHangingPercent, 18);
+ RUN_TEST(test_msnprintfNullTarget, 19);
+ RUN_TEST(test_msnprintfTruncate, 20);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-netof.c b/contrib/ntp/tests/libntp/run-netof.c
index 401192d26d67..7a714f54ef4e 100644
--- a/contrib/ntp/tests/libntp/run-netof.c
+++ b/contrib/ntp/tests/libntp/run-netof.c
@@ -22,11 +22,14 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "sockaddrtest.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_ClassBAddress(void);
extern void test_ClassCAddress(void);
extern void test_ClassAAddress(void);
@@ -34,25 +37,25 @@ extern void test_IPv6Address(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "netof.c";
UnityBegin("netof.c");
- RUN_TEST(test_ClassBAddress, 10);
- RUN_TEST(test_ClassCAddress, 20);
- RUN_TEST(test_ClassAAddress, 30);
- RUN_TEST(test_IPv6Address, 43);
+ RUN_TEST(test_ClassBAddress, 11);
+ RUN_TEST(test_ClassCAddress, 12);
+ RUN_TEST(test_ClassAAddress, 13);
+ RUN_TEST(test_IPv6Address, 14);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-numtoa.c b/contrib/ntp/tests/libntp/run-numtoa.c
index 5468b72e938f..640e61c14abd 100644
--- a/contrib/ntp/tests/libntp/run-numtoa.c
+++ b/contrib/ntp/tests/libntp/run-numtoa.c
@@ -22,6 +22,9 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_fp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -31,23 +34,23 @@ extern void test_Netmask(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "numtoa.c";
UnityBegin("numtoa.c");
- RUN_TEST(test_Address, 18);
- RUN_TEST(test_Netmask, 24);
+ RUN_TEST(test_Address, 8);
+ RUN_TEST(test_Netmask, 9);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-numtohost.c b/contrib/ntp/tests/libntp/run-numtohost.c
index 3ec4fdff039c..5ebe15b8f532 100644
--- a/contrib/ntp/tests/libntp/run-numtohost.c
+++ b/contrib/ntp/tests/libntp/run-numtohost.c
@@ -22,6 +22,9 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_fp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -30,22 +33,22 @@ extern void test_LoopbackNetNonResolve(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "numtohost.c";
UnityBegin("numtohost.c");
- RUN_TEST(test_LoopbackNetNonResolve, 9);
+ RUN_TEST(test_LoopbackNetNonResolve, 8);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-octtoint.c b/contrib/ntp/tests/libntp/run-octtoint.c
index dc2bed566e17..9d2990401d84 100644
--- a/contrib/ntp/tests/libntp/run-octtoint.c
+++ b/contrib/ntp/tests/libntp/run-octtoint.c
@@ -22,6 +22,8 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -36,28 +38,28 @@ extern void test_IllegalDigit(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "octtoint.c";
UnityBegin("octtoint.c");
- RUN_TEST(test_SingleDigit, 7);
- RUN_TEST(test_MultipleDigits, 15);
- RUN_TEST(test_Zero, 24);
- RUN_TEST(test_MaximumUnsigned32bit, 33);
- RUN_TEST(test_Overflow, 42);
- RUN_TEST(test_IllegalCharacter, 50);
- RUN_TEST(test_IllegalDigit, 58);
+ RUN_TEST(test_SingleDigit, 8);
+ RUN_TEST(test_MultipleDigits, 9);
+ RUN_TEST(test_Zero, 10);
+ RUN_TEST(test_MaximumUnsigned32bit, 11);
+ RUN_TEST(test_Overflow, 12);
+ RUN_TEST(test_IllegalCharacter, 13);
+ RUN_TEST(test_IllegalDigit, 14);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-prettydate.c b/contrib/ntp/tests/libntp/run-prettydate.c
index 2067b13c5e76..e6c5ff3f61b6 100644
--- a/contrib/ntp/tests/libntp/run-prettydate.c
+++ b/contrib/ntp/tests/libntp/run-prettydate.c
@@ -22,6 +22,10 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "ntp_fp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -30,22 +34,22 @@ extern void test_ConstantDate(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "prettydate.c";
UnityBegin("prettydate.c");
- RUN_TEST(test_ConstantDate, 10);
+ RUN_TEST(test_ConstantDate, 9);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-recvbuff.c b/contrib/ntp/tests/libntp/run-recvbuff.c
index 8060105e316d..b8a3796638f1 100644
--- a/contrib/ntp/tests/libntp/run-recvbuff.c
+++ b/contrib/ntp/tests/libntp/run-recvbuff.c
@@ -22,6 +22,8 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "recvbuff.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -32,24 +34,24 @@ extern void test_GetAndFill(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "recvbuff.c";
UnityBegin("recvbuff.c");
- RUN_TEST(test_Initialization, 15);
- RUN_TEST(test_GetAndFree, 23);
- RUN_TEST(test_GetAndFill, 34);
+ RUN_TEST(test_Initialization, 8);
+ RUN_TEST(test_GetAndFree, 9);
+ RUN_TEST(test_GetAndFill, 10);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-refidsmear.c b/contrib/ntp/tests/libntp/run-refidsmear.c
index 30651f35f0a9..465690f76305 100644
--- a/contrib/ntp/tests/libntp/run-refidsmear.c
+++ b/contrib/ntp/tests/libntp/run-refidsmear.c
@@ -22,31 +22,35 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include <ntp.h>
+#include <ntp_fp.h>
+#include <refidsmear.h>
+#include <stdio.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_refidsmear(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "refidsmear.c";
UnityBegin("refidsmear.c");
- RUN_TEST(test_refidsmear, 100);
+ RUN_TEST(test_refidsmear, 36);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-refnumtoa.c b/contrib/ntp/tests/libntp/run-refnumtoa.c
index 60981ca5aa02..bb9fb605b630 100644
--- a/contrib/ntp/tests/libntp/run-refnumtoa.c
+++ b/contrib/ntp/tests/libntp/run-refnumtoa.c
@@ -22,32 +22,35 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_net.h"
+#include "ntp_refclock.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_LocalClock();
-extern void test_UnknownId();
+extern void test_LocalClock(void);
+extern void test_UnknownId(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "refnumtoa.c";
UnityBegin("refnumtoa.c");
- RUN_TEST(test_LocalClock, 13);
- RUN_TEST(test_UnknownId, 41);
+ RUN_TEST(test_LocalClock, 12);
+ RUN_TEST(test_UnknownId, 13);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-sfptostr.c b/contrib/ntp/tests/libntp/run-sfptostr.c
index 1c28fe8c57ff..1ebe43ca7993 100644
--- a/contrib/ntp/tests/libntp/run-sfptostr.c
+++ b/contrib/ntp/tests/libntp/run-sfptostr.c
@@ -22,11 +22,12 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_fp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
extern void test_PositiveInteger(void);
extern void test_NegativeInteger(void);
extern void test_PositiveIntegerPositiveFraction(void);
@@ -38,29 +39,29 @@ extern void test_SingleDecimalRounding(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "sfptostr.c";
UnityBegin("sfptostr.c");
RUN_TEST(test_PositiveInteger, 11);
- RUN_TEST(test_NegativeInteger, 19);
- RUN_TEST(test_PositiveIntegerPositiveFraction, 27);
- RUN_TEST(test_NegativeIntegerNegativeFraction, 35);
- RUN_TEST(test_PositiveIntegerNegativeFraction, 43);
- RUN_TEST(test_NegativeIntegerPositiveFraction, 51);
- RUN_TEST(test_SingleDecimalInteger, 59);
- RUN_TEST(test_SingleDecimalRounding, 67);
+ RUN_TEST(test_NegativeInteger, 12);
+ RUN_TEST(test_PositiveIntegerPositiveFraction, 13);
+ RUN_TEST(test_NegativeIntegerNegativeFraction, 14);
+ RUN_TEST(test_PositiveIntegerNegativeFraction, 15);
+ RUN_TEST(test_NegativeIntegerPositiveFraction, 16);
+ RUN_TEST(test_SingleDecimalInteger, 17);
+ RUN_TEST(test_SingleDecimalRounding, 18);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-socktoa.c b/contrib/ntp/tests/libntp/run-socktoa.c
index a6fa77834121..a5066e3f7841 100644
--- a/contrib/ntp/tests/libntp/run-socktoa.c
+++ b/contrib/ntp/tests/libntp/run-socktoa.c
@@ -22,40 +22,44 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "sockaddrtest.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
extern void test_IPv4AddressWithPort(void);
extern void test_IPv6AddressWithPort(void);
+extern void test_IgnoreIPv6Fields(void);
extern void test_ScopedIPv6AddressWithPort(void);
extern void test_HashEqual(void);
extern void test_HashNotEqual(void);
-extern void test_IgnoreIPv6Fields(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "socktoa.c";
UnityBegin("socktoa.c");
- RUN_TEST(test_IPv4AddressWithPort, 11);
- RUN_TEST(test_IPv6AddressWithPort, 18);
- RUN_TEST(test_ScopedIPv6AddressWithPort, 42);
- RUN_TEST(test_HashEqual, 67);
- RUN_TEST(test_HashNotEqual, 75);
- RUN_TEST(test_IgnoreIPv6Fields, 88);
+ RUN_TEST(test_IPv4AddressWithPort, 10);
+ RUN_TEST(test_IPv6AddressWithPort, 12);
+ RUN_TEST(test_IgnoreIPv6Fields, 13);
+ RUN_TEST(test_ScopedIPv6AddressWithPort, 15);
+ RUN_TEST(test_HashEqual, 16);
+ RUN_TEST(test_HashNotEqual, 17);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-ssl_init.c b/contrib/ntp/tests/libntp/run-ssl_init.c
index 452a60a9a62c..cef9a36fbaa6 100644
--- a/contrib/ntp/tests/libntp/run-ssl_init.c
+++ b/contrib/ntp/tests/libntp/run-ssl_init.c
@@ -22,38 +22,40 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_MD5KeyTypeWithoutDigestLength();
-extern void test_MD5KeyTypeWithDigestLength();
-extern void test_SHA1KeyTypeWithDigestLength();
-extern void test_MD5KeyName();
-extern void test_SHA1KeyName();
+extern void test_MD5KeyTypeWithoutDigestLength(void);
+extern void test_MD5KeyTypeWithDigestLength(void);
+extern void test_SHA1KeyTypeWithDigestLength(void);
+extern void test_MD5KeyName(void);
+extern void test_SHA1KeyName(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "ssl_init.c";
UnityBegin("ssl_init.c");
- RUN_TEST(test_MD5KeyTypeWithoutDigestLength, 19);
- RUN_TEST(test_MD5KeyTypeWithDigestLength, 23);
- RUN_TEST(test_SHA1KeyTypeWithDigestLength, 32);
- RUN_TEST(test_MD5KeyName, 47);
- RUN_TEST(test_SHA1KeyName, 51);
+ RUN_TEST(test_MD5KeyTypeWithoutDigestLength, 17);
+ RUN_TEST(test_MD5KeyTypeWithDigestLength, 18);
+ RUN_TEST(test_SHA1KeyTypeWithDigestLength, 19);
+ RUN_TEST(test_MD5KeyName, 20);
+ RUN_TEST(test_SHA1KeyName, 21);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-statestr.c b/contrib/ntp/tests/libntp/run-statestr.c
index 6083eee0f558..9cfe0bc9f57f 100644
--- a/contrib/ntp/tests/libntp/run-statestr.c
+++ b/contrib/ntp/tests/libntp/run-statestr.c
@@ -22,6 +22,10 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp.h"
+#include "ntp_control.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -33,25 +37,25 @@ extern void test_ClockCodeUnknown(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "statestr.c";
UnityBegin("statestr.c");
- RUN_TEST(test_PeerRestart, 20);
- RUN_TEST(test_SysUnspecified, 24);
- RUN_TEST(test_ClockCodeExists, 29);
- RUN_TEST(test_ClockCodeUnknown, 33);
+ RUN_TEST(test_PeerRestart, 9);
+ RUN_TEST(test_SysUnspecified, 10);
+ RUN_TEST(test_ClockCodeExists, 11);
+ RUN_TEST(test_ClockCodeUnknown, 12);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-strtolfp.c b/contrib/ntp/tests/libntp/run-strtolfp.c
index 0a2912bee0cb..74723192c9fe 100644
--- a/contrib/ntp/tests/libntp/run-strtolfp.c
+++ b/contrib/ntp/tests/libntp/run-strtolfp.c
@@ -22,6 +22,10 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "lfptest.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -36,28 +40,28 @@ extern void test_InvalidChars(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "strtolfp.c";
UnityBegin("strtolfp.c");
RUN_TEST(test_PositiveInteger, 11);
- RUN_TEST(test_NegativeInteger, 25);
- RUN_TEST(test_PositiveFraction, 42);
- RUN_TEST(test_NegativeFraction, 56);
- RUN_TEST(test_PositiveMsFraction, 73);
- RUN_TEST(test_NegativeMsFraction, 89);
- RUN_TEST(test_InvalidChars, 107);
+ RUN_TEST(test_NegativeInteger, 12);
+ RUN_TEST(test_PositiveFraction, 13);
+ RUN_TEST(test_NegativeFraction, 14);
+ RUN_TEST(test_PositiveMsFraction, 15);
+ RUN_TEST(test_NegativeMsFraction, 16);
+ RUN_TEST(test_InvalidChars, 17);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-timespecops.c b/contrib/ntp/tests/libntp/run-timespecops.c
index b56e7560f636..6c26521f0272 100644
--- a/contrib/ntp/tests/libntp/run-timespecops.c
+++ b/contrib/ntp/tests/libntp/run-timespecops.c
@@ -22,84 +22,90 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_types.h"
+#include "ntp_fp.h"
+#include "timespecops.h"
+#include <math.h>
+#include <string.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_Helpers1();
-extern void test_Normalise();
-extern void test_SignNoFrac();
-extern void test_SignWithFrac();
-extern void test_CmpFracEQ();
-extern void test_CmpFracGT();
-extern void test_CmpFracLT();
-extern void test_AddFullNorm();
-extern void test_AddFullOflow1();
-extern void test_AddNsecNorm();
-extern void test_AddNsecOflow1();
-extern void test_SubFullNorm();
-extern void test_SubFullOflow();
-extern void test_SubNsecNorm();
-extern void test_SubNsecOflow();
-extern void test_Neg();
-extern void test_AbsNoFrac();
-extern void test_AbsWithFrac();
-extern void test_Helpers2();
-extern void test_ToLFPbittest();
-extern void test_ToLFPrelPos();
-extern void test_ToLFPrelNeg();
-extern void test_ToLFPabs();
-extern void test_FromLFPbittest();
-extern void test_FromLFPrelPos();
-extern void test_FromLFPrelNeg();
-extern void test_LFProundtrip();
-extern void test_ToString();
+extern void test_Helpers1(void);
+extern void test_Normalise(void);
+extern void test_SignNoFrac(void);
+extern void test_SignWithFrac(void);
+extern void test_CmpFracEQ(void);
+extern void test_CmpFracGT(void);
+extern void test_CmpFracLT(void);
+extern void test_AddFullNorm(void);
+extern void test_AddFullOflow1(void);
+extern void test_AddNsecNorm(void);
+extern void test_AddNsecOflow1(void);
+extern void test_SubFullNorm(void);
+extern void test_SubFullOflow(void);
+extern void test_SubNsecNorm(void);
+extern void test_SubNsecOflow(void);
+extern void test_Neg(void);
+extern void test_AbsNoFrac(void);
+extern void test_AbsWithFrac(void);
+extern void test_Helpers2(void);
+extern void test_ToLFPbittest(void);
+extern void test_ToLFPrelPos(void);
+extern void test_ToLFPrelNeg(void);
+extern void test_ToLFPabs(void);
+extern void test_FromLFPbittest(void);
+extern void test_FromLFPrelPos(void);
+extern void test_FromLFPrelNeg(void);
+extern void test_LFProundtrip(void);
+extern void test_ToString(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "timespecops.c";
UnityBegin("timespecops.c");
- RUN_TEST(test_Helpers1, 155);
- RUN_TEST(test_Normalise, 175);
- RUN_TEST(test_SignNoFrac, 189);
- RUN_TEST(test_SignWithFrac, 201);
- RUN_TEST(test_CmpFracEQ, 215);
- RUN_TEST(test_CmpFracGT, 228);
- RUN_TEST(test_CmpFracLT, 241);
- RUN_TEST(test_AddFullNorm, 258);
- RUN_TEST(test_AddFullOflow1, 272);
- RUN_TEST(test_AddNsecNorm, 286);
- RUN_TEST(test_AddNsecOflow1, 298);
- RUN_TEST(test_SubFullNorm, 314);
- RUN_TEST(test_SubFullOflow, 328);
- RUN_TEST(test_SubNsecNorm, 342);
- RUN_TEST(test_SubNsecOflow, 354);
- RUN_TEST(test_Neg, 370);
- RUN_TEST(test_AbsNoFrac, 387);
- RUN_TEST(test_AbsWithFrac, 398);
- RUN_TEST(test_Helpers2, 413);
- RUN_TEST(test_ToLFPbittest, 445);
- RUN_TEST(test_ToLFPrelPos, 458);
- RUN_TEST(test_ToLFPrelNeg, 470);
- RUN_TEST(test_ToLFPabs, 482);
- RUN_TEST(test_FromLFPbittest, 497);
- RUN_TEST(test_FromLFPrelPos, 516);
- RUN_TEST(test_FromLFPrelNeg, 529);
- RUN_TEST(test_LFProundtrip, 544);
- RUN_TEST(test_ToString, 563);
+ RUN_TEST(test_Helpers1, 36);
+ RUN_TEST(test_Normalise, 37);
+ RUN_TEST(test_SignNoFrac, 38);
+ RUN_TEST(test_SignWithFrac, 39);
+ RUN_TEST(test_CmpFracEQ, 40);
+ RUN_TEST(test_CmpFracGT, 41);
+ RUN_TEST(test_CmpFracLT, 42);
+ RUN_TEST(test_AddFullNorm, 43);
+ RUN_TEST(test_AddFullOflow1, 44);
+ RUN_TEST(test_AddNsecNorm, 45);
+ RUN_TEST(test_AddNsecOflow1, 46);
+ RUN_TEST(test_SubFullNorm, 47);
+ RUN_TEST(test_SubFullOflow, 48);
+ RUN_TEST(test_SubNsecNorm, 49);
+ RUN_TEST(test_SubNsecOflow, 50);
+ RUN_TEST(test_Neg, 51);
+ RUN_TEST(test_AbsNoFrac, 52);
+ RUN_TEST(test_AbsWithFrac, 53);
+ RUN_TEST(test_Helpers2, 54);
+ RUN_TEST(test_ToLFPbittest, 55);
+ RUN_TEST(test_ToLFPrelPos, 56);
+ RUN_TEST(test_ToLFPrelNeg, 57);
+ RUN_TEST(test_ToLFPabs, 58);
+ RUN_TEST(test_FromLFPbittest, 59);
+ RUN_TEST(test_FromLFPrelPos, 60);
+ RUN_TEST(test_FromLFPrelNeg, 61);
+ RUN_TEST(test_LFProundtrip, 62);
+ RUN_TEST(test_ToString, 63);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-timevalops.c b/contrib/ntp/tests/libntp/run-timevalops.c
index 013aae1f2a52..4a9351c70ab1 100644
--- a/contrib/ntp/tests/libntp/run-timevalops.c
+++ b/contrib/ntp/tests/libntp/run-timevalops.c
@@ -22,84 +22,89 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_types.h"
+#include "ntp_fp.h"
+#include "timevalops.h"
+#include <math.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-extern void test_Helpers1();
-extern void test_Normalise();
-extern void test_SignNoFrac();
-extern void test_SignWithFrac();
-extern void test_CmpFracEQ();
-extern void test_CmpFracGT();
-extern void test_CmpFracLT();
-extern void test_AddFullNorm();
-extern void test_AddFullOflow1();
-extern void test_AddUsecNorm();
-extern void test_AddUsecOflow1();
-extern void test_SubFullNorm();
-extern void test_SubFullOflow();
-extern void test_SubUsecNorm();
-extern void test_SubUsecOflow();
-extern void test_Neg();
-extern void test_AbsNoFrac();
-extern void test_AbsWithFrac();
-extern void test_Helpers2();
-extern void test_ToLFPbittest();
-extern void test_ToLFPrelPos();
-extern void test_ToLFPrelNeg();
-extern void test_ToLFPabs();
-extern void test_FromLFPbittest();
-extern void test_FromLFPrelPos();
-extern void test_FromLFPrelNeg();
-extern void test_LFProundtrip();
-extern void test_ToString();
+extern void test_Helpers1(void);
+extern void test_Normalise(void);
+extern void test_SignNoFrac(void);
+extern void test_SignWithFrac(void);
+extern void test_CmpFracEQ(void);
+extern void test_CmpFracGT(void);
+extern void test_CmpFracLT(void);
+extern void test_AddFullNorm(void);
+extern void test_AddFullOflow1(void);
+extern void test_AddUsecNorm(void);
+extern void test_AddUsecOflow1(void);
+extern void test_SubFullNorm(void);
+extern void test_SubFullOflow(void);
+extern void test_SubUsecNorm(void);
+extern void test_SubUsecOflow(void);
+extern void test_Neg(void);
+extern void test_AbsNoFrac(void);
+extern void test_AbsWithFrac(void);
+extern void test_Helpers2(void);
+extern void test_ToLFPbittest(void);
+extern void test_ToLFPrelPos(void);
+extern void test_ToLFPrelNeg(void);
+extern void test_ToLFPabs(void);
+extern void test_FromLFPbittest(void);
+extern void test_FromLFPrelPos(void);
+extern void test_FromLFPrelNeg(void);
+extern void test_LFProundtrip(void);
+extern void test_ToString(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "timevalops.c";
UnityBegin("timevalops.c");
- RUN_TEST(test_Helpers1, 153);
- RUN_TEST(test_Normalise, 173);
- RUN_TEST(test_SignNoFrac, 187);
- RUN_TEST(test_SignWithFrac, 199);
- RUN_TEST(test_CmpFracEQ, 214);
- RUN_TEST(test_CmpFracGT, 228);
- RUN_TEST(test_CmpFracLT, 242);
- RUN_TEST(test_AddFullNorm, 260);
- RUN_TEST(test_AddFullOflow1, 274);
- RUN_TEST(test_AddUsecNorm, 288);
- RUN_TEST(test_AddUsecOflow1, 300);
- RUN_TEST(test_SubFullNorm, 316);
- RUN_TEST(test_SubFullOflow, 330);
- RUN_TEST(test_SubUsecNorm, 344);
- RUN_TEST(test_SubUsecOflow, 356);
- RUN_TEST(test_Neg, 372);
- RUN_TEST(test_AbsNoFrac, 389);
- RUN_TEST(test_AbsWithFrac, 400);
- RUN_TEST(test_Helpers2, 416);
- RUN_TEST(test_ToLFPbittest, 449);
- RUN_TEST(test_ToLFPrelPos, 464);
- RUN_TEST(test_ToLFPrelNeg, 478);
- RUN_TEST(test_ToLFPabs, 491);
- RUN_TEST(test_FromLFPbittest, 509);
- RUN_TEST(test_FromLFPrelPos, 527);
- RUN_TEST(test_FromLFPrelNeg, 540);
- RUN_TEST(test_LFProundtrip, 554);
- RUN_TEST(test_ToString, 573);
+ RUN_TEST(test_Helpers1, 38);
+ RUN_TEST(test_Normalise, 39);
+ RUN_TEST(test_SignNoFrac, 40);
+ RUN_TEST(test_SignWithFrac, 41);
+ RUN_TEST(test_CmpFracEQ, 42);
+ RUN_TEST(test_CmpFracGT, 43);
+ RUN_TEST(test_CmpFracLT, 44);
+ RUN_TEST(test_AddFullNorm, 45);
+ RUN_TEST(test_AddFullOflow1, 46);
+ RUN_TEST(test_AddUsecNorm, 47);
+ RUN_TEST(test_AddUsecOflow1, 48);
+ RUN_TEST(test_SubFullNorm, 49);
+ RUN_TEST(test_SubFullOflow, 50);
+ RUN_TEST(test_SubUsecNorm, 51);
+ RUN_TEST(test_SubUsecOflow, 52);
+ RUN_TEST(test_Neg, 53);
+ RUN_TEST(test_AbsNoFrac, 54);
+ RUN_TEST(test_AbsWithFrac, 55);
+ RUN_TEST(test_Helpers2, 56);
+ RUN_TEST(test_ToLFPbittest, 57);
+ RUN_TEST(test_ToLFPrelPos, 58);
+ RUN_TEST(test_ToLFPrelNeg, 59);
+ RUN_TEST(test_ToLFPabs, 60);
+ RUN_TEST(test_FromLFPbittest, 61);
+ RUN_TEST(test_FromLFPrelPos, 62);
+ RUN_TEST(test_FromLFPrelNeg, 63);
+ RUN_TEST(test_LFProundtrip, 64);
+ RUN_TEST(test_ToString, 65);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-tstotv.c b/contrib/ntp/tests/libntp/run-tstotv.c
index cf7dd1794a66..c060f771222f 100644
--- a/contrib/ntp/tests/libntp/run-tstotv.c
+++ b/contrib/ntp/tests/libntp/run-tstotv.c
@@ -22,6 +22,9 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_fp.h"
+#include "timevalops.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -32,24 +35,24 @@ extern void test_MicrosecondsRounding(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "tstotv.c";
UnityBegin("tstotv.c");
- RUN_TEST(test_Seconds, 9);
- RUN_TEST(test_MicrosecondsExact, 21);
- RUN_TEST(test_MicrosecondsRounding, 35);
+ RUN_TEST(test_Seconds, 8);
+ RUN_TEST(test_MicrosecondsExact, 9);
+ RUN_TEST(test_MicrosecondsRounding, 10);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-tvtots.c b/contrib/ntp/tests/libntp/run-tvtots.c
index 468aae5e09ec..3ed734eca1ac 100644
--- a/contrib/ntp/tests/libntp/run-tvtots.c
+++ b/contrib/ntp/tests/libntp/run-tvtots.c
@@ -22,6 +22,10 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "lfptest.h"
+#include "timevalops.h"
+#include <math.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -32,24 +36,24 @@ extern void test_MicrosecondsExact(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "tvtots.c";
UnityBegin("tvtots.c");
RUN_TEST(test_Seconds, 10);
- RUN_TEST(test_MicrosecondsRounded, 21);
- RUN_TEST(test_MicrosecondsExact, 36);
+ RUN_TEST(test_MicrosecondsRounded, 11);
+ RUN_TEST(test_MicrosecondsExact, 12);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-uglydate.c b/contrib/ntp/tests/libntp/run-uglydate.c
index 4e67713638cf..6ec50f660aa4 100644
--- a/contrib/ntp/tests/libntp/run-uglydate.c
+++ b/contrib/ntp/tests/libntp/run-uglydate.c
@@ -22,6 +22,9 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "ntp_fp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -30,22 +33,22 @@ extern void test_ConstantDateTime(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "uglydate.c";
UnityBegin("uglydate.c");
- RUN_TEST(test_ConstantDateTime, 11);
+ RUN_TEST(test_ConstantDateTime, 8);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-vi64ops.c b/contrib/ntp/tests/libntp/run-vi64ops.c
index 7e8c2cbeba93..599a4b78d727 100644
--- a/contrib/ntp/tests/libntp/run-vi64ops.c
+++ b/contrib/ntp/tests/libntp/run-vi64ops.c
@@ -22,35 +22,37 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include "vint64ops.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
-extern void test_ParseVUI64_pos();
-extern void test_ParseVUI64_neg();
-extern void test_ParseVUI64_case();
+extern void test_ParseVUI64_pos(void);
+extern void test_ParseVUI64_neg(void);
+extern void test_ParseVUI64_case(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "vi64ops.c";
UnityBegin("vi64ops.c");
- RUN_TEST(test_ParseVUI64_pos, 33);
- RUN_TEST(test_ParseVUI64_neg, 47);
- RUN_TEST(test_ParseVUI64_case, 60);
+ RUN_TEST(test_ParseVUI64_pos, 10);
+ RUN_TEST(test_ParseVUI64_neg, 11);
+ RUN_TEST(test_ParseVUI64_case, 12);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/run-ymd2yd.c b/contrib/ntp/tests/libntp/run-ymd2yd.c
index faf2fcb683c6..4669ce9b504a 100644
--- a/contrib/ntp/tests/libntp/run-ymd2yd.c
+++ b/contrib/ntp/tests/libntp/run-ymd2yd.c
@@ -22,6 +22,8 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -33,25 +35,25 @@ extern void test_LeapYearDecember(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "ymd2yd.c";
UnityBegin("ymd2yd.c");
- RUN_TEST(test_NonLeapYearFebruary, 17);
- RUN_TEST(test_NonLeapYearJune, 21);
- RUN_TEST(test_LeapYearFebruary, 26);
- RUN_TEST(test_LeapYearDecember, 30);
+ RUN_TEST(test_NonLeapYearFebruary, 7);
+ RUN_TEST(test_NonLeapYearJune, 8);
+ RUN_TEST(test_LeapYearFebruary, 9);
+ RUN_TEST(test_LeapYearDecember, 10);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/libntp/sfptostr.c b/contrib/ntp/tests/libntp/sfptostr.c
index fd56114eaadd..b115ae168ba3 100644
--- a/contrib/ntp/tests/libntp/sfptostr.c
+++ b/contrib/ntp/tests/libntp/sfptostr.c
@@ -8,6 +8,16 @@
#define SFP_MAX_PRECISION 6
+void test_PositiveInteger(void);
+void test_NegativeInteger(void);
+void test_PositiveIntegerPositiveFraction(void);
+void test_NegativeIntegerNegativeFraction(void);
+void test_PositiveIntegerNegativeFraction(void);
+void test_NegativeIntegerPositiveFraction(void);
+void test_SingleDecimalInteger(void);
+void test_SingleDecimalRounding(void);
+
+
void test_PositiveInteger(void)
{
s_fp test = 300 << 16; // exact 300.000000
diff --git a/contrib/ntp/tests/libntp/sockaddrtest.c b/contrib/ntp/tests/libntp/sockaddrtest.c
new file mode 100644
index 000000000000..bd893bd429a2
--- /dev/null
+++ b/contrib/ntp/tests/libntp/sockaddrtest.c
@@ -0,0 +1,51 @@
+
+#include "config.h"
+#include "ntp.h"
+#include "ntp_stdlib.h"
+#include "sockaddrtest.h"
+
+sockaddr_u
+CreateSockaddr4(const char* address, unsigned int port) {
+ sockaddr_u s;
+ s.sa4.sin_family = AF_INET;
+ s.sa4.sin_addr.s_addr = inet_addr(address);
+ SET_PORT(&s, port);
+
+ return s;
+}
+
+
+int
+IsEqual(const sockaddr_u expected, const sockaddr_u actual) {
+ struct in_addr in;
+ struct in6_addr in6;
+
+ if (expected.sa.sa_family != actual.sa.sa_family) {
+ printf("Expected sa_family: %d but got: %d", expected.sa.sa_family, actual.sa.sa_family);
+ return FALSE;
+ }
+
+ if (actual.sa.sa_family == AF_INET) { // IPv4
+ if (expected.sa4.sin_port == actual.sa4.sin_port &&
+ memcmp(&expected.sa4.sin_addr, &actual.sa4.sin_addr,
+ sizeof( in )) == 0) {
+ return TRUE;
+ } else {
+ printf("IPv4 comparision failed, expected: %s(%s) but was: %s(%s)",inet_ntoa(expected.sa4.sin_addr), socktoa(&expected), inet_ntoa(actual.sa4.sin_addr),socktoa(&actual));
+ return FALSE;
+ }
+ } else if (actual.sa.sa_family == AF_INET6) { //IPv6
+ if (expected.sa6.sin6_port == actual.sa6.sin6_port &&
+ memcmp(&expected.sa6.sin6_addr, &actual.sa6.sin6_addr,
+ sizeof(in6)) == 0) {
+ return TRUE;
+ } else {
+ printf("IPv6 comparision failed");
+ return FALSE;
+ }
+ } else { // Unknown family
+ printf("Unknown sa_family: %d",actual.sa.sa_family);
+ return FALSE;
+ }
+}
+
diff --git a/contrib/ntp/tests/libntp/sockaddrtest.h b/contrib/ntp/tests/libntp/sockaddrtest.h
index f9a9fde41ee8..8450fb6b2c91 100644
--- a/contrib/ntp/tests/libntp/sockaddrtest.h
+++ b/contrib/ntp/tests/libntp/sockaddrtest.h
@@ -1,57 +1,13 @@
#ifndef TESTS_SOCKADDRTEST_H
#define TESTS_SOCKADDRTEST_H
+#include "config.h"
#include "ntp.h"
#include "ntp_stdlib.h"
-sockaddr_u CreateSockaddr4(const char* address, unsigned int port) {
- sockaddr_u s;
- s.sa4.sin_family = AF_INET;
- s.sa4.sin_addr.s_addr = inet_addr(address);
- SET_PORT(&s, port);
- return s;
-}
-
-int IsEqual(const sockaddr_u expected, const sockaddr_u actual) {
- struct in_addr in;
- struct in6_addr in6;
-
- if (expected.sa.sa_family != actual.sa.sa_family) {
- //<< "Expected sa_family: " << expected.sa.sa_family
- //<< " but got: " << actual.sa.sa_family;
- return FALSE;
- }
-
- if (actual.sa.sa_family == AF_INET) { // IPv4
- if (expected.sa4.sin_port == actual.sa4.sin_port &&
- memcmp(&expected.sa4.sin_addr, &actual.sa4.sin_addr,
- sizeof( in )) == 0) {
- return TRUE;
- } else {
- //<< "IPv4 comparision failed, expected: "
- //<< expected.sa4.sin_addr.s_addr
- //<< "(" << socktoa(&expected) << ") but was: "
- //<< actual.sa4.sin_addr.s_addr "(" << socktoa(&actual) << ")";
- return FALSE;
- }
- } else if (actual.sa.sa_family == AF_INET6) { //IPv6
- if (expected.sa6.sin6_port == actual.sa6.sin6_port &&
- memcmp(&expected.sa6.sin6_addr, &actual.sa6.sin6_addr,
- sizeof(in6)) == 0) {
- return TRUE;
- } else {
- printf("IPv6 comparision failed");
- return FALSE;
- }
- } else { // Unknown family
- printf("Unknown sa_family: ");// << actual.sa.sa_family;
- return FALSE;
- }
-}
+sockaddr_u CreateSockaddr4(const char* address, unsigned int port);
+int IsEqual(const sockaddr_u expected, const sockaddr_u actual);
#endif // TESTS_SOCKADDRTEST_H
-
-
-
diff --git a/contrib/ntp/tests/libntp/socktoa.c b/contrib/ntp/tests/libntp/socktoa.c
index 537df1e44407..6661fa553c89 100644
--- a/contrib/ntp/tests/libntp/socktoa.c
+++ b/contrib/ntp/tests/libntp/socktoa.c
@@ -4,18 +4,32 @@
#include "ntp_calendar.h"
#include "unity.h"
-
#include "sockaddrtest.h"
-void test_IPv4AddressWithPort(void) {
+void test_IPv4AddressWithPort(void);
+//#ifdef ISC_PLATFORM_HAVEIPV6
+void test_IPv6AddressWithPort(void);
+void test_IgnoreIPv6Fields(void);
+//#endif /* ISC_PLATFORM_HAVEIPV6 */
+void test_ScopedIPv6AddressWithPort(void);
+void test_HashEqual(void);
+void test_HashNotEqual(void);
+
+void
+test_IPv4AddressWithPort(void) {
sockaddr_u input = CreateSockaddr4("192.0.2.10", 123);
TEST_ASSERT_EQUAL_STRING("192.0.2.10", socktoa(&input));
TEST_ASSERT_EQUAL_STRING("192.0.2.10:123", sockporttoa(&input));
}
-void test_IPv6AddressWithPort(void) {
+
+void
+test_IPv6AddressWithPort(void) {
+
+#ifdef ISC_PLATFORM_WANTIPV6
+
const struct in6_addr address = {
0x20, 0x01, 0x0d, 0xb8,
0x85, 0xa3, 0x08, 0xd3,
@@ -36,10 +50,18 @@ void test_IPv6AddressWithPort(void) {
TEST_ASSERT_EQUAL_STRING(expected, socktoa(&input));
TEST_ASSERT_EQUAL_STRING(expected_port, sockporttoa(&input));
+
+#else
+ TEST_IGNORE_MESSAGE("IPV6 disabled in build, skipping.");
+
+#endif /* ISC_PLATFORM_HAVEIPV6 */
+
}
+
+void
+test_ScopedIPv6AddressWithPort(void) {
#ifdef ISC_PLATFORM_HAVESCOPEID
-void test_ScopedIPv6AddressWithPort(void) {
const struct in6_addr address = {
0xfe, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
@@ -61,10 +83,13 @@ void test_ScopedIPv6AddressWithPort(void) {
TEST_ASSERT_EQUAL_STRING(expected, socktoa(&input));
TEST_ASSERT_EQUAL_STRING(expected_port, sockporttoa(&input));
+#else
+ TEST_IGNORE_MESSAGE("Skipping because ISC_PLATFORM does not have Scope ID");
+#endif
}
-#endif /* ISC_PLATFORM_HAVESCOPEID */
-void test_HashEqual(void) {
+void
+test_HashEqual(void) {
sockaddr_u input1 = CreateSockaddr4("192.00.2.2", 123);
sockaddr_u input2 = CreateSockaddr4("192.0.2.2", 123);
@@ -72,20 +97,22 @@ void test_HashEqual(void) {
TEST_ASSERT_EQUAL(sock_hash(&input1), sock_hash(&input2));
}
-void test_HashNotEqual(void) {
+void
+test_HashNotEqual(void) {
/* These two addresses should not generate the same hash. */
sockaddr_u input1 = CreateSockaddr4("192.0.2.1", 123);
sockaddr_u input2 = CreateSockaddr4("192.0.2.2", 123);
TEST_ASSERT_FALSE(IsEqual(input1, input2));
- //TODO : EXPECT_NE(sock_hash(&input1), sock_hash(&input2));
- //Damir's suggestion below:
TEST_ASSERT_FALSE(sock_hash(&input1) == sock_hash(&input2));
- //NOTE: sock_hash returns u_short, so you can compare it with ==
- //for complex structures you have to write an additional function like bool compare(a,b)
}
-void test_IgnoreIPv6Fields(void) {
+
+void
+test_IgnoreIPv6Fields(void) {
+
+#ifdef ISC_PLATFORM_WANTIPV6
+
const struct in6_addr address = {
0x20, 0x01, 0x0d, 0xb8,
0x85, 0xa3, 0x08, 0xd3,
@@ -106,4 +133,9 @@ void test_IgnoreIPv6Fields(void) {
SET_PORT(&input2, NTP_PORT);
TEST_ASSERT_EQUAL(sock_hash(&input1), sock_hash(&input2));
+
+#else
+ TEST_IGNORE_MESSAGE("IPV6 disabled in build, skipping.");
+#endif /* ISC_PLATFORM_HAVEIPV6 */
}
+
diff --git a/contrib/ntp/tests/libntp/ssl_init.c b/contrib/ntp/tests/libntp/ssl_init.c
index fe22414e3339..42fe920b6d26 100644
--- a/contrib/ntp/tests/libntp/ssl_init.c
+++ b/contrib/ntp/tests/libntp/ssl_init.c
@@ -14,13 +14,21 @@
static const size_t TEST_MD5_DIGEST_LENGTH = 16;
static const size_t TEST_SHA1_DIGEST_LENGTH = 20;
+void test_MD5KeyTypeWithoutDigestLength(void);
+void test_MD5KeyTypeWithDigestLength(void);
+void test_SHA1KeyTypeWithDigestLength(void);
+void test_MD5KeyName(void);
+void test_SHA1KeyName(void);
+
// keytype_from_text()
-void test_MD5KeyTypeWithoutDigestLength() {
+void
+test_MD5KeyTypeWithoutDigestLength(void) {
TEST_ASSERT_EQUAL(KEY_TYPE_MD5, keytype_from_text("MD5", NULL));
}
-void test_MD5KeyTypeWithDigestLength() {
+void
+test_MD5KeyTypeWithDigestLength(void) {
size_t digestLength;
size_t expected = TEST_MD5_DIGEST_LENGTH;
@@ -29,7 +37,8 @@ void test_MD5KeyTypeWithDigestLength() {
}
-void test_SHA1KeyTypeWithDigestLength() {
+void
+test_SHA1KeyTypeWithDigestLength(void) {
#ifdef OPENSSL
size_t digestLength;
size_t expected = TEST_SHA1_DIGEST_LENGTH;
@@ -44,15 +53,17 @@ void test_SHA1KeyTypeWithDigestLength() {
// keytype_name()
-void test_MD5KeyName() {
+void
+test_MD5KeyName(void) {
TEST_ASSERT_EQUAL_STRING("MD5", keytype_name(KEY_TYPE_MD5));
}
-void test_SHA1KeyName() {
+
+void
+test_SHA1KeyName(void) {
#ifdef OPENSSL
TEST_ASSERT_EQUAL_STRING("SHA", keytype_name(NID_sha));
#else
TEST_IGNORE_MESSAGE("Skipping because OPENSSL isn't defined");
#endif /* OPENSSL */
}
-
diff --git a/contrib/ntp/tests/libntp/statestr.c b/contrib/ntp/tests/libntp/statestr.c
index 5f7babe4537b..810ee6b6ea05 100644
--- a/contrib/ntp/tests/libntp/statestr.c
+++ b/contrib/ntp/tests/libntp/statestr.c
@@ -1,36 +1,37 @@
#include "config.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
-#include "ntp.h" // Needed for MAX_MAC_LEN used in ntp_control.h
+#include "ntp.h" // needed for MAX_MAC_LEN used in ntp_control.h
#include "ntp_control.h"
#include "unity.h"
-void setUp(void)
-{
-}
-
-void tearDown(void)
-{
-}
-
+void test_PeerRestart(void);
+void test_SysUnspecified(void);
+void test_ClockCodeExists(void);
+void test_ClockCodeUnknown(void);
// eventstr()
-void test_PeerRestart(void) {
+void
+test_PeerRestart(void) {
TEST_ASSERT_EQUAL_STRING("restart", eventstr(PEVNT_RESTART));
}
-void test_SysUnspecified(void) {
+
+void
+test_SysUnspecified(void) {
TEST_ASSERT_EQUAL_STRING("unspecified", eventstr(EVNT_UNSPEC));
}
+
// ceventstr()
-void test_ClockCodeExists(void) {
+void
+test_ClockCodeExists(void) {
TEST_ASSERT_EQUAL_STRING("clk_unspec", ceventstr(CTL_CLK_OKAY));
}
-void test_ClockCodeUnknown(void) {
+
+void
+test_ClockCodeUnknown(void) {
TEST_ASSERT_EQUAL_STRING("clk_-1", ceventstr(-1));
}
-
diff --git a/contrib/ntp/tests/libntp/strtolfp.c b/contrib/ntp/tests/libntp/strtolfp.c
index de9f1119c6a1..f40ab508a4af 100644
--- a/contrib/ntp/tests/libntp/strtolfp.c
+++ b/contrib/ntp/tests/libntp/strtolfp.c
@@ -8,11 +8,20 @@
/* This file tests both atolfp and mstolfp */
+void test_PositiveInteger(void);
+void test_NegativeInteger(void);
+void test_PositiveFraction(void);
+void test_NegativeFraction(void);
+void test_PositiveMsFraction(void);
+void test_NegativeMsFraction(void);
+void test_InvalidChars(void);
+
+
void test_PositiveInteger(void) {
const char *str = "500";
const char *str_ms = "500000";
- l_fp expected = {500,0};
+ l_fp expected = {{500},0};
l_fp actual, actual_ms;
TEST_ASSERT_TRUE(atolfp(str, &actual));
@@ -43,7 +52,7 @@ void test_PositiveFraction(void) {
const char *str = "+500.5";
const char *str_ms = "500500.0";
- l_fp expected = {500, HALF};
+ l_fp expected = {{500}, HALF};
l_fp actual, actual_ms;
TEST_ASSERT_TRUE(atolfp(str, &actual));
@@ -74,7 +83,7 @@ void test_PositiveMsFraction(void) {
const char *str = "300.00025";
const char *str_ms = "300000.25";
- l_fp expected = {300, QUARTER_PROMILLE_APPRX};
+ l_fp expected = {{300}, QUARTER_PROMILLE_APPRX};
l_fp actual, actual_ms;
diff --git a/contrib/ntp/tests/libntp/test-libntp.c b/contrib/ntp/tests/libntp/test-libntp.c
index e489f673fc76..4d9b8406775d 100644
--- a/contrib/ntp/tests/libntp/test-libntp.c
+++ b/contrib/ntp/tests/libntp/test-libntp.c
@@ -5,28 +5,23 @@
#include "test-libntp.h"
-//const char *progname = "test-libntp";
-
-// current_time is needed by authkeys. Used only in to calculate lifetime.
-//u_long current_time = 4;
-
time_t nowtime = 0;
-time_t timefunc(time_t *ptr)
-{
+
+time_t
+timefunc(time_t *ptr) {
if (ptr)
*ptr = nowtime;
return nowtime;
}
-void settime(int y, int m, int d, int H, int M, int S)
-{
+
+void
+settime(int y, int m, int d, int H, int M, int S) {
time_t days = ntpcal_edate_to_eradays(y-1, m-1, d-1) + 1 - DAY_UNIX_STARTS;
time_t secs = ntpcal_etime_to_seconds(H, M, S);
nowtime = days * SECSPERDAY + secs;
}
-
-
diff --git a/contrib/ntp/tests/libntp/test-libntp.h b/contrib/ntp/tests/libntp/test-libntp.h
index eb113cd52c53..93050b32a1e2 100644
--- a/contrib/ntp/tests/libntp/test-libntp.h
+++ b/contrib/ntp/tests/libntp/test-libntp.h
@@ -1,3 +1,8 @@
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+
time_t timefunc(time_t *ptr);
void settime(int y, int m, int d, int H, int M, int S);
time_t nowtime;
diff --git a/contrib/ntp/tests/libntp/timespecops.c b/contrib/ntp/tests/libntp/timespecops.c
index bb2619a079af..86df7a1767ab 100644
--- a/contrib/ntp/tests/libntp/timespecops.c
+++ b/contrib/ntp/tests/libntp/timespecops.c
@@ -2,55 +2,96 @@
#include "ntp_types.h"
#include "ntp_fp.h"
-
-#include <math.h>
#include "timespecops.h"
#include "unity.h"
-
+#include <math.h>
#include <string.h>
-//in unity_helper.h :
+
#define TEST_ASSERT_EQUAL_timespec(a, b) { \
TEST_ASSERT_EQUAL_MESSAGE(a.tv_sec, b.tv_sec, "Field tv_sec"); \
TEST_ASSERT_EQUAL_MESSAGE(a.tv_nsec, b.tv_nsec, "Field tv_nsec"); \
}
-//what about l_fp.l_ui ??? it's a union so it's either l_fp.l_ui or l_fp.l_i?
+
#define TEST_ASSERT_EQUAL_l_fp(a, b) { \
TEST_ASSERT_EQUAL_MESSAGE(a.l_i, b.l_i, "Field l_i"); \
TEST_ASSERT_EQUAL_UINT_MESSAGE(a.l_uf, b.l_uf, "Field l_uf"); \
}
-//timespec has time_t, long, and time_t is basically long uint, 4 or 8 bytes size, depending on 32/64bit
static u_int32 my_tick_to_tsf(u_int32 ticks);
static u_int32 my_tsf_to_tick(u_int32 tsf);
+
// that's it...
struct lfpfracdata {
long nsec;
u_int32 frac;
};
+
+void test_Helpers1(void);
+void test_Normalise(void);
+void test_SignNoFrac(void);
+void test_SignWithFrac(void);
+void test_CmpFracEQ(void);
+void test_CmpFracGT(void);
+void test_CmpFracLT(void);
+void test_AddFullNorm(void);
+void test_AddFullOflow1(void);
+void test_AddNsecNorm(void);
+void test_AddNsecOflow1(void);
+void test_SubFullNorm(void);
+void test_SubFullOflow(void);
+void test_SubNsecNorm(void);
+void test_SubNsecOflow(void);
+void test_Neg(void);
+void test_AbsNoFrac(void);
+void test_AbsWithFrac(void);
+void test_Helpers2(void);
+void test_ToLFPbittest(void);
+void test_ToLFPrelPos(void);
+void test_ToLFPrelNeg(void);
+void test_ToLFPabs(void);
+void test_FromLFPbittest(void);
+void test_FromLFPrelPos(void);
+void test_FromLFPrelNeg(void);
+void test_LFProundtrip(void);
+void test_ToString(void);
+
+typedef int bool;
+
+const bool timespec_isValid(struct timespec V);
+struct timespec timespec_init(time_t hi, long lo);
+l_fp l_fp_init(int32 i, u_int32 f);
+bool AssertFpClose(const l_fp m, const l_fp n, const l_fp limit);
+bool AssertTimespecClose(const struct timespec m, const struct timespec n, const struct timespec limit);
+
+
//******************************************MY CUSTOM FUNCTIONS*******************************
-typedef int bool; //TRUE and FALSE are already defined somewhere, so I can't do typedef enum { FALSE, TRUE } boolean;
-const bool timespec_isValid(struct timespec V)
- { return V.tv_nsec >= 0 && V.tv_nsec < 1000000000; }
-struct timespec timespec_init(time_t hi, long lo){
+const bool
+timespec_isValid(struct timespec V) {
+ return V.tv_nsec >= 0 && V.tv_nsec < 1000000000;
+}
+
+
+struct timespec
+timespec_init(time_t hi, long lo) {
struct timespec V;
V.tv_sec = hi;
V.tv_nsec = lo;
return V;
}
-//taken from lfpfunc.c -> maybe remove this from timevalops.c and lfpfunc. and put in c_timstructs.h ????!!!!!
-l_fp l_fp_init(int32 i, u_int32 f)
-{
+
+l_fp
+l_fp_init(int32 i, u_int32 f) {
l_fp temp;
temp.l_i = i;
temp.l_uf = f;
@@ -58,9 +99,9 @@ l_fp l_fp_init(int32 i, u_int32 f)
return temp;
}
-//also in timelalops.c!!!!!!
-bool AssertFpClose(const l_fp m,const l_fp n, const l_fp limit)
-{
+
+bool
+AssertFpClose(const l_fp m, const l_fp n, const l_fp limit) {
l_fp diff;
if (L_ISGEQ(&m, &n)) {
@@ -74,17 +115,14 @@ bool AssertFpClose(const l_fp m,const l_fp n, const l_fp limit)
return TRUE;
}
else {
- //<< m_expr << " which is " << l_fp_wrap(m)
- //<< "\nand\n"
- //<< n_expr << " which is " << l_fp_wrap(n)
- //<< "\nare not close; diff=" << l_fp_wrap(diff);
+ printf("m_expr which is %s \nand\nn_expr which is %s\nare not close; diff=%susec\n", lfptoa(&m, 10), lfptoa(&n, 10), lfptoa(&diff, 10));
return FALSE;
}
}
-bool AssertTimespecClose(const struct timespec m,const struct timespec n, const struct timespec limit)
-{
+bool
+AssertTimespecClose(const struct timespec m, const struct timespec n, const struct timespec limit) {
struct timespec diff;
diff = abs_tspec(sub_tspec(m, n));
@@ -92,10 +130,7 @@ bool AssertTimespecClose(const struct timespec m,const struct timespec n, const
return TRUE;
else
{
- //<< m_expr << " which is " << timespec_wrap(m)
- //<< "\nand\n"
- //<< n_expr << " which is " << timespec_wrap(n)
- //<< "\nare not close; diff=" << timespec_wrap(diff);
+ printf("m_expr which is %ld.%lu \nand\nn_expr which is %ld.%lu\nare not close; diff=%ld.%lunsec\n", m.tv_sec, m.tv_nsec, n.tv_sec, n.tv_nsec, diff.tv_sec, diff.tv_nsec);
return FALSE;
}
}
@@ -120,8 +155,8 @@ static const struct lfpfracdata fdata[] = {
};
-u_int32 my_tick_to_tsf(u_int32 ticks)
-{
+u_int32
+my_tick_to_tsf(u_int32 ticks) {
// convert nanoseconds to l_fp fractional units, using double
// precision float calculations or, if available, 64bit integer
// arithmetic. This should give the precise fraction, rounded to
@@ -135,8 +170,9 @@ u_int32 my_tick_to_tsf(u_int32 ticks)
// truncated nonsense, so don't use it out-of-bounds.
}
-u_int32 my_tsf_to_tick(u_int32 tsf)
-{
+
+u_int32
+my_tsf_to_tick(u_int32 tsf) {
// Inverse operation: converts fraction to microseconds.
#ifdef HAVE_U_INT64
return (u_int32)(( ((u_int64)(tsf)) * 1000000000 + 0x80000000) >> 32);
@@ -152,7 +188,8 @@ u_int32 my_tsf_to_tick(u_int32 tsf)
// test support stuff -- part 1
// ---------------------------------------------------------------------
-void test_Helpers1() {
+void
+test_Helpers1(void) {
struct timespec x;
for (x.tv_sec = -2; x.tv_sec < 3; x.tv_sec++) {
@@ -172,7 +209,8 @@ void test_Helpers1() {
// test normalisation
//----------------------------------------------------------------------
-void test_Normalise() {
+void
+test_Normalise(void) {
long ns;
for ( ns = -2000000000; ns <= 2000000000; ns += 10000000) {
struct timespec x = timespec_init(0, ns);
@@ -186,7 +224,8 @@ void test_Normalise() {
// test classification
//----------------------------------------------------------------------
-void test_SignNoFrac() {
+void
+test_SignNoFrac(void) {
// sign test, no fraction
int i;
for (i = -4; i <= 4; ++i) {
@@ -198,7 +237,9 @@ void test_SignNoFrac() {
}
}
-void test_SignWithFrac() {
+
+void
+test_SignWithFrac(void) {
// sign test, with fraction
int i;
for (i = -4; i <= 4; ++i) {
@@ -212,9 +253,10 @@ void test_SignWithFrac() {
//----------------------------------------------------------------------
// test compare
//----------------------------------------------------------------------
-void test_CmpFracEQ() {
+void
+test_CmpFracEQ(void) {
// fractions are equal
- int i,j;
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timespec a = timespec_init( i , 200);
@@ -225,9 +267,11 @@ void test_CmpFracEQ() {
}
}
-void test_CmpFracGT() {
+
+void
+test_CmpFracGT(void) {
// fraction a bigger fraction b
- int i,j;
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timespec a = timespec_init(i, 999999800);
@@ -238,9 +282,11 @@ void test_CmpFracGT() {
}
}
-void test_CmpFracLT() {
+
+void
+test_CmpFracLT(void) {
// fraction a less fraction b
- int i,j;
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timespec a = timespec_init(i, 200);
@@ -255,8 +301,9 @@ void test_CmpFracLT() {
// Test addition (sum)
//----------------------------------------------------------------------
-void test_AddFullNorm() {
- int i,j;
+void
+test_AddFullNorm(void) {
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timespec a = timespec_init(i, 200);
@@ -269,8 +316,10 @@ void test_AddFullNorm() {
}
}
-void test_AddFullOflow1() {
- int i,j;
+
+void
+test_AddFullOflow1(void) {
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timespec a = timespec_init(i, 200);
@@ -283,7 +332,9 @@ void test_AddFullOflow1() {
}
}
-void test_AddNsecNorm() {
+
+void
+test_AddNsecNorm(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 200);
@@ -295,7 +346,9 @@ void test_AddNsecNorm() {
}
}
-void test_AddNsecOflow1() {
+
+void
+test_AddNsecOflow1(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 200);
@@ -311,8 +364,9 @@ void test_AddNsecOflow1() {
// test subtraction (difference)
//----------------------------------------------------------------------
-void test_SubFullNorm() {
- int i,j;
+void
+test_SubFullNorm(void) {
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timespec a = timespec_init( i , 600);
@@ -325,13 +379,15 @@ void test_SubFullNorm() {
}
}
-void test_SubFullOflow() {
- int i,j;
+
+void
+test_SubFullOflow(void) {
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
- struct timespec a = timespec_init( i , 100);
- struct timespec b = timespec_init( j , 999999900);
- struct timespec E = timespec_init(i-j-1, 200);
+ struct timespec a = timespec_init(i, 100);
+ struct timespec b = timespec_init(j, 999999900);
+ struct timespec E = timespec_init(i - j - 1, 200);
struct timespec c;
c = sub_tspec(a, b);
@@ -339,7 +395,9 @@ void test_SubFullOflow() {
}
}
-void test_SubNsecNorm() {
+
+void
+test_SubNsecNorm(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 600);
@@ -351,7 +409,9 @@ void test_SubNsecNorm() {
}
}
-void test_SubNsecOflow() {
+
+void
+test_SubNsecOflow(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init( i , 100);
@@ -367,7 +427,9 @@ void test_SubNsecOflow() {
// test negation
//----------------------------------------------------------------------
-void test_Neg() {
+
+void
+test_Neg(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 100);
@@ -384,7 +446,8 @@ void test_Neg() {
// test abs value
//----------------------------------------------------------------------
-void test_AbsNoFrac() {
+void
+test_AbsNoFrac(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i , 0);
@@ -395,7 +458,9 @@ void test_AbsNoFrac() {
}
}
-void test_AbsWithFrac() {
+
+void
+test_AbsWithFrac(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timespec a = timespec_init(i, 100);
@@ -410,8 +475,9 @@ void test_AbsWithFrac() {
// test support stuff -- part 2
// ---------------------------------------------------------------------
-void test_Helpers2() {
- struct timespec limit = timespec_init(0,2);
+void
+test_Helpers2(void) {
+ struct timespec limit = timespec_init(0, 2);
struct timespec x, y;
long i;
@@ -420,30 +486,27 @@ void test_Helpers2() {
for (x.tv_nsec = 1;
x.tv_nsec < 1000000000;
x.tv_nsec += 499999999) {
- for (i = -4; i < 5; i++) {
+ for (i = -4; i < 5; ++i) {
y = x;
y.tv_nsec += i;
if (i >= -2 && i <= 2){
- TEST_ASSERT_TRUE(AssertTimespecClose(x,y,limit));//ASSERT_PRED_FORMAT2(isClose, x, y);
+ TEST_ASSERT_TRUE(AssertTimespecClose(x, y, limit));
}
else
{
- TEST_ASSERT_FALSE(AssertTimespecClose(x,y,limit));//ASSERT_PRED_FORMAT2(!isClose, x, y);
+ TEST_ASSERT_FALSE(AssertTimespecClose(x, y, limit));
}
}
}
}
-// global predicate instances we're using here
-//static l_fp lfpClose = l_fp_init(0,1); //static AssertFpClose FpClose(0, 1);
-//static struct timespec limit = timespec_init(0,2); //static AssertTimespecClose TimespecClose(0, 2);
-
//----------------------------------------------------------------------
// conversion to l_fp
//----------------------------------------------------------------------
-void test_ToLFPbittest() {
- l_fp lfpClose = l_fp_init(0,1);
+void
+test_ToLFPbittest(void) {
+ l_fp lfpClose = l_fp_init(0, 1);
u_int32 i;
for (i = 0; i < 1000000000; i+=1000) {
struct timespec a = timespec_init(1, i);
@@ -451,13 +514,15 @@ void test_ToLFPbittest() {
l_fp r;
r = tspec_intv_to_lfp(a);
- TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose)); //ASSERT_PRED_FORMAT2(FpClose, E, r);
+ TEST_ASSERT_TRUE(AssertFpClose(E, r, lfpClose));
}
}
-void test_ToLFPrelPos() {
+
+void
+test_ToLFPrelPos(void) {
int i;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
struct timespec a = timespec_init(1, fdata[i].nsec);
l_fp E = l_fp_init(1, fdata[i].frac);
l_fp r;
@@ -467,9 +532,11 @@ void test_ToLFPrelPos() {
}
}
-void test_ToLFPrelNeg() {
+
+void
+test_ToLFPrelNeg(void) {
int i;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
struct timespec a = timespec_init(-1, fdata[i].nsec);
l_fp E = l_fp_init(~0, fdata[i].frac);
l_fp r;
@@ -479,9 +546,11 @@ void test_ToLFPrelNeg() {
}
}
-void test_ToLFPabs() {
+
+void
+test_ToLFPabs(void) {
int i;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
struct timespec a = timespec_init(1, fdata[i].nsec);
l_fp E = l_fp_init(1 + JAN_1970, fdata[i].frac);
l_fp r;
@@ -494,8 +563,10 @@ void test_ToLFPabs() {
//----------------------------------------------------------------------
// conversion from l_fp
//----------------------------------------------------------------------
-void test_FromLFPbittest() {
- struct timespec limit = timespec_init(0,2);
+
+void
+test_FromLFPbittest(void) {
+ struct timespec limit = timespec_init(0, 2);
// Not *exactly* a bittest, because 2**32 tests would take a
// really long time even on very fast machines! So we do test
@@ -509,43 +580,48 @@ void test_FromLFPbittest() {
r = lfp_intv_to_tspec(a);
// The conversion might be off by one nanosecond when
// comparing to calculated value.
- TEST_ASSERT_TRUE(AssertTimespecClose(E,r,limit)); //ASSERT_PRED_FORMAT2(TimespecClose, E, r);
+ TEST_ASSERT_TRUE(AssertTimespecClose(E, r, limit));
}
}
-void test_FromLFPrelPos() {
- struct timespec limit = timespec_init(0,2);
+
+void
+test_FromLFPrelPos(void) {
+ struct timespec limit = timespec_init(0, 2);
int i;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
l_fp a = l_fp_init(1, fdata[i].frac);
struct timespec E = timespec_init(1, fdata[i].nsec);
struct timespec r;
r = lfp_intv_to_tspec(a);
- TEST_ASSERT_TRUE(AssertTimespecClose(E,r,limit)); //ASSERT_PRED_FORMAT2(TimespecClose, E, r);
+ TEST_ASSERT_TRUE(AssertTimespecClose(E, r, limit));
}
}
-void test_FromLFPrelNeg() {
- struct timespec limit = timespec_init(0,2);
+
+void
+test_FromLFPrelNeg(void) {
+ struct timespec limit = timespec_init(0, 2);
int i;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
l_fp a = l_fp_init(~0, fdata[i].frac);
struct timespec E = timespec_init(-1, fdata[i].nsec);
struct timespec r;
r = lfp_intv_to_tspec(a);
- TEST_ASSERT_TRUE(AssertTimespecClose(E,r,limit)); //ASSERT_PRED_FORMAT2(TimespecClose, E, r);
+ TEST_ASSERT_TRUE(AssertTimespecClose(E, r, limit));
}
}
// nsec -> frac -> nsec roundtrip, using a prime start and increment
-void test_LFProundtrip() {
+void
+test_LFProundtrip(void) {
int32_t t;
u_int32 i;
for (t = -1; t < 2; ++t)
- for (i = 4999; i < 1000000000; i+=10007) {
+ for (i = 4999; i < 1000000000; i += 10007) {
struct timespec E = timespec_init(t, i);
l_fp a;
struct timespec r;
@@ -560,7 +636,8 @@ void test_LFProundtrip() {
// string formatting
//----------------------------------------------------------------------
-void test_ToString() {
+void
+test_ToString(void) {
static const struct {
time_t sec;
long nsec;
@@ -576,7 +653,7 @@ void test_ToString() {
{-1,-1, "-1.000000001" },
};
int i;
- for (i = 0; i < COUNTOF(data); i++) {
+ for (i = 0; i < COUNTOF(data); ++i) {
struct timespec a = timespec_init(data[i].sec, data[i].nsec);
const char * E = data[i].repr;
const char * r = tspectoa(a);
diff --git a/contrib/ntp/tests/libntp/timevalops.c b/contrib/ntp/tests/libntp/timevalops.c
index 080dfb737d17..a2d9358f97bc 100644
--- a/contrib/ntp/tests/libntp/timevalops.c
+++ b/contrib/ntp/tests/libntp/timevalops.c
@@ -5,47 +5,87 @@
#include "ntp_types.h"
#include "ntp_fp.h"
-#include <math.h>
#include "timevalops.h"
+#include <math.h>
#include "unity.h"
-//in unity_helper.h :
#define TEST_ASSERT_EQUAL_timeval(a, b) { \
TEST_ASSERT_EQUAL_MESSAGE(a.tv_sec, b.tv_sec, "Field tv_sec"); \
TEST_ASSERT_EQUAL_MESSAGE(a.tv_usec, b.tv_usec, "Field tv_usec"); \
}
-//timeval has time_t, long, and time_t is basically uint
static u_int32 my_tick_to_tsf(u_int32 ticks);
static u_int32 my_tsf_to_tick(u_int32 tsf);
+
// that's it...
typedef struct {
long usec;
u_int32 frac;
} lfpfracdata ;
+typedef int bool;
+
+struct timeval timeval_init( time_t hi, long lo);
+const bool timeval_isValid(struct timeval V);
+l_fp l_fp_init(int32 i, u_int32 f);
+bool AssertTimevalClose(const struct timeval m, const struct timeval n, const struct timeval limit);
+bool AssertFpClose(const l_fp m, const l_fp n, const l_fp limit);
+
+void test_Helpers1(void);
+void test_Normalise(void);
+void test_SignNoFrac(void);
+void test_SignWithFrac(void);
+void test_CmpFracEQ(void);
+void test_CmpFracGT(void);
+void test_CmpFracLT(void);
+void test_AddFullNorm(void);
+void test_AddFullOflow1(void);
+void test_AddUsecNorm(void);
+void test_AddUsecOflow1(void);
+void test_SubFullNorm(void);
+void test_SubFullOflow(void);
+void test_SubUsecNorm(void);
+void test_SubUsecOflow(void);
+void test_Neg(void);
+void test_AbsNoFrac(void);
+void test_AbsWithFrac(void);
+void test_Helpers2(void);
+void test_ToLFPbittest(void);
+void test_ToLFPrelPos(void);
+void test_ToLFPrelNeg(void);
+void test_ToLFPabs(void);
+void test_FromLFPbittest(void);
+void test_FromLFPrelPos(void);
+void test_FromLFPrelNeg(void);
+void test_LFProundtrip(void);
+void test_ToString(void);
+
//******************************************MY CUSTOM FUNCTIONS*******************************
-typedef int bool; //TRUE and FALSE are already defined somewhere, so I can't do typedef enum { FALSE, TRUE } boolean;
-struct timeval timeval_init( time_t hi, long lo){
+
+struct timeval
+timeval_init( time_t hi, long lo){
struct timeval V;
V.tv_sec = hi;
V.tv_usec = lo;
return V;
}
-const bool timeval_isValid(struct timeval V)
- { return V.tv_usec >= 0 && V.tv_usec < 1000000; }
-//taken from lfpfunc.c -> maybe remove this from timevalops.c and lfpfunc. and put in c_timstructs.h ????!!!!!
-l_fp l_fp_init(int32 i, u_int32 f)
-{
+const bool
+timeval_isValid(struct timeval V) {
+ return V.tv_usec >= 0 && V.tv_usec < 1000000;
+}
+
+
+l_fp
+l_fp_init(int32 i, u_int32 f) {
l_fp temp;
temp.l_i = i;
temp.l_uf = f;
@@ -53,8 +93,9 @@ l_fp l_fp_init(int32 i, u_int32 f)
return temp;
}
-bool AssertTimevalClose(const struct timeval m, const struct timeval n, const struct timeval limit)
-{
+
+bool
+AssertTimevalClose(const struct timeval m, const struct timeval n, const struct timeval limit) {
struct timeval diff;
diff = abs_tval(sub_tval(m, n));
@@ -63,17 +104,16 @@ bool AssertTimevalClose(const struct timeval m, const struct timeval n, const st
else
{
- //printf("");
- //<< m_expr << " which is " << timeval_wrap(m)
- //<< "\nand\n"
- //<< n_expr << " which is " << timeval_wrap(n)
- //<< "\nare not close; diff=" << timeval_wrap(diff);
+ printf("m_expr which is %ld.%lu \nand\nn_expr which is %ld.%lu\nare not close; diff=%ld.%luusec\n", m.tv_sec, m.tv_usec, n.tv_sec, n.tv_usec, diff.tv_sec, diff.tv_usec);
+ //I don't have variables m_expr and n_expr in unity, those are command line arguments which only getst has!!!
+
return FALSE;
}
}
-bool AssertFpClose(const l_fp m,const l_fp n, const l_fp limit)
-{
+
+bool
+AssertFpClose(const l_fp m, const l_fp n, const l_fp limit) {
l_fp diff;
if (L_ISGEQ(&m, &n)) {
@@ -87,10 +127,8 @@ bool AssertFpClose(const l_fp m,const l_fp n, const l_fp limit)
return TRUE;
}
else {
- //<< m_expr << " which is " << l_fp_wrap(m)
- //<< "\nand\n"
- //<< n_expr << " which is " << l_fp_wrap(n)
- //<< "\nare not close; diff=" << l_fp_wrap(diff);
+ printf("m_expr which is %s \nand\nn_expr which is %s\nare not close; diff=%susec\n", lfptoa(&m, 10), lfptoa(&n, 10), lfptoa(&diff, 10));
+ //printf("m_expr which is %d.%d \nand\nn_expr which is %d.%d\nare not close; diff=%d.%dusec\n", m.l_uf, m.Ul_i, n.l_uf, n.Ul_i, diff.l_uf, diff.Ul_i);
return FALSE;
}
}
@@ -116,8 +154,8 @@ static const lfpfracdata fdata[] = {
};
-u_int32 my_tick_to_tsf(u_int32 ticks)
-{
+u_int32
+my_tick_to_tsf(u_int32 ticks) {
// convert microseconds to l_fp fractional units, using double
// precision float calculations or, if available, 64bit integer
// arithmetic. This should give the precise fraction, rounded to
@@ -131,8 +169,9 @@ u_int32 my_tick_to_tsf(u_int32 ticks)
// truncated nonsense, so don't use it out-of-bounds.
}
-u_int32 my_tsf_to_tick(u_int32 tsf)
-{
+
+u_int32
+my_tsf_to_tick(u_int32 tsf) {
// Inverse operation: converts fraction to microseconds.
#ifdef HAVE_U_INT64
return (u_int32)( ((u_int64)(tsf) * 1000000 + 0x80000000) >> 32); //CHECK ME!!!
@@ -150,7 +189,8 @@ u_int32 my_tsf_to_tick(u_int32 tsf)
// test support stuff - part1
// ---------------------------------------------------------------------
-void test_Helpers1() {
+void
+test_Helpers1(void) {
struct timeval x;
for (x.tv_sec = -2; x.tv_sec < 3; x.tv_sec++) {
@@ -170,7 +210,8 @@ void test_Helpers1() {
// test normalisation
//----------------------------------------------------------------------
-void test_Normalise() {
+void
+test_Normalise(void) {
long ns;
for (ns = -2000000000; ns <= 2000000000; ns += 10000000) {
struct timeval x = timeval_init(0, ns);
@@ -184,7 +225,8 @@ void test_Normalise() {
// test classification
//----------------------------------------------------------------------
-void test_SignNoFrac() {
+void
+test_SignNoFrac(void) {
int i;
// sign test, no fraction
for (i = -4; i <= 4; ++i) {
@@ -196,7 +238,9 @@ void test_SignNoFrac() {
}
}
-void test_SignWithFrac() {
+
+void
+test_SignWithFrac(void) {
// sign test, with fraction
int i;
for (i = -4; i <= 4; ++i) {
@@ -211,8 +255,9 @@ void test_SignWithFrac() {
//----------------------------------------------------------------------
// test compare
//----------------------------------------------------------------------
-void test_CmpFracEQ() {
- int i,j;
+void
+test_CmpFracEQ(void) {
+ int i, j;
// fractions are equal
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
@@ -225,9 +270,11 @@ void test_CmpFracEQ() {
}
}
-void test_CmpFracGT() {
+
+void
+test_CmpFracGT(void) {
// fraction a bigger fraction b
- int i,j;
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timeval a = timeval_init( i , 999800);
@@ -239,9 +286,11 @@ void test_CmpFracGT() {
}
}
-void test_CmpFracLT() {
+
+void
+test_CmpFracLT(void) {
// fraction a less fraction b
- int i,j;
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timeval a = timeval_init(i, 200);
@@ -257,8 +306,9 @@ void test_CmpFracLT() {
// Test addition (sum)
//----------------------------------------------------------------------
-void test_AddFullNorm() {
- int i,j;
+void
+test_AddFullNorm(void) {
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timeval a = timeval_init(i, 200);
@@ -271,8 +321,10 @@ void test_AddFullNorm() {
}
}
-void test_AddFullOflow1() {
- int i,j;
+
+void
+test_AddFullOflow1(void) {
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timeval a = timeval_init(i, 200);
@@ -285,7 +337,9 @@ void test_AddFullOflow1() {
}
}
-void test_AddUsecNorm() {
+
+void
+test_AddUsecNorm(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 200);
@@ -297,7 +351,9 @@ void test_AddUsecNorm() {
}
}
-void test_AddUsecOflow1() {
+
+void
+test_AddUsecOflow1(void) {
int i;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 200);
@@ -313,8 +369,9 @@ void test_AddUsecOflow1() {
// test subtraction (difference)
//----------------------------------------------------------------------
-void test_SubFullNorm() {
- int i,j;
+void
+test_SubFullNorm(void) {
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timeval a = timeval_init(i, 600);
@@ -327,8 +384,10 @@ void test_SubFullNorm() {
}
}
-void test_SubFullOflow() {
- int i,j;
+
+void
+test_SubFullOflow(void) {
+ int i, j;
for (i = -4; i <= 4; ++i)
for (j = -4; j <= 4; ++j) {
struct timeval a = timeval_init(i, 100);
@@ -341,7 +400,9 @@ void test_SubFullOflow() {
}
}
-void test_SubUsecNorm() {
+
+void
+test_SubUsecNorm(void) {
int i = -4;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 600);
@@ -353,7 +414,9 @@ void test_SubUsecNorm() {
}
}
-void test_SubUsecOflow() {
+
+void
+test_SubUsecOflow(void) {
int i = -4;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 100);
@@ -369,7 +432,8 @@ void test_SubUsecOflow() {
// test negation
//----------------------------------------------------------------------
-void test_Neg() {
+void
+test_Neg(void) {
int i = -4;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 100);
@@ -386,7 +450,8 @@ void test_Neg() {
// test abs value
//----------------------------------------------------------------------
-void test_AbsNoFrac() {
+void
+test_AbsNoFrac(void) {
int i = -4;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 0);
@@ -397,7 +462,9 @@ void test_AbsNoFrac() {
}
}
-void test_AbsWithFrac() {
+
+void
+test_AbsWithFrac(void) {
int i = -4;
for (i = -4; i <= 4; ++i) {
struct timeval a = timeval_init(i, 100);
@@ -413,8 +480,9 @@ void test_AbsWithFrac() {
// ---------------------------------------------------------------------
-void test_Helpers2() {
- //struct AssertTimevalClose isClose = AssertTimevalClose_init(0, 2);
+void
+test_Helpers2(void) {
+
struct timeval limit = timeval_init(0, 2);
struct timeval x, y;
long i;
@@ -423,14 +491,14 @@ void test_Helpers2() {
for (x.tv_usec = 1;
x.tv_usec < 1000000;
x.tv_usec += 499999) {
- for (i = -4; i < 5; i++) {
+ for (i = -4; i < 5; ++i) {
y = x;
y.tv_usec += i;
if (i >= -2 && i <= 2){
- TEST_ASSERT_TRUE(AssertTimevalClose(x,y,limit));//ASSERT_PRED_FORMAT2(isClose, x, y);
+ TEST_ASSERT_TRUE(AssertTimevalClose(x, y, limit));//ASSERT_PRED_FORMAT2(isClose, x, y);
}
else {
- TEST_ASSERT_FALSE(AssertTimevalClose(x,y,limit));//ASSERT_PRED_FORMAT2(!isClose, x, y);
+ TEST_ASSERT_FALSE(AssertTimevalClose(x, y, limit));
}
}
}
@@ -439,66 +507,72 @@ void test_Helpers2() {
// and the global predicate instances we're using here
-//static l_fp lfpClose = l_fp_init(0,1); //static AssertFpClose FpClose(0, 1);
-//static struct timeval timevalClose = timeval_init(0,1); //static AssertTimevalClose TimevalClose(0, 1);
+//static l_fp lfpClose = l_fp_init(0, 1); //static AssertFpClose FpClose(0, 1);
+//static struct timeval timevalClose = timeval_init(0, 1); //static AssertTimevalClose TimevalClose(0, 1);
//----------------------------------------------------------------------
// conversion to l_fp
//----------------------------------------------------------------------
-void test_ToLFPbittest() {
- l_fp lfpClose = l_fp_init(0,1);
+void
+test_ToLFPbittest(void) {
+ l_fp lfpClose = l_fp_init(0, 1);
u_int32 i = 0;
- for (i = 0; i < 1000000; i++) {
+ for (i = 0; i < 1000000; ++i) {
struct timeval a = timeval_init(1, i);
- l_fp E = l_fp_init(1,my_tick_to_tsf(i));
+ l_fp E = l_fp_init(1, my_tick_to_tsf(i));
l_fp r;
r = tval_intv_to_lfp(a);
- TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose)); //ASSERT_PRED_FORMAT2(FpClose, E, r);
+ TEST_ASSERT_TRUE(AssertFpClose(E, r, lfpClose)); //ASSERT_PRED_FORMAT2(FpClose, E, r);
}
}
-void test_ToLFPrelPos() {
- l_fp lfpClose = l_fp_init(0,1);
+void
+test_ToLFPrelPos(void) {
+ l_fp lfpClose = l_fp_init(0, 1);
int i = 0;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
struct timeval a = timeval_init(1, fdata[i].usec);
l_fp E = l_fp_init(1, fdata[i].frac);
l_fp r;
r = tval_intv_to_lfp(a);
- TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose)); //ASSERT_PRED_FORMAT2(FpClose, E, r);
+ TEST_ASSERT_TRUE(AssertFpClose(E, r, lfpClose));
}
}
-void test_ToLFPrelNeg() {
- l_fp lfpClose = l_fp_init(0,1);
+
+void
+test_ToLFPrelNeg(void) {
+ l_fp lfpClose = l_fp_init(0, 1);
int i = 0;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
struct timeval a = timeval_init(-1, fdata[i].usec);
l_fp E = l_fp_init(~0, fdata[i].frac);
l_fp r;
r = tval_intv_to_lfp(a);
- TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose)); //ASSERT_PRED_FORMAT2(FpClose,E, r);
+ TEST_ASSERT_TRUE(AssertFpClose(E, r, lfpClose));
}
}
-void test_ToLFPabs() {
- l_fp lfpClose = l_fp_init(0,1);
+
+void
+test_ToLFPabs(void) {
+ l_fp lfpClose = l_fp_init(0, 1);
int i = 0;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
struct timeval a = timeval_init(1, fdata[i].usec);
l_fp E = l_fp_init(1 + JAN_1970, fdata[i].frac);
l_fp r;
r = tval_stamp_to_lfp(a);
- TEST_ASSERT_TRUE(AssertFpClose(E,r,lfpClose)); //ASSERT_PRED_FORMAT2(FpClose, E, r);
+ TEST_ASSERT_TRUE(AssertFpClose(E, r, lfpClose));
}
}
@@ -506,8 +580,9 @@ void test_ToLFPabs() {
// conversion from l_fp
//----------------------------------------------------------------------
-void test_FromLFPbittest() {
- struct timeval timevalClose = timeval_init(0,1);
+void
+test_FromLFPbittest(void) {
+ struct timeval timevalClose = timeval_init(0, 1);
// Not *exactly* a bittest, because 2**32 tests would take a
// really long time even on very fast machines! So we do test
// every 1000 fractional units.
@@ -520,42 +595,48 @@ void test_FromLFPbittest() {
r = lfp_intv_to_tval(a);
// The conversion might be off by one microsecond when
// comparing to calculated value.
- TEST_ASSERT_TRUE(AssertTimevalClose(E,r,timevalClose)); //ASSERT_PRED_FORMAT2(TimevalClose, E, r);
+ TEST_ASSERT_TRUE(AssertTimevalClose(E, r, timevalClose));
}
}
-void test_FromLFPrelPos() {
- struct timeval timevalClose = timeval_init(0,1);
+
+void
+test_FromLFPrelPos(void) {
+ struct timeval timevalClose = timeval_init(0, 1);
int i = 0;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
l_fp a = l_fp_init(1, fdata[i].frac);
struct timeval E = timeval_init(1, fdata[i].usec);
struct timeval r;
r = lfp_intv_to_tval(a);
- TEST_ASSERT_TRUE(AssertTimevalClose(E,r,timevalClose)); //ASSERT_PRED_FORMAT2(TimevalClose, E, r);
+ TEST_ASSERT_TRUE(AssertTimevalClose(E, r, timevalClose));
}
}
-void test_FromLFPrelNeg() {
- struct timeval timevalClose = timeval_init(0,1);
+
+void
+test_FromLFPrelNeg(void) {
+ struct timeval timevalClose = timeval_init(0, 1);
int i = 0;
- for (i = 0; i < COUNTOF(fdata); i++) {
+ for (i = 0; i < COUNTOF(fdata); ++i) {
l_fp a = l_fp_init(~0, fdata[i].frac);
struct timeval E = timeval_init(-1, fdata[i].usec);
struct timeval r;
r = lfp_intv_to_tval(a);
- TEST_ASSERT_TRUE(AssertTimevalClose(E,r,timevalClose)); //ASSERT_PRED_FORMAT2(TimevalClose, E, r);
+ TEST_ASSERT_TRUE(AssertTimevalClose(E, r, timevalClose));
}
}
+
// usec -> frac -> usec roundtrip, using a prime start and increment
-void test_LFProundtrip() {
+void
+test_LFProundtrip(void) {
int32_t t = -1;
u_int32 i = 5;
for (t = -1; t < 2; ++t)
- for (i = 5; i < 1000000; i+=11) {
+ for (i = 5; i < 1000000; i += 11) {
struct timeval E = timeval_init(t, i);
l_fp a;
struct timeval r;
@@ -570,7 +651,8 @@ void test_LFProundtrip() {
// string formatting
//----------------------------------------------------------------------
-void test_ToString() {
+void
+test_ToString(void) {
static const struct {
time_t sec;
long usec;
@@ -588,7 +670,7 @@ void test_ToString() {
int i;
for (i = 0; i < COUNTOF(data); ++i) {
struct timeval a = timeval_init(data[i].sec, data[i].usec);
- const char * E = data[i].repr; //??
+ const char * E = data[i].repr;
const char * r = tvaltoa(a);
TEST_ASSERT_EQUAL_STRING(E, r);
diff --git a/contrib/ntp/tests/libntp/tstotv.c b/contrib/ntp/tests/libntp/tstotv.c
index 080172752fda..dac7e53b5e47 100644
--- a/contrib/ntp/tests/libntp/tstotv.c
+++ b/contrib/ntp/tests/libntp/tstotv.c
@@ -5,9 +5,14 @@
#include "unity.h"
+void test_Seconds(void);
+void test_MicrosecondsExact(void);
+void test_MicrosecondsRounding(void);
+
+
void
test_Seconds(void) {
- const l_fp input = {50, 0}; // 50.0 s
+ const l_fp input = {{50}, 0}; /* 50.0 s */
const struct timeval expected = {50, 0};
struct timeval actual;
@@ -20,7 +25,7 @@ test_Seconds(void) {
void
test_MicrosecondsExact(void) {
const u_long HALF = 2147483648UL;
- const l_fp input = {50, HALF}; // 50.5 s
+ const l_fp input = {{50}, HALF}; /* 50.5 s */
const struct timeval expected = {50, 500000};
struct timeval actual;
@@ -33,7 +38,7 @@ test_MicrosecondsExact(void) {
void
test_MicrosecondsRounding(void) {
- const l_fp input = {50, 3865471UL}; // Should round to 50.0009
+ const l_fp input = {{50}, 3865471UL}; /* Should round to 50.0009 */
const struct timeval expected = {50, 900};
struct timeval actual;
diff --git a/contrib/ntp/tests/libntp/tvtots.c b/contrib/ntp/tests/libntp/tvtots.c
index 6c8345aaaa1b..a13846d8f405 100644
--- a/contrib/ntp/tests/libntp/tvtots.c
+++ b/contrib/ntp/tests/libntp/tvtots.c
@@ -4,13 +4,18 @@
#include "timevalops.h"
#include "unity.h"
-#include <math.h>// Required on Solaris for ldexp.
+#include <math.h> /* Required on Solaris for ldexp. */
-void test_Seconds(void)
+void test_Seconds(void);
+void test_MicrosecondsRounded(void);
+void test_MicrosecondsExact(void);
+
+void
+test_Seconds(void)
{
- struct timeval input = {500, 0}; // 500.0 s
- l_fp expected = {500, 0};
+ struct timeval input = {500, 0}; /* 500.0 s */
+ l_fp expected = {{500}, 0};
l_fp actual;
TVTOTS(&input, &actual);
@@ -18,37 +23,42 @@ void test_Seconds(void)
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_MicrosecondsRounded(void)
+
+void
+test_MicrosecondsRounded(void)
{
/* 0.0005 can not be represented exact in a l_fp structure.
* It would equal to 2147483,648. This means that
* HALF_PROMILLE_UP (which is 2147484) should be
* the correct rounding. */
- struct timeval input = {0, 500}; // 0.0005 exact
- l_fp expected = {0, HALF_PROMILLE_UP};
+ struct timeval input = {0, 500}; /* 0.0005 exact */
+ l_fp expected = {{0}, HALF_PROMILLE_UP};
l_fp actual;
TVTOTS(&input, &actual);
+
TEST_ASSERT_TRUE(IsEqual(expected, actual));
}
-void test_MicrosecondsExact(void)
+
+void
+test_MicrosecondsExact(void)
{
- // 0.5 can be represented exact in both l_fp and timeval.
- const struct timeval input = {10, 500000}; // 0.5 exact
- const l_fp expected = {10, HALF}; // 0.5 exact
+ /* 0.5 can be represented exact in both l_fp and timeval. */
+ const struct timeval input = {10, 500000}; /* 0.5 exact */
+ const l_fp expected = {{10}, HALF}; /* 0.5 exact */
l_fp actual;
TVTOTS(&input, &actual);
- // Compare the fractional part with an absolute error given.
+ /* Compare the fractional part with an absolute error given. */
TEST_ASSERT_EQUAL_UINT(expected.l_ui, actual.l_ui);
double expectedDouble, actualDouble;
M_LFPTOD(0, expected.l_uf, expectedDouble);
M_LFPTOD(0, actual.l_uf, actualDouble);
- // The error should be less than 0.5 us
- TEST_ASSERT_DOUBLE_WITHIN(0000005, expectedDouble, actualDouble);
+ /* The error should be less than 0.5 us */
+ TEST_ASSERT_DOUBLE_WITHIN(0.0000005, expectedDouble, actualDouble);
}
diff --git a/contrib/ntp/tests/libntp/uglydate.c b/contrib/ntp/tests/libntp/uglydate.c
index a8d02d15b910..f47f3e429375 100644
--- a/contrib/ntp/tests/libntp/uglydate.c
+++ b/contrib/ntp/tests/libntp/uglydate.c
@@ -1,17 +1,17 @@
#include "config.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
#include "ntp_fp.h"
#include "unity.h"
+void test_ConstantDateTime(void);
void
test_ConstantDateTime(void) {
const u_int32 HALF = 2147483648UL;
- l_fp time = {3485080800UL, HALF}; // 2010-06-09 14:00:00.5
+ l_fp time = {{3485080800UL}, HALF}; /* 2010-06-09 14:00:00.5 */
TEST_ASSERT_EQUAL_STRING("3485080800.500000 10:159:14:00:00.500",
uglydate(&time));
diff --git a/contrib/ntp/tests/libntp/vi64ops.c b/contrib/ntp/tests/libntp/vi64ops.c
index af7dd1b7bfeb..843c0a334b73 100644
--- a/contrib/ntp/tests/libntp/vi64ops.c
+++ b/contrib/ntp/tests/libntp/vi64ops.c
@@ -1,36 +1,42 @@
#include "config.h"
#include "ntp_stdlib.h"
+#include "vint64ops.h"
#include "unity.h"
-#include "vint64ops.h"
-//technically bool
-//int IsEqual(const vint64 &expected, const vint64 &actual) {
-int IsEqual(const vint64 expected, const vint64 actual) {
+int IsEqual(const vint64 expected, const vint64 actual);
+void test_ParseVUI64_pos(void);
+void test_ParseVUI64_neg(void);
+void test_ParseVUI64_case(void);
+
+
+// technically bool
+int
+IsEqual(const vint64 expected, const vint64 actual) {
if (0 == memcmp(&expected, &actual, sizeof(vint64))) {
- printf( "%x.", expected.D_s.hi); //<< std::hex << expected.D_s.hi << '.'
- printf("%x",expected.D_s.lo);//<< std::hex << expected.D_s.lo
+ printf( "%x.", expected.D_s.hi);
+ printf("%x", expected.D_s.lo);
printf(" but was ");
- printf("%x.",actual.D_s.hi); //<< std::hex << actual.D_s.hi << '.'
- printf("%x\n",actual.D_s.lo); //<< std::hex << actual.D_s.lo;
+ printf("%x.", actual.D_s.hi);
+ printf("%x\n", actual.D_s.lo);
return TRUE;
} else {
-
printf("expected: ");
- printf( "%d.", expected.D_s.hi); //<< std::hex << expected.D_s.hi << '.'
- printf("%d",expected.D_s.lo);//<< std::hex << expected.D_s.lo
+ printf( "%d.", expected.D_s.hi);
+ printf("%d", expected.D_s.lo);
printf(" but was ");
- printf("%d",actual.D_s.lo); //<< std::hex << actual.D_s.hi << '.'
- printf("%d",actual.D_s.lo); //<< std::hex << actual.D_s.lo;
+ printf("%d", actual.D_s.lo);
+ printf("%d", actual.D_s.lo);
return FALSE;
}
}
// ----------------------------------------------------------------------
// test number parser
-void test_ParseVUI64_pos() {
+void
+test_ParseVUI64_pos(void) {
vint64 act, exp;
const char *sp;
char *ep;
@@ -44,7 +50,9 @@ void test_ParseVUI64_pos() {
TEST_ASSERT_EQUAL(*ep, 'x');
}
-void test_ParseVUI64_neg() {
+
+void
+test_ParseVUI64_neg(void) {
vint64 act, exp;
const char *sp;
char *ep;
@@ -57,7 +65,8 @@ void test_ParseVUI64_neg() {
TEST_ASSERT_EQUAL(*ep, 'x');
}
-void test_ParseVUI64_case() {
+void
+test_ParseVUI64_case(void) {
vint64 act, exp;
const char *sp;
char *ep;
@@ -69,4 +78,3 @@ void test_ParseVUI64_case() {
TEST_ASSERT_TRUE(IsEqual(exp, act));
TEST_ASSERT_EQUAL(*ep, '\0');
}
-
diff --git a/contrib/ntp/tests/libntp/ymd2yd.c b/contrib/ntp/tests/libntp/ymd2yd.c
index 8e0725c13866..ccb7fb91f962 100644
--- a/contrib/ntp/tests/libntp/ymd2yd.c
+++ b/contrib/ntp/tests/libntp/ymd2yd.c
@@ -1,35 +1,37 @@
#include "config.h"
#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
#include "unity.h"
-void setUp(void)
-{
-}
-
-void tearDown(void)
-{
-}
+void test_NonLeapYearFebruary(void);
+void test_NonLeapYearJune(void);
+void test_LeapYearFebruary(void);
+void test_LeapYearDecember(void);
-void test_NonLeapYearFebruary (void) {
- TEST_ASSERT_EQUAL(31+20, ymd2yd(2010,2,20)); //2010-02-20
+void
+test_NonLeapYearFebruary(void) {
+ TEST_ASSERT_EQUAL(31 + 20, ymd2yd(2010, 2, 20)); //2010-02-20
}
-void test_NonLeapYearJune (void) {
+
+void
+test_NonLeapYearJune(void) {
int expected = 31+28+31+30+31+18; // 18 June non-leap year
- TEST_ASSERT_EQUAL(expected, ymd2yd(2011,6,18));
+ TEST_ASSERT_EQUAL(expected, ymd2yd(2011, 6, 18));
}
-void test_LeapYearFebruary (void) {
- TEST_ASSERT_EQUAL(31+20, ymd2yd(2012,2,20)); //2012-02-20 (leap year)
+
+void
+test_LeapYearFebruary(void) {
+ TEST_ASSERT_EQUAL(31 + 20, ymd2yd(2012, 2, 20)); //2012-02-20 (leap year)
}
-void test_LeapYearDecember (void) {
+
+void
+test_LeapYearDecember(void) {
// 2012-12-31
int expected = 31+29+31+30+31+30+31+31+30+31+30+31;
- TEST_ASSERT_EQUAL(expected, ymd2yd(2012,12,31));
+ TEST_ASSERT_EQUAL(expected, ymd2yd(2012, 12, 31));
}
-
diff --git a/contrib/ntp/tests/ntpd/Makefile.am b/contrib/ntp/tests/ntpd/Makefile.am
index c5df6e4a32c4..2cab14f4c722 100644
--- a/contrib/ntp/tests/ntpd/Makefile.am
+++ b/contrib/ntp/tests/ntpd/Makefile.am
@@ -2,48 +2,205 @@ NULL =
BUILT_SOURCES =
CLEANFILES =
-check_PROGRAMS = tests
+std_unity_list = \
+ $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \
+ $(NULL)
+
+run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
+
+check_PROGRAMS = \
+ test-leapsec \
+ test-ntp_prio_q \
+ $(NULL)
+if BUILD_TEST_NTP_RESTRICT
+check_PROGRAMS += test-ntp_restrict
+endif
+if BUILD_TEST_NTP_SCANNER
+check_PROGRAMS += test-ntp_scanner
+endif
+if BUILD_TEST_NTP_SIGND
+check_PROGRAMS += test-ntp_signd
+endif
+check_PROGRAMS += \
+ test-rc_cmdlength \
+ $(NULL)
+
+EXTRA_PROGRAMS = \
+ test-ntp_restrict \
+ test-ntp_scanner \
+ test-ntp_signd \
+ $(NULL)
+
LDADD = \
+ $(top_builddir)/ntpd/libntpd.a \
$(top_builddir)/libntp/libntp.a \
$(LDADD_LIBNTP) \
$(PTHREAD_LIBS) \
$(LDADD_NTP) \
- $(GTEST_LDFLAGS) \
- $(GTEST_LIBS) \
+ $(NULL)
+
+unity_tests_LDADD = \
+ $(LDADD) \
+ $(top_builddir)/sntp/unity/libunity.a \
+ $(LIBM) \
$(NULL)
AM_CFLAGS = $(CFLAGS_NTP)
-AM_CXXFLAGS = $(GTEST_CXXFLAGS)
AM_CPPFLAGS = $(NTP_INCS)
AM_CPPFLAGS += -I$(top_srcdir)/sntp
AM_CPPFLAGS += -I$(top_srcdir)/ntpd
-AM_CPPFLAGS += $(GTEST_CPPFLAGS)
+AM_CPPFLAGS += -I$(top_srcdir)/tests/libntp
AM_CPPFLAGS += $(CPPFLAGS_NTP)
+AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H
+AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
-tests_SOURCES = $(top_srcdir)/sntp/tests_main.cpp \
- ntpdtest.cpp \
- $(top_srcdir)/ntpd/ntp_leapsec.c \
- leapsec.cpp \
- $(NULL)
+BUILT_SOURCES += \
+ $(srcdir)/run-leapsec.c \
+ $(srcdir)/run-ntp_prio_q.c \
+ $(srcdir)/run-ntp_restrict.c \
+ $(srcdir)/run-rc_cmdlength.c \
+ $(srcdir)/run-t-ntp_signd.c \
+ $(NULL)
+
+###
+
+test_leapsec_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+# Might need pthread support
+test_leapsec_LDADD = \
+ $(unity_tests_LDADD) \
+ $(NULL)
+
+test_leapsec_SOURCES = \
+ leapsec.c \
+ run-leapsec.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+$(srcdir)/run-leapsec.c: $(srcdir)/leapsec.c $(std_unity_list)
+ $(run_unity) leapsec.c run-leapsec.c
+
+###
+test_ntp_prio_q_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+test_ntp_prio_q_LDADD = \
+ $(unity_tests_LDADD) \
+ ../../ntpd/ntpdsim-ntp_prio_q.o \
+ $(NULL)
+
+test_ntp_prio_q_SOURCES = \
+ ntp_prio_q.c \
+ run-ntp_prio_q.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+$(srcdir)/run-ntp_prio_q.c: $(srcdir)/ntp_prio_q.c $(std_unity_list)
+ $(run_unity) ntp_prio_q.c run-ntp_prio_q.c
+
+
+###
+test_ntp_restrict_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+test_ntp_restrict_LDADD = \
+ $(unity_tests_LDADD) \
+ $(NULL)
+
+test_ntp_restrict_SOURCES = \
+ ntp_restrict.c \
+ run-ntp_restrict.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+$(srcdir)/run-ntp_restrict.c: $(srcdir)/ntp_restrict.c $(std_unity_list)
+ $(run_unity) ntp_restrict.c run-ntp_restrict.c
+
+
+
+###
+test_rc_cmdlength_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+test_rc_cmdlength_LDADD = \
+ $(unity_tests_LDADD) \
+ $(NULL)
+
+test_rc_cmdlength_SOURCES = \
+ rc_cmdlength.c \
+ run-rc_cmdlength.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+$(srcdir)/run-rc_cmdlength.c: $(srcdir)/rc_cmdlength.c $(std_unity_list)
+ $(run_unity) rc_cmdlength.c run-rc_cmdlength.c
+
+###
+
+test_ntp_signd_LDADD = \
+ $(unity_tests_LDADD) \
+ $(top_builddir)/ntpd/ntp_config.o \
+ $(top_builddir)/ntpd/ntp_io.o \
+ $(NULL)
+
+test_ntp_signd_SOURCES = \
+ t-ntp_signd.c \
+ run-t-ntp_signd.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(srcdir)/../../ntpd/ntp_signd.c \
+ $(NULL)
+
+$(srcdir)/run-t-ntp_signd.c: $(srcdir)/t-ntp_signd.c $(std_unity_list)
+ $(run_unity) t-ntp_signd.c run-t-ntp_signd.c
+
+###
+test_ntp_scanner_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+test_ntp_scanner_LDADD = \
+ $(unity_tests_LDADD) \
+ $(top_builddir)/ntpd/ntp_config.o \
+ $(top_builddir)/ntpd/ntp_parser.o \
+ $(NULL)
+
+test_ntp_scanner_SOURCES = \
+ t-ntp_scanner.c \
+ run-t-ntp_scanner.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+$(srcdir)/run-t-ntp_scanner.c: $(srcdir)/t-ntp_scanner.c $(std_unity_list)
+ $(run_unity) t-ntp_scanner.c run-t-ntp_scanner.c
-noinst_HEADERS = ntpdtest.h \
- $(NULL)
TESTS =
if !NTP_CROSSCOMPILE
-TESTS += tests
+TESTS += $(check_PROGRAMS)
endif
## check-libntp.mf - automake fragment
## slightly adapted for deeper directory
-BUILT_SOURCES += check-libntp
-CLEANFILES += check-libntp
+BUILT_SOURCES += check-libntpd check-libntp check-libunity
+CLEANFILES += check-libntpd check-libntp check-libunity
+
+check-libntpd: ../../ntpd/libntpd.a
+ @echo stamp > $@
+
+../../ntpd/libntpd.a:
+ cd ../../ntpd && $(MAKE) $(AM_MAKEFLAGS) libntpd.a
+
check-libntp: ../../libntp/libntp.a
@echo stamp > $@
@@ -51,5 +208,15 @@ check-libntp: ../../libntp/libntp.a
../../libntp/libntp.a:
cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+check-libunity: ../../sntp/unity/libunity.a
+ @echo stamp > $@
+
+../../sntp/unity/libunity.a:
+ cd ../../sntp/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
+
+$(top_builddir)/ntpd/ntpdsim-ntp_prio_q.o:
+ cd ../../ntpd/ && $(MAKE) $(AM_MAKEFLAGS) ntpdsim-ntp_prio_q.o
+
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/tests/ntpd/Makefile.in b/contrib/ntp/tests/ntpd/Makefile.in
index e6ad905b7a95..2dc7a04350b0 100644
--- a/contrib/ntp/tests/ntpd/Makefile.in
+++ b/contrib/ntp/tests/ntpd/Makefile.in
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
@@ -88,9 +87,15 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-check_PROGRAMS = tests$(EXEEXT)
-TESTS = $(am__EXEEXT_1)
-@NTP_CROSSCOMPILE_FALSE@am__append_1 = tests
+check_PROGRAMS = test-leapsec$(EXEEXT) test-ntp_prio_q$(EXEEXT) \
+ $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
+ $(am__EXEEXT_4) test-rc_cmdlength$(EXEEXT) $(am__EXEEXT_1)
+@BUILD_TEST_NTP_RESTRICT_TRUE@am__append_1 = test-ntp_restrict
+@BUILD_TEST_NTP_SCANNER_TRUE@am__append_2 = test-ntp_scanner
+@BUILD_TEST_NTP_SIGND_TRUE@am__append_3 = test-ntp_signd
+EXTRA_PROGRAMS = test-ntp_restrict$(EXEEXT) test-ntp_scanner$(EXEEXT) \
+ test-ntp_signd$(EXEEXT) $(am__EXEEXT_1)
+@NTP_CROSSCOMPILE_FALSE@am__append_4 = $(check_PROGRAMS)
subdir = tests/ntpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -119,6 +124,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -132,26 +138,89 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
- $(am__DIST_COMMON)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 =
+@BUILD_TEST_NTP_RESTRICT_TRUE@am__EXEEXT_2 = \
+@BUILD_TEST_NTP_RESTRICT_TRUE@ test-ntp_restrict$(EXEEXT)
+@BUILD_TEST_NTP_SCANNER_TRUE@am__EXEEXT_3 = test-ntp_scanner$(EXEEXT)
+@BUILD_TEST_NTP_SIGND_TRUE@am__EXEEXT_4 = test-ntp_signd$(EXEEXT)
am__objects_1 =
-am_tests_OBJECTS = tests_main.$(OBJEXT) ntpdtest.$(OBJEXT) \
- ntp_leapsec.$(OBJEXT) leapsec.$(OBJEXT) $(am__objects_1)
-tests_OBJECTS = $(am_tests_OBJECTS)
-tests_LDADD = $(LDADD)
+am_test_leapsec_OBJECTS = test_leapsec-leapsec.$(OBJEXT) \
+ test_leapsec-run-leapsec.$(OBJEXT) \
+ test_leapsec-test-libntp.$(OBJEXT) $(am__objects_1)
+test_leapsec_OBJECTS = $(am_test_leapsec_OBJECTS)
am__DEPENDENCIES_1 =
-tests_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+am__DEPENDENCIES_2 = $(top_builddir)/ntpd/libntpd.a \
+ $(top_builddir)/libntp/libntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1)
+am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+test_leapsec_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
+test_leapsec_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_leapsec_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_test_ntp_prio_q_OBJECTS = test_ntp_prio_q-ntp_prio_q.$(OBJEXT) \
+ test_ntp_prio_q-run-ntp_prio_q.$(OBJEXT) \
+ test_ntp_prio_q-test-libntp.$(OBJEXT) $(am__objects_1)
+test_ntp_prio_q_OBJECTS = $(am_test_ntp_prio_q_OBJECTS)
+test_ntp_prio_q_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+ ../../ntpd/ntpdsim-ntp_prio_q.o $(am__DEPENDENCIES_1)
+test_ntp_prio_q_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(test_ntp_prio_q_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+am_test_ntp_restrict_OBJECTS = \
+ test_ntp_restrict-ntp_restrict.$(OBJEXT) \
+ test_ntp_restrict-run-ntp_restrict.$(OBJEXT) \
+ test_ntp_restrict-test-libntp.$(OBJEXT) $(am__objects_1)
+test_ntp_restrict_OBJECTS = $(am_test_ntp_restrict_OBJECTS)
+test_ntp_restrict_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_1)
+test_ntp_restrict_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(test_ntp_restrict_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+am_test_ntp_scanner_OBJECTS = \
+ test_ntp_scanner-t-ntp_scanner.$(OBJEXT) \
+ test_ntp_scanner-run-t-ntp_scanner.$(OBJEXT) \
+ test_ntp_scanner-test-libntp.$(OBJEXT) $(am__objects_1)
+test_ntp_scanner_OBJECTS = $(am_test_ntp_scanner_OBJECTS)
+test_ntp_scanner_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+ $(top_builddir)/ntpd/ntp_config.o \
+ $(top_builddir)/ntpd/ntp_parser.o $(am__DEPENDENCIES_1)
+test_ntp_scanner_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(test_ntp_scanner_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+am_test_ntp_signd_OBJECTS = t-ntp_signd.$(OBJEXT) \
+ run-t-ntp_signd.$(OBJEXT) test-libntp.$(OBJEXT) \
+ ntp_signd.$(OBJEXT) $(am__objects_1)
+test_ntp_signd_OBJECTS = $(am_test_ntp_signd_OBJECTS)
+test_ntp_signd_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+ $(top_builddir)/ntpd/ntp_config.o \
+ $(top_builddir)/ntpd/ntp_io.o $(am__DEPENDENCIES_1)
+am_test_rc_cmdlength_OBJECTS = \
+ test_rc_cmdlength-rc_cmdlength.$(OBJEXT) \
+ test_rc_cmdlength-run-rc_cmdlength.$(OBJEXT) \
+ test_rc_cmdlength-test-libntp.$(OBJEXT) $(am__objects_1)
+test_rc_cmdlength_OBJECTS = $(am_test_rc_cmdlength_OBJECTS)
+test_rc_cmdlength_DEPENDENCIES = $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_1)
+test_rc_cmdlength_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(test_rc_cmdlength_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -186,32 +255,17 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CXXFLAGS) $(CXXFLAGS)
-AM_V_CXX = $(am__v_CXX_@AM_V@)
-am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
-am__v_CXX_0 = @echo " CXX " $@;
-am__v_CXX_1 =
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
-am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-am__v_CXXLD_1 =
-SOURCES = $(tests_SOURCES)
-DIST_SOURCES = $(tests_SOURCES)
+SOURCES = $(test_leapsec_SOURCES) $(test_ntp_prio_q_SOURCES) \
+ $(test_ntp_restrict_SOURCES) $(test_ntp_scanner_SOURCES) \
+ $(test_ntp_signd_SOURCES) $(test_rc_cmdlength_SOURCES)
+DIST_SOURCES = $(test_leapsec_SOURCES) $(test_ntp_prio_q_SOURCES) \
+ $(test_ntp_restrict_SOURCES) $(test_ntp_scanner_SOURCES) \
+ $(test_ntp_signd_SOURCES) $(test_rc_cmdlength_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
-HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -415,7 +469,6 @@ am__set_TESTS_bases = \
bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
-@NTP_CROSSCOMPILE_FALSE@am__EXEEXT_1 = tests$(EXEEXT)
TEST_SUITE_LOG = test-suite.log
TEST_EXTENSIONS = @EXEEXT@ .test
LOG_DRIVER = $(SHELL) \
@@ -452,6 +505,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -460,6 +514,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -521,6 +576,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@@ -707,31 +763,136 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-BUILT_SOURCES = check-libntp .deps-ver
-CLEANFILES = check-libntp .deps-ver
+BUILT_SOURCES = $(srcdir)/run-leapsec.c $(srcdir)/run-ntp_prio_q.c \
+ $(srcdir)/run-ntp_restrict.c $(srcdir)/run-rc_cmdlength.c \
+ $(srcdir)/run-t-ntp_signd.c $(NULL) check-libntpd check-libntp \
+ check-libunity .deps-ver
+CLEANFILES = check-libntpd check-libntp check-libunity .deps-ver
+std_unity_list = \
+ $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \
+ $(NULL)
+
+run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
LDADD = \
+ $(top_builddir)/ntpd/libntpd.a \
$(top_builddir)/libntp/libntp.a \
$(LDADD_LIBNTP) \
$(PTHREAD_LIBS) \
$(LDADD_NTP) \
- $(GTEST_LDFLAGS) \
- $(GTEST_LIBS) \
+ $(NULL)
+
+unity_tests_LDADD = \
+ $(LDADD) \
+ $(top_builddir)/sntp/unity/libunity.a \
+ $(LIBM) \
$(NULL)
AM_CFLAGS = $(CFLAGS_NTP)
-AM_CXXFLAGS = $(GTEST_CXXFLAGS)
AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/sntp -I$(top_srcdir)/ntpd \
- $(GTEST_CPPFLAGS) $(CPPFLAGS_NTP)
+ -I$(top_srcdir)/tests/libntp $(CPPFLAGS_NTP) \
+ -DUNITY_INCLUDE_CONFIG_H -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
-tests_SOURCES = $(top_srcdir)/sntp/tests_main.cpp \
- ntpdtest.cpp \
- $(top_srcdir)/ntpd/ntp_leapsec.c \
- leapsec.cpp \
- $(NULL)
-noinst_HEADERS = ntpdtest.h \
- $(NULL)
+###
+test_leapsec_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+
+# Might need pthread support
+test_leapsec_LDADD = \
+ $(unity_tests_LDADD) \
+ $(NULL)
+
+test_leapsec_SOURCES = \
+ leapsec.c \
+ run-leapsec.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+
+###
+test_ntp_prio_q_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+test_ntp_prio_q_LDADD = \
+ $(unity_tests_LDADD) \
+ ../../ntpd/ntpdsim-ntp_prio_q.o \
+ $(NULL)
+
+test_ntp_prio_q_SOURCES = \
+ ntp_prio_q.c \
+ run-ntp_prio_q.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+
+###
+test_ntp_restrict_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+test_ntp_restrict_LDADD = \
+ $(unity_tests_LDADD) \
+ $(NULL)
+
+test_ntp_restrict_SOURCES = \
+ ntp_restrict.c \
+ run-ntp_restrict.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+
+###
+test_rc_cmdlength_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+test_rc_cmdlength_LDADD = \
+ $(unity_tests_LDADD) \
+ $(NULL)
+
+test_rc_cmdlength_SOURCES = \
+ rc_cmdlength.c \
+ run-rc_cmdlength.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+
+###
+test_ntp_signd_LDADD = \
+ $(unity_tests_LDADD) \
+ $(top_builddir)/ntpd/ntp_config.o \
+ $(top_builddir)/ntpd/ntp_io.o \
+ $(NULL)
+
+test_ntp_signd_SOURCES = \
+ t-ntp_signd.c \
+ run-t-ntp_signd.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(srcdir)/../../ntpd/ntp_signd.c \
+ $(NULL)
+
+
+###
+test_ntp_scanner_CFLAGS = \
+ -I$(top_srcdir)/sntp/unity \
+ $(NULL)
+
+test_ntp_scanner_LDADD = \
+ $(unity_tests_LDADD) \
+ $(top_builddir)/ntpd/ntp_config.o \
+ $(top_builddir)/ntpd/ntp_parser.o \
+ $(NULL)
+test_ntp_scanner_SOURCES = \
+ t-ntp_scanner.c \
+ run-t-ntp_scanner.c \
+ $(srcdir)/../libntp/test-libntp.c \
+ $(NULL)
+
+TESTS = $(am__append_4)
NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
-I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
-I$(top_srcdir)/lib/isc/unix/include
@@ -739,7 +900,7 @@ all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
-.SUFFIXES: .c .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -780,9 +941,29 @@ clean-checkPROGRAMS:
echo " rm -f" $$list; \
rm -f $$list
-tests$(EXEEXT): $(tests_OBJECTS) $(tests_DEPENDENCIES) $(EXTRA_tests_DEPENDENCIES)
- @rm -f tests$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tests_OBJECTS) $(tests_LDADD) $(LIBS)
+test-leapsec$(EXEEXT): $(test_leapsec_OBJECTS) $(test_leapsec_DEPENDENCIES) $(EXTRA_test_leapsec_DEPENDENCIES)
+ @rm -f test-leapsec$(EXEEXT)
+ $(AM_V_CCLD)$(test_leapsec_LINK) $(test_leapsec_OBJECTS) $(test_leapsec_LDADD) $(LIBS)
+
+test-ntp_prio_q$(EXEEXT): $(test_ntp_prio_q_OBJECTS) $(test_ntp_prio_q_DEPENDENCIES) $(EXTRA_test_ntp_prio_q_DEPENDENCIES)
+ @rm -f test-ntp_prio_q$(EXEEXT)
+ $(AM_V_CCLD)$(test_ntp_prio_q_LINK) $(test_ntp_prio_q_OBJECTS) $(test_ntp_prio_q_LDADD) $(LIBS)
+
+test-ntp_restrict$(EXEEXT): $(test_ntp_restrict_OBJECTS) $(test_ntp_restrict_DEPENDENCIES) $(EXTRA_test_ntp_restrict_DEPENDENCIES)
+ @rm -f test-ntp_restrict$(EXEEXT)
+ $(AM_V_CCLD)$(test_ntp_restrict_LINK) $(test_ntp_restrict_OBJECTS) $(test_ntp_restrict_LDADD) $(LIBS)
+
+test-ntp_scanner$(EXEEXT): $(test_ntp_scanner_OBJECTS) $(test_ntp_scanner_DEPENDENCIES) $(EXTRA_test_ntp_scanner_DEPENDENCIES)
+ @rm -f test-ntp_scanner$(EXEEXT)
+ $(AM_V_CCLD)$(test_ntp_scanner_LINK) $(test_ntp_scanner_OBJECTS) $(test_ntp_scanner_LDADD) $(LIBS)
+
+test-ntp_signd$(EXEEXT): $(test_ntp_signd_OBJECTS) $(test_ntp_signd_DEPENDENCIES) $(EXTRA_test_ntp_signd_DEPENDENCIES)
+ @rm -f test-ntp_signd$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ntp_signd_OBJECTS) $(test_ntp_signd_LDADD) $(LIBS)
+
+test-rc_cmdlength$(EXEEXT): $(test_rc_cmdlength_OBJECTS) $(test_rc_cmdlength_DEPENDENCIES) $(EXTRA_test_rc_cmdlength_DEPENDENCIES)
+ @rm -f test-rc_cmdlength$(EXEEXT)
+ $(AM_V_CCLD)$(test_rc_cmdlength_LINK) $(test_rc_cmdlength_OBJECTS) $(test_rc_cmdlength_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -790,10 +971,25 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/leapsec.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_leapsec.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdtest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests_main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_signd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-t-ntp_signd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-ntp_signd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-libntp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_leapsec-leapsec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_leapsec-run-leapsec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_leapsec-test-libntp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntp_prio_q-ntp_prio_q.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntp_prio_q-run-ntp_prio_q.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntp_prio_q-test-libntp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntp_restrict-ntp_restrict.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntp_restrict-run-ntp_restrict.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntp_restrict-test-libntp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntp_scanner-run-t-ntp_scanner.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntp_scanner-t-ntp_scanner.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntp_scanner-test-libntp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rc_cmdlength-rc_cmdlength.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rc_cmdlength-run-rc_cmdlength.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rc_cmdlength-test-libntp.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -816,54 +1012,243 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-ntp_leapsec.o: $(top_srcdir)/ntpd/ntp_leapsec.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntp_leapsec.o -MD -MP -MF $(DEPDIR)/ntp_leapsec.Tpo -c -o ntp_leapsec.o `test -f '$(top_srcdir)/ntpd/ntp_leapsec.c' || echo '$(srcdir)/'`$(top_srcdir)/ntpd/ntp_leapsec.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntp_leapsec.Tpo $(DEPDIR)/ntp_leapsec.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/ntpd/ntp_leapsec.c' object='ntp_leapsec.o' libtool=no @AMDEPBACKSLASH@
+test_leapsec-leapsec.o: leapsec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -MT test_leapsec-leapsec.o -MD -MP -MF $(DEPDIR)/test_leapsec-leapsec.Tpo -c -o test_leapsec-leapsec.o `test -f 'leapsec.c' || echo '$(srcdir)/'`leapsec.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_leapsec-leapsec.Tpo $(DEPDIR)/test_leapsec-leapsec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='leapsec.c' object='test_leapsec-leapsec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -c -o test_leapsec-leapsec.o `test -f 'leapsec.c' || echo '$(srcdir)/'`leapsec.c
+
+test_leapsec-leapsec.obj: leapsec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -MT test_leapsec-leapsec.obj -MD -MP -MF $(DEPDIR)/test_leapsec-leapsec.Tpo -c -o test_leapsec-leapsec.obj `if test -f 'leapsec.c'; then $(CYGPATH_W) 'leapsec.c'; else $(CYGPATH_W) '$(srcdir)/leapsec.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_leapsec-leapsec.Tpo $(DEPDIR)/test_leapsec-leapsec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='leapsec.c' object='test_leapsec-leapsec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -c -o test_leapsec-leapsec.obj `if test -f 'leapsec.c'; then $(CYGPATH_W) 'leapsec.c'; else $(CYGPATH_W) '$(srcdir)/leapsec.c'; fi`
+
+test_leapsec-run-leapsec.o: run-leapsec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -MT test_leapsec-run-leapsec.o -MD -MP -MF $(DEPDIR)/test_leapsec-run-leapsec.Tpo -c -o test_leapsec-run-leapsec.o `test -f 'run-leapsec.c' || echo '$(srcdir)/'`run-leapsec.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_leapsec-run-leapsec.Tpo $(DEPDIR)/test_leapsec-run-leapsec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-leapsec.c' object='test_leapsec-run-leapsec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -c -o test_leapsec-run-leapsec.o `test -f 'run-leapsec.c' || echo '$(srcdir)/'`run-leapsec.c
+
+test_leapsec-run-leapsec.obj: run-leapsec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -MT test_leapsec-run-leapsec.obj -MD -MP -MF $(DEPDIR)/test_leapsec-run-leapsec.Tpo -c -o test_leapsec-run-leapsec.obj `if test -f 'run-leapsec.c'; then $(CYGPATH_W) 'run-leapsec.c'; else $(CYGPATH_W) '$(srcdir)/run-leapsec.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_leapsec-run-leapsec.Tpo $(DEPDIR)/test_leapsec-run-leapsec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-leapsec.c' object='test_leapsec-run-leapsec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -c -o test_leapsec-run-leapsec.obj `if test -f 'run-leapsec.c'; then $(CYGPATH_W) 'run-leapsec.c'; else $(CYGPATH_W) '$(srcdir)/run-leapsec.c'; fi`
+
+test_leapsec-test-libntp.o: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -MT test_leapsec-test-libntp.o -MD -MP -MF $(DEPDIR)/test_leapsec-test-libntp.Tpo -c -o test_leapsec-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_leapsec-test-libntp.Tpo $(DEPDIR)/test_leapsec-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_leapsec-test-libntp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -c -o test_leapsec-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+
+test_leapsec-test-libntp.obj: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -MT test_leapsec-test-libntp.obj -MD -MP -MF $(DEPDIR)/test_leapsec-test-libntp.Tpo -c -o test_leapsec-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_leapsec-test-libntp.Tpo $(DEPDIR)/test_leapsec-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_leapsec-test-libntp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_leapsec_CFLAGS) $(CFLAGS) -c -o test_leapsec-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+
+test_ntp_prio_q-ntp_prio_q.o: ntp_prio_q.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -MT test_ntp_prio_q-ntp_prio_q.o -MD -MP -MF $(DEPDIR)/test_ntp_prio_q-ntp_prio_q.Tpo -c -o test_ntp_prio_q-ntp_prio_q.o `test -f 'ntp_prio_q.c' || echo '$(srcdir)/'`ntp_prio_q.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_prio_q-ntp_prio_q.Tpo $(DEPDIR)/test_ntp_prio_q-ntp_prio_q.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ntp_prio_q.c' object='test_ntp_prio_q-ntp_prio_q.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -c -o test_ntp_prio_q-ntp_prio_q.o `test -f 'ntp_prio_q.c' || echo '$(srcdir)/'`ntp_prio_q.c
+
+test_ntp_prio_q-ntp_prio_q.obj: ntp_prio_q.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -MT test_ntp_prio_q-ntp_prio_q.obj -MD -MP -MF $(DEPDIR)/test_ntp_prio_q-ntp_prio_q.Tpo -c -o test_ntp_prio_q-ntp_prio_q.obj `if test -f 'ntp_prio_q.c'; then $(CYGPATH_W) 'ntp_prio_q.c'; else $(CYGPATH_W) '$(srcdir)/ntp_prio_q.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_prio_q-ntp_prio_q.Tpo $(DEPDIR)/test_ntp_prio_q-ntp_prio_q.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ntp_prio_q.c' object='test_ntp_prio_q-ntp_prio_q.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -c -o test_ntp_prio_q-ntp_prio_q.obj `if test -f 'ntp_prio_q.c'; then $(CYGPATH_W) 'ntp_prio_q.c'; else $(CYGPATH_W) '$(srcdir)/ntp_prio_q.c'; fi`
+
+test_ntp_prio_q-run-ntp_prio_q.o: run-ntp_prio_q.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -MT test_ntp_prio_q-run-ntp_prio_q.o -MD -MP -MF $(DEPDIR)/test_ntp_prio_q-run-ntp_prio_q.Tpo -c -o test_ntp_prio_q-run-ntp_prio_q.o `test -f 'run-ntp_prio_q.c' || echo '$(srcdir)/'`run-ntp_prio_q.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_prio_q-run-ntp_prio_q.Tpo $(DEPDIR)/test_ntp_prio_q-run-ntp_prio_q.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-ntp_prio_q.c' object='test_ntp_prio_q-run-ntp_prio_q.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -c -o test_ntp_prio_q-run-ntp_prio_q.o `test -f 'run-ntp_prio_q.c' || echo '$(srcdir)/'`run-ntp_prio_q.c
+
+test_ntp_prio_q-run-ntp_prio_q.obj: run-ntp_prio_q.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -MT test_ntp_prio_q-run-ntp_prio_q.obj -MD -MP -MF $(DEPDIR)/test_ntp_prio_q-run-ntp_prio_q.Tpo -c -o test_ntp_prio_q-run-ntp_prio_q.obj `if test -f 'run-ntp_prio_q.c'; then $(CYGPATH_W) 'run-ntp_prio_q.c'; else $(CYGPATH_W) '$(srcdir)/run-ntp_prio_q.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_prio_q-run-ntp_prio_q.Tpo $(DEPDIR)/test_ntp_prio_q-run-ntp_prio_q.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-ntp_prio_q.c' object='test_ntp_prio_q-run-ntp_prio_q.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -c -o test_ntp_prio_q-run-ntp_prio_q.obj `if test -f 'run-ntp_prio_q.c'; then $(CYGPATH_W) 'run-ntp_prio_q.c'; else $(CYGPATH_W) '$(srcdir)/run-ntp_prio_q.c'; fi`
+
+test_ntp_prio_q-test-libntp.o: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -MT test_ntp_prio_q-test-libntp.o -MD -MP -MF $(DEPDIR)/test_ntp_prio_q-test-libntp.Tpo -c -o test_ntp_prio_q-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_prio_q-test-libntp.Tpo $(DEPDIR)/test_ntp_prio_q-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_ntp_prio_q-test-libntp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -c -o test_ntp_prio_q-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+
+test_ntp_prio_q-test-libntp.obj: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -MT test_ntp_prio_q-test-libntp.obj -MD -MP -MF $(DEPDIR)/test_ntp_prio_q-test-libntp.Tpo -c -o test_ntp_prio_q-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_prio_q-test-libntp.Tpo $(DEPDIR)/test_ntp_prio_q-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_ntp_prio_q-test-libntp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_prio_q_CFLAGS) $(CFLAGS) -c -o test_ntp_prio_q-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+
+test_ntp_restrict-ntp_restrict.o: ntp_restrict.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -MT test_ntp_restrict-ntp_restrict.o -MD -MP -MF $(DEPDIR)/test_ntp_restrict-ntp_restrict.Tpo -c -o test_ntp_restrict-ntp_restrict.o `test -f 'ntp_restrict.c' || echo '$(srcdir)/'`ntp_restrict.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_restrict-ntp_restrict.Tpo $(DEPDIR)/test_ntp_restrict-ntp_restrict.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ntp_restrict.c' object='test_ntp_restrict-ntp_restrict.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -c -o test_ntp_restrict-ntp_restrict.o `test -f 'ntp_restrict.c' || echo '$(srcdir)/'`ntp_restrict.c
+
+test_ntp_restrict-ntp_restrict.obj: ntp_restrict.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -MT test_ntp_restrict-ntp_restrict.obj -MD -MP -MF $(DEPDIR)/test_ntp_restrict-ntp_restrict.Tpo -c -o test_ntp_restrict-ntp_restrict.obj `if test -f 'ntp_restrict.c'; then $(CYGPATH_W) 'ntp_restrict.c'; else $(CYGPATH_W) '$(srcdir)/ntp_restrict.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_restrict-ntp_restrict.Tpo $(DEPDIR)/test_ntp_restrict-ntp_restrict.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ntp_restrict.c' object='test_ntp_restrict-ntp_restrict.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -c -o test_ntp_restrict-ntp_restrict.obj `if test -f 'ntp_restrict.c'; then $(CYGPATH_W) 'ntp_restrict.c'; else $(CYGPATH_W) '$(srcdir)/ntp_restrict.c'; fi`
+
+test_ntp_restrict-run-ntp_restrict.o: run-ntp_restrict.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -MT test_ntp_restrict-run-ntp_restrict.o -MD -MP -MF $(DEPDIR)/test_ntp_restrict-run-ntp_restrict.Tpo -c -o test_ntp_restrict-run-ntp_restrict.o `test -f 'run-ntp_restrict.c' || echo '$(srcdir)/'`run-ntp_restrict.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_restrict-run-ntp_restrict.Tpo $(DEPDIR)/test_ntp_restrict-run-ntp_restrict.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-ntp_restrict.c' object='test_ntp_restrict-run-ntp_restrict.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -c -o test_ntp_restrict-run-ntp_restrict.o `test -f 'run-ntp_restrict.c' || echo '$(srcdir)/'`run-ntp_restrict.c
+
+test_ntp_restrict-run-ntp_restrict.obj: run-ntp_restrict.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -MT test_ntp_restrict-run-ntp_restrict.obj -MD -MP -MF $(DEPDIR)/test_ntp_restrict-run-ntp_restrict.Tpo -c -o test_ntp_restrict-run-ntp_restrict.obj `if test -f 'run-ntp_restrict.c'; then $(CYGPATH_W) 'run-ntp_restrict.c'; else $(CYGPATH_W) '$(srcdir)/run-ntp_restrict.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_restrict-run-ntp_restrict.Tpo $(DEPDIR)/test_ntp_restrict-run-ntp_restrict.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-ntp_restrict.c' object='test_ntp_restrict-run-ntp_restrict.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -c -o test_ntp_restrict-run-ntp_restrict.obj `if test -f 'run-ntp_restrict.c'; then $(CYGPATH_W) 'run-ntp_restrict.c'; else $(CYGPATH_W) '$(srcdir)/run-ntp_restrict.c'; fi`
+
+test_ntp_restrict-test-libntp.o: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -MT test_ntp_restrict-test-libntp.o -MD -MP -MF $(DEPDIR)/test_ntp_restrict-test-libntp.Tpo -c -o test_ntp_restrict-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_restrict-test-libntp.Tpo $(DEPDIR)/test_ntp_restrict-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_ntp_restrict-test-libntp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -c -o test_ntp_restrict-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+
+test_ntp_restrict-test-libntp.obj: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -MT test_ntp_restrict-test-libntp.obj -MD -MP -MF $(DEPDIR)/test_ntp_restrict-test-libntp.Tpo -c -o test_ntp_restrict-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_restrict-test-libntp.Tpo $(DEPDIR)/test_ntp_restrict-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_ntp_restrict-test-libntp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_restrict_CFLAGS) $(CFLAGS) -c -o test_ntp_restrict-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+
+test_ntp_scanner-t-ntp_scanner.o: t-ntp_scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -MT test_ntp_scanner-t-ntp_scanner.o -MD -MP -MF $(DEPDIR)/test_ntp_scanner-t-ntp_scanner.Tpo -c -o test_ntp_scanner-t-ntp_scanner.o `test -f 't-ntp_scanner.c' || echo '$(srcdir)/'`t-ntp_scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_scanner-t-ntp_scanner.Tpo $(DEPDIR)/test_ntp_scanner-t-ntp_scanner.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='t-ntp_scanner.c' object='test_ntp_scanner-t-ntp_scanner.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -c -o test_ntp_scanner-t-ntp_scanner.o `test -f 't-ntp_scanner.c' || echo '$(srcdir)/'`t-ntp_scanner.c
+
+test_ntp_scanner-t-ntp_scanner.obj: t-ntp_scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -MT test_ntp_scanner-t-ntp_scanner.obj -MD -MP -MF $(DEPDIR)/test_ntp_scanner-t-ntp_scanner.Tpo -c -o test_ntp_scanner-t-ntp_scanner.obj `if test -f 't-ntp_scanner.c'; then $(CYGPATH_W) 't-ntp_scanner.c'; else $(CYGPATH_W) '$(srcdir)/t-ntp_scanner.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_scanner-t-ntp_scanner.Tpo $(DEPDIR)/test_ntp_scanner-t-ntp_scanner.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='t-ntp_scanner.c' object='test_ntp_scanner-t-ntp_scanner.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -c -o test_ntp_scanner-t-ntp_scanner.obj `if test -f 't-ntp_scanner.c'; then $(CYGPATH_W) 't-ntp_scanner.c'; else $(CYGPATH_W) '$(srcdir)/t-ntp_scanner.c'; fi`
+
+test_ntp_scanner-run-t-ntp_scanner.o: run-t-ntp_scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -MT test_ntp_scanner-run-t-ntp_scanner.o -MD -MP -MF $(DEPDIR)/test_ntp_scanner-run-t-ntp_scanner.Tpo -c -o test_ntp_scanner-run-t-ntp_scanner.o `test -f 'run-t-ntp_scanner.c' || echo '$(srcdir)/'`run-t-ntp_scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_scanner-run-t-ntp_scanner.Tpo $(DEPDIR)/test_ntp_scanner-run-t-ntp_scanner.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-t-ntp_scanner.c' object='test_ntp_scanner-run-t-ntp_scanner.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -c -o test_ntp_scanner-run-t-ntp_scanner.o `test -f 'run-t-ntp_scanner.c' || echo '$(srcdir)/'`run-t-ntp_scanner.c
+
+test_ntp_scanner-run-t-ntp_scanner.obj: run-t-ntp_scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -MT test_ntp_scanner-run-t-ntp_scanner.obj -MD -MP -MF $(DEPDIR)/test_ntp_scanner-run-t-ntp_scanner.Tpo -c -o test_ntp_scanner-run-t-ntp_scanner.obj `if test -f 'run-t-ntp_scanner.c'; then $(CYGPATH_W) 'run-t-ntp_scanner.c'; else $(CYGPATH_W) '$(srcdir)/run-t-ntp_scanner.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_scanner-run-t-ntp_scanner.Tpo $(DEPDIR)/test_ntp_scanner-run-t-ntp_scanner.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-t-ntp_scanner.c' object='test_ntp_scanner-run-t-ntp_scanner.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -c -o test_ntp_scanner-run-t-ntp_scanner.obj `if test -f 'run-t-ntp_scanner.c'; then $(CYGPATH_W) 'run-t-ntp_scanner.c'; else $(CYGPATH_W) '$(srcdir)/run-t-ntp_scanner.c'; fi`
+
+test_ntp_scanner-test-libntp.o: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -MT test_ntp_scanner-test-libntp.o -MD -MP -MF $(DEPDIR)/test_ntp_scanner-test-libntp.Tpo -c -o test_ntp_scanner-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_scanner-test-libntp.Tpo $(DEPDIR)/test_ntp_scanner-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_ntp_scanner-test-libntp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -c -o test_ntp_scanner-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+
+test_ntp_scanner-test-libntp.obj: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -MT test_ntp_scanner-test-libntp.obj -MD -MP -MF $(DEPDIR)/test_ntp_scanner-test-libntp.Tpo -c -o test_ntp_scanner-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ntp_scanner-test-libntp.Tpo $(DEPDIR)/test_ntp_scanner-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_ntp_scanner-test-libntp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ntp_scanner_CFLAGS) $(CFLAGS) -c -o test_ntp_scanner-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+
+test-libntp.o: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test-libntp.o -MD -MP -MF $(DEPDIR)/test-libntp.Tpo -c -o test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test-libntp.Tpo $(DEPDIR)/test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test-libntp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+
+test-libntp.obj: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test-libntp.obj -MD -MP -MF $(DEPDIR)/test-libntp.Tpo -c -o test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test-libntp.Tpo $(DEPDIR)/test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test-libntp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+
+ntp_signd.o: $(srcdir)/../../ntpd/ntp_signd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntp_signd.o -MD -MP -MF $(DEPDIR)/ntp_signd.Tpo -c -o ntp_signd.o `test -f '$(srcdir)/../../ntpd/ntp_signd.c' || echo '$(srcdir)/'`$(srcdir)/../../ntpd/ntp_signd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntp_signd.Tpo $(DEPDIR)/ntp_signd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../../ntpd/ntp_signd.c' object='ntp_signd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntp_signd.o `test -f '$(srcdir)/../../ntpd/ntp_signd.c' || echo '$(srcdir)/'`$(srcdir)/../../ntpd/ntp_signd.c
+
+ntp_signd.obj: $(srcdir)/../../ntpd/ntp_signd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntp_signd.obj -MD -MP -MF $(DEPDIR)/ntp_signd.Tpo -c -o ntp_signd.obj `if test -f '$(srcdir)/../../ntpd/ntp_signd.c'; then $(CYGPATH_W) '$(srcdir)/../../ntpd/ntp_signd.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../../ntpd/ntp_signd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntp_signd.Tpo $(DEPDIR)/ntp_signd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../../ntpd/ntp_signd.c' object='ntp_signd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntp_signd.obj `if test -f '$(srcdir)/../../ntpd/ntp_signd.c'; then $(CYGPATH_W) '$(srcdir)/../../ntpd/ntp_signd.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../../ntpd/ntp_signd.c'; fi`
+
+test_rc_cmdlength-rc_cmdlength.o: rc_cmdlength.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -MT test_rc_cmdlength-rc_cmdlength.o -MD -MP -MF $(DEPDIR)/test_rc_cmdlength-rc_cmdlength.Tpo -c -o test_rc_cmdlength-rc_cmdlength.o `test -f 'rc_cmdlength.c' || echo '$(srcdir)/'`rc_cmdlength.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_rc_cmdlength-rc_cmdlength.Tpo $(DEPDIR)/test_rc_cmdlength-rc_cmdlength.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rc_cmdlength.c' object='test_rc_cmdlength-rc_cmdlength.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -c -o test_rc_cmdlength-rc_cmdlength.o `test -f 'rc_cmdlength.c' || echo '$(srcdir)/'`rc_cmdlength.c
+
+test_rc_cmdlength-rc_cmdlength.obj: rc_cmdlength.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -MT test_rc_cmdlength-rc_cmdlength.obj -MD -MP -MF $(DEPDIR)/test_rc_cmdlength-rc_cmdlength.Tpo -c -o test_rc_cmdlength-rc_cmdlength.obj `if test -f 'rc_cmdlength.c'; then $(CYGPATH_W) 'rc_cmdlength.c'; else $(CYGPATH_W) '$(srcdir)/rc_cmdlength.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_rc_cmdlength-rc_cmdlength.Tpo $(DEPDIR)/test_rc_cmdlength-rc_cmdlength.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rc_cmdlength.c' object='test_rc_cmdlength-rc_cmdlength.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -c -o test_rc_cmdlength-rc_cmdlength.obj `if test -f 'rc_cmdlength.c'; then $(CYGPATH_W) 'rc_cmdlength.c'; else $(CYGPATH_W) '$(srcdir)/rc_cmdlength.c'; fi`
+
+test_rc_cmdlength-run-rc_cmdlength.o: run-rc_cmdlength.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -MT test_rc_cmdlength-run-rc_cmdlength.o -MD -MP -MF $(DEPDIR)/test_rc_cmdlength-run-rc_cmdlength.Tpo -c -o test_rc_cmdlength-run-rc_cmdlength.o `test -f 'run-rc_cmdlength.c' || echo '$(srcdir)/'`run-rc_cmdlength.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_rc_cmdlength-run-rc_cmdlength.Tpo $(DEPDIR)/test_rc_cmdlength-run-rc_cmdlength.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-rc_cmdlength.c' object='test_rc_cmdlength-run-rc_cmdlength.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntp_leapsec.o `test -f '$(top_srcdir)/ntpd/ntp_leapsec.c' || echo '$(srcdir)/'`$(top_srcdir)/ntpd/ntp_leapsec.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -c -o test_rc_cmdlength-run-rc_cmdlength.o `test -f 'run-rc_cmdlength.c' || echo '$(srcdir)/'`run-rc_cmdlength.c
-ntp_leapsec.obj: $(top_srcdir)/ntpd/ntp_leapsec.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntp_leapsec.obj -MD -MP -MF $(DEPDIR)/ntp_leapsec.Tpo -c -o ntp_leapsec.obj `if test -f '$(top_srcdir)/ntpd/ntp_leapsec.c'; then $(CYGPATH_W) '$(top_srcdir)/ntpd/ntp_leapsec.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/ntpd/ntp_leapsec.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntp_leapsec.Tpo $(DEPDIR)/ntp_leapsec.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/ntpd/ntp_leapsec.c' object='ntp_leapsec.obj' libtool=no @AMDEPBACKSLASH@
+test_rc_cmdlength-run-rc_cmdlength.obj: run-rc_cmdlength.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -MT test_rc_cmdlength-run-rc_cmdlength.obj -MD -MP -MF $(DEPDIR)/test_rc_cmdlength-run-rc_cmdlength.Tpo -c -o test_rc_cmdlength-run-rc_cmdlength.obj `if test -f 'run-rc_cmdlength.c'; then $(CYGPATH_W) 'run-rc_cmdlength.c'; else $(CYGPATH_W) '$(srcdir)/run-rc_cmdlength.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_rc_cmdlength-run-rc_cmdlength.Tpo $(DEPDIR)/test_rc_cmdlength-run-rc_cmdlength.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run-rc_cmdlength.c' object='test_rc_cmdlength-run-rc_cmdlength.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntp_leapsec.obj `if test -f '$(top_srcdir)/ntpd/ntp_leapsec.c'; then $(CYGPATH_W) '$(top_srcdir)/ntpd/ntp_leapsec.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/ntpd/ntp_leapsec.c'; fi`
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
-
-.cpp.obj:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cpp.lo:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
-
-tests_main.o: $(top_srcdir)/sntp/tests_main.cpp
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.o -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.o `test -f '$(top_srcdir)/sntp/tests_main.cpp' || echo '$(srcdir)/'`$(top_srcdir)/sntp/tests_main.cpp
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/sntp/tests_main.cpp' object='tests_main.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.o `test -f '$(top_srcdir)/sntp/tests_main.cpp' || echo '$(srcdir)/'`$(top_srcdir)/sntp/tests_main.cpp
-
-tests_main.obj: $(top_srcdir)/sntp/tests_main.cpp
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.obj -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.obj `if test -f '$(top_srcdir)/sntp/tests_main.cpp'; then $(CYGPATH_W) '$(top_srcdir)/sntp/tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/sntp/tests_main.cpp'; fi`
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/sntp/tests_main.cpp' object='tests_main.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.obj `if test -f '$(top_srcdir)/sntp/tests_main.cpp'; then $(CYGPATH_W) '$(top_srcdir)/sntp/tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/sntp/tests_main.cpp'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -c -o test_rc_cmdlength-run-rc_cmdlength.obj `if test -f 'run-rc_cmdlength.c'; then $(CYGPATH_W) 'run-rc_cmdlength.c'; else $(CYGPATH_W) '$(srcdir)/run-rc_cmdlength.c'; fi`
+
+test_rc_cmdlength-test-libntp.o: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -MT test_rc_cmdlength-test-libntp.o -MD -MP -MF $(DEPDIR)/test_rc_cmdlength-test-libntp.Tpo -c -o test_rc_cmdlength-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_rc_cmdlength-test-libntp.Tpo $(DEPDIR)/test_rc_cmdlength-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_rc_cmdlength-test-libntp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -c -o test_rc_cmdlength-test-libntp.o `test -f '$(srcdir)/../libntp/test-libntp.c' || echo '$(srcdir)/'`$(srcdir)/../libntp/test-libntp.c
+
+test_rc_cmdlength-test-libntp.obj: $(srcdir)/../libntp/test-libntp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -MT test_rc_cmdlength-test-libntp.obj -MD -MP -MF $(DEPDIR)/test_rc_cmdlength-test-libntp.Tpo -c -o test_rc_cmdlength-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_rc_cmdlength-test-libntp.Tpo $(DEPDIR)/test_rc_cmdlength-test-libntp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../libntp/test-libntp.c' object='test_rc_cmdlength-test-libntp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rc_cmdlength_CFLAGS) $(CFLAGS) -c -o test_rc_cmdlength-test-libntp.obj `if test -f '$(srcdir)/../libntp/test-libntp.c'; then $(CYGPATH_W) '$(srcdir)/../libntp/test-libntp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../libntp/test-libntp.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
@@ -1064,9 +1449,44 @@ recheck: all $(check_PROGRAMS)
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
-tests.log: tests$(EXEEXT)
- @p='tests$(EXEEXT)'; \
- b='tests'; \
+test-leapsec.log: test-leapsec$(EXEEXT)
+ @p='test-leapsec$(EXEEXT)'; \
+ b='test-leapsec'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-ntp_prio_q.log: test-ntp_prio_q$(EXEEXT)
+ @p='test-ntp_prio_q$(EXEEXT)'; \
+ b='test-ntp_prio_q'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-ntp_restrict.log: test-ntp_restrict$(EXEEXT)
+ @p='test-ntp_restrict$(EXEEXT)'; \
+ b='test-ntp_restrict'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-ntp_scanner.log: test-ntp_scanner$(EXEEXT)
+ @p='test-ntp_scanner$(EXEEXT)'; \
+ b='test-ntp_scanner'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-ntp_signd.log: test-ntp_signd$(EXEEXT)
+ @p='test-ntp_signd$(EXEEXT)'; \
+ b='test-ntp_signd'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-rc_cmdlength.log: test-rc_cmdlength$(EXEEXT)
+ @p='test-rc_cmdlength$(EXEEXT)'; \
+ b='test-rc_cmdlength'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -1121,7 +1541,7 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(HEADERS)
+all-am: Makefile
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
@@ -1249,11 +1669,44 @@ uninstall-am:
.PRECIOUS: Makefile
+$(srcdir)/run-leapsec.c: $(srcdir)/leapsec.c $(std_unity_list)
+ $(run_unity) leapsec.c run-leapsec.c
+
+$(srcdir)/run-ntp_prio_q.c: $(srcdir)/ntp_prio_q.c $(std_unity_list)
+ $(run_unity) ntp_prio_q.c run-ntp_prio_q.c
+
+$(srcdir)/run-ntp_restrict.c: $(srcdir)/ntp_restrict.c $(std_unity_list)
+ $(run_unity) ntp_restrict.c run-ntp_restrict.c
+
+$(srcdir)/run-rc_cmdlength.c: $(srcdir)/rc_cmdlength.c $(std_unity_list)
+ $(run_unity) rc_cmdlength.c run-rc_cmdlength.c
+
+$(srcdir)/run-t-ntp_signd.c: $(srcdir)/t-ntp_signd.c $(std_unity_list)
+ $(run_unity) t-ntp_signd.c run-t-ntp_signd.c
+
+$(srcdir)/run-t-ntp_scanner.c: $(srcdir)/t-ntp_scanner.c $(std_unity_list)
+ $(run_unity) t-ntp_scanner.c run-t-ntp_scanner.c
+
+check-libntpd: ../../ntpd/libntpd.a
+ @echo stamp > $@
+
+../../ntpd/libntpd.a:
+ cd ../../ntpd && $(MAKE) $(AM_MAKEFLAGS) libntpd.a
+
check-libntp: ../../libntp/libntp.a
@echo stamp > $@
../../libntp/libntp.a:
cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+check-libunity: ../../sntp/unity/libunity.a
+ @echo stamp > $@
+
+../../sntp/unity/libunity.a:
+ cd ../../sntp/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
+
+$(top_builddir)/ntpd/ntpdsim-ntp_prio_q.o:
+ cd ../../ntpd/ && $(MAKE) $(AM_MAKEFLAGS) ntpdsim-ntp_prio_q.o
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
diff --git a/contrib/ntp/tests/ntpd/leapsec.cpp b/contrib/ntp/tests/ntpd/leapsec.c
index ada43945e14f..37e4398b24d1 100644
--- a/contrib/ntp/tests/ntpd/leapsec.cpp
+++ b/contrib/ntp/tests/ntpd/leapsec.c
@@ -1,13 +1,17 @@
-#include "ntpdtest.h"
+//#include "ntpdtest.h"
+#include "config.h"
+
-extern "C" {
#include "ntp.h"
#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
#include "ntp_leapsec.h"
-}
-#include <string>
-#include <sstream>
+#include "unity.h"
+
+#include <string.h>
+
+#include "test-libntp.h"
static const char leap1 [] =
"#\n"
@@ -239,7 +243,7 @@ int stringreader(void* farg)
static int/*BOOL*/
setup_load_table(
const char * cp,
- int blim=FALSE)
+ int blim)
{
int rc;
leap_table_t * pt = leapsec_get_table(0);
@@ -249,7 +253,7 @@ setup_load_table(
}
static int/*BOOL*/
-setup_clear_table()
+setup_clear_table(void)
{
int rc;
leap_table_t * pt = leapsec_get_table(0);
@@ -260,44 +264,61 @@ setup_clear_table()
}
-class leapsecTest : public ntpdtest {
-protected:
- virtual void SetUp();
- virtual void TearDown();
+char * CalendarToString(const struct calendar cal) {
+ char * ss = malloc (sizeof (char) * 100);
+
+ char buffer[100] ="";
+ sprintf(buffer, "%u", cal.year);
+ strcat(ss,buffer);
+ strcat(ss,"-");
+ sprintf(buffer, "%u", (u_int)cal.month);
+ strcat(ss,buffer);
+ strcat(ss,"-");
+ sprintf(buffer, "%u", (u_int)cal.monthday);
+ strcat(ss,buffer);
+ strcat(ss," (");
+ sprintf(buffer, "%u", (u_int) cal.yearday);
+ strcat(ss,buffer);
+ strcat(ss,") ");
+ sprintf(buffer, "%u", (u_int)cal.hour);
+ strcat(ss,buffer);
+ strcat(ss,":");
+ sprintf(buffer, "%u", (u_int)cal.minute);
+ strcat(ss,buffer);
+ strcat(ss,":");
+ sprintf(buffer, "%u", (u_int)cal.second);
+ strcat(ss,buffer);
+ //ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday << " (" << cal.yearday << ") " << (u_int)cal.hour << ":" << (u_int)cal.minute << ":" << (u_int)cal.second;
+ return ss;
+}
- std::string CalendarToString(const calendar &cal) {
- std::ostringstream ss;
- ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday
- << " (" << cal.yearday << ") " << (u_int)cal.hour << ":"
- << (u_int)cal.minute << ":" << (u_int)cal.second;
- return ss.str();
- }
- ::testing::AssertionResult IsEqual(const calendar &expected, const calendar &actual) {
- if (expected.year == actual.year &&
- (expected.yearday == actual.yearday ||
- (expected.month == actual.month &&
- expected.monthday == actual.monthday)) &&
- expected.hour == actual.hour &&
- expected.minute == actual.minute &&
- expected.second == actual.second) {
- return ::testing::AssertionSuccess();
- } else {
- return ::testing::AssertionFailure()
- << "expected: " << CalendarToString(expected) << " but was "
- << CalendarToString(actual);
- }
+int IsEqual(const struct calendar expected, const struct calendar actual) {
+ if (expected.year == actual.year &&
+ (expected.yearday == actual.yearday ||
+ (expected.month == actual.month &&
+ expected.monthday == actual.monthday)) &&
+ expected.hour == actual.hour &&
+ expected.minute == actual.minute &&
+ expected.second == actual.second) {
+ return TRUE;
+ } else {
+ printf("expected: %s but was %s", CalendarToString(expected) ,CalendarToString(actual));
+ return FALSE;
+
}
-};
+}
-void leapsecTest::SetUp()
+//-------------------------
+
+void setUp(void)
{
ntpcal_set_timefunc(timefunc);
settime(1970, 1, 1, 0, 0, 0);
leapsec_ut_pristine();
}
-void leapsecTest::TearDown()
+void tearDown(void)
{
ntpcal_set_timefunc(NULL);
}
@@ -307,45 +328,45 @@ void leapsecTest::TearDown()
// =====================================================================
// ----------------------------------------------------------------------
-TEST_F(leapsecTest, ValidateGood) {
+void test_ValidateGood(void) {
const char *cp = leap_ghash;
int rc = leapsec_validate(stringreader, &cp);
- EXPECT_EQ(LSVALID_GOODHASH, rc);
+ TEST_ASSERT_EQUAL(LSVALID_GOODHASH, rc);
}
// ----------------------------------------------------------------------
-TEST_F(leapsecTest, ValidateNoHash) {
+void test_ValidateNoHash(void) {
const char *cp = leap2;
int rc = leapsec_validate(stringreader, &cp);
- EXPECT_EQ(LSVALID_NOHASH, rc);
+ TEST_ASSERT_EQUAL(LSVALID_NOHASH, rc);
}
// ----------------------------------------------------------------------
-TEST_F(leapsecTest, ValidateBad) {
+void test_ValidateBad(void) {
const char *cp = leap_bhash;
int rc = leapsec_validate(stringreader, &cp);
- EXPECT_EQ(LSVALID_BADHASH, rc);
+ TEST_ASSERT_EQUAL(LSVALID_BADHASH, rc);
}
// ----------------------------------------------------------------------
-TEST_F(leapsecTest, ValidateMalformed) {
+void test_ValidateMalformed(void) {
const char *cp = leap_mhash;
int rc = leapsec_validate(stringreader, &cp);
- EXPECT_EQ(LSVALID_BADFORMAT, rc);
+ TEST_ASSERT_EQUAL(LSVALID_BADFORMAT, rc);
}
// ----------------------------------------------------------------------
-TEST_F(leapsecTest, ValidateMalformedShort) {
+void test_ValidateMalformedShort(void) {
const char *cp = leap_shash;
int rc = leapsec_validate(stringreader, &cp);
- EXPECT_EQ(LSVALID_BADFORMAT, rc);
+ TEST_ASSERT_EQUAL(LSVALID_BADFORMAT, rc);
}
// ----------------------------------------------------------------------
-TEST_F(leapsecTest, ValidateNoLeadZero) {
+void test_ValidateNoLeadZero(void) {
const char *cp = leap_gthash;
int rc = leapsec_validate(stringreader, &cp);
- EXPECT_EQ(LSVALID_GOODHASH, rc);
+ TEST_ASSERT_EQUAL(LSVALID_GOODHASH, rc);
}
// =====================================================================
@@ -354,58 +375,60 @@ TEST_F(leapsecTest, ValidateNoLeadZero) {
// ----------------------------------------------------------------------
// test table selection
-TEST_F(leapsecTest, tableSelect) {
+void test_tableSelect(void) {
leap_table_t *pt1, *pt2, *pt3, *pt4;
pt1 = leapsec_get_table(0);
pt2 = leapsec_get_table(0);
- EXPECT_EQ(pt1, pt2);
+ TEST_ASSERT_EQUAL_MESSAGE(pt1, pt2,"first");
pt1 = leapsec_get_table(1);
pt2 = leapsec_get_table(1);
- EXPECT_EQ(pt1, pt2);
+ TEST_ASSERT_EQUAL_MESSAGE(pt1, pt2,"second");
pt1 = leapsec_get_table(1);
pt2 = leapsec_get_table(0);
- EXPECT_NE(pt1, pt2);
+ TEST_ASSERT_NOT_EQUAL(pt1, pt2);
pt1 = leapsec_get_table(0);
pt2 = leapsec_get_table(1);
- EXPECT_NE(pt1, pt2);
+ TEST_ASSERT_NOT_EQUAL(pt1, pt2);
leapsec_set_table(pt1);
pt2 = leapsec_get_table(0);
pt3 = leapsec_get_table(1);
- EXPECT_EQ(pt1, pt2);
- EXPECT_NE(pt2, pt3);
+ TEST_ASSERT_EQUAL(pt1, pt2);
+ TEST_ASSERT_NOT_EQUAL(pt2, pt3);
pt1 = pt3;
leapsec_set_table(pt1);
pt2 = leapsec_get_table(0);
pt3 = leapsec_get_table(1);
- EXPECT_EQ(pt1, pt2);
- EXPECT_NE(pt2, pt3);
+ TEST_ASSERT_EQUAL(pt1, pt2);
+ TEST_ASSERT_NOT_EQUAL(pt2, pt3);
}
// ----------------------------------------------------------------------
// load file & check expiration
-TEST_F(leapsecTest, loadFileExpire) {
+
+void test_loadFileExpire(void) {
const char *cp = leap1;
int rc;
leap_table_t * pt = leapsec_get_table(0);
rc = leapsec_load(pt, stringreader, &cp, FALSE)
&& leapsec_set_table(pt);
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL_MESSAGE(1, rc,"first");
rc = leapsec_expired(3439756800u, NULL);
- EXPECT_EQ(0, rc);
+ TEST_ASSERT_EQUAL(0, rc);
rc = leapsec_expired(3610569601u, NULL);
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc);
}
// ----------------------------------------------------------------------
// load file & check time-to-live
-TEST_F(leapsecTest, loadFileTTL) {
+
+void test_loadFileTTL(void) {
const char *cp = leap1;
int rc;
leap_table_t * pt = leapsec_get_table(0);
@@ -415,20 +438,20 @@ TEST_F(leapsecTest, loadFileTTL) {
rc = leapsec_load(pt, stringreader, &cp, FALSE)
&& leapsec_set_table(pt);
- ASSERT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc); //
// exactly 1 day to live
rc = leapsec_daystolive(limit - 86400, &pivot);
- EXPECT_EQ( 1, rc);
+ TEST_ASSERT_EQUAL( 1, rc);
// less than 1 day to live
rc = leapsec_daystolive(limit - 86399, &pivot);
- EXPECT_EQ( 0, rc);
+ TEST_ASSERT_EQUAL( 0, rc);
// hit expiration exactly
rc = leapsec_daystolive(limit, &pivot);
- EXPECT_EQ( 0, rc);
+ TEST_ASSERT_EQUAL( 0, rc);
// expired since 1 sec
rc = leapsec_daystolive(limit + 1, &pivot);
- EXPECT_EQ(-1, rc);
+ TEST_ASSERT_EQUAL(-1, rc);
}
// =====================================================================
@@ -437,199 +460,202 @@ TEST_F(leapsecTest, loadFileTTL) {
// ----------------------------------------------------------------------
// test query in pristine state (bug#2745 misbehaviour)
-TEST_F(leapsecTest, lsQueryPristineState) {
+void test_lsQueryPristineState(void) {
int rc;
leap_result_t qr;
rc = leapsec_query(&qr, lsec2012, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// ad-hoc jump: leap second at 2009.01.01 -60days
-TEST_F(leapsecTest, ls2009faraway) {
+void test_ls2009faraway(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap1);
- EXPECT_EQ(1, rc);
+ rc = setup_load_table(leap1,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
// test 60 days before leap. Nothing scheduled or indicated.
rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(33, qr.tai_offs);
- EXPECT_EQ(0, qr.tai_diff);
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(33, qr.tai_offs);
+ TEST_ASSERT_EQUAL(0, qr.tai_diff);
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// ad-hoc jump: leap second at 2009.01.01 -1week
-TEST_F(leapsecTest, ls2009weekaway) {
+void test_ls2009weekaway(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap1);
- EXPECT_EQ(1, rc);
+ rc = setup_load_table(leap1,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
// test 7 days before leap. Leap scheduled, but not yet indicated.
rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(33, qr.tai_offs);
- EXPECT_EQ(1, qr.tai_diff);
- EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(33, qr.tai_offs);
+ TEST_ASSERT_EQUAL(1, qr.tai_diff);
+ TEST_ASSERT_EQUAL(LSPROX_SCHEDULE, qr.proximity);
}
// ----------------------------------------------------------------------
// ad-hoc jump: leap second at 2009.01.01 -1hr
-TEST_F(leapsecTest, ls2009houraway) {
+void test_ls2009houraway(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap1);
- EXPECT_EQ(1, rc);
+ rc = setup_load_table(leap1,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
// test 1 hour before leap. 61 true seconds to go.
rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(33, qr.tai_offs);
- EXPECT_EQ(1, qr.tai_diff);
- EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(33, qr.tai_offs);
+ TEST_ASSERT_EQUAL(1, qr.tai_diff);
+ TEST_ASSERT_EQUAL(LSPROX_ANNOUNCE, qr.proximity);
}
// ----------------------------------------------------------------------
// ad-hoc jump: leap second at 2009.01.01 -1sec
-TEST_F(leapsecTest, ls2009secaway) {
+void test_ls2009secaway(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap1);
- EXPECT_EQ(1, rc);
+ rc = setup_load_table(leap1,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
// test 1 second before leap (last boundary...) 2 true seconds to go.
rc = leapsec_query(&qr, lsec2009 - 1, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(33, qr.tai_offs);
- EXPECT_EQ(1, qr.tai_diff);
- EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(33, qr.tai_offs);
+ TEST_ASSERT_EQUAL(1, qr.tai_diff);
+ TEST_ASSERT_EQUAL(LSPROX_ALERT, qr.proximity);
}
// ----------------------------------------------------------------------
// ad-hoc jump to leap second at 2009.01.01
-TEST_F(leapsecTest, ls2009onspot) {
+void test_ls2009onspot(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap1);
- EXPECT_EQ(1, rc);
+ rc = setup_load_table(leap1,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
// test on-spot: treat leap second as already gone.
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(34, qr.tai_offs);
- EXPECT_EQ(0, qr.tai_diff);
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(34, qr.tai_offs);
+ TEST_ASSERT_EQUAL(0, qr.tai_diff);
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// test handling of the leap second at 2009.01.01 without table
-TEST_F(leapsecTest, ls2009nodata) {
+void test_ls2009nodata(void) {
int rc;
leap_result_t qr;
rc = setup_clear_table();
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc);
// test on-spot with empty table
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.tai_offs);
- EXPECT_EQ(0, qr.tai_diff);
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.tai_offs);
+ TEST_ASSERT_EQUAL(0, qr.tai_diff);
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// test handling of the leap second at 2009.01.01 with culled data
-TEST_F(leapsecTest, ls2009limdata) {
+void test_ls2009limdata(void) {
int rc;
leap_result_t qr;
rc = setup_load_table(leap1, TRUE);
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc);
// test on-spot with limited table - this is tricky.
// The table used ends 2012; depending on the build date, the 2009 entry
// might be included or culled. The resulting TAI offset must be either
// 34 or 35 seconds, depending on the build date of the test.
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_LE(34, qr.tai_offs);
- EXPECT_GE(35, qr.tai_offs);
- EXPECT_EQ(0, qr.tai_diff);
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_TRUE(34 <= qr.tai_offs);
+ TEST_ASSERT_TRUE(35 >= qr.tai_offs);
+ TEST_ASSERT_EQUAL(0, qr.tai_diff);
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// Far-distance forward jump into a transiton window.
-TEST_F(leapsecTest, qryJumpFarAhead) {
+void test_qryJumpFarAhead(void) {
int rc;
leap_result_t qr;
int last, idx;
+ int mode;
- for (int mode=0; mode < 2; ++mode) {
+ for (mode=0; mode < 2; ++mode) {
leapsec_ut_pristine();
rc = setup_load_table(leap1, FALSE);
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc);
leapsec_electric(mode);
rc = leapsec_query(&qr, lsec2006, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
rc = leapsec_query(&qr, lsec2012, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
}
}
// ----------------------------------------------------------------------
// Forward jump into the next transition window
-TEST_F(leapsecTest, qryJumpAheadToTransition) {
+void test_qryJumpAheadToTransition(void) {
int rc;
leap_result_t qr;
int last, idx;
+ int mode;
- for (int mode=0; mode < 2; ++mode) {
+ for (mode=0; mode < 2; ++mode) {
leapsec_ut_pristine();
rc = setup_load_table(leap1, FALSE);
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc);
leapsec_electric(mode);
rc = leapsec_query(&qr, lsec2009-SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
rc = leapsec_query(&qr, lsec2009+1, NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
}
}
// ----------------------------------------------------------------------
// Forward jump over the next transition window
-TEST_F(leapsecTest, qryJumpAheadOverTransition) {
+void test_qryJumpAheadOverTransition(void) {
int rc;
leap_result_t qr;
int last, idx;
+ int mode;
- for (int mode=0; mode < 2; ++mode) {
+ for (mode=0; mode < 2; ++mode) {
leapsec_ut_pristine();
rc = setup_load_table(leap1, FALSE);
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc);
leapsec_electric(mode);
rc = leapsec_query(&qr, lsec2009-SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
rc = leapsec_query(&qr, lsec2009+5, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
}
}
@@ -639,7 +665,7 @@ TEST_F(leapsecTest, qryJumpAheadOverTransition) {
// ----------------------------------------------------------------------
// add dynamic leap second (like from peer/clock)
-TEST_F(leapsecTest, addDynamic) {
+void test_addDynamic(void) {
int rc;
leap_result_t qr;
@@ -655,23 +681,25 @@ TEST_F(leapsecTest, addDynamic) {
};
rc = setup_load_table(leap2, FALSE);
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc);
leap_table_t * pt = leapsec_get_table(0);
- for (int idx=1; insns[idx]; ++idx) {
+ int idx;
+
+ for (idx=1; insns[idx]; ++idx) {
rc = leapsec_add_dyn(TRUE, insns[idx] - 20*SECSPERDAY - 100, NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
}
// try to slip in a previous entry
rc = leapsec_add_dyn(TRUE, insns[0] - 20*SECSPERDAY - 100, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
//leapsec_dump(pt, (leapsec_dumper)fprintf, stdout);
}
// ----------------------------------------------------------------------
// add fixed leap seconds (like from network packet)
#if 0 /* currently unused -- possibly revived later */
-TEST_F(leapsecTest, addFixed) {
+void FAILtest_addFixed(void) {
int rc;
leap_result_t qr;
@@ -687,26 +715,26 @@ TEST_F(leapsecTest, addFixed) {
};
rc = setup_load_table(leap2, FALSE);
- EXPECT_EQ(1, rc);
-
+ TEST_ASSERT_EQUAL(1, rc);
+ int idx;
leap_table_t * pt = leapsec_get_table(0);
// try to get in BAD time stamps...
- for (int idx=0; insns[idx].tt; ++idx) {
+ for (idx=0; insns[idx].tt; ++idx) {
rc = leapsec_add_fix(
insns[idx].of,
insns[idx].tt - 20*SECSPERDAY - 100,
insns[idx].tt + SECSPERDAY,
NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
}
// now do it right
- for (int idx=0; insns[idx].tt; ++idx) {
+ for (idx=0; insns[idx].tt; ++idx) {
rc = leapsec_add_fix(
insns[idx].of,
insns[idx].tt,
insns[idx].tt + SECSPERDAY,
NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
}
// try to slip in a previous entry
rc = leapsec_add_fix(
@@ -714,7 +742,7 @@ TEST_F(leapsecTest, addFixed) {
insns[0].tt,
insns[0].tt + SECSPERDAY,
NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
//leapsec_dump(pt, (leapsec_dumper)fprintf, stdout);
}
#endif
@@ -722,7 +750,7 @@ TEST_F(leapsecTest, addFixed) {
// ----------------------------------------------------------------------
// add fixed leap seconds (like from network packet)
#if 0 /* currently unused -- possibly revived later */
-TEST_F(leapsecTest, addFixedExtend) {
+void FAILtest_addFixedExtend(void) {
int rc;
leap_result_t qr;
int last, idx;
@@ -734,7 +762,7 @@ TEST_F(leapsecTest, addFixedExtend) {
};
rc = setup_load_table(leap2, FALSE);
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc);
leap_table_t * pt = leapsec_get_table(FALSE);
for (last=idx=0; insns[idx].tt; ++idx) {
@@ -744,7 +772,7 @@ TEST_F(leapsecTest, addFixedExtend) {
insns[idx].tt,
insns[idx].tt + SECSPERDAY,
NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
}
// try to extend the expiration of the last entry
@@ -753,7 +781,7 @@ TEST_F(leapsecTest, addFixedExtend) {
insns[last].tt,
insns[last].tt + 128*SECSPERDAY,
NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
// try to extend the expiration of the last entry with wrong offset
rc = leapsec_add_fix(
@@ -761,7 +789,7 @@ TEST_F(leapsecTest, addFixedExtend) {
insns[last].tt,
insns[last].tt + 129*SECSPERDAY,
NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
//leapsec_dump(pt, (leapsec_dumper)fprintf, stdout);
}
#endif
@@ -771,7 +799,7 @@ TEST_F(leapsecTest, addFixedExtend) {
// empty table and test queries before / between /after the tabulated
// values.
#if 0 /* currently unused -- possibly revived later */
-TEST_F(leapsecTest, setFixedExtend) {
+void FAILtest_setFixedExtend(void) {
int rc;
leap_result_t qr;
int last, idx;
@@ -790,20 +818,20 @@ TEST_F(leapsecTest, setFixedExtend) {
insns[idx].tt,
insns[idx].tt + 128*SECSPERDAY,
NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
}
rc = leapsec_query(&qr, insns[0].tt - 86400, NULL);
- EXPECT_EQ(28, qr.tai_offs);
+ TEST_ASSERT_EQUAL(28, qr.tai_offs);
rc = leapsec_query(&qr, insns[0].tt + 86400, NULL);
- EXPECT_EQ(29, qr.tai_offs);
+ TEST_ASSERT_EQUAL(29, qr.tai_offs);
rc = leapsec_query(&qr, insns[1].tt - 86400, NULL);
- EXPECT_EQ(29, qr.tai_offs);
+ TEST_ASSERT_EQUAL(29, qr.tai_offs);
rc = leapsec_query(&qr, insns[1].tt + 86400, NULL);
- EXPECT_EQ(30, qr.tai_offs);
+ TEST_ASSERT_EQUAL(30, qr.tai_offs);
//leapsec_dump(pt, (leapsec_dumper)fprintf, stdout);
}
@@ -815,67 +843,67 @@ TEST_F(leapsecTest, setFixedExtend) {
// ----------------------------------------------------------------------
// Check if the offset can be applied to an empty table ONCE
-TEST_F(leapsecTest, taiEmptyTable) {
+void test_taiEmptyTable(void) {
int rc;
rc = leapsec_autokey_tai(35, lsec2015-30*86400, NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
rc = leapsec_autokey_tai(35, lsec2015-29*86400, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
}
// ----------------------------------------------------------------------
// Check that with fixed entries the operation fails
-TEST_F(leapsecTest, taiTableFixed) {
+void test_taiTableFixed(void) {
int rc;
rc = setup_load_table(leap1, FALSE);
- EXPECT_EQ(1, rc);
+ TEST_ASSERT_EQUAL(1, rc);
rc = leapsec_autokey_tai(35, lsec2015-30*86400, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
}
// ----------------------------------------------------------------------
// test adjustment with a dynamic entry already there
-TEST_F(leapsecTest, taiTableDynamic) {
+void test_taiTableDynamic(void) {
int rc;
leap_era_t era;
rc = leapsec_add_dyn(TRUE, lsec2015-20*SECSPERDAY, NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
leapsec_query_era(&era, lsec2015-10, NULL);
- EXPECT_EQ(0, era.taiof);
+ TEST_ASSERT_EQUAL(0, era.taiof);
leapsec_query_era(&era, lsec2015+10, NULL);
- EXPECT_EQ(1, era.taiof);
+ TEST_ASSERT_EQUAL(1, era.taiof);
rc = leapsec_autokey_tai(35, lsec2015-19*86400, NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
rc = leapsec_autokey_tai(35, lsec2015-19*86400, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
leapsec_query_era(&era, lsec2015-10, NULL);
- EXPECT_EQ(35, era.taiof);
+ TEST_ASSERT_EQUAL(35, era.taiof);
leapsec_query_era(&era, lsec2015+10, NULL);
- EXPECT_EQ(36, era.taiof);
+ TEST_ASSERT_EQUAL(36, era.taiof);
}
// ----------------------------------------------------------------------
// test adjustment with a dynamic entry already there in dead zone
-TEST_F(leapsecTest, taiTableDynamicDeadZone) {
+void test_taiTableDynamicDeadZone(void) {
int rc;
rc = leapsec_add_dyn(TRUE, lsec2015-20*SECSPERDAY, NULL);
- EXPECT_EQ(TRUE, rc);
+ TEST_ASSERT_EQUAL(TRUE, rc);
rc = leapsec_autokey_tai(35, lsec2015-5, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
rc = leapsec_autokey_tai(35, lsec2015+5, NULL);
- EXPECT_EQ(FALSE, rc);
+ TEST_ASSERT_EQUAL(FALSE, rc);
}
@@ -885,309 +913,317 @@ TEST_F(leapsecTest, taiTableDynamicDeadZone) {
// ----------------------------------------------------------------------
// leap second insert at 2009.01.01, electric mode
-TEST_F(leapsecTest, ls2009seqInsElectric) {
+void test_ls2009seqInsElectric(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap1);
- EXPECT_EQ(1, rc);
+ rc = setup_load_table(leap1,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
leapsec_electric(1);
- EXPECT_EQ(1, leapsec_electric(-1));
+ TEST_ASSERT_EQUAL(1, leapsec_electric(-1));
rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_SCHEDULE, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ANNOUNCE, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - 1, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ALERT, qr.proximity);
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(TRUE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(TRUE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
// second call, same time frame: no trigger!
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// leap second insert at 2009.01.01, dumb mode
-TEST_F(leapsecTest, ls2009seqInsDumb) {
+void test_ls2009seqInsDumb(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap1);
- EXPECT_EQ(1, rc);
- EXPECT_EQ(0, leapsec_electric(-1));
+ rc = setup_load_table(leap1,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
+ TEST_ASSERT_EQUAL(0, leapsec_electric(-1));
rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_SCHEDULE, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ANNOUNCE, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - 1, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ALERT, qr.proximity);
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ALERT, qr.proximity);
rc = leapsec_query(&qr, lsec2009+1, NULL);
- EXPECT_EQ(TRUE, rc);
- EXPECT_EQ(-1, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(TRUE, rc);
+ TEST_ASSERT_EQUAL(-1, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
// second call, same time frame: no trigger!
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// fake leap second remove at 2009.01.01, electric mode
-TEST_F(leapsecTest, ls2009seqDelElectric) {
+void test_ls2009seqDelElectric(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap3);
- EXPECT_EQ(1, rc);
+ rc = setup_load_table(leap3,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
leapsec_electric(1);
- EXPECT_EQ(1, leapsec_electric(-1));
+ TEST_ASSERT_EQUAL(1, leapsec_electric(-1));
rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_SCHEDULE, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ANNOUNCE, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - 1, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ALERT, qr.proximity);
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(TRUE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(TRUE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
// second call, same time frame: no trigger!
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// fake leap second remove at 2009.01.01. dumb mode
-TEST_F(leapsecTest, ls2009seqDelDumb) {
+void test_ls2009seqDelDumb(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap3);
- EXPECT_EQ(1, rc);
- EXPECT_EQ(0, leapsec_electric(-1));
+ rc = setup_load_table(leap3,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
+ TEST_ASSERT_EQUAL(0, leapsec_electric(-1));
rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_SCHEDULE, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ANNOUNCE, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - 2, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ALERT, qr.proximity);
rc = leapsec_query(&qr, lsec2009 - 1, NULL);
- EXPECT_EQ(TRUE, rc);
- EXPECT_EQ(1, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(TRUE, rc);
+ TEST_ASSERT_EQUAL(1, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
// second call, same time frame: no trigger!
rc = leapsec_query(&qr, lsec2009, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// leap second insert at 2012.07.01, electric mode
-TEST_F(leapsecTest, ls2012seqInsElectric) {
+void test_ls2012seqInsElectric(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap1);
- EXPECT_EQ(1, rc);
+ rc = setup_load_table(leap1,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
leapsec_electric(1);
- EXPECT_EQ(1, leapsec_electric(-1));
+ TEST_ASSERT_EQUAL(1, leapsec_electric(-1));
rc = leapsec_query(&qr, lsec2012 - 60*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
rc = leapsec_query(&qr, lsec2012 - 7*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_SCHEDULE, qr.proximity);
rc = leapsec_query(&qr, lsec2012 - SECSPERHR, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ANNOUNCE, qr.proximity);
rc = leapsec_query(&qr, lsec2012 - 1, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ALERT, qr.proximity);
rc = leapsec_query(&qr, lsec2012, NULL);
- EXPECT_EQ(TRUE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(TRUE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
// second call, same time frame: no trigger!
rc = leapsec_query(&qr, lsec2012, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// leap second insert at 2012.07.01, dumb mode
-TEST_F(leapsecTest, ls2012seqInsDumb) {
+void test_ls2012seqInsDumb(void) {
int rc;
leap_result_t qr;
- rc = setup_load_table(leap1);
- EXPECT_EQ(1, rc);
- EXPECT_EQ(0, leapsec_electric(-1));
+ rc = setup_load_table(leap1,FALSE);
+ TEST_ASSERT_EQUAL(1, rc);
+ TEST_ASSERT_EQUAL(0, leapsec_electric(-1));
rc = leapsec_query(&qr, lsec2012 - 60*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
rc = leapsec_query(&qr, lsec2012 - 7*SECSPERDAY, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_SCHEDULE, qr.proximity);
rc = leapsec_query(&qr, lsec2012 - SECSPERHR, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ANNOUNCE, qr.proximity);
rc = leapsec_query(&qr, lsec2012 - 1, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ALERT, qr.proximity);
// This is just 1 sec before transition!
rc = leapsec_query(&qr, lsec2012, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_ALERT, qr.proximity);
// NOW the insert/backwarp must happen
rc = leapsec_query(&qr, lsec2012+1, NULL);
- EXPECT_EQ(TRUE, rc);
- EXPECT_EQ(-1, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(TRUE, rc);
+ TEST_ASSERT_EQUAL(-1, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
// second call with transition time: no trigger!
rc = leapsec_query(&qr, lsec2012, NULL);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
// ----------------------------------------------------------------------
// test repeated query on empty table in dumb mode
-TEST_F(leapsecTest, lsEmptyTableDumb) {
+void test_lsEmptyTableDumb(void) {
int rc;
leap_result_t qr;
- const time_t pivot(lsec2012);
- const uint32_t t0 (lsec2012 - 10);
- const uint32_t tE (lsec2012 + 10);
+ //const
+ time_t pivot;
+ pivot = lsec2012;
+ // const
+ //time_t pivot(lsec2012);
+ const uint32_t t0 = lsec2012 - 10;
+ const uint32_t tE = lsec2012 + 10;
- EXPECT_EQ(0, leapsec_electric(-1));
+ TEST_ASSERT_EQUAL(0, leapsec_electric(-1));
- for (uint32_t t = t0; t != tE; ++t) {
+ uint32_t t;
+ for (t = t0; t != tE; ++t) {
rc = leapsec_query(&qr, t, &pivot);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
}
// ----------------------------------------------------------------------
// test repeated query on empty table in electric mode
-TEST_F(leapsecTest, lsEmptyTableElectric) {
+void test_lsEmptyTableElectric(void) {
int rc;
leap_result_t qr;
leapsec_electric(1);
- EXPECT_EQ(1, leapsec_electric(-1));
+ TEST_ASSERT_EQUAL(1, leapsec_electric(-1));
- const time_t pivot(lsec2012);
- const uint32_t t0 (lsec2012 - 10);
- const uint32_t tE (lsec2012 + 10);
+ //const
+ time_t pivot;//(lsec2012);
+ pivot = lsec2012;
+ const uint32_t t0 = lsec2012 - 10;
+ const uint32_t tE = lsec2012 + 10;
- for (time_t t = t0; t != tE; ++t) {
+ time_t t;
+ for (t = t0; t != tE; ++t) {
rc = leapsec_query(&qr, t, &pivot);
- EXPECT_EQ(FALSE, rc);
- EXPECT_EQ(0, qr.warped );
- EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+ TEST_ASSERT_EQUAL(FALSE, rc);
+ TEST_ASSERT_EQUAL(0, qr.warped );
+ TEST_ASSERT_EQUAL(LSPROX_NOWARN, qr.proximity);
}
}
diff --git a/contrib/ntp/tests/ntpd/ntp_prio_q.c b/contrib/ntp/tests/ntpd/ntp_prio_q.c
new file mode 100644
index 000000000000..c2d4f76f0305
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/ntp_prio_q.c
@@ -0,0 +1,262 @@
+#include "config.h"
+
+#include "ntp.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+
+#include "ntp_prio_q.h"
+
+#include "unity.h"
+
+
+
+#include <string.h>
+/*
+TODO:
+-fix the includes
+-makefile: ntpdsim-ntp_prio_q.o - make sure it's okay
+*/
+
+
+/* helpers */
+
+typedef struct Element
+{
+ char str[37]; // 37 seems like a nice candidate to break stuff
+ int number;
+
+} element;
+
+int
+compare_elements(const void * e1, const void * e2)
+{
+ return ((element*)e1)->number < ((element*)e2)->number;
+}
+
+/* tests */
+
+void
+test_AllocateDeallocateNode(void) {
+ element* e_ptr = debug_get_node(sizeof(element));
+ free_node(e_ptr);
+}
+
+
+void
+test_EmptyQueue(void) {
+ queue* q = create_queue();
+
+ TEST_ASSERT_NOT_NULL(q);
+ TEST_ASSERT_TRUE(empty(q));
+ TEST_ASSERT_NULL(queue_head(q));
+ TEST_ASSERT_NULL(dequeue(q));
+ TEST_ASSERT_EQUAL(0, get_no_of_elements(q));
+
+ destroy_queue(q);
+}
+
+
+void
+test_OneElementQueue(void) {
+ queue* q = create_queue();
+
+ TEST_ASSERT_NOT_NULL(q);
+
+ element e = {"string", 3};
+ element* e_ptr = debug_get_node(sizeof(element));
+ enqueue(q, e_ptr);
+ *e_ptr = e;
+
+ TEST_ASSERT_FALSE(empty(q));
+ TEST_ASSERT_NOT_NULL(queue_head(q));
+ TEST_ASSERT_EQUAL(1, get_no_of_elements(q));
+
+ element* e_ptr_returned = dequeue(q);
+
+ TEST_ASSERT_NOT_NULL(e_ptr_returned);
+ TEST_ASSERT_EQUAL_STRING(e_ptr_returned->str, "string");
+ TEST_ASSERT_EQUAL_PTR(e_ptr_returned, e_ptr);
+ TEST_ASSERT_EQUAL(0, get_no_of_elements(q));
+ TEST_ASSERT_TRUE(empty(q));
+ TEST_ASSERT_NULL(dequeue(q));
+
+ destroy_queue(q);
+}
+
+
+void
+test_MultipleElementQueue(void) {
+ queue* q = create_queue();
+
+ TEST_ASSERT_NOT_NULL(q);
+
+ element *e1_ptr, *e2_ptr, *e3_ptr;
+
+ e1_ptr = (element*)debug_get_node(sizeof(element));
+ e2_ptr = (element*)debug_get_node(sizeof(element));
+ e3_ptr = (element*)debug_get_node(sizeof(element));
+
+ enqueue(q, e1_ptr);
+ enqueue(q, e2_ptr);
+ enqueue(q, e3_ptr);
+
+ TEST_ASSERT_EQUAL(3, get_no_of_elements(q));
+
+ dequeue(q);
+ enqueue(q, e1_ptr);
+
+ TEST_ASSERT_EQUAL(3, get_no_of_elements(q));
+
+ dequeue(q);
+ dequeue(q);
+ enqueue(q, e3_ptr);
+ enqueue(q, e2_ptr);
+
+ TEST_ASSERT_EQUAL_PTR(dequeue(q), e1_ptr);
+ TEST_ASSERT_EQUAL_PTR(dequeue(q), e3_ptr);
+ TEST_ASSERT_EQUAL_PTR(dequeue(q), e2_ptr);
+ TEST_ASSERT_EQUAL(0, get_no_of_elements(q));
+ TEST_ASSERT_NULL(dequeue(q));
+
+ destroy_queue(q);
+}
+
+
+void
+test_CustomOrderQueue(void) {
+ queue* q = debug_create_priority_queue(compare_elements);
+ element *e1_ptr, *e2_ptr, *e3_ptr, *e4_ptr, *e5_ptr, *e6_ptr;
+
+ e1_ptr = (element*)debug_get_node(sizeof(element));
+ e2_ptr = (element*)debug_get_node(sizeof(element));
+ e3_ptr = (element*)debug_get_node(sizeof(element));
+ e4_ptr = (element*)debug_get_node(sizeof(element));
+ e5_ptr = (element*)debug_get_node(sizeof(element));
+ e6_ptr = (element*)debug_get_node(sizeof(element));
+
+ e1_ptr->number = 1;
+ e2_ptr->number = 1;
+ e3_ptr->number = 10;
+ e4_ptr->number = 10;
+ e5_ptr->number = 100;
+ e6_ptr->number = 100;
+
+ enqueue(q, e3_ptr);
+ enqueue(q, e5_ptr);
+ enqueue(q, e2_ptr);
+ enqueue(q, e1_ptr);
+ enqueue(q, e4_ptr);
+ enqueue(q, e6_ptr);
+
+ TEST_ASSERT_EQUAL(((element*)queue_head(q))->number, 100);
+ TEST_ASSERT_EQUAL(((element*)dequeue(q))->number, 100);
+
+ TEST_ASSERT_EQUAL(((element*)queue_head(q))->number, 100);
+ TEST_ASSERT_EQUAL(((element*)dequeue(q))->number, 100);
+
+ TEST_ASSERT_EQUAL(((element*)queue_head(q))->number, 10);
+ TEST_ASSERT_EQUAL(((element*)dequeue(q))->number, 10);
+
+ TEST_ASSERT_EQUAL(((element*)queue_head(q))->number, 10);
+ TEST_ASSERT_EQUAL(((element*)dequeue(q))->number, 10);
+
+ TEST_ASSERT_EQUAL(((element*)queue_head(q))->number, 1);
+ TEST_ASSERT_EQUAL(((element*)dequeue(q))->number, 1);
+
+ TEST_ASSERT_EQUAL(((element*)queue_head(q))->number, 1);
+ TEST_ASSERT_EQUAL(((element*)dequeue(q))->number, 1);
+
+ TEST_ASSERT_TRUE(empty(q));
+
+ destroy_queue(q);
+
+ free_node(e1_ptr);
+ free_node(e2_ptr);
+ free_node(e3_ptr);
+ free_node(e4_ptr);
+ free_node(e5_ptr);
+ free_node(e6_ptr);
+}
+
+
+void
+test_DestroyNonEmptyQueue(void) {
+ queue* q = create_queue();
+ element *e1_ptr, *e2_ptr, *e3_ptr, *e4_ptr, *e5_ptr, *e6_ptr;
+
+ e1_ptr = (element*)debug_get_node(sizeof(element));
+ e2_ptr = (element*)debug_get_node(sizeof(element));
+ e3_ptr = (element*)debug_get_node(sizeof(element));
+ e4_ptr = (element*)debug_get_node(sizeof(element));
+ e5_ptr = (element*)debug_get_node(sizeof(element));
+ e6_ptr = (element*)debug_get_node(sizeof(element));
+
+ enqueue(q, e3_ptr);
+ enqueue(q, e2_ptr);
+ enqueue(q, e4_ptr);
+ enqueue(q, e1_ptr);
+ enqueue(q, e6_ptr);
+ enqueue(q, e5_ptr);
+
+ destroy_queue(q);
+}
+
+void
+test_AppendQueues(void) {
+ queue* q1 = create_queue();
+ queue* q2 = create_queue();
+ queue* q3 = create_queue();
+ queue* q4 = create_queue();
+ queue* q5 = create_queue();
+
+ // append empty queue to empty queue
+ append_queue(q1, q2); // destroys q2
+
+ element *e1_ptr, *e2_ptr, *e3_ptr, *e4_ptr, *e5_ptr, *e6_ptr;
+ e1_ptr = (element*)debug_get_node(sizeof(element));
+ e2_ptr = (element*)debug_get_node(sizeof(element));
+ e3_ptr = (element*)debug_get_node(sizeof(element));
+ e4_ptr = (element*)debug_get_node(sizeof(element));
+ e5_ptr = (element*)debug_get_node(sizeof(element));
+ e6_ptr = (element*)debug_get_node(sizeof(element));
+
+ enqueue(q1, e1_ptr);
+ enqueue(q1, e2_ptr);
+ enqueue(q1, e3_ptr);
+
+
+ // append empty queue to non empty queue
+ append_queue(q1, q3); // destroys q3
+ TEST_ASSERT_EQUAL(3, get_no_of_elements(q1));
+
+ // append non empty queue to empty queue
+ append_queue(q4, q1); // destroys q1
+ TEST_ASSERT_EQUAL(3, get_no_of_elements(q4));
+
+ enqueue(q5, e4_ptr);
+ enqueue(q5, e5_ptr);
+
+ // append non empty queue to non empty queue
+ append_queue(q4, q5); // destroys q5
+ TEST_ASSERT_EQUAL(5, get_no_of_elements(q4));
+
+ dequeue(q4);
+ dequeue(q4);
+ dequeue(q4);
+ dequeue(q4);
+ dequeue(q4);
+
+ free_node(e1_ptr);
+ free_node(e2_ptr);
+ free_node(e3_ptr);
+ free_node(e4_ptr);
+ free_node(e5_ptr);
+
+ TEST_ASSERT_EQUAL(0, get_no_of_elements(q4));
+
+ // destroy_queue(q1); // destroyed already
+ // destroy_queue(q2); // destroyed already
+ // destroy_queue(q3); // destroyed already
+ destroy_queue(q4);
+ // destroy_queue(q5); // destroyed already
+}
diff --git a/contrib/ntp/tests/ntpd/ntp_restrict.c b/contrib/ntp/tests/ntpd/ntp_restrict.c
new file mode 100644
index 000000000000..98d6e8309338
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/ntp_restrict.c
@@ -0,0 +1,198 @@
+#include "config.h"
+
+#include "ntpd.h"
+#include "ntp_lists.h"
+
+#include "unity.h"
+
+/* Helper functions */
+
+sockaddr_u
+create_sockaddr_u(short sin_family, unsigned short sin_port, char* ip_addr) {
+ sockaddr_u sockaddr;
+
+ sockaddr.sa4.sin_family = AF_INET;
+ sockaddr.sa4.sin_port = htons(sin_port);
+ memset(sockaddr.sa4.sin_zero, 0, 8);
+ sockaddr.sa4.sin_addr.s_addr = inet_addr(ip_addr);
+
+ return sockaddr;
+}
+
+
+void
+setUp(void) {
+ init_restrict();
+}
+
+
+tearDown(void) {
+ restrict_u *empty_restrict = malloc(sizeof(restrict_u));
+ memset(empty_restrict, 0, sizeof(restrict_u));
+
+ restrict_u *current;
+
+ do {
+ UNLINK_HEAD_SLIST(current, restrictlist4, link);
+ if (current != NULL)
+ {
+ *current = *empty_restrict;
+ }
+ } while (current != NULL);
+
+ do {
+ UNLINK_HEAD_SLIST(current, restrictlist6, link);
+ if (current != NULL)
+ {
+ *current = *empty_restrict;
+ }
+ } while (current != NULL);
+
+ free(empty_restrict);
+}
+
+
+/* Tests */
+
+
+void
+test_RestrictionsAreEmptyAfterInit(void) {
+
+ restrict_u *rl4 = malloc(sizeof(restrict_u));
+ restrict_u *rl6 = malloc(sizeof(restrict_u));
+
+ memset(rl4, 0, sizeof(restrict_u));
+ memset(rl6, 0, sizeof(restrict_u));
+
+ TEST_ASSERT_EQUAL(rl4->count, restrictlist4->count);
+ TEST_ASSERT_EQUAL(rl4->flags, restrictlist4->flags);
+ TEST_ASSERT_EQUAL(rl4->mflags, restrictlist4->mflags);
+ TEST_ASSERT_EQUAL(rl4->expire, restrictlist4->expire);
+ TEST_ASSERT_EQUAL(rl4->u.v4.addr, restrictlist4->u.v4.addr);
+ TEST_ASSERT_EQUAL(rl4->u.v4.mask, restrictlist4->u.v4.mask);
+
+ TEST_ASSERT_EQUAL(rl6->count, restrictlist6->count);
+ TEST_ASSERT_EQUAL(rl6->flags, restrictlist6->flags);
+ TEST_ASSERT_EQUAL(rl6->mflags, restrictlist6->mflags);
+ TEST_ASSERT_EQUAL(rl6->expire, restrictlist6->expire);
+
+ free(rl4);
+ free(rl6);
+}
+
+
+void
+test_ReturnsCorrectDefaultRestrictions(void) {
+ sockaddr_u sockaddr = create_sockaddr_u(AF_INET,
+ 54321, "63.161.169.137");
+
+ u_short retval = restrictions(&sockaddr);
+
+ TEST_ASSERT_EQUAL(0, retval);
+}
+
+
+void
+test_HackingDefaultRestriction(void) {
+ /*
+ * We change the flag of the default restriction,
+ * and check if restriction() returns that flag
+ */
+
+ const u_short flags = 42;
+
+ sockaddr_u resaddr = create_sockaddr_u(AF_INET,
+ 54321, "0.0.0.0");
+ sockaddr_u resmask = create_sockaddr_u(AF_INET,
+ 54321, "0.0.0.0");
+
+ hack_restrict(RESTRICT_FLAGS, &resaddr, &resmask, 0, flags, 0);
+
+ sockaddr_u sockaddr = create_sockaddr_u(AF_INET,
+ 54321, "111.123.251.124");
+
+ TEST_ASSERT_EQUAL(flags, restrictions(&sockaddr));
+}
+
+
+void
+test_CantRemoveDefaultEntry(void) {
+ sockaddr_u resaddr = create_sockaddr_u(AF_INET, 54321, "0.0.0.0");
+ sockaddr_u resmask = create_sockaddr_u(AF_INET, 54321, "0.0.0.0");
+
+ hack_restrict(RESTRICT_REMOVE, &resaddr, &resmask, 0, 0, 0);
+
+ TEST_ASSERT_EQUAL(0, restrictions(&resaddr));
+}
+
+
+void
+test_AddingNewRestriction(void) {
+ sockaddr_u resaddr = create_sockaddr_u(AF_INET, 54321, "11.22.33.44");
+ sockaddr_u resmask = create_sockaddr_u(AF_INET, 54321, "128.0.0.0");
+
+ const u_short flags = 42;
+
+ hack_restrict(RESTRICT_FLAGS, &resaddr, &resmask, 0, flags, 0);
+
+ TEST_ASSERT_EQUAL(flags, restrictions(&resaddr));
+}
+
+
+void
+test_TheMostFittingRestrictionIsMatched(void) {
+ sockaddr_u resaddr_target = create_sockaddr_u(AF_INET, 54321, "11.22.33.44");
+
+ sockaddr_u resaddr_not_matching = create_sockaddr_u(AF_INET, 54321, "11.99.33.44");
+ sockaddr_u resmask_not_matching = create_sockaddr_u(AF_INET, 54321, "255.255.0.0");
+
+ sockaddr_u resaddr_best_match = create_sockaddr_u(AF_INET, 54321, "11.22.30.20");
+ sockaddr_u resmask_best_match = create_sockaddr_u(AF_INET, 54321, "255.255.0.0");
+
+ /* it also matches, but we prefer the one above, as it's more specific */
+ sockaddr_u resaddr_second_match = create_sockaddr_u(AF_INET, 54321, "11.99.33.44");
+ sockaddr_u resmask_second_match = create_sockaddr_u(AF_INET, 54321, "255.0.0.0");
+
+ hack_restrict(RESTRICT_FLAGS, &resaddr_not_matching, &resmask_not_matching, 0, 11, 0);
+ hack_restrict(RESTRICT_FLAGS, &resaddr_best_match, &resmask_best_match, 0, 22, 0);
+ hack_restrict(RESTRICT_FLAGS, &resaddr_second_match, &resmask_second_match, 0, 128, 0);
+
+ TEST_ASSERT_EQUAL(22, restrictions(&resaddr_target));
+}
+
+
+void
+test_DeletedRestrictionIsNotMatched(void) {
+ sockaddr_u resaddr_target = create_sockaddr_u(AF_INET, 54321, "11.22.33.44");
+
+ sockaddr_u resaddr_not_matching = create_sockaddr_u(AF_INET, 54321, "11.99.33.44");
+ sockaddr_u resmask_not_matching = create_sockaddr_u(AF_INET, 54321, "255.255.0.0");
+
+ sockaddr_u resaddr_best_match = create_sockaddr_u(AF_INET, 54321, "11.22.30.20");
+ sockaddr_u resmask_best_match = create_sockaddr_u(AF_INET, 54321, "255.255.0.0");
+
+ sockaddr_u resaddr_second_match = create_sockaddr_u(AF_INET, 54321, "11.99.33.44");
+ sockaddr_u resmask_second_match = create_sockaddr_u(AF_INET, 54321, "255.0.0.0");
+
+ hack_restrict(RESTRICT_FLAGS, &resaddr_not_matching, &resmask_not_matching, 0, 11, 0);
+ hack_restrict(RESTRICT_FLAGS, &resaddr_best_match, &resmask_best_match, 0, 22, 0);
+ hack_restrict(RESTRICT_FLAGS, &resaddr_second_match, &resmask_second_match, 0, 128, 0);
+
+ /* deleting the best match*/
+ hack_restrict(RESTRICT_REMOVE, &resaddr_best_match, &resmask_best_match, 0, 22, 0);
+
+ TEST_ASSERT_EQUAL(128, restrictions(&resaddr_target));
+}
+
+
+void
+test_RestrictUnflagWorks(void) {
+ sockaddr_u resaddr = create_sockaddr_u(AF_INET, 54321, "11.22.30.20");
+ sockaddr_u resmask = create_sockaddr_u(AF_INET, 54321, "255.255.0.0");
+
+ hack_restrict(RESTRICT_FLAGS, &resaddr, &resmask, 0, 11, 0);
+
+ hack_restrict(RESTRICT_UNFLAG, &resaddr, &resmask, 0, 10, 0);
+
+ TEST_ASSERT_EQUAL(1, restrictions(&resaddr));
+}
diff --git a/contrib/ntp/tests/ntpd/ntpdtest.cpp b/contrib/ntp/tests/ntpd/ntpdtest.cpp
deleted file mode 100644
index 76b3b1a254bc..000000000000
--- a/contrib/ntp/tests/ntpd/ntpdtest.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "ntpdtest.h"
-
-/* This file contains various constants that libntp needs to be set
- * and that is normally defined in ntpd/ntpq/...
- */
-
-u_long current_time = 4; // needed by authkeys. Used only in to calculate lifetime.
-const char *progname = "ntpdtest";
-
-time_t ntpdtest::nowtime = 0;
-
-time_t ntpdtest::timefunc(time_t *ptr)
-{
- if (ptr)
- *ptr = nowtime;
- return nowtime;
-}
-
-void ntpdtest::settime(int y, int m, int d, int H, int M, int S)
-{
-
- time_t days(ntpcal_edate_to_eradays(y-1, m-1, d-1) + 1 - DAY_UNIX_STARTS);
- time_t secs(ntpcal_etime_to_seconds(H, M, S));
-
- nowtime = days * SECSPERDAY + secs;
-}
-
diff --git a/contrib/ntp/tests/ntpd/ntpdtest.h b/contrib/ntp/tests/ntpd/ntpdtest.h
deleted file mode 100644
index cc3172a83dbd..000000000000
--- a/contrib/ntp/tests/ntpd/ntpdtest.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "tests_main.h"
-
-extern "C" {
-#include "ntp_stdlib.h"
-#include "ntp_calendar.h"
-};
-
-class ntpdtest : public ntptest {
-
-protected:
- static time_t timefunc(time_t*);
- static time_t nowtime;
- static void settime(int y, int m, int d, int H, int M, int S);
-
-};
diff --git a/contrib/ntp/tests/ntpd/rc_cmdlength.c b/contrib/ntp/tests/ntpd/rc_cmdlength.c
new file mode 100644
index 000000000000..e3d599faf0ea
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/rc_cmdlength.c
@@ -0,0 +1,38 @@
+#include "config.h"
+
+#include "ntp.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+
+#include "unity.h"
+
+#include <string.h>
+
+#include "test-libntp.h"
+
+
+void
+test_EvaluateCommandLength(void){
+ size_t length, commandLength;
+ const char *command1 = "Random Command";
+ const char *command2 = "Random Command\t\t\n\t";
+ const char *command3 = "Random\nCommand\t\t\n\t";
+ const char *command4 = "Random Command\t\t\n\t1 2 3";
+
+ length = strlen(command1);
+ commandLength = remoteconfig_cmdlength(command1, command1+length);
+ TEST_ASSERT_EQUAL(14, commandLength );
+
+ length = strlen(command2);
+ commandLength = remoteconfig_cmdlength(command2, command2+length);
+ TEST_ASSERT_EQUAL(14, commandLength );
+
+ length = strlen(command3);
+ commandLength = remoteconfig_cmdlength(command3, command3+length);
+ TEST_ASSERT_EQUAL(6, commandLength );
+
+ length = strlen(command4);
+ commandLength = remoteconfig_cmdlength(command4, command4+length);
+ TEST_ASSERT_EQUAL(16, commandLength );
+
+}
diff --git a/contrib/ntp/tests/ntpd/run-leapsec.c b/contrib/ntp/tests/ntpd/run-leapsec.c
new file mode 100644
index 000000000000..c02cfa8967c9
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/run-leapsec.c
@@ -0,0 +1,122 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+ Unity.CurrentTestName = #TestFunc; \
+ Unity.CurrentTestLineNumber = TestLineNum; \
+ Unity.NumberOfTests++; \
+ if (TEST_PROTECT()) \
+ { \
+ setUp(); \
+ TestFunc(); \
+ } \
+ if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+ { \
+ tearDown(); \
+ } \
+ UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "config.h"
+#include "ntp.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+#include "ntp_leapsec.h"
+#include "test-libntp.h"
+#include <string.h>
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void test_ValidateGood(void);
+extern void test_ValidateNoHash(void);
+extern void test_ValidateBad(void);
+extern void test_ValidateMalformed(void);
+extern void test_ValidateMalformedShort(void);
+extern void test_ValidateNoLeadZero(void);
+extern void test_tableSelect(void);
+extern void test_loadFileExpire(void);
+extern void test_loadFileTTL(void);
+extern void test_lsQueryPristineState(void);
+extern void test_ls2009faraway(void);
+extern void test_ls2009weekaway(void);
+extern void test_ls2009houraway(void);
+extern void test_ls2009secaway(void);
+extern void test_ls2009onspot(void);
+extern void test_ls2009nodata(void);
+extern void test_ls2009limdata(void);
+extern void test_qryJumpFarAhead(void);
+extern void test_qryJumpAheadToTransition(void);
+extern void test_qryJumpAheadOverTransition(void);
+extern void test_addDynamic(void);
+extern void test_taiEmptyTable(void);
+extern void test_taiTableFixed(void);
+extern void test_taiTableDynamic(void);
+extern void test_taiTableDynamicDeadZone(void);
+extern void test_ls2009seqInsElectric(void);
+extern void test_ls2009seqInsDumb(void);
+extern void test_ls2009seqDelElectric(void);
+extern void test_ls2009seqDelDumb(void);
+extern void test_ls2012seqInsElectric(void);
+extern void test_ls2012seqInsDumb(void);
+extern void test_lsEmptyTableDumb(void);
+extern void test_lsEmptyTableElectric(void);
+
+
+//=======Test Reset Option=====
+void resetTest(void);
+void resetTest(void)
+{
+ tearDown();
+ setUp();
+}
+
+char const *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ UnityBegin("leapsec.c");
+ RUN_TEST(test_ValidateGood, 331);
+ RUN_TEST(test_ValidateNoHash, 338);
+ RUN_TEST(test_ValidateBad, 345);
+ RUN_TEST(test_ValidateMalformed, 352);
+ RUN_TEST(test_ValidateMalformedShort, 359);
+ RUN_TEST(test_ValidateNoLeadZero, 366);
+ RUN_TEST(test_tableSelect, 378);
+ RUN_TEST(test_loadFileExpire, 414);
+ RUN_TEST(test_loadFileTTL, 431);
+ RUN_TEST(test_lsQueryPristineState, 463);
+ RUN_TEST(test_ls2009faraway, 475);
+ RUN_TEST(test_ls2009weekaway, 492);
+ RUN_TEST(test_ls2009houraway, 509);
+ RUN_TEST(test_ls2009secaway, 526);
+ RUN_TEST(test_ls2009onspot, 543);
+ RUN_TEST(test_ls2009nodata, 560);
+ RUN_TEST(test_ls2009limdata, 577);
+ RUN_TEST(test_qryJumpFarAhead, 598);
+ RUN_TEST(test_qryJumpAheadToTransition, 620);
+ RUN_TEST(test_qryJumpAheadOverTransition, 642);
+ RUN_TEST(test_addDynamic, 668);
+ RUN_TEST(test_taiEmptyTable, 846);
+ RUN_TEST(test_taiTableFixed, 858);
+ RUN_TEST(test_taiTableDynamic, 870);
+ RUN_TEST(test_taiTableDynamicDeadZone, 896);
+ RUN_TEST(test_ls2009seqInsElectric, 916);
+ RUN_TEST(test_ls2009seqInsDumb, 959);
+ RUN_TEST(test_ls2009seqDelElectric, 1007);
+ RUN_TEST(test_ls2009seqDelDumb, 1050);
+ RUN_TEST(test_ls2012seqInsElectric, 1092);
+ RUN_TEST(test_ls2012seqInsDumb, 1135);
+ RUN_TEST(test_lsEmptyTableDumb, 1184);
+ RUN_TEST(test_lsEmptyTableElectric, 1209);
+
+ return (UnityEnd());
+}
diff --git a/contrib/ntp/tests/ntpd/run-ntp_prio_q.c b/contrib/ntp/tests/ntpd/run-ntp_prio_q.c
new file mode 100644
index 000000000000..35af443de58e
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/run-ntp_prio_q.c
@@ -0,0 +1,69 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+ Unity.CurrentTestName = #TestFunc; \
+ Unity.CurrentTestLineNumber = TestLineNum; \
+ Unity.NumberOfTests++; \
+ if (TEST_PROTECT()) \
+ { \
+ setUp(); \
+ TestFunc(); \
+ } \
+ if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+ { \
+ tearDown(); \
+ } \
+ UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "config.h"
+#include "ntp.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+#include "ntp_prio_q.h"
+#include <string.h>
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void test_AllocateDeallocateNode(void);
+extern void test_EmptyQueue(void);
+extern void test_OneElementQueue(void);
+extern void test_MultipleElementQueue(void);
+extern void test_CustomOrderQueue(void);
+extern void test_DestroyNonEmptyQueue(void);
+extern void test_AppendQueues(void);
+
+
+//=======Test Reset Option=====
+void resetTest(void);
+void resetTest(void)
+{
+ tearDown();
+ setUp();
+}
+
+char const *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ UnityBegin("ntp_prio_q.c");
+ RUN_TEST(test_AllocateDeallocateNode, 39);
+ RUN_TEST(test_EmptyQueue, 46);
+ RUN_TEST(test_OneElementQueue, 60);
+ RUN_TEST(test_MultipleElementQueue, 88);
+ RUN_TEST(test_CustomOrderQueue, 126);
+ RUN_TEST(test_DestroyNonEmptyQueue, 183);
+ RUN_TEST(test_AppendQueues, 205);
+
+ return (UnityEnd());
+}
diff --git a/contrib/ntp/tests/ntpd/run-ntp_restrict.c b/contrib/ntp/tests/ntpd/run-ntp_restrict.c
new file mode 100644
index 000000000000..0d945eb33832
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/run-ntp_restrict.c
@@ -0,0 +1,68 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+ Unity.CurrentTestName = #TestFunc; \
+ Unity.CurrentTestLineNumber = TestLineNum; \
+ Unity.NumberOfTests++; \
+ if (TEST_PROTECT()) \
+ { \
+ setUp(); \
+ TestFunc(); \
+ } \
+ if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+ { \
+ tearDown(); \
+ } \
+ UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "config.h"
+#include "ntpd.h"
+#include "ntp_lists.h"
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void test_RestrictionsAreEmptyAfterInit(void);
+extern void test_ReturnsCorrectDefaultRestrictions(void);
+extern void test_HackingDefaultRestriction(void);
+extern void test_CantRemoveDefaultEntry(void);
+extern void test_AddingNewRestriction(void);
+extern void test_TheMostFittingRestrictionIsMatched(void);
+extern void test_DeletedRestrictionIsNotMatched(void);
+extern void test_RestrictUnflagWorks(void);
+
+
+//=======Test Reset Option=====
+void resetTest(void);
+void resetTest(void)
+{
+ tearDown();
+ setUp();
+}
+
+char const *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ UnityBegin("ntp_restrict.c");
+ RUN_TEST(test_RestrictionsAreEmptyAfterInit, 59);
+ RUN_TEST(test_ReturnsCorrectDefaultRestrictions, 85);
+ RUN_TEST(test_HackingDefaultRestriction, 96);
+ RUN_TEST(test_CantRemoveDefaultEntry, 119);
+ RUN_TEST(test_AddingNewRestriction, 130);
+ RUN_TEST(test_TheMostFittingRestrictionIsMatched, 143);
+ RUN_TEST(test_DeletedRestrictionIsNotMatched, 165);
+ RUN_TEST(test_RestrictUnflagWorks, 189);
+
+ return (UnityEnd());
+}
diff --git a/contrib/ntp/tests/ntpd/run-rc_cmdlength.c b/contrib/ntp/tests/ntpd/run-rc_cmdlength.c
new file mode 100644
index 000000000000..c6fb7ccf7937
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/run-rc_cmdlength.c
@@ -0,0 +1,57 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+ Unity.CurrentTestName = #TestFunc; \
+ Unity.CurrentTestLineNumber = TestLineNum; \
+ Unity.NumberOfTests++; \
+ if (TEST_PROTECT()) \
+ { \
+ setUp(); \
+ TestFunc(); \
+ } \
+ if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+ { \
+ tearDown(); \
+ } \
+ UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "config.h"
+#include "ntp.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+#include "test-libntp.h"
+#include <string.h>
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void test_EvaluateCommandLength(void);
+
+
+//=======Test Reset Option=====
+void resetTest(void);
+void resetTest(void)
+{
+ tearDown();
+ setUp();
+}
+
+char const *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ UnityBegin("rc_cmdlength.c");
+ RUN_TEST(test_EvaluateCommandLength, 15);
+
+ return (UnityEnd());
+}
diff --git a/contrib/ntp/tests/ntpd/run-t-ntp_scanner.c b/contrib/ntp/tests/ntpd/run-t-ntp_scanner.c
new file mode 100644
index 000000000000..62d3ed3085d0
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/run-t-ntp_scanner.c
@@ -0,0 +1,72 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+ Unity.CurrentTestName = #TestFunc; \
+ Unity.CurrentTestLineNumber = TestLineNum; \
+ Unity.NumberOfTests++; \
+ if (TEST_PROTECT()) \
+ { \
+ setUp(); \
+ TestFunc(); \
+ } \
+ if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+ { \
+ tearDown(); \
+ } \
+ UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "config.h"
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void test_keywordIncorrectToken(void);
+extern void test_keywordServerToken(void);
+extern void test_DropUninitializedStack(void);
+extern void test_IncorrectlyInitializeLexStack(void);
+extern void test_InitializeLexStack(void);
+extern void test_PopEmptyStack(void);
+extern void test_IsInteger(void);
+extern void test_IsUint(void);
+extern void test_IsDouble(void);
+extern void test_SpecialSymbols(void);
+extern void test_EOC(void);
+
+
+//=======Test Reset Option=====
+void resetTest(void);
+void resetTest(void)
+{
+ tearDown();
+ setUp();
+}
+
+char const *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ UnityBegin("t-ntp_scanner.c");
+ RUN_TEST(test_keywordIncorrectToken, 21);
+ RUN_TEST(test_keywordServerToken, 22);
+ RUN_TEST(test_DropUninitializedStack, 23);
+ RUN_TEST(test_IncorrectlyInitializeLexStack, 24);
+ RUN_TEST(test_InitializeLexStack, 25);
+ RUN_TEST(test_PopEmptyStack, 61);
+ RUN_TEST(test_IsInteger, 69);
+ RUN_TEST(test_IsUint, 87);
+ RUN_TEST(test_IsDouble, 99);
+ RUN_TEST(test_SpecialSymbols, 111);
+ RUN_TEST(test_EOC, 120);
+
+ return (UnityEnd());
+}
diff --git a/contrib/ntp/tests/ntpd/run-t-ntp_signd.c b/contrib/ntp/tests/ntpd/run-t-ntp_signd.c
new file mode 100644
index 000000000000..662cada0b3ca
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/run-t-ntp_signd.c
@@ -0,0 +1,66 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+ Unity.CurrentTestName = #TestFunc; \
+ Unity.CurrentTestLineNumber = TestLineNum; \
+ Unity.NumberOfTests++; \
+ if (TEST_PROTECT()) \
+ { \
+ setUp(); \
+ TestFunc(); \
+ } \
+ if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+ { \
+ tearDown(); \
+ } \
+ UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "config.h"
+#include "ntp.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+#include "test-libntp.h"
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void test_connect_incorrect_socket(void);
+extern void test_connect_correct_socket(void);
+extern void test_write_all(void);
+extern void test_send_packet(void);
+extern void test_recv_packet(void);
+extern void test_send_via_ntp_signd();
+
+
+//=======Test Reset Option=====
+void resetTest(void);
+void resetTest(void)
+{
+ tearDown();
+ setUp();
+}
+
+char const *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ UnityBegin("t-ntp_signd.c");
+ RUN_TEST(test_connect_incorrect_socket, 49);
+ RUN_TEST(test_connect_correct_socket, 54);
+ RUN_TEST(test_write_all, 74);
+ RUN_TEST(test_send_packet, 84);
+ RUN_TEST(test_recv_packet, 93);
+ RUN_TEST(test_send_via_ntp_signd, 104);
+
+ return (UnityEnd());
+}
diff --git a/contrib/ntp/tests/ntpd/t-ntp_scanner.c b/contrib/ntp/tests/ntpd/t-ntp_scanner.c
new file mode 100644
index 000000000000..9bc77c4d6591
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/t-ntp_scanner.c
@@ -0,0 +1,136 @@
+#include "config.h"
+
+#include "unity.h"
+
+//#include <stdio.h>
+//#include <ctype.h>
+//#include <stdlib.h>
+//#include <errno.h>
+//#include <string.h>
+
+//#include "ntpd.h"
+//#include "ntp_config.h"
+//#include "ntpsim.h"
+//#include "ntp_scanner.h"
+//#include "ntp_parser.h"
+
+#include "ntp_scanner.c"
+/* ntp_keyword.h declares finite state machine and token text */
+//#include "ntp_keyword.h"
+
+void test_keywordIncorrectToken(void);
+void test_keywordServerToken(void);
+void test_DropUninitializedStack(void);
+void test_IncorrectlyInitializeLexStack(void);
+void test_InitializeLexStack(void);
+
+
+void test_keywordIncorrectToken(void){
+ char * temp = keyword(999);
+ //printf("%s\n",temp);
+ TEST_ASSERT_EQUAL_STRING("(keyword not found)",temp);
+}
+
+void test_keywordServerToken(void){
+ char * temp = keyword(401);
+ //printf("%s",temp); //143 or 401 ?
+ TEST_ASSERT_EQUAL_STRING("server",temp);
+}
+
+void test_DropUninitializedStack(void){
+ lex_drop_stack();
+}
+
+void test_IncorrectlyInitializeLexStack(void){
+
+ TEST_ASSERT_FALSE(lex_init_stack(NULL,NULL));
+ lex_drop_stack();
+}
+
+void test_InitializeLexStack(void){
+
+ //Some sort of server is required for this to work.
+ sockaddr_u * remote_addr;
+ char origin[128] ={ "" } ;
+ strcat(origin,"127.0.0.1");
+ //snprintf(origin, sizeof(origin), "remote config from %s", stoa(remote_addr));
+ TEST_ASSERT_TRUE(lex_init_stack(origin,NULL)); //path, mode -> NULL is ok!
+ lex_drop_stack();
+}
+
+void test_PopEmptyStack(void){
+ int temp = lex_pop_file();
+
+ TEST_ASSERT_FALSE(temp);
+}
+
+
+
+void test_IsInteger(void){ //boolean
+ int temp = is_integer("123");
+ TEST_ASSERT_TRUE(temp);
+ temp = is_integer("-999");
+ TEST_ASSERT_TRUE(temp);
+ temp = is_integer("0"); //what about -0?
+ TEST_ASSERT_TRUE(temp);
+ temp = is_integer("16.5");
+ TEST_ASSERT_FALSE(temp);
+ temp = is_integer("12ab");
+ TEST_ASSERT_FALSE(temp);
+ temp = is_integer("2147483647");
+ TEST_ASSERT_TRUE(temp);
+ temp = is_integer("2347483647"); //too big for signed int
+ TEST_ASSERT_FALSE(temp);
+
+}
+
+void test_IsUint(void){
+ int temp;
+ temp = is_u_int("-123");
+ TEST_ASSERT_FALSE(temp);
+ temp = is_u_int("0");
+ TEST_ASSERT_TRUE(temp); //-0 fails btw
+ temp = is_u_int("2347483647"); //fits into u_int
+ TEST_ASSERT_TRUE(temp);
+ temp = is_u_int("112347483647"); //too big even for uint
+ TEST_ASSERT_TRUE(temp);
+}
+
+void test_IsDouble(void){
+ int temp;
+ temp = is_double("0");
+ TEST_ASSERT_TRUE(temp);
+ temp = is_double("123");
+ TEST_ASSERT_TRUE(temp);
+ temp = is_double("123.45"); //DOESN'T WORK WITH 123,45, not sure if intented?
+ TEST_ASSERT_TRUE(temp);
+ temp = is_double("-123.45"); //DOESN'T WORK WITH 123,45, not sure if intented?
+ TEST_ASSERT_TRUE(temp);
+}
+
+void test_SpecialSymbols(void){
+ int temp ;
+ temp = is_special('a');
+ TEST_ASSERT_FALSE(temp);
+ temp = is_special('?');
+ TEST_ASSERT_FALSE(temp);
+
+}
+
+void test_EOC(void){
+ int temp;
+ if(old_config_style){
+ temp = is_EOC('\n');
+ TEST_ASSERT_TRUE(temp);
+ }
+ else {
+ temp = is_EOC(';');
+ TEST_ASSERT_TRUE(temp);
+ }
+ temp = is_EOC("A");
+ TEST_ASSERT_FALSE(temp);
+ temp = is_EOC('1');
+ TEST_ASSERT_FALSE(temp);
+
+}
+
diff --git a/contrib/ntp/tests/ntpd/t-ntp_signd.c b/contrib/ntp/tests/ntpd/t-ntp_signd.c
new file mode 100644
index 000000000000..45972fb979ba
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/t-ntp_signd.c
@@ -0,0 +1,116 @@
+#include "config.h"
+
+#include "ntp.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+
+#include "unity.h"
+
+#include "test-libntp.h"
+
+
+
+#define HAVE_NTP_SIGND
+
+#include "ntp_signd.c"
+
+extern int ux_socket_connect(const char *name);
+
+
+//MOCKED FUNCTIONS
+
+//this connect function overrides/mocks connect() from <sys/socket.h>
+int connect(int socket, const struct sockaddr *address,
+socklen_t address_len){
+ return 1;
+}
+
+//mocked write will only send 4 bytes at a time. This is so write_all can be properly tested
+ssize_t write(int fd, void const * buf, size_t len){
+ if(len >= 4){return 4;}
+ else return len;
+}
+
+ssize_t read(int fd, void * buf, size_t len){
+ if(len >= 4){return 4;}
+ else return len;
+}
+
+
+//END OF MOCKED FUNCTIONS
+
+int isGE(int a,int b){
+ if(a >= b) {return 1;}
+ else {return 0;}
+}
+
+
+void
+test_connect_incorrect_socket(void){
+ TEST_ASSERT_EQUAL(-1, ux_socket_connect(NULL));
+}
+
+void
+test_connect_correct_socket(void){
+
+
+
+ int temp = ux_socket_connect("/socket");
+
+ //risky, what if something is listening on :123, or localhost isnt 127.0.0.1?
+ //TEST_ASSERT_EQUAL(-1, ux_socket_connect("127.0.0.1:123"));
+
+ //printf("%d\n",temp);
+ TEST_ASSERT_TRUE(isGE(temp,0));
+
+ //write_all();
+ //char *socketName = "Random_Socket_Name";
+ //int length = strlen(socketName);
+
+}
+
+
+void
+test_write_all(void){
+ int fd = ux_socket_connect("/socket");
+ TEST_ASSERT_TRUE(isGE(fd,0));
+ char * str = "TEST123";
+ int temp = write_all(fd, str,strlen(str));
+ TEST_ASSERT_EQUAL(strlen(str),temp);
+}
+
+
+void
+test_send_packet(void){
+ int fd = ux_socket_connect("/socket");
+ char * str2 = "PACKET12345";
+ int temp = send_packet(fd, str2, strlen(str2));
+ TEST_ASSERT_EQUAL(0,temp);
+}
+
+
+void
+test_recv_packet(void){
+ int fd = ux_socket_connect("/socket");
+ int size = 256;
+ char str[size];
+
+ int temp = recv_packet(fd, &str, &size);
+ send_packet(fd, str, strlen(str));
+ TEST_ASSERT_EQUAL(0,temp); //0 because nobody sent us anything (yet!)
+}
+
+void
+test_send_via_ntp_signd(){
+
+ struct recvbuf *rbufp = (struct recvbuf *) malloc(sizeof(struct recvbuf));
+ int xmode = 1;
+ keyid_t xkeyid = 12345;
+ int flags =0;
+ struct pkt *xpkt = (struct pkt *) malloc(sizeof(struct pkt)); //defined in ntp.h
+
+ //send_via_ntp_signd(NULL,NULL,NULL,NULL,NULL); //doesn't work
+ send_via_ntp_signd(rbufp,xmode,xkeyid,flags,xpkt);
+
+
+}
diff --git a/contrib/ntp/tests/ntpq/Makefile.am b/contrib/ntp/tests/ntpq/Makefile.am
new file mode 100644
index 000000000000..a45a9aec05dd
--- /dev/null
+++ b/contrib/ntp/tests/ntpq/Makefile.am
@@ -0,0 +1,96 @@
+NULL =
+BUILT_SOURCES =
+CLEANFILES =
+
+std_unity_list = \
+ $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \
+ $(NULL)
+
+run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
+
+check_PROGRAMS = \
+ test-ntpq \
+ $(NULL)
+
+LDADD = \
+ $(top_builddir)/ntpq/libntpq.a \
+ $(top_builddir)/ntpd/libntpd.a \
+ $(top_builddir)/libntp/libntp.a \
+ $(LDADD_LIBNTP) \
+ $(PTHREAD_LIBS) \
+ $(LDADD_NTP) \
+ $(NULL)
+
+unity_tests_LDADD = \
+ $(LDADD) \
+ $(top_builddir)/sntp/unity/libunity.a \
+ $(LIBM) \
+ $(NULL)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += -I$(top_srcdir)/ntpq
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H
+AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
+
+BUILT_SOURCES += \
+ $(srcdir)/run-t-ntpq.c \
+ $(NULL)
+
+noinst_HEADERS = \
+ $(NULL)
+
+###
+
+test_ntpq_LDADD = \
+ $(unity_tests_LDADD) \
+ $(NULL)
+
+test_ntpq_SOURCES = \
+ t-ntpq.c \
+ run-t-ntpq.c \
+ $(NULL)
+
+$(srcdir)/run-t-ntpq.c: $(srcdir)/t-ntpq.c $(std_unity_list)
+ $(run_unity) t-ntpq.c run-t-ntpq.c
+
+
+TESTS =
+
+if !NTP_CROSSCOMPILE
+TESTS += $(check_PROGRAMS)
+endif
+
+## check-libntp.mf - automake fragment
+## slightly adapted for deeper directory
+
+BUILT_SOURCES += check-libntpd check-libntp check-libunity
+CLEANFILES += check-libntpd check-libntp check-libunity
+
+check-libntpd: ../../ntpd/libntpd.a
+ @echo stamp > $@
+
+../../ntpd/libntpd.a:
+ cd ../../ntpd && $(MAKE) $(AM_MAKEFLAGS) libntpd.a
+
+
+check-libntp: ../../libntp/libntp.a
+ @echo stamp > $@
+
+../../libntp/libntp.a:
+ cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+
+check-libunity: ../../sntp/unity/libunity.a
+ @echo stamp > $@
+
+../../sntp/unity/libunity.a:
+ cd ../../sntp/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
+
+
+include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/tests/ntpq/Makefile.in b/contrib/ntp/tests/ntpq/Makefile.in
new file mode 100644
index 000000000000..f31c0bcaf2ad
--- /dev/null
+++ b/contrib/ntp/tests/ntpq/Makefile.in
@@ -0,0 +1,1286 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 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@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+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@
+check_PROGRAMS = test-ntpq$(EXEEXT) $(am__EXEEXT_1)
+@NTP_CROSSCOMPILE_FALSE@am__append_1 = $(check_PROGRAMS)
+subdir = tests/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/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_problemtests.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_unitytest.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 =
+am__objects_1 =
+am_test_ntpq_OBJECTS = t-ntpq.$(OBJEXT) run-t-ntpq.$(OBJEXT) \
+ $(am__objects_1)
+test_ntpq_OBJECTS = $(am_test_ntpq_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = $(top_builddir)/ntpq/libntpq.a \
+ $(top_builddir)/ntpd/libntpd.a $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) \
+ $(top_builddir)/sntp/unity/libunity.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+test_ntpq_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(test_ntpq_SOURCES)
+DIST_SOURCES = $(test_ntpq_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+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__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) \
+ $(top_srcdir)/sntp/libevent/build-aux/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) \
+ $(top_srcdir)/sntp/libevent/build-aux/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf \
+ $(top_srcdir)/sntp/libevent/build-aux/depcomp \
+ $(top_srcdir)/sntp/libevent/build-aux/test-driver
+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@
+BUILD_THREAD = @BUILD_THREAD@
+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_LIBEVENT = @CFLAGS_LIBEVENT@
+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_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
+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@
+LTHREAD_LIBS = @LTHREAD_LIBS@
+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_RUBY = @PATH_RUBY@
+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 =
+BUILT_SOURCES = $(srcdir)/run-t-ntpq.c $(NULL) check-libntpd \
+ check-libntp check-libunity .deps-ver
+CLEANFILES = check-libntpd check-libntp check-libunity .deps-ver
+std_unity_list = \
+ $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \
+ $(NULL)
+
+run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
+LDADD = \
+ $(top_builddir)/ntpq/libntpq.a \
+ $(top_builddir)/ntpd/libntpd.a \
+ $(top_builddir)/libntp/libntp.a \
+ $(LDADD_LIBNTP) \
+ $(PTHREAD_LIBS) \
+ $(LDADD_NTP) \
+ $(NULL)
+
+unity_tests_LDADD = \
+ $(LDADD) \
+ $(top_builddir)/sntp/unity/libunity.a \
+ $(LIBM) \
+ $(NULL)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/ntpq $(CPPFLAGS_NTP) \
+ -DUNITY_INCLUDE_CONFIG_H -I$(top_srcdir)/sntp/unity
+AM_LDFLAGS = $(LDFLAGS_NTP)
+noinst_HEADERS = \
+ $(NULL)
+
+
+###
+test_ntpq_LDADD = \
+ $(unity_tests_LDADD) \
+ $(NULL)
+
+test_ntpq_SOURCES = \
+ t-ntpq.c \
+ run-t-ntpq.c \
+ $(NULL)
+
+TESTS = $(am__append_1)
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(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 tests/ntpq/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/ntpq/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_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+
+$(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):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+test-ntpq$(EXEEXT): $(test_ntpq_OBJECTS) $(test_ntpq_DEPENDENCIES) $(EXTRA_test_ntpq_DEPENDENCIES)
+ @rm -f test-ntpq$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ntpq_OBJECTS) $(test_ntpq_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-t-ntpq.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-ntpq.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+test-ntpq.log: test-ntpq$(EXEEXT)
+ @p='test-ntpq$(EXEEXT)'; \
+ b='test-ntpq'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @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
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) 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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+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)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ recheck tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+$(srcdir)/run-t-ntpq.c: $(srcdir)/t-ntpq.c $(std_unity_list)
+ $(run_unity) t-ntpq.c run-t-ntpq.c
+
+check-libntpd: ../../ntpd/libntpd.a
+ @echo stamp > $@
+
+../../ntpd/libntpd.a:
+ cd ../../ntpd && $(MAKE) $(AM_MAKEFLAGS) libntpd.a
+
+check-libntp: ../../libntp/libntp.a
+ @echo stamp > $@
+
+../../libntp/libntp.a:
+ cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+check-libunity: ../../sntp/unity/libunity.a
+ @echo stamp > $@
+
+../../sntp/unity/libunity.a:
+ cd ../../sntp/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
+$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
+ @[ -f $@ ] || \
+ cp $(top_srcdir)/deps-ver $@
+ @[ -w $@ ] || \
+ chmod ug+w $@
+ @cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
+ echo -n "Prior $(subdir)/$(DEPDIR) version " && \
+ cat $@ && \
+ rm -rf $(DEPDIR) && \
+ mkdir $(DEPDIR) && \
+ case "$(top_builddir)" in \
+ .) \
+ ./config.status Makefile depfiles \
+ ;; \
+ *) \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
+ ;; \
+ esac && \
+ echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
+ cat $(top_srcdir)/deps-ver \
+ )
+ cp $(top_srcdir)/deps-ver $@
+
+.deps-ver: $(top_srcdir)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
+ @touch $@
+
+#
+# depsver.mf included in Makefile.am for directories with .deps
+#
+# When building in the same directory with sources that change over
+# time, such as when tracking using bk, the .deps files can become
+# stale with respect to moved, deleted, or superceded headers. Most
+# commonly, this would exhibit as make reporting a failure to make a
+# header file which is no longer in the location given. To address
+# this issue, we use a deps-ver file which is updated with each change
+# that breaks old .deps files. A copy of deps-ver is made into
+# $(DEPDIR) if not already present. If $(DEPDIR)/deps-ver is present
+# with different contents than deps-ver, we make clean to ensure all
+# .o files built before the incompatible change are rebuilt along with
+# their updated .deps files, then remove $(DEPDIR) and recreate it as
+# empty stubs.
+#
+# It is normal when configured with --disable-dependency-tracking for
+# the DEPDIR to not have been created. For this reason, we use the
+# intermediate target .deps-ver, which invokes make recursively if
+# DEPDIR exists.
+#
+# If you modify depsver.mf, please make the changes to the master
+# copy, the one in sntp is copied by the bootstrap script from it.
+#
+# This comment block follows rather than leads the related code so that
+# it stays with it in the generated Makefile.in and Makefile.
+#
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/ntp/tests/ntpq/run-t-ntpq.c b/contrib/ntp/tests/ntpq/run-t-ntpq.c
new file mode 100644
index 000000000000..ccf2a06c8882
--- /dev/null
+++ b/contrib/ntp/tests/ntpq/run-t-ntpq.c
@@ -0,0 +1,54 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+ Unity.CurrentTestName = #TestFunc; \
+ Unity.CurrentTestLineNumber = TestLineNum; \
+ Unity.NumberOfTests++; \
+ if (TEST_PROTECT()) \
+ { \
+ setUp(); \
+ TestFunc(); \
+ } \
+ if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+ { \
+ tearDown(); \
+ } \
+ UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "config.h"
+#include "ntp.h"
+#include "ntpq.h"
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void testPrimary(void);
+
+
+//=======Test Reset Option=====
+void resetTest(void);
+void resetTest(void)
+{
+ tearDown();
+ setUp();
+}
+
+char const *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ UnityBegin("t-ntpq.c");
+ RUN_TEST(testPrimary, 20);
+
+ return (UnityEnd());
+}
diff --git a/contrib/ntp/tests/ntpq/t-ntpq.c b/contrib/ntp/tests/ntpq/t-ntpq.c
new file mode 100644
index 000000000000..f4b35c5eb5a6
--- /dev/null
+++ b/contrib/ntp/tests/ntpq/t-ntpq.c
@@ -0,0 +1,37 @@
+#include "config.h"
+
+#include "ntp.h"
+//#include "ntp_stdlib.h"
+
+
+//#include "ntp_calendar.h"
+
+#include "unity.h"
+#include "ntpq.h"
+
+//very tricky to test static functions. It might be a good idea to use cmock here
+//#define HAVE_NTPQ
+//#include "ntpq.c"
+
+
+
+//extern int main(int argc, char *argv[]);
+
+void testPrimary(void);
+
+void testPrimary(void){
+ //main(NULL,NULL);
+/*
+ char ** tokens;
+ int * num = 0;
+ tokenize("a bc de1 234",tokens, num);
+*/
+}
+
+
+
+
+
+
+
+#define HAVE_NTP_SIGND
diff --git a/contrib/ntp/tests/sandbox/Makefile.am b/contrib/ntp/tests/sandbox/Makefile.am
index 489ceab57d0d..c146b149a85b 100644
--- a/contrib/ntp/tests/sandbox/Makefile.am
+++ b/contrib/ntp/tests/sandbox/Makefile.am
@@ -1,11 +1,24 @@
#AUTOMAKE_OPTIONS = foreign 2.9 subdir-objects
+
NULL =
BUILT_SOURCES =
CLEANFILES =
+std_unity_list = \
+ $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \
+ $(NULL)
+
run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
-check_PROGRAMS = bug-2803 first-test second-test smeartest
+check_PROGRAMS = \
+ first-test \
+ smeartest \
+ $(NULL)
+
+EXTRA_PROGRAMS = \
+ bug-2803 \
+ second-test \
+ $(NULL)
# HMS: we may not need some of these:
LDADD = \
@@ -23,13 +36,15 @@ AM_CPPFLAGS = $(NTP_INCS)
AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_CPPFLAGS += -I$(top_srcdir)/include
AM_CPPFLAGS += $(CPPFLAGS_NTP)
+AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H
+AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
-bug_2803_SOURCES = \
- bug-2803.c \
- run-ut-2803.c \
- ut-2803.c \
+bug_2803_SOURCES = \
+ bug-2803.c \
+ run-ut-2803.c \
+ ut-2803.c \
$(NULL)
$(srcdir)/run-ut-2803.c: $(srcdir)/ut-2803.c $(std_unity_list)
diff --git a/contrib/ntp/tests/sandbox/Makefile.in b/contrib/ntp/tests/sandbox/Makefile.in
index 70edbc9d5b19..e524c70a7739 100644
--- a/contrib/ntp/tests/sandbox/Makefile.in
+++ b/contrib/ntp/tests/sandbox/Makefile.in
@@ -13,6 +13,8 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
+
+#AUTOMAKE_OPTIONS = foreign 2.9 subdir-objects
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
@@ -87,8 +89,10 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-check_PROGRAMS = bug-2803$(EXEEXT) first-test$(EXEEXT) \
- second-test$(EXEEXT) smeartest$(EXEEXT)
+check_PROGRAMS = first-test$(EXEEXT) smeartest$(EXEEXT) \
+ $(am__EXEEXT_1)
+EXTRA_PROGRAMS = bug-2803$(EXEEXT) second-test$(EXEEXT) \
+ $(am__EXEEXT_1)
@NTP_CROSSCOMPILE_FALSE@am__append_1 = $(check_PROGRAMS)
subdir = tests/sandbox
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -118,6 +122,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -136,6 +141,7 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 =
am__objects_1 =
am_bug_2803_OBJECTS = bug-2803.$(OBJEXT) run-ut-2803.$(OBJEXT) \
ut-2803.$(OBJEXT) $(am__objects_1)
@@ -455,6 +461,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -463,6 +470,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -524,6 +532,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@@ -709,12 +718,14 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-
-#AUTOMAKE_OPTIONS = foreign 2.9 subdir-objects
NULL =
BUILT_SOURCES = run-ut-2803.c run-uglydate.c run-modetoa.c \
check-libntp check-libunity .deps-ver
CLEANFILES = check-libntp check-libunity .deps-ver
+std_unity_list = \
+ $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \
+ $(NULL)
+
run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
# HMS: we may not need some of these:
@@ -730,12 +741,13 @@ AM_CFLAGS = $(CFLAGS_NTP)
# HMS: we may not need some of these:
AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/sntp/unity \
- -I$(top_srcdir)/include $(CPPFLAGS_NTP)
+ -I$(top_srcdir)/include $(CPPFLAGS_NTP) \
+ -DUNITY_INCLUDE_CONFIG_H -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
bug_2803_SOURCES = \
- bug-2803.c \
- run-ut-2803.c \
- ut-2803.c \
+ bug-2803.c \
+ run-ut-2803.c \
+ ut-2803.c \
$(NULL)
first_test_SOURCES = \
@@ -1048,13 +1060,6 @@ recheck: all $(check_PROGRAMS)
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
-bug-2803.log: bug-2803$(EXEEXT)
- @p='bug-2803$(EXEEXT)'; \
- b='bug-2803'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
first-test.log: first-test$(EXEEXT)
@p='first-test$(EXEEXT)'; \
b='first-test'; \
@@ -1062,13 +1067,6 @@ first-test.log: first-test$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-second-test.log: second-test$(EXEEXT)
- @p='second-test$(EXEEXT)'; \
- b='second-test'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
smeartest.log: smeartest$(EXEEXT)
@p='smeartest$(EXEEXT)'; \
b='smeartest'; \
diff --git a/contrib/ntp/tests/sandbox/run-modetoa.c b/contrib/ntp/tests/sandbox/run-modetoa.c
index 776dda485dd5..143bd756c5fd 100644
--- a/contrib/ntp/tests/sandbox/run-modetoa.c
+++ b/contrib/ntp/tests/sandbox/run-modetoa.c
@@ -31,18 +31,21 @@ extern void test_UnknownMode(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
+char const *progname;
+
//=======MAIN=====
-int main(void)
+int main(int argc, char *argv[])
{
- Unity.TestFile = "modetoa.c";
- UnityBegin("");
+ progname = argv[0];
+ UnityBegin("modetoa.c");
RUN_TEST(test_KnownMode, 8);
RUN_TEST(test_UnknownMode, 15);
diff --git a/contrib/ntp/tests/sandbox/run-uglydate.c b/contrib/ntp/tests/sandbox/run-uglydate.c
index dd909adb046a..e65cd01097ad 100644
--- a/contrib/ntp/tests/sandbox/run-uglydate.c
+++ b/contrib/ntp/tests/sandbox/run-uglydate.c
@@ -22,6 +22,8 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include "config.h"
+#include "ntp_fp.h"
//=======External Functions This Runner Calls=====
extern void setUp(void);
@@ -30,18 +32,21 @@ extern void test_ConstantDateTime(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
+char const *progname;
+
//=======MAIN=====
-int main(void)
+int main(int argc, char *argv[])
{
- Unity.TestFile = "uglydate.c";
- UnityBegin("");
+ progname = argv[0];
+ UnityBegin("uglydate.c");
RUN_TEST(test_ConstantDateTime, 9);
return (UnityEnd());
diff --git a/contrib/ntp/tests/sandbox/run-ut-2803.c b/contrib/ntp/tests/sandbox/run-ut-2803.c
index d6ca2ee7df17..b948c4a3876b 100644
--- a/contrib/ntp/tests/sandbox/run-ut-2803.c
+++ b/contrib/ntp/tests/sandbox/run-ut-2803.c
@@ -35,18 +35,21 @@ extern void test_ignored(void);
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
+char const *progname;
+
//=======MAIN=====
-int main(void)
+int main(int argc, char *argv[])
{
- Unity.TestFile = "ut-2803.c";
- UnityBegin("");
+ progname = argv[0];
+ UnityBegin("ut-2803.c");
RUN_TEST(test_main, 30);
RUN_TEST(test_XPASS, 37);
RUN_TEST(test_XFAIL, 49);
diff --git a/contrib/ntp/tests/sandbox/smeartest.c b/contrib/ntp/tests/sandbox/smeartest.c
index e1b04e5e3758..a8ee2102e874 100644
--- a/contrib/ntp/tests/sandbox/smeartest.c
+++ b/contrib/ntp/tests/sandbox/smeartest.c
@@ -127,6 +127,8 @@ ltor(l_fp l)
main()
{
+ l_fp l;
+ int rc;
rtol(0xfe800000);
rtol(0xfe800001);
@@ -164,5 +166,15 @@ main()
rtoltor(0xfe7ffffe);
rtoltor(0xfe7fffff);
+ rc = atolfp("-.932087", &l);
+ ltor(l);
+ rtol(0xfec458b0);
+ printf("%x -> %d.%d.%d.%d\n",
+ 0xfec458b0,
+ 0xfe,
+ 0xc4,
+ 0x58,
+ 0xb0);
+
return 0;
}
diff --git a/contrib/ntp/tests/sec-2853/Makefile.am b/contrib/ntp/tests/sec-2853/Makefile.am
index 417ff6bd9854..59734da1c4e1 100644
--- a/contrib/ntp/tests/sec-2853/Makefile.am
+++ b/contrib/ntp/tests/sec-2853/Makefile.am
@@ -27,6 +27,8 @@ AM_CPPFLAGS = $(NTP_INCS)
AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_CPPFLAGS += -I$(top_srcdir)/include
AM_CPPFLAGS += $(CPPFLAGS_NTP)
+AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H
+AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
diff --git a/contrib/ntp/tests/sec-2853/Makefile.in b/contrib/ntp/tests/sec-2853/Makefile.in
index 4336e59cb6f6..3f581c75ed7f 100644
--- a/contrib/ntp/tests/sec-2853/Makefile.in
+++ b/contrib/ntp/tests/sec-2853/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -429,6 +430,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -437,6 +439,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -498,8 +501,8 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
@@ -709,7 +712,8 @@ AM_CFLAGS = $(CFLAGS_NTP)
# HMS: we may not need some of these:
AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/sntp/unity \
- -I$(top_srcdir)/include $(CPPFLAGS_NTP)
+ -I$(top_srcdir)/include $(CPPFLAGS_NTP) \
+ -DUNITY_INCLUDE_CONFIG_H -I$(top_srcdir)/sntp/unity
AM_LDFLAGS = $(LDFLAGS_NTP)
sec_2853_SOURCES = \
run-sec-2853.c \
diff --git a/contrib/ntp/tests/sec-2853/run-sec-2853.c b/contrib/ntp/tests/sec-2853/run-sec-2853.c
index c8771bf2022e..1159a77c15d5 100644
--- a/contrib/ntp/tests/sec-2853/run-sec-2853.c
+++ b/contrib/ntp/tests/sec-2853/run-sec-2853.c
@@ -22,33 +22,32 @@
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
+#include <config.h>
+#include <rc_cmdlength.h>
//=======External Functions This Runner Calls=====
extern void setUp(void);
extern void tearDown(void);
-void resetTest(void);
-extern void test_main(void );
extern void test_main(void );
//=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
{
tearDown();
setUp();
}
-char *progname;
+char const *progname;
//=======MAIN=====
int main(int argc, char *argv[])
{
progname = argv[0];
- Unity.TestFile = "sec-2853.c";
UnityBegin("sec-2853.c");
- RUN_TEST(test_main, 8);
- RUN_TEST(test_main, 8);
+ RUN_TEST(test_main, 10);
return (UnityEnd());
}
diff --git a/contrib/ntp/tests/sec-2853/sec-2853.c b/contrib/ntp/tests/sec-2853/sec-2853.c
index 6499fdf1f85a..49589d283633 100644
--- a/contrib/ntp/tests/sec-2853/sec-2853.c
+++ b/contrib/ntp/tests/sec-2853/sec-2853.c
@@ -1,5 +1,7 @@
#include <config.h>
+#include <rc_cmdlength.h>
+
#include "unity.h"
void setUp(void);
@@ -10,8 +12,6 @@ int basic_good( void );
int embedded_nul( void );
int trailing_space( void );
-extern size_t remoteconfig_cmdlength(const char *, const char *);
-
static int verbose = 1; // if not 0, also print results if test passed
static int exit_on_err = 0; // if not 0, exit if test failed
diff --git a/contrib/ntp/util/Makefile.in b/contrib/ntp/util/Makefile.in
index 9160af2cb45b..e7a02d9c8dde 100644
--- a/contrib/ntp/util/Makefile.in
+++ b/contrib/ntp/util/Makefile.in
@@ -126,6 +126,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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_problemtests.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
@@ -341,6 +342,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_THREAD = @BUILD_THREAD@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
@@ -349,6 +351,7 @@ CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
@@ -410,6 +413,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
+LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
diff --git a/contrib/ntp/util/invoke-ntp-keygen.texi b/contrib/ntp/util/invoke-ntp-keygen.texi
index 974e453b3989..eafcb43d87cd 100644
--- a/contrib/ntp/util/invoke-ntp-keygen.texi
+++ b/contrib/ntp/util/invoke-ntp-keygen.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-keygen.texi)
#
-# It has been AutoGen-ed June 29, 2015 at 04:32:15 PM by AutoGen 5.18.5
+# It has been AutoGen-ed October 21, 2015 at 12:40:07 PM by AutoGen 5.18.5
# 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.8p3
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p4
Usage: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
diff --git a/contrib/ntp/util/ntp-keygen-opts.c b/contrib/ntp/util/ntp-keygen-opts.c
index 6a05a68f1d4d..1f256f9b0fc2 100644
--- a/contrib/ntp/util/ntp-keygen-opts.c
+++ b/contrib/ntp/util/ntp-keygen-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed June 29, 2015 at 04:32:00 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:39:50 PM by AutoGen 5.18.5
* 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.8p3\n"
+/* 0 */ "ntp-keygen (ntp) 4.2.8p4\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.8p3\n"
+/* 2229 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p4\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.8p3";
+/* 2394 */ "ntp-keygen (ntp) 4.2.8p4";
/**
* 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.8p3\n\
+ puts(_("ntp-keygen (ntp) 4.2.8p4\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.8p3\n\
+ puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p4\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.8p3"));
+ puts(_("ntp-keygen (ntp) 4.2.8p4"));
/* referenced via ntp_keygenOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/util/ntp-keygen-opts.h b/contrib/ntp/util/ntp-keygen-opts.h
index ef58041d6622..c88bef86913d 100644
--- a/contrib/ntp/util/ntp-keygen-opts.h
+++ b/contrib/ntp/util/ntp-keygen-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed June 29, 2015 at 04:32:00 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed October 21, 2015 at 12:39:50 PM by AutoGen 5.18.5
* 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.8p3"
+#define NTP_KEYGEN_VERSION "4.2.8p4"
/** Full ntp-keygen version text */
-#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p3"
+#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p4"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/util/ntp-keygen.1ntp-keygenman b/contrib/ntp/util/ntp-keygen.1ntp-keygenman
index 21dbfa70e9fe..99d992565d57 100644
--- a/contrib/ntp/util/ntp-keygen.1ntp-keygenman
+++ b/contrib/ntp/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 "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH ntp-keygen 1ntp-keygenman "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-M4aiZI/ag-Y4aaYI)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-r5aiQP/ag-E5aaPP)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:32:11 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:40:02 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc b/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
index 4299b0bfd0cf..7b749fd9ef36 100644
--- a/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
+++ b/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:32:18 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:40:10 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/util/ntp-keygen.c b/contrib/ntp/util/ntp-keygen.c
index 494bedb19d24..9568adc8d2fe 100644
--- a/contrib/ntp/util/ntp-keygen.c
+++ b/contrib/ntp/util/ntp-keygen.c
@@ -154,7 +154,7 @@ u_long asn2ntp (ASN1_TIME *);
* Program variables
*/
extern char *optarg; /* command line argument */
-char *progname;
+char const *progname;
u_int lifetime = DAYSPERYEAR; /* certificate lifetime (days) */
int nkeys; /* MV keys */
time_t epoch; /* Unix epoch (seconds) since 1970 */
@@ -355,8 +355,8 @@ main(
fstamp = (u_int)(epoch + JAN_1970);
optct = ntpOptionProcess(&ntp_keygenOptions, argc, argv);
- argc -= optct;
- argv += optct;
+ argc -= optct; // Just in case we care later.
+ argv += optct; // Just in case we care later.
#ifdef OPENSSL
if (SSLeay() == SSLEAY_VERSION_NUMBER)
diff --git a/contrib/ntp/util/ntp-keygen.html b/contrib/ntp/util/ntp-keygen.html
index e366734fce01..39d911e7647c 100644
--- a/contrib/ntp/util/ntp-keygen.html
+++ b/contrib/ntp/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.8p3 of <code>ntp-keygen</code>.
+ <p>This document applies to version 4.2.8p4 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.8p3-RC3
+<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p4-sec-RC2
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/contrib/ntp/util/ntp-keygen.man.in b/contrib/ntp/util/ntp-keygen.man.in
index e1e838e43df5..a9287681d374 100644
--- a/contrib/ntp/util/ntp-keygen.man.in
+++ b/contrib/ntp/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@ "29 Jun 2015" "ntp (4.2.8p3)" "User Commands"
+.TH ntp-keygen @NTP_KEYGEN_MS@ "21 Oct 2015" "ntp (4.2.8p4)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-M4aiZI/ag-Y4aaYI)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-r5aiQP/ag-E5aaPP)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:32:11 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:40:02 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/util/ntp-keygen.mdoc.in b/contrib/ntp/util/ntp-keygen.mdoc.in
index 7a505a215ba5..4d035cba4916 100644
--- a/contrib/ntp/util/ntp-keygen.mdoc.in
+++ b/contrib/ntp/util/ntp-keygen.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 29 2015
+.Dd October 21 2015
.Dt NTP_KEYGEN @NTP_KEYGEN_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 29, 2015 at 04:32:18 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed October 21, 2015 at 12:40:10 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/util/ntptime.c b/contrib/ntp/util/ntptime.c
index 5a6c1d1642a0..c47e356dd796 100644
--- a/contrib/ntp/util/ntptime.c
+++ b/contrib/ntp/util/ntptime.c
@@ -73,7 +73,7 @@ static sigjmp_buf env; /* environment var. for pll_trap() */
static volatile int pll_control; /* (0) daemon, (1) kernel loop */
static volatile int status; /* most recent status bits */
static volatile int flash; /* most recent ntp_adjtime() bits */
-char* progname;
+char const * progname;
static char optargs[] = "MNT:cde:f:hm:o:rs:t:";
int
@@ -91,7 +91,7 @@ main(
#endif
struct timeval tv;
struct timex ntx, _ntx;
- int times[20];
+ int times[20] = { 0 };
double ftemp, gtemp, htemp;
long time_frac; /* ntv.time.tv_frac_sec (us/ns) */
l_fp ts;
diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h
index 7a4a2d1f12fc..ef4717ff2ac0 100644
--- a/usr.sbin/ntp/config.h
+++ b/usr.sbin/ntp/config.h
@@ -1421,7 +1421,7 @@
#define PACKAGE_NAME "ntp"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "ntp 4.2.8p3"
+#define PACKAGE_STRING "ntp 4.2.8p4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "ntp"
@@ -1430,7 +1430,7 @@
#define PACKAGE_URL "http://www.ntp.org./"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "4.2.8p3"
+#define PACKAGE_VERSION "4.2.8p4"
/* data dir */
#define PERLLIBDIR "/usr/local/share/ntp/lib"
@@ -1611,7 +1611,7 @@ typedef unsigned int uintptr_t;
/* #undef USE_UDP_SIGPOLL */
/* Version number of package */
-#define VERSION "4.2.8p3"
+#define VERSION "4.2.8p4"
/* vsnprintf expands "%m" to strerror(errno) */
/* #undef VSNPRINTF_PERCENT_M */
@@ -1788,5 +1788,5 @@ typedef union mpinfou {
/*
* FreeBSD specific: Explicitly specify date/time for reproducible build.
*/
-#define MKREPRO_DATE "Jul 04 2015"
-#define MKREPRO_TIME "15:42:16"
+#define MKREPRO_DATE "Oct 22 2015"
+#define MKREPRO_TIME "17:58:31"
diff --git a/usr.sbin/ntp/doc/ntp-keygen.8 b/usr.sbin/ntp/doc/ntp-keygen.8
index 89c4e0981622..197adbfc1426 100644
--- a/usr.sbin/ntp/doc/ntp-keygen.8
+++ b/usr.sbin/ntp/doc/ntp-keygen.8
@@ -1,11 +1,11 @@
-.Dd February 4 2015
+.Dd October 21 2015
.Dt NTP_KEYGEN 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:44:02 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed October 21, 2015 at 12:40:10 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/usr.sbin/ntp/doc/ntp.conf.5 b/usr.sbin/ntp/doc/ntp.conf.5
index 4ed9440e451c..c7af12dde621 100644
--- a/usr.sbin/ntp/doc/ntp.conf.5
+++ b/usr.sbin/ntp/doc/ntp.conf.5
@@ -1,11 +1,11 @@
-.Dd February 4 2015
+.Dd October 21 2015
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:07 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:24 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1905,7 +1905,7 @@ re\-associate accordingly.
Some administrators prefer to avoid running
.Xr ntpd 8
continuously and run either
-.Xr ntpdate 8
+.Xr sntp 8
or
.Xr ntpd 8
.Fl q
@@ -1997,7 +1997,7 @@ peers remaining.
This value defaults to 1, but can be changed
to any number from 1 to 15.
.It Cm minclock Ar minclock
-The clustering algorithm repeatedly casts out outlyer
+The clustering algorithm repeatedly casts out outlier
associations until no more than
.Cm minclock
associations remain.
@@ -2388,6 +2388,9 @@ This implies that
must have write permission for the directory the
drift file is located in, and that file system links, symbolic or
otherwise, should be avoided.
+.It Ic dscp Ar value
+This option specifies the Differentiated Services Control Point (DSCP) value,
+a 6\-bit code. The default value is 46, signifying Expedited Forwarding.
.It Xo Ic enable
.Oo
.Cm auth | Cm bclient |
@@ -2487,6 +2490,19 @@ This option is useful for sites that run
.Xr ntpd 8
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
+.It Ic leapsmearinterval Ar seconds
+This EXPERIMENTAL option is only available if
+.Xr ntpd 8
+was built with the
+.Cm \-\-enable\-leap\-smear
+option to the
+.Cm configure
+script.
+It specifies the interval over which a leap second correction will be applied.
+Recommended values for this option are between
+7200 (2 hours) and 86400 (24 hours).
+.Sy DO NOT USE THIS OPTION ON PUBLIC\-ACCESS SERVERS!
+See http://bugs.ntp.org/2855 for more information.
.It Ic logconfig Ar configkeyword
This command controls the amount and type of output written to
the system
@@ -2620,7 +2636,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 +2698,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
@@ -2696,19 +2727,22 @@ pulses will not be suppressed.
.Xc
.Bl -tag -width indent
.It Cm memlock Ar Nmegabytes
-Specify the number of megabytes of memory that can be allocated.
-Probably only available under Linux, this option is useful
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
when dropping root (the
.Fl i
option).
-The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
.It Cm stacksize Ar N4kPages
Specifies the maximum size of the process stack on systems with the
-.It Cm filenum Ar Nfiledescriptors
-Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
.Fn mlockall
function.
Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
.El
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number
diff --git a/usr.sbin/ntp/doc/ntp.keys.5 b/usr.sbin/ntp/doc/ntp.keys.5
index 4ec3bb385f81..b1bcb3c0fc47 100644
--- a/usr.sbin/ntp/doc/ntp.keys.5
+++ b/usr.sbin/ntp/doc/ntp.keys.5
@@ -1,13 +1,11 @@
-.Dd February 4 2015
+.Dd October 21 2015
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" $FreeBSD$
-.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:10 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:28 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
diff --git a/usr.sbin/ntp/doc/ntpd.8 b/usr.sbin/ntp/doc/ntpd.8
index 665aa0b9b820..243f96db1c79 100644
--- a/usr.sbin/ntp/doc/ntpd.8
+++ b/usr.sbin/ntp/doc/ntpd.8
@@ -1,11 +1,11 @@
-.Dd February 4 2015
+.Dd October 21 2015
.Dt NTPD 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:12 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:30 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -146,7 +146,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
@@ -165,6 +165,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
@@ -188,7 +201,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
@@ -521,6 +534,8 @@ when you have permission to do so from the owner of the target host.
Finally,
in the past many startup scripts would run
.Xr ntpdate 8
+or
+.Xr sntp 8
to get the system clock close to correct before starting
.Xr ntpd 8 ,
but this was never more than a mediocre hack and is no longer needed.
@@ -530,7 +545,9 @@ and you still need to set the system time before starting
.Nm ,
please open a bug report and document what is going on,
and then look at using
-.Xr sntp 8 .
+.Xr sntp 8
+if you really need to set the clock before starting
+.Nm .
.Pp
There is a way to start
.Xr ntpd 8
diff --git a/usr.sbin/ntp/doc/ntpdc.8 b/usr.sbin/ntp/doc/ntpdc.8
index 33736143f1bc..74129c4e6909 100644
--- a/usr.sbin/ntp/doc/ntpdc.8
+++ b/usr.sbin/ntp/doc/ntpdc.8
@@ -1,11 +1,11 @@
-.Dd February 4 2015
+.Dd October 21 2015
.Dt NTPDC 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:42:44 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed October 21, 2015 at 12:38:57 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/usr.sbin/ntp/doc/ntpq.8 b/usr.sbin/ntp/doc/ntpq.8
index 1eba486e4881..bcd1fba7bad3 100644
--- a/usr.sbin/ntp/doc/ntpq.8
+++ b/usr.sbin/ntp/doc/ntpq.8
@@ -1,11 +1,11 @@
-.Dd February 4 2015
+.Dd October 21 2015
.Dt NTPQ 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:43:19 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed October 21, 2015 at 12:39:29 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -226,7 +226,9 @@ switch.
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
-to a key number the server has been configured to use for this
+to the
+.Cm controlkey
+key number the server has been configured to use for this
purpose.
.It Ic keytype Xo Oo
.Cm md5 |
@@ -506,6 +508,14 @@ offset of server relative to this host
.It Ic jitter
jitter
.El
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Ic refid
+is displayed in hex format and the association number is also displayed.
.It Ic pstats Ar assocID
Show the statistics for the peer with the given
.Ar assocID .
diff --git a/usr.sbin/ntp/doc/sntp.8 b/usr.sbin/ntp/doc/sntp.8
index 4d09cb02765f..9bcc78da209a 100644
--- a/usr.sbin/ntp/doc/sntp.8
+++ b/usr.sbin/ntp/doc/sntp.8
@@ -1,11 +1,11 @@
-.Dd February 4 2015
+.Dd October 21 2015
.Dt SNTP 8 User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
.\" $FreeBSD$
.\"
-.\" It has been AutoGen-ed February 4, 2015 at 02:34:20 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed October 21, 2015 at 12:30:59 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -59,7 +59,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/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile
index 051d6975e6b9..c89982a8c45e 100644
--- a/usr.sbin/ntp/ntpdc/Makefile
+++ b/usr.sbin/ntp/ntpdc/Makefile
@@ -3,7 +3,6 @@
MAN=
.include <bsd.own.mk>
-.include <bsd.own.mk>
.PATH: ${.CURDIR}/../../../contrib/ntp/ntpdc
diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile
index 79367196b797..fec39eb280df 100644
--- a/usr.sbin/ntp/ntpq/Makefile
+++ b/usr.sbin/ntp/ntpq/Makefile
@@ -3,7 +3,6 @@
MAN=
.include <bsd.own.mk>
-.include <bsd.own.mk>
.PATH: ${.CURDIR}/../../../contrib/ntp/ntpq
diff --git a/usr.sbin/ntp/scripts/mkver b/usr.sbin/ntp/scripts/mkver
index 0fc94beab0ab..2bc36b5354a9 100755
--- a/usr.sbin/ntp/scripts/mkver
+++ b/usr.sbin/ntp/scripts/mkver
@@ -6,7 +6,7 @@ PROG=${1-UNKNOWN}
ConfStr="$PROG"
-ConfStr="$ConfStr 4.2.8p3"
+ConfStr="$ConfStr 4.2.8p4"
case "$CSET" in
'') ;;