summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-07 08:29:34 +0000
committer <>2015-04-13 18:52:43 +0000
commitb2ccf8dd31d1457ae9f0ae270054117179220370 (patch)
tree4ccd4a16d5e9ef5869630ba624e822665a6e248c
parentbdab5265fcbf3f472545073a23f8999749a9f2b9 (diff)
downloadntp-master.tar.gz
Imported from /home/lorry/working-area/delta_ntp/ntp-4.2.8p2.tar.gz.HEADntp-4.2.8p2master
-rw-r--r--COPYRIGHT40
-rw-r--r--ChangeLog171
-rw-r--r--CommitLog7886
-rw-r--r--Makefile.am5
-rw-r--r--Makefile.in25
-rw-r--r--NEWS369
-rw-r--r--aclocal.m46
-rw-r--r--adjtimed/Makefile.in14
-rwxr-xr-xbuild6
-rw-r--r--clockstuff/Makefile.in14
-rwxr-xr-xcompile142
-rwxr-xr-xconfig.guess1517
-rw-r--r--config.h.in22
-rwxr-xr-xconfig.sub1756
-rwxr-xr-xconfigure802
-rw-r--r--configure.ac80
-rwxr-xr-xdepcomp530
-rw-r--r--html/build.html4
-rw-r--r--html/confopt.html4
-rw-r--r--html/copyright.html38
-rw-r--r--html/drivers/driver28.html136
-rw-r--r--html/miscopt.html4
-rw-r--r--html/sntp.html9
-rw-r--r--include/Makefile.in14
-rw-r--r--include/audio.h2
-rw-r--r--include/binio.h10
-rw-r--r--include/icom.h2
-rw-r--r--include/isc/Makefile.in14
-rw-r--r--include/mbg_gps166.h1195
-rw-r--r--include/ntp.h35
-rw-r--r--include/ntp_calendar.h6
-rw-r--r--include/ntp_config.h5
-rw-r--r--include/ntp_filegen.h2
-rw-r--r--include/ntp_fp.h5
-rw-r--r--include/ntp_md5.h2
-rw-r--r--include/ntp_random.h3
-rw-r--r--include/ntp_stdlib.h10
-rw-r--r--include/ntpd.h17
-rw-r--r--include/parse.h49
-rw-r--r--include/parse_conf.h14
-rw-r--r--include/timepps-Solaris.h2
-rw-r--r--kernel/Makefile.in14
-rw-r--r--kernel/sys/Makefile.in14
-rw-r--r--kernel/sys/parsestreams.h2
-rw-r--r--lib/isc/backtrace.c8
-rw-r--r--lib/isc/event.c4
-rw-r--r--lib/isc/include/isc/Makefile439
-rw-r--r--lib/isc/include/isc/backtrace.h4
-rw-r--r--lib/isc/include/isc/socket.h14
-rw-r--r--lib/isc/inet_ntop.c1
-rw-r--r--lib/isc/log.c27
-rw-r--r--lib/isc/netaddr.c3
-rw-r--r--lib/isc/result.c12
-rw-r--r--lib/isc/sockaddr.c12
-rw-r--r--lib/isc/unix/file.c6
-rw-r--r--lib/isc/unix/ifiter_getifaddrs.c13
-rw-r--r--lib/isc/unix/ifiter_ioctl.c18
-rw-r--r--lib/isc/unix/include/isc/Makefile415
-rw-r--r--lib/isc/unix/net.c3
-rw-r--r--libjsmn/jsmn.c5
-rw-r--r--libntp/Makefile.am3
-rw-r--r--libntp/Makefile.in70
-rw-r--r--libntp/atoint.c2
-rw-r--r--libntp/atolfp.c10
-rw-r--r--libntp/atouint.c2
-rw-r--r--libntp/audio.c24
-rw-r--r--libntp/authkeys.c3
-rw-r--r--libntp/authreadkeys.c8
-rw-r--r--libntp/emalloc.c2
-rw-r--r--libntp/hextoint.c2
-rw-r--r--libntp/hextolfp.c4
-rw-r--r--libntp/humandate.c4
-rw-r--r--libntp/icom.c4
-rw-r--r--libntp/modetoa.c6
-rw-r--r--libntp/mstolfp.c10
-rw-r--r--libntp/ntp_calendar.c80
-rw-r--r--libntp/ntp_crypto_rnd.c113
-rw-r--r--libntp/ntp_intres.c19
-rw-r--r--libntp/ntp_lineedit.c13
-rw-r--r--libntp/octtoint.c2
-rw-r--r--libntp/prettydate.c14
-rw-r--r--libntp/ssl_init.c4
-rw-r--r--libntp/timetoa.c9
-rw-r--r--libntp/work_fork.c2
-rw-r--r--libparse/Makefile.am32
-rw-r--r--libparse/Makefile.in43
-rw-r--r--libparse/clk_computime.c62
-rw-r--r--libparse/clk_dcf7000.c27
-rw-r--r--libparse/clk_hopf6021.c39
-rw-r--r--libparse/clk_meinberg.c179
-rw-r--r--libparse/clk_rawdcf.c64
-rw-r--r--libparse/clk_rcc8000.c31
-rw-r--r--libparse/clk_schmid.c36
-rw-r--r--libparse/clk_sel240x.c16
-rw-r--r--libparse/clk_trimtaip.c23
-rw-r--r--libparse/clk_trimtsip.c62
-rw-r--r--libparse/clk_varitext.c87
-rw-r--r--libparse/clk_wharton.c13
-rw-r--r--libparse/data_mbg.c149
-rw-r--r--libparse/gpstolfp.c10
-rw-r--r--libparse/info_trimble.c4
-rw-r--r--libparse/mkinfo_rcmd.sed2
-rw-r--r--libparse/mkinfo_scmd.sed2
-rw-r--r--libparse/parse.c120
-rw-r--r--libparse/parse_conf.c4
-rw-r--r--libparse/parsesolaris.c108
-rw-r--r--libparse/parsestreams.c126
-rw-r--r--libparse/trim_info.c2
-rwxr-xr-xltmain.sh9636
-rwxr-xr-xmissing360
-rw-r--r--ntpd/Makefile.am2
-rw-r--r--ntpd/Makefile.in19
-rw-r--r--ntpd/cmd_args.c9
-rw-r--r--ntpd/invoke-ntp.conf.texi31
-rw-r--r--ntpd/invoke-ntp.keys.texi2
-rw-r--r--ntpd/invoke-ntpd.texi25
-rw-r--r--ntpd/keyword-gen-utd2
-rw-r--r--ntpd/keyword-gen.c5
-rw-r--r--ntpd/ntp.conf.5man42
-rw-r--r--ntpd/ntp.conf.5mdoc39
-rw-r--r--ntpd/ntp.conf.def31
-rw-r--r--ntpd/ntp.conf.html28
-rw-r--r--ntpd/ntp.conf.man.in42
-rw-r--r--ntpd/ntp.conf.mdoc.in39
-rw-r--r--ntpd/ntp.keys.5man8
-rw-r--r--ntpd/ntp.keys.5mdoc8
-rw-r--r--ntpd/ntp.keys.html2
-rw-r--r--ntpd/ntp.keys.man.in8
-rw-r--r--ntpd/ntp.keys.mdoc.in8
-rw-r--r--ntpd/ntp_config.c54
-rw-r--r--ntpd/ntp_control.c289
-rw-r--r--ntpd/ntp_crypto.c157
-rw-r--r--ntpd/ntp_filegen.c2
-rw-r--r--ntpd/ntp_io.c113
-rw-r--r--ntpd/ntp_keyword.h1192
-rw-r--r--ntpd/ntp_leapsec.c17
-rw-r--r--ntpd/ntp_loopfilter.c188
-rw-r--r--ntpd/ntp_parser.c2047
-rw-r--r--ntpd/ntp_parser.h406
-rw-r--r--ntpd/ntp_parser.y7
-rw-r--r--ntpd/ntp_peer.c20
-rw-r--r--ntpd/ntp_proto.c125
-rw-r--r--ntpd/ntp_request.c17
-rw-r--r--ntpd/ntp_restrict.c4
-rw-r--r--ntpd/ntp_scanner.c28
-rw-r--r--ntpd/ntp_util.c4
-rw-r--r--ntpd/ntpd-opts.c628
-rw-r--r--ntpd/ntpd-opts.h73
-rw-r--r--ntpd/ntpd.1ntpdman28
-rw-r--r--ntpd/ntpd.1ntpdmdoc25
-rw-r--r--ntpd/ntpd.c9
-rw-r--r--ntpd/ntpd.html76
-rw-r--r--ntpd/ntpd.man.in28
-rw-r--r--ntpd/ntpd.mdoc.in25
-rw-r--r--ntpd/ntpdbase-opts.def22
-rw-r--r--ntpd/refclock_acts.c4
-rw-r--r--ntpd/refclock_arc.c6
-rw-r--r--ntpd/refclock_chu.c4
-rw-r--r--ntpd/refclock_gpsdjson.c14
-rw-r--r--ntpd/refclock_heath.c2
-rw-r--r--ntpd/refclock_hpgps.c9
-rw-r--r--ntpd/refclock_irig.c4
-rw-r--r--ntpd/refclock_jjy.c45
-rw-r--r--ntpd/refclock_jupiter.c109
-rw-r--r--ntpd/refclock_neoclock4x.c14
-rw-r--r--ntpd/refclock_nmea.c15
-rw-r--r--ntpd/refclock_oncore.c160
-rw-r--r--ntpd/refclock_palisade.c10
-rw-r--r--ntpd/refclock_palisade.h1
-rw-r--r--ntpd/refclock_parse.c1226
-rw-r--r--ntpd/refclock_pcf.c2
-rw-r--r--ntpd/refclock_ripencc.c2
-rw-r--r--ntpd/refclock_shm.c200
-rw-r--r--ntpd/refclock_true.c1
-rw-r--r--ntpd/refclock_wwv.c6
-rw-r--r--ntpdate/Makefile.in14
-rw-r--r--ntpdate/ntpdate.c2
-rw-r--r--ntpdc/Makefile.in14
-rw-r--r--ntpdc/invoke-ntpdc.texi4
-rw-r--r--ntpdc/ntpdc-opts.c236
-rw-r--r--ntpdc/ntpdc-opts.h10
-rw-r--r--ntpdc/ntpdc.1ntpdcman8
-rw-r--r--ntpdc/ntpdc.1ntpdcmdoc6
-rw-r--r--ntpdc/ntpdc.c72
-rw-r--r--ntpdc/ntpdc.h2
-rw-r--r--ntpdc/ntpdc.html4
-rw-r--r--ntpdc/ntpdc.man.in8
-rw-r--r--ntpdc/ntpdc.mdoc.in6
-rw-r--r--ntpdc/ntpdc_ops.c12
-rw-r--r--ntpq/Makefile.in14
-rw-r--r--ntpq/invoke-ntpq.texi4
-rw-r--r--ntpq/ntpq-opts.c234
-rw-r--r--ntpq/ntpq-opts.h10
-rw-r--r--ntpq/ntpq-subs.c215
-rw-r--r--ntpq/ntpq.1ntpqman10
-rw-r--r--ntpq/ntpq.1ntpqmdoc8
-rw-r--r--ntpq/ntpq.c75
-rw-r--r--ntpq/ntpq.h2
-rw-r--r--ntpq/ntpq.html4
-rw-r--r--ntpq/ntpq.man.in10
-rw-r--r--ntpq/ntpq.mdoc.in8
-rw-r--r--ntpsnmpd/Makefile.in14
-rw-r--r--ntpsnmpd/invoke-ntpsnmpd.texi4
-rw-r--r--ntpsnmpd/netsnmp_daemonize.c1
-rw-r--r--ntpsnmpd/ntp_snmp.h3
-rw-r--r--ntpsnmpd/ntpsnmpd-opts.c158
-rw-r--r--ntpsnmpd/ntpsnmpd-opts.h10
-rw-r--r--ntpsnmpd/ntpsnmpd.1ntpsnmpdman8
-rw-r--r--ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc6
-rw-r--r--ntpsnmpd/ntpsnmpd.html2
-rw-r--r--ntpsnmpd/ntpsnmpd.man.in8
-rw-r--r--ntpsnmpd/ntpsnmpd.mdoc.in6
-rw-r--r--packageinfo.sh8
-rw-r--r--parseutil/Makefile.in14
-rw-r--r--parseutil/dcfd.c62
-rw-r--r--parseutil/testdcf.c25
-rw-r--r--ports/winnt/include/config.h8
-rw-r--r--ports/winnt/include/termios.h2
-rw-r--r--ports/winnt/libntp/arc4wrap.c84
-rw-r--r--ports/winnt/libntp/getclock.c2
-rw-r--r--ports/winnt/libntp/termios.c3
-rw-r--r--ports/winnt/ntpd/nt_clockstuff.c41
-rw-r--r--ports/winnt/vs2005/libntp.vcproj4
-rw-r--r--ports/winnt/vs2008/libntp/libntp.vcproj12
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcxproj2
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcxproj.filters6
-rw-r--r--scripts/Makefile.am1
-rw-r--r--scripts/Makefile.in15
-rw-r--r--scripts/build/Makefile.in14
-rwxr-xr-xscripts/build/UpdatePoint18
-rwxr-xr-xscripts/build/VersionName15
-rw-r--r--scripts/calc_tickadj/Makefile.in14
-rw-r--r--scripts/calc_tickadj/calc_tickadj.1calc_tickadjman6
-rw-r--r--scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc4
-rw-r--r--scripts/calc_tickadj/calc_tickadj.html2
-rw-r--r--scripts/calc_tickadj/calc_tickadj.man.in6
-rw-r--r--scripts/calc_tickadj/calc_tickadj.mdoc.in4
-rw-r--r--scripts/calc_tickadj/invoke-calc_tickadj.texi2
-rw-r--r--scripts/invoke-plot_summary.texi4
-rw-r--r--scripts/invoke-summary.texi4
-rw-r--r--scripts/lib/Makefile.in14
-rw-r--r--scripts/lib/NTP/Util.pm19
-rw-r--r--scripts/ntp-wait/Makefile.in14
-rw-r--r--scripts/ntp-wait/invoke-ntp-wait.texi4
-rw-r--r--scripts/ntp-wait/ntp-wait-opts4
-rw-r--r--scripts/ntp-wait/ntp-wait.1ntp-waitman6
-rw-r--r--scripts/ntp-wait/ntp-wait.1ntp-waitmdoc4
-rw-r--r--scripts/ntp-wait/ntp-wait.html4
-rw-r--r--scripts/ntp-wait/ntp-wait.man.in6
-rw-r--r--scripts/ntp-wait/ntp-wait.mdoc.in4
-rw-r--r--scripts/ntpsweep/Makefile.in14
-rw-r--r--scripts/ntpsweep/invoke-ntpsweep.texi4
-rw-r--r--scripts/ntpsweep/ntpsweep-opts4
-rw-r--r--scripts/ntpsweep/ntpsweep.1ntpsweepman6
-rw-r--r--scripts/ntpsweep/ntpsweep.1ntpsweepmdoc4
-rw-r--r--scripts/ntpsweep/ntpsweep.html4
-rw-r--r--scripts/ntpsweep/ntpsweep.man.in6
-rw-r--r--scripts/ntpsweep/ntpsweep.mdoc.in4
-rw-r--r--scripts/ntptrace/Makefile.in14
-rw-r--r--scripts/ntptrace/invoke-ntptrace.texi4
-rw-r--r--scripts/ntptrace/ntptrace-opts4
-rw-r--r--scripts/ntptrace/ntptrace.1ntptraceman6
-rw-r--r--scripts/ntptrace/ntptrace.1ntptracemdoc4
-rw-r--r--scripts/ntptrace/ntptrace.html4
-rw-r--r--scripts/ntptrace/ntptrace.man.in6
-rw-r--r--scripts/ntptrace/ntptrace.mdoc.in4
-rw-r--r--scripts/plot_summary-opts4
-rw-r--r--scripts/plot_summary.1plot_summaryman6
-rw-r--r--scripts/plot_summary.1plot_summarymdoc4
-rw-r--r--scripts/plot_summary.html4
-rw-r--r--scripts/plot_summary.man.in6
-rw-r--r--scripts/plot_summary.mdoc.in4
-rw-r--r--scripts/summary-opts4
-rw-r--r--scripts/summary.1summaryman6
-rw-r--r--scripts/summary.1summarymdoc4
-rw-r--r--scripts/summary.html4
-rw-r--r--scripts/summary.man.in6
-rw-r--r--scripts/summary.mdoc.in4
-rw-r--r--scripts/update-leap/Makefile.am97
-rw-r--r--scripts/update-leap/Makefile.in887
-rw-r--r--scripts/update-leap/invoke-update-leap.menu1
-rw-r--r--scripts/update-leap/invoke-update-leap.texi170
-rw-r--r--scripts/update-leap/update-leap434
-rw-r--r--scripts/update-leap/update-leap-opts72
-rw-r--r--scripts/update-leap/update-leap-opts.def163
-rw-r--r--scripts/update-leap/update-leap.1update-leapman169
-rw-r--r--scripts/update-leap/update-leap.1update-leapmdoc134
-rw-r--r--scripts/update-leap/update-leap.html274
-rw-r--r--scripts/update-leap/update-leap.man.in169
-rw-r--r--scripts/update-leap/update-leap.mdoc.in134
-rw-r--r--scripts/update-leap/update-leap.texi43
-rw-r--r--sntp/COPYRIGHT40
-rw-r--r--sntp/Makefile.am13
-rw-r--r--sntp/Makefile.in33
-rw-r--r--sntp/aclocal.m44
-rwxr-xr-xsntp/compile142
-rwxr-xr-xsntp/config.guess1517
-rw-r--r--sntp/config.h.in3
-rwxr-xr-xsntp/config.sub1756
-rwxr-xr-xsntp/configure394
-rw-r--r--sntp/configure.ac13
-rw-r--r--sntp/crypto.c4
-rwxr-xr-xsntp/depcomp530
-rw-r--r--sntp/include/Makefile.in14
-rw-r--r--sntp/include/copyright.def4
-rw-r--r--sntp/include/ntp.lic2
-rw-r--r--sntp/include/version.def2
-rw-r--r--sntp/include/version.texi6
-rw-r--r--sntp/invoke-sntp.texi14
-rw-r--r--sntp/libevent/ChangeLog786
-rw-r--r--sntp/libevent/Makefile.am4
-rw-r--r--sntp/libevent/Makefile.in98
-rw-r--r--sntp/libevent/README218
-rw-r--r--sntp/libevent/WIN32-Code/nmake/event2/event-config.h4
-rw-r--r--sntp/libevent/WIN32-Code/tree.h677
-rw-r--r--sntp/libevent/aclocal.m43
-rw-r--r--sntp/libevent/buffer.c84
-rw-r--r--sntp/libevent/bufferevent.c13
-rw-r--r--sntp/libevent/bufferevent_async.c10
-rw-r--r--sntp/libevent/bufferevent_filter.c69
-rw-r--r--sntp/libevent/bufferevent_openssl.c2
-rw-r--r--sntp/libevent/bufferevent_pair.c33
-rw-r--r--sntp/libevent/config.h.in118
-rwxr-xr-xsntp/libevent/configure4647
-rw-r--r--sntp/libevent/configure.ac33
-rw-r--r--sntp/libevent/evbuffer-internal.h14
-rw-r--r--sntp/libevent/evdns.c113
-rw-r--r--sntp/libevent/event.c48
-rw-r--r--sntp/libevent/event_tagging.c15
-rw-r--r--sntp/libevent/evrpc-internal.h1
-rw-r--r--sntp/libevent/evthread-internal.h7
-rw-r--r--sntp/libevent/evthread.c23
-rw-r--r--sntp/libevent/evutil.c42
-rw-r--r--sntp/libevent/evutil_time.c50
-rw-r--r--sntp/libevent/ht-internal.h1
-rw-r--r--sntp/libevent/http-internal.h2
-rw-r--r--sntp/libevent/http.c47
-rw-r--r--sntp/libevent/include/event2/buffer.h11
-rw-r--r--sntp/libevent/include/event2/bufferevent.h9
-rw-r--r--sntp/libevent/include/event2/dns.h18
-rw-r--r--sntp/libevent/include/event2/event.h10
-rw-r--r--sntp/libevent/include/event2/http.h14
-rw-r--r--sntp/libevent/include/event2/listener.h9
-rw-r--r--sntp/libevent/include/event2/util.h69
-rw-r--r--sntp/libevent/kqueue.c17
-rw-r--r--sntp/libevent/listener.c5
-rw-r--r--sntp/libevent/m4/acx_pthread.m4279
-rw-r--r--sntp/libevent/sample/http-server.c7
-rw-r--r--sntp/libevent/sample/https-client.c17
-rw-r--r--sntp/libevent/sample/include.am2
-rw-r--r--sntp/libevent/test/include.am3
-rw-r--r--sntp/libevent/test/regress.c37
-rw-r--r--sntp/libevent/test/regress.h6
-rw-r--r--sntp/libevent/test/regress_buffer.c53
-rw-r--r--sntp/libevent/test/regress_bufferevent.c152
-rw-r--r--sntp/libevent/test/regress_dns.c155
-rw-r--r--sntp/libevent/test/regress_finalize.c1
-rw-r--r--sntp/libevent/test/regress_http.c116
-rw-r--r--sntp/libevent/test/regress_main.c4
-rw-r--r--sntp/libevent/test/regress_minheap.c5
-rw-r--r--sntp/libevent/test/regress_ssl.c1
-rw-r--r--sntp/libevent/test/regress_thread.c5
-rw-r--r--sntp/libevent/test/regress_util.c36
-rw-r--r--sntp/libevent/test/regress_zlib.c17
-rw-r--r--sntp/libevent/test/test-fdleak.c20
-rw-r--r--sntp/libevent/test/test-ratelim.c11
-rw-r--r--sntp/libevent/test/test-time.c15
-rw-r--r--sntp/libevent/test/tinytest.c33
-rw-r--r--sntp/libevent/test/tinytest.h2
-rw-r--r--sntp/libevent/test/tinytest_macros.h27
-rw-r--r--sntp/libevent/time-internal.h3
-rw-r--r--sntp/libevent/util-internal.h2
-rw-r--r--sntp/libevent/whatsnew-2.1.txt53
-rw-r--r--sntp/libopts/Makefile.in14
-rw-r--r--sntp/libopts/autoopts.h4
-rw-r--r--sntp/libopts/autoopts/options.h10
-rw-r--r--sntp/libopts/configfile.c12
-rw-r--r--sntp/libopts/enum.c8
-rw-r--r--sntp/libopts/file.c4
-rw-r--r--sntp/libopts/find.c4
-rw-r--r--sntp/libopts/init.c13
-rw-r--r--sntp/libopts/load.c2
-rw-r--r--sntp/libopts/m4/libopts.m424
-rw-r--r--sntp/libopts/makeshell.c16
-rw-r--r--sntp/libopts/nested.c14
-rw-r--r--sntp/libopts/numeric.c2
-rw-r--r--sntp/libopts/parse-duration.c4
-rw-r--r--sntp/libopts/pgusage.c2
-rw-r--r--sntp/libopts/reset.c2
-rw-r--r--sntp/libopts/save.c20
-rw-r--r--sntp/libopts/tokenize.c2
-rw-r--r--sntp/libopts/usage.c4
-rw-r--r--sntp/loc/darwin1
-rw-r--r--sntp/loc/debian1
-rw-r--r--sntp/loc/freebsd1
-rw-r--r--sntp/loc/legacy1
-rw-r--r--sntp/loc/netbsd3
-rw-r--r--sntp/loc/solaris1
-rwxr-xr-xsntp/ltmain.sh9636
-rw-r--r--sntp/m4/ax_c99_struct_init.m459
-rw-r--r--sntp/m4/hms_search_lib.m44
-rw-r--r--sntp/m4/ntp_compiler.m41
-rw-r--r--sntp/m4/ntp_crypto_rand.m453
-rw-r--r--sntp/m4/ntp_libevent.m425
-rw-r--r--sntp/m4/ntp_libntp.m414
-rw-r--r--sntp/m4/ntp_locinfo.m46
-rw-r--r--sntp/m4/openldap-thread-check.m4 (renamed from sntp/libevent/m4/openldap-thread-check.m4)0
-rw-r--r--sntp/m4/openldap.m4 (renamed from sntp/libevent/m4/openldap.m4)0
-rw-r--r--sntp/m4/version.m42
-rw-r--r--sntp/main.c35
-rwxr-xr-xsntp/missing360
-rw-r--r--sntp/networking.c23
-rw-r--r--sntp/scm-rev2
-rw-r--r--sntp/scripts/Makefile.in14
-rwxr-xr-xsntp/scripts/cvo.sh8
-rw-r--r--sntp/sntp-opts.c347
-rw-r--r--sntp/sntp-opts.def29
-rw-r--r--sntp/sntp-opts.h10
-rw-r--r--sntp/sntp.1sntpman38
-rw-r--r--sntp/sntp.1sntpmdoc35
-rw-r--r--sntp/sntp.html14
-rw-r--r--sntp/sntp.man.in38
-rw-r--r--sntp/sntp.mdoc.in35
-rw-r--r--sntp/tests/Makefile.in14
-rw-r--r--tests/Makefile.in14
-rw-r--r--tests/libntp/Makefile.in14
-rw-r--r--tests/ntpd/Makefile.in14
-rw-r--r--util/Makefile.am3
-rw-r--r--util/Makefile.in24
-rw-r--r--util/ansi2knr.136
-rw-r--r--util/ansi2knr.c739
-rw-r--r--util/invoke-ntp-keygen.texi4
-rw-r--r--util/jitter.c3
-rw-r--r--util/jitter.h401
-rw-r--r--util/ntp-keygen-opts.c368
-rw-r--r--util/ntp-keygen-opts.h10
-rw-r--r--util/ntp-keygen.1ntp-keygenman10
-rw-r--r--util/ntp-keygen.1ntp-keygenmdoc8
-rw-r--r--util/ntp-keygen.c89
-rw-r--r--util/ntp-keygen.html4
-rw-r--r--util/ntp-keygen.man.in10
-rw-r--r--util/ntp-keygen.mdoc.in8
-rw-r--r--util/ntptime.c9
-rwxr-xr-xylwrap222
444 files changed, 52300 insertions, 13502 deletions
diff --git a/COPYRIGHT b/COPYRIGHT
index 1775a64..9c1a0f8 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -4,16 +4,16 @@ This file is automatically generated from html/copyright.html
jpg "Clone me," says Dolly sheepishly.
- Last update: 9-Aug-2014 07:56 UTC
+ Last update: 17-Jan-2015 00:16 UTC
_________________________________________________________________
The following copyright notice applies to all files collectively
called the Network Time Protocol Version 4 Distribution. Unless
- specifically declared otherwise in an individual file, this notice
- applies as if the text was explicitly included in the file.
+ specifically declared otherwise in an individual file, this entire
+ notice applies as if the text was explicitly included in the file.
***********************************************************************
* *
-* Copyright (c) University of Delaware 1992-2014 *
+* Copyright (c) University of Delaware 1992-2015 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose with or without fee is hereby *
@@ -29,6 +29,38 @@ This file is automatically generated from html/copyright.html
* *
***********************************************************************
+ Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin
+ Burnicki is:
+***********************************************************************
+* *
+* Copyright (c) Network Time Foundation 2011-2015 *
+* *
+* All Rights Reserved *
+* *
+* Redistribution and use in source and binary forms, with or without *
+* modification, are permitted provided that the following conditions *
+* are met: *
+* 1. Redistributions of source code must retain the above copyright *
+* notice, this list of conditions and the following disclaimer. *
+* 2. Redistributions in binary form must reproduce the above *
+* copyright notice, this list of conditions and the following *
+* disclaimer in the documentation and/or other materials provided *
+* with the distribution. *
+* *
+* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS *
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
+* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE *
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
+* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR *
+* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
+* DAMAGE. *
+***********************************************************************
+
The following individuals contributed in part to the Network Time
Protocol Distribution Version 4 and are acknowledged as authors of
this work.
diff --git a/ChangeLog b/ChangeLog
index aafdee1..e75384c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,179 @@
+---
+(4.2.8p2) 2015/04/07 Released by Harlan Stenn <stenn@ntp.org>
+(4.2.8p2-RC3) 2015/04/03 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2763] Fix for different thresholds for forward and backward steps.
+---
+(4.2.8p2-RC2) 2015/04/03 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2592] FLAG_TSTAMP_PPS cleanup for refclock_parse.c.
+* [Bug 2769] New script: update-leap
+* [Bug 2769] cleannup for update-leap
+* [Bug 2788] New flag -G (force_step_once).
+* [Bug 2794] Clean up kernel clock status reports.
+* [Bug 2795] Cannot build without OpenSLL (on Win32).
+ Provided a Win32 specific wrapper around libevent/arc4random.c.
+ fixed some minor warnings.
+* [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32.
+* [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys
+ on big-endian machines.
+* [Bug 2798] sntp should decode and display the leap indicator.
+* Simple cleanup to html/build.html
+---
+(4.2.8p2-RC1) 2015/03/30 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2794] Don't let reports on normal kernel status changes
+ look like errors.
+* [Bug 2788] New flag -G (force_step_once).
+* [Bug 2592] Account for PPS sources which can provide an accurate
+ absolute time stamp, and status information.
+ Fixed indention and removed trailing whitespace.
+* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument.
+* [Bug 2346] "graceful termination" signals do not do peer cleanup.
+* [Bug 2728] See if C99-style structure initialization works.
+* [Bug 2747] Upgrade libevent to 2.1.5-beta.
+* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. .
+* [Bug 2751] jitter.h has stale copies of l_fp macros.
+* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM.
+* [Bug 2757] Quiet compiler warnings.
+* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
+* [Bug 2763] Allow different thresholds for forward and backward steps.
+* [Bug 2766] ntp-keygen output files should not be world-readable.
+* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
+* [Bug 2771] nonvolatile value is documented in wrong units.
+* [Bug 2773] Early leap announcement from Palisade/Thunderbolt
+* [Bug 2774] Unreasonably verbose printout - leap pending/warning
+* [Bug 2775] ntp-keygen.c fails to compile under Windows.
+* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info.
+ Removed non-ASCII characters from some copyright comments.
+ Removed trailing whitespace.
+ Updated definitions for Meinberg clocks from current Meinberg header files.
+ Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Account for updated definitions pulled from Meinberg header files.
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Replaced some constant numbers by defines from ntp_calendar.h
+ Modified creation of parse-specific variables for Meinberg devices
+ in gps16x_message().
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling
+ if the time status shall be printed.
+* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+* [Sec 2781] Authentication doesn't protect symmetric associations against
+ DoS attacks.
+* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
+* [Bug 2789] Quiet compiler warnings from libevent.
+* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
+ pause briefly before measuring system clock precision to yield
+ correct results.
+* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer.
+* Use predefined function types for parse driver functions
+ used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast parse conversion results to appropriate types to avoid
+ compiler warnings.
+ Let ioctl() for Windows accept a (void *) to avoid compiler warnings
+ when called with pointers to different types.
+---
+(4.2.8p1) 2015/02/04 Released by Harlan Stenn <stenn@ntp.org>
+
+* Update the NEWS file.
+* [Sec 2671] vallen in extension fields are not validated.
+---
+(4.2.8p1-RC2) 2015/01/29 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2627] shm refclock allows only two units with owner-only access
+ rework: reverted sense of mode bit (so default reflects previous
+ behaviour) and updated ducumentation.
+* [Bug 2732] - Leap second not handled correctly on Windows 8
+ use 'GetTickCount()' to get the true elapsed time of slew
+ (This should work for all versions of Windows >= W2K)
+* [Bug 2738] Missing buffer initialization in refclocK_parse.c::parsestate().
+* [Bug 2739] Parse driver with PPS enabled occasionally evaluates
+ PPS timestamp with wrong sign.
+ Removed some German umlauts.
+* [Bug 2740] Removed some obsolete code from the parse driver.
+* [Bug 2741] Incorrect buffer check in refclocK_parse.c::parsestatus().
+---
+(4.2.8p1-RC1) 2015/01/24 Released by Harlan Stenn <stenn@ntp.org>
+
+* Start the RC for 4.2.8p1.
+* [Bug 2187] Update version number generation scripts.
+* [Bug 2617] Fix sntp Usage documentation section.
+* [Sec 2672] Code cleanup: On some OSes ::1 can be spoofed...
+* [Bug 2736] Show error message if we cannot open the config file.
+* Copyright update.
+* Fix the package name.
+---
+(4.2.8p1-beta5) 2015/01/07 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2695] Windows build: __func__ not supported under Windows.
+* [Bug 2728] Work around C99-style structure initialization code
+ for older compilers, specifically Visual Studio prior to VS2013.
+---
+(4.2.8p1-beta4) 2015/01/04 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 1084] PPSAPI for ntpd on Windows with DLL backends
+* [Bug 2695] Build problem on Windows (sys/socket.h).
+* [Bug 2715] mdnstries option for ntp.conf from NetBSD.
+* Fix a regression introduced to timepps-Solaris.h as part of:
+ [Bug 1206] Required compiler changes for Windows
+ (4.2.5p181) 2009/06/06
+---
+(4.2.8p1-beta3) 2015/01/02 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2627] shm refclock allows only two units with owner-only access
+ Use mode bit 0 to select public access for units >= 2 (units 0 & 1 are
+ always private.
+* [Bug 2681] Fix display of certificate EOValidity dates on 32-bit systems.
+* [Bug 2695] 4.2.8 does not build on Windows.
+* [bug 2700] mrulist stopped working in 4.2.8.
+* [Bug 2706] libparse/info_trimble.c build dependencies are broken.
+* [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD.
+* [Bug 2714] libevent may need to be built independently of any build of sntp.
+* [Bug 2715] mdnstries option for ntp.conf from NetBSD.
+---
+(4.2.8p1-beta2) 2014/12/27 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Bug 2674] Install sntp in sbin on NetBSD.
+* [Bug 2693] ntp-keygen doesn't build without OpenSSL and sntp.
+* [Bug 2707] Avoid a C90 extension in libjsmn/jsmn.c.
+* [Bug 2709] see if we have a C99 compiler (not yet required).
+---
+(4.2.8p1-beta1) 2014/12/23 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs.
+* [Bug 2693] ntp-keygen doesn't build without OpenSSL.
+* [Bug 2697] IN6_IS_ADDR_LOOPBACK build problems on some OSes.
+* [Bug 2699] HAVE_SYS_SELECT_H is misspelled in refclock_gpsdjson.c.
+---
+(4.2.8) 2014/12/19 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Sec 730] Increase RSA_generate_key modulus.
+* [Sec 2666] Use cryptographic random numbers for md5 key generation.
+* [Sec 2667] buffer overflow in crypto_recv().
+* [Sec 2668] buffer overflow in ctl_putdata().
+* [Sec 2669] buffer overflow in configure().
+* [Sec 2670] Missing return; from error clause.
+* [Sec 2671] vallen in extension fields are not validated.
+* [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs.
+* [Bug 2691] Wrong variable name in refclock_ripencc.c.
+(4.2.7p486-RC) 2014/12/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2687] RefClock 26/hpgps doesn't work at default line speed
+(4.2.7p485-RC) 2014/12/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present.
+(4.2.7p484-RC) 2014/12/11 Released by Harlan Stenn <stenn@ntp.org>
+(4.2.7p483) 2014/12/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2685] Better document the KOD file for sntp.
(4.2.7p482) 2014/12/02 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2641] sntp is installed in the wrong location in Solaris.
* [Bug 2678] nmea_control() now checks 'refclock_params()' result.
(4.2.7p481) 2014/11/22 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2314] Only enable PPS if kernel consumer binding succeeds.
-* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition.
+* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition.
* Rename pps_enable to hardpps_enable.
(4.2.7p480) 2014/11/21 Released by Harlan Stenn <stenn@ntp.org>
-* [Bug 2677] PATH_MAX isn't #define'd under Windows.
+* [Bug 2677] PATH_MAX isn't #define'd under Windows.
Regression from the patch fixing Bug 2639.
(4.2.7p479) 2014/11/15 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2651] Certificates with ASN timestamps w/ 4-digit years mis-parsed.
diff --git a/CommitLog b/CommitLog
index e8aa261..0e87846 100644
--- a/CommitLog
+++ b/CommitLog
@@ -1,3 +1,7882 @@
+ChangeSet@1.3320, 2015-04-07 04:28:16-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P2
+ TAG: NTP_4_2_8P2
+
+ ChangeLog@1.1633 +1 -0
+ NTP_4_2_8P2
+
+ ntpd/invoke-ntp.conf.texi@1.182 +1 -1
+ NTP_4_2_8P2
+
+ ntpd/invoke-ntp.keys.texi@1.178 +1 -1
+ NTP_4_2_8P2
+
+ ntpd/invoke-ntpd.texi@1.495 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.5man@1.216 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.5mdoc@1.216 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.html@1.173 +1 -1
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.man.in@1.216 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntp.conf.mdoc.in@1.216 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.5man@1.212 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.5mdoc@1.212 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.html@1.174 +1 -1
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.man.in@1.212 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntp.keys.mdoc.in@1.212 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntpd-opts.c@1.517 +245 -245
+ NTP_4_2_8P2
+
+ ntpd/ntpd-opts.h@1.516 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntpd.1ntpdman@1.324 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntpd.1ntpdmdoc@1.324 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntpd.html@1.168 +2 -2
+ NTP_4_2_8P2
+
+ ntpd/ntpd.man.in@1.324 +3 -3
+ NTP_4_2_8P2
+
+ ntpd/ntpd.mdoc.in@1.324 +2 -2
+ NTP_4_2_8P2
+
+ ntpdc/invoke-ntpdc.texi@1.492 +2 -2
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc-opts.c@1.510 +107 -107
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc-opts.h@1.509 +3 -3
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.1ntpdcman@1.323 +3 -3
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.323 +2 -2
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.html@1.336 +2 -2
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.man.in@1.323 +3 -3
+ NTP_4_2_8P2
+
+ ntpdc/ntpdc.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2
+
+ ntpq/invoke-ntpq.texi@1.498 +2 -2
+ NTP_4_2_8P2
+
+ ntpq/ntpq-opts.c@1.515 +106 -106
+ NTP_4_2_8P2
+
+ ntpq/ntpq-opts.h@1.513 +3 -3
+ NTP_4_2_8P2
+
+ ntpq/ntpq.1ntpqman@1.326 +3 -3
+ NTP_4_2_8P2
+
+ ntpq/ntpq.1ntpqmdoc@1.326 +2 -2
+ NTP_4_2_8P2
+
+ ntpq/ntpq.html@1.165 +2 -2
+ NTP_4_2_8P2
+
+ ntpq/ntpq.man.in@1.326 +3 -3
+ NTP_4_2_8P2
+
+ ntpq/ntpq.mdoc.in@1.326 +2 -2
+ NTP_4_2_8P2
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.494 +2 -2
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.512 +68 -68
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.511 +3 -3
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.323 +3 -3
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.323 +2 -2
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.html@1.163 +1 -1
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.man.in@1.323 +3 -3
+ NTP_4_2_8P2
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2
+
+ packageinfo.sh@1.509 +2 -2
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.84 +3 -3
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.85 +2 -2
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.html@1.86 +1 -1
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.83 +3 -3
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.85 +2 -2
+ NTP_4_2_8P2
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.88 +1 -1
+ NTP_4_2_8P2
+
+ scripts/invoke-plot_summary.texi@1.105 +2 -2
+ NTP_4_2_8P2
+
+ scripts/invoke-summary.texi@1.105 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.315 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait-opts@1.51 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.312 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.313 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.html@1.332 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.man.in@1.312 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.313 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep-opts@1.53 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.91 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.91 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.html@1.104 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.man.in@1.91 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.92 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.104 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace-opts@1.53 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.91 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.92 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.html@1.105 +2 -2
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.man.in@1.91 +3 -3
+ NTP_4_2_8P2
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.93 +2 -2
+ NTP_4_2_8P2
+
+ scripts/plot_summary-opts@1.53 +2 -2
+ NTP_4_2_8P2
+
+ scripts/plot_summary.1plot_summaryman@1.103 +3 -3
+ NTP_4_2_8P2
+
+ scripts/plot_summary.1plot_summarymdoc@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/plot_summary.html@1.106 +2 -2
+ NTP_4_2_8P2
+
+ scripts/plot_summary.man.in@1.103 +3 -3
+ NTP_4_2_8P2
+
+ scripts/plot_summary.mdoc.in@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/summary-opts@1.53 +2 -2
+ NTP_4_2_8P2
+
+ scripts/summary.1summaryman@1.103 +3 -3
+ NTP_4_2_8P2
+
+ scripts/summary.1summarymdoc@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/summary.html@1.106 +2 -2
+ NTP_4_2_8P2
+
+ scripts/summary.man.in@1.103 +3 -3
+ NTP_4_2_8P2
+
+ scripts/summary.mdoc.in@1.103 +2 -2
+ NTP_4_2_8P2
+
+ scripts/update-leap/invoke-update-leap.texi@1.4 +1 -1
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap-opts@1.4 +2 -2
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.1update-leapman@1.4 +3 -3
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.4 +2 -2
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.html@1.4 +1 -1
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.man.in@1.4 +3 -3
+ NTP_4_2_8P2
+
+ scripts/update-leap/update-leap.mdoc.in@1.4 +2 -2
+ NTP_4_2_8P2
+
+ sntp/invoke-sntp.texi@1.492 +2 -2
+ NTP_4_2_8P2
+
+ sntp/sntp-opts.c@1.511 +159 -159
+ NTP_4_2_8P2
+
+ sntp/sntp-opts.h@1.509 +3 -3
+ NTP_4_2_8P2
+
+ sntp/sntp.1sntpman@1.327 +3 -3
+ NTP_4_2_8P2
+
+ sntp/sntp.1sntpmdoc@1.327 +2 -2
+ NTP_4_2_8P2
+
+ sntp/sntp.html@1.507 +2 -2
+ NTP_4_2_8P2
+
+ sntp/sntp.man.in@1.327 +3 -3
+ NTP_4_2_8P2
+
+ sntp/sntp.mdoc.in@1.327 +2 -2
+ NTP_4_2_8P2
+
+ util/invoke-ntp-keygen.texi@1.495 +2 -2
+ NTP_4_2_8P2
+
+ util/ntp-keygen-opts.c@1.513 +173 -173
+ NTP_4_2_8P2
+
+ util/ntp-keygen-opts.h@1.511 +3 -3
+ NTP_4_2_8P2
+
+ util/ntp-keygen.1ntp-keygenman@1.323 +3 -3
+ NTP_4_2_8P2
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.323 +2 -2
+ NTP_4_2_8P2
+
+ util/ntp-keygen.html@1.169 +2 -2
+ NTP_4_2_8P2
+
+ util/ntp-keygen.man.in@1.323 +3 -3
+ NTP_4_2_8P2
+
+ util/ntp-keygen.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2
+
+ChangeSet@1.3319, 2015-04-07 04:05:46-04:00, stenn@deacon.udel.edu
+ ntp-4.2.8p2
+
+ packageinfo.sh@1.508 +2 -2
+ ntp-4.2.8p2
+
+ChangeSet@1.3318, 2015-04-07 07:57:32+00:00, stenn@psp-fb1.ntp.org
+ NEWS update
+
+ NEWS@1.135 +4 -2
+ NEWS update
+
+ChangeSet@1.3314.1.3, 2015-04-03 03:56:38-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P2_RC3
+ TAG: NTP_4_2_8P2_RC3
+
+ ChangeLog@1.1629.1.3 +1 -0
+ NTP_4_2_8P2_RC3
+
+ ntpd/invoke-ntp.conf.texi@1.181 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/invoke-ntp.keys.texi@1.177 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/invoke-ntpd.texi@1.494 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.5man@1.215 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.5mdoc@1.215 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.html@1.172 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.man.in@1.215 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.conf.mdoc.in@1.215 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.5man@1.211 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.5mdoc@1.211 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.html@1.173 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.man.in@1.211 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntp.keys.mdoc.in@1.211 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd-opts.c@1.516 +7 -7
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd-opts.h@1.515 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.1ntpdman@1.323 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.1ntpdmdoc@1.323 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.html@1.167 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.man.in@1.323 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpd/ntpd.mdoc.in@1.323 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpdc/invoke-ntpdc.texi@1.491 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc-opts.c@1.509 +7 -7
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc-opts.h@1.508 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.1ntpdcman@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.html@1.335 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.man.in@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpdc/ntpdc.mdoc.in@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpq/invoke-ntpq.texi@1.497 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq-opts.c@1.514 +7 -7
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq-opts.h@1.512 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.1ntpqman@1.325 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.1ntpqmdoc@1.325 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.html@1.164 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.man.in@1.325 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpq/ntpq.mdoc.in@1.325 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.493 +2 -2
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.511 +7 -7
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.510 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.html@1.162 +1 -1
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.man.in@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ packageinfo.sh@1.507 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.83 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.84 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.html@1.85 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.82 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.84 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.87 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/invoke-plot_summary.texi@1.104 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/invoke-summary.texi@1.104 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.314 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.311 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.312 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.html@1.331 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.man.in@1.311 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.312 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.102 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep-opts@1.52 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.90 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.90 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.html@1.103 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.man.in@1.90 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.91 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.103 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace-opts@1.52 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.90 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.91 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.html@1.104 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.man.in@1.90 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.92 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary-opts@1.52 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.1plot_summaryman@1.102 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.1plot_summarymdoc@1.102 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.html@1.105 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.man.in@1.102 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/plot_summary.mdoc.in@1.102 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/summary-opts@1.52 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.1summaryman@1.102 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.1summarymdoc@1.102 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.html@1.105 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.man.in@1.102 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/summary.mdoc.in@1.102 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/invoke-update-leap.texi@1.3 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap-opts@1.3 +2 -2
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.1update-leapman@1.3 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.3 +1 -1
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.html@1.3 +6 -5
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.man.in@1.3 +3 -3
+ NTP_4_2_8P2_RC3
+
+ scripts/update-leap/update-leap.mdoc.in@1.3 +1 -1
+ NTP_4_2_8P2_RC3
+
+ sntp/invoke-sntp.texi@1.491 +2 -2
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp-opts.c@1.510 +7 -7
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp-opts.h@1.508 +3 -3
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.1sntpman@1.326 +3 -3
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.1sntpmdoc@1.326 +1 -1
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.html@1.506 +2 -2
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.man.in@1.326 +3 -3
+ NTP_4_2_8P2_RC3
+
+ sntp/sntp.mdoc.in@1.326 +1 -1
+ NTP_4_2_8P2_RC3
+
+ util/invoke-ntp-keygen.texi@1.494 +2 -2
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen-opts.c@1.512 +7 -7
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen-opts.h@1.510 +3 -3
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.1ntp-keygenman@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.html@1.168 +2 -2
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.man.in@1.322 +3 -3
+ NTP_4_2_8P2_RC3
+
+ util/ntp-keygen.mdoc.in@1.322 +1 -1
+ NTP_4_2_8P2_RC3
+
+ChangeSet@1.3314.1.2, 2015-04-03 03:35:54-04:00, stenn@deacon.udel.edu
+ [Bug 2763] Fix for different thresholds for forward and backward steps
+
+ ChangeLog@1.1629.1.2 +3 -0
+ [Bug 2763] Fix for different thresholds for forward and backward steps
+
+ ntpd/ntp_loopfilter.c@1.183 +2 -2
+ [Bug 2763] Fix for different thresholds for forward and backward steps
+
+ChangeSet@1.3314.1.1, 2015-04-03 01:16:34-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P2_RC2
+ TAG: NTP_4_2_8P2_RC2
+
+ ChangeLog@1.1629.1.1 +1 -0
+ NTP_4_2_8P2_RC2
+
+ ntpd/invoke-ntp.conf.texi@1.180 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpd/invoke-ntp.keys.texi@1.176 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpd/invoke-ntpd.texi@1.493 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.5man@1.214 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.5mdoc@1.214 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.html@1.171 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.man.in@1.214 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.conf.mdoc.in@1.214 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.5man@1.210 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.5mdoc@1.210 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.html@1.172 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.man.in@1.210 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntp.keys.mdoc.in@1.210 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd-opts.c@1.515 +7 -7
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd-opts.h@1.514 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.1ntpdman@1.322 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.1ntpdmdoc@1.322 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.html@1.166 +50 -26
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.man.in@1.322 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpd/ntpd.mdoc.in@1.322 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpdc/invoke-ntpdc.texi@1.490 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc-opts.c@1.508 +7 -7
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc-opts.h@1.507 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.1ntpdcman@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.html@1.334 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.man.in@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpdc/ntpdc.mdoc.in@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpq/invoke-ntpq.texi@1.496 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq-opts.c@1.513 +7 -7
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq-opts.h@1.511 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.1ntpqman@1.324 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.1ntpqmdoc@1.324 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.html@1.163 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.man.in@1.324 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpq/ntpq.mdoc.in@1.324 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.492 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.510 +7 -7
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.509 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.html@1.161 +1 -1
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.man.in@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ packageinfo.sh@1.506 +1 -1
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.82 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.83 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.html@1.84 +1 -1
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.81 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.83 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.86 +1 -1
+ NTP_4_2_8P2_RC2
+
+ scripts/invoke-plot_summary.texi@1.103 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/invoke-summary.texi@1.103 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.313 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait-opts@1.49 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.310 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.311 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.html@1.330 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.man.in@1.310 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.311 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep-opts@1.51 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.89 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.89 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.html@1.102 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.man.in@1.89 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.90 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.102 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace-opts@1.51 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.89 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.90 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.html@1.103 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.man.in@1.89 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.91 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary-opts@1.51 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.1plot_summaryman@1.101 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.1plot_summarymdoc@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.html@1.104 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.man.in@1.101 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/plot_summary.mdoc.in@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/summary-opts@1.51 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.1summaryman@1.101 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.1summarymdoc@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.html@1.104 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.man.in@1.101 +3 -3
+ NTP_4_2_8P2_RC2
+
+ scripts/summary.mdoc.in@1.101 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/invoke-update-leap.texi@1.2 +6 -5
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap-opts@1.2 +2 -2
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.1update-leapman@1.2 +7 -6
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.2 +6 -5
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.html@1.2 +48 -72
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.man.in@1.2 +7 -6
+ NTP_4_2_8P2_RC2
+
+ scripts/update-leap/update-leap.mdoc.in@1.2 +6 -5
+ NTP_4_2_8P2_RC2
+
+ sntp/invoke-sntp.texi@1.490 +2 -2
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp-opts.c@1.509 +7 -7
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp-opts.h@1.507 +3 -3
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.1sntpman@1.325 +3 -3
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.1sntpmdoc@1.325 +2 -2
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.html@1.505 +111 -135
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.man.in@1.325 +3 -3
+ NTP_4_2_8P2_RC2
+
+ sntp/sntp.mdoc.in@1.325 +2 -2
+ NTP_4_2_8P2_RC2
+
+ util/invoke-ntp-keygen.texi@1.493 +2 -2
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen-opts.c@1.511 +7 -7
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen-opts.h@1.509 +3 -3
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.1ntp-keygenman@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.html@1.167 +2 -2
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.man.in@1.321 +3 -3
+ NTP_4_2_8P2_RC2
+
+ util/ntp-keygen.mdoc.in@1.321 +2 -2
+ NTP_4_2_8P2_RC2
+
+ChangeSet@1.3314, 2015-04-03 02:36:18+00:00, stenn@psp-fb1.ntp.org
+ merge cleanup
+
+ NEWS@1.133 +6 -5
+ merge cleanup
+
+ChangeSet@1.3313, 2015-04-03 02:31:18+00:00, stenn@psp-fb1.ntp.org
+ merge cleanup
+
+ ChangeLog@1.1629 +3 -3
+ merge cleanup
+
+ChangeSet@1.3308.2.11, 2015-04-02 21:42:37+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2592] FLAG_TSTAMP_PPS cleanup for refclock_parse.c
+
+ ChangeLog@1.1625.2.9 +1 -0
+ [Bug 2592] FLAG_TSTAMP_PPS cleanup for refclock_parse.c
+
+ChangeSet@1.3308.2.10, 2015-04-02 20:17:55+00:00, stenn@psp-deb1.ntp.org
+ merge cleanup
+
+ ChangeLog@1.1625.2.8 +1 -3
+ merge cleanup
+
+ChangeSet@1.3308.2.9, 2015-04-02 21:41:22+02:00, jnperlin@nemesis.localnet
+ [Bug 2795] Cannot build without OpenSLL (on Win32).
+ fixed minor warning
+
+ ChangeLog@1.1625.2.7 +3 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32).
+ fixed minor warning
+
+ include/ntp_md5.h@1.10 +1 -1
+ [Bug 2795] Cannot build without OpenSLL (on Win32).
+ OpenSSL declares EVP_md5() as function without arguments; surrogate should do the same.
+
+ChangeSet@1.3308.6.2, 2015-04-02 07:45:04+00:00, stenn@psp-deb1.ntp.org
+ cleanup
+
+ ChangeLog@1.1625.6.3 +0 -2
+ cleanup
+
+ ChangeLog@1.1625.6.2 +6 -0
+
+ ntpd/invoke-ntpd.texi@1.492 +20 -3
+ [Bug 2788] New -G flag (force step once) cleanup.
+
+ ntpd/ntp_loopfilter.c@1.182 +17 -6
+ [Bug 2794] Clean up kernel clock status reports.
+ Trailing whitespace cleanup.
+
+ ntpd/ntpd-opts.c@1.514 +249 -249
+ Autogenerated file.
+
+ ntpd/ntpd-opts.h@1.513 +3 -3
+ Autogenerated file.
+
+ ntpd/ntpd.1ntpdman@1.321 +19 -5
+ Autogenerated file.
+
+ ntpd/ntpd.1ntpdmdoc@1.321 +17 -4
+ Autogenerated file.
+
+ ntpd/ntpd.man.in@1.321 +19 -5
+ Autogenerated file.
+
+ ntpd/ntpd.mdoc.in@1.321 +17 -4
+ Autogenerated file.
+
+ ntpd/ntpdbase-opts.def@1.29 +9 -6
+ [Bug 2788] New flag -G (force_step_once) - documentation cleanup.
+
+ChangeSet@1.3308.2.7, 2015-04-02 07:34:40+00:00, stenn@psp-deb1.ntp.org
+ Simple cleanup to html/build.html
+
+ ChangeLog@1.1625.2.5 +1 -0
+ Simple cleanup to html/build.html
+
+ html/build.html@1.28 +2 -2
+ Simple cleanup to html/build.html
+
+ChangeSet@1.3308.2.6, 2015-04-02 03:15:42+00:00, stenn@psp-fb1.ntp.org
+ typos
+
+ ChangeLog@1.1625.2.4 +4 -4
+ typos
+
+ChangeSet@1.3308.5.2, 2015-04-01 11:08:14+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ html/sntp.html@1.12 +3 -3
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/invoke-sntp.texi@1.489 +4 -3
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp-opts.c@1.508 +1 -1
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp-opts.def@1.47 +2 -1
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp-opts.h@1.506 +1 -1
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.1sntpman@1.324 +5 -4
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.1sntpmdoc@1.324 +4 -3
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.html@1.504 +136 -111
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.man.in@1.324 +5 -4
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/sntp.mdoc.in@1.324 +4 -3
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ChangeSet@1.3308.5.1, 2015-04-01 10:44:24+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ ChangeLog@1.1625.5.1 +3 -0
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ sntp/main.c@1.95 +21 -1
+ [Bug 2798] sntp should decode and display the leap indicator
+
+ChangeSet@1.3308.4.1, 2015-03-30 20:14:46+02:00, jnperlin@hydra.(none)
+ [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys on big-endian machines
+
+ ChangeLog@1.1625.4.1 +3 -0
+ [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys on big-endian machines
+
+ util/ntp-keygen.c@1.104 +4 -4
+ [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys on big-endian machines
+
+ChangeSet@1.3308.3.1, 2015-03-30 19:39:17+02:00, jnperlin@nemesis.localnet
+ [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32
+
+ ChangeLog@1.1625.3.1 +2 -0
+ [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32
+
+ ports/winnt/libntp/getclock.c@1.5 +2 -0
+ [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32
+ make sure 'init_win_precise_time()' gets called
+
+ChangeSet@1.3308.2.4, 2015-03-30 19:10:12+02:00, jnperlin@nemesis.localnet
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ChangeLog@1.1625.2.2 +3 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/libntp/arc4wrap.c@1.1 +84 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/libntp/arc4wrap.c@1.0 +0 -0
+
+ ports/winnt/vs2005/libntp.vcproj@1.24 +4 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.52 +6 -2
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.6 +1 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.4 +6 -0
+ [Bug 2795] Cannot build without OpenSLL (on Win32)
+ Provided a Win32 specific wrapper around libevent/arc4random.c
+
+ChangeSet@1.3305.3.8, 2015-03-30 15:55:43+02:00, martin@pc-martin.(none)
+ [Bug 2794] Don't let reports on normal kernel status changes look like errors.
+
+ ChangeLog@1.1622.3.8 +2 -0
+ [Bug 2794] Don't let reports on normal kernel status changes look like errors.
+
+ ntpd/ntp_loopfilter.c@1.181 +30 -19
+ [Bug 2794] Don't let reports on normal kernel status changes look like errors.
+
+ChangeSet@1.3305.3.7, 2015-03-30 11:23:48+02:00, martin@pc-martin.(none)
+ [Bug 2788] New flag -G (force_step_once)
+
+ ChangeLog@1.1622.3.7 +1 -0
+ [Bug 2788] New flag -G (force_step_once)
+
+ include/ntpd.h@1.185.1.1 +4 -3
+ [Bug 2788] Support new flag -G (force_step_once)
+ Removed trailing whitespace.
+
+ ntpd/cmd_args.c@1.62 +6 -3
+ [Bug 2788] New flag -G (force_step_once)
+ Removed trailing whitespace.
+
+ ntpd/ntp_loopfilter.c@1.180 +21 -15
+ [Bug 2788] New flag -G (force_step_once)
+ Removed trailing whitespace.
+
+ ntpd/ntpd-opts.c@1.511.1.1 +255 -225
+ [Bug 2788] New flag -G (force_step_once)
+
+ ntpd/ntpd-opts.h@1.510.1.1 +36 -29
+ [Bug 2788] New flag -G (force_step_once)
+
+ ntpd/ntpdbase-opts.def@1.28 +17 -2
+ [Bug 2788] New flag -G (force_step_once)
+ Removed trailing whitespace.
+
+ChangeSet@1.3308.1.3, 2015-03-30 09:11:33+00:00, stenn@psp-fb1.ntp.org
+ Start the RC cycle for ntp-4.2.8p2
+
+ NEWS@1.130.1.2 +82 -1
+ Start the RC cycle for ntp-4.2.8p2
+
+ChangeSet@1.3308.2.3, 2015-03-30 04:48:27-04:00, stenn@deacon.udel.edu
+ NTP_4_2_8P2_RC1
+ TAG: NTP_4_2_8P2_RC1
+
+ ChangeLog@1.1625.2.1 +1 -0
+ NTP_4_2_8P2_RC1
+
+ ntpd/invoke-ntp.conf.texi@1.179 +1 -1
+ NTP_4_2_8P2_RC1
+
+ ntpd/invoke-ntp.keys.texi@1.175 +1 -1
+ NTP_4_2_8P2_RC1
+
+ ntpd/invoke-ntpd.texi@1.491 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.5man@1.213 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.5mdoc@1.213 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.html@1.170 +13 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.man.in@1.213 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.conf.mdoc.in@1.213 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.5man@1.209 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.5mdoc@1.209 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.html@1.171 +1 -1
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.man.in@1.209 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntp.keys.mdoc.in@1.209 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd-opts.c@1.512 +239 -239
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd-opts.h@1.511 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.1ntpdman@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.1ntpdmdoc@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.html@1.165 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.man.in@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpd/ntpd.mdoc.in@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpdc/invoke-ntpdc.texi@1.489 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc-opts.c@1.507 +107 -107
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc-opts.h@1.506 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.1ntpdcman@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.html@1.333 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.man.in@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpdc/ntpdc.mdoc.in@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpq/invoke-ntpq.texi@1.495 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq-opts.c@1.512 +106 -106
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq-opts.h@1.510 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.1ntpqman@1.323 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.1ntpqmdoc@1.323 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.html@1.162 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.man.in@1.323 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpq/ntpq.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.491 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.509 +68 -68
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.508 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.html@1.160 +1 -1
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.man.in@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ packageinfo.sh@1.505 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.81 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.82 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.html@1.83 +1 -1
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.80 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.82 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.85 +1 -1
+ NTP_4_2_8P2_RC1
+
+ scripts/invoke-plot_summary.texi@1.102 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/invoke-summary.texi@1.102 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.312 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait-opts@1.48 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.309 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.310 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.html@1.329 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.man.in@1.309 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.310 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.88 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.88 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.html@1.101 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.man.in@1.88 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.89 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.101 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.88 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.89 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.html@1.102 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.man.in@1.88 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.90 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.1plot_summaryman@1.100 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.1plot_summarymdoc@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.html@1.103 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.man.in@1.100 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/plot_summary.mdoc.in@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/summary-opts@1.50 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.1summaryman@1.100 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.1summarymdoc@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.html@1.103 +2 -2
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.man.in@1.100 +3 -3
+ NTP_4_2_8P2_RC1
+
+ scripts/summary.mdoc.in@1.100 +2 -2
+ NTP_4_2_8P2_RC1
+
+ sntp/invoke-sntp.texi@1.488 +2 -2
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp-opts.c@1.507 +159 -159
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp-opts.h@1.505 +3 -3
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.1sntpman@1.323 +3 -3
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.1sntpmdoc@1.323 +2 -2
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.html@1.503 +2 -2
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.man.in@1.323 +3 -3
+ NTP_4_2_8P2_RC1
+
+ sntp/sntp.mdoc.in@1.323 +2 -2
+ NTP_4_2_8P2_RC1
+
+ util/invoke-ntp-keygen.texi@1.492 +2 -2
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen-opts.c@1.510 +173 -173
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen-opts.h@1.508 +3 -3
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.1ntp-keygenman@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.html@1.166 +2 -2
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.man.in@1.320 +3 -3
+ NTP_4_2_8P2_RC1
+
+ util/ntp-keygen.mdoc.in@1.320 +2 -2
+ NTP_4_2_8P2_RC1
+
+ChangeSet@1.3308.2.2, 2015-03-30 04:25:58-04:00, stenn@deacon.udel.edu
+ Begin 4.2.8p2-RC1
+
+ packageinfo.sh@1.504 +1 -1
+ Begin 4.2.8p2-RC1
+
+ChangeSet@1.3308.2.1, 2015-03-30 08:18:35+00:00, stenn@psp-fb1.ntp.org
+ Start the RC cycle for ntp-4.2.8p2
+
+ NEWS@1.130.1.1 +49 -0
+ Start the RC cycle for ntp-4.2.8p2
+
+ChangeSet@1.3311, 2015-03-29 05:05:41+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2769] cleannup for update-leap
+
+ ChangeLog@1.1627 +1 -0
+ [Bug 2769] cleannup for update-leap
+
+ChangeSet@1.3310, 2015-03-29 04:10:31+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2769] cleannup for update-leap
+
+ NEWS@1.131 +8 -0
+ [Bug 2769] cleannup for update-leap
+
+ scripts/update-leap/Makefile.am@1.3 +1 -0
+ [Bug 2769] cleannup for update-leap
+
+ scripts/update-leap/update-leap-opts.def@1.2 +4 -3
+ [Bug 2769] cleannup for update-leap
+
+ChangeSet@1.3308, 2015-03-29 01:49:10+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ ChangeLog@1.1625 +1 -0
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ include/ntpd.h@1.186 +1 -0
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ ntpd/ntp_peer.c@1.154 +20 -0
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ ntpd/ntpd.c@1.159 +1 -0
+ [Bug 2346] "graceful termination" signals do not do peer cleanup
+
+ChangeSet@1.3305.3.6, 2015-03-25 17:32:25+01:00, martin@pc-martin.(none)
+ [Bug 2592] Account for PPS sources which can provide an accurate absolute time stamp, and status information.
+
+ ChangeLog@1.1622.3.6 +2 -0
+ [Bug 2592] Account for PPS sources which can provide an accurate absolute time stamp, and status information.
+
+ include/ntp.h@1.213 +2 -1
+ New flag FLAG_TSTAMP_PPS.
+
+ ntpd/ntp_proto.c@1.353.1.2 +2 -1
+ [Bug 2592] Account for PPS sources which can provide an accurate absolute time stamp, and status information.
+
+ ntpd/refclock_parse.c@1.78 +2 -2
+ [Bug 2592] Parse driver can return absolute timestamp with PPS, and status information.
+
+ChangeSet@1.3305.3.5, 2015-03-25 17:24:59+01:00, martin@pc-martin.(none)
+ Fixed indention and removed trailing whitespace.
+
+ ChangeLog@1.1622.3.5 +1 -0
+ Fixed indention and removed trailing whitespace.
+
+ include/ntp.h@1.212 +4 -4
+ Fixed indention.
+
+ include/parse_conf.h@1.7 +6 -6
+ Fixed indention.
+
+ ntpd/ntp_proto.c@1.353.1.1 +27 -27
+ Removed trailing whitespace.
+
+ ntpd/refclock_parse.c@1.77 +16 -16
+ Fixed indention.
+
+ChangeSet@1.3305.3.4, 2015-03-22 07:59:12+00:00, stenn@psp-fb1.ntp.org
+ merge cleanup
+
+ ChangeLog@1.1622.3.4 +0 -1
+ merge cleanup
+
+ChangeSet@1.3305.5.3, 2015-03-22 07:24:07+00:00, stenn@psp-fb1.ntp.org
+ Bug 2791 -> Bug 2789
+
+ ChangeLog@1.1622.5.3 +1 -1
+ Bug 2791 -> Bug 2789
+
+ChangeSet@1.3305.5.2, 2015-03-22 06:59:06+00:00, stenn@psp-fb1.ntp.org
+ Merge cleanup
+
+ ChangeLog@1.1622.5.2 +22 -22
+ Merge cleanup
+
+ChangeSet@1.3305.4.2, 2015-03-22 03:48:52+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2769] New script: update-leap
+
+ .point-changed-filelist@1.26 +7 -0
+ [Bug 2769] New script: update-leap
+
+ scripts/update-leap/Makefile.am@1.2 +2 -1
+ [Bug 2769] New script: update-leap
+
+ChangeSet@1.3305.4.1, 2015-03-22 03:01:33+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2769] New script: update-leap
+
+ BitKeeper/etc/ignore@1.86 +1 -0
+ added Makefile.in
+
+ ChangeLog@1.1622.4.1 +1 -0
+ [Bug 2769] New script: update-leap
+
+ configure.ac@1.585 +8 -7
+ [Bug 2769] New script: update-leap
+
+ scripts/Makefile.am@1.40 +1 -0
+ [Bug 2769] New script: update-leap
+
+ scripts/update-leap/Makefile.am@1.1 +95 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/Makefile.am
+
+ scripts/update-leap/Makefile.am@1.0 +0 -0
+
+ scripts/update-leap/invoke-update-leap.menu@1.1 +1 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/invoke-update-leap.menu
+
+ scripts/update-leap/invoke-update-leap.menu@1.0 +0 -0
+
+ scripts/update-leap/invoke-update-leap.texi@1.1 +169 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/invoke-update-leap.texi
+
+ scripts/update-leap/invoke-update-leap.texi@1.0 +0 -0
+
+ scripts/update-leap/update-leap@1.1 +434 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap
+
+ scripts/update-leap/update-leap@1.0 +0 -0
+
+ scripts/update-leap/update-leap-opts@1.1 +72 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap-opts
+
+ scripts/update-leap/update-leap-opts@1.0 +0 -0
+
+ scripts/update-leap/update-leap-opts.def@1.1 +162 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap-opts.def
+
+ scripts/update-leap/update-leap-opts.def@1.0 +0 -0
+
+ scripts/update-leap/update-leap.1update-leapman@1.1 +168 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.1update-leapman
+
+ scripts/update-leap/update-leap.1update-leapman@1.0 +0 -0
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.1 +133 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.1update-leapmdoc
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.0 +0 -0
+
+ scripts/update-leap/update-leap.html@1.1 +297 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.html
+
+ scripts/update-leap/update-leap.html@1.0 +0 -0
+
+ scripts/update-leap/update-leap.man.in@1.1 +168 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.man.in
+
+ scripts/update-leap/update-leap.man.in@1.0 +0 -0
+
+ scripts/update-leap/update-leap.mdoc.in@1.1 +133 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.mdoc.in
+
+ scripts/update-leap/update-leap.mdoc.in@1.0 +0 -0
+
+ scripts/update-leap/update-leap.texi@1.1 +43 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2769/scripts/update-leap/update-leap.texi
+
+ scripts/update-leap/update-leap.texi@1.0 +0 -0
+
+ sntp/loc/darwin@1.3 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/debian@1.4 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/freebsd@1.6 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/legacy@1.7 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/netbsd@1.4 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/loc/solaris@1.7 +1 -0
+ [Bug 2769] New script: update-leap
+
+ sntp/m4/ntp_locinfo.m4@1.18 +6 -0
+ [Bug 2769] New script: update-leap
+
+ChangeSet@1.3305.3.1, 2015-03-20 13:03:38+01:00, burnicki@pc-martin4.
+ [Bug 2790] If ntpd sets the Windows MM timer highest resolution then pause
+ briefly before measuring system clock precision to yield correct results.
+
+ ChangeLog@1.1622.3.1 +3 -1
+ [Bug 2790] If ntpd sets the Windows MM timer highest resolution then pause
+ briefly before measuring system clock precision to yield correct results.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.65 +4 -0
+ [Bug 2790] If ntpd sets the Windows MM timer highest resolution then pause
+ briefly before measuring system clock precision to yield correct results.
+
+ChangeSet@1.3305.2.6, 2015-03-20 11:47:15+01:00, martin@pc-martin.(none)
+ [Bug 2791] Quiet compiler warnings from libevent.
+
+ ChangeLog@1.1622.2.6 +1 -0
+ [Bug 2791] Quiet compiler warnings from libevent.
+
+ sntp/libevent/evthread-internal.h@1.8 +2 -2
+ [Bug 2791] Fixed function prototypes to quiet compiler warnings.
+
+ChangeSet@1.3305.2.5, 2015-03-20 11:36:15+01:00, martin@pc-martin.(none)
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ ChangeLog@1.1622.2.5 +4 -3
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ include/parse.h@1.12 +3 -3
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ libparse/clk_meinberg.c@1.14 +7 -4
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ libparse/clk_rawdcf.c@1.20 +3 -2
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ libparse/clk_schmid.c@1.13 +3 -3
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ libparse/parse.c@1.19 +1 -1
+ Quiet compiler warning.
+
+ ntpd/refclock_parse.c@1.76 +1 -1
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+
+ parseutil/dcfd.c@1.28 +26 -25
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+ Removed trailing whitespace.
+
+ parseutil/testdcf.c@1.10 +11 -10
+ [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+ Removed trailing whitespace and fixed indention.
+
+ChangeSet@1.3305.2.4, 2015-03-19 17:00:30+01:00, martin@pc-martin.(none)
+ Added a comment from Juergen Perlinger in ntp_date.c to make the code clearer.
+
+ ChangeLog@1.1622.2.4 +1 -0
+ Added a comment from Juergen Perlinger in ntp_date.c to make the code clearer.
+
+ libntp/ntp_calendar.c@1.15 +40 -34
+ Added a comment from Juergen Perlinger to make the code clearer.
+ Removed trailing whitespace.
+
+ChangeSet@1.3305.2.3, 2015-03-19 16:52:05+01:00, martin@pc-martin.(none)
+ Use predefined function types for parse driver functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast parse conversion results to appropriate types to avoid compiler warnings.
+ Let ioctl() for Windows accept a (void *) to avoid compiler warnings when called with pointers to different types.
+
+ ChangeLog@1.1622.2.3 +7 -0
+ Use predefined function types for parse driver functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast parse conversion results to appropriate types to avoid compiler warnings.
+ Let ioctl() for Windows accept a (void *) to avoid compiler warnings when called with pointers to different types.
+
+ include/binio.h@1.6 +10 -0
+ Added macros casting the result of the conversion function to a dedicated with to avoid compiler warnings.
+
+ include/mbg_gps166.h@1.13 +1 -1
+ Use specific data type with mbg_csum() to avoid compiler warnings.
+
+ include/parse.h@1.11 +15 -11
+ Introduced some dedicated function types simplifying use with function pointers.
+ Let parse input functions expect a char instead of an unsigned int since chars are used anyway.
+ This helps to avoid compiler warnings.
+
+ libparse/clk_computime.c@1.12 +10 -10
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_dcf7000.c@1.12 +8 -7
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_hopf6021.c@1.11 +21 -20
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_meinberg.c@1.13 +20 -19
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast conversion results to appropriate types to avoid compiler warnings.
+
+ libparse/clk_rawdcf.c@1.19 +8 -7
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast to appropriate types to avoid compiler warnings.
+
+ libparse/clk_rcc8000.c@1.11 +17 -16
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_schmid.c@1.12 +9 -9
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_sel240x.c@1.4 +5 -11
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast to appropriate types to avoid compiler warnings.
+
+ libparse/clk_trimtaip.c@1.12 +8 -7
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_trimtsip.c@1.13 +18 -18
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast conversion results to appropriate types to avoid compiler warnings.
+ Use commonly defined constants to handle GPS week number wraparounds.
+
+ libparse/clk_varitext.c@1.11 +6 -5
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/clk_wharton.c@1.10 +7 -4
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+
+ libparse/data_mbg.c@1.15 +36 -36
+ Cast conversion results to appropriate types to avoid compiler warnings.
+
+ libparse/gpstolfp.c@1.12 +1 -1
+ Type cast to avoid compiler warning.
+
+ libparse/parse.c@1.18 +14 -14
+ Use predefined function types for functions used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast conversion results to appropriate types to avoid compiler warnings.
+
+ ntpd/refclock_parse.c@1.75 +49 -48
+ Cast conversion results to appropriate types to avoid compiler warnings.
+
+ ports/winnt/include/termios.h@1.17 +1 -1
+ Changed the prototype for ioctl() to accept a (void *) to avoid compiler warnings when called with pointers to different types.
+
+ ports/winnt/libntp/termios.c@1.30 +2 -1
+ Let ioctl() accept a (void *) to avoid compiler warnings when called with pointers to different types.
+
+ChangeSet@1.3305.1.19, 2015-03-19 07:54:24+00:00, stenn@psp-deb1.ntp.org
+ ntp_proto.c, ChangeLog:
+ [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+ [Sec 2781] Authentication doesn't protect symmetric associations against DoS attacks.
+
+ ChangeLog@1.1622.1.16 +3 -0
+ [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+ [Sec 2781] Authentication doesn't protect symmetric associations against DoS attacks.
+
+ ntpd/ntp_proto.c@1.354 +16 -14
+ [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+ [Sec 2781] Authentication doesn't protect symmetric associations against DoS attacks.
+
+ChangeSet@1.3305.1.18, 2015-03-16 09:17:42+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ChangeLog@1.1622.1.15 +1 -0
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ include/ntp.h@1.211 +13 -11
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ include/ntpd.h@1.185 +2 -1
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/invoke-ntp.conf.texi@1.178 +15 -2
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/keyword-gen-utd@1.22 +1 -1
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/keyword-gen.c@1.27 +2 -0
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.5man@1.212 +19 -4
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.5mdoc@1.212 +18 -3
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.def@1.15 +16 -1
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.man.in@1.212 +19 -4
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp.conf.mdoc.in@1.212 +18 -3
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_config.c@1.323 +8 -0
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_keyword.h@1.24 +492 -483
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_loopfilter.c@1.179 +27 -5
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_parser.c@1.90 +803 -797
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_parser.h@1.56 +81 -77
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ ntpd/ntp_parser.y@1.83 +4 -0
+ [Bug 2763] Allow different thresholds for forward and backward steps
+
+ChangeSet@1.3305.2.2, 2015-03-13 10:28:32+01:00, martin@pc-martin.(none)
+ Removed non-ASCII characters from some copyright comments.
+ Removed trailing whitespace.
+ Updated definitions for Meinberg clocks from current Meinberg header files. Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Account for updated definitions pulled from Meinberg header files.
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Replaced some constant numbers by defines from ntp_calendar.h
+ Modified creation of parse-specific variables for Meinberg devices in gps16x_message().
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling if the time status shall be printed.
+
+ ChangeLog@1.1622.2.2 +12 -0
+ Removed non-ASCII characters from some copyright comments.
+ Removed trailing whitespace.
+ Updated definitions for Meinberg clocks from current Meinberg header files. Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Account for updated definitions pulled from Meinberg header files.
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Replaced some constant numbers by defines from ntp_calendar.h
+ Modified creation of parse-specific variables for Meinberg devices in gps16x_message().
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling if the time status shall be printed.
+
+ include/mbg_gps166.h@1.12 +841 -408
+ Updated definitions for Meinberg clocks from current Meinberg header files. Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Updated prototype for mbg_tm_str() which now takes one more parameter.
+
+ include/ntp_calendar.h@1.17 +4 -2
+ Added definitions for DAYSPERWEEK and SECSPERWEEK.
+
+ include/parse.h@1.10 +14 -7
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+ Moved a few definitions from gpstolfp.c here so they can also be used in other c modules.
+
+ include/parse_conf.h@1.6 +1 -1
+ Removed non-ASCII characters from copyright comment.
+
+ kernel/sys/parsestreams.h@1.8 +1 -1
+ Removed non-ASCII characters from copyright comment.
+
+ libparse/clk_computime.c@1.11 +23 -23
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_dcf7000.c@1.11 +7 -7
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_meinberg.c@1.12 +71 -70
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_rawdcf.c@1.18 +12 -12
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_schmid.c@1.11 +7 -7
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_trimtaip.c@1.11 +5 -5
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_trimtsip.c@1.12 +13 -13
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_varitext.c@1.10 +38 -38
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/clk_wharton.c@1.9 +1 -1
+ Fixed a typo.
+
+ libparse/data_mbg.c@1.14 +39 -36
+ Account for updated definitions pulled from Meinberg header files.
+ Updated definitions for Meinberg clocks from current Meinberg header files. Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Replaced some constant numbers by defines from ntp_calendar.h.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling if the time status shall be printed.
+
+ libparse/gpstolfp.c@1.11 +4 -6
+ Moved some commonly used constants to parse.h.
+ Removed duplicate defines and use those in ntp_calendar.h.
+ Also replaced some constant numbers by defines from ntp_calendar.h.
+
+ libparse/parse.c@1.17 +46 -46
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/parse_conf.c@1.11 +2 -2
+ Removed non-ASCII characters from copyright comment.
+
+ libparse/parsesolaris.c@1.12 +55 -55
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/parsestreams.c@1.8 +63 -63
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+
+ libparse/trim_info.c@1.6 +1 -1
+ Removed non-ASCII characters from copyright comment.
+
+ ntpd/refclock_parse.c@1.74 +326 -295
+ Removed non-ASCII characters from copyright comment.
+ Removed trailing whitespace.
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified creation of parse-specific variables for Meinberg devices in gps16x_message().
+
+ parseutil/dcfd.c@1.27 +2 -2
+ Removed non-ASCII characters from copyright comment.
+
+ parseutil/testdcf.c@1.9 +2 -2
+ Removed non-ASCII characters from copyright comment.
+
+ChangeSet@1.3305.1.17, 2015-03-10 11:21:46+00:00, stenn@psp-fb1.ntp.org
+ merge cleanup
+
+ ChangeLog@1.1622.1.14 +1 -3
+ merge cleanup
+
+ ntpd/ntp_loopfilter.c@1.178 +5 -2
+ merge cleanup
+
+ChangeSet@1.3305.2.1, 2015-03-10 10:48:25+01:00, martin@pc-martin.(none)
+ Fixed loops and decoding of Meinberg GPS satellite info.
+
+ ChangeLog@1.1622.2.1 +1 -0
+ Fixed loops and decoding of Meinberg GPS satellite info.
+
+ libparse/data_mbg.c@1.13 +3 -3
+ Fixed loops handling Meinberg GPS satellite info.
+
+ ntpd/refclock_parse.c@1.73 +44 -68
+ Fixed loops and decoding of Meinberg GPS satellite info.
+
+ChangeSet@1.3305.1.16, 2015-03-09 06:36:19-04:00, murray@pogo.udel.edu
+ ChangeLog, ntp_loopfilter.c:
+ Fix for bug 2774
+
+ ChangeLog@1.1622.1.13 +3 -0
+ Fix for bug 2774
+
+ ntpd/ntp_loopfilter.c@1.177 +4 -1
+ Fix for bug 2774
+
+ChangeSet@1.3305.1.15, 2015-03-05 10:17:02+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ ChangeLog@1.1622.1.12 +1 -0
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ configure.ac@1.584 +24 -22
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ sntp/libopts/m4/libopts.m4@1.33 +12 -12
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ sntp/m4/ntp_libntp.m4@1.29 +4 -4
+ [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
+
+ChangeSet@1.3305.1.14, 2015-03-04 11:16:31+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2775] ntp-keygen.c fails to compile under Windows
+
+ ChangeLog@1.1622.1.11 +1 -0
+ [Bug 2775] ntp-keygen.c fails to compile under Windows.
+
+ util/ntp-keygen.c@1.103 +7 -1
+ [Bug 2775] ntp-keygen.c fails to compile under Windows
+
+ChangeSet@1.3305.1.13, 2015-03-01 21:46:56-05:00, stenn@pogo.udel.edu
+ cleanup
+
+ ChangeLog@1.1622.1.10 +1 -2
+ cleanup
+
+ChangeSet@1.3305.1.12, 2015-03-01 02:50:18-05:00, murray@pogo.udel.edu
+ refclock_palisade.h, ChangeLog, refclock_palisade.c:
+ Fix bug 2773 - early leap from Palisade/Thunderbolt
+
+ ChangeLog@1.1622.1.9 +2 -0
+ Fix bug 2773 - early leap from Palisade/Thunderbolt
+
+ ntpd/refclock_palisade.c@1.42 +8 -2
+ Fix bug 2773 - early leap from Palisade/Thunderbolt
+
+ ntpd/refclock_palisade.h@1.15 +1 -0
+ Fix bug 2773 - early leap from Palisade/Thunderbolt
+
+ChangeSet@1.3305.1.11, 2015-02-28 12:12:13+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ util/Makefile.am@1.78 +1 -1
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ChangeSet@1.3305.1.10, 2015-02-28 12:04:02+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2771] nonvolatile value is documented in wrong units
+
+ ChangeLog@1.1622.1.8 +1 -0
+ [Bug 2771] nonvolatile value is documented in wrong units
+
+ html/miscopt.html@1.80 +2 -2
+ [Bug 2771] nonvolatile value is documented in wrong units
+
+ChangeSet@1.3305.1.9, 2015-02-28 11:34:24+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2767] ntp-keygen -M should symlink to ntp.keys
+
+ ChangeLog@1.1622.1.7 +1 -0
+ [Bug 2767] ntp-keygen -M should symlink to ntp.keys
+
+ util/ntp-keygen.c@1.102 +6 -2
+ [Bug 2767] ntp-keygen -M should symlink to ntp.keys
+
+ChangeSet@1.3305.1.8, 2015-02-28 11:28:04+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2766] ntp-keygen output files should not be world-readable
+
+ ChangeLog@1.1622.1.6 +1 -0
+ [Bug 2766] ntp-keygen output files should not be world-readable
+
+ util/ntp-keygen.c@1.101 +5 -1
+ [Bug 2766] ntp-keygen output files should not be world-readable
+
+ChangeSet@1.3305.1.7, 2015-02-28 11:18:57+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq
+
+ ChangeLog@1.1622.1.5 +1 -0
+ [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq
+
+ ntpd/ntp_control.c@1.196 +56 -51
+ [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq
+
+ChangeSet@1.3305.1.6, 2015-02-28 09:47:20+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2757] Quiet compiler warnings.
+
+ lib/isc/inet_ntop.c@1.14 +1 -0
+ [Bug 2757] Quiet compiler warnings.
+
+ lib/isc/log.c@1.8 +12 -12
+ [Bug 2757] Quiet compiler warnings.
+
+ ntpd/ntp_leapsec.c@1.16 +6 -6
+ [Bug 2757] Quiet compiler warnings.
+
+ parseutil/dcfd.c@1.26 +7 -0
+ [Bug 2757] Quiet compiler warnings.
+
+ sntp/libevent/include/event2/event.h@1.11 +4 -0
+ [Bug 2757] Quiet compiler warnings.
+
+ChangeSet@1.3305.1.5, 2015-02-28 09:11:24+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM
+
+ ChangeLog@1.1622.1.4 +1 -0
+ [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM
+
+ configure.ac@1.583 +0 -2
+ [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM
+
+ include/ntp_fp.h@1.32 +4 -1
+ [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM
+
+ChangeSet@1.3305.1.4, 2015-02-25 07:58:47+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ BitKeeper/deleted/fd/jitter.h~11d7c056cb18e28@1.5 +0 -0
+ Delete: util/jitter.h
+
+ ChangeLog@1.1622.1.3 +1 -0
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ util/jitter.c@1.11 +1 -2
+ [Bug 2751] jitter.h has stale copies of l_fp macros
+
+ChangeSet@1.3305.1.3, 2015-02-21 05:56:16-05:00, stenn@deacon.udel.edu
+ Update triggers for bk-6
+
+ BitKeeper/triggers/post-incoming.license-warn@1.9 +3 -0
+ Update triggers for bk-6
+
+ BitKeeper/triggers/pre-resolve.license-chk@1.10 +3 -0
+ Update triggers for bk-6
+
+ BitKeeper/triggers/send@1.16 +2 -2
+ Update triggers for bk-6
+
+ChangeSet@1.3305.1.2, 2015-02-21 10:35:38+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2757] Quiet compiler warnings
+
+ ChangeLog@1.1622.1.2 +1 -0
+ [Bug 2757] Quiet compiler warnings
+
+ lib/isc/result.c@1.4 +6 -6
+ [Bug 2757] Quiet compiler warnings
+
+ lib/isc/unix/file.c@1.7 +3 -3
+ [Bug 2757] Quiet compiler warnings
+
+ lib/isc/unix/ifiter_ioctl.c@1.32.1.1 +4 -0
+ [Bug 2757] Quiet compiler warnings
+
+ lib/isc/unix/net.c@1.19 +2 -1
+ [Bug 2757] Quiet compiler warnings
+
+ libntp/work_fork.c@1.13 +1 -1
+ [Bug 2757] Quiet compiler warnings
+
+ ntpd/ntp_crypto.c@1.174 +1 -1
+ [Bug 2757] Quiet compiler warnings
+
+ChangeSet@1.3305.1.1, 2015-02-21 09:51:32+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL.
+
+ ChangeLog@1.1622.1.1 +1 -0
+ [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL.
+
+ scripts/lib/NTP/Util.pm@1.3 +15 -4
+ [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL.
+
+ChangeSet@1.3306, 2015-02-21 09:28:08+00:00, stenn@psp-fb1.ntp.org
+ [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument
+
+ ChangeLog@1.1623 +1 -0
+ [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument
+
+ lib/isc/unix/ifiter_getifaddrs.c@1.14 +3 -0
+ [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument
+
+ lib/isc/unix/ifiter_ioctl.c@1.33 +12 -2
+ [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument
+
+ChangeSet@1.3302.1.1, 2015-02-21 07:15:54+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2728] See if C99-style structure initialization works
+
+ ChangeLog@1.1620.1.1 +3 -0
+ [Bug 2728] See if C99-style structure initialization works
+
+ configure.ac@1.582 +1 -0
+ [Bug 2728] See if C99-style structure initialization works
+
+ ntpq/ntpq-subs.c@1.104 +1 -1
+ [Bug 2728] See if C99-style structure initialization works
+
+ ports/winnt/include/config.h@1.111 +1 -1
+ [Bug 2728] See if C99-style structure initialization works
+
+ sntp/m4/ax_c99_struct_init.m4@1.1 +59 -0
+ BitKeeper file /home/stenn/ntp-stable-2728/sntp/m4/ax_c99_struct_init.m4
+
+ sntp/m4/ax_c99_struct_init.m4@1.0 +0 -0
+
+ChangeSet@1.3304, 2015-02-11 09:08:51+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ ChangeLog@1.1621 +3 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ChangeSet@1.3303, 2015-02-11 09:05:59+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ BitKeeper/deleted/5b/README~3a69bb76c676898e@1.7 +0 -0
+ Delete: sntp/libevent/README
+
+ sntp/libevent/ChangeLog@1.9 +726 -60
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/Makefile.am@1.13 +3 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/README.md@1.1 +318 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/README.md
+
+ sntp/libevent/README.md@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/getopt.c@1.1 +149 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/WIN32-Code/getopt.c
+
+ sntp/libevent/WIN32-Code/getopt.c@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/getopt.h@1.1 +33 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/WIN32-Code/getopt.h
+
+ sntp/libevent/WIN32-Code/getopt.h@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/getopt_long.c@1.1 +233 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/WIN32-Code/getopt_long.c
+
+ sntp/libevent/WIN32-Code/getopt_long.c@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/nmake/event2/event-config.h@1.2 +2 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/WIN32-Code/tree.h@1.2 +0 -677
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/buffer.c@1.10 +74 -10
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent.c@1.8 +9 -4
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent_async.c@1.7 +6 -4
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent_filter.c@1.7 +50 -23
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent_openssl.c@1.9 +2 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/bufferevent_pair.c@1.8 +32 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/configure.ac@1.17 +15 -18
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evbuffer-internal.h@1.8 +13 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evdns.c@1.10 +80 -33
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/event.c@1.13 +38 -10
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/event_tagging.c@1.5 +14 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evrpc-internal.h@1.3 +1 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evthread-internal.h@1.7 +7 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evthread.c@1.8 +17 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evutil.c@1.10 +28 -14
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/evutil_time.c@1.5 +50 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/ht-internal.h@1.4 +0 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/http-internal.h@1.6 +2 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/http.c@1.10 +45 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/buffer.h@1.7 +3 -8
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/bufferevent.h@1.6 +5 -4
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/dns.h@1.7 +17 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/event.h@1.10 +6 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/http.h@1.7 +14 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/listener.h@1.4 +9 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/include/event2/util.h@1.7 +69 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/kqueue.c@1.7 +17 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/listener.c@1.7 +5 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/sample/http-server.c@1.10 +5 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/sample/https-client.c@1.2 +15 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/sample/include.am@1.3 +2 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/include.am@1.4 +2 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/print-winsock-errors.c@1.1 +84 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/test/print-winsock-errors.c
+
+ sntp/libevent/test/print-winsock-errors.c@1.0 +0 -0
+
+ sntp/libevent/test/regress.c@1.6 +29 -8
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress.h@1.5 +5 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_buffer.c@1.8 +47 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_bufferevent.c@1.6 +150 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_dns.c@1.8 +141 -14
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_finalize.c@1.2 +1 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_http.c@1.8 +107 -9
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_main.c@1.7 +4 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_minheap.c@1.3 +3 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_ssl.c@1.7 +1 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_thread.c@1.6 +3 -2
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_util.c@1.7 +19 -17
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/regress_zlib.c@1.5 +10 -7
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/test-fdleak.c@1.2 +10 -10
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/test-ratelim.c@1.9 +5 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/test-ratelim.sh@1.1 +88 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/test/test-ratelim.sh
+
+ sntp/libevent/test/test-ratelim.sh@1.0 +0 -0
+
+ sntp/libevent/test/test-time.c@1.5 +9 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/tinytest.c@1.6 +33 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/tinytest.h@1.4 +2 -0
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/test/tinytest_demo.c@1.1 +260 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2747/sntp/libevent/test/tinytest_demo.c
+
+ sntp/libevent/test/tinytest_demo.c@1.0 +0 -0
+
+ sntp/libevent/test/tinytest_macros.h@1.3 +21 -6
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/time-internal.h@1.2 +0 -3
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/util-internal.h@1.10 +1 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/libevent/whatsnew-2.1.txt@1.4 +52 -1
+ [Bug 2747] Upgrade libevent to 2.1.5-beta
+
+ sntp/m4/LICENSE-OPENLDAP@1.2 +0 -0
+ Rename: sntp/libevent/m4/LICENSE-OPENLDAP -> sntp/m4/LICENSE-OPENLDAP
+
+ sntp/m4/openldap-thread-check.m4@1.5 +0 -0
+ Rename: sntp/libevent/m4/openldap-thread-check.m4 -> sntp/m4/openldap-thread-check.m4
+
+ sntp/m4/openldap.m4@1.2 +0 -0
+ Rename: sntp/libevent/m4/openldap.m4 -> sntp/m4/openldap.m4
+
+ChangeSet@1.3302, 2015-02-04 02:44:25-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8P1
+ TAG: NTP_4_2_8P1
+
+ ChangeLog@1.1620 +1 -0
+ NTP_4_2_8P1
+
+ ntpd/invoke-ntp.conf.texi@1.177 +1 -1
+ NTP_4_2_8P1
+
+ ntpd/invoke-ntp.keys.texi@1.174 +1 -1
+ NTP_4_2_8P1
+
+ ntpd/invoke-ntpd.texi@1.490 +2 -2
+ NTP_4_2_8P1
+
+ ntpd/ntp.conf.5man@1.211 +3 -3
+ NTP_4_2_8P1
+
+ ntpd/ntp.conf.5mdoc@1.211 +2 -2
+ NTP_4_2_8P1
+
+ ntpd/ntp.conf.html@1.169 +1 -1
+ NTP_4_2_8P1
+
+ ntpd/ntp.conf.man.in@1.211 +3 -3
+ NTP_4_2_8P1
+
+ ntpd/ntp.conf.mdoc.in@1.211 +2 -2
+ NTP_4_2_8P1
+
+ ntpd/ntp.keys.5man@1.208 +2 -2
+ NTP_4_2_8P1
+
+ ntpd/ntp.keys.5mdoc@1.208 +2 -2
+ NTP_4_2_8P1
+
+ ntpd/ntp.keys.html@1.170 +1 -1
+ NTP_4_2_8P1
+
+ ntpd/ntp.keys.man.in@1.208 +2 -2
+ NTP_4_2_8P1
+
+ ntpd/ntp.keys.mdoc.in@1.208 +2 -2
+ NTP_4_2_8P1
+
+ ntpd/ntpd-opts.c@1.511 +239 -239
+ NTP_4_2_8P1
+
+ ntpd/ntpd-opts.h@1.510 +3 -3
+ NTP_4_2_8P1
+
+ ntpd/ntpd.1ntpdman@1.319 +3 -3
+ NTP_4_2_8P1
+
+ ntpd/ntpd.1ntpdmdoc@1.319 +2 -2
+ NTP_4_2_8P1
+
+ ntpd/ntpd.html@1.164 +2 -2
+ NTP_4_2_8P1
+
+ ntpd/ntpd.man.in@1.319 +3 -3
+ NTP_4_2_8P1
+
+ ntpd/ntpd.mdoc.in@1.319 +2 -2
+ NTP_4_2_8P1
+
+ ntpdc/invoke-ntpdc.texi@1.488 +2 -2
+ NTP_4_2_8P1
+
+ ntpdc/ntpdc-opts.c@1.506 +107 -107
+ NTP_4_2_8P1
+
+ ntpdc/ntpdc-opts.h@1.505 +3 -3
+ NTP_4_2_8P1
+
+ ntpdc/ntpdc.1ntpdcman@1.319 +3 -3
+ NTP_4_2_8P1
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.319 +2 -2
+ NTP_4_2_8P1
+
+ ntpdc/ntpdc.html@1.332 +2 -2
+ NTP_4_2_8P1
+
+ ntpdc/ntpdc.man.in@1.319 +3 -3
+ NTP_4_2_8P1
+
+ ntpdc/ntpdc.mdoc.in@1.319 +2 -2
+ NTP_4_2_8P1
+
+ ntpq/invoke-ntpq.texi@1.494 +2 -2
+ NTP_4_2_8P1
+
+ ntpq/ntpq-opts.c@1.511 +106 -106
+ NTP_4_2_8P1
+
+ ntpq/ntpq-opts.h@1.509 +3 -3
+ NTP_4_2_8P1
+
+ ntpq/ntpq.1ntpqman@1.322 +3 -3
+ NTP_4_2_8P1
+
+ ntpq/ntpq.1ntpqmdoc@1.322 +2 -2
+ NTP_4_2_8P1
+
+ ntpq/ntpq.html@1.161 +2 -2
+ NTP_4_2_8P1
+
+ ntpq/ntpq.man.in@1.322 +3 -3
+ NTP_4_2_8P1
+
+ ntpq/ntpq.mdoc.in@1.322 +2 -2
+ NTP_4_2_8P1
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.490 +2 -2
+ NTP_4_2_8P1
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.508 +68 -68
+ NTP_4_2_8P1
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.507 +3 -3
+ NTP_4_2_8P1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.319 +3 -3
+ NTP_4_2_8P1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.319 +2 -2
+ NTP_4_2_8P1
+
+ ntpsnmpd/ntpsnmpd.html@1.159 +1 -1
+ NTP_4_2_8P1
+
+ ntpsnmpd/ntpsnmpd.man.in@1.319 +3 -3
+ NTP_4_2_8P1
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.319 +2 -2
+ NTP_4_2_8P1
+
+ packageinfo.sh@1.503 +3 -3
+ NTP_4_2_8P1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.80 +3 -3
+ NTP_4_2_8P1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.81 +2 -2
+ NTP_4_2_8P1
+
+ scripts/calc_tickadj/calc_tickadj.html@1.82 +1 -1
+ NTP_4_2_8P1
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.79 +3 -3
+ NTP_4_2_8P1
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.81 +2 -2
+ NTP_4_2_8P1
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.84 +1 -1
+ NTP_4_2_8P1
+
+ scripts/invoke-plot_summary.texi@1.101 +2 -2
+ NTP_4_2_8P1
+
+ scripts/invoke-summary.texi@1.101 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.311 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntp-wait/ntp-wait-opts@1.47 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.308 +3 -3
+ NTP_4_2_8P1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.309 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntp-wait/ntp-wait.html@1.328 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntp-wait/ntp-wait.man.in@1.308 +3 -3
+ NTP_4_2_8P1
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.309 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.99 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntpsweep/ntpsweep-opts@1.49 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.87 +3 -3
+ NTP_4_2_8P1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.87 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntpsweep/ntpsweep.html@1.100 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntpsweep/ntpsweep.man.in@1.87 +3 -3
+ NTP_4_2_8P1
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.88 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.100 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntptrace/ntptrace-opts@1.49 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.87 +3 -3
+ NTP_4_2_8P1
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.88 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntptrace/ntptrace.html@1.101 +2 -2
+ NTP_4_2_8P1
+
+ scripts/ntptrace/ntptrace.man.in@1.87 +3 -3
+ NTP_4_2_8P1
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.89 +2 -2
+ NTP_4_2_8P1
+
+ scripts/plot_summary-opts@1.49 +2 -2
+ NTP_4_2_8P1
+
+ scripts/plot_summary.1plot_summaryman@1.99 +3 -3
+ NTP_4_2_8P1
+
+ scripts/plot_summary.1plot_summarymdoc@1.99 +2 -2
+ NTP_4_2_8P1
+
+ scripts/plot_summary.html@1.102 +2 -2
+ NTP_4_2_8P1
+
+ scripts/plot_summary.man.in@1.99 +3 -3
+ NTP_4_2_8P1
+
+ scripts/plot_summary.mdoc.in@1.99 +2 -2
+ NTP_4_2_8P1
+
+ scripts/summary-opts@1.49 +2 -2
+ NTP_4_2_8P1
+
+ scripts/summary.1summaryman@1.99 +3 -3
+ NTP_4_2_8P1
+
+ scripts/summary.1summarymdoc@1.99 +2 -2
+ NTP_4_2_8P1
+
+ scripts/summary.html@1.102 +2 -2
+ NTP_4_2_8P1
+
+ scripts/summary.man.in@1.99 +3 -3
+ NTP_4_2_8P1
+
+ scripts/summary.mdoc.in@1.99 +2 -2
+ NTP_4_2_8P1
+
+ sntp/invoke-sntp.texi@1.487 +2 -2
+ NTP_4_2_8P1
+
+ sntp/sntp-opts.c@1.506 +159 -159
+ NTP_4_2_8P1
+
+ sntp/sntp-opts.h@1.504 +3 -3
+ NTP_4_2_8P1
+
+ sntp/sntp.1sntpman@1.322 +3 -3
+ NTP_4_2_8P1
+
+ sntp/sntp.1sntpmdoc@1.322 +2 -2
+ NTP_4_2_8P1
+
+ sntp/sntp.html@1.502 +2 -2
+ NTP_4_2_8P1
+
+ sntp/sntp.man.in@1.322 +3 -3
+ NTP_4_2_8P1
+
+ sntp/sntp.mdoc.in@1.322 +2 -2
+ NTP_4_2_8P1
+
+ util/invoke-ntp-keygen.texi@1.491 +2 -2
+ NTP_4_2_8P1
+
+ util/ntp-keygen-opts.c@1.509 +173 -173
+ NTP_4_2_8P1
+
+ util/ntp-keygen-opts.h@1.507 +3 -3
+ NTP_4_2_8P1
+
+ util/ntp-keygen.1ntp-keygenman@1.319 +3 -3
+ NTP_4_2_8P1
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.319 +2 -2
+ NTP_4_2_8P1
+
+ util/ntp-keygen.html@1.165 +2 -2
+ NTP_4_2_8P1
+
+ util/ntp-keygen.man.in@1.319 +3 -3
+ NTP_4_2_8P1
+
+ util/ntp-keygen.mdoc.in@1.319 +2 -2
+ NTP_4_2_8P1
+
+ChangeSet@1.3301, 2015-02-04 02:22:55-05:00, stenn@deacon.udel.edu
+ ntp-4.2.8p1
+
+ packageinfo.sh@1.502 +1 -1
+ ntp-4.2.8p1
+
+ChangeSet@1.3300, 2015-02-04 07:16:30+00:00, stenn@psp-deb1.ntp.org
+ Update the ChangeLog and NEWS files
+
+ ChangeLog@1.1619 +4 -1
+ Update the ChangeLog and NEWS files
+
+ NEWS@1.130 +60 -0
+ Update the ChangeLog and NEWS files
+
+ChangeSet@1.3292.1.20, 2015-01-29 19:14:37-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8P1_RC2
+ TAG: NTP_4_2_8P1_RC2
+
+ ChangeLog@1.1613.1.18 +1 -0
+ NTP_4_2_8P1_RC2
+
+ ntpd/invoke-ntp.conf.texi@1.176 +1 -1
+ NTP_4_2_8P1_RC2
+
+ ntpd/invoke-ntp.keys.texi@1.173 +1 -1
+ NTP_4_2_8P1_RC2
+
+ ntpd/invoke-ntpd.texi@1.489 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.conf.5man@1.210 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.conf.5mdoc@1.210 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.conf.html@1.168 +1 -1
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.conf.man.in@1.210 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.conf.mdoc.in@1.210 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.keys.5man@1.207 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.keys.5mdoc@1.207 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.keys.html@1.169 +1 -1
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.keys.man.in@1.207 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntp.keys.mdoc.in@1.207 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntpd-opts.c@1.510 +7 -7
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntpd-opts.h@1.509 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntpd.1ntpdman@1.318 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntpd.1ntpdmdoc@1.318 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntpd.html@1.163 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntpd.man.in@1.318 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpd/ntpd.mdoc.in@1.318 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpdc/invoke-ntpdc.texi@1.487 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpdc/ntpdc-opts.c@1.505 +7 -7
+ NTP_4_2_8P1_RC2
+
+ ntpdc/ntpdc-opts.h@1.504 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpdc/ntpdc.1ntpdcman@1.318 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.318 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpdc/ntpdc.html@1.331 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpdc/ntpdc.man.in@1.318 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpdc/ntpdc.mdoc.in@1.318 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpq/invoke-ntpq.texi@1.493 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpq/ntpq-opts.c@1.510 +7 -7
+ NTP_4_2_8P1_RC2
+
+ ntpq/ntpq-opts.h@1.508 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpq/ntpq.1ntpqman@1.321 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpq/ntpq.1ntpqmdoc@1.321 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpq/ntpq.html@1.160 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpq/ntpq.man.in@1.321 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpq/ntpq.mdoc.in@1.321 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.489 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.507 +7 -7
+ NTP_4_2_8P1_RC2
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.506 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.318 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.318 +2 -2
+ NTP_4_2_8P1_RC2
+
+ ntpsnmpd/ntpsnmpd.html@1.158 +1 -1
+ NTP_4_2_8P1_RC2
+
+ ntpsnmpd/ntpsnmpd.man.in@1.318 +3 -3
+ NTP_4_2_8P1_RC2
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.318 +2 -2
+ NTP_4_2_8P1_RC2
+
+ packageinfo.sh@1.501 +1 -1
+ NTP_4_2_8P1_RC2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.79 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.80 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/calc_tickadj/calc_tickadj.html@1.81 +1 -1
+ NTP_4_2_8P1_RC2
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.78 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.80 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.83 +1 -1
+ NTP_4_2_8P1_RC2
+
+ scripts/invoke-plot_summary.texi@1.100 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/invoke-summary.texi@1.100 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.310 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntp-wait/ntp-wait-opts@1.46 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.307 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.308 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntp-wait/ntp-wait.html@1.327 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntp-wait/ntp-wait.man.in@1.307 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.308 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.98 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntpsweep/ntpsweep-opts@1.48 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.86 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.86 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntpsweep/ntpsweep.html@1.99 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntpsweep/ntpsweep.man.in@1.86 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.87 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.99 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntptrace/ntptrace-opts@1.48 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.86 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.87 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntptrace/ntptrace.html@1.100 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/ntptrace/ntptrace.man.in@1.86 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.88 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/plot_summary-opts@1.48 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/plot_summary.1plot_summaryman@1.98 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/plot_summary.1plot_summarymdoc@1.98 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/plot_summary.html@1.101 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/plot_summary.man.in@1.98 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/plot_summary.mdoc.in@1.98 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/summary-opts@1.48 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/summary.1summaryman@1.98 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/summary.1summarymdoc@1.98 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/summary.html@1.101 +2 -2
+ NTP_4_2_8P1_RC2
+
+ scripts/summary.man.in@1.98 +3 -3
+ NTP_4_2_8P1_RC2
+
+ scripts/summary.mdoc.in@1.98 +2 -2
+ NTP_4_2_8P1_RC2
+
+ sntp/invoke-sntp.texi@1.486 +2 -2
+ NTP_4_2_8P1_RC2
+
+ sntp/sntp-opts.c@1.505 +7 -7
+ NTP_4_2_8P1_RC2
+
+ sntp/sntp-opts.h@1.503 +3 -3
+ NTP_4_2_8P1_RC2
+
+ sntp/sntp.1sntpman@1.321 +3 -3
+ NTP_4_2_8P1_RC2
+
+ sntp/sntp.1sntpmdoc@1.321 +2 -2
+ NTP_4_2_8P1_RC2
+
+ sntp/sntp.html@1.501 +2 -2
+ NTP_4_2_8P1_RC2
+
+ sntp/sntp.man.in@1.321 +3 -3
+ NTP_4_2_8P1_RC2
+
+ sntp/sntp.mdoc.in@1.321 +2 -2
+ NTP_4_2_8P1_RC2
+
+ util/invoke-ntp-keygen.texi@1.490 +2 -2
+ NTP_4_2_8P1_RC2
+
+ util/ntp-keygen-opts.c@1.508 +7 -7
+ NTP_4_2_8P1_RC2
+
+ util/ntp-keygen-opts.h@1.506 +3 -3
+ NTP_4_2_8P1_RC2
+
+ util/ntp-keygen.1ntp-keygenman@1.318 +3 -3
+ NTP_4_2_8P1_RC2
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.318 +2 -2
+ NTP_4_2_8P1_RC2
+
+ util/ntp-keygen.html@1.164 +2 -2
+ NTP_4_2_8P1_RC2
+
+ util/ntp-keygen.man.in@1.318 +3 -3
+ NTP_4_2_8P1_RC2
+
+ util/ntp-keygen.mdoc.in@1.318 +2 -2
+ NTP_4_2_8P1_RC2
+
+ChangeSet@1.3292.5.2, 2015-01-29 00:34:07+00:00, stenn@psp-deb1.ntp.org
+ typo
+
+ ChangeLog@1.1613.5.2 +2 -0
+ typo
+
+ChangeSet@1.3292.4.3, 2015-01-29 00:23:57+00:00, stenn@psp-deb1.ntp.org
+ typos
+
+ ChangeLog@1.1613.4.3 +5 -3
+ typos
+
+ChangeSet@1.3292.4.2, 2015-01-28 23:39:54+01:00, martin@pc-martin.fritz.box
+ Bug 2741 - Incorrect buffer check in parsestatus()
+
+ ChangeLog@1.1613.4.2 +2 -1
+ Bug 2741 - Incorrect buffer check in parsestatus()
+
+ ntpd/refclock_parse.c@1.71 +1 -1
+ Bug 2741 - Incorrect buffer check in parsestatus()
+
+ChangeSet@1.3292.2.3, 2015-01-28 22:06:47+01:00, jnperlin@nemesis.localnet
+ [bug 2732] Bug 2732 - Leap second not handled correctly on Windows 8
+ Guard against slewing twice. Something weird is happening under Win8/8.1.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.64 +2 -2
+ [bug 2732] Bug 2732 - Leap second not handled correctly on Windows 8
+ Guard against slewing twice. Something weird is happening under Win8/8.1.
+
+ChangeSet@1.3292.5.1, 2015-01-28 17:04:07+01:00, martin@pc-martin.(none)
+ [Bug 2740] Removed some obsolete code from the parse driver.
+
+ ChangeLog@1.1613.5.1 +1 -0
+ [Bug 2740] Removed some obsolete code from the parse driver.
+
+ ntpd/refclock_parse.c@1.69.1.1 +1 -14
+ [Bug 2740] Removed some obsolete code from the parse driver, as discussed with Frank Kardel.
+
+ChangeSet@1.3292.4.1, 2015-01-27 16:33:33+01:00, martin@pc-martin.(none)
+ [Bug 2738] Missing buffer initialisation in parsestate().
+ [Bug 2739] Parse driver with PPS enabled occasionaly evaluates PPS timestamp with wrong sign.
+ Removed some German umlauts.
+
+ ChangeLog@1.1613.4.1 +4 -0
+ [Bug 2738] Missing buffer initialisation in parsestate().
+ [Bug 2739] Parse driver with PPS enabled occasionaly evaluates PPS timestamp with wrong sign.
+ Removed some German umlauts.
+
+
+ ntpd/refclock_parse.c@1.70 +3 -2
+ [Bug 2738] Missing buffer initialisation in parsestate().
+ [Bug 2739] Parse driver with PPS enabled occasionaly evaluates PPS timestamp with wrong sign.
+ Removed some German umlauts.
+
+ChangeSet@1.3292.1.16, 2015-01-27 00:26:25+01:00, jnperlin@hydra.(none)
+ * [Bug 2627] rework: reverted sense of mode bit (so default reflects previous behaviour) and updated ducumentation.
+
+ ChangeLog@1.1613.1.14 +4 -0
+ * [Bug 2627] rework: reverted sense of mode bit (so default reflects previous behaviour) and updated ducumentation.
+
+ html/drivers/driver28.html@1.18 +3 -2
+ * [Bug 2627] rework: updated documentation
+
+ ntpd/refclock_shm.c@1.31 +2 -7
+ * [Bug 2627] rework: reverted sense of mode bit (so default reflects previous behaviour).
+
+ChangeSet@1.3292.2.2, 2015-01-26 23:42:37+01:00, jnperlin@nemesis.localnet
+ [Bug 2732] - Leap second not handled correctly on Windows 8
+ use 'GetTickCount()' to get the true elapsed time of slew
+ (This should work for all versions of Windows >= W2K)
+
+ ChangeLog@1.1613.3.1 +4 -0
+ [Bug 2732] - Leap second not handled correctly on Windows 8
+ use 'GetTickCount()' to get the true elapsed time of slew
+ (This should work for all versions of Windows >= W2K)
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.63 +1 -1
+ [Bug 2732] - Leap second not handled correctly on Windows 8
+ use 'GetTickCount()' to get the true elapsed time of slew
+ (This should work for all versions of Windows >= W2K)
+ Start 1.5 secs before schedule to minimise phase shift errors
+
+ChangeSet@1.3292.1.15, 2015-01-24 20:47:20-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8P1_RC1
+ TAG: NTP_4_2_8P1_RC1
+
+ ChangeLog@1.1613.1.13 +1 -0
+ NTP_4_2_8P1_RC1
+
+ ntpd/invoke-ntp.conf.texi@1.175 +1 -1
+ NTP_4_2_8P1_RC1
+
+ ntpd/invoke-ntp.keys.texi@1.172 +1 -1
+ NTP_4_2_8P1_RC1
+
+ ntpd/invoke-ntpd.texi@1.488 +2 -2
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.conf.5man@1.209 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.conf.5mdoc@1.209 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.conf.html@1.167 +1 -1
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.conf.man.in@1.209 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.conf.mdoc.in@1.209 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.keys.5man@1.206 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.keys.5mdoc@1.206 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.keys.html@1.168 +1 -1
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.keys.man.in@1.206 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntp.keys.mdoc.in@1.206 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntpd-opts.c@1.509 +251 -249
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntpd-opts.h@1.508 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntpd.1ntpdman@1.317 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntpd.1ntpdmdoc@1.317 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntpd.html@1.162 +2 -2
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntpd.man.in@1.317 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpd/ntpd.mdoc.in@1.317 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpdc/invoke-ntpdc.texi@1.486 +2 -2
+ NTP_4_2_8P1_RC1
+
+ ntpdc/ntpdc-opts.c@1.504 +119 -117
+ NTP_4_2_8P1_RC1
+
+ ntpdc/ntpdc-opts.h@1.503 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpdc/ntpdc.1ntpdcman@1.317 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.317 +3 -3
+ NTP_4_2_8P1_RC1
+
+ ntpdc/ntpdc.html@1.330 +58 -88
+ NTP_4_2_8P1_RC1
+
+ ntpdc/ntpdc.man.in@1.317 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpdc/ntpdc.mdoc.in@1.317 +3 -3
+ NTP_4_2_8P1_RC1
+
+ ntpq/invoke-ntpq.texi@1.492 +2 -2
+ NTP_4_2_8P1_RC1
+
+ ntpq/ntpq-opts.c@1.509 +118 -116
+ NTP_4_2_8P1_RC1
+
+ ntpq/ntpq-opts.h@1.507 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpq/ntpq.1ntpqman@1.320 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpq/ntpq.1ntpqmdoc@1.320 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpq/ntpq.html@1.159 +2 -2
+ NTP_4_2_8P1_RC1
+
+ ntpq/ntpq.man.in@1.320 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpq/ntpq.mdoc.in@1.320 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.488 +2 -2
+ NTP_4_2_8P1_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.506 +80 -78
+ NTP_4_2_8P1_RC1
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.505 +5 -5
+ NTP_4_2_8P1_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.317 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.317 +3 -3
+ NTP_4_2_8P1_RC1
+
+ ntpsnmpd/ntpsnmpd.html@1.157 +1 -1
+ NTP_4_2_8P1_RC1
+
+ ntpsnmpd/ntpsnmpd.man.in@1.317 +4 -4
+ NTP_4_2_8P1_RC1
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.317 +3 -3
+ NTP_4_2_8P1_RC1
+
+ packageinfo.sh@1.500 +1 -1
+ NTP_4_2_8P1_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.78 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.79 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/calc_tickadj/calc_tickadj.html@1.80 +1 -1
+ NTP_4_2_8P1_RC1
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.77 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.79 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.82 +1 -1
+ NTP_4_2_8P1_RC1
+
+ scripts/invoke-plot_summary.texi@1.99 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/invoke-summary.texi@1.99 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.309 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntp-wait/ntp-wait-opts@1.45 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.306 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.307 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntp-wait/ntp-wait.html@1.326 +31 -49
+ NTP_4_2_8P1_RC1
+
+ scripts/ntp-wait/ntp-wait.man.in@1.306 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.307 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.97 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntpsweep/ntpsweep-opts@1.47 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.85 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.85 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntpsweep/ntpsweep.html@1.98 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntpsweep/ntpsweep.man.in@1.85 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.86 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.98 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntptrace/ntptrace-opts@1.47 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.85 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.86 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/ntptrace/ntptrace.html@1.99 +27 -36
+ NTP_4_2_8P1_RC1
+
+ scripts/ntptrace/ntptrace.man.in@1.85 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.87 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/plot_summary-opts@1.47 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/plot_summary.1plot_summaryman@1.97 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/plot_summary.1plot_summarymdoc@1.97 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/plot_summary.html@1.100 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/plot_summary.man.in@1.97 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/plot_summary.mdoc.in@1.97 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/summary-opts@1.47 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/summary.1summaryman@1.97 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/summary.1summarymdoc@1.97 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/summary.html@1.100 +2 -2
+ NTP_4_2_8P1_RC1
+
+ scripts/summary.man.in@1.97 +3 -3
+ NTP_4_2_8P1_RC1
+
+ scripts/summary.mdoc.in@1.97 +2 -2
+ NTP_4_2_8P1_RC1
+
+ sntp/invoke-sntp.texi@1.485 +5 -3
+ NTP_4_2_8P1_RC1
+
+ sntp/sntp-opts.c@1.504 +174 -170
+ NTP_4_2_8P1_RC1
+
+ sntp/sntp-opts.h@1.502 +5 -5
+ NTP_4_2_8P1_RC1
+
+ sntp/sntp.1sntpman@1.320 +24 -8
+ NTP_4_2_8P1_RC1
+
+ sntp/sntp.1sntpmdoc@1.320 +22 -7
+ NTP_4_2_8P1_RC1
+
+ sntp/sntp.html@1.500 +88 -120
+ NTP_4_2_8P1_RC1
+
+ sntp/sntp.man.in@1.320 +24 -8
+ NTP_4_2_8P1_RC1
+
+ sntp/sntp.mdoc.in@1.320 +22 -7
+ NTP_4_2_8P1_RC1
+
+ util/invoke-ntp-keygen.texi@1.489 +2 -2
+ NTP_4_2_8P1_RC1
+
+ util/ntp-keygen-opts.c@1.507 +185 -183
+ NTP_4_2_8P1_RC1
+
+ util/ntp-keygen-opts.h@1.505 +5 -5
+ NTP_4_2_8P1_RC1
+
+ util/ntp-keygen.1ntp-keygenman@1.317 +5 -5
+ NTP_4_2_8P1_RC1
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.317 +4 -4
+ NTP_4_2_8P1_RC1
+
+ util/ntp-keygen.html@1.163 +2 -2
+ NTP_4_2_8P1_RC1
+
+ util/ntp-keygen.man.in@1.317 +5 -5
+ NTP_4_2_8P1_RC1
+
+ util/ntp-keygen.mdoc.in@1.317 +4 -4
+ NTP_4_2_8P1_RC1
+
+ChangeSet@1.3292.1.14, 2015-01-24 10:44:12+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2736] Show error message if we cannot open the config file
+
+ ChangeLog@1.1613.1.12 +1 -0
+ [Bug 2736] Show error message if we cannot open the config file
+
+ ntpd/ntp_config.c@1.322 +2 -2
+ [Bug 2736] Show error message if we cannot open the config file
+
+ChangeSet@1.3292.1.12, 2015-01-24 04:02:10+00:00, stenn@psp-deb1.ntp.org
+ Copyright update
+
+ html/copyright.html@1.67 +2 -2
+ Copyright update
+
+ChangeSet@1.3292.1.11, 2015-01-24 03:09:26+00:00, stenn@psp-fb1.ntp.org
+ typo fix
+
+ sntp/include/ntp.lic@1.8 +1 -3
+ typo fix
+
+ChangeSet@1.3292.3.5, 2015-01-24 02:27:46+00:00, stenn@psp-fb1.ntp.org
+ Start the RC for 4.2.8p1
+
+ ChangeLog@1.1613.2.5 +1 -0
+
+ packageinfo.sh@1.499 +1 -1
+
+ChangeSet@1.3292.3.4, 2015-01-24 01:54:36+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2187] Update version number generation scripts
+
+ ChangeLog@1.1613.2.4 +1 -0
+ [Bug 2187] Update version number generation scripts
+
+ scripts/build/UpdatePoint@1.7 +12 -6
+ [Bug 2187] Update version number generation scripts
+
+ scripts/build/VersionName@1.9 +12 -3
+ [Bug 2187] Update version number generation scripts
+
+ChangeSet@1.3292.3.3, 2015-01-24 01:52:52+00:00, stenn@psp-fb1.ntp.org
+ Fix the package name
+
+ ChangeLog@1.1613.2.3 +1 -0
+ Fix the package name
+
+ configure.ac@1.579.1.1 +1 -1
+ Fix the package name
+
+ChangeSet@1.3292.3.2, 2015-01-23 10:29:31+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2672] Code cleanup: On some OSes ::1 can be spoofed...
+
+ ChangeLog@1.1613.2.2 +1 -0
+ [Sec 2672] Code cleanup: On some OSes ::1 can be spoofed...
+
+ ntpd/ntp_io.c@1.399 +10 -12
+ [Sec 2672] Code cleanup: On some OSes ::1 can be spoofed...
+
+ChangeSet@1.3292.3.1, 2015-01-23 10:16:23+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2617] Fix sntp Usage documentation section
+
+ ChangeLog@1.1613.2.1 +3 -0
+ [Bug 2617] Fix sntp Usage documentation section
+
+ sntp/sntp-opts.def@1.46 +19 -4
+ [Bug 2617] Fix sntp Usage documentation section
+
+ChangeSet@1.3292.2.1, 2015-01-21 19:16:29+01:00, jnperlin@nemesis.localnet
+ [bug 2732] leapsecond processing buggy with win8
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.62 +19 -14
+ [bug 2732] leapsecond processing buggy with win8
+
+ChangeSet@1.3281.1.3, 2015-01-14 10:52:55+00:00, stenn@psp-fb1.ntp.org
+ Copyright update
+
+ ChangeLog@1.1604.1.3 +1 -0
+ Copyright update
+
+ html/copyright.html@1.66 +35 -3
+ Copyright update
+
+ ntpd/invoke-ntp.conf.texi@1.170.1.1 +12 -2
+ update
+
+ ntpd/invoke-ntp.keys.texi@1.167.1.1 +12 -2
+ update
+
+ ntpd/invoke-ntpd.texi@1.483.1.1 +14 -4
+ update
+
+ ntpd/ntp.conf.5man@1.204.1.1 +15 -6
+ update
+
+ ntpd/ntp.conf.5mdoc@1.204.1.1 +14 -5
+ update
+
+ ntpd/ntp.conf.man.in@1.204.1.1 +15 -6
+ update
+
+ ntpd/ntp.conf.mdoc.in@1.204.1.1 +14 -5
+ update
+
+ ntpd/ntp.keys.5man@1.201.1.1 +14 -5
+ update
+
+ ntpd/ntp.keys.5mdoc@1.201.1.1 +15 -6
+ update
+
+ ntpd/ntp.keys.man.in@1.201.1.1 +14 -5
+ update
+
+ ntpd/ntp.keys.mdoc.in@1.201.1.1 +15 -6
+ update
+
+ ntpd/ntpd-opts.c@1.504.1.1 +240 -264
+ update
+
+ ntpd/ntpd-opts.h@1.503.1.1 +3 -11
+ update
+
+ ntpd/ntpd.1ntpdman@1.312.1.1 +15 -6
+ update
+
+ ntpd/ntpd.1ntpdmdoc@1.312.1.1 +14 -5
+ update
+
+ ntpd/ntpd.man.in@1.312.1.1 +15 -6
+ update
+
+ ntpd/ntpd.mdoc.in@1.312.1.1 +14 -5
+ update
+
+ ntpdc/invoke-ntpdc.texi@1.481.1.1 +12 -2
+ update
+
+ ntpdc/ntpdc-opts.c@1.499.1.1 +108 -132
+ update
+
+ ntpdc/ntpdc-opts.h@1.498.1.1 +3 -11
+ update
+
+ ntpdc/ntpdc.1ntpdcman@1.312.1.1 +14 -5
+ update
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.312.1.1 +13 -4
+ update
+
+ ntpdc/ntpdc.html@1.325.1.1 +86 -56
+ update
+
+ ntpdc/ntpdc.man.in@1.312.1.1 +14 -5
+ update
+
+ ntpdc/ntpdc.mdoc.in@1.312.1.1 +13 -4
+ update
+
+ ntpq/invoke-ntpq.texi@1.487.1.1 +12 -2
+ update
+
+ ntpq/ntpq-opts.c@1.504.1.1 +107 -131
+ update
+
+ ntpq/ntpq-opts.h@1.502.1.1 +3 -11
+ update
+
+ ntpq/ntpq.1ntpqman@1.315.1.1 +15 -6
+ update
+
+ ntpq/ntpq.1ntpqmdoc@1.315.1.1 +14 -5
+ update
+
+ ntpq/ntpq.man.in@1.315.1.1 +15 -6
+ update
+
+ ntpq/ntpq.mdoc.in@1.315.1.1 +14 -5
+ update
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.483.1.1 +12 -2
+ update
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.501.1.1 +69 -93
+ update
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.500.1.1 +3 -11
+ update
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.312.1.1 +14 -5
+ update
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.312.1.1 +13 -4
+ update
+
+ ntpsnmpd/ntpsnmpd.man.in@1.312.1.1 +14 -5
+ update
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.312.1.1 +13 -4
+ update
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.74.1.1 +2 -2
+ update
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.74.1.1 +2 -2
+ update
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.304.1.1 +1 -1
+ update
+
+ scripts/ntp-wait/ntp-wait-opts@1.40.1.1 +1 -1
+ update
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.302.1.1 +2 -2
+ update
+
+ scripts/ntp-wait/ntp-wait.html@1.321.1.1 +47 -29
+ update
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.302.1.1 +2 -2
+ update
+
+ scripts/ntpsweep/ntpsweep-opts@1.42.1.1 +1 -1
+ update
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.93.1.1 +1 -1
+ update
+
+ scripts/ntptrace/ntptrace-opts@1.42.1.1 +1 -1
+ update
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.81.1.1 +2 -2
+ update
+
+ scripts/ntptrace/ntptrace.html@1.94.1.1 +34 -25
+ update
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.82.1.1 +2 -2
+ update
+
+ scripts/plot_summary-opts@1.42.1.1 +1 -1
+ update
+
+ scripts/summary-opts@1.42.1.1 +1 -1
+ update
+
+ sntp/include/copyright.def@1.25 +2 -2
+ Copyright update
+
+ sntp/include/ntp.lic@1.7 +3 -1
+ Copyright update
+
+ sntp/invoke-sntp.texi@1.480.1.1 +12 -2
+ update
+
+ sntp/sntp-opts.c@1.498.1.1 +160 -184
+ update
+
+ sntp/sntp-opts.h@1.497.1.1 +3 -11
+ update
+
+ sntp/sntp.1sntpman@1.315.1.1 +14 -5
+ update
+
+ sntp/sntp.1sntpmdoc@1.315.1.1 +13 -4
+ update
+
+ sntp/sntp.html@1.495.1.1 +118 -84
+ update
+
+ sntp/sntp.man.in@1.315.1.1 +14 -5
+ update
+
+ sntp/sntp.mdoc.in@1.315.1.1 +13 -4
+ update
+
+ util/invoke-ntp-keygen.texi@1.484.1.1 +12 -2
+ update
+
+ util/ntp-keygen-opts.c@1.501.1.1 +174 -198
+ update
+
+ util/ntp-keygen-opts.h@1.500.1.1 +3 -11
+ update
+
+ util/ntp-keygen.1ntp-keygenman@1.312.1.1 +15 -6
+ update
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.312.1.1 +14 -5
+ update
+
+ util/ntp-keygen.man.in@1.312.1.1 +15 -6
+ update
+
+ util/ntp-keygen.mdoc.in@1.312.1.1 +14 -5
+ update
+
+ChangeSet@1.3292.1.8, 2015-01-07 03:05:51-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8P1_BETA5
+ TAG: NTP_4_2_8P1_BETA5
+
+ ChangeLog@1.1613.1.8 +1 -0
+ NTP_4_2_8P1_BETA5
+
+ ntpd/invoke-ntp.conf.texi@1.173 +1 -1
+ NTP_4_2_8P1_BETA5
+
+ ntpd/invoke-ntp.keys.texi@1.170 +1 -1
+ NTP_4_2_8P1_BETA5
+
+ ntpd/invoke-ntpd.texi@1.486 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.conf.5man@1.207 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.conf.5mdoc@1.207 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.conf.html@1.166 +1 -1
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.conf.man.in@1.207 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.conf.mdoc.in@1.207 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.keys.5man@1.204 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.keys.5mdoc@1.204 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.keys.html@1.167 +1 -1
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.keys.man.in@1.204 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntp.keys.mdoc.in@1.204 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntpd-opts.c@1.507 +7 -7
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntpd-opts.h@1.506 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntpd.1ntpdman@1.315 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntpd.1ntpdmdoc@1.315 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntpd.html@1.161 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntpd.man.in@1.315 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpd/ntpd.mdoc.in@1.315 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpdc/invoke-ntpdc.texi@1.484 +26 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpdc/ntpdc-opts.c@1.502 +7 -7
+ NTP_4_2_8P1_BETA5
+
+ ntpdc/ntpdc-opts.h@1.501 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpdc/ntpdc.1ntpdcman@1.315 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.315 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpdc/ntpdc.html@1.328 +27 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpdc/ntpdc.man.in@1.315 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpdc/ntpdc.mdoc.in@1.315 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpq/invoke-ntpq.texi@1.490 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpq/ntpq-opts.c@1.507 +7 -7
+ NTP_4_2_8P1_BETA5
+
+ ntpq/ntpq-opts.h@1.505 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpq/ntpq.1ntpqman@1.318 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpq/ntpq.1ntpqmdoc@1.318 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpq/ntpq.html@1.158 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpq/ntpq.man.in@1.318 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpq/ntpq.mdoc.in@1.318 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.486 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.504 +7 -7
+ NTP_4_2_8P1_BETA5
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.503 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.315 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.315 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ ntpsnmpd/ntpsnmpd.html@1.156 +1 -1
+ NTP_4_2_8P1_BETA5
+
+ ntpsnmpd/ntpsnmpd.man.in@1.315 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.315 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ packageinfo.sh@1.498 +1 -1
+ NTP_4_2_8P1_BETA5
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.77 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.77 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/calc_tickadj/calc_tickadj.html@1.79 +1 -1
+ NTP_4_2_8P1_BETA5
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.76 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.77 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.81 +1 -1
+ NTP_4_2_8P1_BETA5
+
+ scripts/invoke-plot_summary.texi@1.98 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/invoke-summary.texi@1.98 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.307 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntp-wait/ntp-wait-opts@1.43 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.305 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.305 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntp-wait/ntp-wait.html@1.324 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntp-wait/ntp-wait.man.in@1.305 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.305 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.96 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntpsweep/ntpsweep-opts@1.45 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.84 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.84 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntpsweep/ntpsweep.html@1.97 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntpsweep/ntpsweep.man.in@1.84 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.85 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.96 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntptrace/ntptrace-opts@1.45 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.84 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.84 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntptrace/ntptrace.html@1.97 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntptrace/ntptrace.man.in@1.84 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.85 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/plot_summary-opts@1.45 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/plot_summary.1plot_summaryman@1.96 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/plot_summary.1plot_summarymdoc@1.96 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/plot_summary.html@1.99 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/plot_summary.man.in@1.96 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/plot_summary.mdoc.in@1.96 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/summary-opts@1.45 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/summary.1summaryman@1.96 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/summary.1summarymdoc@1.96 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/summary.html@1.99 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ scripts/summary.man.in@1.96 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ scripts/summary.mdoc.in@1.96 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ sntp/invoke-sntp.texi@1.483 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ sntp/sntp-opts.c@1.502 +7 -7
+ NTP_4_2_8P1_BETA5
+
+ sntp/sntp-opts.h@1.500 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ sntp/sntp.1sntpman@1.318 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ sntp/sntp.1sntpmdoc@1.318 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ sntp/sntp.html@1.498 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ sntp/sntp.man.in@1.318 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ sntp/sntp.mdoc.in@1.318 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ util/invoke-ntp-keygen.texi@1.487 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ util/ntp-keygen-opts.c@1.505 +7 -7
+ NTP_4_2_8P1_BETA5
+
+ util/ntp-keygen-opts.h@1.503 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ util/ntp-keygen.1ntp-keygenman@1.315 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.315 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ util/ntp-keygen.html@1.162 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ util/ntp-keygen.man.in@1.315 +3 -3
+ NTP_4_2_8P1_BETA5
+
+ util/ntp-keygen.mdoc.in@1.315 +2 -2
+ NTP_4_2_8P1_BETA5
+
+ChangeSet@1.3292.1.7, 2015-01-07 07:35:11+00:00, burnicki@psp-deb1.ntp.org
+ cleanup
+
+ ChangeLog@1.1613.1.7 +2 -0
+ cleanup
+
+ChangeSet@1.3292.1.6, 2015-01-06 15:14:03+01:00, burnicki@pc-martin4.
+ [Bug 2728] Work around C99-style structure initialization code for older compilers, specifically Visual Studio prior to VS2013.
+
+ ChangeLog@1.1613.1.6 +2 -0
+ [Bug 2728] Work around C99-style structure initialization code for older compilers, specifically Visual Studio prior to VS2013.
+
+ ntpq/ntpq-subs.c@1.103 +5 -2
+ [Bug 2728] Fix for build environments where C99 style structure initialization is not supported.
+
+ ports/winnt/include/config.h@1.110 +1 -0
+ [Bug 2728] Define MISSING_C99_STYLE_INIT for VS versions prior to VS2013 to indicate C99-style structure initialization is not supported.
+
+ sntp/libopts/autoopts.h@1.20 +1 -1
+ [Bug 2728] Zero out whole structure, avoiding C99-style code zeroing out only specific fields.
+
+ sntp/libopts/enum.c@1.12 +1 -1
+ [Bug 2728] Zero out whole structure, avoiding C99-style code zeroing out only specific fields.
+
+ChangeSet@1.3292.1.5, 2015-01-06 14:29:51+01:00, burnicki@pc-martin4.
+ [Bug 2695] Windows build: __func__ not supported under Windows.
+
+ ChangeLog@1.1613.1.5 +1 -0
+ [Bug 2695] Windows build: __func__ not supported under Windows.
+
+ ports/winnt/include/config.h@1.109 +5 -1
+ [Bug 2695] Windows build: __func__ not supported under Windows.
+
+ChangeSet@1.3295, 2015-01-06 10:52:26+00:00, stenn@psp-deb1.ntp.org
+ Fix the package name
+
+ configure.ac@1.580 +1 -1
+ Fix the package name
+
+ChangeSet@1.3294, 2015-01-06 10:01:10+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2671] vallen in extension fields are not validated
+
+ ntpd/ntp_crypto.c@1.173 +65 -35
+ [Sec 2671] vallen in extension fields are not validated
+
+ChangeSet@1.3292.1.4, 2015-01-04 06:17:14-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8P1_BETA4
+ TAG: NTP_4_2_8P1_BETA4
+
+ ChangeLog@1.1613.1.4 +1 -0
+ NTP_4_2_8P1_BETA4
+
+ ntpd/invoke-ntp.conf.texi@1.172 +1 -1
+ NTP_4_2_8P1_BETA4
+
+ ntpd/invoke-ntp.keys.texi@1.169 +1 -1
+ NTP_4_2_8P1_BETA4
+
+ ntpd/invoke-ntpd.texi@1.485 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.conf.5man@1.206 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.conf.5mdoc@1.206 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.conf.html@1.165 +14 -1
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.conf.man.in@1.206 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.conf.mdoc.in@1.206 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.keys.5man@1.203 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.keys.5mdoc@1.203 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.keys.html@1.166 +1 -1
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.keys.man.in@1.203 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntp.keys.mdoc.in@1.203 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntpd-opts.c@1.506 +7 -7
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntpd-opts.h@1.505 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntpd.1ntpdman@1.314 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntpd.1ntpdmdoc@1.314 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntpd.html@1.160 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntpd.man.in@1.314 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpd/ntpd.mdoc.in@1.314 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpdc/invoke-ntpdc.texi@1.483 +2 -26
+ NTP_4_2_8P1_BETA4
+
+ ntpdc/ntpdc-opts.c@1.501 +7 -7
+ NTP_4_2_8P1_BETA4
+
+ ntpdc/ntpdc-opts.h@1.500 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpdc/ntpdc.1ntpdcman@1.314 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.314 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpdc/ntpdc.html@1.327 +2 -27
+ NTP_4_2_8P1_BETA4
+
+ ntpdc/ntpdc.man.in@1.314 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpdc/ntpdc.mdoc.in@1.314 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpq/invoke-ntpq.texi@1.489 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpq/ntpq-opts.c@1.506 +7 -7
+ NTP_4_2_8P1_BETA4
+
+ ntpq/ntpq-opts.h@1.504 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpq/ntpq.1ntpqman@1.317 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpq/ntpq.1ntpqmdoc@1.317 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpq/ntpq.html@1.157 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpq/ntpq.man.in@1.317 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpq/ntpq.mdoc.in@1.317 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.485 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.503 +7 -7
+ NTP_4_2_8P1_BETA4
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.502 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.314 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.314 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ ntpsnmpd/ntpsnmpd.html@1.155 +1 -1
+ NTP_4_2_8P1_BETA4
+
+ ntpsnmpd/ntpsnmpd.man.in@1.314 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.314 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ packageinfo.sh@1.497 +1 -1
+ NTP_4_2_8P1_BETA4
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.76 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.76 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/calc_tickadj/calc_tickadj.html@1.78 +1 -1
+ NTP_4_2_8P1_BETA4
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.75 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.76 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.80 +1 -1
+ NTP_4_2_8P1_BETA4
+
+ scripts/invoke-plot_summary.texi@1.97 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/invoke-summary.texi@1.97 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.306 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntp-wait/ntp-wait-opts@1.42 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.304 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.304 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntp-wait/ntp-wait.html@1.323 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntp-wait/ntp-wait.man.in@1.304 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.304 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.95 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntpsweep/ntpsweep-opts@1.44 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.83 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.83 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntpsweep/ntpsweep.html@1.96 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntpsweep/ntpsweep.man.in@1.83 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.84 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.95 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntptrace/ntptrace-opts@1.44 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.83 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.83 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntptrace/ntptrace.html@1.96 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntptrace/ntptrace.man.in@1.83 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.84 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/plot_summary-opts@1.44 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/plot_summary.1plot_summaryman@1.95 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/plot_summary.1plot_summarymdoc@1.95 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/plot_summary.html@1.98 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/plot_summary.man.in@1.95 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/plot_summary.mdoc.in@1.95 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/summary-opts@1.44 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/summary.1summaryman@1.95 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/summary.1summarymdoc@1.95 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/summary.html@1.98 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ scripts/summary.man.in@1.95 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ scripts/summary.mdoc.in@1.95 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ sntp/invoke-sntp.texi@1.482 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ sntp/sntp-opts.c@1.501 +7 -7
+ NTP_4_2_8P1_BETA4
+
+ sntp/sntp-opts.h@1.499 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ sntp/sntp.1sntpman@1.317 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ sntp/sntp.1sntpmdoc@1.317 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ sntp/sntp.html@1.497 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ sntp/sntp.man.in@1.317 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ sntp/sntp.mdoc.in@1.317 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ util/invoke-ntp-keygen.texi@1.486 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ util/ntp-keygen-opts.c@1.504 +7 -7
+ NTP_4_2_8P1_BETA4
+
+ util/ntp-keygen-opts.h@1.502 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ util/ntp-keygen.1ntp-keygenman@1.314 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.314 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ util/ntp-keygen.html@1.161 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ util/ntp-keygen.man.in@1.314 +3 -3
+ NTP_4_2_8P1_BETA4
+
+ util/ntp-keygen.mdoc.in@1.314 +2 -2
+ NTP_4_2_8P1_BETA4
+
+ChangeSet@1.3292.1.3, 2015-01-04 04:48:35-05:00, stenn@deacon.udel.edu
+ Fix a regression introduced to timepps-Solaris.h
+
+ ChangeLog@1.1613.1.3 +4 -0
+ Fix a regression introduced to timepps-Solaris.h
+
+ include/timepps-Solaris.h@1.8 +1 -1
+ Fix a regression introduced to timepps-Solaris.h
+
+ChangeSet@1.3292.1.2, 2015-01-04 09:08:36+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2695] Build problem on Windows (sys/socket.h)
+
+ ChangeLog@1.1613.1.2 +4 -3
+ [Bug 2695] Build problem on Windows (sys/socket.h)
+
+ ntpd/refclock_nmea.c@1.77 +2 -0
+ [Bug 2695] Build problem on Windows (sys/socket.h)
+
+ChangeSet@1.3292.1.1, 2015-01-04 00:20:52+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ChangeLog@1.1613.1.1 +3 -0
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ntpd/keyword-gen-utd@1.21 +1 -1
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ntpd/ntp_keyword.h@1.23 +596 -587
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ntpd/ntp_parser.c@1.89 +1006 -1001
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ntpd/ntp_parser.h@1.55 +202 -200
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ChangeSet@1.3293, 2015-01-03 10:33:57+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2671] vallen in extension fields are not validated
+
+ ChangeLog@1.1614 +3 -0
+ [Sec 2671] vallen in extension fields are not validated
+
+ ntpd/ntp_crypto.c@1.172 +19 -12
+ [Sec 2671] vallen in extension fields are not validated
+
+ChangeSet@1.3292, 2015-01-02 23:07:47-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8P1_BETA3
+ TAG: NTP_4_2_8P1_BETA3
+
+ ChangeLog@1.1613 +1 -0
+ NTP_4_2_8P1_BETA3
+
+ ntpd/invoke-ntp.conf.texi@1.171 +15 -1
+ NTP_4_2_8P1_BETA3
+
+ ntpd/invoke-ntp.keys.texi@1.168 +1 -1
+ NTP_4_2_8P1_BETA3
+
+ ntpd/invoke-ntpd.texi@1.484 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.conf.5man@1.205 +18 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.conf.5mdoc@1.205 +16 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.conf.html@1.164 +1 -1
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.conf.man.in@1.205 +18 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.conf.mdoc.in@1.205 +16 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.keys.5man@1.202 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.keys.5mdoc@1.202 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.keys.html@1.165 +1 -1
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.keys.man.in@1.202 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntp.keys.mdoc.in@1.202 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntpd-opts.c@1.505 +7 -7
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntpd-opts.h@1.504 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntpd.1ntpdman@1.313 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntpd.1ntpdmdoc@1.313 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntpd.html@1.159 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntpd.man.in@1.313 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpd/ntpd.mdoc.in@1.313 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpdc/invoke-ntpdc.texi@1.482 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpdc/ntpdc-opts.c@1.500 +7 -7
+ NTP_4_2_8P1_BETA3
+
+ ntpdc/ntpdc-opts.h@1.499 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpdc/ntpdc.1ntpdcman@1.313 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.313 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpdc/ntpdc.html@1.326 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpdc/ntpdc.man.in@1.313 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpdc/ntpdc.mdoc.in@1.313 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpq/invoke-ntpq.texi@1.488 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpq/ntpq-opts.c@1.505 +7 -7
+ NTP_4_2_8P1_BETA3
+
+ ntpq/ntpq-opts.h@1.503 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpq/ntpq.1ntpqman@1.316 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpq/ntpq.1ntpqmdoc@1.316 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpq/ntpq.html@1.156 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpq/ntpq.man.in@1.316 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpq/ntpq.mdoc.in@1.316 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.484 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.502 +7 -7
+ NTP_4_2_8P1_BETA3
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.501 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.313 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.313 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ ntpsnmpd/ntpsnmpd.html@1.154 +1 -1
+ NTP_4_2_8P1_BETA3
+
+ ntpsnmpd/ntpsnmpd.man.in@1.313 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.313 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ packageinfo.sh@1.496 +1 -1
+ NTP_4_2_8P1_BETA3
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.75 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.75 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/calc_tickadj/calc_tickadj.html@1.77 +1 -1
+ NTP_4_2_8P1_BETA3
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.74 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.75 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.79 +1 -1
+ NTP_4_2_8P1_BETA3
+
+ scripts/invoke-plot_summary.texi@1.96 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/invoke-summary.texi@1.96 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.305 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntp-wait/ntp-wait-opts@1.41 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.303 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.303 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntp-wait/ntp-wait.html@1.322 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntp-wait/ntp-wait.man.in@1.303 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.303 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.94 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntpsweep/ntpsweep-opts@1.43 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.82 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.82 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntpsweep/ntpsweep.html@1.95 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntpsweep/ntpsweep.man.in@1.82 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.83 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.94 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntptrace/ntptrace-opts@1.43 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.82 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.82 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntptrace/ntptrace.html@1.95 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntptrace/ntptrace.man.in@1.82 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.83 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/plot_summary-opts@1.43 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/plot_summary.1plot_summaryman@1.94 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/plot_summary.1plot_summarymdoc@1.94 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/plot_summary.html@1.97 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/plot_summary.man.in@1.94 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/plot_summary.mdoc.in@1.94 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/summary-opts@1.43 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/summary.1summaryman@1.94 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/summary.1summarymdoc@1.94 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/summary.html@1.97 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ scripts/summary.man.in@1.94 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ scripts/summary.mdoc.in@1.94 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ sntp/invoke-sntp.texi@1.481 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ sntp/sntp-opts.c@1.500 +9 -9
+ NTP_4_2_8P1_BETA3
+
+ sntp/sntp-opts.h@1.498 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ sntp/sntp.1sntpman@1.316 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ sntp/sntp.1sntpmdoc@1.316 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ sntp/sntp.html@1.496 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ sntp/sntp.man.in@1.316 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ sntp/sntp.mdoc.in@1.316 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ util/invoke-ntp-keygen.texi@1.485 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ util/ntp-keygen-opts.c@1.503 +9 -9
+ NTP_4_2_8P1_BETA3
+
+ util/ntp-keygen-opts.h@1.501 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ util/ntp-keygen.1ntp-keygenman@1.313 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.313 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ util/ntp-keygen.html@1.160 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ util/ntp-keygen.man.in@1.313 +3 -3
+ NTP_4_2_8P1_BETA3
+
+ util/ntp-keygen.mdoc.in@1.313 +2 -2
+ NTP_4_2_8P1_BETA3
+
+ChangeSet@1.3281.3.3, 2015-01-02 17:37:39+01:00, jnperlin@hydra.(none)
+ [Bug 2627] changelog file syntax
+
+ ChangeLog@1.1604.3.2 +1 -0
+ [Bug 2627] changelog file syntax
+
+ChangeSet@1.3281.3.2, 2015-01-02 17:23:21+01:00, jnperlin@nemesis.localnet
+ [Bug 2627] sidekick: avoid runtime conversion trap on MSVC builds
+
+ ntpd/ntp_leapsec.c@1.13.1.1 +2 -1
+ [Bug 2627] sidekick: avoid runtime conversion trap on MSVC builds
+
+ChangeSet@1.3273.1.1, 2015-01-02 13:45:05+01:00, jnperlin@hydra.(none)
+ [Bug 2627] shm refclock allows only two units with owner-only access
+
+ ChangeLog@1.1597.1.1 +3 -0
+ [Bug 2627] shm refclock allows only two units with owner-only access
+
+ html/drivers/driver28.html@1.17 +122 -17
+ [Bug 2627] shm refclock allows only two units with owner-only access
+ update docu
+
+ ntpd/refclock_shm.c@1.30 +111 -114
+ [Bug 2627] shm refclock allows only two units with owner-only access
+ use mode bit 0 to select public access for units >= 2 (default is private for all now)
+
+ChangeSet@1.3288, 2015-01-02 07:59:13+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/Makefile.am@1.132 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_loopfilter.c@1.176 +44 -8
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/m4/hms_search_lib.m4@1.2 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/m4/ntp_libntp.m4@1.28 +6 -0
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ChangeSet@1.3281.1.2, 2015-01-01 07:31:57+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2681] Fix display of certificate EOValidity dates on 32-bit systems
+
+ ChangeLog@1.1604.1.2 +1 -0
+ [Bug 2681] Fix display of certificate EOValidity dates on 32-bit systems
+
+ ntpd/ntp_control.c@1.192.2.1 +28 -4
+ [Bug 2681] Fix display of certificate EOValidity dates on 32-bit systems
+
+ChangeSet@1.3281.2.2, 2014-12-30 05:48:04-05:00, murray@pogo.udel.edu
+ ChangeLog:
+ add --- to top of ChangeLog
+
+ ChangeLog@1.1604.2.2 +1 -1
+ add --- to top of ChangeLog
+
+ChangeSet@1.3281.2.1, 2014-12-30 04:55:11-05:00, murray@pogo.udel.edu
+ ChangeLog, ntp_control.c:
+ Fix for bug 2700
+
+ ChangeLog@1.1604.2.1 +2 -0
+ Fix for bug 2700
+
+ ntpd/ntp_control.c@1.192.1.1 +4 -1
+ Fix for bug 2700
+
+ChangeSet@1.3287, 2014-12-30 01:28:39+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ html/confopt.html@1.63 +3 -1
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ntpd/ntp.conf.def@1.14 +14 -0
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ChangeSet@1.3286, 2014-12-30 00:29:47+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_wwvb.c@1.35 +1 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ChangeSet@1.3285, 2014-12-30 00:28:06+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ChangeLog@1.1609 +1 -0
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ntpd/keyword-gen.c@1.26 +2 -1
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ntpd/ntp_config.c@1.321 +29 -13
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ ntpd/ntp_parser.y@1.82 +3 -0
+ [Bug 2715] mdnstries option for ntp.conf from NetBSD
+
+ChangeSet@1.3278.1.1, 2014-12-29 08:47:40+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2695] 4.2.8 does not build on Windows
+
+ ChangeLog@1.1601.1.1 +1 -0
+ [Bug 2695] 4.2.8 does not build on Windows
+
+ ports/winnt/include/config.h@1.108 +1 -0
+ [Bug 2695] 4.2.8 does not build on Windows
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.51 +6 -2
+ [Bug 2695] 4.2.8 does not build on Windows
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.5 +1 -0
+ [Bug 2695] 4.2.8 does not build on Windows
+
+ChangeSet@1.3284, 2014-12-29 06:57:50+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2714] libevent may need to be built independently of any build of sntp
+
+ ChangeLog@1.1608 +1 -0
+ [Bug 2714] libevent may need to be built independently of any build of sntp
+
+ sntp/Makefile.am@1.78 +7 -7
+ [Bug 2714] libevent may need to be built independently of any build of sntp
+
+ChangeSet@1.3283, 2014-12-29 06:42:07+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2706] libparse/info_trimble.c build dependencies are broken
+
+ ChangeLog@1.1607 +1 -0
+ [Bug 2706] libparse/info_trimble.c build dependencies are broken
+
+ libparse/Makefile.am@1.31 +30 -2
+ [Bug 2706] libparse/info_trimble.c build dependencies are broken
+
+ libparse/info_trimble.c@1.6 +2 -2
+ [Bug 2706] libparse/info_trimble.c build dependencies are broken
+
+ libparse/mkinfo_rcmd.sed@1.4 +1 -1
+ [Bug 2706] libparse/info_trimble.c build dependencies are broken
+
+ libparse/mkinfo_scmd.sed@1.4 +1 -1
+ [Bug 2706] libparse/info_trimble.c build dependencies are broken
+
+ChangeSet@1.3282, 2014-12-29 06:39:40+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ChangeLog@1.1606 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ChangeLog@1.1605 +3 -0
+ [Bug 2713] variable type/cast cleanup from NetBSD
+
+ include/audio.h@1.8 +1 -1
+ [Bug 2713] variable type/cast cleanup from NetBSD
+
+ include/icom.h@1.6 +1 -1
+ [Bug 2713] variable type/cast cleanup from NetBSD
+
+ include/ntp_config.h@1.82 +3 -2
+ [Bug 2713] variable type/cast cleanup from NetBSD
+
+ include/ntp_filegen.h@1.11 +1 -1
+ [Bug 2713] variable type/cast cleanup from NetBSD
+
+ include/ntp_stdlib.h@1.77 +5 -5
+ [Bug 2713] variable type/cast cleanup from NetBSD
+
+ include/ntpd.h@1.184 +3 -3
+ [Bug 2713] variable type/cast cleanup from NetBSD
+
+ lib/isc/backtrace.c@1.2 +4 -4
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ lib/isc/event.c@1.2 +1 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ lib/isc/include/isc/backtrace.h@1.2 +2 -2
+ [Bug 2713] variable type/cast, parameter name cleanup from NetBSD
+
+ lib/isc/include/isc/socket.h@1.3 +7 -7
+ [Bug 2713] variable type/cast, parameter name cleanup from NetBSD
+
+ lib/isc/log.c@1.7 +2 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ lib/isc/netaddr.c@1.13 +2 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ lib/isc/sockaddr.c@1.12 +8 -4
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ lib/isc/unix/ifiter_getifaddrs.c@1.13 +7 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libjsmn/jsmn.c@1.3 +3 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/atoint.c@1.4 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/atolfp.c@1.5 +5 -5
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/atouint.c@1.5 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/audio.c@1.35 +12 -12
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/authkeys.c@1.25 +1 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/authreadkeys.c@1.20 +4 -4
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/emalloc.c@1.17 +2 -0
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/hextoint.c@1.5 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/hextolfp.c@1.4 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/humandate.c@1.12 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/icom.c@1.18 +1 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/modetoa.c@1.6 +3 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/mstolfp.c@1.4 +5 -5
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/ntp_calendar.c@1.14 +5 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/ntp_crypto_rnd.c@1.3 +4 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/ntp_intres.c@1.98 +2 -17
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/ntp_lineedit.c@1.12 +6 -7
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/octtoint.c@1.4 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/prettydate.c@1.19 +7 -7
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/ssl_init.c@1.17 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libntp/timetoa.c@1.5 +3 -6
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libparse/clk_meinberg.c@1.11 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libparse/clk_rawdcf.c@1.17 +10 -10
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ libparse/data_mbg.c@1.12 +3 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_control.c@1.193 +60 -62
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_crypto.c@1.171 +8 -10
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_filegen.c@1.25 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_io.c@1.398 +63 -30
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_leapsec.c@1.14 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_proto.c@1.353 +13 -14
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_request.c@1.113 +8 -9
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_restrict.c@1.36 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_scanner.c@1.46 +14 -14
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntp_util.c@1.116 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/ntpd.c@1.158 +6 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_acts.c@1.54 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_arc.c@1.32 +3 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_chu.c@1.56 +0 -4
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_gpsdjson.c@1.16 +6 -6
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_heath.c@1.19 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_irig.c@1.37 +1 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_jjy.c@1.26 +22 -23
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_jupiter.c@1.29 +54 -55
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_neoclock4x.c@1.23 +7 -7
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_nmea.c@1.76 +7 -6
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_oncore.c@1.102 +80 -80
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_parse.c@1.69 +228 -214
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_pcf.c@1.13 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_true.c@1.23 +1 -0
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_wwv.c@1.79 +3 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpd/refclock_wwvb.c@1.34 +2 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpdate/ntpdate.c@1.93 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpdc/ntpdc.c@1.102 +42 -30
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpdc/ntpdc.h@1.11 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpdc/ntpdc_ops.c@1.80 +6 -6
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpq/ntpq-subs.c@1.102 +103 -107
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpq/ntpq.c@1.154 +43 -32
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpq/ntpq.h@1.29 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpsnmpd/netsnmp_daemonize.c@1.5 +1 -0
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ ntpsnmpd/ntp_snmp.h@1.2 +3 -0
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/crypto.c@1.18 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/autoopts.h@1.19 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/autoopts/options.h@1.29 +9 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/configfile.c@1.22 +6 -6
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/enum.c@1.11 +5 -5
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/file.c@1.15 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/find.c@1.11 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/init.c@1.7 +5 -8
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/load.c@1.20 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/makeshell.c@1.19 +8 -8
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/nested.c@1.15 +7 -7
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/numeric.c@1.14 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/parse-duration.c@1.13 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/pgusage.c@1.17 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/reset.c@1.16 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/save.c@1.17 +10 -10
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/tokenize.c@1.12 +1 -1
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/libopts/usage.c@1.20 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/main.c@1.94 +7 -6
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/networking.c@1.65 +16 -7
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ sntp/sntp-opts.c@1.499 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ util/jitter.h@1.4 +3 -3
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ util/ntp-keygen-opts.c@1.502 +2 -2
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ util/ntp-keygen.c@1.100 +26 -25
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ util/ntptime.c@1.25 +5 -4
+ [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD
+
+ChangeSet@1.3281, 2014-12-27 06:33:35-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8P1_BETA2
+ TAG: NTP_4_2_8P1_BETA2
+
+ ChangeLog@1.1604 +1 -0
+ NTP_4_2_8P1_BETA2
+
+ ntpd/invoke-ntp.conf.texi@1.170 +1 -1
+ NTP_4_2_8P1_BETA2
+
+ ntpd/invoke-ntp.keys.texi@1.167 +1 -1
+ NTP_4_2_8P1_BETA2
+
+ ntpd/invoke-ntpd.texi@1.483 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.conf.5man@1.204 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.conf.5mdoc@1.204 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.conf.html@1.163 +1 -1
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.conf.man.in@1.204 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.conf.mdoc.in@1.204 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.keys.5man@1.201 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.keys.5mdoc@1.201 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.keys.html@1.164 +1 -1
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.keys.man.in@1.201 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntp.keys.mdoc.in@1.201 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntpd-opts.c@1.504 +7 -7
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntpd-opts.h@1.503 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntpd.1ntpdman@1.312 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntpd.1ntpdmdoc@1.312 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntpd.html@1.158 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntpd.man.in@1.312 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpd/ntpd.mdoc.in@1.312 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpdc/invoke-ntpdc.texi@1.481 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpdc/ntpdc-opts.c@1.499 +7 -7
+ NTP_4_2_8P1_BETA2
+
+ ntpdc/ntpdc-opts.h@1.498 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpdc/ntpdc.1ntpdcman@1.312 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.312 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpdc/ntpdc.html@1.325 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpdc/ntpdc.man.in@1.312 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpdc/ntpdc.mdoc.in@1.312 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpq/invoke-ntpq.texi@1.487 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpq/ntpq-opts.c@1.504 +7 -7
+ NTP_4_2_8P1_BETA2
+
+ ntpq/ntpq-opts.h@1.502 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpq/ntpq.1ntpqman@1.315 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpq/ntpq.1ntpqmdoc@1.315 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpq/ntpq.html@1.155 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpq/ntpq.man.in@1.315 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpq/ntpq.mdoc.in@1.315 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.483 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.501 +7 -7
+ NTP_4_2_8P1_BETA2
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.500 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.312 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.312 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ ntpsnmpd/ntpsnmpd.html@1.153 +1 -1
+ NTP_4_2_8P1_BETA2
+
+ ntpsnmpd/ntpsnmpd.man.in@1.312 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.312 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ packageinfo.sh@1.495 +1 -1
+ NTP_4_2_8P1_BETA2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.74 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.74 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/calc_tickadj/calc_tickadj.html@1.76 +1 -1
+ NTP_4_2_8P1_BETA2
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.73 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.74 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.78 +1 -1
+ NTP_4_2_8P1_BETA2
+
+ scripts/invoke-plot_summary.texi@1.95 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/invoke-summary.texi@1.95 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.304 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntp-wait/ntp-wait-opts@1.40 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.302 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.302 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntp-wait/ntp-wait.html@1.321 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntp-wait/ntp-wait.man.in@1.302 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.302 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.93 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntpsweep/ntpsweep-opts@1.42 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.81 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.81 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntpsweep/ntpsweep.html@1.94 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntpsweep/ntpsweep.man.in@1.81 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.82 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.93 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntptrace/ntptrace-opts@1.42 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.81 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.81 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntptrace/ntptrace.html@1.94 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntptrace/ntptrace.man.in@1.81 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.82 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/plot_summary-opts@1.42 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/plot_summary.1plot_summaryman@1.93 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/plot_summary.1plot_summarymdoc@1.93 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/plot_summary.html@1.96 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/plot_summary.man.in@1.93 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/plot_summary.mdoc.in@1.93 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/summary-opts@1.42 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/summary.1summaryman@1.93 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/summary.1summarymdoc@1.93 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/summary.html@1.96 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ scripts/summary.man.in@1.93 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ scripts/summary.mdoc.in@1.93 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ sntp/invoke-sntp.texi@1.480 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ sntp/sntp-opts.c@1.498 +7 -7
+ NTP_4_2_8P1_BETA2
+
+ sntp/sntp-opts.h@1.497 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ sntp/sntp.1sntpman@1.315 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ sntp/sntp.1sntpmdoc@1.315 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ sntp/sntp.html@1.495 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ sntp/sntp.man.in@1.315 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ sntp/sntp.mdoc.in@1.315 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ util/invoke-ntp-keygen.texi@1.484 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ util/ntp-keygen-opts.c@1.501 +7 -7
+ NTP_4_2_8P1_BETA2
+
+ util/ntp-keygen-opts.h@1.500 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ util/ntp-keygen.1ntp-keygenman@1.312 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.312 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ util/ntp-keygen.html@1.159 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ util/ntp-keygen.man.in@1.312 +3 -3
+ NTP_4_2_8P1_BETA2
+
+ util/ntp-keygen.mdoc.in@1.312 +2 -2
+ NTP_4_2_8P1_BETA2
+
+ChangeSet@1.3280, 2014-12-26 22:21:06-05:00, stenn@deacon.udel.edu
+ [Bug 2674] Install sntp in sbin on NetBSD
+
+ ChangeLog@1.1603 +1 -0
+ [Bug 2674] Install sntp in sbin on NetBSD
+
+ sntp/loc/netbsd@1.3 +1 -1
+ [Bug 2674] Install sntp in sbin on NetBSD
+
+ChangeSet@1.3279, 2014-12-26 22:11:56-05:00, stenn@deacon.udel.edu
+ [Bug 2707] Avoid a C90 extension in libjsmn/jsmn.c
+
+ ChangeLog@1.1602 +1 -0
+ [Bug 2707] Avoid a C90 extension in libjsmn/jsmn.c
+
+ libjsmn/jsmn.c@1.2 +2 -1
+ [Bug 2707] Avoid a C90 extension in libjsmn/jsmn.c
+
+ChangeSet@1.3278, 2014-12-26 23:56:33+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL and sntp
+
+ ChangeLog@1.1601 +1 -0
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL and sntp
+
+ sntp/Makefile.am@1.77 +5 -4
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL and sntp
+
+ChangeSet@1.3277, 2014-12-26 23:50:15+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2709] see if we have a C99 compiler (not yet required)
+
+ ChangeLog@1.1600 +1 -1
+ [Bug 2709] see if we have a C99 compiler (not yet required)
+
+ChangeSet@1.3276, 2014-12-26 23:48:57+00:00, stenn@psp-deb1.ntp.org
+ build: see if we have a C99 compiler (not yet required)
+
+ ChangeLog@1.1599 +3 -0
+ build: see if we have a C99 compiler (not yet required)
+
+ sntp/m4/ntp_compiler.m4@1.5 +1 -0
+ build: see if we have a C99 compiler (not yet required)
+
+ChangeSet@1.3275, 2014-12-23 16:59:55-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8P1_BETA1
+ TAG: NTP_4_2_8P1_BETA1
+
+ ChangeLog@1.1598 +1 -0
+ NTP_4_2_8P1_BETA1
+
+ ntpd/invoke-ntp.conf.texi@1.169 +1 -1
+ NTP_4_2_8P1_BETA1
+
+ ntpd/invoke-ntp.keys.texi@1.166 +1 -1
+ NTP_4_2_8P1_BETA1
+
+ ntpd/invoke-ntpd.texi@1.482 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.conf.5man@1.203 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.conf.5mdoc@1.203 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.conf.html@1.162 +1 -1
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.conf.man.in@1.203 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.conf.mdoc.in@1.203 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.keys.5man@1.200 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.keys.5mdoc@1.200 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.keys.html@1.163 +1 -1
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.keys.man.in@1.200 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntp.keys.mdoc.in@1.200 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntpd-opts.c@1.503 +239 -239
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntpd-opts.h@1.502 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntpd.1ntpdman@1.311 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntpd.1ntpdmdoc@1.311 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntpd.html@1.157 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntpd.man.in@1.311 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpd/ntpd.mdoc.in@1.311 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpdc/invoke-ntpdc.texi@1.480 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpdc/ntpdc-opts.c@1.498 +107 -107
+ NTP_4_2_8P1_BETA1
+
+ ntpdc/ntpdc-opts.h@1.497 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpdc/ntpdc.1ntpdcman@1.311 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.311 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpdc/ntpdc.html@1.324 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpdc/ntpdc.man.in@1.311 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpdc/ntpdc.mdoc.in@1.311 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpq/invoke-ntpq.texi@1.486 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpq/ntpq-opts.c@1.503 +106 -106
+ NTP_4_2_8P1_BETA1
+
+ ntpq/ntpq-opts.h@1.501 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpq/ntpq.1ntpqman@1.314 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpq/ntpq.1ntpqmdoc@1.314 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpq/ntpq.html@1.154 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpq/ntpq.man.in@1.314 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpq/ntpq.mdoc.in@1.314 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.482 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.500 +68 -68
+ NTP_4_2_8P1_BETA1
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.499 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.311 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.311 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ ntpsnmpd/ntpsnmpd.html@1.152 +1 -1
+ NTP_4_2_8P1_BETA1
+
+ ntpsnmpd/ntpsnmpd.man.in@1.311 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.311 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ packageinfo.sh@1.494 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.73 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.73 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/calc_tickadj/calc_tickadj.html@1.75 +1 -1
+ NTP_4_2_8P1_BETA1
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.72 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.73 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.77 +1 -1
+ NTP_4_2_8P1_BETA1
+
+ scripts/invoke-plot_summary.texi@1.94 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/invoke-summary.texi@1.94 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.303 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntp-wait/ntp-wait-opts@1.39 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.301 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.301 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntp-wait/ntp-wait.html@1.320 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntp-wait/ntp-wait.man.in@1.301 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.301 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.92 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntpsweep/ntpsweep-opts@1.41 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.80 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.80 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntpsweep/ntpsweep.html@1.93 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntpsweep/ntpsweep.man.in@1.80 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.81 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.92 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntptrace/ntptrace-opts@1.41 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.80 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.80 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntptrace/ntptrace.html@1.93 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntptrace/ntptrace.man.in@1.80 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.81 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/plot_summary-opts@1.41 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/plot_summary.1plot_summaryman@1.92 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/plot_summary.1plot_summarymdoc@1.92 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/plot_summary.html@1.95 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/plot_summary.man.in@1.92 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/plot_summary.mdoc.in@1.92 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/summary-opts@1.41 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/summary.1summaryman@1.92 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/summary.1summarymdoc@1.92 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/summary.html@1.95 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ scripts/summary.man.in@1.92 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ scripts/summary.mdoc.in@1.92 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ sntp/invoke-sntp.texi@1.479 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ sntp/sntp-opts.c@1.497 +159 -159
+ NTP_4_2_8P1_BETA1
+
+ sntp/sntp-opts.h@1.496 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ sntp/sntp.1sntpman@1.314 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ sntp/sntp.1sntpmdoc@1.314 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ sntp/sntp.html@1.494 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ sntp/sntp.man.in@1.314 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ sntp/sntp.mdoc.in@1.314 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ util/invoke-ntp-keygen.texi@1.483 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ util/ntp-keygen-opts.c@1.500 +173 -173
+ NTP_4_2_8P1_BETA1
+
+ util/ntp-keygen-opts.h@1.499 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ util/ntp-keygen.1ntp-keygenman@1.311 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.311 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ util/ntp-keygen.html@1.158 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ util/ntp-keygen.man.in@1.311 +3 -3
+ NTP_4_2_8P1_BETA1
+
+ util/ntp-keygen.mdoc.in@1.311 +2 -2
+ NTP_4_2_8P1_BETA1
+
+ChangeSet@1.3274, 2014-12-23 21:36:47+00:00, stenn@psp-deb1.ntp.org
+ Disable config.cache-* files for now
+
+ build@1.49 +5 -1
+ Disable config.cache-* files for now
+
+ChangeSet@1.3273, 2014-12-23 04:34:37+00:00, stenn@psp-deb1.ntp.org
+ Update cvo.sh for new CentOS version format
+
+ sntp/scripts/cvo.sh@1.8 +7 -1
+ Update cvo.sh for new CentOS version format
+
+ChangeSet@1.3272, 2014-12-22 05:59:33+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL
+
+ ChangeLog@1.1597 +2 -1
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL
+
+ Makefile.am@1.124 +3 -2
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL
+
+ configure.ac@1.579 +5 -1
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL
+
+ libntp/ntp_crypto_rnd.c@1.2 +15 -0
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL
+
+ sntp/configure.ac@1.77 +8 -5
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL
+
+ sntp/m4/ntp_libevent.m4@1.12 +23 -2
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL
+
+ util/Makefile.am@1.77 +1 -0
+ [Bug 2693] ntp-keygen doesn't build without OpenSSL
+
+ChangeSet@1.3271, 2014-12-22 05:51:47+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2699] IN6_IS_ADDR_LOOPBACK build problems on some OSes
+
+ ChangeLog@1.1596 +1 -0
+ [Bug 2699] IN6_IS_ADDR_LOOPBACK build problems on some OSes
+
+ChangeSet@1.3270, 2014-12-22 02:55:14+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2699] HAVE_SYS_SELECT_H is misspelled in refclock_gpsdjson.c
+
+ ChangeLog@1.1595 +3 -0
+ [Bug 2699] HAVE_SYS_SELECT_H is misspelled in refclock_gpsdjson.c
+
+ ntpd/refclock_gpsdjson.c@1.15 +1 -1
+ [Bug 2699] HAVE_SYS_SELECT_H is misspelled in refclock_gpsdjson.c
+
+ChangeSet@1.3269, 2014-12-22 02:52:42+00:00, stenn@psp-deb1.ntp.org
+ NEWS file update
+
+ NEWS@1.129 +39 -12
+
+ChangeSet@1.3268, 2014-12-21 01:24:15+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs
+
+ ChangeLog@1.1594 +1 -0
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs
+
+ ntpd/ntp_io.c@1.397 +4 -6
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs
+
+ChangeSet@1.3267, 2014-12-21 00:35:39+00:00, stenn@psp-deb1.ntp.org
+ typo
+
+ build@1.48 +1 -1
+ typo
+
+ChangeSet@1.3266, 2014-12-19 07:53:07-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8
+ TAG: NTP_4_2_8
+
+ ChangeLog@1.1593 +1 -0
+ NTP_4_2_8
+
+ ntpd/invoke-ntp.conf.texi@1.168 +1 -1
+ NTP_4_2_8
+
+ ntpd/invoke-ntp.keys.texi@1.165 +1 -1
+ NTP_4_2_8
+
+ ntpd/invoke-ntpd.texi@1.481 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.conf.5man@1.202 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntp.conf.5mdoc@1.202 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.conf.html@1.161 +1 -1
+ NTP_4_2_8
+
+ ntpd/ntp.conf.man.in@1.202 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntp.conf.mdoc.in@1.202 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.keys.5man@1.199 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.keys.5mdoc@1.199 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.keys.html@1.162 +1 -1
+ NTP_4_2_8
+
+ ntpd/ntp.keys.man.in@1.199 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.keys.mdoc.in@1.199 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntpd-opts.c@1.502 +239 -239
+ NTP_4_2_8
+
+ ntpd/ntpd-opts.h@1.501 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntpd.1ntpdman@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntpd.1ntpdmdoc@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntpd.html@1.156 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntpd.man.in@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntpd.mdoc.in@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpdc/invoke-ntpdc.texi@1.479 +2 -2
+ NTP_4_2_8
+
+ ntpdc/ntpdc-opts.c@1.497 +107 -107
+ NTP_4_2_8
+
+ ntpdc/ntpdc-opts.h@1.496 +3 -3
+ NTP_4_2_8
+
+ ntpdc/ntpdc.1ntpdcman@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpdc/ntpdc.html@1.323 +2 -2
+ NTP_4_2_8
+
+ ntpdc/ntpdc.man.in@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpdc/ntpdc.mdoc.in@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpq/invoke-ntpq.texi@1.485 +2 -2
+ NTP_4_2_8
+
+ ntpq/ntpq-opts.c@1.502 +106 -106
+ NTP_4_2_8
+
+ ntpq/ntpq-opts.h@1.500 +3 -3
+ NTP_4_2_8
+
+ ntpq/ntpq.1ntpqman@1.313 +3 -3
+ NTP_4_2_8
+
+ ntpq/ntpq.1ntpqmdoc@1.313 +2 -2
+ NTP_4_2_8
+
+ ntpq/ntpq.html@1.153 +2 -2
+ NTP_4_2_8
+
+ ntpq/ntpq.man.in@1.313 +3 -3
+ NTP_4_2_8
+
+ ntpq/ntpq.mdoc.in@1.313 +2 -2
+ NTP_4_2_8
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.481 +2 -2
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.499 +68 -68
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.498 +3 -3
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.html@1.151 +1 -1
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.man.in@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.310 +2 -2
+ NTP_4_2_8
+
+ packageinfo.sh@1.493 +1 -1
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.72 +3 -3
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.72 +2 -2
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.html@1.74 +1 -1
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.71 +3 -3
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.72 +2 -2
+ NTP_4_2_8
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.76 +1 -1
+ NTP_4_2_8
+
+ scripts/invoke-plot_summary.texi@1.93 +2 -2
+ NTP_4_2_8
+
+ scripts/invoke-summary.texi@1.93 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.302 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait-opts@1.38 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.300 +3 -3
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.300 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.html@1.319 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.man.in@1.300 +3 -3
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.300 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep-opts@1.40 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.79 +3 -3
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.79 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.html@1.92 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.man.in@1.79 +3 -3
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.80 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace-opts@1.40 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.79 +3 -3
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.79 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.html@1.92 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.man.in@1.79 +3 -3
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.80 +2 -2
+ NTP_4_2_8
+
+ scripts/plot_summary-opts@1.40 +2 -2
+ NTP_4_2_8
+
+ scripts/plot_summary.1plot_summaryman@1.91 +3 -3
+ NTP_4_2_8
+
+ scripts/plot_summary.1plot_summarymdoc@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/plot_summary.html@1.94 +2 -2
+ NTP_4_2_8
+
+ scripts/plot_summary.man.in@1.91 +3 -3
+ NTP_4_2_8
+
+ scripts/plot_summary.mdoc.in@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/summary-opts@1.40 +2 -2
+ NTP_4_2_8
+
+ scripts/summary.1summaryman@1.91 +3 -3
+ NTP_4_2_8
+
+ scripts/summary.1summarymdoc@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/summary.html@1.94 +2 -2
+ NTP_4_2_8
+
+ scripts/summary.man.in@1.91 +3 -3
+ NTP_4_2_8
+
+ scripts/summary.mdoc.in@1.91 +2 -2
+ NTP_4_2_8
+
+ sntp/invoke-sntp.texi@1.478 +2 -2
+ NTP_4_2_8
+
+ sntp/sntp-opts.c@1.496 +159 -159
+ NTP_4_2_8
+
+ sntp/sntp-opts.h@1.495 +3 -3
+ NTP_4_2_8
+
+ sntp/sntp.1sntpman@1.313 +3 -3
+ NTP_4_2_8
+
+ sntp/sntp.1sntpmdoc@1.313 +2 -2
+ NTP_4_2_8
+
+ sntp/sntp.html@1.493 +2 -2
+ NTP_4_2_8
+
+ sntp/sntp.man.in@1.313 +3 -3
+ NTP_4_2_8
+
+ sntp/sntp.mdoc.in@1.313 +2 -2
+ NTP_4_2_8
+
+ util/invoke-ntp-keygen.texi@1.482 +2 -2
+ NTP_4_2_8
+
+ util/ntp-keygen-opts.c@1.499 +173 -173
+ NTP_4_2_8
+
+ util/ntp-keygen-opts.h@1.498 +3 -3
+ NTP_4_2_8
+
+ util/ntp-keygen.1ntp-keygenman@1.310 +3 -3
+ NTP_4_2_8
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.310 +2 -2
+ NTP_4_2_8
+
+ util/ntp-keygen.html@1.157 +2 -2
+ NTP_4_2_8
+
+ util/ntp-keygen.man.in@1.310 +3 -3
+ NTP_4_2_8
+
+ util/ntp-keygen.mdoc.in@1.310 +2 -2
+ NTP_4_2_8
+
+ChangeSet@1.3265, 2014-12-19 05:55:30-05:00, stenn@deacon.udel.edu
+ ntp-4.2.8
+
+ ChangeLog@1.1592 +2 -0
+ ntp-4.2.8
+
+ packageinfo.sh@1.492 +4 -4
+ ntp-4.2.8
+
+ChangeSet@1.3264, 2014-12-19 04:43:15-05:00, stenn@deacon.udel.edu
+ Disable Sec 2672 interim fix for now
+
+ ntpd/ntp_io.c@1.396 +3 -0
+ Disable Sec 2672 interim fix for now
+
+ChangeSet@1.3263, 2014-12-19 04:41:40-05:00, stenn@deacon.udel.edu
+ cleanup
+
+ ChangeLog@1.1591 +0 -2
+ cleanup
+
+ChangeSet@1.3245.1.7, 2014-12-19 08:05:17+00:00, stenn@psp-deb1.ntp.org
+ NEWS file for 4.2.8
+
+ NEWS@1.128 +136 -5
+ NEWS file for 4.2.8
+
+ChangeSet@1.3245.1.6, 2014-12-18 23:01:06-05:00, stenn@deacon.udel.edu
+ [Sec 730] Increase RSA_generate_key modulus
+
+ ChangeLog@1.1579.1.5 +1 -0
+ [Sec 730] Increase RSA_generate_key modulus
+
+ util/ntp-keygen.c@1.97.1.1 +2 -2
+ [Sec 730] Increase RSA_generate_key modulus
+
+ChangeSet@1.3245.1.5, 2014-12-18 21:42:38-05:00, stenn@deacon.udel.edu
+ [Bug 2691] Wrong variable name in refclock_ripencc.c
+
+ ChangeLog@1.1579.1.4 +1 -0
+ [Bug 2691] Wrong variable name in refclock_ripencc.c
+
+ ntpd/refclock_ripencc.c@1.18 +1 -1
+ [Bug 2691] Wrong variable name in refclock_ripencc.c
+
+ChangeSet@1.3260, 2014-12-18 13:14:59+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2671] vallen in extension fields are not validated
+
+ ChangeLog@1.1589 +1 -0
+ [Sec 2671] vallen in extension fields are not validated
+
+ ntpd/ntp_proto.c@1.352 +9 -1
+ [Sec 2671] vallen in extension fields are not validated
+
+ChangeSet@1.3259, 2014-12-18 13:11:35+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs: debug output tweaking
+
+ ntpd/ntp_io.c@1.395 +6 -2
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs: debug output tweaking
+
+ChangeSet@1.3256.1.1, 2014-12-18 10:08:38+00:00, stenn@psp-deb1.ntp.org
+ Comment cleanup
+
+ ntpd/ntp_crypto.c@1.170 +1 -0
+ Comment cleanup
+
+ChangeSet@1.3245.1.4, 2014-12-18 09:42:02+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P486_RC
+ TAG: NTP_4_2_7P486_RC
+
+ ChangeLog@1.1579.1.3 +1 -0
+ NTP_4_2_7P486_RC
+
+ ntpd/invoke-ntp.conf.texi@1.167 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpd/invoke-ntp.keys.texi@1.164 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpd/invoke-ntpd.texi@1.480 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.5man@1.201 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.5mdoc@1.201 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.html@1.160 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.man.in@1.201 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.mdoc.in@1.201 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.5man@1.198 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.5mdoc@1.198 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.html@1.161 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.man.in@1.198 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.mdoc.in@1.198 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd-opts.c@1.501 +7 -7
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd-opts.h@1.500 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.1ntpdman@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.1ntpdmdoc@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.html@1.155 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.man.in@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpdc/invoke-ntpdc.texi@1.478 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc-opts.c@1.496 +7 -7
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc-opts.h@1.495 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.1ntpdcman@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.html@1.322 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.man.in@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpq/invoke-ntpq.texi@1.484 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq-opts.c@1.501 +7 -7
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq-opts.h@1.499 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.1ntpqman@1.312 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.1ntpqmdoc@1.312 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.html@1.152 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.man.in@1.312 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.mdoc.in@1.312 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.480 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.498 +7 -7
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.497 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.html@1.150 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.man.in@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ packageinfo.sh@1.491 +1 -1
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.71 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.71 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.html@1.73 +1 -1
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.70 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.71 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.75 +1 -1
+ NTP_4_2_7P486_RC
+
+ scripts/invoke-plot_summary.texi@1.92 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/invoke-summary.texi@1.92 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.301 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait-opts@1.37 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.299 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.299 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.html@1.318 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.man.in@1.299 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.299 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep-opts@1.39 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.78 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.78 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.html@1.91 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.man.in@1.78 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace-opts@1.39 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.78 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.78 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.html@1.91 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.man.in@1.78 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary-opts@1.39 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.1plot_summaryman@1.90 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.1plot_summarymdoc@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.html@1.93 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.man.in@1.90 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/summary-opts@1.39 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/summary.1summaryman@1.90 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/summary.1summarymdoc@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/summary.html@1.93 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/summary.man.in@1.90 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/summary.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ sntp/invoke-sntp.texi@1.477 +2 -2
+ NTP_4_2_7P486_RC
+
+ sntp/sntp-opts.c@1.495 +7 -7
+ NTP_4_2_7P486_RC
+
+ sntp/sntp-opts.h@1.494 +3 -3
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.1sntpman@1.312 +3 -3
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.1sntpmdoc@1.312 +2 -2
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.html@1.492 +2 -2
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.man.in@1.312 +3 -3
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.mdoc.in@1.312 +2 -2
+ NTP_4_2_7P486_RC
+
+ util/invoke-ntp-keygen.texi@1.481 +2 -2
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen-opts.c@1.498 +7 -7
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen-opts.h@1.497 +3 -3
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.1ntp-keygenman@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.html@1.156 +2 -2
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.man.in@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ChangeSet@1.3255, 2014-12-18 01:18:29+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs
+
+ ChangeLog@1.1586 +1 -0
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs
+
+ ntpd/ntp_io.c@1.394 +20 -0
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs
+
+ChangeSet@1.3254, 2014-12-18 01:17:02+00:00, stenn@psp-deb1.ntp.org
+ ntp_io.c lint removal
+
+ ntpd/ntp_io.c@1.393 +4 -1
+ lint removal
+
+ChangeSet@1.3245.1.3, 2014-12-16 04:59:54-05:00, murray@pogo.udel.edu
+ refclock_hpgps.c:
+ Fix typo.
+
+ ntpd/refclock_hpgps.c@1.16 +1 -1
+ Fix typo.
+
+ChangeSet@1.3245.1.2, 2014-12-16 03:36:46-05:00, murray@pogo.udel.edu
+ refclock_hpgps.c, ChangeLog:
+ Fix for bug 2687: RefClock 26/hpgps doesn't work at default line speed
+
+ ChangeLog@1.1579.1.2 +1 -0
+ Fix for bug 2687: RefClock 26/hpgps doesn't work at default line speed
+
+ ntpd/refclock_hpgps.c@1.15 +6 -3
+ Fix for bug 2687: RefClock 26/hpgps doesn't work at default line speed
+
+ChangeSet@1.3253, 2014-12-15 13:12:45+00:00, stenn@psp-deb1.ntp.org
+ Use finer-grained config.cache files for our configure runs
+
+ build@1.47 +2 -2
+ Use finer-grained config.cache files for our configure runs
+
+ChangeSet@1.3252, 2014-12-15 05:40:20+00:00, stenn@psp-deb1.ntp.org
+ Quiet some debug output
+
+ sntp/m4/ntp_crypto_rand.m4@1.2 +1 -1
+ Quiet some debug output
+
+ChangeSet@1.3251, 2014-12-14 16:12:13+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ ChangeLog@1.1585 +1 -0
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ configure.ac@1.578 +2 -0
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ include/ntp_random.h@1.3 +3 -0
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ libntp/Makefile.am@1.75 +2 -1
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ libntp/ntp_crypto_rnd.c@1.1 +96 -0
+ BitKeeper file /home/stenn/ntp-dev-sec-2666/libntp/ntp_crypto_rnd.c
+
+ libntp/ntp_crypto_rnd.c@1.0 +0 -0
+
+ sntp/m4/ntp_crypto_rand.m4@1.1 +53 -0
+ BitKeeper file /home/stenn/ntp-dev-sec-2666/sntp/m4/ntp_crypto_rand.m4
+
+ sntp/m4/ntp_crypto_rand.m4@1.0 +0 -0
+
+ util/ntp-keygen.c@1.98 +10 -2
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ChangeSet@1.3245.1.1, 2014-12-12 11:58:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P485_RC
+ TAG: NTP_4_2_7P485_RC
+
+ ChangeLog@1.1579.1.1 +1 -0
+ NTP_4_2_7P485_RC
+
+ ntpd/invoke-ntp.conf.texi@1.166 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpd/invoke-ntp.keys.texi@1.163 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpd/invoke-ntpd.texi@1.479 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.5man@1.200 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.5mdoc@1.200 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.html@1.159 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.man.in@1.200 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.mdoc.in@1.200 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.5man@1.197 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.5mdoc@1.197 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.html@1.160 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.man.in@1.197 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.mdoc.in@1.197 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd-opts.c@1.500 +7 -7
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd-opts.h@1.499 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.1ntpdman@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.1ntpdmdoc@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.html@1.154 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.man.in@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpdc/invoke-ntpdc.texi@1.477 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc-opts.c@1.495 +7 -7
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc-opts.h@1.494 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.1ntpdcman@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.html@1.321 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.man.in@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpq/invoke-ntpq.texi@1.483 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq-opts.c@1.500 +7 -7
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq-opts.h@1.498 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.1ntpqman@1.311 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.1ntpqmdoc@1.311 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.html@1.151 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.man.in@1.311 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.mdoc.in@1.311 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.479 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.497 +7 -7
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.496 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.html@1.149 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.man.in@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ packageinfo.sh@1.490 +1 -1
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.70 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.70 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.html@1.72 +1 -1
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.69 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.74 +1 -1
+ NTP_4_2_7P485_RC
+
+ scripts/invoke-plot_summary.texi@1.91 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/invoke-summary.texi@1.91 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.300 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait-opts@1.36 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.298 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.298 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.html@1.317 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.man.in@1.298 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.298 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep-opts@1.38 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.77 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.77 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.html@1.90 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.man.in@1.77 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace-opts@1.38 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.77 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.77 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.html@1.90 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.man.in@1.77 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary-opts@1.38 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.1plot_summaryman@1.89 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.1plot_summarymdoc@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.html@1.92 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.man.in@1.89 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/summary-opts@1.38 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/summary.1summaryman@1.89 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/summary.1summarymdoc@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/summary.html@1.92 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/summary.man.in@1.89 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/summary.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ sntp/invoke-sntp.texi@1.476 +2 -2
+ NTP_4_2_7P485_RC
+
+ sntp/sntp-opts.c@1.494 +7 -7
+ NTP_4_2_7P485_RC
+
+ sntp/sntp-opts.h@1.493 +3 -3
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.1sntpman@1.311 +3 -3
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.1sntpmdoc@1.311 +2 -2
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.html@1.491 +2 -2
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.man.in@1.311 +3 -3
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.mdoc.in@1.311 +2 -2
+ NTP_4_2_7P485_RC
+
+ util/invoke-ntp-keygen.texi@1.480 +2 -2
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen-opts.c@1.497 +7 -7
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen-opts.h@1.496 +3 -3
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.1ntp-keygenman@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.html@1.155 +2 -2
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.man.in@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ChangeSet@1.3249, 2014-12-12 11:24:31+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2670] Missing return; from error clause
+
+ ChangeLog@1.1583 +1 -0
+ [Sec 2670] Missing return; from error clause
+
+ ntpd/ntp_proto.c@1.351 +1 -0
+ [Sec 2670] Missing return; from error clause
+
+ChangeSet@1.3248, 2014-12-12 11:19:49+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2669] buffer overflow in configure()
+
+ ChangeLog@1.1582 +1 -0
+ [Sec 2669] buffer overflow in configure()
+
+ ntpd/ntp_control.c@1.192 +14 -0
+ [Sec 2669] buffer overflow in configure()
+
+ChangeSet@1.3247, 2014-12-12 11:13:55+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2668] buffer overflow in ctl_putdata()
+
+ ChangeLog@1.1581 +1 -0
+ [Sec 2668] buffer overflow in ctl_putdata()
+
+ ntpd/ntp_control.c@1.191 +16 -1
+ [Sec 2668] buffer overflow in ctl_putdata()
+
+ChangeSet@1.3246, 2014-12-12 11:06:53+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2667] buffer overflow in crypto_recv()
+
+ ChangeLog@1.1580 +1 -0
+ [Sec 2667] buffer overflow in crypto_recv()
+
+ ntpd/ntp_crypto.c@1.169 +12 -3
+ [Sec 2667] buffer overflow in crypto_recv()
+
+ChangeSet@1.3245, 2014-12-12 08:49:58+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present
+
+ ChangeLog@1.1579 +1 -0
+ [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present
+
+ configure.ac@1.577 +5 -1
+ [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present
+
+ChangeSet@1.3244, 2014-12-11 12:13:16+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P484_RC
+ TAG: NTP_4_2_7P484_RC
+
+ ChangeLog@1.1578 +1 -0
+ NTP_4_2_7P484_RC
+
+ ntpd/invoke-ntp.conf.texi@1.165 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpd/invoke-ntp.keys.texi@1.162 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpd/invoke-ntpd.texi@1.478 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.5man@1.199 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.5mdoc@1.199 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.html@1.158 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.man.in@1.199 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.mdoc.in@1.199 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.5man@1.196 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.5mdoc@1.196 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.html@1.159 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.man.in@1.196 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.mdoc.in@1.196 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd-opts.c@1.499 +239 -239
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd-opts.h@1.498 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.1ntpdman@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.1ntpdmdoc@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.html@1.153 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.man.in@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpdc/invoke-ntpdc.texi@1.476 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc-opts.c@1.494 +106 -106
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc-opts.h@1.493 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.1ntpdcman@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.html@1.320 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.man.in@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpq/invoke-ntpq.texi@1.482 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq-opts.c@1.499 +105 -105
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq-opts.h@1.497 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.1ntpqman@1.310 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.1ntpqmdoc@1.310 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.html@1.150 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.man.in@1.310 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.mdoc.in@1.310 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.478 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.496 +67 -67
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.495 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.html@1.148 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.man.in@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ packageinfo.sh@1.489 +1 -1
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.69 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.69 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.html@1.71 +1 -1
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.68 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.69 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.73 +1 -1
+ NTP_4_2_7P484_RC
+
+ scripts/invoke-plot_summary.texi@1.90 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/invoke-summary.texi@1.90 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.299 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait-opts@1.35 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.297 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.297 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.html@1.316 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.man.in@1.297 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.297 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep-opts@1.37 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.76 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.76 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.html@1.89 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.man.in@1.76 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace-opts@1.37 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.76 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.76 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.html@1.89 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.man.in@1.76 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary-opts@1.37 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.1plot_summaryman@1.88 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.1plot_summarymdoc@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.html@1.91 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.man.in@1.88 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/summary-opts@1.37 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/summary.1summaryman@1.88 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/summary.1summarymdoc@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/summary.html@1.91 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/summary.man.in@1.88 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/summary.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ sntp/invoke-sntp.texi@1.475 +2 -2
+ NTP_4_2_7P484_RC
+
+ sntp/sntp-opts.c@1.493 +158 -158
+ NTP_4_2_7P484_RC
+
+ sntp/sntp-opts.h@1.492 +3 -3
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.1sntpman@1.310 +3 -3
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.1sntpmdoc@1.310 +2 -2
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.html@1.490 +2 -2
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.man.in@1.310 +3 -3
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.mdoc.in@1.310 +2 -2
+ NTP_4_2_7P484_RC
+
+ util/invoke-ntp-keygen.texi@1.479 +2 -2
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen-opts.c@1.496 +172 -172
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen-opts.h@1.495 +3 -3
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.1ntp-keygenman@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.html@1.154 +2 -2
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.man.in@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ChangeSet@1.3243, 2014-12-11 06:51:38-05:00, stenn@deacon.udel.edu
+ Start the RC cycle for 4.2.8
+
+ packageinfo.sh@1.488 +1 -1
+ Start the RC cycle for 4.2.8
+
+ChangeSet@1.3242, 2014-12-08 08:59:52+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P483
+ TAG: NTP_4_2_7P483
+
+ ChangeLog@1.1577 +1 -0
+ NTP_4_2_7P483
+
+ ntpd/invoke-ntp.conf.texi@1.164 +1 -1
+ NTP_4_2_7P483
+
+ ntpd/invoke-ntp.keys.texi@1.161 +1 -1
+ NTP_4_2_7P483
+
+ ntpd/invoke-ntpd.texi@1.477 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.5man@1.198 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.5mdoc@1.198 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.html@1.157 +1 -1
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.man.in@1.198 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.mdoc.in@1.198 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.5man@1.195 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.5mdoc@1.195 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.html@1.158 +1 -1
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.man.in@1.195 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.mdoc.in@1.195 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntpd-opts.c@1.498 +7 -7
+ NTP_4_2_7P483
+
+ ntpd/ntpd-opts.h@1.497 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntpd.1ntpdman@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntpd.1ntpdmdoc@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntpd.html@1.152 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntpd.man.in@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntpd.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpdc/invoke-ntpdc.texi@1.475 +2 -2
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc-opts.c@1.493 +7 -7
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc-opts.h@1.492 +3 -3
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.1ntpdcman@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.html@1.319 +2 -2
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.man.in@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpq/invoke-ntpq.texi@1.481 +2 -2
+ NTP_4_2_7P483
+
+ ntpq/ntpq-opts.c@1.498 +7 -7
+ NTP_4_2_7P483
+
+ ntpq/ntpq-opts.h@1.496 +3 -3
+ NTP_4_2_7P483
+
+ ntpq/ntpq.1ntpqman@1.309 +3 -3
+ NTP_4_2_7P483
+
+ ntpq/ntpq.1ntpqmdoc@1.309 +2 -2
+ NTP_4_2_7P483
+
+ ntpq/ntpq.html@1.149 +2 -2
+ NTP_4_2_7P483
+
+ ntpq/ntpq.man.in@1.309 +3 -3
+ NTP_4_2_7P483
+
+ ntpq/ntpq.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P483
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.477 +2 -2
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.495 +7 -7
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.494 +3 -3
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.html@1.147 +1 -1
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.man.in@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P483
+
+ packageinfo.sh@1.487 +1 -1
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.68 +3 -3
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.68 +2 -2
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.html@1.70 +1 -1
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.67 +3 -3
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.72 +1 -1
+ NTP_4_2_7P483
+
+ scripts/invoke-plot_summary.texi@1.89 +2 -2
+ NTP_4_2_7P483
+
+ scripts/invoke-summary.texi@1.89 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.298 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait-opts@1.34 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.296 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.296 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.html@1.315 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.man.in@1.296 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.296 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep-opts@1.36 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.75 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.75 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.html@1.88 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.man.in@1.75 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace-opts@1.36 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.75 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.75 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.html@1.88 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.man.in@1.75 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P483
+
+ scripts/plot_summary-opts@1.36 +2 -2
+ NTP_4_2_7P483
+
+ scripts/plot_summary.1plot_summaryman@1.87 +3 -3
+ NTP_4_2_7P483
+
+ scripts/plot_summary.1plot_summarymdoc@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/plot_summary.html@1.90 +2 -2
+ NTP_4_2_7P483
+
+ scripts/plot_summary.man.in@1.87 +3 -3
+ NTP_4_2_7P483
+
+ scripts/plot_summary.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/summary-opts@1.36 +2 -2
+ NTP_4_2_7P483
+
+ scripts/summary.1summaryman@1.87 +3 -3
+ NTP_4_2_7P483
+
+ scripts/summary.1summarymdoc@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/summary.html@1.90 +2 -2
+ NTP_4_2_7P483
+
+ scripts/summary.man.in@1.87 +3 -3
+ NTP_4_2_7P483
+
+ scripts/summary.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P483
+
+ sntp/invoke-sntp.texi@1.474 +4 -3
+ NTP_4_2_7P483
+
+ sntp/sntp-opts.c@1.492 +9 -8
+ NTP_4_2_7P483
+
+ sntp/sntp-opts.h@1.491 +3 -3
+ NTP_4_2_7P483
+
+ sntp/sntp.1sntpman@1.309 +5 -4
+ NTP_4_2_7P483
+
+ sntp/sntp.1sntpmdoc@1.309 +4 -3
+ NTP_4_2_7P483
+
+ sntp/sntp.html@1.489 +4 -3
+ NTP_4_2_7P483
+
+ sntp/sntp.man.in@1.309 +5 -4
+ NTP_4_2_7P483
+
+ sntp/sntp.mdoc.in@1.309 +4 -3
+ NTP_4_2_7P483
+
+ util/invoke-ntp-keygen.texi@1.478 +2 -2
+ NTP_4_2_7P483
+
+ util/ntp-keygen-opts.c@1.495 +7 -7
+ NTP_4_2_7P483
+
+ util/ntp-keygen-opts.h@1.494 +3 -3
+ NTP_4_2_7P483
+
+ util/ntp-keygen.1ntp-keygenman@1.306 +3 -3
+ NTP_4_2_7P483
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.306 +2 -2
+ NTP_4_2_7P483
+
+ util/ntp-keygen.html@1.153 +2 -2
+ NTP_4_2_7P483
+
+ util/ntp-keygen.man.in@1.306 +3 -3
+ NTP_4_2_7P483
+
+ util/ntp-keygen.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P483
+
+ChangeSet@1.3241, 2014-12-07 11:30:07+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2685] Better document the KOD file for sntp
+
+ ChangeLog@1.1576 +1 -0
+ [Bug 2685] Better document the KOD file for sntp
+
+ html/sntp.html@1.11 +3 -2
+ [Bug 2685] Better document the KOD file for sntp
+
+ sntp/sntp-opts.def@1.45 +2 -1
+ [Bug 2685] Better document the KOD file for sntp
+
ChangeSet@1.3240, 2014-12-02 08:59:55+00:00, stenn@deacon.udel.edu
NTP_4_2_7P482
TAG: NTP_4_2_7P482
@@ -176078,7 +183957,7 @@ ChangeSet@1.1251.85.3, 2006-04-21 00:09:43-04:00, stenn@whimsy.udel.edu
NTP_4_2_1P241_RC
ChangeSet@1.1251.85.2, 2006-04-20 23:59:56-04:00, stenn@whimsy.udel.edu
- [Bug 527] Losed signalled IO.
+ [Bug 527] Lose signalled IO.
configure.ac@1.359.1.28 +7 -2
[Bug 527] Losed signalled IO.
@@ -177530,7 +185409,7 @@ ChangeSet@1.1251.67.12, 2005-10-27 21:38:04-04:00, stenn@deacon.udel.edu
[Bug 516] unprotected crypto_update() call fix from Dave Mills
ChangeSet@1.1251.67.11, 2005-10-25 20:15:47-04:00, stenn@deacon.udel.edu
- [Bug 519] Allow dynamic SSL libraries
+ [Bug 517] Allow dynamic SSL libraries
configure.ac@1.359.1.24 +3 -2
[Bug 519] Allow dynamic SSL libraries: also check /usr/sfw/{lib,include}
@@ -183006,7 +190885,8 @@ ChangeSet@1.1251.1.29, 2004-11-29 00:45:58-05:00, stenn@whimsy.udel.edu
[Bug 363] ntpdate: use -1 to represent an invalid fd (from Rainer Weikusat)
ChangeSet@1.1251.1.28, 2004-11-28 03:35:01-05:00, stenn@whimsy.udel.edu
- [Bug 363] ntpdate: use -1 to represent an invalid fd
+ [Bug 363] ntpdate: use -1 to represent an invalid fd.
+ Fix from Rainer Weikusat.
ntpdate/ntpdate.c@1.48 +2 -2
[Bug 363] ntpdate: use -1 to represent an invalid fd
diff --git a/Makefile.am b/Makefile.am
index 2908f96..fc76719 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,10 @@ ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/libevent/m4 -I sntp/libopts/m4
NULL =
+# moved sntp first to get libtool and libevent built.
+
SUBDIRS = \
+ sntp \
scripts \
include \
libntp \
@@ -17,7 +20,6 @@ SUBDIRS = \
clockstuff \
kernel \
util \
- sntp \
tests \
$(NULL)
@@ -64,7 +66,6 @@ BUILT_SOURCES = \
.gcc-warning \
libtool \
html/.datecheck \
- sntp/built-sources-only \
$(srcdir)/COPYRIGHT \
$(srcdir)/.checkChangeLog \
$(NULL)
diff --git a/Makefile.in b/Makefile.in
index 3ab13a2..47232a6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -36,19 +36,20 @@ host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(top_srcdir)/configure ChangeLog INSTALL NEWS TODO install-sh \
+ $(top_srcdir)/configure ChangeLog INSTALL NEWS TODO compile \
+ config.guess config.sub depcomp install-sh ltmain.sh missing \
sntp/libevent/build-aux/compile \
sntp/libevent/build-aux/config.guess \
sntp/libevent/build-aux/config.sub \
sntp/libevent/build-aux/depcomp \
sntp/libevent/build-aux/install-sh \
sntp/libevent/build-aux/ltmain.sh \
- sntp/libevent/build-aux/missing sntp/libevent/build-aux/ylwrap
+ sntp/libevent/build-aux/missing sntp/libevent/build-aux/ylwrap \
+ ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -59,6 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -76,6 +78,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -168,6 +172,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -202,7 +207,9 @@ 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@
@@ -341,6 +348,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
@@ -401,7 +413,10 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/libevent/m4 -I sntp/libopts/m4
NULL =
+
+# moved sntp first to get libtool and libevent built.
SUBDIRS = \
+ sntp \
scripts \
include \
libntp \
@@ -416,7 +431,6 @@ SUBDIRS = \
clockstuff \
kernel \
util \
- sntp \
tests \
$(NULL)
@@ -462,7 +476,6 @@ BUILT_SOURCES = \
.gcc-warning \
libtool \
html/.datecheck \
- sntp/built-sources-only \
$(srcdir)/COPYRIGHT \
$(srcdir)/.checkChangeLog \
$(NULL)
diff --git a/NEWS b/NEWS
index bbd260e..a425a9a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,368 @@
---
-NTP 4.2.8-
+NTP 4.2.8p2 (Harlan Stenn <stenn@ntp.org>, 2015/04/xx)
+
+Focus: Security and Bug fixes, enhancements.
+
+Severity: MEDIUM
+
+In addition to bug fixes and enhancements, this release fixes the
+following medium-severity vulnerabilities involving private key
+authentication:
+
+* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+
+ References: Sec 2779 / CVE-2015-1798 / VU#374268
+ Affects: All NTP4 releases starting with ntp-4.2.5p99 up to but not
+ including ntp-4.2.8p2 where the installation uses symmetric keys
+ to authenticate remote associations.
+ CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
+ Date Resolved: Stable (4.2.8p2) 07 Apr 2015
+ Summary: When ntpd is configured to use a symmetric key to authenticate
+ a remote NTP server/peer, it checks if the NTP message
+ authentication code (MAC) in received packets is valid, but not if
+ there actually is any MAC included. Packets without a MAC are
+ accepted as if they had a valid MAC. This allows a MITM attacker to
+ send false packets that are accepted by the client/peer without
+ having to know the symmetric key. The attacker needs to know the
+ transmit timestamp of the client to match it in the forged reply
+ and the false reply needs to reach the client before the genuine
+ reply from the server. The attacker doesn't necessarily need to be
+ relaying the packets between the client and the server.
+
+ Authentication using autokey doesn't have this problem as there is
+ a check that requires the key ID to be larger than NTP_MAXKEY,
+ which fails for packets without a MAC.
+ Mitigation:
+ Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Configure ntpd with enough time sources and monitor it properly.
+ Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
+
+* [Sec 2781] Authentication doesn't protect symmetric associations against
+ DoS attacks.
+
+ References: Sec 2781 / CVE-2015-1799 / VU#374268
+ Affects: All NTP releases starting with at least xntp3.3wy up to but
+ not including ntp-4.2.8p2 where the installation uses symmetric
+ key authentication.
+ CVSS: (AV:A/AC:M/Au:N/C:P/I:P/A:P) Base Score: 5.4
+ Note: the CVSS base Score for this issue could be 4.3 or lower, and
+ it could be higher than 5.4.
+ Date Resolved: Stable (4.2.8p2) 07 Apr 2015
+ Summary: An attacker knowing that NTP hosts A and B are peering with
+ each other (symmetric association) can send a packet to host A
+ with source address of B which will set the NTP state variables
+ on A to the values sent by the attacker. Host A will then send
+ on its next poll to B a packet with originate timestamp that
+ doesn't match the transmit timestamp of B and the packet will
+ be dropped. If the attacker does this periodically for both
+ hosts, they won't be able to synchronize to each other. This is
+ a known denial-of-service attack, described at
+ https://www.eecis.udel.edu/~mills/onwire.html .
+
+ According to the document the NTP authentication is supposed to
+ protect symmetric associations against this attack, but that
+ doesn't seem to be the case. The state variables are updated even
+ when authentication fails and the peers are sending packets with
+ originate timestamps that don't match the transmit timestamps on
+ the receiving side.
+
+ This seems to be a very old problem, dating back to at least
+ xntp3.3wy. It's also in the NTPv3 (RFC 1305) and NTPv4 (RFC 5905)
+ specifications, so other NTP implementations with support for
+ symmetric associations and authentication may be vulnerable too.
+ An update to the NTP RFC to correct this error is in-process.
+ Mitigation:
+ Upgrade to 4.2.8p2, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Note that for users of autokey, this specific style of MITM attack
+ is simply a long-known potential problem.
+ Configure ntpd with appropriate time sources and monitor ntpd.
+ Alert your staff if problems are detected.
+ Credit: This issue was discovered by Miroslav Lichvar, of Red Hat.
+
+* New script: update-leap
+The update-leap script will verify and if necessary, update the
+leap-second definition file.
+It requires the following commands in order to work:
+
+ wget logger tr sed shasum
+
+Some may choose to run this from cron. It needs more portability testing.
+
+Bug Fixes and Improvements:
+
+* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003.
+* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument.
+* [Bug 2346] "graceful termination" signals do not do peer cleanup.
+* [Bug 2728] See if C99-style structure initialization works.
+* [Bug 2747] Upgrade libevent to 2.1.5-beta.
+* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. .
+* [Bug 2751] jitter.h has stale copies of l_fp macros.
+* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM.
+* [Bug 2757] Quiet compiler warnings.
+* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
+* [Bug 2763] Allow different thresholds for forward and backward steps.
+* [Bug 2766] ntp-keygen output files should not be world-readable.
+* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
+* [Bug 2771] nonvolatile value is documented in wrong units.
+* [Bug 2773] Early leap announcement from Palisade/Thunderbolt
+* [Bug 2774] Unreasonably verbose printout - leap pending/warning
+* [Bug 2775] ntp-keygen.c fails to compile under Windows.
+* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info.
+ Removed non-ASCII characters from some copyright comments.
+ Removed trailing whitespace.
+ Updated definitions for Meinberg clocks from current Meinberg header files.
+ Now use C99 fixed-width types and avoid non-ASCII characters in comments.
+ Account for updated definitions pulled from Meinberg header files.
+ Updated comments on Meinberg GPS receivers which are not only called GPS16x.
+ Replaced some constant numbers by defines from ntp_calendar.h
+ Modified creation of parse-specific variables for Meinberg devices
+ in gps16x_message().
+ Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates.
+ Modified mbg_tm_str() which now expexts an additional parameter controlling
+ if the time status shall be printed.
+* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto.
+* [Sec 2781] Authentication doesn't protect symmetric associations against
+ DoS attacks.
+* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
+* [Bug 2789] Quiet compiler warnings from libevent.
+* [Bug 2790] If ntpd sets the Windows MM timer highest resolution
+ pause briefly before measuring system clock precision to yield
+ correct results.
+* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer.
+* Use predefined function types for parse driver functions
+ used to set up function pointers.
+ Account for changed prototype of parse_inp_fnc_t functions.
+ Cast parse conversion results to appropriate types to avoid
+ compiler warnings.
+ Let ioctl() for Windows accept a (void *) to avoid compiler warnings
+ when called with pointers to different types.
+
+---
+NTP 4.2.8p1 (Harlan Stenn <stenn@ntp.org>, 2015/02/04)
+
+Focus: Security and Bug fixes, enhancements.
+
+Severity: HIGH
+
+In addition to bug fixes and enhancements, this release fixes the
+following high-severity vulnerabilities:
+
+* vallen is not validated in several places in ntp_crypto.c, leading
+ to a potential information leak or possibly a crash
+
+ References: Sec 2671 / CVE-2014-9297 / VU#852879
+ Affects: All NTP4 releases before 4.2.8p1 that are running autokey.
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Date Resolved: Stable (4.2.8p1) 04 Feb 2015
+ Summary: The vallen packet value is not validated in several code
+ paths in ntp_crypto.c which can lead to information leakage
+ or perhaps a crash of the ntpd process.
+ Mitigation - any of:
+ Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page.
+ Disable Autokey Authentication by removing, or commenting out,
+ all configuration directives beginning with the "crypto"
+ keyword in your ntp.conf file.
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team, with additional cases found by Sebastian
+ Krahmer of the SUSE Security Team and Harlan Stenn of Network
+ Time Foundation.
+
+* ::1 can be spoofed on some OSes, so ACLs based on IPv6 ::1 addresses
+ can be bypassed.
+
+ References: Sec 2672 / CVE-2014-9298 / VU#852879
+ Affects: All NTP4 releases before 4.2.8p1, under at least some
+ versions of MacOS and Linux. *BSD has not been seen to be vulnerable.
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:C) Base Score: 9
+ Date Resolved: Stable (4.2.8p1) 04 Feb 2014
+ Summary: While available kernels will prevent 127.0.0.1 addresses
+ from "appearing" on non-localhost IPv4 interfaces, some kernels
+ do not offer the same protection for ::1 source addresses on
+ IPv6 interfaces. Since NTP's access control is based on source
+ address and localhost addresses generally have no restrictions,
+ an attacker can send malicious control and configuration packets
+ by spoofing ::1 addresses from the outside. Note Well: This is
+ not really a bug in NTP, it's a problem with some OSes. If you
+ have one of these OSes where ::1 can be spoofed, ALL ::1 -based
+ ACL restrictions on any application can be bypassed!
+ Mitigation:
+ Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
+ or the NTP Public Services Project Download Page
+ Install firewall rules to block packets claiming to come from
+ ::1 from inappropriate network interfaces.
+ Credit: This vulnerability was discovered by Stephen Roettger of
+ the Google Security Team.
+
+Additionally, over 30 bugfixes and improvements were made to the codebase.
+See the ChangeLog for more information.
+
+---
+NTP 4.2.8 (Harlan Stenn <stenn@ntp.org>, 2014/12/18)
+
+Focus: Security and Bug fixes, enhancements.
+
+Severity: HIGH
+
+In addition to bug fixes and enhancements, this release fixes the
+following high-severity vulnerabilities:
+
+************************** vv NOTE WELL vv *****************************
+
+The vulnerabilities listed below can be significantly mitigated by
+following the BCP of putting
+
+ restrict default ... noquery
+
+in the ntp.conf file. With the exception of:
+
+ receive(): missing return on error
+ References: Sec 2670 / CVE-2014-9296 / VU#852879
+
+below (which is a limited-risk vulnerability), none of the recent
+vulnerabilities listed below can be exploited if the source IP is
+restricted from sending a 'query'-class packet by your ntp.conf file.
+
+************************** ^^ NOTE WELL ^^ *****************************
+
+* Weak default key in config_auth().
+
+ References: [Sec 2665] / CVE-2014-9293 / VU#852879
+ CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
+ Vulnerable Versions: all releases prior to 4.2.7p11
+ Date Resolved: 28 Jan 2010
+
+ Summary: If no 'auth' key is set in the configuration file, ntpd
+ would generate a random key on the fly. There were two
+ problems with this: 1) the generated key was 31 bits in size,
+ and 2) it used the (now weak) ntp_random() function, which was
+ seeded with a 32-bit value and could only provide 32 bits of
+ entropy. This was sufficient back in the late 1990s when the
+ code was written. Not today.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.7p11 or later.
+ - Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
+
+ Credit: This vulnerability was noticed in ntp-4.2.6 by Neel Mehta
+ of the Google Security Team.
+
+* Non-cryptographic random number generator with weak seed used by
+ ntp-keygen to generate symmetric keys.
+
+ References: [Sec 2666] / CVE-2014-9294 / VU#852879
+ CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
+ Vulnerable Versions: All NTP4 releases before 4.2.7p230
+ Date Resolved: Dev (4.2.7p230) 01 Nov 2011
+
+ Summary: Prior to ntp-4.2.7p230 ntp-keygen used a weak seed to
+ prepare a random number generator that was of good quality back
+ in the late 1990s. The random numbers produced was then used to
+ generate symmetric keys. In ntp-4.2.8 we use a current-technology
+ cryptographic random number generator, either RAND_bytes from
+ OpenSSL, or arc4random().
+
+ Mitigation - any of:
+ - Upgrade to 4.2.7p230 or later.
+ - Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
+
+ Credit: This vulnerability was discovered in ntp-4.2.6 by
+ Stephen Roettger of the Google Security Team.
+
+* Buffer overflow in crypto_recv()
+
+ References: Sec 2667 / CVE-2014-9295 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Versions: All releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: When Autokey Authentication is enabled (i.e. the ntp.conf
+ file contains a 'crypto pw ...' directive) a remote attacker
+ can send a carefully crafted packet that can overflow a stack
+ buffer and potentially allow malicious code to be executed
+ with the privilege level of the ntpd process.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.8, or later, or
+ - Disable Autokey Authentication by removing, or commenting out,
+ all configuration directives beginning with the crypto keyword
+ in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+* Buffer overflow in ctl_putdata()
+
+ References: Sec 2668 / CVE-2014-9295 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Versions: All NTP4 releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: A remote attacker can send a carefully crafted packet that
+ can overflow a stack buffer and potentially allow malicious
+ code to be executed with the privilege level of the ntpd process.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.8, or later.
+ - Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+* Buffer overflow in configure()
+
+ References: Sec 2669 / CVE-2014-9295 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Versions: All NTP4 releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: A remote attacker can send a carefully crafted packet that
+ can overflow a stack buffer and potentially allow malicious
+ code to be executed with the privilege level of the ntpd process.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.8, or later.
+ - Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+* receive(): missing return on error
+
+ References: Sec 2670 / CVE-2014-9296 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:N/I:N/A:P) Base Score: 5.0
+ Versions: All NTP4 releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: Code in ntp_proto.c:receive() was missing a 'return;' in
+ the code path where an error was detected, which meant
+ processing did not stop when a specific rare error occurred.
+ We haven't found a way for this bug to affect system integrity.
+ If there is no way to affect system integrity the base CVSS
+ score for this bug is 0. If there is one avenue through which
+ system integrity can be partially affected, the base score
+ becomes a 5. If system integrity can be partially affected
+ via all three integrity metrics, the CVSS base score become 7.5.
+
+ Mitigation - any of:
+ - Upgrade to 4.2.8, or later,
+ - Remove or comment out all configuration directives
+ beginning with the crypto keyword in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+See http://support.ntp.org/security for more information.
+
+New features / changes in this release:
Important Changes
* Internal NTP Era counters
-The internal counters that track which "era" (range of years) we are in
+The internal counters that track the "era" (range of years) we are in
rolls over every 136 years'. The current "era" started at the stroke of
midnight on 1 Jan 1900, and ends just before the stroke of midnight on
1 Jan 2036.
@@ -16,8 +373,6 @@ more. We now compile a timestamp into the ntpd executable and when we
get a timestamp we us the "built-on" to tell us what era we are in.
This check "looks back" 10 years, and "looks forward" 126 years.
-So if you have a system that ...
-
* ntpdc responses disabled by default
Dave Hart writes:
@@ -40,7 +395,7 @@ ntpq's text-based, label=value approach involves more code reuse and
allows compatible changes without extra work in most cases.
Mode 7 has always been defined as vendor/implementation-specific while
-mode 6 is described in RFC 1305 and intended to be open to interop
+mode 6 is described in RFC 1305 and intended to be open to interoperate
with other implementations. There is an early draft of an updated
mode 6 description that likely will join the other NTPv4 RFCs
eventually. (http://tools.ietf.org/html/draft-odonoghue-ntpv4-control-01)
@@ -51,6 +406,10 @@ deprecating ntpdc. If you are in the habit of using ntpdc for certain
operations, please try the ntpq equivalent. If there's no equivalent,
please open a bug report at http://bugs.ntp.org./
+In addition to the above, over 1100 issues have been resolved between
+the 4.2.6 branch and 4.2.8. The ChangeLog file in the distribution
+lists these.
+
---
NTP 4.2.6p5 (Harlan Stenn <stenn@ntp.org>, 2011/12/24)
diff --git a/aclocal.m4 b/aclocal.m4
index 4ae90ff..24036a4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1132,8 +1132,7 @@ AC_SUBST([am__untar])
m4_include([sntp/libopts/m4/libopts.m4])
m4_include([sntp/libopts/m4/stdnoreturn.m4])
-m4_include([sntp/libevent/m4/openldap-thread-check.m4])
-m4_include([sntp/libevent/m4/openldap.m4])
+m4_include([sntp/m4/ax_c99_struct_init.m4])
m4_include([sntp/m4/define_dir.m4])
m4_include([sntp/m4/hms_search_lib.m4])
m4_include([sntp/m4/libtool.m4])
@@ -1144,6 +1143,7 @@ m4_include([sntp/m4/lt~obsolete.m4])
m4_include([sntp/m4/ntp_cacheversion.m4])
m4_include([sntp/m4/ntp_compiler.m4])
m4_include([sntp/m4/ntp_crosscompile.m4])
+m4_include([sntp/m4/ntp_crypto_rand.m4])
m4_include([sntp/m4/ntp_debug.m4])
m4_include([sntp/m4/ntp_dir_sep.m4])
m4_include([sntp/m4/ntp_facilitynames.m4])
@@ -1161,5 +1161,7 @@ m4_include([sntp/m4/ntp_rlimit.m4])
m4_include([sntp/m4/ntp_sntp.m4])
m4_include([sntp/m4/ntp_ver_suffix.m4])
m4_include([sntp/m4/ntp_vpathhack.m4])
+m4_include([sntp/m4/openldap-thread-check.m4])
+m4_include([sntp/m4/openldap.m4])
m4_include([sntp/m4/os_cflags.m4])
m4_include([sntp/m4/snprintf.m4])
diff --git a/adjtimed/Makefile.in b/adjtimed/Makefile.in
index 67394eb..56f4dfb 100644
--- a/adjtimed/Makefile.in
+++ b/adjtimed/Makefile.in
@@ -49,8 +49,7 @@ subdir = adjtimed
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -61,6 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -78,6 +78,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -152,6 +154,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -186,7 +189,9 @@ 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@
@@ -325,6 +330,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/build b/build
index 75f20a2..15fe39a 100755
--- a/build
+++ b/build
@@ -162,7 +162,11 @@ if [ -z "$TEST" ] ; then
fi
fi
-CONFIGURE="../configure --cache-file=../config.cache-$IAM$CCSUF $CONFIG_ARGS"
+CONFIGURE="../configure"
+# We need KEYSUF because of RAND_ and others, and -noopenssl"
+#CONFIGURE="$CONFIGURE --cache-file=../config.cache-$IAM$KEYSUF$CCSUF"
+CONFIGURE="$CONFIGURE $CONFIG_ARGS"
+
( # This sequence of commands is logged to make.log.
# If config.status is newer than ../configure, and the same
diff --git a/clockstuff/Makefile.in b/clockstuff/Makefile.in
index 179c98d..c852adb 100644
--- a/clockstuff/Makefile.in
+++ b/clockstuff/Makefile.in
@@ -42,8 +42,7 @@ subdir = clockstuff
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -54,6 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -71,6 +71,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -148,6 +150,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -182,7 +185,9 @@ 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@
@@ -321,6 +326,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/compile b/compile
new file mode 100755
index 0000000..1b1d232
--- /dev/null
+++ b/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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 2, 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..b02565c
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1517 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+timestamp='2011-06-03'
+
+# This file 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
index ad7408c..5ca9484 100644
--- a/config.h.in
+++ b/config.h.in
@@ -327,6 +327,9 @@
*/
#undef HAVE_ALLOCA_H
+/* Define to 1 if you have the `arc4random_buf' function. */
+#undef HAVE_ARC4RANDOM_BUF
+
/* Define to 1 if you have the <arpa/nameser.h> header file. */
#undef HAVE_ARPA_NAMESER_H
@@ -701,6 +704,12 @@
/* Define to 1 if you have the `pututxline' function. */
#undef HAVE_PUTUTXLINE
+/* Define to 1 if you have the `RAND_bytes' function. */
+#undef HAVE_RAND_BYTES
+
+/* Define to 1 if you have the `RAND_poll' function. */
+#undef HAVE_RAND_POLL
+
/* Define to 1 if you have the <readline.h> header file. */
#undef HAVE_READLINE_H
@@ -860,6 +869,9 @@
/* Define to 1 if you have the `strsignal' function. */
#undef HAVE_STRSIGNAL
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
+
/* Define to 1 if `decimal_point' is a member of `struct lconv'. */
#undef HAVE_STRUCT_LCONV_DECIMAL_POINT
@@ -1319,6 +1331,10 @@
/* Should we recommend a minimum value for tickadj? */
#undef MIN_REC_TICKADJ
+/* Define to 1 if the compiler does not support C99's structure
+ initialization. */
+#undef MISSING_C99_STRUCT_INIT
+
/* Do we need HPUX adjtime() library support? */
#undef NEED_HPUX_ADJTIME
@@ -1546,6 +1562,12 @@ typedef unsigned int uintptr_t;
/* Must we have a CTTY for fsetown? */
#undef USE_FSETOWNCTTY
+/* Use OpenSSL's crypto random functions */
+#undef USE_OPENSSL_CRYPTO_RAND
+
+/* OK to use snprintb()? */
+#undef USE_SNPRINTB
+
/* Can we use SIGPOLL for tty IO? */
#undef USE_TTY_SIGPOLL
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..f9fcdc8
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1756 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+timestamp='2011-06-03'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | open8 \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
index 041a51e..29d777c 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for ntp4 4.2.7p482.
+# Generated by GNU Autoconf 2.68 for ntp 4.2.8p2.
#
# Report bugs to <http://bugs.ntp.org./>.
#
@@ -568,10 +568,10 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME='ntp4'
-PACKAGE_TARNAME='ntp4'
-PACKAGE_VERSION='4.2.7p482'
-PACKAGE_STRING='ntp4 4.2.7p482'
+PACKAGE_NAME='ntp'
+PACKAGE_TARNAME='ntp'
+PACKAGE_VERSION='4.2.8p2'
+PACKAGE_STRING='ntp 4.2.8p2'
PACKAGE_BUGREPORT='http://bugs.ntp.org./'
PACKAGE_URL='http://www.ntp.org./'
@@ -649,7 +649,6 @@ DCFD
TESTDCF
MAKE_CHECK_LAYOUT
VER_SUFFIX
-PKG_CONFIG
MAKE_CHECK_Y2K
MAKE_LIBPARSE_KERNEL
MAKE_LIBPARSE
@@ -667,12 +666,18 @@ PTHREADS_TRUE
LIBISC_PTHREADS_NOTHREADS
PTHREAD_LIBS
HAVE_INLINE
+LDADD_LIBUTIL
ALLOCA
LIBM
EDITLINE_LIBS
LDADD_LIBNTP
NTP_CROSSCOMPILE_FALSE
NTP_CROSSCOMPILE_TRUE
+BUILD_LIBEVENT_FALSE
+BUILD_LIBEVENT_TRUE
+LDADD_LIBEVENT
+CPPFLAGS_LIBEVENT
+PKG_CONFIG
LIBOPTS_DIR
LIBOPTS_CFLAGS
LIBOPTS_LDADD
@@ -705,6 +710,13 @@ LD
FGREP
SED
LIBTOOL
+INSTALL_UPDATE_LEAP_FALSE
+INSTALL_UPDATE_LEAP_TRUE
+UPDATE_LEAP_NI
+UPDATE_LEAP_MS
+UPDATE_LEAP_DS
+UPDATE_LEAP_DL
+UPDATE_LEAP_DB
TIMETRIM_NI
TIMETRIM_MS
TIMETRIM_DS
@@ -987,6 +999,7 @@ with_crypto
with_openssl_libdir
with_openssl_incdir
with_rpath
+enable_openssl_random
enable_autokey
enable_kmem
enable_accurate_adjtime
@@ -1567,7 +1580,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ntp4 4.2.7p482 to adapt to many kinds of systems.
+\`configure' configures ntp 4.2.8p2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1615,7 +1628,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/ntp4]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/ntp]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1637,7 +1650,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ntp4 4.2.7p482:";;
+ short | recursive ) echo "Configuration of ntp 4.2.8p2:";;
esac
cat <<\_ACEOF
@@ -1751,6 +1764,8 @@ Optional Features and Packages:
--without-rpath s Disable auto-added -R linker paths
+ --enable-openssl-random Use OpenSSL's crypto random number functions, if
+ available (default is yes)
--enable-autokey + support NTP Autokey protocol
--enable-kmem s read /dev/kmem for tick and/or tickadj
--enable-accurate-adjtime
@@ -1801,7 +1816,7 @@ Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <http://bugs.ntp.org./>.
-ntp4 home page: <http://www.ntp.org./>.
+ntp home page: <http://www.ntp.org./>.
_ACEOF
ac_status=$?
fi
@@ -1864,7 +1879,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ntp4 configure 4.2.7p482
+ntp configure 4.2.8p2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2689,7 +2704,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ntp4 $as_me 4.2.7p482, which was
+It was created by ntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -3635,8 +3650,8 @@ fi
# Define the identity of the package.
- PACKAGE='ntp4'
- VERSION='4.2.7p482'
+ PACKAGE='ntp'
+ VERSION='4.2.8p2'
cat >>confdefs.h <<_ACEOF
@@ -5426,6 +5441,183 @@ if test "x$ac_cv_prog_cc_c89" != xno; then :
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
+
+
@@ -6159,6 +6351,7 @@ fi
+
CFLAGS_NTP=
CPPFLAGS_NTP=
LDADD_NTP=
@@ -7594,6 +7787,44 @@ $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports C99 structure initialization" >&5
+$as_echo_n "checking whether the compiler supports C99 structure initialization... " >&6; }
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ struct foo_s {int i1; int i2;};
+ int main() { struct foo_s foo[] = { { .i1 = 1, .i2 = 1 }, { .i1 = 2, .i2 = 2 }, { .i1 = 0, .i2 = 0 } }; }
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define MISSING_C99_STRUCT_INIT 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we need ylwrap VPATH hack" >&5
$as_echo_n "checking to see if we need ylwrap VPATH hack... " >&6; }
@@ -7760,6 +7991,19 @@ fi
+
+ if test -z "$UPDATE_LEAP_NI" ; then
+ INSTALL_UPDATE_LEAP_TRUE=
+ INSTALL_UPDATE_LEAP_FALSE='#'
+else
+ INSTALL_UPDATE_LEAP_TRUE='#'
+ INSTALL_UPDATE_LEAP_FALSE=
+fi
+
+
+
+
+
# So far, the only shared library we might use is libopts.
# It's a small library - we might as well use a static version of it.
# Check whether --enable-shared was given.
@@ -19234,6 +19478,126 @@ fi
+ntp_pkgconfig_min_version='0.15.0'
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
+{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
+
+case "$PKG_CONFIG" in
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
+$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+ ;;
+esac
+
+
+
+
# Check whether --enable-local-libevent was given.
if test "${enable_local_libevent+set}" = set; then :
enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
@@ -19246,6 +19610,91 @@ fi
+ntp_libevent_min_version=2
+ntp_libevent_tearoff=sntp/libevent
+
+
+
+
+case "$ntp_use_local_libevent" in
+ yes)
+ ;;
+ *) # If we have (a good enough) pkg-config, see if it can find libevent
+ case "$PKG_CONFIG" in
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+$as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
+ if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
+ then
+ 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;}
+ 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.
+ # While we could grab only the -L stuff, there *might* be
+ # other flags there we want. Originally we just removed -levent
+ # but then somebody decided to install -levent-2.0
+ # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
+ # So now we dance...
+ LDADD_LIBEVENT=
+ for i in `$PKG_CONFIG --libs libevent`
+ do
+ case "$i" in
+ -levent*) ;;
+ *) case "$LDADD_LIBEVENT" in
+ '') LDADD_LIBEVENT="$i" ;;
+ *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
+ esac
+ ;;
+ esac
+ done
+ case "$LIBISC_PTHREADS_NOTHREADS" in
+ pthreads)
+ LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
+ esac
+ LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ ntp_use_local_libevent=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ ntp_use_local_libevent=yes
+ ;;
+ esac
+ ;;
+esac
+
+case "$ntp_use_local_libevent" in
+ yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
+$as_echo "$as_me: Using libevent tearoff" >&6;}
+ CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
+ case "$LIBISC_PTHREADS_NOTHREADS" in
+ pthreads)
+ LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
+ ;;
+ *)
+ LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
+ esac
+esac
+
+ if test "x$ntp_use_local_libevent" = "xyes"; then
+ BUILD_LIBEVENT_TRUE=
+ BUILD_LIBEVENT_FALSE='#'
+else
+ BUILD_LIBEVENT_TRUE='#'
+ BUILD_LIBEVENT_FALSE=
+fi
+
+
+
+
+
# Expose a cross-compilation indicator to makefiles
if test $build != $host; then
@@ -21075,6 +21524,73 @@ fi
done
+# Bug 2713
+LDADD_LIBUTIL=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
+$as_echo_n "checking for library containing snprintb... " >&6; }
+if ${ac_cv_search_snprintb+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$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 snprintb ();
+int
+main ()
+{
+return snprintb ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' util; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_snprintb=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_snprintb+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_snprintb+:} false; then :
+
+else
+ ac_cv_search_snprintb=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
+$as_echo "$ac_cv_search_snprintb" >&6; }
+ac_res=$ac_cv_search_snprintb
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_snprintb" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
+ esac
+
+$as_echo "#define USE_SNPRINTB 1" >>confdefs.h
+
+fi
+
+
#
for ac_header in errno.h sys/socket.h sys/types.h time.h
do :
@@ -29949,6 +30465,20 @@ esac
####
+for ac_func in arc4random_buf
+do :
+ ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf"
+if test "x$ac_cv_func_arc4random_buf" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ARC4RANDOM_BUF 1
+_ACEOF
+
+fi
+done
+
+
+####
+
saved_LIBS="$LIBS"
LIBS="$LIBS $LDADD_LIBNTP"
for ac_func in daemon
@@ -31237,10 +31767,10 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <sys/syscall.h>
- #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
- # error
- #endif
+ #include <sys/syscall.h>
+ #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
+ # error
+ #endif
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
@@ -31276,10 +31806,10 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <sys/timex.h>
- #ifndef STA_FLL
- # error
- #endif
+ #include <sys/timex.h>
+ #ifndef STA_FLL
+ # error
+ #endif
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
@@ -32258,13 +32788,27 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
+for ac_func in strtoll
+do :
+ ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
+if test "x$ac_cv_func_strtoll" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOLL 1
+_ACEOF
+
+fi
+done
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPSD JSON receiver" >&5
$as_echo_n "checking for GPSD JSON receiver... " >&6; }
# Check whether --enable-GPSD was given.
if test "${enable_GPSD+set}" = set; then :
enableval=$enable_GPSD; ntp_ok=$enableval
else
- ntp_ok=$ntp_eac
+ case "$ac_cv_func_strtoll" in
+ yes) ntp_ok=$ntp_eac ;;
+ *) ntp_ok="no" ;;
+ esac
fi
@@ -33029,126 +33573,6 @@ $as_echo "$ans" >&6; }
-ntp_pkgconfig_min_version='0.15.0'
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
- ac_pt_PKG_CONFIG=$PKG_CONFIG
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_pt_PKG_CONFIG" = x; then
- PKG_CONFIG=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- PKG_CONFIG=$ac_pt_PKG_CONFIG
- fi
-else
- PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
-{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
-
-case "$PKG_CONFIG" in
- /*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
-$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
- if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- PKG_CONFIG=""
- fi
- ;;
-esac
-
-
-
-
VER_SUFFIX=
@@ -33560,6 +33984,49 @@ LIBS="$NTPO_SAVED_LIBS"
{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5
+$as_echo_n "checking if we want to use OpenSSL's crypto random (if available)... " >&6; }
+# Check whether --enable-openssl-random was given.
+if test "${enable_openssl_random+set}" = set; then :
+ enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval
+else
+ ntp_use_openssl_random=yes
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
+$as_echo "$ntp_use_openssl_random" >&6; }
+
+# The following might need extra libraries
+NTPO_SAVED_LIBS="$LIBS"
+LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+for ac_func in RAND_bytes RAND_poll
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+LIBS="$NTPO_SAVED_LIBS"
+case "$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
+ yesyesyes)
+
+$as_echo "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
+
+ ;;
+ *) ntp_use_openssl_random=no ;;
+esac
+
+
+
# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to include NTP Autokey protocol support" >&5
$as_echo_n "checking if we want to include NTP Autokey protocol support... " >&6; }
@@ -34917,7 +35384,6 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should enable NIST lockclock scheme" >&5
$as_echo_n "checking if we should enable NIST lockclock scheme... " >&6; }
-
# Check whether --enable-nist was given.
if test "${enable_nist+set}" = set; then :
enableval=$enable_nist; ans=$enableval
@@ -34939,7 +35405,6 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want support for Samba's signing daemon" >&5
$as_echo_n "checking if we want support for Samba's signing daemon... " >&6; }
-
# Check whether --enable-ntp-signd was given.
if test "${enable_ntp_signd+set}" = set; then :
enableval=$enable_ntp_signd; ans=$enableval
@@ -36035,33 +36500,35 @@ ac_config_files="$ac_config_files parseutil/Makefile"
ac_config_files="$ac_config_files scripts/Makefile"
-ac_config_files="$ac_config_files scripts/lib/Makefile"
+ac_config_files="$ac_config_files scripts/build/Makefile"
-ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
+ac_config_files="$ac_config_files scripts/build/mkver"
ac_config_files="$ac_config_files scripts/calc_tickadj/Makefile"
-ac_config_files="$ac_config_files scripts/build/mkver"
+ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
-ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
+ac_config_files="$ac_config_files scripts/lib/Makefile"
ac_config_files="$ac_config_files scripts/ntp-wait/Makefile"
-ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
+ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
ac_config_files="$ac_config_files scripts/ntpsweep/Makefile"
-ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
+ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
ac_config_files="$ac_config_files scripts/ntptrace/Makefile"
+ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
+
ac_config_files="$ac_config_files scripts/ntpver"
ac_config_files="$ac_config_files scripts/plot_summary"
ac_config_files="$ac_config_files scripts/summary"
-ac_config_files="$ac_config_files scripts/build/Makefile"
+ac_config_files="$ac_config_files scripts/update-leap/Makefile"
ac_config_files="$ac_config_files tests/Makefile"
@@ -36255,6 +36722,10 @@ if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; th
as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -36267,6 +36738,10 @@ if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -36696,7 +37171,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ntp4 $as_me 4.2.7p482, which was
+This file was extended by ntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -36757,13 +37232,13 @@ Configuration commands:
$config_commands
Report bugs to <http://bugs.ntp.org./>.
-ntp4 home page: <http://www.ntp.org./>."
+ntp home page: <http://www.ntp.org./>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ntp4 config.status 4.2.7p482
+ntp config.status 4.2.8p2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -37290,20 +37765,21 @@ do
"ntpsnmpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpsnmpd/Makefile" ;;
"parseutil/Makefile") CONFIG_FILES="$CONFIG_FILES parseutil/Makefile" ;;
"scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
- "scripts/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
- "scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
- "scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
+ "scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
"scripts/build/mkver") CONFIG_FILES="$CONFIG_FILES scripts/build/mkver" ;;
- "scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
+ "scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
+ "scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
+ "scripts/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
"scripts/ntp-wait/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/Makefile" ;;
- "scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
+ "scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
"scripts/ntpsweep/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/Makefile" ;;
- "scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
+ "scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
"scripts/ntptrace/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/Makefile" ;;
+ "scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
"scripts/ntpver") CONFIG_FILES="$CONFIG_FILES scripts/ntpver" ;;
"scripts/plot_summary") CONFIG_FILES="$CONFIG_FILES scripts/plot_summary" ;;
"scripts/summary") CONFIG_FILES="$CONFIG_FILES scripts/summary" ;;
- "scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
+ "scripts/update-leap/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/update-leap/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"tests/libntp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libntp/Makefile" ;;
"tests/ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpd/Makefile" ;;
@@ -38841,8 +39317,8 @@ _LT_EOF
;;
"ntpd/complete.conf":F) sed -e '/^rlimit$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;;
"ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;;
- "scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
"scripts/build/mkver":F) chmod +x scripts/build/mkver ;;
+ "scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
"scripts/ntp-wait/ntp-wait":F) chmod +x scripts/ntp-wait/ntp-wait ;;
"scripts/ntpsweep/ntpsweep":F) chmod +x scripts/ntpsweep/ntpsweep ;;
"scripts/ntptrace/ntptrace":F) chmod +x scripts/ntptrace/ntptrace ;;
diff --git a/configure.ac b/configure.ac
index 1044d8c..dc5c7fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl
m4_include([sntp/m4/version.m4])
AC_PREREQ([2.61])
AC_INIT(
- [ntp4],
+ [ntp],
[VERSION_NUMBER],
[http://bugs.ntp.org./],
[],
@@ -68,6 +68,7 @@ AC_PROG_CPP
AC_PROG_CXX
AC_PROG_YACC
AC_PROG_CC_C_O
+AX_C99_STRUCT_INIT
NTP_VPATH_HACK dnl used only by ntpd/Makefile.am
@@ -102,7 +103,7 @@ esac
enable_nls=no
LIBOPTS_CHECK_NOBUILD([sntp/libopts])
-NTP_ENABLE_LOCAL_LIBEVENT
+NTP_LIBEVENT_CHECK_NOBUILD([2], [sntp/libevent])
NTP_LIBNTP
@@ -771,6 +772,10 @@ esac
####
+AC_CHECK_FUNCS([arc4random_buf])
+
+####
+
saved_LIBS="$LIBS"
LIBS="$LIBS $LDADD_LIBNTP"
AC_CHECK_FUNCS([daemon])
@@ -1495,12 +1500,13 @@ AC_CACHE_CHECK(
;;
*)
AC_PREPROC_IFELSE(
- [
- #include <sys/syscall.h>
- #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
- # error
- #endif
- ],
+ [AC_LANG_SOURCE(
+ [
+ #include <sys/syscall.h>
+ #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
+ # error
+ #endif
+ ])],
[ntp_cv_var_ntp_syscalls=kernel]
)
;;
@@ -1522,12 +1528,13 @@ AC_CACHE_CHECK(
[if sys/timex.h has STA_FLL],
[ntp_cv_var_sta_fll],
[AC_PREPROC_IFELSE(
- [
- #include <sys/timex.h>
- #ifndef STA_FLL
- # error
- #endif
- ],
+ [AC_LANG_SOURCE(
+ [
+ #include <sys/timex.h>
+ #ifndef STA_FLL
+ # error
+ #endif
+ ])],
[ntp_cv_var_sta_fll=yes],
[ntp_cv_var_sta_fll=no]
)]
@@ -1582,12 +1589,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCGPPSEV])
case "$ac_cv_header_termios_h" in
yes)
AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <termios.h>
#ifndef TIOCGPPSEV
# error
#endif
- ],
+ ])],
[ntp_ok=yes],
[ntp_ok=no]
)
@@ -1608,12 +1615,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCSPPS])
case "$ac_cv_header_termios_h" in
yes)
AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <termios.h>
#ifndef TIOCSPPS
# error
#endif
- ],
+ ])],
[ntp_ok=yes],
[ntp_ok=no]
)
@@ -1634,12 +1641,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl CIOGETEV])
case "$ac_cv_header_sys_ppsclock_h" in
yes)
AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <sys/ppsclock.h>
#ifndef CIOGETEV
# error
#endif
- ],
+ ])],
[ntp_ok=yes],
[ntp_ok=no]
)
@@ -1685,7 +1692,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
yesyes)
AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG])
AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <sys/time.h>
typedef int u_int;
#include <sys/ppsclock.h>
@@ -1706,7 +1713,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
#ifndef CIOGETEV
# error
#endif
- ],
+ ])],
[ntp_ok=yes],
[ntp_ok=no]
)
@@ -2343,6 +2350,7 @@ case "$ntp_ok" in
esac
AC_MSG_RESULT([$ntp_ok])
+AC_CHECK_FUNCS([strtoll])
AC_MSG_CHECKING([for GPSD JSON receiver])
AC_ARG_ENABLE(
[GPSD],
@@ -2351,7 +2359,10 @@ AC_ARG_ENABLE(
[+ GPSD JSON receiver]
)],
[ntp_ok=$enableval],
- [ntp_ok=$ntp_eac]
+ [case "$ac_cv_func_strtoll" in
+ yes) ntp_ok=$ntp_eac ;;
+ *) ntp_ok="no" ;;
+ esac]
)
case "$ntp_ok" in
yes)
@@ -3017,6 +3028,8 @@ AC_MSG_RESULT([$ans])
NTP_OPENSSL
+NTP_CRYPTO_RAND
+
# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
AC_MSG_CHECKING([if we want to include NTP Autokey protocol support])
AC_ARG_ENABLE(
@@ -4183,7 +4196,6 @@ case "$ans" in
esac
AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
-
AC_ARG_ENABLE(
[nist],
[AS_HELP_STRING(
@@ -4203,7 +4215,6 @@ case "$ans" in
esac
AC_MSG_CHECKING([if we want support for Samba's signing daemon])
-
AC_ARG_ENABLE(
[ntp-signd],
[AS_HELP_STRING(
@@ -4256,14 +4267,14 @@ AC_CACHE_CHECK(
[for interface list sysctl],
[ntp_cv_iflist_sysctl],
[AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#ifndef NET_RT_IFLIST
# error
#endif
- ],
+ ])],
[ntp_cv_iflist_sysctl=yes],
[ntp_cv_iflist_sysctl=no]
)]
@@ -4323,20 +4334,21 @@ AC_CONFIG_FILES([ntpq/Makefile])
AC_CONFIG_FILES([ntpsnmpd/Makefile])
AC_CONFIG_FILES([parseutil/Makefile])
AC_CONFIG_FILES([scripts/Makefile])
-AC_CONFIG_FILES([scripts/lib/Makefile])
-AC_CONFIG_FILES([scripts/calc_tickadj/calc_tickadj], [chmod +x scripts/calc_tickadj/calc_tickadj])
-AC_CONFIG_FILES([scripts/calc_tickadj/Makefile])
+AC_CONFIG_FILES([scripts/build/Makefile])
AC_CONFIG_FILES([scripts/build/mkver], [chmod +x scripts/build/mkver])
-AC_CONFIG_FILES([scripts/ntp-wait/ntp-wait], [chmod +x scripts/ntp-wait/ntp-wait])
+AC_CONFIG_FILES([scripts/calc_tickadj/Makefile])
+AC_CONFIG_FILES([scripts/calc_tickadj/calc_tickadj], [chmod +x scripts/calc_tickadj/calc_tickadj])
+AC_CONFIG_FILES([scripts/lib/Makefile])
AC_CONFIG_FILES([scripts/ntp-wait/Makefile])
-AC_CONFIG_FILES([scripts/ntpsweep/ntpsweep], [chmod +x scripts/ntpsweep/ntpsweep])
+AC_CONFIG_FILES([scripts/ntp-wait/ntp-wait], [chmod +x scripts/ntp-wait/ntp-wait])
AC_CONFIG_FILES([scripts/ntpsweep/Makefile])
-AC_CONFIG_FILES([scripts/ntptrace/ntptrace], [chmod +x scripts/ntptrace/ntptrace])
+AC_CONFIG_FILES([scripts/ntpsweep/ntpsweep], [chmod +x scripts/ntpsweep/ntpsweep])
AC_CONFIG_FILES([scripts/ntptrace/Makefile])
+AC_CONFIG_FILES([scripts/ntptrace/ntptrace], [chmod +x scripts/ntptrace/ntptrace])
AC_CONFIG_FILES([scripts/ntpver], [chmod +x scripts/ntpver])
AC_CONFIG_FILES([scripts/plot_summary], [chmod +x scripts/plot_summary])
AC_CONFIG_FILES([scripts/summary], [chmod +x scripts/summary])
-AC_CONFIG_FILES([scripts/build/Makefile])
+AC_CONFIG_FILES([scripts/update-leap/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([tests/libntp/Makefile])
AC_CONFIG_FILES([tests/ntpd/Makefile])
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..04701da
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,530 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 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 2, 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> $depfile
+ echo >> $depfile
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> $depfile
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+ tmpdepfile="$stripped.u"
+ if test "$libtool" = yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+ stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+ sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mecanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ "$@" || exit $?
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/html/build.html b/html/build.html
index 9683b29..5e3c2d8 100644
--- a/html/build.html
+++ b/html/build.html
@@ -11,7 +11,7 @@
<img src="pic/beaver.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
<p>For putting out compiler fires.</p>
<p>Last update:
- <!-- #BeginDate format:En2m -->31-Mar-2014 05:39<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->1-Apr-2015 02:57<!-- #EndDate -->
</p>
<br clear="left">
<h4>Related Links</h4>
@@ -27,7 +27,7 @@
</ul>
<hr>
<h4 id="build">Building and Installing the Distribution</h4>
-<p>It is not possible in a software distribution such as this to support every individual computer and operating system with a common executable, even with the same system but different versions and options. Therefore, it is necessary to configure, build and install for each system and version. In almost all cases, these procedures are completely automatic, The user types <tt>./configure</tt>, <tt>make</tt> and <tt>install</tt> in that order and the autoconfigure system does the rest. There are some exceptions, as noted below and on the <a href="hints.html">Hints and Kinks</a> pages.</p>
+<p>It is not possible in a software distribution such as this to support every individual computer and operating system with a common executable, even with the same system but different versions and options. Therefore, it is necessary to configure, build and install for each system and version. In almost all cases, these procedures are completely automatic, The user types <tt>./configure</tt>, and <tt>make install</tt> in that order and the autoconfigure system does the rest. There are some exceptions, as noted below and on the <a href="hints.html">Hints and Kinks</a> pages.</p>
<p>If available, the OpenSSL library from <a href="http://www.openssl.org">http://www.openssl.org</a> is used to support public key cryptography. The library must be built and installed prior to building NTP. The procedures for doing that are included in the OpenSSL documentation. The library is found during the normal NTP configure phase and the interface routines compiled automatically. Only the <tt>libcrypto.a</tt> library file and <tt>openssl</tt> header files are needed. If the library is not available or disabled, this step is not required.</p>
<p>The <a href="config.html">Build Options</a> page describes a number of options that determine whether debug support is included, whether and which reference clock drivers are included and the locations of the executables and library files, if not the default. By default debugging options and all reference clock drivers are included.</p>
<h4 id="unix">Building and Installing for Unix</h4>
diff --git a/html/confopt.html b/html/confopt.html
index 8c8ae37..b964d24 100644
--- a/html/confopt.html
+++ b/html/confopt.html
@@ -91,11 +91,13 @@ outgoing NTP packets. Versions 1-4 are the choices, with version 4 the default.<
<h4 id="aux">Auxiliary Commands</h4>
<dl>
<dt id="broadcastclient"><tt>broadcastclient</tt></dt>
- <dd>Enable reception of broadcast server messages to any local interface (type b address). Ordinarily, upon receiving a broadcast message for the first time, the broadcast client measures the nominal server propagation delay using a brief client/server exchange, after which it continues in listen-only mode. If a nonzero value is specified in the <tt>broadcastdelay</tt> command, the value becomes the delay and the volley is not executed. Note: the <tt>novolley</tt> option has been deprecated for future enhancements. Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric key or public key authentication as described in the <a href="authopt.html">Authentication Options</a> page. Note that the volley is required with public key authentication in order to run the Autokey protocol..</dd>
+ <dd>Enable reception of broadcast server messages to any local interface (type b address). Ordinarily, upon receiving a broadcast message for the first time, the broadcast client measures the nominal server propagation delay using a brief client/server exchange, after which it continues in listen-only mode. If a nonzero value is specified in the <tt>broadcastdelay</tt> command, the value becomes the delay and the volley is not executed. Note: the <tt>novolley</tt> option has been deprecated for future enhancements. Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric key or public key authentication as described in the <a href="authopt.html">Authentication Options</a> page. Note that the volley is required with public key authentication in order to run the Autokey protocol.</dd>
<dt id="manycastserver"><tt>manycastserver <i>address</i> [...]</tt></dt>
<dd>Enable reception of manycast client messages (type m) to the multicasts group address(es) (type m) specified. At least one address is required. Note that, in order to avoid accidental or malicious disruption, both the server and client should operate using symmetric key or public key authentication as described in the <a href="authopt.html">Authentication Options</a> page.</dd>
<dt id="multicastclient"><tt>multicastclient <i>address</i> [...]</tt></dt>
<dd>Enable reception of multicast server messages to the multicast group address(es) (type m) specified. Upon receiving a message for the first time, the multicast client measures the nominal server propagation delay using a brief client/server exchange with the server, then enters the broadcast client mode, in which it synchronizes to succeeding multicast messages. Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric key or public key authentication as described in the <a href="authopt.html">Authentication Options</a> page.</dd>
+ <dt id="mdnstries"><tt>mdnstries</tt> <i>number</i></dt>
+ <dd>If we are participating in mDNS, after we have synched for the first time we attempt to register with the mDNS system. If that registration attempt fails, we try again at one minute intervals for up to <tt>mdnstries</tt> times. After all, <tt>ntpd</tt> may be starting before mDNS. The default value for <tt>mdnstries</tt> is 5.</dd>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
diff --git a/html/copyright.html b/html/copyright.html
index 08272d4..94fffc4 100644
--- a/html/copyright.html
+++ b/html/copyright.html
@@ -10,16 +10,16 @@
<h3>Copyright Notice</h3>
<img src="pic/sheepb.jpg" alt="jpg" align="left"> "Clone me," says Dolly sheepishly.
<p>Last update:
- <!-- #BeginDate format:En2m -->9-Aug-2014 07:56<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->17-Jan-2015 00:16<!-- #EndDate -->
UTC</p>
<br clear="left">
</p>
<hr>
-<p>The following copyright notice applies to all files collectively called the Network Time Protocol Version 4 Distribution. Unless specifically declared otherwise in an individual file, this notice applies as if the text was explicitly included in the file.</p>
+<p>The following copyright notice applies to all files collectively called the Network Time Protocol Version 4 Distribution. Unless specifically declared otherwise in an individual file, this entire notice applies as if the text was explicitly included in the file.</p>
<pre>
***********************************************************************
* *
-* Copyright (c) University of Delaware 1992-2014 *
+* Copyright (c) University of Delaware 1992-2015 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose with or without fee is hereby *
@@ -35,6 +35,38 @@
* *
***********************************************************************
</pre>
+<p>Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin Burnicki is:</p>
+<pre>
+***********************************************************************
+* *
+* Copyright (c) Network Time Foundation 2011-2015 *
+* *
+* All Rights Reserved *
+* *
+* Redistribution and use in source and binary forms, with or without *
+* modification, are permitted provided that the following conditions *
+* are met: *
+* 1. Redistributions of source code must retain the above copyright *
+* notice, this list of conditions and the following disclaimer. *
+* 2. Redistributions in binary form must reproduce the above *
+* copyright notice, this list of conditions and the following *
+* disclaimer in the documentation and/or other materials provided *
+* with the distribution. *
+* *
+* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS *
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
+* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE *
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
+* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR *
+* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
+* DAMAGE. *
+***********************************************************************
+</pre>
<p>The following individuals contributed in part to the Network Time Protocol Distribution Version 4 and are acknowledged as authors of this work.</p>
<ol>
<li><a href="mailto:%20takao_abe@xurb.jp">Takao Abe &lt;takao_abe@xurb.jp&gt;</a> Clock driver for JJY receivers</li>
diff --git a/html/drivers/driver28.html b/html/drivers/driver28.html
index 8c7fd80..efa862f 100644
--- a/html/drivers/driver28.html
+++ b/html/drivers/driver28.html
@@ -7,6 +7,10 @@
<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>Shared Memory Driver</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
+ <style type="text/css">
+ table.dlstable { font-size:85%; }
+ td.ttf{ font-family:Courier; font-weight:bold; }
+ </style>
</head>
<body>
@@ -21,7 +25,13 @@
Driver ID: <tt>SHM</tt></p>
<h4>Description</h4>
- <p>This driver receives its reference clock info from a shared memory-segment. The shared memory-segment is created with owner-only access for unit 0 and 1, and world access for unit 2 and 3</p>
+ <p>This driver receives its reference clock info from a shared
+ memory-segment. The shared memory-segment is created with owner-only
+ access by default, unless otherwise requested by the mode word for units
+ &ge;2. Units 0 and 1 are always created with owner-only access for
+ backward compatibility.
+ </p>
+
<h4>Structure of shared memory-segment</h4>
<pre>struct shmTime {
@@ -49,14 +59,14 @@
<h4>Operation mode=0</h4>
<p>Each second, the value of <code>valid</code> of the shared memory-segment is checked:</p>
- <p>If set, the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are passed to ntp, and <code>valid</code> is cleared and <code>count</code> is bumped.</p>
+ <p>If set, the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are passed to <i>NTPD</i>, and <code>valid</code> is cleared and <code>count</code> is bumped.</p>
<p>If not set, <code>count</code> is bumped.</p>
<h4>Operation mode=1</h4>
<p>Each second, <code>valid</code> in the shared memory-segment is checked:</p>
- <p>If set, the <code>count</code> field of the record is remembered, and the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are read. Then, the remembered <code>count</code> is compared to current value of <code>count</code> now in the record. If both are equal, the values read from the record are passed to ntp. If they differ, another process has modified the record while it was read out (was not able to produce this case), and failure is reported to ntp. The <code>valid</code> flag is cleared and <code>count</code> is bumped.</p>
+ <p>If set, the <code>count</code> field of the record is remembered, and the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are read. Then, the remembered <code>count</code> is compared to current value of <code>count</code> now in the record. If both are equal, the values read from the record are passed to <i>NTPD</i>. If they differ, another process has modified the record while it was read out (was not able to produce this case), and failure is reported to <i>NTPD</i>. The <code>valid</code> flag is cleared and <code>count</code> is bumped.</p>
<p>If not set, <code>count</code> is bumped</p>
-<h4>Mode-independent postprocessing</h4>
+<h4>Mode-independent post-processing</h4>
After the time stamps have been successfully plucked from the SHM
segment, some sanity checks take place:
<ul>
@@ -69,30 +79,38 @@ segment, some sanity checks take place:
set to 1.
</ul>
-<h4>gpsd</h4>
+<h4>GPSD</h4>
-<a href="http://gpsd.berlios.de/"><i>gpsd</i></a>
+<a href="http://gpsd.berlios.de/"><i>GPSD</i></a>
knows how to talk to many GPS devices.
-It can work with <i>ntpd</i> through the SHM driver.
+It can work with <i>NTPD</i> through the SHM driver.
<P>
-The <i>gpsd</i> man page suggests setting minpoll and maxpoll to 4.
+The <i>GPSD</i> man page suggests setting minpoll and maxpoll to 4.
That was an attempt to reduce jitter.
The SHM driver was fixed (ntp-4.2.5p138) to collect data each second rather than
once per polling interval so that suggestion is no longer reasonable.
<P>
- <b>Note:</b> The GPSD client driver (type 46) uses the <i>gpsd</i>
- client protocol to connect and talk to <i>gpsd</i>, but using the
- SHM driver is the ancient way to have <i>gpsd</i> talk to <i>ntpd</i>.
+ <b>Note:</b> The <i>GPSD</i> client driver (type 46) uses the <i>GPSD</i>
+ client protocol to connect and talk to <i>GPSD</i>, but using the
+ SHM driver is the ancient way to have <i>GPSD</i> talk to <i>NTPD</i>. There
+ are some tricky points when using the SHM interface to interface
+ with <i>GPSD</i>, because <i>GPSD</i> will use two SHM clocks, one for the
+ serial data stream and one for the PPS information when
+ available. Receivers with a loose/sloppy timing between PPS and serial data
+ can easily cause trouble here because <i>NTPD</i> has no way to join the two
+ data streams and correlate the serial data with the PPS events.
+</p>
+<p>
<h4>Clockstats</h4>
If flag4 is set when the driver is polled, a clockstats record is written.
The first 3 fields are the normal date, time, and IP address common to all clockstats records.
<P>
The 4th field is the number of second ticks since the last poll.
-The 5th field is the number of good data samples found. The last 64 will be used by ntpd.
+The 5th field is the number of good data samples found. The last 64 will be used by <i>NTPD</i>.
The 6th field is the number of sample that didn't have valid data ready.
The 7th field is the number of bad samples.
-The 8th field is the number of times the the mode 1 info was update while nptd was trying to grab a sample.
+The 8th field is the number of times the the mode 1 info was update while <i>NTPD</i> was trying to grab a sample.
<P>
Here is a sample showing the GPS reception fading out:
@@ -112,6 +130,39 @@ Here is a sample showing the GPS reception fading out:
54364 85700.160 127.127.28.0 65 0 65 0 0
</pre>
+ <h4>The 'mode' word</h4>
+
+ <p>
+ Some aspects of the driver behavior can be adjusted by setting bits of
+ the 'mode' word in the server configuration line:<br>
+ &nbsp;&nbsp;<tt>server 127.127.28.</tt><i>x</i><tt> mode </tt><i>Y</i>
+ </p>
+
+ <table border="1" width="100%">
+ <caption>mode word bits and bit groups</caption>
+ <tbody><tr>
+ <th align="center">Bit</th>
+ <th align="center">Dec</th>
+ <th align="center">Hex</th>
+ <th align="left">Meaning</th>
+ </tr>
+
+ <tr>
+ <td align="center">0</td>
+ <td align="center">1</td>
+ <td align="center">1</td>
+ <td>The SHM segment is private (mode 0600). This is the fixed
+ default for clock units 0 and 1; clock units &gt;1 are mode
+ 0666 unless this bit is set for the specific unit.</td>
+ </tr><tr>
+ <td align="center">1-31</td>
+ <td align="center">-</td>
+ <td align="center">-</td>
+ <td><i>reserved -- do not use</i></td>
+ </tr>
+ </tbody>
+ </table>
+
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
@@ -136,9 +187,64 @@ Here is a sample showing the GPS reception fading out:
<dd>Not used by this driver.
<dt><tt>flag4 0 | 1</tt>
<dd>If flag4 is set, clockstats records will be written when the driver is polled.
- <h4>Additional Information</h4>
- <p><a href="../refclock.html">Reference Clock Drivers</a></p>
</dl>
+
+ <h4>Public vs. Private SHM segments</h4>
+
+ <p>The driver attempts to create a shared memory segment with an
+ identifier depending on the unit number. This identifier (which can be
+ a numeric value or a string) clearly depends on the method used, which
+ in turn depends on the host operating system:</p>
+
+ <ul>
+ <li><p>
+ <tt>Windows</tt> uses a file mapping to the page file with the
+ name '<tt>Global\NTP</tt><i>u</i>' for public accessible
+ mappings, where <i>u</i> is the clock unit. Private /
+ non-public mappings are created as
+ '<tt>Local\NTP</tt><i>u</i>'.
+ </p><p>
+ Public access assigns a NULL DACL to the memory mapping, while
+ private access just uses the default DACL of the process creating
+ the mapping.
+ </p>
+ </li>
+ <li><p>
+ <tt>SYSV IPC</tt> creates a shared memory segment with a key value
+ of <tt>0x4E545030</tt> + <i>u</i>, where <i>u</i> is again
+ the clock unit. (This value could be hex-decoded as 'NTP0',
+ 'NTP1',..., with funny characters for units &gt; 9.)
+ </p><p>
+ Public access means a permission set of 0666, while private access
+ creates the mapping with a permission set of 0600.
+ </p>
+ </li>
+ </ul>
+
+ <p>There's no support for POSIX shared memory yet.</p>
+
+ <p><i>NTPD</i> is started as root on most POSIX-like operating systems
+ and uses the setuid/setgid system API to run under reduced rights once
+ the initial setup of the process is done. One consequence out of this
+ is that the allocation of SHM segments must be done early during the
+ clock setup. The actual polling of the clock is done as the run-time
+ user; deferring the creation of the SHM segment to this point will
+ create a SHM segment owned by the runtime-user account. The internal
+ structure of <i>NTPD</i> does not permit the use of a fudge flag if
+ this is to be avoided; this is the reason why a mode bit is used for
+ the configuration of a public segment.
+ </p>
+
+ <p>When running under Windows, the chosen user account must be able to
+ create a SHM segment in the global object name space for SHM clocks with
+ public access. Otherwise the session isolation used by Windows kernels
+ after WinXP will get into the way if the client program does not run in
+ the same session.
+ </p>
+
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
diff --git a/html/miscopt.html b/html/miscopt.html
index 62f41b6..5750d17 100644
--- a/html/miscopt.html
+++ b/html/miscopt.html
@@ -10,7 +10,7 @@
<img src="pic/boom3.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
<p>We have three, now looking for more.</p>
<p>Last update:
- <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->28-Feb-2015 12:01<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
@@ -90,7 +90,7 @@
</dl>
</dd>
<dt id="nonvolatile"><tt>nonvolatile <i>threshold</i></tt></dt>
- <dd>Specify the <i><tt>threshold</tt></i> in PPM to write the frequency file, with default 0.1 PPM. The frequency file is inspected each hour. If the difference between the current frequency and the last value written exceeds the threshold, the file is written and the <tt><em>threshold</em></tt> becomes the new threshold value. If the threshold is not exceeded, it is reduced by half. This is intended to reduce the frequency of unnecessary file writes for embedded systems with nonvolatile memory.</dd>
+ <dd>Specify the <i><tt>threshold</tt></i> in seconds to write the frequency file, with default of 1e-7 (0.1 PPM). The frequency file is inspected each hour. If the difference between the current frequency and the last value written exceeds the threshold, the file is written and the <tt><em>threshold</em></tt> becomes the new threshold value. If the threshold is not exceeded, it is reduced by half. This is intended to reduce the frequency of unnecessary file writes for embedded systems with nonvolatile memory.</dd>
<dt id="phone"><tt>phone <i>dial</i> ...</tt></dt>
<dd>This command is used in conjunction with the ACTS modem driver (type 18). The arguments consist of a maximum of 10 telephone numbers used to dial USNO, NIST or European time services. The Hayes command ATDT&nbsp;is normally prepended to the number, which can contain other modem control codes as well.</dd>
<dt id="reset"><tt>reset [allpeers] [auth] [ctl] [io] [mem] [sys] [timer]</tt></dt>
diff --git a/html/sntp.html b/html/sntp.html
index 0c270cb..84c6f29 100644
--- a/html/sntp.html
+++ b/html/sntp.html
@@ -3,6 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>sntp - Simple Network Time Protocol (SNTP) Client</title>
+<!-- Changed by: Harlan &, 07-Dec-2014 -->
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
@@ -10,7 +11,7 @@
<img src="pic/dogsnake.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
<p>S is for snakeoil.</p>
<p>Last update:
- <!-- #BeginDate format:En2m -->3-Oct-2011 21:51<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->1-Apr-2015 11:05<!-- #EndDate -->
UTC</p>
<br clear="left">
<hr>
@@ -19,8 +20,8 @@
<h4>Description</h4>
<p>This program is a Simple Network Time Protocol (SNTP) client that can be used to query a Network Time Protocol (NTP) server and display the time offset of the system clock relative to the server clock. Run as root it can correct the system clock to this offset as well. It can be run as an interactive command or from a script by a <tt>cron</tt> job. The program implements the SNTP client protocol defined in RFC 5905, including the full on-wire protocol but does not provide the sanity checks, access controls, security functions and mitigation algorithms as in the full NTP version 4 specification, also defined in RFC 5905.</p>
<p>By default, <tt>sntp</tt> writes the local date and time (i.e., not UTC) to the standard output in the format</p>
-<p><tt>2011-08-04 00:40:36.642222 (+0000) +0.006611 +/- 0.041061 psp-os1 149.20.68.26</tt></p>
-<p>where the <tt>+0.006611 +/- 0.041061</tt> indicates the time offset and error bound of the system clock relative to the server clock, in seconds.</p>
+<p><tt>2011-08-04 00:40:36.642222 (+0000) +0.006611 +/- 0.041061 psp-os1 149.20.68.26 s3 no-leap</tt></p>
+<p>where the <tt>+0.006611 +/- 0.041061</tt> indicates the time offset and error bound of the system clock relative to the server clock, in seconds. The hostname and/or the IP is displayed, as is the stratum of the server. Finally, the leap indicator status is displayed.</p>
<p>If -b <i>bcaddress</i> is not specified, the program sends a single message to each address and waits up to <i>uctimeout</i> (default 5) seconds for a unicast server response. Otherwise, it sends no message and waits up to <i>bctimeout</i> (default 68) seconds for a broadcast NTP message.</p>
<h4>Options</h4>
<p><tt>sntp</tt> recognizes the following options:</p>
@@ -46,7 +47,7 @@
<dt><tt>-g <i>delay</i>, --gap <i>delay</i></tt></dt>
<dd>Specify the <i>delay</i> in milliseconds between outgoing queries, defaulting to 50. <tt>sntp</tt> sends queries to all provided hostnames/addresses in short succession, and by default terminates once the first valid response is received. With multiple time sources provided, all but one will not be used. To limit the number of queries whose responses will not be used, each query is separated from the preceding one by <i>delay</i> milliseconds, to allow time for responses to earlier queries to be received. A larger <i>delay</i> reduces the query load on the time sources, increasing the time to receive a valid response if the first source attempted is slow or unreachable.</dd>
<dt><tt>-K <i>kodfile</i>, --kod <i>kodfile</i></tt></dt>
- <dd>Specifies the filename <i>kodfile</i> to be used for the persistent history of KoD (Kiss Of Death, or rate-limiting) responses received from servers. The default is <tt>/var/db/ntp-kod</tt>. Note that the short option is <tt>-K</tt>, an uppercase letter K.</dd>
+ <dd>Specifies the filename <i>kodfile</i> to be used for the persistent history of KoD (Kiss Of Death, or rate-limiting) responses received from servers. The default is <tt>/var/db/ntp-kod</tt>. If the file does not exist, a warning message will be displayed. The file will not be created. Note that the short option is <tt>-K</tt>, an uppercase letter K.</dd>
<dt><tt>-k <i>keyfile</i>, --keyfile <i>keyfile</i></tt></dt>
<dd>Specifies the filename <i>keyfile</i> used with the <tt>-a</tt>/<tt>--authentication</tt> option. The format of the file is described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>.</dd>
<dt><tt>-l <i>logfile</i>, --filelog <i>logfile</i></tt></dt>
diff --git a/include/Makefile.in b/include/Makefile.in
index e50f270..cb21004 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -40,8 +40,7 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -52,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -69,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -150,6 +152,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -184,7 +187,9 @@ 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@
@@ -323,6 +328,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/include/audio.h b/include/audio.h
index 1b969bd..0d74226 100644
--- a/include/audio.h
+++ b/include/audio.h
@@ -9,6 +9,6 @@
/*
* Function prototypes
*/
-int audio_init (char *, int, int);
+int audio_init (const char *, int, int);
int audio_gain (int, int, int);
void audio_show (void);
diff --git a/include/binio.h b/include/binio.h
index d1ee944..cf98633 100644
--- a/include/binio.h
+++ b/include/binio.h
@@ -42,11 +42,21 @@ void put_lsb_short (unsigned char **, long);
long get_lsb_long (unsigned char **);
void put_lsb_long (unsigned char **, long);
+#define get_lsb_int16( _x_ ) ((int16_t) get_lsb_short( _x_ ))
+#define get_lsb_uint16( _x_ ) ((uint16_t) get_lsb_short( _x_ ))
+#define get_lsb_int32( _x_ ) ((int32_t) get_lsb_long( _x_ ))
+#define get_lsb_uint32( _x_ ) ((uint32_t) get_lsb_long( _x_ ))
+
long get_msb_short (unsigned char **);
void put_msb_short (unsigned char **, long);
long get_msb_long (unsigned char **);
void put_msb_long (unsigned char **, long);
+#define get_msb_int16( _x_ ) ((int16_t) get_msb_short( _x_ ))
+#define get_msb_uint16( _x_ ) ((uint16_t) get_msb_short( _x_ ))
+#define get_msb_int32( _x_ ) ((int32_t) get_msb_long( _x_ ))
+#define get_msb_uint32( _x_ ) ((uint32_t) get_msb_long( _x_ ))
+
#endif
/*
* History:
diff --git a/include/icom.h b/include/icom.h
index 66d12e5..b271afb 100644
--- a/include/icom.h
+++ b/include/icom.h
@@ -83,5 +83,5 @@
/*
* Function prototypes
*/
-int icom_init (char *, int, int);
+int icom_init (const char *, int, int);
int icom_freq (int, int, double);
diff --git a/include/isc/Makefile.in b/include/isc/Makefile.in
index af01dcd..ad0da46 100644
--- a/include/isc/Makefile.in
+++ b/include/isc/Makefile.in
@@ -40,8 +40,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -52,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -69,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -112,6 +114,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -146,7 +149,9 @@ 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@
@@ -285,6 +290,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/include/mbg_gps166.h b/include/mbg_gps166.h
index 974deba..b9b3d77 100644
--- a/include/mbg_gps166.h
+++ b/include/mbg_gps166.h
@@ -39,206 +39,459 @@
#define MBG_GPS166_H
-/***************************************************************************/
-/* */
-/* File: GPSSERIO.H 4.1 */
-/* */
-/* Project: Common C Library */
-/* */
-/* Compiler: Borland C++ */
-/* */
-/* Author: M. Burnicki, Meinberg Funkuhren */
-/* */
-/* */
-/* Description: */
-/* This file defines structures and codes to be used to access GPS166 */
-/* via its serial interface COM0. COM0 should be set to a high baud */
-/* rate, default is 19200. */
-/* */
-/* Standard GPS166 serial operation is to send a time string that is */
-/* compatible with Meinberg UA31 or PZF535 DCF77 radio remote clocks. */
-/* That string can be transmitted automatically once per second, once */
-/* per minute or on request per ASCII '?'. */
-/* */
-/* Parameter setup or parameter readout works using blocks of binary */
-/* data which have to be isolated from the standard string. A block of */
-/* data starts with a SOH code (ASCII Start Of Header, 0x01) followed */
-/* by a message header with constant length and a data portion with */
-/* variable length. The first field (cmd) of the message header holds */
-/* the command code rsp. the type of data to be transmitted. The next */
-/* field (len) gives the number of data bytes that are transmitted */
-/* after the header. This number ranges from 0 to sizeof( MSG_DATA ). */
-/* The third field (data_csum) holds a checksum of all data bytes and */
-/* the last field of the header finally holds the checksum of the. */
-/* header. */
-/* */
-/***************************************************************************/
-
-/* the control codes defined below are to be or'ed with a command/type code */
-
-#define GPS_REQACK 0x8000 /* to GPS166: request acknowledge */
-#define GPS_ACK 0x4000 /* from GPS166: acknowledge a command */
-#define GPS_NACK 0x2000 /* from GPS166: error receiving command */
-
-#define GPS_CTRL_MSK 0xF000 /* masks control code from command */
-
-
-/* The codes below specify commands/types of data to be supplied to GPS166: */
-
-/* GPS166 auto-message to host */
-/* þ host request, GPS166 response */
-/* þ þ host download to GPS166 */
-/* þ þ þ */
-enum { /* þ þ þ */
- /* system data */
- GPS_AUTO_ON = 0x000, /* þ þ þ X þ enable auto-messages from GPS166 */
- GPS_AUTO_OFF, /* þ þ þ X þ disable auto-messages from GPS166 */
- GPS_SW_REV, /* þ þ X þ þ request software revision */
- GPS_STAT, /* þ þ X þ þ request status of buffered variables */
- GPS_TIME, /* þ X þ þ X þ current time or capture or init board time */
- GPS_POS_XYZ, /* þ þ X þ X þ current position in ECEF coords */
- GPS_POS_LLA, /* þ þ X þ X þ current position in geographic coords */
- GPS_TZDL, /* þ þ X þ X þ time zone / daylight saving */
- GPS_PORT_PARM, /* þ þ X þ X þ parameters of the serial ports */
- GPS_SYNTH, /* þ þ X þ X þ synthesizer's frequency and phase */
- GPS_ANT_INFO, /* þ X þ X þ þ time diff after antenna disconnect */
- GPS_UCAP, /* þ X þ X þ þ user capture */
+/***************************************************************************
+ *
+ * Definitions taken from Meinberg's gpsserio.h and gpsdefs.h files.
+ *
+ * Author: Martin Burnicki, Meinberg Funkuhren
+ *
+ * Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
+ *
+ * Description:
+ * Structures and codes to be used to access Meinberg GPS clocks via
+ * their serial interface COM0. COM0 should be set to a high baud rate,
+ * default is 19200.
+ *
+ * Standard Meinberg GPS serial operation is to send the Meinberg
+ * standard time string automatically once per second, once per
+ * minute, or on request per ASCII '?'.
+ *
+ * GPS parameter setup or parameter readout uses blocks of binary
+ * data which have to be isolated from the standard string. A block
+ * of data starts with a SOH code (ASCII Start Of Header, 0x01)
+ * followed by a message header with constant length and a block of
+ * data with variable length.
+ *
+ * The first field (cmd) of the message header holds the command
+ * code resp. the type of data to be transmitted. The next field (len)
+ * gives the number of data bytes that follow the header. This number
+ * ranges from 0 to sizeof( MSG_DATA ). The third field (data_csum)
+ * holds a checksum of all data bytes and the last field of the header
+ * finally holds the checksum of the header itself.
+ *
+ ***************************************************************************/
+
+/**
+ * @brief GPS epoch bias from ordinary time_t epoch
+ *
+ * The Unix time_t epoch is usually 1970-01-01 00:00 whereas
+ * the GPS epoch is 1980-01-06 00:00, so the difference is 10 years,
+ * plus 2 days due to leap years (1972 and 1976), plus the difference
+ * of the day-of-month (6 - 1), so:<br>
+ *
+ * time_t t = ( gps_week * ::SECS_PER_WEEK ) + sec_of_week + ::GPS_SEC_BIAS
+ */
+#define GPS_SEC_BIAS 315964800UL // ( ( ( 10UL * 365UL ) + 2 + 5 ) * SECS_PER_DAY )
+
+
+#ifndef _COM_HS_DEFINED
+ /**
+ * @brief Enumeration of handshake modes
+ */
+ enum COM_HANSHAKE_MODES { HS_NONE, HS_XONXOFF, HS_RTSCTS, N_COM_HS };
+ #define _COM_HS_DEFINED
+#endif
+
+#ifndef _COM_PARM_DEFINED
+ /**
+ * @brief A data type to configure a serial port's baud rate
+ *
+ * @see ::MBG_BAUD_RATES
+ */
+ typedef int32_t BAUD_RATE;
+
+ /**
+ * @brief Indices used to identify a parameter in the framing string
+ *
+ * @see ::MBG_FRAMING_STRS
+ */
+ enum MBG_FRAMING_STR_IDXS { F_DBITS, F_PRTY, F_STBITS };
+
+ /**
+ * @brief A structure to store the configuration of a serial port
+ */
+ typedef struct
+ {
+ BAUD_RATE baud_rate; ///< transmission speed, e.g. 19200L, see ::MBG_BAUD_RATES
+ char framing[4]; ///< ASCIIZ framing string, e.g. "8N1" or "7E2", see ::MBG_FRAMING_STRS
+ int16_t handshake; ///< handshake mode, yet only ::HS_NONE supported
+
+ } COM_PARM;
+
+ #define _COM_PARM_DEFINED
+#endif
+
+
+/**
+ * @brief Enumeration of modes supported for time string transmission
+ *
+ * This determines e.g. at which point in time a string starts
+ * to be transmitted via the serial port.
+ * Used with ::PORT_SETTINGS::mode.
+ *
+ * @see ::STR_MODE_MASKS
+ */
+enum STR_MODES
+{
+ STR_ON_REQ, ///< transmission on request by received '?' character only
+ STR_PER_SEC, ///< transmission automatically if second changes
+ STR_PER_MIN, ///< transmission automatically if minute changes
+ STR_AUTO, ///< transmission automatically if required, e.g. on capture event
+ STR_ON_REQ_SEC, ///< transmission if second changes and a request has been received before
+ N_STR_MODE ///< the number of known modes
+};
+
+
+/**
+ * The number of serial ports which are at least available
+ * even with very old GPS receiver models. For devices providing
+ * a ::RECEIVER_INFO structure the number of provided COM ports
+ * is available in ::RECEIVER_INFO::n_com_ports.
+ */
+#define DEFAULT_N_COM 2
+
+
+/**
+ * @brief A The structure used to store the configuration of two serial ports
+ *
+ * @deprecated This structure is deprecated, ::PORT_SETTINGS and related structures
+ * should be used instead, if supported by the device.
+ */
+typedef struct
+{
+ COM_PARM com[DEFAULT_N_COM]; ///< COM0 and COM1 settings
+ uint8_t mode[DEFAULT_N_COM]; ///< COM0 and COM1 output mode
+
+} PORT_PARM;
+
+
+/**
+ * @brief The type of a GPS command code
+ *
+ * @see ::GPS_CMD_CODES
+ */
+typedef uint16_t GPS_CMD;
+
+
+/**
+ * @brief Control codes to be or'ed with a particular command/type code
+ */
+enum GPS_CMD_CTRL_CODES
+{
+ GPS_REQACK = 0x8000, ///< to device: request acknowledge
+ GPS_ACK = 0x4000, ///< from device: acknowledge a command
+ GPS_NACK = 0x2000, ///< from device: error evaluating a command
+};
+
+#define GPS_CTRL_MSK 0xF000 ///< bit mask of all ::GPS_CMD_CTRL_CODES
+
+
+/**
+ * @brief Command codes for the binary protocol
+ *
+ * These codes specify commands and associated data types used by Meinberg's
+ * binary protocol to exchange data with a device via serial port, direct USB,
+ * or socket I/O.
+ *
+ * Some commands and associated data structures can be read (r) from a device, others
+ * can be written (w) to the device, and some can also be sent automatically (a) by
+ * a device after a ::GPS_AUTO_ON command has been sent to the device.
+ * The individual command codes are marked with (rwa) accordingly, where '-' is used
+ * to indicate that a particular mode is not supported.
+ *
+ * @note Not all command code are supported by all devices.
+ * See the hints for a particular command.
+ *
+ * @note If ::GPS_ALM, ::GPS_EPH or a code named ..._IDX is sent to retrieve
+ * some data from a device then an uint16_t parameter must be also supplied
+ * in order to specify the index number of the data set to be returned.
+ * The valid index range depends on the command code.
+ * For ::GPS_ALM and ::GPS_EPH the index is the SV number which may be 0 or
+ * ::MIN_SVNO_GPS to ::MAX_SVNO_GPS. If the number is 0 then all ::N_SVNO_GPS
+ * almanacs or ephemeris data structures are returned.
+ *
+ * @see ::GPS_CMD_CODES_TABLE
+ */
+enum GPS_CMD_CODES
+{ /* system data */
+ GPS_AUTO_ON = 0x000, ///< (-w-) no data, enable auto-msgs from device
+ GPS_AUTO_OFF, ///< (-w-) no data, disable auto-msgs from device
+ GPS_SW_REV, ///< (r--) deprecated, ::SW_REV, software revision, use only if ::GPS_RECEIVER_INFO not supp.
+ GPS_BVAR_STAT, ///< (r--) ::BVAR_STAT, status of buffered variables, only if ::GPS_MODEL_HAS_BVAR_STAT
+ GPS_TIME, ///< (-wa) ::TTM, current time or capture, or init board time
+ GPS_POS_XYZ, ///< (rw-) ::XYZ, current position in ECEF coordinates, only if ::GPS_MODEL_HAS_POS_XYZ
+ GPS_POS_LLA, ///< (rw-) ::LLA, current position in geographic coordinates, only if ::GPS_MODEL_HAS_POS_LLA
+ GPS_TZDL, ///< (rw-) ::TZDL, time zone / daylight saving, only if ::GPS_MODEL_HAS_TZDL
+ GPS_PORT_PARM, ///< (rw-) deprecated, ::PORT_PARM, use ::PORT_SETTINGS etc. if ::GPS_RECEIVER_INFO supported
+ GPS_SYNTH, ///< (rw-) ::SYNTH, synthesizer settings, only if ::GPS_HAS_SYNTH
+ GPS_ANT_INFO, ///< (r-a) ::ANT_INFO, time diff after antenna disconnect, only if ::GPS_MODEL_HAS_ANT_INFO
+ GPS_UCAP, ///< (r-a) ::TTM, user capture events, only if ::RECEIVER_INFO::n_ucaps > 0
/* GPS data */
- GPS_CFGH = 0x100, /* þ þ X þ X þ SVs' configuration and health codes */
- GPS_ALM, /* þ þ X þ X þ one SV's almanac */
- GPS_EPH, /* þ þ X þ X þ one SV's ephemeris */
- GPS_UTC, /* þ þ X þ X þ UTC correction parameters */
- GPS_IONO, /* þ þ X þ X þ ionospheric correction parameters */
- GPS_ASCII_MSG /* þ þ X þ þ the GPS ASCII message */
+ GPS_CFGH = 0x100, ///< (rw-) ::CFGH, SVs' configuration and health codes
+ GPS_ALM, ///< (rw-) req: uint16_t SV num, ::SV_ALM, one SV's almanac
+ GPS_EPH, ///< (rw-) req: uint16_t SV num, ::SV_EPH, one SV's ephemeris
+ GPS_UTC, ///< (rw-) ::UTC, GPS %UTC correction parameters
+ GPS_IONO, ///< (rw-) ::IONO, GPS ionospheric correction parameters
+ GPS_ASCII_MSG ///< (r--) ::ASCII_MSG, the GPS ASCII message
};
-/*
- * modelled after GPSDEFS.H Revision 1.5
- */
-/***************************************************************************/
-/* */
-/* File: GPSDEFS.H 4.1 */
-/* */
-/* Project: Common C Library */
-/* */
-/* Compiler: Borland C++ */
-/* */
-/* Author: M. Burnicki, Meinberg Funkuhren */
-/* */
-/* */
-/* Description: */
-/* General definitions to be used with GPS166 */
-/* GPS166 Rev. 1.23 or above */
-/* */
-/* Modifications: see file GPSLIB.TXT */
-/* */
-/***************************************************************************/
-#define _GPSDEFS_H
-/* the type of various checksums */
#ifndef _CSUM_DEFINED
- typedef unsigned short CSUM;
-# define _CSUM_DEFINED
+ typedef uint16_t CSUM; /* checksum used by some structures stored in non-volatile memory */
+ #define _CSUM_DEFINED
#endif
-/* the message header */
-typedef struct {
- unsigned short gps_cmd;
- unsigned short gps_len;
- unsigned short gps_data_csum;
- unsigned short gps_hdr_csum;
+/**
+ * @brief The header of a binary message.
+ */
+typedef struct
+{
+ GPS_CMD cmd; ///< see ::GPS_CMD_CODES
+ uint16_t len; ///< length of the data portion appended after the header
+ CSUM data_csum; ///< checksum of the data portion appended after the header
+ CSUM hdr_csum; ///< checksum of the preceding header bytes
+
} GPS_MSG_HDR;
-/* a struct used to hold the software revision information */
-typedef struct {
- unsigned short code; /* e.g. 0x0120 means rev. 1.20 */
- unsigned char name[17]; /* used to identify customized versions */
+#define GPS_ID_STR_LEN 16
+#define GPS_ID_STR_SIZE ( GPS_ID_STR_LEN + 1 )
+
+/**
+ * @brief Software revision information
+ *
+ * Contains a software revision code, plus an optional
+ * identifier for a customized version.
+ */
+typedef struct
+{
+ uint16_t code; ///< Version number, e.g. 0x0120 means v1.20
+ char name[GPS_ID_STR_SIZE]; ///< Optional string identifying a customized version
+ uint8_t reserved; ///< Reserved field to yield even structure size
+
} SW_REV;
-/* GPS ASCII message */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
- char s[23]; /* 22 chars GPS ASCII message plus trailing zero */
-} ASCII_MSG;
+/**
+ * @brief GNSS satellite numbers
+ *
+ * @todo: Check if MAX_SVNO_GLN is 94 instead of 95, and thus
+ * N_SVNO_GLN is 30 instead of 31, as reported by Wikipedia.
+ */
+enum GNSS_SVNOS
+{
+ MIN_SVNO_GPS = 1, ///< min. GPS satellite PRN number
+ MAX_SVNO_GPS = 32, ///< max. GPS satellite PRN number
+ N_SVNO_GPS = 32, ///< max. number of active GPS satellites
+
+ MIN_SVNO_WAAS = 33, ///< min. WAAS satellite number
+ MAX_SVNO_WAAS = 64, ///< max. WAAS satellite number
+ N_SVNO_WAAS = 32, ///< max. number of active WAAS satellites
+
+ MIN_SVNO_GLONASS = 65, ///< min. Glonass satellite number (64 + sat slot ID)
+ MAX_SVNO_GLONASS = 95, ///< max. Glonass satellite number (64 + sat slot ID)
+ N_SVNO_GLONASS = 31 ///< max. number of active Glonass satellites
+};
+
+
+typedef uint16_t SVNO; ///< the number of an SV (Space Vehicle, i.e. satellite)
+typedef uint16_t HEALTH; ///< an SV's 6 bit health code
+typedef uint16_t CFG; ///< an SV's 4 bit configuration code
+typedef uint16_t IOD; ///< Issue-Of-Data code
+
+
+/**
+ * @brief Status flags of battery buffered data
+ *
+ * Related to data received from the satellites, or data derived thereof.
+ *
+ * All '0' means OK, single bits set to '1' indicate
+ * the associated type of GPS data is not available.
+ *
+ * @see ::BVAR_FLAGS
+ */
+typedef uint16_t BVAR_STAT;
+
+#define _mbg_swab_bvar_stat( _p ) _mbg_swab16( (_p) )
-#define MIN_SVNO 1 /* min. SV number */
-#define MAX_SVNO 32 /* max. SV number */
-#define N_SVNO ( MAX_SVNO - MIN_SVNO + 1) /* number of possibly active SVs */
+/**
+ * @brief Enumeration of flag bits used to define ::BVAR_FLAGS
+ *
+ * For each bit which is set this means the associated data set in
+ * non-volatile memory is not available, or incomplete.
+ * Most data sets will just be re-collected from the data streams sent
+ * by the satellites. However, the receiver position has usually been
+ * computed earlier during normal operation, and will be re-computed
+ * when a sufficient number of satellites can be received.
+ *
+ * @see ::BVAR_STAT
+ * @see ::BVAR_FLAGS
+ * @see ::BVAR_FLAG_NAMES
+ */
+enum BVAR_FLAG_BITS
+{
+ BVAR_BIT_CFGH_INVALID, ///< Satellite configuration and health parameters incomplete
+ BVAR_BIT_ALM_NOT_COMPLETE, ///< Almanac parameters incomplete
+ BVAR_BIT_UTC_INVALID, ///< %UTC offset parameters incomplete
+ BVAR_BIT_IONO_INVALID, ///< Ionospheric correction parameters incomplete
+ BVAR_BIT_RCVR_POS_INVALID, ///< No valid receiver position available
+ N_BVAR_BIT ///< number of defined ::BVAR_STAT bits
+};
+
+
+/**
+ * @brief Bit masks associated with ::BVAR_FLAG_BITS
+ *
+ * Used with ::BVAR_STAT.
+ *
+ * @see ::BVAR_STAT
+ * @see ::BVAR_FLAG_BITS
+ * @see ::BVAR_FLAG_NAMES
+ */
+enum BVAR_FLAGS
+{
+ BVAR_CFGH_INVALID = ( 1UL << BVAR_BIT_CFGH_INVALID ), ///< see ::BVAR_BIT_CFGH_INVALID
+ BVAR_ALM_NOT_COMPLETE = ( 1UL << BVAR_BIT_ALM_NOT_COMPLETE ), ///< see ::BVAR_BIT_ALM_NOT_COMPLETE
+ BVAR_UTC_INVALID = ( 1UL << BVAR_BIT_UTC_INVALID ), ///< see ::BVAR_BIT_UTC_INVALID
+ BVAR_IONO_INVALID = ( 1UL << BVAR_BIT_IONO_INVALID ), ///< see ::BVAR_BIT_IONO_INVALID
+ BVAR_RCVR_POS_INVALID = ( 1UL << BVAR_BIT_RCVR_POS_INVALID ), ///< see ::BVAR_BIT_RCVR_POS_INVALID
+};
-typedef short SVNO; /* the number of a SV */
-typedef unsigned short HEALTH; /* a SV's health code */
-typedef unsigned short CFG; /* a SV's configuration code */
-typedef unsigned short IOD; /* Issue-Of-Data code */
-/* Date and time referred to the linear time scale defined by GPS. */
-/* GPS time is defined by the number of weeks since midnight from */
-/* January 5, 1980 to January 6, 1980 plus the number of seconds of */
-/* the current week plus fractions of a second. GPS time differs from */
-/* UTC because UTC is corrected with leap seconds while GPS time scale */
-/* is continuous. */
+/**
+ * @brief A structure used to hold time in GPS format
+ *
+ * Date and time refer to the linear time scale defined by GPS, with
+ * the epoch starting at %UTC midnight at the beginning of January 6, 1980.
+ *
+ * GPS time is counted by the week numbers since the epoch, plus second
+ * of the week, plus fraction of the second. The week number transmitted
+ * by the satellites rolls over from 1023 to 0, but Meinberg devices
+ * just continue to count the weeks beyond the 1024 week limit to keep
+ * the receiver's internal time.
+ *
+ * %UTC time differs from GPS time since a number of leap seconds have
+ * been inserted in the %UTC time scale after the GPS epoche. The number
+ * of leap seconds is disseminated by the satellites using the ::UTC
+ * parameter set, which also provides info on pending leap seconds.
+ */
+typedef struct
+{
+ uint16_t wn; ///< the week number since GPS has been installed
+ uint32_t sec; ///< the second of that week
+ uint32_t tick; ///< fractions of a second, 1/::RECEIVER_INFO::ticks_per_sec units
-typedef struct {
- unsigned short wn; /* the week number since GPS has been installed */
- unsigned long sec; /* the second of that week */
- unsigned long tick; /* fractions of a second; scale: 1E-7 */
} T_GPS;
-/* Local date and time computed from GPS time. The current number */
-/* of leap seconds have to be added to get UTC from GPS time. */
-/* Additional corrections could have been made according to the */
-/* time zone/daylight saving parameters (TZDL, see below) defined */
-/* by the user. The status field can be checked to see which corrections */
-/* have been applied. */
-
-#ifndef GPS166_TM_DEFINED
- typedef struct {
- short year; /* 0..9999 */
- char month; /* 1..12 */
- char mday; /* 1..31 */
- short yday; /* 1..366 */
- char wday; /* 0..6 == Sun..Sat */
- char hour; /* 0..23 */
- char minute; /* 0..59 */
- char second; /* 0..59 */
- long frac; /* fractions of a second, scale 1E-7 */
- long offs_from_utc; /* local time's offset from UTC */
- unsigned short status; /* flags */
- } TM;
-
- /* status flags used with conversion from GPS time to local time */
-
-# define TM_UTC 0x01 /* UTC correction has been made */
-# define TM_LOCAL 0x02 /* UTC has been converted to local time */
-# define TM_DL_ANN 0x04 /* state of daylight saving is going to change */
-# define TM_DL_ENB 0x08 /* daylight saving is enabled */
-# define TM_LS_ANN 0x10 /* leap second will be inserted */
-# define TM_LS_ENB 0x20 /* current second is leap second */
-
-# define GPS166_TM_DEFINED
-#endif
+/**
+ * @brief Local date and time computed from GPS time
+ *
+ * The current number of leap seconds have to be added to get %UTC
+ * from GPS time. Additional corrections could have been made according
+ * to the time zone/daylight saving parameters ::TZDL defined by the user.
+ * The status field can be checked to see which corrections
+ * have actually been applied.
+ *
+ * @note Conversion from GPS time to %UTC and/or local time can only be
+ * done if some valid ::UTC correction parameters are available in the
+ * receiver's non-volatile memory.
+ */
+typedef struct
+{
+ int16_t year; ///< year number, 0..9999
+ int8_t month; ///< month, 1..12
+ int8_t mday; ///< day of month, 1..31
+ int16_t yday; ///< day of year, 1..365, or 366 in case of leap year
+ int8_t wday; ///< day of week, 0..6 == Sun..Sat
+ int8_t hour; ///< hours, 0..23
+ int8_t min; ///< minutes, 0..59
+ int8_t sec; ///< seconds, 0..59, or 60 in case of inserted leap second
+ int32_t frac; ///< fractions of a second, 1/::RECEIVER_INFO::ticks_per_sec units
+ int32_t offs_from_utc; ///< local time offset from %UTC [sec]
+ uint16_t status; ///< status flags, see ::TM_GPS_STATUS_BIT_MASKS
+
+} TM_GPS;
+
+
+
+/**
+ * @brief Status flag bits used to define ::TM_GPS_STATUS_BIT_MASKS
+ *
+ * These bits report info on the time conversion from GPS time to %UTC
+ * and/or local time as well as device status info.
+ *
+ * @see ::TM_GPS_STATUS_BIT_MASKS
+ */
+enum TM_GPS_STATUS_BITS
+{
+ TM_BIT_UTC, ///< %UTC correction has been made
+ TM_BIT_LOCAL, ///< %UTC has been converted to local time according to ::TZDL settings
+ TM_BIT_DL_ANN, ///< state of daylight saving is going to change
+ TM_BIT_DL_ENB, ///< daylight saving is in effect
+ TM_BIT_LS_ANN, ///< leap second pending
+ TM_BIT_LS_ENB, ///< current second is leap second
+ TM_BIT_LS_ANN_NEG, ///< set in addition to ::TM_BIT_LS_ANN if leap sec is negative
+ TM_BIT_INVT, ///< invalid time, e.g. if RTC battery bas been empty
+
+ TM_BIT_EXT_SYNC, ///< synchronized externally
+ TM_BIT_HOLDOVER, ///< in holdover mode after previous synchronization
+ TM_BIT_ANT_SHORT, ///< antenna cable short circuited
+ TM_BIT_NO_WARM, ///< OCXO has not warmed up
+ TM_BIT_ANT_DISCONN, ///< antenna currently disconnected
+ TM_BIT_SYN_FLAG, ///< TIME_SYN output is low
+ TM_BIT_NO_SYNC, ///< time sync actually not verified
+ TM_BIT_NO_POS ///< position actually not verified, LOCK LED off
+};
-/* the status flags below are defined starting with rev. 1.32 */
+/**
+ * @brief Status flag masks used with ::TM_GPS::status
+ *
+ * These bits report info on the time conversion from GPS time to %UTC
+ * and/or local time as well as device status info.
+ *
+ * @see ::TM_GPS_STATUS_BITS
+ */
+enum TM_GPS_STATUS_BIT_MASKS
+{
+ TM_UTC = ( 1UL << TM_BIT_UTC ), ///< see ::TM_BIT_UTC
+ TM_LOCAL = ( 1UL << TM_BIT_LOCAL ), ///< see ::TM_BIT_LOCAL
+ TM_DL_ANN = ( 1UL << TM_BIT_DL_ANN ), ///< see ::TM_BIT_DL_ANN
+ TM_DL_ENB = ( 1UL << TM_BIT_DL_ENB ), ///< see ::TM_BIT_DL_ENB
+ TM_LS_ANN = ( 1UL << TM_BIT_LS_ANN ), ///< see ::TM_BIT_LS_ANN
+ TM_LS_ENB = ( 1UL << TM_BIT_LS_ENB ), ///< see ::TM_BIT_LS_ENB
+ TM_LS_ANN_NEG = ( 1UL << TM_BIT_LS_ANN_NEG ), ///< see ::TM_BIT_LS_ANN_NEG
+ TM_INVT = ( 1UL << TM_BIT_INVT ), ///< see ::TM_BIT_INVT
+
+ TM_EXT_SYNC = ( 1UL << TM_BIT_EXT_SYNC ), ///< see ::TM_BIT_EXT_SYNC
+ TM_HOLDOVER = ( 1UL << TM_BIT_HOLDOVER ), ///< see ::TM_BIT_HOLDOVER
+ TM_ANT_SHORT = ( 1UL << TM_BIT_ANT_SHORT ), ///< see ::TM_BIT_ANT_SHORT
+ TM_NO_WARM = ( 1UL << TM_BIT_NO_WARM ), ///< see ::TM_BIT_NO_WARM
+ TM_ANT_DISCONN = ( 1UL << TM_BIT_ANT_DISCONN ), ///< see ::TM_BIT_ANT_DISCONN
+ TM_SYN_FLAG = ( 1UL << TM_BIT_SYN_FLAG ), ///< see ::TM_BIT_SYN_FLAG
+ TM_NO_SYNC = ( 1UL << TM_BIT_NO_SYNC ), ///< see ::TM_BIT_NO_SYNC
+ TM_NO_POS = ( 1UL << TM_BIT_NO_POS ) ///< see ::TM_BIT_NO_POS
+};
-#define TM_ANT_DISCONN 0x1000 /* antenna currently disconnected */
-#define TM_SYN_FLAG 0x2000 /* TIME_SYN output is low */
-#define TM_NO_SYNC 0x4000 /* not sync'ed after reset */
-#define TM_NO_POS 0x8000 /* position not computed after reset, */
- /* LOCK LED off */
-/* a struct used to transmit information on date and time */
+/**
+ * @brief A structure used to transmit information on date and time
+ *
+ * This structure can be used to transfer the current time, in which
+ * case the channel field has to be set to -1, or an event capture time
+ * retrieved from the on-board FIFO, in which case the channel field
+ * contains the index of the time capture input, e.g. 0 or 1.
+ */
+typedef struct
+{
+ int16_t channel; ///< -1: the current on-board time; >= 0 the capture channel number
+ T_GPS t; ///< time in GPS scale and format
+ TM_GPS tm; ///< time converted to %UTC and/or local time according to ::TZDL settings
-typedef struct {
- short channel; /* -1: the current time; 0, 1: capture 0, 1 */
- T_GPS t; /* time in GPS format */
- TM tm; /* that time converted to local time */
} TTM;
@@ -249,282 +502,462 @@ typedef struct {
/* to geographic coordinates as defined by WGS84 (World Geodetic */
/* System from 1984). */
-#ifndef _XYZ_DEFINED
- /* sequence and number of components of a cartesian position */
- enum { XP, YP, ZP, N_XYZ };
+/**
+ * @brief Sequence and number of components of a cartesian position
+ */
+enum XYZ_FIELDS { XP, YP, ZP, N_XYZ }; // x, y, z
+
+/**
+ * @brief A position in cartesian coordinates
+ *
+ * Usually earth centered, earth fixed (ECEF) coordinates,
+ * in [m].
+ *
+ * @note In the original code this is an array of double.
+ *
+ * @see ::XYZ_FIELDS
+ */
+typedef l_fp XYZ[N_XYZ];
- /* a type of array holding a cartesian position */
- typedef l_fp XYZ[N_XYZ]; /* values are in [m] */
-# define _XYZ_DEFINED
-#endif
+/**
+ * @brief Sequence and number of components of a geographic position
+ */
+enum LLA_FIELDS { LAT, LON, ALT, N_LLA }; /* latitude, longitude, altitude */
+/**
+ * @brief A geographic position based on latitude, longitude, and altitude
+ *
+ * The geographic position associated to specific cartesian coordinates
+ * depends on the characteristics of the ellipsoid used for the computation,
+ * the so-called geographic datum. GPS uses the WGS84 (World Geodetic System
+ * from 1984) ellipsoid by default.
+ *
+ * lon, lat in [rad], alt in [m]
+ *
+ * @note In the original code this is an array of double.
+ *
+ * @see ::LLA_FIELDS
+ */
+typedef l_fp LLA[N_LLA];
-#ifndef _LLA_DEFINED
- /* sequence and number of components of a geographic position */
- enum { LAT, LON, ALT, N_LLA }; /* latitude, longitude, altitude */
- /* a type of array holding a geographic position */
- typedef l_fp LLA[N_LLA]; /* lon, lat in [rad], alt in [m] */
+/**
+ * @defgroup group_synth Synthesizer parameters
+ *
+ * Synthesizer frequency is expressed as a
+ * four digit decimal number (freq) to be multiplied by 0.1 Hz and an
+ * base 10 exponent (range). If the effective frequency is less than
+ * 10 kHz its phase is synchronized corresponding to the variable phase.
+ * Phase may be in a range from -360 deg to +360 deg with a resolution
+ * of 0.1 deg, so the resulting numbers to be stored are in a range of
+ * -3600 to +3600.
+ *
+ * Example:<br>
+ * Assume the value of freq is 2345 (decimal) and the value of phase is 900.
+ * If range == 0 the effective frequency is 234.5 Hz with a phase of +90 deg.
+ * If range == 1 the synthesizer will generate a 2345 Hz output frequency
+ * and so on.
+ *
+ * Limitations:<br>
+ * If freq == 0 the synthesizer is disabled. If range == 0 the least
+ * significant digit of freq is limited to 0, 3, 5 or 6. The resulting
+ * frequency is shown in the examples below:
+ * - freq == 1230 --> 123.0 Hz
+ * - freq == 1233 --> 123 1/3 Hz (real 1/3 Hz, NOT 123.3 Hz)
+ * - freq == 1235 --> 123.5 Hz
+ * - freq == 1236 --> 123 2/3 Hz (real 2/3 Hz, NOT 123.6 Hz)
+ *
+ * If range == ::MAX_SYNTH_RANGE the value of freq must not exceed 1000, so
+ * the output frequency is limited to 10 MHz (see ::MAX_SYNTH_FREQ_VAL).
+ *
+ * @{ */
-# define _LLA_DEFINED
-#endif
+#define N_SYNTH_FREQ_DIGIT 4 ///< number of digits to edit
+#define MAX_SYNTH_FREQ 1000 ///< if range == ::MAX_SYNTH_RANGE
-/* Synthesizer parameters. Synthesizer frequency is expressed as a */
-/* four digit decimal number (freq) to be multiplied by 0.1 Hz and an */
-/* base 10 exponent (range). If the effective frequency is less than */
-/* 10 kHz its phase is synchronized corresponding to the variable phase. */
-/* Phase may be in a range from -360° to +360° with a resolution of 0.1°, */
-/* so the resulting numbers to be stored are in a range of -3600 to +3600. */
-
-/* Example: */
-/* Assume the value of freq is 2345 (decimal) and the value of phase is 900. */
-/* If range == 0 the effective frequency is 234.5 Hz with a phase of +90°. */
-/* If range == 1 the synthesizer will generate a 2345 Hz output frequency */
-/* and so on. */
-
-/* Limitations: */
-/* If freq == 0 the synthesizer is disabled. If range == 0 the least */
-/* significant digit of freq is limited to 0, 3, 5 or 6. The resulting */
-/* frequency is shown in the examples below: */
-/* freq == 1230 --> 123.0 Hz */
-/* freq == 1233 --> 123 1/3 Hz (real 1/3 Hz, NOT 123.3 Hz) */
-/* freq == 1235 --> 123.5 Hz */
-/* freq == 1236 --> 123 2/3 Hz (real 2/3 Hz, NOT 123.6 Hz) */
-
-/* If range == MAX_RANGE the value of freq must not exceed 1200, so the */
-/* output frequency is limited to 12 MHz. */
-
-/* Phase will be ignored if the resulting frequency is greater or equal */
-/* to 10 kHz. */
-
-#define MAX_SYNTH_FREQ 1200 /* if range == MAX_SYNTH_RANGE */
#define MIN_SYNTH_RANGE 0
#define MAX_SYNTH_RANGE 5
-#define MAX_SYNTH_PHASE 3600
+#define N_SYNTH_RANGE ( MAX_SYNTH_RANGE - MIN_SYNTH_RANGE + 1 )
-typedef struct {
- short freq; /* four digits used; scale: 0.1; e.g. 1234 -> 123.4 Hz */
- short range; /* scale factor for freq; 0..MAX_SYNTH_RANGE */
- short phase; /* -MAX_SYNTH_PHASE..+MAX_SYNTH_PHASE; >0 -> pulses later */
-} SYNTH;
+#define N_SYNTH_PHASE_DIGIT 4
+#define MAX_SYNTH_PHASE 3600
+#define MAX_SYNTH_FREQ_EDIT 9999 ///< max sequence of digits when editing
-/* Time zone/daylight saving parameters. */
-/* the name of a time zone, 5 characters plus trailing zero */
-typedef char TZ_NAME[6];
+/**
+ * @brief The maximum frequency that can be configured for the synthesizer
+ */
+#define MAX_SYNTH_FREQ_VAL 10000000UL ///< 10 MHz
+/* == MAX_SYNTH_FREQ * 10^(MAX_SYNTH_RANGE-1) */
-typedef struct {
- long offs; /* offset from UTC to local time [sec] */
- long offs_dl; /* additional offset if daylight saving enabled [sec] */
- TM tm_on; /* date/time when daylight saving starts */
- TM tm_off; /* date/time when daylight saving ends */
- TZ_NAME name[2]; /* names without and with daylight saving enabled */
-} TZDL;
+/**
+ * @brief The synthesizer's phase is only be synchronized if the frequency is below this limit
+ */
+#define SYNTH_PHASE_SYNC_LIMIT 10000UL ///< 10 kHz
-/* The constant below is defined beginning with software rev. 1.29. */
-/* If the year in tzdl.tmon and tzdl.tm_off is or'ed with that constant, */
-/* the receiver automatically generates daylight saving year by year. */
-/* See GPSLIB.TXT for more information. */
+/**
+ * A Macro used to determine the position of the decimal point
+ * when printing the synthesizer frequency as 4 digit value
+ */
+#define _synth_dp_pos_from_range( _r ) \
+ ( ( ( N_SYNTH_RANGE - (_r) ) % ( N_SYNTH_FREQ_DIGIT - 1 ) ) + 1 )
+
+/**
+ * @brief Synthesizer frequency units
+ *
+ * An initializer for commonly displayed synthesizer frequency units
+ * (::N_SYNTH_RANGE strings)
+ */
+#define DEFAULT_FREQ_RANGES \
+{ \
+ "Hz", \
+ "kHz", \
+ "kHz", \
+ "kHz", \
+ "MHz", \
+ "MHz", \
+}
-#define DL_AUTO_FLAG 0x8000
-/* Example: */
-/* for automatic daylight saving enable/disable in Central Europe, */
-/* the variables are to be set as shown below: */
-/* offs = 3600L one hour from UTC */
-/* offs_dl = 3600L one additional hour if daylight saving enabled */
-/* tm_on = first Sunday from March 25, 02:00:00h ( year |= DL_AUTO_FLAG ) */
-/* tm_off = first Sunday from Sept 24, 03:00:00h ( year |= DL_AUTO_FLAG ) */
-/* name[0] == "MEZ " name if daylight saving not enabled */
-/* name[1] == "MESZ " name if daylight saving is enabled */
+/**
+ * @brief Synthesizer configuration parameters
+ */
+typedef struct
+{
+ int16_t freq; ///< four digits used; scale: 0.1 Hz; e.g. 1234 -> 123.4 Hz
+ int16_t range; ///< scale factor for freq; 0..::MAX_SYNTH_RANGE
+ int16_t phase; ///< -::MAX_SYNTH_PHASE..+::MAX_SYNTH_PHASE; >0 -> pulses later
+} SYNTH;
+#define _mbg_swab_synth( _p ) \
+{ \
+ _mbg_swab16( &(_p)->freq ); \
+ _mbg_swab16( &(_p)->range ); \
+ _mbg_swab16( &(_p)->phase ); \
+}
-/* the structure below was defined in rev. 1.31. It reflects the status */
-/* of the antenna, the times of last disconnect/reconnect and the boards */
-/* clock offset after the phase of disconnection. */
-typedef struct {
- short status; /* current status of antenna */
- TM tm_disconn; /* time of antenna disconnect */
- TM tm_reconn; /* time of antenna reconnect */
- long delta_t; /* clock offset at reconnect time, units: TICKS_PER_SEC */
-} ANT_INFO;
+/**
+ * @brief Enumeration of synthesizer states
+ */
+enum SYNTH_STATES
+{
+ SYNTH_DISABLED, ///< disbled by cfg, i.e. freq == 0.0
+ SYNTH_OFF, ///< not enabled after power-up
+ SYNTH_FREE, ///< enabled, but not synchronized
+ SYNTH_DRIFTING, ///< has initially been sync'd, but now running free
+ SYNTH_SYNC, ///< fully synchronized
+ N_SYNTH_STATE ///< the number of known states
+};
+
+/**
+ * @brief A structure used to report the synthesizer state
+ */
+typedef struct
+{
+ uint8_t state; ///< state code as enumerated in ::SYNTH_STATES
+ uint8_t flags; ///< reserved, currently always 0
-/* the status field may be set to one of the values below: */
+} SYNTH_STATE;
-enum {
- ANT_INVALID, /* struct not set yet because ant. has not been disconn. */
- ANT_DISCONN, /* ant. now disconn., tm_reconn and delta_t not set */
- ANT_RECONN /* ant. has been disconn. and reconn., all fields valid */
-};
+#define _mbg_swab_synth_state( _p ) _nop_macro_fnc()
+#define SYNTH_FLAG_PHASE_IGNORED 0x01
-/* Summary of configuration and health data of all SVs. */
+/** @} defgroup group_synth */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
- T_GPS tot_51; /* time of transmission, page 51 */
- T_GPS tot_63; /* time of transmission, page 63 */
- T_GPS t0a; /* complete reference time almanac */
- CFG cfg[N_SVNO]; /* SV configuration from page 63 */
- HEALTH health[N_SVNO]; /* SV health from pages 51, 63 */
-} CFGH;
+/**
+ * @defgroup group_tzdl Time zone / daylight saving parameters
+ *
+ * Example: <br>
+ * For automatic daylight saving enable/disable in Central Europe,
+ * the variables are to be set as shown below: <br>
+ * - offs = 3600L one hour from %UTC
+ * - offs_dl = 3600L one additional hour if daylight saving enabled
+ * - tm_on = first Sunday from March 25, 02:00:00h ( year |= ::DL_AUTO_FLAG )
+ * - tm_off = first Sunday from October 25, 03:00:00h ( year |= ::DL_AUTO_FLAG )
+ * - name[0] == "CET " name if daylight saving not enabled
+ * - name[1] == "CEST " name if daylight saving is enabled
+ *
+ * @{ */
+
+/**
+ * @brief The name of a time zone
+ *
+ * @note Up to 5 printable characters, plus trailing zero
+ */
+typedef char TZ_NAME[6];
+/**
+ * @brief Time zone / daylight saving parameters
+ *
+ * This structure is used to specify how a device converts on-board %UTC
+ * to local time, including computation of beginning and end of daylight
+ * saving time (DST), if required.
+ *
+ * @note The ::TZDL structure contains members of type ::TM_GPS to specify
+ * the times for beginning and end of DST. However, the ::TM_GPS::frac,
+ * ::TM_GPS::offs_from_utc, and ::TM_GPS::status fields of these ::TZDL::tm_on
+ * and ::TZDL::tm_off members are ignored for the conversion to local time,
+ * and thus should be 0.
+ */
+typedef struct
+{
+ int32_t offs; ///< standard offset from %UTC to local time [sec]
+ int32_t offs_dl; ///< additional offset if daylight saving enabled [sec]
+ TM_GPS tm_on; ///< date/time when daylight saving starts
+ TM_GPS tm_off; ///< date/time when daylight saving ends
+ TZ_NAME name[2]; ///< names without and with daylight saving enabled
+} TZDL;
+
+/**
+ * @brief A flag indicating automatic computation of DST
+ *
+ * If this flag is or'ed to the year numbers in ::TZDL::tm_on and ::TZDL::tm_off
+ * then daylight saving is computed automatically year by year.
+ */
+#define DL_AUTO_FLAG 0x8000
-/* UTC correction parameters */
+/** @} defgroup group_tzdl */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
- T_GPS t0t; /* Reference Time UTC Parameters [sec] */
- l_fp A0; /* ± Clock Correction Coefficient 0 [sec] */
- l_fp A1; /* ± Clock Correction Coefficient 1 [sec/sec] */
- u_short WNlsf; /* week number of nearest leap second */
- short DNt; /* the day number at the end of which LS is inserted */
- char delta_tls; /* */
- char delta_tlsf; /* */
+/**
+ * @brief Antenna status and error at reconnect information
+ *
+ * The structure below reflects the status of the antenna,
+ * the times of last disconnect/reconnect, and the board's
+ * clock offset when it has synchronized again after the
+ * disconnection interval.
+ *
+ * @note ::ANT_INFO::status changes back to ::ANT_RECONN only
+ * after the antenna has been reconnected <b>and</b> the
+ * receiver has re-synchronized to the satellite signal.
+ * In this case ::ANT_INFO::delta_t reports the time offset
+ * before resynchronization, i.e. how much the internal
+ * time has drifted while the antenna was disconnected.
+ */
+typedef struct
+{
+ int16_t status; ///< current status of antenna, see ::ANT_STATUS_CODES
+ TM_GPS tm_disconn; ///< time of antenna disconnect
+ TM_GPS tm_reconn; ///< time of antenna reconnect
+ int32_t delta_t; ///< clock offs at reconn. time in 1/::RECEIVER_INFO::ticks_per_sec units
-} UTC;
+} ANT_INFO;
-/* a struct used to hold the settings of a serial port */
-#ifndef _COM_PARM_DEFINED
- typedef long BAUD_RATE;
+/**
+ * @brief Status code used with ::ANT_INFO::status
+ */
+enum ANT_STATUS_CODES
+{
+ ANT_INVALID, ///< No other fields valid since antenna has not yet been disconnected
+ ANT_DISCONN, ///< Antenna is disconnected, tm_reconn and delta_t not yet set
+ ANT_RECONN, ///< Antenna has been disconnect, and receiver sync. after reconnect, so all fields valid
+ N_ANT_STATUS_CODES ///< the number of known status codes
+};
- /* indices used to identify a parameter in the framing string */
- enum { F_DBITS, F_PRTY, F_STBITS };
- /* types of handshake */
- enum { HS_NONE, HS_XONXOFF, HS_RTSCTS };
- typedef struct {
- BAUD_RATE baud_rate; /* e.g. 19200L */
- char framing[4]; /* e.g. "8N1" */
- short handshake; /* a numeric value, only HS_NONE supported yet */
- } COM_PARM;
+/**
+ * @brief Summary of configuration and health data of all satellites
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes
+ int16_t valid; ///< flag data are valid
+
+ T_GPS tot_51; ///< time of transmission, page 51
+ T_GPS tot_63; ///< time of transmission, page 63
+ T_GPS t0a; ///< complete reference time almanac
+
+ CFG cfg[N_SVNO_GPS]; ///< 4 bit SV configuration code from page 63
+ HEALTH health[N_SVNO_GPS]; ///< 6 bit SV health codes from pages 51, 63
+
+} CFGH;
+
-#define _COM_PARM_DEFINED
-#endif
+/**
+ * @brief GPS %UTC correction parameters
+ *
+ * %UTC correction parameters basically as sent by the GPS satellites.
+ *
+ * The csum field is only used by the card's firmware to check the
+ * consistency of the structure in non-volatile memory.
+ *
+ * The field labeled valid indicates if the parameter set is valid, i.e.
+ * if it contains data received from the satellites.
+ *
+ * t0t, A0 and A1 contain fractional correction parameters for the current
+ * GPS-%UTC time offset in addition to the whole seconds. This is evaluated
+ * by the receivers' firmware to convert GPS time to %UTC time.
+ *
+ * The delta_tls field contains the current full seconds offset between
+ * GPS time and %UTC, which corresponds to the number of leap seconds inserted
+ * into the %UTC time scale since GPS was put into operation in January 1980.
+ *
+ * delta_tlfs holds the number of "future" leap seconds, i.e. the %UTC offset
+ * after the next leap second event defined by WNlsf and DNt.
+ *
+ * The fields WNlsf and DNt specify the GPS week number and the day number
+ * in that week for the end of which a leap second has been scheduled.
+ *
+ * @note: The satellites transmit WNlsf only as a signed 8 bit value, so it
+ * can only define a point in time which is +/- 127 weeks off the current time.
+ * The firmware tries to expand this based on the current week number, but
+ * the result is ambiguous if the leap second occurs or occurred more
+ * than 127 weeks in the future or past.
+ *
+ * So the leap second date should <b>only</b> be evaluated and displayed
+ * in a user interface if the fields delta_tls and delta_tlsf have
+ * different values, in which case there is indeed a leap second announcement
+ * inside the +/- 127 week range.
+ *
+ * @note In the original code the type of A0 and A1 is double.
+ */
+typedef struct
+{
+ CSUM csum; ///< Checksum of the remaining bytes
+ int16_t valid; ///< Flag indicating %UTC parameters are valid
+ T_GPS t0t; ///< Reference Time %UTC Parameters [wn|sec]
+ l_fp A0; ///< +- Clock Correction Coefficient 0 [sec]
+ l_fp A1; ///< +- Clock Correction Coefficient 1 [sec/sec]
-/* the codes below define what has to comes out of the serial ports */
+ uint16_t WNlsf; ///< Week number of nearest leap second
+ int16_t DNt; ///< The day number at the end of which a leap second occurs
+ int8_t delta_tls; ///< Current %UTC offset to GPS system time [sec]
+ int8_t delta_tlsf; ///< Future %UTC offset to GPS system time after next leap second transition [sec]
-enum { STR_ON_REQ, STR_PER_SEC,
- STR_PER_MIN, N_STR_MODE_0, /* COM0 and COM1 */
- STR_UCAP = N_STR_MODE_0,
- STR_UCAP_REQ, N_STR_MODE_1 /* COM1 only */
- };
+} UTC;
-#define N_COM 2 /* the number of serial ports */
+/**
+ * @brief GPS ASCII message
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes */
+ int16_t valid; ///< flag data are valid
+ char s[23]; ///< 22 chars GPS ASCII message plus trailing zero
-/* the structure used to store the modes of both serial ports */
+} ASCII_MSG;
-typedef struct {
- COM_PARM com[N_COM]; /* COM0 and COM1 settings */
- u_char mode[N_COM]; /* COM0 and COM1 output mode */
-} PORT_PARM;
-/* Ephemeris parameters of one specific SV. Needed to compute the position */
-/* of a satellite at a given time with high precision. Valid for an */
-/* interval of 4 to 6 hours from start of transmission. */
-
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
-
- HEALTH health; /* health indication of transmitting SV [---] */
- IOD IODC; /* Issue Of Data, Clock */
- IOD IODE2; /* Issue of Data, Ephemeris (Subframe 2) */
- IOD IODE3; /* Issue of Data, Ephemeris (Subframe 3) */
- T_GPS tt; /* time of transmission */
- T_GPS t0c; /* Reference Time Clock [---] */
- T_GPS t0e; /* Reference Time Ephemeris [---] */
-
- l_fp sqrt_A; /* Square Root of semi-major Axis [sqrt(m)] */
- l_fp e; /* Eccentricity [---] */
- l_fp M0; /* ± Mean Anomaly at Ref. Time [rad] */
- l_fp omega; /* ± Argument of Perigee [rad] */
- l_fp OMEGA0; /* ± Longit. of Asc. Node of orbit plane [rad] */
- l_fp OMEGADOT; /* ± Rate of Right Ascension [rad/sec] */
- l_fp deltan; /* ± Mean Motion Diff. from computed value [rad/sec] */
- l_fp i0; /* ± Inclination Angle [rad] */
- l_fp idot; /* ± Rate of Inclination Angle [rad/sec] */
- l_fp crc; /* ± Cosine Corr. Term to Orbit Radius [m] */
- l_fp crs; /* ± Sine Corr. Term to Orbit Radius [m] */
- l_fp cuc; /* ± Cosine Corr. Term to Arg. of Latitude [rad] */
- l_fp cus; /* ± Sine Corr. Term to Arg. of Latitude [rad] */
- l_fp cic; /* ± Cosine Corr. Term to Inclination Angle [rad] */
- l_fp cis; /* ± Sine Corr. Term to Inclination Angle [rad] */
-
- l_fp af0; /* ± Clock Correction Coefficient 0 [sec] */
- l_fp af1; /* ± Clock Correction Coefficient 1 [sec/sec] */
- l_fp af2; /* ± Clock Correction Coefficient 2 [sec/sec²] */
- l_fp tgd; /* ± estimated group delay differential [sec] */
-
- u_short URA; /* predicted User Range Accuracy */
-
- u_char L2code; /* code on L2 channel [---] */
- u_char L2flag; /* L2 P data flag [---] */
+/**
+ * @brief Ephemeris parameters of one specific satellite
+ *
+ * Needed to compute the position of a satellite at a given time with
+ * high precision. Valid for an interval of 4 to 6 hours from start
+ * of transmission.
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes
+ int16_t valid; ///< flag data are valid
+
+ HEALTH health; ///< health indication of transmitting SV [---]
+ IOD IODC; ///< Issue Of Data, Clock
+ IOD IODE2; ///< Issue of Data, Ephemeris (Subframe 2)
+ IOD IODE3; ///< Issue of Data, Ephemeris (Subframe 3)
+ T_GPS tt; ///< time of transmission
+ T_GPS t0c; ///< Reference Time Clock [---]
+ T_GPS t0e; ///< Reference Time Ephemeris [---]
+
+ l_fp sqrt_A; ///< Square Root of semi-major Axis [sqrt(m)]
+ l_fp e; ///< Eccentricity [---]
+ l_fp M0; ///< +- Mean Anomaly at Ref. Time [rad]
+ l_fp omega; ///< +- Argument of Perigee [rad]
+ l_fp OMEGA0; ///< +- Longit. of Asc. Node of orbit plane [rad]
+ l_fp OMEGADOT; ///< +- Rate of Right Ascension [rad/sec]
+ l_fp deltan; ///< +- Mean Motion Diff. from computed value [rad/sec]
+ l_fp i0; ///< +- Inclination Angle [rad]
+ l_fp idot; ///< +- Rate of Inclination Angle [rad/sec]
+ l_fp crc; ///< +- Cosine Corr. Term to Orbit Radius [m]
+ l_fp crs; ///< +- Sine Corr. Term to Orbit Radius [m]
+ l_fp cuc; ///< +- Cosine Corr. Term to Arg. of Latitude [rad]
+ l_fp cus; ///< +- Sine Corr. Term to Arg. of Latitude [rad]
+ l_fp cic; ///< +- Cosine Corr. Term to Inclination Angle [rad]
+ l_fp cis; ///< +- Sine Corr. Term to Inclination Angle [rad]
+
+ l_fp af0; ///< +- Clock Correction Coefficient 0 [sec]
+ l_fp af1; ///< +- Clock Correction Coefficient 1 [sec/sec]
+ l_fp af2; ///< +- Clock Correction Coefficient 2 [sec/sec^2]
+ l_fp tgd; ///< +- estimated group delay differential [sec]
+
+ uint16_t URA; ///< predicted User Range Accuracy
+
+ uint8_t L2code; ///< code on L2 channel [---]
+ uint8_t L2flag; ///< L2 P data flag [---]
} EPH;
-/* Almanac parameters of one specific SV. A reduced precision set of */
-/* parameters used to check if a satellite is in view at a given time. */
-/* Valid for an interval of more than 7 days from start of transmission. */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
- HEALTH health; /* [---] */
- T_GPS t0a; /* Reference Time Almanac [sec] */
+/**
+ * @brief Almanac parameters of one specific satellite
+ *
+ * A reduced precision set of parameters used to check if a satellite
+ * is in view at a given time. Valid for an interval of more than 7 days
+ * from start of transmission.
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes
+ int16_t valid; ///< flag data are valid
+
+ HEALTH health; ///< [---]
+ T_GPS t0a; ///< Reference Time Almanac [sec]
+
+ l_fp sqrt_A; ///< Square Root of semi-major Axis [sqrt(m)]
+ l_fp e; ///< Eccentricity [---]
- l_fp sqrt_A; /* Square Root of semi-major Axis [sqrt(m)] */
- l_fp e; /* Eccentricity [---] */
+ l_fp M0; ///< +- Mean Anomaly at Ref. Time [rad]
+ l_fp omega; ///< +- Argument of Perigee [rad]
+ l_fp OMEGA0; ///< +- Longit. of Asc. Node of orbit plane [rad]
+ l_fp OMEGADOT; ///< +- Rate of Right Ascension [rad/sec]
+ l_fp deltai; ///< +- [rad]
+ l_fp af0; ///< +- Clock Correction Coefficient 0 [sec]
+ l_fp af1; ///< +- Clock Correction Coefficient 1 [sec/sec]
- l_fp M0; /* ± Mean Anomaly at Ref. Time [rad] */
- l_fp omega; /* ± Argument of Perigee [rad] */
- l_fp OMEGA0; /* ± Longit. of Asc. Node of orbit plane [rad] */
- l_fp OMEGADOT; /* ± Rate of Right Ascension [rad/sec] */
- l_fp deltai; /* ± [rad] */
- l_fp af0; /* ± Clock Correction Coefficient 0 [sec] */
- l_fp af1; /* ± Clock Correction Coefficient 1 [sec/sec] */
} ALM;
-/* ionospheric correction parameters */
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
+/**
+ * @brief Ionospheric correction parameters
+ */
+typedef struct
+{
+ CSUM csum; ///< checksum of the remaining bytes
+ int16_t valid; ///< flag data are valid
- l_fp alpha_0; /* Ionosph. Corr. Coeff. Alpha 0 [sec] */
- l_fp alpha_1; /* Ionosph. Corr. Coeff. Alpha 1 [sec/deg] */
- l_fp alpha_2; /* Ionosph. Corr. Coeff. Alpha 2 [sec/deg^2] */
- l_fp alpha_3; /* Ionosph. Corr. Coeff. Alpha 3 [sec/deg^3] */
+ l_fp alpha_0; ///< Ionosph. Corr. Coeff. Alpha 0 [sec]
+ l_fp alpha_1; ///< Ionosph. Corr. Coeff. Alpha 1 [sec/deg]
+ l_fp alpha_2; ///< Ionosph. Corr. Coeff. Alpha 2 [sec/deg^2]
+ l_fp alpha_3; ///< Ionosph. Corr. Coeff. Alpha 3 [sec/deg^3]
- l_fp beta_0; /* Ionosph. Corr. Coeff. Beta 0 [sec] */
- l_fp beta_1; /* Ionosph. Corr. Coeff. Beta 1 [sec/deg] */
- l_fp beta_2; /* Ionosph. Corr. Coeff. Beta 2 [sec/deg^2] */
- l_fp beta_3; /* Ionosph. Corr. Coeff. Beta 3 [sec/deg^3] */
+ l_fp beta_0; ///< Ionosph. Corr. Coeff. Beta 0 [sec]
+ l_fp beta_1; ///< Ionosph. Corr. Coeff. Beta 1 [sec/deg]
+ l_fp beta_2; ///< Ionosph. Corr. Coeff. Beta 2 [sec/deg^2]
+ l_fp beta_3; ///< Ionosph. Corr. Coeff. Beta 3 [sec/deg^3]
} IONO;
-void mbg_tm_str (char **, TM *, int);
+
+
+void mbg_tm_str (char **, TM_GPS *, int, int);
void mbg_tgps_str (char **, T_GPS *, int);
void get_mbg_header (unsigned char **, GPS_MSG_HDR *);
void put_mbg_header (unsigned char **, GPS_MSG_HDR *);
@@ -534,7 +967,7 @@ void get_mbg_svno (unsigned char **, SVNO *);
void get_mbg_health (unsigned char **, HEALTH *);
void get_mbg_cfg (unsigned char **, CFG *);
void get_mbg_tgps (unsigned char **, T_GPS *);
-void get_mbg_tm (unsigned char **, TM *);
+void get_mbg_tm (unsigned char **, TM_GPS *);
void get_mbg_ttm (unsigned char **, TTM *);
void get_mbg_synth (unsigned char **, SYNTH *);
void get_mbg_tzdl (unsigned char **, TZDL *);
@@ -548,7 +981,7 @@ void get_mbg_eph (unsigned char **, EPH *);
void get_mbg_alm (unsigned char **, ALM *);
void get_mbg_iono (unsigned char **, IONO *);
-unsigned long mbg_csum (unsigned char *, unsigned int);
+CSUM mbg_csum (unsigned char *, unsigned int);
#endif
/*
diff --git a/include/ntp.h b/include/ntp.h
index 38343f2..4ffc35f 100644
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -435,7 +435,7 @@ struct peer {
#define STRATUM_UNSPEC ((u_char)16) /* unspecified */
/*
- * Values for peer.flags
+ * Values for peer.flags (u_int)
*/
#define FLAG_CONFIG 0x0001 /* association was configured */
#define FLAG_PREEMPT 0x0002 /* preemptable association */
@@ -453,8 +453,9 @@ struct peer {
#define FLAG_XB 0x2000 /* interleaved broadcast */
#define FLAG_XBOGUS 0x4000 /* interleaved bogus packet */
#ifdef OPENSSL
-#define FLAG_ASSOC 0x8000 /* autokey request */
+# define FLAG_ASSOC 0x8000 /* autokey request */
#endif /* OPENSSL */
+#define FLAG_TSTAMP_PPS 0x10000 /* PPS source provides absolute timestamp */
/*
* Definitions for the clear() routine. We use memset() to clear
@@ -713,17 +714,19 @@ struct pkt {
*/
#define LOOP_DRIFTINIT 1 /* iniitialize frequency */
#define LOOP_KERN_CLEAR 2 /* set initial frequency offset */
-#define LOOP_MAX 3 /* set step offset */
-#define LOOP_PANIC 4 /* set panic offseet */
-#define LOOP_PHI 5 /* set dispersion rate */
-#define LOOP_MINSTEP 6 /* set step timeout */
-#define LOOP_MINPOLL 7 /* set min poll interval (log2 s) */
-#define LOOP_ALLAN 8 /* set minimum Allan intercept */
-#define LOOP_HUFFPUFF 9 /* set huff-n'-puff filter length */
-#define LOOP_FREQ 10 /* set initial frequency */
-#define LOOP_CODEC 11 /* set audio codec frequency */
-#define LOOP_LEAP 12 /* insert leap after second 23:59 */
-#define LOOP_TICK 13 /* sim. low precision clock */
+#define LOOP_MAX 3 /* set both step offsets */
+#define LOOP_MAX_BACK 4 /* set bacward-step offset */
+#define LOOP_MAX_FWD 5 /* set forward-step offset */
+#define LOOP_PANIC 6 /* set panic offseet */
+#define LOOP_PHI 7 /* set dispersion rate */
+#define LOOP_MINSTEP 8 /* set step timeout */
+#define LOOP_MINPOLL 9 /* set min poll interval (log2 s) */
+#define LOOP_ALLAN 10 /* set minimum Allan intercept */
+#define LOOP_HUFFPUFF 11 /* set huff-n'-puff filter length */
+#define LOOP_FREQ 12 /* set initial frequency */
+#define LOOP_CODEC 13 /* set audio codec frequency */
+#define LOOP_LEAP 14 /* insert leap after second 23:59 */
+#define LOOP_TICK 15 /* sim. low precision clock */
/*
* Configuration items for the stats printer
@@ -875,13 +878,13 @@ struct endpoint {
*/
#define AM_ERR -1 /* error */
#define AM_NOMATCH 0 /* no match */
-#define AM_PROCPKT 1 /* server/symmetric packet */
-#define AM_BCST 2 /* broadcast packet */
+#define AM_PROCPKT 1 /* server/symmetric packet */
+#define AM_BCST 2 /* broadcast packet */
#define AM_FXMIT 3 /* client packet */
#define AM_MANYCAST 4 /* manycast or pool */
#define AM_NEWPASS 5 /* new passive */
#define AM_NEWBCL 6 /* new broadcast */
-#define AM_POSSBCL 7 /* discard broadcast */
+#define AM_POSSBCL 7 /* discard broadcast */
/* NetInfo configuration locations */
#ifdef HAVE_NETINFO
diff --git a/include/ntp_calendar.h b/include/ntp_calendar.h
index 3ee1ff7..3afb627 100644
--- a/include/ntp_calendar.h
+++ b/include/ntp_calendar.h
@@ -83,13 +83,15 @@ extern systime_func_ptr ntpcal_set_timefunc(systime_func_ptr);
#define SECSPERMIN (60) /* seconds per minute */
#define MINSPERHR (60) /* minutes per hour */
#define HRSPERDAY (24) /* hours per day */
+#define DAYSPERWEEK (7) /* days per week */
#define DAYSPERYEAR (365) /* days per year */
#define SECSPERHR (SECSPERMIN * MINSPERHR)
#define SECSPERDAY (SECSPERHR * HRSPERDAY)
+#define SECSPERWEEK (DAYSPERWEEK * SECSPERDAY)
#define SECSPERYEAR (365 * SECSPERDAY) /* regular year */
#define SECSPERLEAPYEAR (366 * SECSPERDAY) /* leap year */
-#define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */
+#define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */
/*
* Gross hacks. I have illicit knowlege that there won't be overflows
@@ -113,7 +115,7 @@ extern uint32_t caltontp (const struct calendar *);
* Convert between 'time_t' and 'vint64'
*/
extern vint64 time_to_vint64(const time_t *);
-extern time_t vint64_to_time(const vint64 *);
+extern time_t vint64_to_time(const vint64 *);
/*
* Get the build date & time. ATTENTION: The time zone is not specified!
diff --git a/include/ntp_config.h b/include/ntp_config.h
index 900688c..a74cd55 100644
--- a/include/ntp_config.h
+++ b/include/ntp_config.h
@@ -239,6 +239,7 @@ struct config_tree_tag {
int_fifo * reset_counters;
sim_fifo * sim_details;
+ int mdnstries;
};
@@ -286,7 +287,7 @@ attr_val *create_attr_dval(int attr, double value);
attr_val *create_attr_ival(int attr, int value);
attr_val *create_attr_uval(int attr, u_int value);
attr_val *create_attr_rangeval(int attr, int first, int last);
-attr_val *create_attr_sval(int attr, char *s);
+attr_val *create_attr_sval(int attr, const char *s);
filegen_node *create_filegen_node(int filegen_token,
attr_val_fifo *options);
string_node *create_string_node(char *str);
@@ -316,7 +317,7 @@ int dump_all_config_trees(FILE *df, int comment);
#endif
#if defined(HAVE_SETRLIMIT)
-void ntp_rlimit(int, rlim_t, int, char *);
+void ntp_rlimit(int, rlim_t, int, const char *);
#endif
#endif /* !defined(NTP_CONFIG_H) */
diff --git a/include/ntp_filegen.h b/include/ntp_filegen.h
index f5ba8af..549bedb 100644
--- a/include/ntp_filegen.h
+++ b/include/ntp_filegen.h
@@ -52,5 +52,5 @@ extern void filegen_statsdir(void);
extern FILEGEN *filegen_get (const char *);
extern void filegen_register (const char *, const char *, FILEGEN *);
#ifdef DEBUG
-extern void filegen_unregister(char *);
+extern void filegen_unregister(const char *);
#endif
diff --git a/include/ntp_fp.h b/include/ntp_fp.h
index 1b97e8b..7806932 100644
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -264,10 +264,13 @@ typedef u_int32 u_fp;
* headers. So far the problem has only been seen with gcc, but it
* may also affect Sun compilers, in which case the defined(__GNUC__)
* term should be removed.
+ * XSCALE also generates bad code for these, at least with GCC 3.3.5.
+ * This is unrelated to math.h, but the same solution applies.
*/
#if defined(HAVE_U_INT64) && \
!(defined(__SVR4) && defined(__sun) && \
- defined(sparc) && defined(__GNUC__))
+ defined(sparc) && defined(__GNUC__) || \
+ defined(__arm__) && defined(__XSCALE__) && defined(__GNUC__))
#include <math.h> /* ldexp() */
diff --git a/include/ntp_md5.h b/include/ntp_md5.h
index 9f43378..2306b9a 100644
--- a/include/ntp_md5.h
+++ b/include/ntp_md5.h
@@ -24,7 +24,7 @@
typedef MD5_CTX EVP_MD_CTX;
# define EVP_get_digestbynid(t) NULL
-# define EVP_md5(v) NULL
+# define EVP_md5() NULL
# define EVP_MD_CTX_init(c)
# define EVP_MD_CTX_set_flags(c, f)
# define EVP_DigestInit(c, dt) (MD5Init(c), 1)
diff --git a/include/ntp_random.h b/include/ntp_random.h
index 3f89831..fa77f65 100644
--- a/include/ntp_random.h
+++ b/include/ntp_random.h
@@ -1,6 +1,9 @@
#include <ntp_types.h>
+void ntp_crypto_srandom(void);
+int ntp_crypto_random_buf(void *buf, size_t nbytes);
+
long ntp_random (void);
void ntp_srandom (unsigned long);
void ntp_srandomdev (void);
diff --git a/include/ntp_stdlib.h b/include/ntp_stdlib.h
index 7c884fc..38180f0 100644
--- a/include/ntp_stdlib.h
+++ b/include/ntp_stdlib.h
@@ -96,14 +96,14 @@ extern int ymd2yd (int, int, int);
/* a_md5encrypt.c */
extern int MD5authdecrypt (int, u_char *, u_int32 *, int, int);
extern int MD5authencrypt (int, u_char *, u_int32 *, int);
-extern void MD5auth_setkey (keyid_t, int, const u_char *, int);
+extern void MD5auth_setkey (keyid_t, int, const u_char *, size_t);
extern u_int32 addr2refid (sockaddr_u *);
/* emalloc.c */
#ifndef EREALLOC_CALLSITE /* ntp_malloc.h defines */
extern void * ereallocz (void *, size_t, size_t, int);
#define erealloczsite(p, n, o, z, f, l) ereallocz(p, n, o, (z))
-extern void * emalloc (size_t);
+#define emalloc(n) ereallocz(NULL, n, 0, FALSE)
#define emalloc_zero(c) ereallocz(NULL, (c), 0, TRUE)
#define erealloc(p, c) ereallocz(p, (c), 0, FALSE)
#define erealloc_zero(p, n, o) ereallocz(p, n, (o), TRUE)
@@ -129,11 +129,11 @@ extern char * estrdup_impl (const char *, const char *, int);
extern int atoint (const char *, long *);
extern int atouint (const char *, u_long *);
extern int hextoint (const char *, u_long *);
-extern char * humanlogtime (void);
-extern char * humantime (time_t);
+extern const char * humanlogtime (void);
+extern const char * humantime (time_t);
extern char * mfptoa (u_int32, u_int32, short);
extern char * mfptoms (u_int32, u_int32, short);
-extern const char * modetoa (int);
+extern const char * modetoa (size_t);
extern const char * eventstr (int);
extern const char * ceventstr (int);
extern const char * res_match_flags(u_short);
diff --git a/include/ntpd.h b/include/ntpd.h
index 51d8f2a..f0bbeb0 100644
--- a/include/ntpd.h
+++ b/include/ntpd.h
@@ -78,7 +78,7 @@ extern int mprintf_event (int, struct peer *, const char *, ...)
struct ctl_var {
u_short code;
u_short flags;
- char *text;
+ const char *text;
};
/*
* Flag values
@@ -188,6 +188,7 @@ extern void unpeer (struct peer *);
extern void clear_all (void);
extern int score_all (struct peer *);
extern struct peer *findmanycastpeer(struct recvbuf *);
+extern void peer_cleanup (void);
/* ntp_crypto.c */
#ifdef AUTOKEY
@@ -218,7 +219,7 @@ extern struct value tai_leap;
/* ntp_proto.c */
extern void transmit (struct peer *);
extern void receive (struct recvbuf *);
-extern void peer_clear (struct peer *, char *);
+extern void peer_clear (struct peer *, const char *);
extern void process_packet (struct peer *, struct pkt *, u_int);
extern void clock_select (void);
@@ -285,7 +286,7 @@ extern void record_loop_stats (double, double, double, double, int);
extern void record_clock_stats (sockaddr_u *, const char *);
extern int mprintf_clock_stats(sockaddr_u *, const char *, ...)
NTP_PRINTF(2, 3);
-extern void record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int poll, int precision, double root_delay, double root_dispersion, u_int32 refid);
+extern void record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int ppoll, int precision, double root_delay, double root_dispersion, u_int32 refid);
extern void check_leap_file (int is_daily_check, u_int32 ntptime, const time_t * systime);
extern void record_crypto_stats (sockaddr_u *, const char *);
#ifdef DEBUG
@@ -385,7 +386,8 @@ extern endpt * ep_list; /* linked list */
/* ntp_loopfilter.c */
extern double drift_comp; /* clock frequency (s/s) */
extern double clock_stability; /* clock stability (s/s) */
-extern double clock_max; /* max offset before step (s) */
+extern double clock_max_back; /* max backward offset before step (s) */
+extern double clock_max_fwd; /* max forward offset before step (s) */
extern double clock_panic; /* max offset before panic (s) */
extern double clock_phi; /* dispersion rate (s/s) */
extern double clock_minstep; /* step timeout (s) */
@@ -403,8 +405,9 @@ extern int kern_enable; /* kernel support enabled */
extern int hardpps_enable; /* kernel PPS discipline enabled */
extern int ext_enable; /* external clock enabled */
extern int cal_enable; /* refclock calibrate enable */
-extern int allow_panic; /* allow panic correction */
-extern int mode_ntpdate; /* exit on first clock set */
+extern int allow_panic; /* allow panic correction (-g) */
+extern int force_step_once; /* always step time once at startup (-G) */
+extern int mode_ntpdate; /* exit on first clock set (-q) */
extern int peer_ntpdate; /* count of ntpdate peers */
/*
@@ -518,7 +521,7 @@ extern u_int32 conf_file_sum; /* Simple sum of characters */
/* ntp_signd.c */
#ifdef HAVE_NTP_SIGND
-extern void send_via_ntp_signd(struct recvbuf *, int, keyid_t, int,
+extern void send_via_ntp_signd(struct recvbuf *, int, keyid_t, int,
struct pkt *);
#endif
diff --git a/include/parse.h b/include/parse.h
index 3a98408..ca6855d 100644
--- a/include/parse.h
+++ b/include/parse.h
@@ -4,7 +4,7 @@
* parse.h,v 4.12 2007/01/14 08:36:03 kardel RELEASE_20070114_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -105,6 +105,13 @@ extern unsigned int splclock (void);
#endif
/*
+ * some constants useful for GPS time conversion
+ */
+#define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */
+#define GPSWRAP 990U /* assume week count less than this in the previous epoch */
+#define GPSWEEKS 1024U /* number of weeks until the GPS epch rolls over */
+
+/*
* state flags
*/
#define PARSEB_POWERUP 0x00000001 /* no synchronisation */
@@ -127,7 +134,7 @@ extern unsigned int splclock (void);
/*
* optional status information
*/
-#define PARSEB_ALTERNATE 0x00001000 /* alternate antenna used */
+#define PARSEB_CALLBIT 0x00001000 /* "call bit" used to signalize irregularities in the control facilities */
#define PARSEB_POSITION 0x00002000 /* position available */
#define PARSEB_MESSAGE 0x00004000 /* addtitional message data */
/*
@@ -145,7 +152,7 @@ extern unsigned int splclock (void);
#define PARSEB_PPS 0x20000000 /* valid PPS sample */
#define PARSE_TCINFO (PARSEB_ANNOUNCE|PARSEB_POWERUP|PARSEB_NOSYNC|PARSEB_DST|\
- PARSEB_UTC|PARSEB_LEAPS|PARSEB_ALTERNATE|PARSEB_S_LEAP|\
+ PARSEB_UTC|PARSEB_LEAPS|PARSEB_CALLBIT|PARSEB_S_LEAP|\
PARSEB_S_LOCATION|PARSEB_TIMECODE|PARSEB_MESSAGE)
#define PARSE_POWERUP(x) ((x) & PARSEB_POWERUP)
@@ -156,7 +163,7 @@ extern unsigned int splclock (void);
#define PARSE_UTC(x) ((x) & PARSEB_UTC)
#define PARSE_LEAPADD(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPADD))
#define PARSE_LEAPDEL(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPDEL))
-#define PARSE_ALTERNATE(x) ((x) & PARSEB_ALTERNATE)
+#define PARSE_CALLBIT(x) ((x) & PARSEB_CALLBIT)
#define PARSE_LEAPSECOND(x) (PARSE_SYNC(x) && ((x) & PARSEB_LEAP_SECOND))
#define PARSE_S_LEAP(x) ((x) & PARSEB_S_LEAP)
@@ -229,13 +236,13 @@ typedef struct parsetime parsetime_t;
#define PARSE_IO_CSIZE 0x00000003
#define PARSE_IO_CS5 0x00000000
#define PARSE_IO_CS6 0x00000001
-#define PARSE_IO_CS7 0x00000002
-#define PARSE_IO_CS8 0x00000003
+#define PARSE_IO_CS7 0x00000002
+#define PARSE_IO_CS8 0x00000003
/*
* ioctl structure
*/
-union parsectl
+union parsectl
{
struct parsegettc
{
@@ -258,7 +265,7 @@ union parsectl
u_long parse_cs; /* character size (needed for stripping) */
} parsesetcs;
};
-
+
typedef union parsectl parsectl_t;
/*------ for conversion routines --------*/
@@ -266,7 +273,7 @@ typedef union parsectl parsectl_t;
struct parse /* parse module local data */
{
int parse_flags; /* operation and current status flags */
-
+
int parse_ioflags; /* io handling flags (5-8 Bit control currently) */
/*
@@ -286,7 +293,7 @@ struct parse /* parse module local data */
char *parse_ldata; /* last data buffer */
unsigned short parse_ldsize; /* last data buffer length */
u_long parse_badformat; /* number of unparsable pakets */
-
+
timestamp_t parse_lastchar; /* last time a character was received */
parsetime_t parse_dtime; /* external data prototype */
};
@@ -337,15 +344,19 @@ typedef struct clocktime clocktime_t;
#define SYNC_ZERO 0x00
#define SYNC_ONE 0x01
+typedef u_long parse_inp_fnc_t(parse_t *, char, timestamp_t *);
+typedef u_long parse_cvt_fnc_t(unsigned char *, int, struct format *, clocktime_t *, void *);
+typedef u_long parse_pps_fnc_t(parse_t *, int, timestamp_t *);
+
struct clockformat
{
/* special input protocol - implies fixed format */
- u_long (*input) (parse_t *, unsigned int, timestamp_t *);
+ parse_inp_fnc_t *input;
/* conversion routine */
- u_long (*convert) (unsigned char *, int, struct format *, clocktime_t *, void *);
+ parse_cvt_fnc_t *convert;
/* routine for handling RS232 sync events (time stamps) */
/* PPS input routine */
- u_long (*syncpps) (parse_t *, int, timestamp_t *);
+ parse_pps_fnc_t *syncpps;
/* time code synthesizer */
void *data; /* local parameters */
@@ -361,7 +372,7 @@ typedef struct clockformat clockformat_t;
*/
extern int parse_ioinit (parse_t *);
extern void parse_ioend (parse_t *);
-extern int parse_ioread (parse_t *, unsigned int, timestamp_t *);
+extern int parse_ioread (parse_t *, char, timestamp_t *);
extern int parse_iopps (parse_t *, int, timestamp_t *);
extern void parse_iodone (parse_t *);
extern int parse_timecode (parsectl_t *, parse_t *);
@@ -369,8 +380,8 @@ extern int parse_getfmt (parsectl_t *, parse_t *);
extern int parse_setfmt (parsectl_t *, parse_t *);
extern int parse_setcs (parsectl_t *, parse_t *);
-extern unsigned int parse_restart (parse_t *, unsigned int);
-extern unsigned int parse_addchar (parse_t *, unsigned int);
+extern unsigned int parse_restart (parse_t *, char);
+extern unsigned int parse_addchar (parse_t *, char);
extern unsigned int parse_end (parse_t *);
extern int Strok (const unsigned char *, const unsigned char *);
@@ -379,9 +390,9 @@ extern int Stoi (const unsigned char *, long *, int);
extern time_t parse_to_unixtime (clocktime_t *, u_long *);
extern u_long updatetimeinfo (parse_t *, u_long);
extern void syn_simple (parse_t *, timestamp_t *, struct format *, u_long);
-extern u_long pps_simple (parse_t *, int, timestamp_t *);
-extern u_long pps_one (parse_t *, int, timestamp_t *);
-extern u_long pps_zero (parse_t *, int, timestamp_t *);
+extern parse_pps_fnc_t pps_simple;
+extern parse_pps_fnc_t pps_one;
+extern parse_pps_fnc_t pps_zero;
extern int parse_timedout (parse_t *, timestamp_t *, struct timeval *);
#endif
diff --git a/include/parse_conf.h b/include/parse_conf.h
index 319dd54..d17d616 100644
--- a/include/parse_conf.h
+++ b/include/parse_conf.h
@@ -4,7 +4,7 @@
* parse_conf.h,v 4.7 2005/06/25 10:58:45 kardel RELEASE_20050625_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -41,13 +41,13 @@
/*
* field location structure
*/
-#define O_DAY 0
+#define O_DAY 0
#define O_MONTH 1
-#define O_YEAR 2
-#define O_HOUR 3
-#define O_MIN 4
-#define O_SEC 5
-#define O_WDAY 6
+#define O_YEAR 2
+#define O_HOUR 3
+#define O_MIN 4
+#define O_SEC 5
+#define O_WDAY 6
#define O_FLAGS 7
#define O_ZONE 8
#define O_UTCHOFFSET 9
diff --git a/include/timepps-Solaris.h b/include/timepps-Solaris.h
index a2b1fbe..bcae382 100644
--- a/include/timepps-Solaris.h
+++ b/include/timepps-Solaris.h
@@ -413,7 +413,7 @@ time_pps_getparams(
}
punit = (pps_unit_t *)handle;
- memcpy(params, &punit->params, sizeof(params));
+ memcpy(params, &punit->params, sizeof(*params));
return (0);
}
diff --git a/kernel/Makefile.in b/kernel/Makefile.in
index ff1a6e4..2147529 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -38,8 +38,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -50,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -67,6 +67,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -147,6 +149,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -181,7 +184,9 @@ 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@
@@ -320,6 +325,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/kernel/sys/Makefile.in b/kernel/sys/Makefile.in
index 57bc7fd..2e8f990 100644
--- a/kernel/sys/Makefile.in
+++ b/kernel/sys/Makefile.in
@@ -40,8 +40,7 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -52,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -69,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -112,6 +114,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -146,7 +149,9 @@ 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@
@@ -285,6 +290,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/kernel/sys/parsestreams.h b/kernel/sys/parsestreams.h
index e784f9e..bd40093 100644
--- a/kernel/sys/parsestreams.h
+++ b/kernel/sys/parsestreams.h
@@ -4,7 +4,7 @@
* parsestreams.h,v 4.5 2005/06/25 10:52:47 kardel RELEASE_20050625_A
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/lib/isc/backtrace.c b/lib/isc/backtrace.c
index d2f044c..4274da3 100644
--- a/lib/isc/backtrace.c
+++ b/lib/isc/backtrace.c
@@ -211,17 +211,17 @@ isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes) {
#endif
isc_result_t
-isc_backtrace_getsymbolfromindex(int index, const void **addrp,
+isc_backtrace_getsymbolfromindex(int idx, const void **addrp,
const char **symbolp)
{
REQUIRE(addrp != NULL && *addrp == NULL);
REQUIRE(symbolp != NULL && *symbolp == NULL);
- if (index < 0 || index >= isc__backtrace_nsymbols)
+ if (idx < 0 || idx >= isc__backtrace_nsymbols)
return (ISC_R_RANGE);
- *addrp = isc__backtrace_symtable[index].addr;
- *symbolp = isc__backtrace_symtable[index].symbol;
+ *addrp = isc__backtrace_symtable[idx].addr;
+ *symbolp = isc__backtrace_symtable[idx].symbol;
return (ISC_R_SUCCESS);
}
diff --git a/lib/isc/event.c b/lib/isc/event.c
index 8ab7524..e979616 100644
--- a/lib/isc/event.c
+++ b/lib/isc/event.c
@@ -34,9 +34,7 @@
static void
destroy(isc_event_t *event) {
- isc_mem_t *mctx = event->ev_destroy_arg;
-
- isc_mem_put(mctx, event, event->ev_size);
+ isc_mem_put(event->ev_destroy_arg, event, event->ev_size);
}
isc_event_t *
diff --git a/lib/isc/include/isc/Makefile b/lib/isc/include/isc/Makefile
deleted file mode 100644
index 5ed6d20..0000000
--- a/lib/isc/include/isc/Makefile
+++ /dev/null
@@ -1,439 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# lib/isc/include/isc/Makefile. Generated from Makefile.in by configure.
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 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.
-
-
-
-srcdir = /deacon/backroom/snaps/ntp-dev/lib/isc/include/isc
-top_srcdir = /deacon/backroom/snaps/ntp-dev
-VPATH = /deacon/backroom/snaps/ntp-dev/lib/isc/include/isc
-pkgdatadir = $(datadir)/ntp
-pkglibdir = $(libdir)/ntp
-pkgincludedir = $(includedir)/ntp
-top_builddir = ../../../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = /usr/local/gnu/bin/install -c
-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 = sparc-sun-solaris2.10
-host_triplet = sparc-sun-solaris2.10
-subdir = lib/isc/include/isc
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run aclocal-1.9
-AMDEP_FALSE = #
-AMDEP_TRUE =
-AMTAR = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run tar
-AR = ar
-ARLIB_DIR = arlib
-AUTOCONF = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run autoconf
-AUTOHEADER = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run autoheader
-AUTOMAKE = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run automake-1.9
-AWK = gawk
-BINSUBDIR = bin
-CC = gcc
-CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2 -D_LARGEFILE64_SOURCE -Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Winit-self -Wno-strict-prototypes
-CHUTEST =
-CLKTEST =
-CPP = gcc -E
-CPPFLAGS = -D__EXTENSIONS__ -I/usr/sfw/include
-CYGPATH_W = echo
-DCFD =
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-ECHO = echo
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EDITLINE_LIBS =
-EF_LIBS =
-EF_PROGS =
-EGREP = grep -E
-EXEEXT =
-HAVE_INLINE =
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_LIBOPTS_FALSE =
-INSTALL_LIBOPTS_TRUE = #
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
-LCRYPTO = -lcrypto
-LDFLAGS = -L/usr/sfw/lib -R/usr/sfw/lib
-LIBOBJS =
-LIBOPTS_CFLAGS = -I$(top_srcdir)/libopts
-LIBOPTS_DIR = libopts
-LIBOPTS_LDADD = $(top_builddir)/libopts/libopts.la
-LIBPARSE =
-LIBS = -lkvm -lelf -lsocket -lrt -lmd5 -lnsl -lgen
-LIBTOOL = $(SHELL) $(top_builddir)/libtool
-LN_S = ln -s
-LSCF = -lscf
-LTLIBOBJS =
-MAKEINFO = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run makeinfo
-MAKE_ADJTIMED =
-MAKE_CHECK_LAYOUT = check-layout
-MAKE_CHECK_Y2K =
-MAKE_LIBNTPSIM = libntpsim.a
-MAKE_LIBPARSE =
-MAKE_LIBPARSE_KERNEL =
-MAKE_NTPDSIM = ntpdsim
-MAKE_NTPSNMPD =
-MAKE_NTPTIME = ntptime
-MAKE_PARSEKMODULE =
-MAKE_TICKADJ = tickadj
-MAKE_TIMETRIM =
-NEED_LIBOPTS_FALSE = #
-NEED_LIBOPTS_TRUE =
-OBJEXT = o
-OPENSSL =
-OPENSSL_INC = /usr/sfw/include
-OPENSSL_LIB = /usr/sfw/lib
-PACKAGE = ntp
-PACKAGE_BUGREPORT =
-PACKAGE_NAME = ntp
-PACKAGE_STRING = ntp 4.2.5p221
-PACKAGE_TARNAME = ntp
-PACKAGE_VERSION = 4.2.5p221
-PATH_NET_SNMP_CONFIG =
-PATH_PERL = /usr/local/bin/perl
-PATH_SEPARATOR = :
-PATH_SH = /bin/sh
-PROPDELAY =
-RANLIB = ranlib
-SET_MAKE =
-SHELL = /bin/sh
-SNMP_CFLAGS =
-SNMP_CPPFLAGS =
-SNMP_LIBS =
-STRIP = strip
-TESTDCF =
-VERSION = 4.2.5p221
-VPATH_HACK_FALSE =
-VPATH_HACK_TRUE = #
-YACC = bison -y
-ac_ct_AR = ar
-ac_ct_CC = gcc
-ac_ct_RANLIB = ranlib
-ac_ct_STRIP = strip
-am__fastdepCC_FALSE = #
-am__fastdepCC_TRUE =
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build = sparc-sun-solaris2.10
-build_alias =
-build_cpu = sparc
-build_os = solaris2.10
-build_vendor = sun
-datadir = ${prefix}/share
-exec_prefix = ${prefix}
-host = sparc-sun-solaris2.10
-host_alias =
-host_cpu = sparc
-host_os = solaris2.10
-host_vendor = sun
-includedir = ${prefix}/include
-infodir = ${prefix}/info
-install_sh = /deacon/backroom/snaps/ntp-dev/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localstatedir = ${prefix}/var
-mandir = ${prefix}/man
-mkdir_p = mkdir -p --
-oldincludedir = /usr/include
-prefix = /usr/local
-program_transform_name = s,x,x,
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-subdirs = arlib sntp
-sysconfdir = ${prefix}/etc
-target_alias =
-NULL =
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
-ETAGS_ARGS = $(srcdir)/Makefile.am
-#EXTRA_DIST = TAGS
-noinst_HEADERS = \
- app.h \
- assertions.h \
- boolean.h \
- buffer.h \
- error.h \
- file.h \
- formatcheck.h \
- interfaceiter.h \
- ipv6.h \
- lang.h \
- lib.h \
- list.h \
- log.h \
- magic.h \
- md5.h \
- mem.h \
- msgcat.h \
- msgs.h \
- mutex.h \
- netaddr.h \
- netscope.h \
- once.h \
- platform.h \
- print.h \
- result.h \
- region.h \
- sockaddr.h \
- stdio.h \
- string.h \
- types.h \
- util.h \
- $(NULL)
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/isc/include/isc/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign lib/isc/include/isc/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(HEADERS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool ctags distclean 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-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-info-am
-
-# 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/lib/isc/include/isc/backtrace.h b/lib/isc/include/isc/backtrace.h
index c0e98c0..7d7fc32 100644
--- a/lib/isc/include/isc/backtrace.h
+++ b/lib/isc/include/isc/backtrace.h
@@ -85,12 +85,12 @@ isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes);
*/
isc_result_t
-isc_backtrace_getsymbolfromindex(int index, const void **addrp,
+isc_backtrace_getsymbolfromindex(int idx, const void **addrp,
const char **symbolp);
/*%<
* Returns the content of the internal symbol table of the given index.
* On success, *addrsp and *symbolp point to the address and the symbol of
- * the 'index'th entry of the table, respectively. If 'index' is not in the
+ * the 'index'th entry of the table, respectively. If 'idx' is not in the
* range of the symbol table, ISC_R_RANGE will be returned.
*
* Requires
diff --git a/lib/isc/include/isc/socket.h b/lib/isc/include/isc/socket.h
index 38f6f78..46e05a0 100644
--- a/lib/isc/include/isc/socket.h
+++ b/lib/isc/include/isc/socket.h
@@ -274,7 +274,7 @@ typedef struct isc_socketmgrmethods {
} isc_socketmgrmethods_t;
typedef struct isc_socketmethods {
- void (*attach)(isc_socket_t *socket,
+ void (*attach)(isc_socket_t *sock,
isc_socket_t **socketp);
void (*detach)(isc_socket_t **socketp);
isc_result_t (*bind)(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
@@ -296,9 +296,9 @@ typedef struct isc_socketmethods {
isc_sockettype_t (*gettype)(isc_socket_t *sock);
void (*ipv6only)(isc_socket_t *sock, isc_boolean_t yes);
isc_result_t (*fdwatchpoke)(isc_socket_t *sock, int flags);
- isc_result_t (*dup)(isc_socket_t *socket,
+ isc_result_t (*dup)(isc_socket_t *sock,
isc_socket_t **socketp);
- int (*getfd)(isc_socket_t *socket);
+ int (*getfd)(isc_socket_t *sock);
} isc_socketmethods_t;
/*%
@@ -1094,24 +1094,24 @@ isc_socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
* \li #ISC_R_FAILURE
*/
-void isc_socket_setname(isc_socket_t *socket, const char *name, void *tag);
+void isc_socket_setname(isc_socket_t *sock, const char *name, void *tag);
/*%<
* Set the name and optional tag for a socket. This allows tracking of the
* owner or purpose for this socket, and is useful for tracing and statistics
* reporting.
*/
-const char *isc_socket_getname(isc_socket_t *socket);
+const char *isc_socket_getname(isc_socket_t *sock);
/*%<
* Get the name associated with a socket, if any.
*/
-void *isc_socket_gettag(isc_socket_t *socket);
+void *isc_socket_gettag(isc_socket_t *sock);
/*%<
* Get the tag associated with a socket, if any.
*/
-int isc_socket_getfd(isc_socket_t *socket);
+int isc_socket_getfd(isc_socket_t *sock);
/*%<
* Get the file descriptor associated with a socket
*/
diff --git a/lib/isc/inet_ntop.c b/lib/isc/inet_ntop.c
index 26d5dca..7730180 100644
--- a/lib/isc/inet_ntop.c
+++ b/lib/isc/inet_ntop.c
@@ -135,6 +135,7 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
cur.base = -1;
+ best.len = cur.len = 0;
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)
diff --git a/lib/isc/log.c b/lib/isc/log.c
index 0c142ce..38f0c4f 100644
--- a/lib/isc/log.c
+++ b/lib/isc/log.c
@@ -1143,7 +1143,7 @@ sync_channellist(isc_logconfig_t *lcfg) {
static isc_result_t
greatest_version(isc_logchannel_t *channel, int *greatestp) {
/* XXXDCL HIGHLY NT */
- char *basename, *digit_end;
+ char *basenam, *digit_end;
const char *dirname;
int version, greatest = -1;
unsigned int basenamelen;
@@ -1160,23 +1160,23 @@ greatest_version(isc_logchannel_t *channel, int *greatestp) {
* It is safe to DE_CONST the file.name because it was copied
* with isc_mem_strdup in isc_log_createchannel.
*/
- basename = strrchr(FILE_NAME(channel), sep);
+ basenam = strrchr(FILE_NAME(channel), sep);
#ifdef _WIN32
basename2 = strrchr(FILE_NAME(channel), '\\');
- if ((basename != NULL && basename2 != NULL && basename2 > basename) ||
- (basename == NULL && basename2 != NULL)) {
- basename = basename2;
+ if ((basenam != NULL && basename2 != NULL && basename2 > basenam) ||
+ (basenam == NULL && basename2 != NULL)) {
+ basenam = basename2;
sep = '\\';
}
#endif
- if (basename != NULL) {
- *basename++ = '\0';
+ if (basenam != NULL) {
+ *basenam++ = '\0';
dirname = FILE_NAME(channel);
} else {
- DE_CONST(FILE_NAME(channel), basename);
+ DE_CONST(FILE_NAME(channel), basenam);
dirname = ".";
}
- basenamelen = strlen(basename);
+ basenamelen = strlen(basenam);
isc_dir_init(&dir);
result = isc_dir_open(&dir, dirname);
@@ -1184,8 +1184,8 @@ greatest_version(isc_logchannel_t *channel, int *greatestp) {
/*
* Replace the file separator if it was taken out.
*/
- if (basename != FILE_NAME(channel))
- *(basename - 1) = sep;
+ if (basenam != FILE_NAME(channel))
+ *(basenam - 1) = sep;
/*
* Return if the directory open failed.
@@ -1195,7 +1195,7 @@ greatest_version(isc_logchannel_t *channel, int *greatestp) {
while (isc_dir_read(&dir) == ISC_R_SUCCESS) {
if (dir.entry.length > basenamelen &&
- strncmp(dir.entry.name, basename, basenamelen) == 0 &&
+ strncmp(dir.entry.name, basenam, basenamelen) == 0 &&
dir.entry.name[basenamelen] == '.') {
version = strtol(&dir.entry.name[basenamelen + 1],
@@ -1521,10 +1521,11 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
level_string[0] == '\0') {
if (level < ISC_LOG_CRITICAL)
snprintf(level_string, sizeof(level_string),
+ "%s %d: ",
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_LOG,
ISC_MSG_LEVEL,
- "level %d: "),
+ "level"),
level);
else if (level > ISC_LOG_DYNAMIC)
snprintf(level_string, sizeof(level_string),
diff --git a/lib/isc/netaddr.c b/lib/isc/netaddr.c
index d6928c1..457576b 100644
--- a/lib/isc/netaddr.c
+++ b/lib/isc/netaddr.c
@@ -202,9 +202,10 @@ isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size) {
if (result != ISC_R_SUCCESS) {
snprintf(array, size,
+ "<%s %u>",
isc_msgcat_get(isc_msgcat, ISC_MSGSET_NETADDR,
ISC_MSG_UNKNOWNADDR,
- "<unknown address, family %u>"),
+ "unknown address, family"),
na->family);
array[size - 1] = '\0';
}
diff --git a/lib/isc/result.c b/lib/isc/result.c
index 520f161..da57272 100644
--- a/lib/isc/result.c
+++ b/lib/isc/result.c
@@ -172,7 +172,7 @@ const char *
isc_result_totext(isc_result_t result) {
resulttable *table;
const char *txt, *default_text;
- int index;
+ int idx;
initialize();
@@ -183,15 +183,15 @@ isc_result_totext(isc_result_t result) {
table != NULL;
table = ISC_LIST_NEXT(table, link)) {
if (result >= table->base && result <= table->last) {
- index = (int)(result - table->base);
- default_text = table->text[index];
+ idx = (int)(result - table->base);
+ default_text = table->text[idx];
/*
- * Note: we use 'index + 1' as the message number
- * instead of index because isc_msgcat_get() requires
+ * Note: we use 'idx + 1' as the message number
+ * instead of idx because isc_msgcat_get() requires
* the message number to be > 0.
*/
txt = isc_msgcat_get(table->msgcat, table->set,
- index + 1, default_text);
+ idx + 1, default_text);
break;
}
}
diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c
index 2a7268f..1ae5e7c 100644
--- a/lib/isc/sockaddr.c
+++ b/lib/isc/sockaddr.c
@@ -192,9 +192,10 @@ isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size) {
* The message is the same as in netaddr.c.
*/
snprintf(array, size,
+ "<%s %u>",
isc_msgcat_get(isc_msgcat, ISC_MSGSET_NETADDR,
ISC_MSG_UNKNOWNADDR,
- "<unknown address, family %u>"),
+ "unknown address, family"),
sa->type.sa.sa_family);
array[size - 1] = '\0';
}
@@ -230,10 +231,11 @@ isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, isc_boolean_t address_only) {
break;
default:
UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "%s: %d",
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_SOCKADDR,
ISC_MSG_UNKNOWNFAMILY,
- "unknown address family: %d"),
+ "unknown address family"),
(int)sockaddr->type.sa.sa_family);
s = (const unsigned char *)&sockaddr->type;
length = sockaddr->length;
@@ -410,9 +412,10 @@ isc_sockaddr_setport(isc_sockaddr_t *sockaddr, in_port_t port) {
break;
default:
FATAL_ERROR(__FILE__, __LINE__,
+ "%s: %d",
isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKADDR,
ISC_MSG_UNKNOWNFAMILY,
- "unknown address family: %d"),
+ "unknown address family"),
(int)sockaddr->type.sa.sa_family);
}
}
@@ -430,9 +433,10 @@ isc_sockaddr_getport(const isc_sockaddr_t *sockaddr) {
break;
default:
FATAL_ERROR(__FILE__, __LINE__,
+ "%s: %d",
isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKADDR,
ISC_MSG_UNKNOWNFAMILY,
- "unknown address family: %d"),
+ "unknown address family"),
(int)sockaddr->type.sa.sa_family);
}
diff --git a/lib/isc/unix/file.c b/lib/isc/unix/file.c
index 3b59e86..9eda4a3 100644
--- a/lib/isc/unix/file.c
+++ b/lib/isc/unix/file.c
@@ -508,7 +508,7 @@ isc_file_safecreate(const char *filename, FILE **fp) {
}
isc_result_t
-isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
+isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirnam, char **basenam)
{
char *dir, *file, *slash;
@@ -537,8 +537,8 @@ isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
return (ISC_R_INVALIDFILE);
}
- *dirname = dir;
- *basename = file;
+ *dirnam = dir;
+ *basenam = file;
return (ISC_R_SUCCESS);
}
diff --git a/lib/isc/unix/ifiter_getifaddrs.c b/lib/isc/unix/ifiter_getifaddrs.c
index 547a83f..425b9b4 100644
--- a/lib/isc/unix/ifiter_getifaddrs.c
+++ b/lib/isc/unix/ifiter_getifaddrs.c
@@ -96,9 +96,13 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
}
if (ret < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__, isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_IFITERGETIFADDRS, ISC_MSG_GETIFADDRS,
- "getting interface addresses: getifaddrs: %s"), strbuf);
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "getting interface addresses: %s: %s",
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERGETIFADDRS,
+ ISC_MSG_GETIFADDRS,
+ "getifaddrs"),
+ strbuf);
result = ISC_R_UNEXPECTED;
goto failure;
}
@@ -208,6 +212,9 @@ internal_current(isc_interfaceiter_t *iter) {
get_addr(family, &iter->current.broadcast, ifa->ifa_broadaddr,
ifa->ifa_name);
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
}
diff --git a/lib/isc/unix/ifiter_ioctl.c b/lib/isc/unix/ifiter_ioctl.c
index a684867..c8e4970 100644
--- a/lib/isc/unix/ifiter_ioctl.c
+++ b/lib/isc/unix/ifiter_ioctl.c
@@ -109,6 +109,10 @@ struct isc_interfaceiter {
#endif
#endif
+/* Silence a warning when this file is #included */
+int
+isc_ioctl(int fildes, int req, char *arg);
+
int
isc_ioctl(int fildes, int req, char *arg) {
int trys;
@@ -588,6 +592,9 @@ internal_current4(isc_interfaceiter_t *iter) {
}
iter->current.netmask.type.in6.s6_addr[i] = (~0 << bits) & 0xff;
}
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
inet:
@@ -664,6 +671,9 @@ internal_current4(isc_interfaceiter_t *iter) {
}
get_addr(family, &iter->current.netmask,
(struct sockaddr *)&ifreq.ifr_addr, ifreq.ifr_name);
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
}
@@ -704,7 +714,6 @@ internal_current6(isc_interfaceiter_t *iter) {
get_addr(family, &iter->current.address,
(struct sockaddr *)&lifreq.lifr_addr, lifreq.lifr_name);
- iter->current.ifindex = lifreq.lifr_index;
if (isc_netaddr_islinklocal(&iter->current.address))
isc_netaddr_setzone(&iter->current.address,
(isc_uint32_t)lifreq.lifr_index);
@@ -844,7 +853,9 @@ internal_current6(isc_interfaceiter_t *iter) {
iter->current.netmask.type.in6.s6_addr[i / 8] =
(~0 << bits) & 0xff;
}
-
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
}
#endif
@@ -867,6 +878,9 @@ internal_current6(isc_interfaceiter_t *iter) {
get_addr(family, &iter->current.netmask,
(struct sockaddr *)&lifreq.lifr_addr, lifreq.lifr_name);
+#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
+ iter->current.ifindex = if_nametoindex(iter->current.name);
+#endif
return (ISC_R_SUCCESS);
}
#endif
diff --git a/lib/isc/unix/include/isc/Makefile b/lib/isc/unix/include/isc/Makefile
deleted file mode 100644
index 7c9a4b0..0000000
--- a/lib/isc/unix/include/isc/Makefile
+++ /dev/null
@@ -1,415 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# lib/isc/unix/include/isc/Makefile. Generated from Makefile.in by configure.
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 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.
-
-
-
-srcdir = /deacon/backroom/snaps/ntp-dev/lib/isc/unix/include/isc
-top_srcdir = /deacon/backroom/snaps/ntp-dev
-VPATH = /deacon/backroom/snaps/ntp-dev/lib/isc/unix/include/isc
-pkgdatadir = $(datadir)/ntp
-pkglibdir = $(libdir)/ntp
-pkgincludedir = $(includedir)/ntp
-top_builddir = ../../../../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = /usr/local/gnu/bin/install -c
-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 = sparc-sun-solaris2.10
-host_triplet = sparc-sun-solaris2.10
-subdir = lib/isc/unix/include/isc
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run aclocal-1.9
-AMDEP_FALSE = #
-AMDEP_TRUE =
-AMTAR = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run tar
-AR = ar
-ARLIB_DIR = arlib
-AUTOCONF = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run autoconf
-AUTOHEADER = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run autoheader
-AUTOMAKE = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run automake-1.9
-AWK = gawk
-BINSUBDIR = bin
-CC = gcc
-CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2 -D_LARGEFILE64_SOURCE -Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Winit-self -Wno-strict-prototypes
-CHUTEST =
-CLKTEST =
-CPP = gcc -E
-CPPFLAGS = -D__EXTENSIONS__ -I/usr/sfw/include
-CYGPATH_W = echo
-DCFD =
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-ECHO = echo
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EDITLINE_LIBS =
-EF_LIBS =
-EF_PROGS =
-EGREP = grep -E
-EXEEXT =
-HAVE_INLINE =
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_LIBOPTS_FALSE =
-INSTALL_LIBOPTS_TRUE = #
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
-LCRYPTO = -lcrypto
-LDFLAGS = -L/usr/sfw/lib -R/usr/sfw/lib
-LIBOBJS =
-LIBOPTS_CFLAGS = -I$(top_srcdir)/libopts
-LIBOPTS_DIR = libopts
-LIBOPTS_LDADD = $(top_builddir)/libopts/libopts.la
-LIBPARSE =
-LIBS = -lkvm -lelf -lsocket -lrt -lmd5 -lnsl -lgen
-LIBTOOL = $(SHELL) $(top_builddir)/libtool
-LN_S = ln -s
-LSCF = -lscf
-LTLIBOBJS =
-MAKEINFO = ${SHELL} /deacon/backroom/snaps/ntp-dev/missing --run makeinfo
-MAKE_ADJTIMED =
-MAKE_CHECK_LAYOUT = check-layout
-MAKE_CHECK_Y2K =
-MAKE_LIBNTPSIM = libntpsim.a
-MAKE_LIBPARSE =
-MAKE_LIBPARSE_KERNEL =
-MAKE_NTPDSIM = ntpdsim
-MAKE_NTPSNMPD =
-MAKE_NTPTIME = ntptime
-MAKE_PARSEKMODULE =
-MAKE_TICKADJ = tickadj
-MAKE_TIMETRIM =
-NEED_LIBOPTS_FALSE = #
-NEED_LIBOPTS_TRUE =
-OBJEXT = o
-OPENSSL =
-OPENSSL_INC = /usr/sfw/include
-OPENSSL_LIB = /usr/sfw/lib
-PACKAGE = ntp
-PACKAGE_BUGREPORT =
-PACKAGE_NAME = ntp
-PACKAGE_STRING = ntp 4.2.5p221
-PACKAGE_TARNAME = ntp
-PACKAGE_VERSION = 4.2.5p221
-PATH_NET_SNMP_CONFIG =
-PATH_PERL = /usr/local/bin/perl
-PATH_SEPARATOR = :
-PATH_SH = /bin/sh
-PROPDELAY =
-RANLIB = ranlib
-SET_MAKE =
-SHELL = /bin/sh
-SNMP_CFLAGS =
-SNMP_CPPFLAGS =
-SNMP_LIBS =
-STRIP = strip
-TESTDCF =
-VERSION = 4.2.5p221
-VPATH_HACK_FALSE =
-VPATH_HACK_TRUE = #
-YACC = bison -y
-ac_ct_AR = ar
-ac_ct_CC = gcc
-ac_ct_RANLIB = ranlib
-ac_ct_STRIP = strip
-am__fastdepCC_FALSE = #
-am__fastdepCC_TRUE =
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build = sparc-sun-solaris2.10
-build_alias =
-build_cpu = sparc
-build_os = solaris2.10
-build_vendor = sun
-datadir = ${prefix}/share
-exec_prefix = ${prefix}
-host = sparc-sun-solaris2.10
-host_alias =
-host_cpu = sparc
-host_os = solaris2.10
-host_vendor = sun
-includedir = ${prefix}/include
-infodir = ${prefix}/info
-install_sh = /deacon/backroom/snaps/ntp-dev/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localstatedir = ${prefix}/var
-mandir = ${prefix}/man
-mkdir_p = mkdir -p --
-oldincludedir = /usr/include
-prefix = /usr/local
-program_transform_name = s,x,x,
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-subdirs = arlib sntp
-sysconfdir = ${prefix}/etc
-target_alias =
-NULL =
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
-ETAGS_ARGS = $(srcdir)/Makefile.am
-#EXTRA_DIST = TAGS
-noinst_HEADERS = \
- dir.h \
- int.h \
- net.h \
- offset.h \
- stat.h \
- strerror.h \
- time.h \
- $(NULL)
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/isc/unix/include/isc/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign lib/isc/unix/include/isc/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(HEADERS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool ctags distclean 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-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-info-am
-
-# 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/lib/isc/unix/net.c b/lib/isc/unix/net.c
index 2ba17d1..7056668 100644
--- a/lib/isc/unix/net.c
+++ b/lib/isc/unix/net.c
@@ -106,7 +106,8 @@ const struct in6_addr isc_net_in6addrloop = IN6ADDR_LOOPBACK_INIT;
static isc_once_t once_ipv6only = ISC_ONCE_INIT;
# endif
-# if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
+# if defined(ISC_PLATFORM_HAVEIPV6) && \
+ defined(WANT_IPV6) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
static isc_once_t once_ipv6pktinfo = ISC_ONCE_INIT;
# endif
#endif /* ISC_PLATFORM_HAVEIPV6 */
diff --git a/libjsmn/jsmn.c b/libjsmn/jsmn.c
index 4f70adb..aa8b12b 100644
--- a/libjsmn/jsmn.c
+++ b/libjsmn/jsmn.c
@@ -9,7 +9,7 @@
static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser,
jsmntok_t *tokens, size_t num_tokens) {
jsmntok_t *tok;
- if (parser->toknext >= num_tokens) {
+ if ((size_t)parser->toknext >= num_tokens) {
return NULL;
}
tok = &tokens[parser->toknext++];
@@ -108,6 +108,8 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
/* Backslash: Quoted symbol expected */
if (c == '\\') {
+ int i = 0;
+
parser->pos++;
switch (js[parser->pos]) {
/* Allowed escaped symbols */
@@ -117,7 +119,6 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
/* Allows escaped symbol \uXXXX */
case 'u':
parser->pos++;
- int i = 0;
for(; i < 4 && js[parser->pos] != '\0'; i++) {
/* If it isn't a hex character we have an error */
if(!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */
diff --git a/libntp/Makefile.am b/libntp/Makefile.am
index 515fa9a..c12658f 100644
--- a/libntp/Makefile.am
+++ b/libntp/Makefile.am
@@ -78,16 +78,17 @@ libntp_a_SRCS = \
msyslog.c \
netof.c \
ntp_calendar.c \
+ ntp_crypto_rnd.c \
ntp_intres.c \
ntp_libopts.c \
ntp_lineedit.c \
+ ntp_random.c \
ntp_rfc2553.c \
ntp_worker.c \
numtoa.c \
numtohost.c \
octtoint.c \
prettydate.c \
- ntp_random.c \
recvbuff.c \
refnumtoa.c \
snprintf.c \
diff --git a/libntp/Makefile.in b/libntp/Makefile.in
index 87645ca..bb68042 100644
--- a/libntp/Makefile.in
+++ b/libntp/Makefile.in
@@ -41,8 +41,7 @@ subdir = libntp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -53,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -70,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -96,13 +98,14 @@ am__libntp_a_SOURCES_DIST = systime.c a_md5encrypt.c adjtime.c \
dofptoa.c dolfptoa.c emalloc.c findconfig.c getopt.c \
hextoint.c hextolfp.c humandate.c icom.c iosignal.c \
lib_strbuf.c machines.c mktime.c modetoa.c mstolfp.c msyslog.c \
- netof.c ntp_calendar.c ntp_intres.c ntp_libopts.c \
- ntp_lineedit.c ntp_rfc2553.c ntp_worker.c numtoa.c numtohost.c \
- octtoint.c prettydate.c ntp_random.c recvbuff.c refnumtoa.c \
- snprintf.c socket.c socktoa.c socktohost.c ssl_init.c \
- statestr.c strdup.c strl_obsd.c syssignal.c timetoa.c \
- timevalops.c uglydate.c vint64ops.c work_fork.c work_thread.c \
- ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
+ netof.c ntp_calendar.c ntp_crypto_rnd.c ntp_intres.c \
+ ntp_libopts.c ntp_lineedit.c ntp_random.c ntp_rfc2553.c \
+ ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \
+ recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
+ socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
+ syssignal.c timetoa.c timevalops.c uglydate.c vint64ops.c \
+ work_fork.c work_thread.c ymd2yd.c \
+ $(srcdir)/../lib/isc/assertions.c \
$(srcdir)/../lib/isc/buffer.c \
$(srcdir)/../lib/isc/backtrace-emptytbl.c \
$(srcdir)/../lib/isc/backtrace.c \
@@ -153,17 +156,19 @@ am__objects_4 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \
humandate.$(OBJEXT) icom.$(OBJEXT) iosignal.$(OBJEXT) \
lib_strbuf.$(OBJEXT) machines.$(OBJEXT) mktime.$(OBJEXT) \
modetoa.$(OBJEXT) mstolfp.$(OBJEXT) msyslog.$(OBJEXT) \
- netof.$(OBJEXT) ntp_calendar.$(OBJEXT) ntp_intres.$(OBJEXT) \
+ netof.$(OBJEXT) ntp_calendar.$(OBJEXT) \
+ ntp_crypto_rnd.$(OBJEXT) ntp_intres.$(OBJEXT) \
ntp_libopts.$(OBJEXT) ntp_lineedit.$(OBJEXT) \
- ntp_rfc2553.$(OBJEXT) ntp_worker.$(OBJEXT) numtoa.$(OBJEXT) \
- numtohost.$(OBJEXT) octtoint.$(OBJEXT) prettydate.$(OBJEXT) \
- ntp_random.$(OBJEXT) recvbuff.$(OBJEXT) refnumtoa.$(OBJEXT) \
- snprintf.$(OBJEXT) socket.$(OBJEXT) socktoa.$(OBJEXT) \
- socktohost.$(OBJEXT) ssl_init.$(OBJEXT) statestr.$(OBJEXT) \
- strdup.$(OBJEXT) strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) \
- timetoa.$(OBJEXT) timevalops.$(OBJEXT) uglydate.$(OBJEXT) \
- vint64ops.$(OBJEXT) work_fork.$(OBJEXT) work_thread.$(OBJEXT) \
- ymd2yd.$(OBJEXT) $(am__objects_3) $(am__objects_1)
+ ntp_random.$(OBJEXT) ntp_rfc2553.$(OBJEXT) \
+ ntp_worker.$(OBJEXT) numtoa.$(OBJEXT) numtohost.$(OBJEXT) \
+ octtoint.$(OBJEXT) prettydate.$(OBJEXT) recvbuff.$(OBJEXT) \
+ refnumtoa.$(OBJEXT) snprintf.$(OBJEXT) socket.$(OBJEXT) \
+ socktoa.$(OBJEXT) socktohost.$(OBJEXT) ssl_init.$(OBJEXT) \
+ statestr.$(OBJEXT) strdup.$(OBJEXT) strl_obsd.$(OBJEXT) \
+ syssignal.$(OBJEXT) timetoa.$(OBJEXT) timevalops.$(OBJEXT) \
+ uglydate.$(OBJEXT) vint64ops.$(OBJEXT) work_fork.$(OBJEXT) \
+ work_thread.$(OBJEXT) ymd2yd.$(OBJEXT) $(am__objects_3) \
+ $(am__objects_1)
am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_4)
libntp_a_OBJECTS = $(am_libntp_a_OBJECTS)
libntpsim_a_AR = $(AR) $(ARFLAGS)
@@ -175,13 +180,14 @@ am__libntpsim_a_SOURCES_DIST = systime_s.c a_md5encrypt.c adjtime.c \
dofptoa.c dolfptoa.c emalloc.c findconfig.c getopt.c \
hextoint.c hextolfp.c humandate.c icom.c iosignal.c \
lib_strbuf.c machines.c mktime.c modetoa.c mstolfp.c msyslog.c \
- netof.c ntp_calendar.c ntp_intres.c ntp_libopts.c \
- ntp_lineedit.c ntp_rfc2553.c ntp_worker.c numtoa.c numtohost.c \
- octtoint.c prettydate.c ntp_random.c recvbuff.c refnumtoa.c \
- snprintf.c socket.c socktoa.c socktohost.c ssl_init.c \
- statestr.c strdup.c strl_obsd.c syssignal.c timetoa.c \
- timevalops.c uglydate.c vint64ops.c work_fork.c work_thread.c \
- ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
+ netof.c ntp_calendar.c ntp_crypto_rnd.c ntp_intres.c \
+ ntp_libopts.c ntp_lineedit.c ntp_random.c ntp_rfc2553.c \
+ ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \
+ recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
+ socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
+ syssignal.c timetoa.c timevalops.c uglydate.c vint64ops.c \
+ work_fork.c work_thread.c ymd2yd.c \
+ $(srcdir)/../lib/isc/assertions.c \
$(srcdir)/../lib/isc/buffer.c \
$(srcdir)/../lib/isc/backtrace-emptytbl.c \
$(srcdir)/../lib/isc/backtrace.c \
@@ -263,6 +269,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -297,7 +304,9 @@ 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@
@@ -436,6 +445,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
@@ -559,16 +573,17 @@ libntp_a_SRCS = \
msyslog.c \
netof.c \
ntp_calendar.c \
+ ntp_crypto_rnd.c \
ntp_intres.c \
ntp_libopts.c \
ntp_lineedit.c \
+ ntp_random.c \
ntp_rfc2553.c \
ntp_worker.c \
numtoa.c \
numtohost.c \
octtoint.c \
prettydate.c \
- ntp_random.c \
recvbuff.c \
refnumtoa.c \
snprintf.c \
@@ -709,6 +724,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netof.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netscope.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_calendar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_crypto_rnd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_intres.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_libopts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_lineedit.Po@am__quote@
diff --git a/libntp/atoint.c b/libntp/atoint.c
index 1064b36..9da8c13 100644
--- a/libntp/atoint.c
+++ b/libntp/atoint.c
@@ -35,7 +35,7 @@ atoint(
u = 0;
while (*cp != '\0') {
- if (!isdigit((int)*cp))
+ if (!isdigit((unsigned char)*cp))
return 0;
if (u > 214748364 || (u == 214748364 && *cp > oflow_digit))
return 0; /* overflow */
diff --git a/libntp/atolfp.c b/libntp/atolfp.c
index 4afeb23..3a65f6b 100644
--- a/libntp/atolfp.c
+++ b/libntp/atolfp.c
@@ -52,7 +52,7 @@ atolfp(
*
* [spaces][-|+][digits][.][digits][spaces|\n|\0]
*/
- while (isspace((int)*cp))
+ while (isspace((unsigned char)*cp))
cp++;
if (*cp == '-') {
@@ -63,7 +63,7 @@ atolfp(
if (*cp == '+')
cp++;
- if (*cp != '.' && !isdigit((int)*cp))
+ if (*cp != '.' && !isdigit((unsigned char)*cp))
return 0;
while (*cp != '\0' && (ind = strchr(digits, *cp)) != NULL) {
@@ -72,7 +72,7 @@ atolfp(
cp++;
}
- if (*cp != '\0' && !isspace((int)*cp)) {
+ if (*cp != '\0' && !isspace((unsigned char)*cp)) {
if (*cp++ != '.')
return 0;
@@ -84,10 +84,10 @@ atolfp(
cp++;
}
- while (isdigit((int)*cp))
+ while (isdigit((unsigned char)*cp))
cp++;
- if (*cp != '\0' && !isspace((int)*cp))
+ if (*cp != '\0' && !isspace((unsigned char)*cp))
return 0;
}
diff --git a/libntp/atouint.c b/libntp/atouint.c
index ab86130..0a61639 100644
--- a/libntp/atouint.c
+++ b/libntp/atouint.c
@@ -28,7 +28,7 @@ atouint(
u = 0;
while ('\0' != *cp) {
- if (!isdigit(*cp))
+ if (!isdigit((unsigned char)*cp))
return 0;
if (u > 429496729 || (u == 429496729 && *cp >= '6'))
return 0; /* overflow */
diff --git a/libntp/audio.c b/libntp/audio.c
index 2a56619..6f2262c 100644
--- a/libntp/audio.c
+++ b/libntp/audio.c
@@ -67,7 +67,7 @@ static struct audio_info info; /* audio device info */
static int ctl_fd; /* audio control file descriptor */
#ifdef PCM_STYLE_SOUND
-static void audio_config_read (int, char **, char **);
+static void audio_config_read (int, const char **, const char **);
static int mixer_name (const char *, int);
@@ -114,8 +114,8 @@ mixer_name(
static void
audio_config_read(
int unit,
- char **c_dev, /* Control device */
- char **i_dev /* input device */
+ const char **c_dev, /* Control device */
+ const char **i_dev /* input device */
)
{
FILE *fd;
@@ -148,12 +148,12 @@ audio_config_read(
/* Remove any trailing spaces */
for (i = strlen(line);
- i > 0 && isascii((int)line[i - 1]) && isspace((int)line[i - 1]);
+ i > 0 && isascii((unsigned char)line[i - 1]) && isspace((unsigned char)line[i - 1]);
)
line[--i] = '\0';
/* Remove leading space */
- for (cc = line; *cc && isascii((int)*cc) && isspace((int)*cc); cc++)
+ for (cc = line; *cc && isascii((unsigned char)*cc) && isspace((unsigned char)*cc); cc++)
continue;
/* Stop if nothing left */
@@ -162,16 +162,16 @@ audio_config_read(
/* Uppercase the command and find the arg */
for (ca = cc; *ca; ca++) {
- if (isascii((int)*ca)) {
- if (islower((int)*ca)) {
- *ca = toupper(*ca);
- } else if (isspace((int)*ca) || (*ca == '='))
+ if (isascii((unsigned char)*ca)) {
+ if (islower((unsigned char)*ca)) {
+ *ca = toupper((unsigned char)*ca);
+ } else if (isspace((unsigned char)*ca) || (*ca == '='))
break;
}
}
/* Remove space (and possible =) leading the arg */
- for (; *ca && isascii((int)*ca) && (isspace((int)*ca) || (*ca == '=')); ca++)
+ for (; *ca && isascii((unsigned char)*ca) && (isspace((unsigned char)*ca) || (*ca == '=')); ca++)
continue;
if (!strncmp(cc, "IDEV", 4) &&
@@ -210,7 +210,7 @@ audio_config_read(
*/
int
audio_init(
- char *dname, /* device name */
+ const char *dname, /* device name */
int bufsiz, /* buffer size */
int unit /* device unit (0-3) */
)
@@ -227,7 +227,7 @@ audio_init(
#endif
int fd;
int rval;
- char *actl =
+ const char *actl =
#ifdef PCM_STYLE_SOUND
actl_dev
#else
diff --git a/libntp/authkeys.c b/libntp/authkeys.c
index 7b4427c..68771ff 100644
--- a/libntp/authkeys.c
+++ b/libntp/authkeys.c
@@ -517,7 +517,7 @@ MD5auth_setkey(
keyid_t keyno,
int keytype,
const u_char *key,
- int len
+ size_t len
)
{
symkey * sk;
@@ -527,7 +527,6 @@ MD5auth_setkey(
DEBUG_ENSURE(keytype <= USHRT_MAX);
DEBUG_ENSURE(len < 4 * 1024);
- len = max(0, len);
/*
* See if we already have the key. If so just stick in the
* new value.
diff --git a/libntp/authreadkeys.c b/libntp/authreadkeys.c
index 9b02119..e8ddc94 100644
--- a/libntp/authreadkeys.c
+++ b/libntp/authreadkeys.c
@@ -77,8 +77,8 @@ authreadkeys(
int keytype;
char buf[512]; /* lots of room for line */
u_char keystr[32]; /* Bug 2537 */
- int len;
- int j;
+ size_t len;
+ size_t j;
/*
* Open file. Complain and return if it can't be opened.
@@ -181,11 +181,11 @@ authreadkeys(
char hex[] = "0123456789abcdef";
u_char temp;
char *ptr;
- int jlim;
+ size_t jlim;
jlim = min(len, 2 * sizeof(keystr));
for (j = 0; j < jlim; j++) {
- ptr = strchr(hex, tolower(token[j]));
+ ptr = strchr(hex, tolower((unsigned char)token[j]));
if (ptr == NULL)
break; /* abort decoding */
temp = (u_char)(ptr - hex);
diff --git a/libntp/emalloc.c b/libntp/emalloc.c
index c49c5c1..6c1c678 100644
--- a/libntp/emalloc.c
+++ b/libntp/emalloc.c
@@ -86,6 +86,7 @@ estrdup_impl(
}
+#if 0
#ifndef EREALLOC_CALLSITE
void *
emalloc(size_t newsz)
@@ -93,4 +94,5 @@ emalloc(size_t newsz)
return ereallocz(NULL, newsz, 0, FALSE);
}
#endif
+#endif
diff --git a/libntp/hextoint.c b/libntp/hextoint.c
index d24b5a0..980a43f 100644
--- a/libntp/hextoint.c
+++ b/libntp/hextoint.c
@@ -23,7 +23,7 @@ hextoint(
u = 0;
while (*cp != '\0') {
- if (!isxdigit(*cp))
+ if (!isxdigit((unsigned char)*cp))
return 0;
if (u & 0xF0000000)
return 0; /* overflow */
diff --git a/libntp/hextolfp.c b/libntp/hextolfp.c
index 8fbce2e..2bff929 100644
--- a/libntp/hextolfp.c
+++ b/libntp/hextolfp.c
@@ -30,7 +30,7 @@ hextolfp(
*
* [spaces]8_hex_digits[.]8_hex_digits[spaces|\n|\0]
*/
- while (isspace((int)*cp))
+ while (isspace((unsigned char)*cp))
cp++;
cpstart = cp;
@@ -59,7 +59,7 @@ hextolfp(
if ((cp - cpstart) < 8 || ind == NULL)
return 0;
- if (*cp != '\0' && !isspace((int)*cp))
+ if (*cp != '\0' && !isspace((unsigned char)*cp))
return 0;
lfp->l_ui = dec_i;
diff --git a/libntp/humandate.c b/libntp/humandate.c
index f88d8d2..d9d5e89 100644
--- a/libntp/humandate.c
+++ b/libntp/humandate.c
@@ -13,7 +13,7 @@
/* This is used in msyslog.c; we don't want to clutter up the log with
the year and day of the week, etc.; just the minimal date and time. */
-char *
+const char *
humanlogtime(void)
{
char * bp;
@@ -39,7 +39,7 @@ humanlogtime(void)
* humantime() -- like humanlogtime() but without date, and with the
* time to display given as an argument.
*/
-char *
+const char *
humantime(
time_t cursec
)
diff --git a/libntp/icom.c b/libntp/icom.c
index c981d85..8070011 100644
--- a/libntp/icom.c
+++ b/libntp/icom.c
@@ -121,17 +121,15 @@ doublefreq( /* returns void */
*/
int
icom_init(
- char *device, /* device name/link */
+ const char *device, /* device name/link */
int speed, /* line speed */
int trace /* trace flags */ )
{
TTY ttyb;
int fd;
- int flags;
int rc;
int saved_errno;
- flags = trace;
fd = tty_open(device, O_RDWR, 0777);
if (fd < 0)
return -1;
diff --git a/libntp/modetoa.c b/libntp/modetoa.c
index b476bc9..6f13d20 100644
--- a/libntp/modetoa.c
+++ b/libntp/modetoa.c
@@ -9,7 +9,7 @@
const char *
modetoa(
- int mode
+ size_t mode
)
{
char *bp;
@@ -25,9 +25,9 @@ modetoa(
"bclient",
};
- if (mode < 0 || mode >= COUNTOF(modestrings)) {
+ if (mode >= COUNTOF(modestrings)) {
LIB_GETBUF(bp);
- snprintf(bp, LIB_BUFLENGTH, "mode#%d", mode);
+ snprintf(bp, LIB_BUFLENGTH, "mode#%zu", mode);
return bp;
}
diff --git a/libntp/mstolfp.c b/libntp/mstolfp.c
index 1a1a02b..828b14c 100644
--- a/libntp/mstolfp.c
+++ b/libntp/mstolfp.c
@@ -32,7 +32,7 @@ mstolfp(
*/
bp = buf;
cp = str;
- while (isspace((int)*cp))
+ while (isspace((unsigned char)*cp))
cp++;
if (*cp == '-') {
@@ -40,7 +40,7 @@ mstolfp(
cp++;
}
- if (*cp != '.' && !isdigit((int)*cp))
+ if (*cp != '.' && !isdigit((unsigned char)*cp))
return 0;
@@ -48,7 +48,7 @@ mstolfp(
* Search forward for the decimal point or the end of the string.
*/
cpdec = cp;
- while (isdigit((int)*cpdec))
+ while (isdigit((unsigned char)*cpdec))
cpdec++;
/*
@@ -86,7 +86,7 @@ mstolfp(
if (*cp == '.') {
cp++;
- while (isdigit((int)*cp))
+ while (isdigit((unsigned char)*cp))
*bp++ = (char)*cp++;
}
*bp = '\0';
@@ -95,7 +95,7 @@ mstolfp(
* Check to make sure the string is properly terminated. If
* so, give the buffer to the decoding routine.
*/
- if (*cp != '\0' && !isspace((int)*cp))
+ if (*cp != '\0' && !isspace((unsigned char)*cp))
return 0;
return atolfp(buf, lfp);
}
diff --git a/libntp/ntp_calendar.c b/libntp/ntp_calendar.c
index e557f4e..ff91fcf 100644
--- a/libntp/ntp_calendar.c
+++ b/libntp/ntp_calendar.c
@@ -29,7 +29,7 @@ ntpcal_set_timefunc(
)
{
systime_func_ptr res;
-
+
res = systime_func;
if (NULL == nfunc)
nfunc = &time;
@@ -118,7 +118,7 @@ vint64_to_time(
#endif
return res;
-}
+}
/*
*---------------------------------------------------------------------
@@ -153,7 +153,11 @@ ntpcal_get_build_date(
* problem.
*
*/
+#ifdef MKREPRO_DATE
+ static const char build[] = MKREPRO_TIME "/" MKREPRO_DATE;
+#else
static const char build[] = __TIME__ "/" __DATE__;
+#endif
static const char mlist[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
char monstr[4];
@@ -166,7 +170,7 @@ ntpcal_get_build_date(
#ifdef DEBUG
static int ignore = 0;
#endif
-
+
ZERO(*jd);
jd->year = 1970;
jd->month = 1;
@@ -251,7 +255,7 @@ static const uint16_t real_month_table[2][13] = {
* in the proleptic Gregorian calendar. The begin of the Christian Era
* (0001-01-01) is RD(1).
*
- *
+ *
* Some notes on the implementation:
*
* Calendar algorithms thrive on the division operation, which is one of
@@ -347,7 +351,7 @@ ntpcal_periodic_extend(
char cpl = 0; /* modulo complement flag */
char neg = 0; /* sign change flag */
- /* make the cycle positive and adjust the flags */
+ /* make the cycle positive and adjust the flags */
if (cycle < 0) {
cycle = - cycle;
neg ^= 1;
@@ -403,21 +407,21 @@ ntpcal_ntp_to_time(
#ifdef HAVE_INT64
- res.q_s = (pivot != NULL)
+ res.q_s = (pivot != NULL)
? *pivot
- : now();
+ : now();
res.Q_s -= 0x80000000; /* unshift of half range */
ntp -= (uint32_t)JAN_1970; /* warp into UN*X domain */
ntp -= res.D_s.lo; /* cycle difference */
res.Q_s += (uint64_t)ntp; /* get expanded time */
#else /* no 64bit scalars */
-
+
time_t tmp;
-
- tmp = (pivot != NULL)
+
+ tmp = (pivot != NULL)
? *pivot
- : now();
+ : now();
res = time_to_vint64(&tmp);
M_SUB(res.D_s.hi, res.D_s.lo, 0, 0x80000000);
ntp -= (uint32_t)JAN_1970; /* warp into UN*X domain */
@@ -461,9 +465,9 @@ ntpcal_ntp_to_ntp(
res.Q_s += (uint64_t)ntp; /* get expanded time */
#else /* no 64bit scalars */
-
+
time_t tmp;
-
+
tmp = (pivot)
? *pivot
: now();
@@ -488,7 +492,7 @@ ntpcal_ntp_to_ntp(
*/
/*
- *-------------------------------------------------------------------
+ *-------------------------------------------------------------------
* Split a 64bit seconds value into elapsed days in 'res.hi' and
* elapsed seconds since midnight in 'res.lo' using explicit floor
* division. This function happily accepts negative time values as
@@ -528,7 +532,7 @@ ntpcal_daysplit(
isneg = M_ISNEG(op.D_s.hi);
if (isneg)
M_NEG(op.D_s.hi, op.D_s.lo);
-
+
/* save remainder of DIV 128, shift for divide */
r = op.D_s.lo & 127; /* save remainder bits */
op.D_s.lo = (op.D_s.lo >> 7) | (op.D_s.hi << 25);
@@ -568,16 +572,16 @@ ntpcal_daysplit(
} else
q = ~q + 1;
}
-
+
res.hi = q;
res.lo = r;
-#endif
+#endif
return res;
}
/*
- *-------------------------------------------------------------------
+ *-------------------------------------------------------------------
* Split a 32bit seconds value into h/m/s and excessive days. This
* function happily accepts negative time values as timestamps before
* midnight.
@@ -628,7 +632,7 @@ ntpcal_split_eradays(
{
ntpcal_split res;
int32_t n400, n100, n004, n001, yday; /* calendar year cycles */
-
+
/*
* Split off calendar cycles, using floor division in the first
* step. After that first step, simple division does it because
@@ -648,7 +652,7 @@ ntpcal_split_eradays(
yday = yday % GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
n001 = yday / DAYSPERYEAR;
yday = yday % DAYSPERYEAR;
-
+
/*
* check for leap cycle overflows and calculate the leap flag
* if needed
@@ -661,11 +665,11 @@ ntpcal_split_eradays(
*isleapyear = 1;
} else if (isleapyear)
*isleapyear = (n001 == 3) && ((n004 != 24) || (n100 == 3));
-
+
/* now merge the cycles to elapsed years, using horner scheme */
res.hi = ((4*n400 + n100)*25 + n004)*4 + n001;
res.lo = yday;
-
+
return res;
}
@@ -720,7 +724,13 @@ ntpcal_rd_to_date(
leaps = 0;
retv = 0;
- /* get day-of-week first */
+ /* Get day-of-week first. Since rd is signed, the remainder can
+ * be in the range [-6..+6], but the assignment to an unsigned
+ * variable maps the negative values to positive values >=7.
+ * This makes the sign correction look strange, but adding 7
+ * causes the needed wrap-around into the desired value range of
+ * zero to six, both inclusive.
+ */
jd->weekday = rd % 7;
if (jd->weekday >= 7) /* unsigned! */
jd->weekday += 7;
@@ -790,7 +800,7 @@ ntpcal_daysec_to_date(
{
int32_t days;
int ts[3];
-
+
days = priv_timesplit(ts, sec);
jd->hour = (uint8_t)ts[0];
jd->minute = (uint8_t)ts[1];
@@ -813,7 +823,7 @@ ntpcal_daysec_to_tm(
{
int32_t days;
int32_t ts[3];
-
+
days = priv_timesplit(ts, sec);
utm->tm_hour = ts[0];
utm->tm_min = ts[1];
@@ -942,7 +952,7 @@ ntpcal_dayjoin(
/* fix sign */
if (isneg)
M_NEG(res.D_s.hi, res.D_s.lo);
-
+
/* properly add seconds */
p2 = 0;
if (secs < 0) {
@@ -953,7 +963,7 @@ ntpcal_dayjoin(
}
M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
-#endif
+#endif
return res;
}
@@ -1275,7 +1285,7 @@ ntpcal_ntp64_to_date(
)
{
ntpcal_split ds;
-
+
ds = ntpcal_daysplit(ntp);
ds.hi += ntpcal_daysec_to_date(jd, ds.lo);
@@ -1290,7 +1300,7 @@ ntpcal_ntp_to_date(
)
{
vint64 ntp64;
-
+
/*
* Unfold ntp time around current time into NTP domain. Split
* into days and seconds, shift days into CE domain and
@@ -1512,12 +1522,12 @@ isocal_split_eraweeks(
res.lo += (res.lo >= 10435);
cents = res.lo / 5218;
res.lo %= 5218; /* res.lo is weeks in century now */
-
+
/* convert elapsed weeks in century to elapsed years and weeks */
res.lo = res.lo * 157 + bctab[cents];
res.hi += cents * 100 + res.lo / 8192;
- res.lo = (res.lo % 8192) / 157;
-
+ res.lo = (res.lo % 8192) / 157;
+
return res;
}
@@ -1534,7 +1544,7 @@ isocal_ntp64_to_date(
{
ntpcal_split ds;
int32_t ts[3];
-
+
/*
* Split NTP time into days and seconds, shift days into CE
* domain and process the parts.
@@ -1561,7 +1571,7 @@ isocal_ntp64_to_date(
id->year = (uint16_t)ds.hi + 1; /* shift to current */
id->week = (uint8_t )ds.lo + 1;
- return (ds.hi >= 0 && ds.hi < 0xFFFFU);
+ return (ds.hi >= 0 && ds.hi < 0x0000FFFF);
}
int
@@ -1572,7 +1582,7 @@ isocal_ntp_to_date(
)
{
vint64 ntp64;
-
+
/*
* Unfold ntp time around current time into NTP domain, then
* convert the full time stamp.
diff --git a/libntp/ntp_crypto_rnd.c b/libntp/ntp_crypto_rnd.c
new file mode 100644
index 0000000..96348f2
--- /dev/null
+++ b/libntp/ntp_crypto_rnd.c
@@ -0,0 +1,113 @@
+/*
+ * Crypto-quality random number functions
+ *
+ * Author: Harlan Stenn, 2014
+ *
+ * This file is Copyright (c) 2014 by Network Time Foundation.
+ * BSD terms apply: see the file COPYRIGHT in the distribution root for details.
+ */
+
+#include "config.h"
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <stdio.h>
+
+#include <l_stdlib.h>
+#include <ntp_random.h>
+
+#ifdef USE_OPENSSL_CRYPTO_RAND
+#include <openssl/err.h>
+#include <openssl/rand.h>
+
+int crypto_rand_init = 0;
+#else
+
+# ifndef HAVE_ARC4RANDOM_BUF
+static void
+arc4random_buf(void *buf, size_t nbytes);
+
+void
+evutil_secure_rng_get_bytes(void *buf, size_t nbytes);
+
+static void
+arc4random_buf(void *buf, size_t nbytes)
+{
+ evutil_secure_rng_get_bytes(buf, nbytes);
+ return;
+}
+# endif
+#endif
+
+/*
+ * As of late 2014, here's how we plan to provide cryptographic-quality
+ * random numbers:
+ *
+ * - If we are building with OpenSSL, use RAND_poll() and RAND_bytes().
+ * - Otherwise, use arc4random().
+ *
+ * Use of arc4random() can be forced using configure --disable-openssl-random
+ *
+ * We can count on arc4random existing, thru the OS or thru libevent.
+ * The quality of arc4random depends on the implementor.
+ *
+ * RAND_poll() doesn't show up until XXX. If it's not present, we
+ * need to either provide our own or use arc4random().
+ */
+
+/*
+ * ntp_crypto_srandom:
+ *
+ * Initialize the random number generator, if needed by the underlying
+ * crypto random number generation mechanism.
+ */
+
+void
+ntp_crypto_srandom(
+ void
+ )
+{
+#ifdef USE_OPENSSL_CRYPTO_RAND
+ if (!crypto_rand_init) {
+ RAND_poll();
+ crypto_rand_init = 1;
+ }
+#else
+ /* No initialization needed for arc4random() */
+#endif
+}
+
+
+/*
+ * ntp_crypto_random_buf:
+ *
+ * Returns 0 on success, -1 on error.
+ */
+int
+ntp_crypto_random_buf(
+ void *buf,
+ size_t nbytes
+ )
+{
+#ifdef USE_OPENSSL_CRYPTO_RAND
+ int rc;
+
+ rc = RAND_bytes(buf, nbytes);
+ if (1 != rc) {
+ unsigned long err;
+ char *err_str;
+
+ err = ERR_get_error();
+ err_str = ERR_error_string(err, NULL);
+ /* XXX: Log the error */
+ (void)&err_str;
+
+ return -1;
+ }
+ return 0;
+#else
+ arc4random_buf(buf, nbytes);
+ return 0;
+#endif
+}
diff --git a/libntp/ntp_intres.c b/libntp/ntp_intres.c
index 2ac70c1..eea88a1 100644
--- a/libntp/ntp_intres.c
+++ b/libntp/ntp_intres.c
@@ -684,11 +684,11 @@ blocking_getnameinfo(
blocking_gni_resp * gni_resp;
size_t octets;
size_t resp_octets;
- char * host;
char * service;
char * cp;
int rc;
time_t time_now;
+ char host[1024];
gni_req = (void *)((char *)req + sizeof(*req));
@@ -699,19 +699,7 @@ blocking_getnameinfo(
* large allocations. We only need room for the host
* and service names.
*/
- NTP_REQUIRE(octets < 1024);
-
-#ifndef HAVE_ALLOCA
- host = emalloc(octets);
-#else
- host = alloca(octets);
- if (NULL == host) {
- msyslog(LOG_ERR,
- "blocking_getnameinfo unable to allocate %lu octets on stack",
- (u_long)octets);
- exit(1);
- }
-#endif
+ NTP_REQUIRE(octets < sizeof(host));
service = host + gni_req->hostoctets;
worker_ctx = get_worker_context(c, gni_req->dns_idx);
@@ -793,9 +781,6 @@ blocking_getnameinfo(
rc = queue_blocking_response(c, resp, resp_octets, req);
if (rc)
msyslog(LOG_ERR, "blocking_getnameinfo unable to queue response");
-#ifndef HAVE_ALLOCA
- free(host);
-#endif
return rc;
}
diff --git a/libntp/ntp_lineedit.c b/libntp/ntp_lineedit.c
index c5aad31..e3bc002 100644
--- a/libntp/ntp_lineedit.c
+++ b/libntp/ntp_lineedit.c
@@ -178,23 +178,22 @@ ntp_readline(
if (NULL != line) {
if (*line) {
add_history(line);
- *pcount = strlen(line);
- } else {
- free(line);
- line = NULL;
}
+ *pcount = strlen(line);
}
#endif /* LE_READLINE */
#ifdef LE_EDITLINE
cline = el_gets(ntp_el, pcount);
- if (NULL != cline && *cline) {
+ if (NULL != cline) {
history(ntp_hist, &hev, H_ENTER, cline);
- *pcount = strlen(cline);
line = estrdup(cline);
- } else
+ } else if (*pcount == -1) {
line = NULL;
+ } else {
+ line = estrdup("");
+ }
#endif /* LE_EDITLINE */
#ifdef LE_NONE
diff --git a/libntp/octtoint.c b/libntp/octtoint.c
index d189e40..e519601 100644
--- a/libntp/octtoint.c
+++ b/libntp/octtoint.c
@@ -24,7 +24,7 @@ octtoint(
u = 0;
while (*cp != '\0') {
- if (!isdigit((int)*cp) || *cp == '8' || *cp == '9')
+ if (!isdigit((unsigned char)*cp) || *cp == '8' || *cp == '9')
return 0;
if (u >= 0x20000000)
return 0; /* overflow */
diff --git a/libntp/prettydate.c b/libntp/prettydate.c
index f121297..5da5ecc 100644
--- a/libntp/prettydate.c
+++ b/libntp/prettydate.c
@@ -133,7 +133,7 @@ get_struct_tm(
if (--folds < MINFOLD)
return NULL;
ts += SOLAR_CYCLE_SECS;
- } else if (ts >= SOLAR_CYCLE_SECS) {
+ } else if (ts >= (time_t)SOLAR_CYCLE_SECS) {
if (++folds > MAXFOLD)
return NULL;
ts -= SOLAR_CYCLE_SECS;
@@ -157,10 +157,10 @@ common_prettydate(
int local
)
{
- static const char* pfmt[2] = {
- "%08lx.%08lx %s, %s %2d %4d %2d:%02d:%02d.%03u",
- "%08lx.%08lx [%s, %s %2d %4d %2d:%02d:%02d.%03u UTC]"
- };
+ static const char pfmt0[] =
+ "%08lx.%08lx %s, %s %2d %4d %2d:%02d:%02d.%03u";
+ static const char pfmt1[] =
+ "%08lx.%08lx [%s, %s %2d %4d %2d:%02d:%02d.%03u UTC]";
char *bp;
struct tm *tm;
@@ -186,13 +186,13 @@ common_prettydate(
*/
struct calendar jd;
ntpcal_time_to_date(&jd, &sec);
- snprintf(bp, LIB_BUFLENGTH, pfmt[local != 0],
+ snprintf(bp, LIB_BUFLENGTH, local ? pfmt1 : pfmt0,
(u_long)ts->l_ui, (u_long)ts->l_uf,
daynames[jd.weekday], months[jd.month-1],
jd.monthday, jd.year, jd.hour,
jd.minute, jd.second, msec);
} else
- snprintf(bp, LIB_BUFLENGTH, pfmt[0],
+ snprintf(bp, LIB_BUFLENGTH, pfmt0,
(u_long)ts->l_ui, (u_long)ts->l_uf,
daynames[tm->tm_wday], months[tm->tm_mon],
tm->tm_mday, 1900 + tm->tm_year, tm->tm_hour,
diff --git a/libntp/ssl_init.c b/libntp/ssl_init.c
index 7f1e9a0..a9d1d54 100644
--- a/libntp/ssl_init.c
+++ b/libntp/ssl_init.c
@@ -96,13 +96,13 @@ keytype_from_text(
LIB_GETBUF(upcased);
strlcpy(upcased, text, LIB_BUFLENGTH);
for (pch = upcased; '\0' != *pch; pch++)
- *pch = (char)toupper(*pch);
+ *pch = (char)toupper((unsigned char)*pch);
key_type = OBJ_sn2nid(upcased);
#else
key_type = 0;
#endif
- if (!key_type && 'm' == tolower(text[0]))
+ if (!key_type && 'm' == tolower((unsigned char)text[0]))
key_type = NID_md5;
if (!key_type)
diff --git a/libntp/timetoa.c b/libntp/timetoa.c
index c04d34e..f294e16 100644
--- a/libntp/timetoa.c
+++ b/libntp/timetoa.c
@@ -57,14 +57,12 @@ format_time_fraction(
u_int u;
long fraclimit;
int notneg; /* flag for non-negative value */
- const char * fmt;
ldiv_t qr;
DEBUG_REQUIRE(prec != 0);
LIB_GETBUF(cp);
secs_u = (u_time)secs;
- fmt = "-%" UTIME_FORMAT ".%0*ld";
/* check if we need signed or unsigned mode */
notneg = (prec < 0);
@@ -92,9 +90,7 @@ format_time_fraction(
/* Get the absolute value of the split representation time. */
notneg = notneg || ((time_t)secs_u >= 0);
- if (notneg) {
- fmt++; /* skip '-' */
- } else {
+ if (!notneg) {
secs_u = ~secs_u;
if (0 == frac)
secs_u++;
@@ -103,7 +99,8 @@ format_time_fraction(
}
/* finally format the data and return the result */
- snprintf(cp, LIB_BUFLENGTH, fmt, secs_u, prec_u, frac);
+ snprintf(cp, LIB_BUFLENGTH, "%s%" UTIME_FORMAT ".%0*ld",
+ notneg? "" : "-", secs_u, prec_u, frac);
return cp;
}
diff --git a/libntp/work_fork.c b/libntp/work_fork.c
index 10329e7..dab02bc 100644
--- a/libntp/work_fork.c
+++ b/libntp/work_fork.c
@@ -382,7 +382,7 @@ fork_blocking_child(
int rc;
int was_pipe;
int is_pipe;
- int saved_errno;
+ int saved_errno = 0;
int childpid;
int keep_fd;
int fd;
diff --git a/libparse/Makefile.am b/libparse/Makefile.am
index a92db15..2988e08 100644
--- a/libparse/Makefile.am
+++ b/libparse/Makefile.am
@@ -1,5 +1,5 @@
NULL=
-BUILT_SOURCES =
+BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER)
CLEANFILES =
noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
EXTRA_LIBRARIES = libparse.a libparse_kernel.a
@@ -12,6 +12,29 @@ K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS
# previously. It is located in $(srcdir) and any updates must
# end up there.
+#
+# VPHACK and VPHACK_AFTER are enabled on non-GNU makes (such as
+# BSD make) to work around build/dependency issues where we want
+# built source files to live in srcdir, as opposed to builddir.
+#
+
+if VPATH_HACK
+VPHACK= vphack
+VPHACK_AFTER= vphack_after
+else
+VPHACK=
+VPHACK_AFTER=
+endif
+
+vphack:
+ test -e info_trimble.c || ln -s $(srcdir)/info_trimble.c .
+
+vphack_after:
+ test -L info_trimble.c || ( \
+ mv info_trimble.c $(srcdir)/info_trimble.c && \
+ ln -s $(srcdir)/info_trimble.c . \
+ )
+
libparse_a_SOURCES = parse.c \
parse_conf.c \
clk_meinberg.c \
@@ -65,11 +88,16 @@ AM_CPPFLAGS += $(CPPFLAGS_NTP)
EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c
-$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
+info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
mv -f info_trimble.new $@
+#$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
+# sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
+# sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
+# mv -f info_trimble.new $@
+
kieee754io.o: $(srcdir)/ieee754io.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@
diff --git a/libparse/Makefile.in b/libparse/Makefile.in
index 0344c96..11dbc38 100644
--- a/libparse/Makefile.in
+++ b/libparse/Makefile.in
@@ -43,8 +43,7 @@ subdir = libparse
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -55,6 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -72,6 +72,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -175,6 +177,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -209,7 +212,9 @@ 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@
@@ -348,6 +353,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
@@ -407,16 +417,27 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-BUILT_SOURCES = check-libntp .deps-ver
+BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER) check-libntp \
+ .deps-ver
CLEANFILES = check-libntp .deps-ver
noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
EXTRA_LIBRARIES = libparse.a libparse_kernel.a
noinst_PROGRAMS = @MAKE_PARSEKMODULE@
K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS
+@VPATH_HACK_FALSE@VPHACK =
# info_trimble.c was mistakenly created in the build directory
# previously. It is located in $(srcdir) and any updates must
# end up there.
+
+#
+# VPHACK and VPHACK_AFTER are enabled on non-GNU makes (such as
+# BSD make) to work around build/dependency issues where we want
+# built source files to live in srcdir, as opposed to builddir.
+#
+@VPATH_HACK_TRUE@VPHACK = vphack
+@VPATH_HACK_FALSE@VPHACK_AFTER =
+@VPATH_HACK_TRUE@VPHACK_AFTER = vphack_after
libparse_a_SOURCES = parse.c \
parse_conf.c \
clk_meinberg.c \
@@ -793,11 +814,25 @@ uninstall-am:
tags uninstall uninstall-am
-$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
+vphack:
+ test -e info_trimble.c || ln -s $(srcdir)/info_trimble.c .
+
+vphack_after:
+ test -L info_trimble.c || ( \
+ mv info_trimble.c $(srcdir)/info_trimble.c && \
+ ln -s $(srcdir)/info_trimble.c . \
+ )
+
+info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
mv -f info_trimble.new $@
+#$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
+# sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
+# sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
+# mv -f info_trimble.new $@
+
kieee754io.o: $(srcdir)/ieee754io.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@
diff --git a/libparse/clk_computime.c b/libparse/clk_computime.c
index 1068576..5026232 100644
--- a/libparse/clk_computime.c
+++ b/libparse/clk_computime.c
@@ -7,15 +7,15 @@
* /src/NTP/ntp4-dev/libparse/clk_computime.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* clk_computime.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* Supports Diem's Computime Radio Clock
- *
+ *
* Used the Meinberg clock as a template for Diem's Computime Radio Clock
*
* adapted by Alois Camenzind <alois.camenzind@ubs.ch>
- *
+ *
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -59,22 +59,22 @@ extern int printf (const char *, ...);
/*
* The Computime receiver sends a datagram in the following format every minute
- *
- * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
+ *
+ * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
* Pos 0123456789012345678901 2 3
* 0000000000111111111122 2 2
* Parse T: : : : : : : rn
- *
- * T Startcharacter "T" specifies start of the timestamp
- * YY Year MM Month 1-12
- * MD Day of the month
- * WD Day of week
- * HH Hour
- * MM Minute
+ *
+ * T Startcharacter "T" specifies start of the timestamp
+ * YY Year MM Month 1-12
+ * MD Day of the month
+ * WD Day of week
+ * HH Hour
+ * MM Minute
* SS Second
- * CR Carriage return
+ * CR Carriage return
* LF Linefeed
- *
+ *
*/
static struct format computime_fmt =
@@ -88,10 +88,10 @@ static struct format computime_fmt =
0
};
-static u_long cvt_computime (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_computime (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_computime;
+static parse_inp_fnc_t inp_computime;
-clockformat_t clock_computime =
+clockformat_t clock_computime =
{
inp_computime, /* Computime input handling */
cvt_computime, /* Computime conversion */
@@ -99,15 +99,15 @@ clockformat_t clock_computime =
(void *)&computime_fmt, /* conversion configuration */
"Diem's Computime Radio Clock", /* Computime Radio Clock */
24, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
};
/*
- * cvt_computime
- *
+ * parse_cvt_fnc_t cvt_computime
+ *
* convert simple type format
*/
-static u_long
+static u_long
cvt_computime(
unsigned char *buffer,
int size,
@@ -117,7 +117,7 @@ cvt_computime(
)
{
- if (!Strok(buffer, format->fixed_string)) {
+ if (!Strok(buffer, format->fixed_string)) {
return CVT_NONE;
} else {
if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
@@ -131,7 +131,7 @@ cvt_computime(
Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
format->field_offsets[O_MIN].length) ||
Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
- format->field_offsets[O_SEC].length)) {
+ format->field_offsets[O_SEC].length)) {
return CVT_FAIL | CVT_BADFMT;
} else {
@@ -144,31 +144,31 @@ cvt_computime(
}
/*
- * inp_computime
+ * parse_inp_fnc_t inp_computime
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_computime(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_computime(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case 'T':
parseprintf(DD_PARSE, ("inp_computime: START seen\n"));
-
+
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
return PARSE_INP_SKIP;
-
+
case '\n':
parseprintf(DD_PARSE, ("inp_computime: END seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
diff --git a/libparse/clk_dcf7000.c b/libparse/clk_dcf7000.c
index bfd9a74..f1da9ef 100644
--- a/libparse/clk_dcf7000.c
+++ b/libparse/clk_dcf7000.c
@@ -1,12 +1,12 @@
/*
* /src/NTP/ntp4-dev/libparse/clk_dcf7000.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* clk_dcf7000.c,v 4.10 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* ELV DCF7000 module
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -63,9 +63,10 @@ static struct format dcf7000_fmt =
},
(const unsigned char *)" - - - - - - - \r",
0
-};
-static u_long cvt_dcf7000 (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_dcf7000 (parse_t *, unsigned int, timestamp_t *);
+};
+
+static parse_cvt_fnc_t cvt_dcf7000;
+static parse_inp_fnc_t inp_dcf7000;
clockformat_t clock_dcf7000 =
{
@@ -75,11 +76,11 @@ clockformat_t clock_dcf7000 =
(void *)&dcf7000_fmt, /* conversion configuration */
"ELV DCF7000", /* ELV clock */
24, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
};
/*
- * cvt_dcf7000
+ * parse_cvt_fnc_t cvt_dcf7000
*
* convert dcf7000 type format
*/
@@ -117,7 +118,7 @@ cvt_dcf7000(
{
unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
long flags;
-
+
clock_time->flags = 0;
clock_time->usecond = 0;
@@ -144,21 +145,21 @@ cvt_dcf7000(
}
/*
- * inp_dcf700
+ * parse_inp_fnc_t inp_dcf700
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_dcf7000(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_dcf7000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case '\r':
diff --git a/libparse/clk_hopf6021.c b/libparse/clk_hopf6021.c
index 033d2d2..357ac2e 100644
--- a/libparse/clk_hopf6021.c
+++ b/libparse/clk_hopf6021.c
@@ -37,10 +37,10 @@
extern int printf (const char *, ...);
#endif
-/*
- * hopf Funkuhr 6021
+/*
+ * hopf Funkuhr 6021
* used with 9600,8N1,
- * UTC ueber serielle Schnittstelle
+ * UTC ueber serielle Schnittstelle
* Sekundenvorlauf ON
* ETX zum Sekundenvorlauf ON
* Datenstring 6021
@@ -71,7 +71,7 @@ extern int printf (const char *, ...);
* x x 0 x - Wintertime
* x x 1 x - Summertime
* 0 0 x x - Time/Date invalid
- * 0 1 x x - Internal clock used
+ * 0 1 x x - Internal clock used
* 1 0 x x - Radio clock
* 1 1 x x - Radio clock highprecision
*
@@ -90,10 +90,10 @@ extern int printf (const char *, ...);
#define HOPF_DSTWARN 0x01 /* DST switch warning */
#define HOPF_DST 0x02 /* DST in effect */
-#define HOPF_MODE 0x0C /* operation mode mask */
+#define HOPF_MODE 0x0C /* operation mode mask */
#define HOPF_INVALID 0x00 /* no time code available */
#define HOPF_INTERNAL 0x04 /* internal clock */
-#define HOPF_RADIO 0x08 /* radio clock */
+#define HOPF_RADIO 0x08 /* radio clock */
#define HOPF_RADIOHP 0x0C /* high precision radio clock */
#define HOPF_UTC 0x08 /* time code in UTC */
@@ -102,13 +102,13 @@ extern int printf (const char *, ...);
static struct format hopf6021_fmt =
{
{
- { 9, 2 }, {11, 2}, { 13, 2}, /* Day, Month, Year */
- { 3, 2 }, { 5, 2}, { 7, 2}, /* Hour, Minute, Second */
+ { 9, 2 }, {11, 2}, { 13, 2}, /* Day, Month, Year */
+ { 3, 2 }, { 5, 2}, { 7, 2}, /* Hour, Minute, Second */
{ 2, 1 }, { 1, 1}, { 0, 0}, /* Weekday, Flags, Zone */
/* ... */
},
(const unsigned char *)"\002 \n\r\003",
- 0
+ 0
};
#define OFFS(x) format->field_offsets[(x)].offset
@@ -118,8 +118,8 @@ static struct format hopf6021_fmt =
('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \
-1)
-static unsigned long cvt_hopf6021 (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_hopf6021 (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_hopf6021;
+static parse_inp_fnc_t inp_hopf6021;
clockformat_t clock_hopf6021 =
{
@@ -132,7 +132,8 @@ clockformat_t clock_hopf6021 =
0 /* private data length, no private data */
};
-static unsigned long
+/* parse_cvt_fnc_t cvt_hopf6021 */
+static u_long
cvt_hopf6021(
unsigned char *buffer,
int size,
@@ -162,8 +163,8 @@ cvt_hopf6021(
clock_time->usecond = 0;
clock_time->utcoffset = 0;
- status = hexval(buffer[OFFS(O_FLAGS)]);
- weekday= hexval(buffer[OFFS(O_WDAY)]);
+ status = (u_char) hexval(buffer[OFFS(O_FLAGS)]);
+ weekday= (u_char) hexval(buffer[OFFS(O_WDAY)]);
if ((status == 0xFF) || (weekday == 0xFF))
{
@@ -213,21 +214,21 @@ cvt_hopf6021(
}
/*
- * inp_hopf6021
+ * parse_inp_fnc_t inp_hopf6021
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_hopf6021(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_hopf6021(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case ETX:
diff --git a/libparse/clk_meinberg.c b/libparse/clk_meinberg.c
index bc0ac0e..4047be5 100644
--- a/libparse/clk_meinberg.c
+++ b/libparse/clk_meinberg.c
@@ -1,12 +1,12 @@
/*
* /src/NTP/REPOSITORY/ntp4-dev/libparse/clk_meinberg.c,v 4.12.2.1 2005/09/25 10:22:35 kardel RELEASE_20050925_A
- *
+ *
* clk_meinberg.c,v 4.12.2.1 2005/09/25 10:22:35 kardel RELEASE_20050925_A
*
* Meinberg clock support
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -65,7 +65,7 @@
/*
* The Meinberg receiver every second sends a datagram of the following form
* (Standard Format)
- *
+ *
* <STX>D:<dd>.<mm>.<yy>;T:<w>;U:<hh>:<mm>:<ss>;<S><F><D><A><ETX>
* pos: 0 00 00 0 00 0 11 111 1 111 12 2 22 2 22 2 2 2 3 3 3
* 1 23 45 6 78 9 01 234 5 678 90 1 23 4 56 7 8 9 0 1 2
@@ -105,12 +105,14 @@
* <A> = '!' during the hour preceeding an daylight saving time
* start/end change
* <L> = 'A' LEAP second announcement
- * <R> = 'R' alternate antenna
+ * <R> = 'R' "call bit" used to signalize irregularities in the control facilities,
+ * usually ' ', until 2003 indicated transmission via alternate antenna
*
- * Meinberg GPS166 receiver
+ * Meinberg GPS receivers
*
- * You must get the Uni-Erlangen firmware for the GPS receiver support
+ * For very old devices you must get the Uni-Erlangen firmware for the GPS receiver support
* to work to full satisfaction !
+ * With newer GPS receiver types the Uni Erlangen string format can be configured at the device.
*
* <STX><dd>.<mm>.<yy>; <w>; <hh>:<mm>:<ss>; <+/-><00:00>; <U><S><F><D><A><L><R><L>; <position...><ETX>
*
@@ -118,7 +120,7 @@
* 123456789012345678901234567890123456789012345678901234567890123456
* \x0209.07.93; 5; 08:48:26; +00:00; #*S!A L; 49.5736N 11.0280E 373m\x03
*
- *
+ *
* <STX> = '\002' ASCII start of text
* <ETX> = '\003' ASCII end of text
* <dd>,<mm>,<yy> = day, month, year(2 digits!!)
@@ -131,8 +133,10 @@
* <A> = '!' during the hour preceeding an daylight saving time
* start/end change
* <L> = 'A' LEAP second announcement
- * <R> = 'R' alternate antenna (reminiscent of PZF535) usually ' '
- * <L> = 'L' on 23:59:60
+ * <R> = 'R' "call bit" used to signalize irregularities in the control facilities,
+ * usually ' ', until 2003 indicated transmission via alternate antenna
+ * (reminiscent of PZF receivers)
+ * <L> = 'L' on 23:59:60
*
* Binary messages have a lead in for a fixed header of SOH
*/
@@ -150,19 +154,20 @@
/* Ret val: the checksum */
/*+-------------------------------------------------------------*/
-unsigned long
+CSUM
mbg_csum(
unsigned char *p,
unsigned int n
)
{
- unsigned long sum = 0;
- short i;
-
+ unsigned int sum = 0;
+ unsigned int i;
+
for ( i = 0; i < n; i++ )
sum += *p++;
-
- return( sum );
+
+ return (CSUM) sum;
+
} /* csum */
void
@@ -171,10 +176,10 @@ get_mbg_header(
GPS_MSG_HDR *headerp
)
{
- headerp->gps_cmd = get_lsb_short(bufpp);
- headerp->gps_len = get_lsb_short(bufpp);
- headerp->gps_data_csum = get_lsb_short(bufpp);
- headerp->gps_hdr_csum = get_lsb_short(bufpp);
+ headerp->cmd = (GPS_CMD) get_lsb_short(bufpp);
+ headerp->len = get_lsb_uint16(bufpp);
+ headerp->data_csum = (CSUM) get_lsb_short(bufpp);
+ headerp->hdr_csum = (CSUM) get_lsb_short(bufpp);
}
static struct format meinberg_fmt[] =
@@ -209,10 +214,10 @@ static struct format meinberg_fmt[] =
}
};
-static u_long cvt_meinberg (unsigned char *, int, struct format *, clocktime_t *, void *);
-static u_long cvt_mgps (unsigned char *, int, struct format *, clocktime_t *, void *);
-static u_long mbg_input (parse_t *, unsigned int, timestamp_t *);
-static u_long gps_input (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_meinberg;
+static parse_cvt_fnc_t cvt_mgps;
+static parse_inp_fnc_t mbg_input;
+static parse_inp_fnc_t gps_input;
struct msg_buf
{
@@ -224,7 +229,7 @@ struct msg_buf
#define MBG_HEADER 1 /* receiving header */
#define MBG_DATA 2 /* receiving data */
#define MBG_STRING 3 /* receiving standard data message */
-
+
clockformat_t clock_meinberg[] =
{
{
@@ -234,7 +239,7 @@ clockformat_t clock_meinberg[] =
0, /* conversion configuration */
"Meinberg Standard", /* Meinberg simple format - beware */
32, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
},
{
mbg_input, /* normal input handling */
@@ -243,21 +248,21 @@ clockformat_t clock_meinberg[] =
0, /* conversion configuration */
"Meinberg Extended", /* Meinberg enhanced format */
32, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
},
{
gps_input, /* no input handling */
- cvt_mgps, /* Meinberg GPS166 conversion */
+ cvt_mgps, /* Meinberg GPS receiver conversion */
pps_one, /* easy PPS monitoring */
(void *)&meinberg_fmt[2], /* conversion configuration */
- "Meinberg GPS Extended", /* Meinberg FAU GPS format */
+ "Meinberg GPS Extended", /* Meinberg FAU GPS format */
512, /* string buffer */
- sizeof(struct msg_buf) /* no private data (complete pakets) */
+ sizeof(struct msg_buf) /* no private data (complete packets) */
}
};
/*
- * cvt_meinberg
+ * parse_cvt_fnc_t cvt_meinberg
*
* convert simple type format
*/
@@ -271,7 +276,7 @@ cvt_meinberg(
)
{
struct format *format;
-
+
/*
* select automagically correct data format
*/
@@ -312,7 +317,7 @@ cvt_meinberg(
else
{
unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
-
+
clock_time->usecond = 0;
clock_time->flags = PARSEB_S_LEAP;
@@ -348,7 +353,7 @@ cvt_meinberg(
case ' ':
clock_time->utcoffset = -1*60*60; /* MET */
break;
-
+
case 'S':
clock_time->utcoffset = -2*60*60; /* MED */
break;
@@ -360,27 +365,27 @@ cvt_meinberg(
clock_time->utcoffset = 0; /* UTC */
clock_time->flags |= PARSEB_UTC;
break;
-
+
default:
return CVT_FAIL|CVT_BADFMT;
}
}
-
+
/*
* gather status flags
*/
if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
clock_time->flags |= PARSEB_DST;
-
+
if (f[0] == '#')
clock_time->flags |= PARSEB_POWERUP;
-
+
if (f[1] == '*')
clock_time->flags |= PARSEB_NOSYNC;
-
+
if (f[3] == '!')
clock_time->flags |= PARSEB_ANNOUNCE;
-
+
/*
* oncoming leap second
* 'a' code not confirmed - earth is not
@@ -388,27 +393,27 @@ cvt_meinberg(
*/
if (f[3] == 'A')
clock_time->flags |= PARSEB_LEAPADD;
-
+
if (f[3] == 'a')
clock_time->flags |= PARSEB_LEAPDEL;
-
-
+
+
if (format->flags & MBG_EXTENDED)
{
clock_time->flags |= PARSEB_S_ANTENNA;
-
+
/*
* DCF77 does not encode the direction -
* so we take the current default -
* earth slowing down
*/
clock_time->flags &= ~PARSEB_LEAPDEL;
-
+
if (f[4] == 'A')
clock_time->flags |= PARSEB_LEAPADD;
-
+
if (f[5] == 'R')
- clock_time->flags |= PARSEB_ALTERNATE;
+ clock_time->flags |= PARSEB_CALLBIT;
}
return CVT_OK;
}
@@ -416,31 +421,31 @@ cvt_meinberg(
/*
- * mbg_input
+ * parse_inp_fnc_t mbg_input
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
mbg_input(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("mbg_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case STX:
parseprintf(DD_PARSE, ("mbg_input: STX seen\n"));
-
+
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
return PARSE_INP_SKIP;
-
+
case ETX:
parseprintf(DD_PARSE, ("mbg_input: ETX seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
@@ -455,7 +460,7 @@ mbg_input(
/*
- * cvt_mgps
+ * parse_cvt_fnc_t cvt_mgps
*
* convert Meinberg GPS format
*/
@@ -493,9 +498,9 @@ cvt_mgps(
{
long h;
unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
-
+
clock_time->flags = PARSEB_S_LEAP|PARSEB_S_POSITION;
-
+
clock_time->usecond = 0;
/*
@@ -522,22 +527,22 @@ cvt_mgps(
clock_time->utcoffset = -clock_time->utcoffset;
}
}
-
+
/*
* gather status flags
*/
if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
clock_time->flags |= PARSEB_DST;
-
+
if (clock_time->utcoffset == 0)
clock_time->flags |= PARSEB_UTC;
-
+
/*
* no sv's seen - no time & position
*/
if (f[0] == '#')
clock_time->flags |= PARSEB_POWERUP;
-
+
/*
* at least one sv seen - time (for last position)
*/
@@ -546,13 +551,13 @@ cvt_mgps(
else
if (!(clock_time->flags & PARSEB_POWERUP))
clock_time->flags |= PARSEB_POSITION;
-
+
/*
* oncoming zone switch
*/
if (f[3] == '!')
clock_time->flags |= PARSEB_ANNOUNCE;
-
+
/*
* oncoming leap second
* 'a' code not confirmed - earth is not
@@ -560,14 +565,14 @@ cvt_mgps(
*/
if (f[4] == 'A')
clock_time->flags |= PARSEB_LEAPADD;
-
+
if (f[4] == 'a')
clock_time->flags |= PARSEB_LEAPDEL;
/*
* f[5] == ' '
*/
-
+
/*
* this is the leap second
*/
@@ -580,35 +585,35 @@ cvt_mgps(
}
/*
- * gps_input
+ * parse_inp_fnc_t gps_input
*
* grep binary data from input stream
*/
static u_long
gps_input(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
CSUM calc_csum; /* used to compare the incoming csums */
GPS_MSG_HDR header;
struct msg_buf *msg_buf;
-
+
msg_buf = (struct msg_buf *)parseio->parse_pdata;
parseprintf(DD_PARSE, ("gps_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
if (!msg_buf)
return PARSE_INP_SKIP;
-
+
if ( msg_buf->phase == MBG_NONE )
{ /* not receiving yet */
switch (ch)
{
case SOH:
parseprintf(DD_PARSE, ("gps_input: SOH seen\n"));
-
+
msg_buf->len = sizeof( header ); /* prepare to receive msg header */
msg_buf->phase = MBG_HEADER; /* receiving header */
break;
@@ -621,7 +626,7 @@ gps_input(
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
break;
-
+
default:
return PARSE_INP_SKIP; /* keep searching */
}
@@ -638,7 +643,7 @@ gps_input(
if ((msg_buf->phase == MBG_STRING) &&
(parseio->parse_index < parseio->parse_dsize))
parseio->parse_data[parseio->parse_index++] = ch;
-
+
parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
if (parseio->parse_dtime.parse_msglen > sizeof(parseio->parse_dtime.parse_msg))
@@ -649,7 +654,7 @@ gps_input(
parseio->parse_ldsize = parseio->parse_index;
return PARSE_INP_DATA;
}
-
+
switch (msg_buf->phase)
{
case MBG_HEADER:
@@ -685,41 +690,41 @@ gps_input(
if ( msg_buf->phase == MBG_HEADER )
{ /* header complete now */
unsigned char *datap = parseio->parse_dtime.parse_msg + 1;
-
+
get_mbg_header(&datap, &header);
-
+
parseprintf(DD_PARSE, ("gps_input: header: cmd 0x%x, len %d, dcsum 0x%x, hcsum 0x%x\n",
- (int)header.gps_cmd, (int)header.gps_len, (int)header.gps_data_csum,
- (int)header.gps_hdr_csum));
-
+ (int)header.cmd, (int)header.len, (int)header.data_csum,
+ (int)header.hdr_csum));
+
calc_csum = mbg_csum( (unsigned char *) parseio->parse_dtime.parse_msg + 1, (unsigned short)6 );
- if ( calc_csum != header.gps_hdr_csum )
+ if ( calc_csum != header.hdr_csum )
{
parseprintf(DD_PARSE, ("gps_input: header checksum mismatch expected 0x%x, got 0x%x\n",
(int)calc_csum, (int)mbg_csum( (unsigned char *) parseio->parse_dtime.parse_msg, (unsigned short)6 )));
-
+
msg_buf->phase = MBG_NONE; /* back to hunting mode */
return PARSE_INP_DATA; /* invalid header checksum received - pass up for detection */
}
- if ((header.gps_len == 0) || /* no data to wait for */
- (header.gps_len >= (sizeof (parseio->parse_dtime.parse_msg) - sizeof(header) - 1))) /* blows anything we have space for */
+ if ((header.len == 0) || /* no data to wait for */
+ (header.len >= (sizeof (parseio->parse_dtime.parse_msg) - sizeof(header) - 1))) /* blows anything we have space for */
{
msg_buf->phase = MBG_NONE; /* back to hunting mode */
- return (header.gps_len == 0) ? PARSE_INP_DATA : PARSE_INP_SKIP; /* message complete/throwaway */
+ return (header.len == 0) ? PARSE_INP_DATA : PARSE_INP_SKIP; /* message complete/throwaway */
}
-
- parseprintf(DD_PARSE, ("gps_input: expecting %d bytes of data message\n", (int)header.gps_len));
-
- msg_buf->len = header.gps_len;/* save number of bytes to wait for */
+
+ parseprintf(DD_PARSE, ("gps_input: expecting %d bytes of data message\n", (int)header.len));
+
+ msg_buf->len = header.len;/* save number of bytes to wait for */
msg_buf->phase = MBG_DATA; /* flag header already complete */
return PARSE_INP_SKIP;
}
parseprintf(DD_PARSE, ("gps_input: message data complete\n"));
-
+
/* Header and data have been received. The header checksum has been */
/* checked */
diff --git a/libparse/clk_rawdcf.c b/libparse/clk_rawdcf.c
index 98848be..132fbc3 100644
--- a/libparse/clk_rawdcf.c
+++ b/libparse/clk_rawdcf.c
@@ -1,12 +1,12 @@
/*
* /src/NTP/REPOSITORY/ntp4-dev/libparse/clk_rawdcf.c,v 4.18 2006/06/22 18:40:01 kardel RELEASE_20060622_A
- *
+ *
* clk_rawdcf.c,v 4.18 2006/06/22 18:40:01 kardel RELEASE_20060622_A
*
* Raw DCF77 pulse clock support
*
* Copyright (c) 1995-2006 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -75,7 +75,8 @@
* Second Contents
* 0 - 10 AM: free, FM: 0
* 11 - 14 free
- * 15 R - alternate antenna
+ * 15 R - "call bit" used to signalize irregularities in the control facilities
+ * (until 2003 indicated transmission via alternate antenna)
* 16 A1 - expect zone change (1 hour before)
* 17 - 18 Z1,Z2 - time zone
* 0 0 illegal
@@ -101,9 +102,9 @@
* 59 - usually missing (minute indication), except for leap insertion
*/
-static u_long pps_rawdcf (parse_t *, int, timestamp_t *);
-static u_long cvt_rawdcf (unsigned char *, int, struct format *, clocktime_t *, void *);
-static u_long inp_rawdcf (parse_t *, unsigned int, timestamp_t *);
+static parse_pps_fnc_t pps_rawdcf;
+static parse_cvt_fnc_t cvt_rawdcf;
+static parse_inp_fnc_t inp_rawdcf;
typedef struct last_tcode {
time_t tcode; /* last converted time code */
@@ -125,15 +126,15 @@ clockformat_t clock_rawdcf =
static struct dcfparam
{
- unsigned char *onebits;
- unsigned char *zerobits;
-} dcfparameter =
+ const unsigned char *onebits;
+ const unsigned char *zerobits;
+} dcfparameter =
{
- (unsigned char *)"###############RADMLS1248124P124812P1248121241248112481248P??", /* 'ONE' representation */
- (unsigned char *)"--------------------s-------p------p----------------------p__" /* 'ZERO' representation */
+ (const unsigned char *)"###############RADMLS1248124P124812P1248121241248112481248P??", /* 'ONE' representation */
+ (const unsigned char *)"--------------------s-------p------p----------------------p__" /* 'ZERO' representation */
};
-static struct rawdcfcode
+static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@@ -182,14 +183,14 @@ static u_long
ext_bf(
unsigned char *buf,
int idx,
- unsigned char *zero
+ const unsigned char *zero
)
{
u_long sum = 0;
int i, first;
first = rawdcfcode[idx].offset;
-
+
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@@ -202,7 +203,7 @@ static unsigned
pcheck(
unsigned char *buf,
int idx,
- unsigned char *zero
+ const unsigned char *zero
)
{
int i,last;
@@ -225,8 +226,8 @@ convert_rawdcf(
)
{
unsigned char *s = buffer;
- unsigned char *b = dcfprm->onebits;
- unsigned char *c = dcfprm->zerobits;
+ const unsigned char *b = dcfprm->onebits;
+ const unsigned char *c = dcfprm->zerobits;
int i;
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: \"%s\"\n", buffer));
@@ -238,7 +239,7 @@ convert_rawdcf(
#endif
return CVT_NONE;
}
-
+
for (i = 0; i < size; i++)
{
if ((*s != *b) && (*s != *c))
@@ -307,7 +308,7 @@ convert_rawdcf(
clock_time->flags |= PARSEB_LEAPADD; /* default: DCF77 data format deficiency */
if (ext_bf(buffer, DCF_R, dcfprm->zerobits))
- clock_time->flags |= PARSEB_ALTERNATE;
+ clock_time->flags |= PARSEB_CALLBIT;
parseprintf(DD_RAWDCF,("parse: convert_rawdcf: TIME CODE OK: %d:%d, %d.%d.%d, flags 0x%lx\n",
(int)clock_time->hour, (int)clock_time->minute, (int)clock_time->day, (int)clock_time->month,(int) clock_time->year,
@@ -327,6 +328,7 @@ convert_rawdcf(
}
/*
+ * parse_cvt_fnc_t cvt_rawdcf
* raw dcf input routine - needs to fix up 50 baud
* characters for 1/0 decision
*/
@@ -342,8 +344,8 @@ cvt_rawdcf(
last_tcode_t *t = (last_tcode_t *)local;
unsigned char *s = (unsigned char *)buffer;
unsigned char *e = s + size;
- unsigned char *b = dcfparameter.onebits;
- unsigned char *c = dcfparameter.zerobits;
+ const unsigned char *b = dcfparameter.onebits;
+ const unsigned char *c = dcfparameter.zerobits;
u_long rtc = CVT_NONE;
unsigned int i, lowmax, highmax, cutoff, span;
#define BITS 9
@@ -379,7 +381,7 @@ cvt_rawdcf(
ch >>= 1;
}
- *s = i;
+ *s = (unsigned char) i;
histbuf[i]++;
cutoff += i;
lowmax++;
@@ -504,12 +506,12 @@ cvt_rawdcf(
}
}
}
-
+
return rtc;
}
/*
- * pps_rawdcf
+ * parse_pps_fnc_t pps_rawdcf
*
* currently a very stupid version - should be extended to decode
* also ones and zeros (which is easy)
@@ -546,30 +548,30 @@ snt_rawdcf(
#else
parseio->parse_dtime.parse_time.fp.l_ui++;
#endif
-
+
parseprintf(DD_RAWDCF,("parse: snt_rawdcf: time stamp synthesized offset %d seconds\n", parseio->parse_index - 1));
-
+
return updatetimeinfo(parseio, parseio->parse_lstate);
}
return CVT_NONE;
}
/*
- * inp_rawdcf
+ * parse_inp_fnc_t inp_rawdcf
*
* grab DCF77 data from input stream
*/
static u_long
inp_rawdcf(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
static struct timeval timeout = { 1, 500000 }; /* 1.5 secongs denote second #60 */
-
+
parseprintf(DD_PARSE, ("inp_rawdcf(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
if (parse_timedout(parseio, tstamp, &timeout))
@@ -583,7 +585,7 @@ inp_rawdcf(
else
{
unsigned int rtc;
-
+
rtc = parse_addchar(parseio, ch);
if (rtc == PARSE_INP_SKIP)
{
diff --git a/libparse/clk_rcc8000.c b/libparse/clk_rcc8000.c
index 6dca166..a690e58 100644
--- a/libparse/clk_rcc8000.c
+++ b/libparse/clk_rcc8000.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/ntp4-dev/libparse/clk_rcc8000.c,v 4.9 2004/11/14 15:29:41 kardel RELEASE_20050508_A
- *
+ *
* clk_rcc8000.c,v 4.9 2004/11/14 15:29:41 kardel RELEASE_20050508_A
*
* Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support
@@ -49,16 +49,16 @@ extern int printf (const char *, ...);
#define O_USEC O_WDAY
static struct format rcc8000_fmt =
-{ { { 13, 2 }, {16, 2}, { 19, 2}, /* Day, Month, Year */
- { 0, 2 }, { 3, 2}, { 6, 2}, /* Hour, Minute, Second */
+{ { { 13, 2 }, {16, 2}, { 19, 2}, /* Day, Month, Year */
+ { 0, 2 }, { 3, 2}, { 6, 2}, /* Hour, Minute, Second */
{ 9, 3 }, {28, 1}, { 0, 0}, /* uSec, Status (Valid,Reject,BST,Leapyear) */ },
- (const unsigned char *)" : : . / / \r\n",
+ (const unsigned char *)" : : . / / \r\n",
/*"15:50:36.534 30/09/94 273 5 A\x0d\x0a" */
- 0
+ 0
};
-static unsigned long cvt_rcc8000 (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_rcc8000 (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_rcc8000;
+static parse_inp_fnc_t inp_rcc8000;
clockformat_t clock_rcc8000 =
{
@@ -71,7 +71,8 @@ clockformat_t clock_rcc8000 =
0 /* no private data */
};
-static unsigned long
+/* parse_cvt_fnc_t cvt_rcc8000 */
+static u_long
cvt_rcc8000(
unsigned char *buffer,
int size,
@@ -121,27 +122,27 @@ cvt_rcc8000(
clock_time->flags |= PARSEB_POWERUP;
clock_time->flags |= PARSEB_UTC; /* British special - guess why 8-) */
-
+
/* other flags not used */
}
return CVT_OK;
}
/*
- * inp_rcc8000
+ * parse_inp_fnc_t inp_rcc8000
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_rcc8000(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_rcc8000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case '\n':
@@ -150,7 +151,7 @@ inp_rcc8000(
return parse_end(parseio);
else
return rtc;
-
+
default:
if (parseio->parse_index == 0) /* take sample at start of message */
diff --git a/libparse/clk_schmid.c b/libparse/clk_schmid.c
index 045f0fc..5e303b9 100644
--- a/libparse/clk_schmid.c
+++ b/libparse/clk_schmid.c
@@ -1,13 +1,13 @@
/*
* /src/NTP/ntp4-dev/libparse/clk_schmid.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* clk_schmid.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* Schmid clock support
* based on information and testing from Adam W. Feigin et. al (Swisstime iis.ethz.ch)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,7 +61,7 @@ extern int printf (const char *, ...);
* The command to Schmid's DCF77 clock is a single byte; each bit
* allows the user to select some part of the time string, as follows (the
* output for the lsb is sent first).
- *
+ *
* Bit 0: time in MEZ, 4 bytes *binary, not BCD*; hh.mm.ss.tenths
* Bit 1: date 3 bytes *binary, not BCD: dd.mm.yy
* Bit 2: week day, 1 byte (unused here)
@@ -82,15 +82,15 @@ extern int printf (const char *, ...);
#define WS_TIME 0x01
#define WS_SIGNAL 0x02
-#define WS_ALTERNATE 0x01
+#define WS_CALLBIT 0x01 /* "call bit" used to signalize irregularities in the control facilities */
#define WS_ANNOUNCE 0x02
#define WS_TZ 0x0c
#define WS_MET 0x08
#define WS_MEST 0x04
#define WS_LEAP 0x10
-static u_long cvt_schmid (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_schmid (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_schmid;
+static parse_inp_fnc_t inp_schmid;
clockformat_t clock_schmid =
{
@@ -103,7 +103,7 @@ clockformat_t clock_schmid =
0, /* no private data (complete messages) */
};
-
+/* parse_cvt_fnc_t */
static u_long
cvt_schmid(
unsigned char *buffer,
@@ -155,7 +155,7 @@ cvt_schmid(
default:
return CVT_FAIL|CVT_BADFMT;
}
-
+
if (!(buffer[7] & WS_TIME))
{
clock_time->flags |= PARSEB_POWERUP;
@@ -168,9 +168,9 @@ cvt_schmid(
if (buffer[7] & WS_SIGNAL)
{
- if (buffer[8] & WS_ALTERNATE)
+ if (buffer[8] & WS_CALLBIT)
{
- clock_time->flags |= PARSEB_ALTERNATE;
+ clock_time->flags |= PARSEB_CALLBIT;
}
if (buffer[8] & WS_ANNOUNCE)
@@ -185,32 +185,32 @@ cvt_schmid(
}
clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_ANTENNA;
-
+
return CVT_OK;
}
}
}
/*
- * inp_schmid
+ * parse_inp_fnc_t inp_schmid
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_schmid(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_schmid(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
+
+ switch ((uint8_t)ch)
{
case 0xFD: /* */
- parseprintf(DD_PARSE, ("mbg_input: ETX seen\n"));
+ parseprintf(DD_PARSE, ("inp_schmid: 0xFD seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
return parse_end(parseio);
else
diff --git a/libparse/clk_sel240x.c b/libparse/clk_sel240x.c
index a09d347..b1390b4 100644
--- a/libparse/clk_sel240x.c
+++ b/libparse/clk_sel240x.c
@@ -3,7 +3,7 @@
// Schweitzer Engineering Laboratories, Inc. <opensource@selinc.com>
//////////////////////////////////////////////////////////////////////////////
-// Need to have _XOPEN_SOURCE defined for time.h to give the
+// Need to have _XOPEN_SOURCE defined for time.h to give the
// correct strptime signature. As per feature_test_macros(7),
// define this before including any header files.
@@ -51,14 +51,8 @@
// a '?'. But we are only going to call it synced when we receive a ' '
//////////////////////////////////////////////////////////////////////////////
-static unsigned long inp_sel240x( parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp);
-static unsigned long cvt_sel240x( unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local );
+static parse_inp_fnc_t inp_sel240x;
+static parse_cvt_fnc_t cvt_sel240x;
// Parse clock format structure describing the message above
static struct format sel240x_fmt =
@@ -94,7 +88,7 @@ clockformat_t clock_sel240x =
//////////////////////////////////////////////////////////////////////////////
static unsigned long
inp_sel240x( parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
@@ -139,7 +133,7 @@ cvt_sel240x( unsigned char *buffer,
{
struct tm ptime;
buffer++;
- buffer = (unsigned char *) strptime(
+ buffer = (unsigned char *) strptime(
(const char *)buffer, "%Y:%j:%H:%M:%S", &ptime );
if( *(buffer+1) != '\x0d' )
{
diff --git a/libparse/clk_trimtaip.c b/libparse/clk_trimtaip.c
index 322d0fa..426e897 100644
--- a/libparse/clk_trimtaip.c
+++ b/libparse/clk_trimtaip.c
@@ -6,7 +6,7 @@
* Trimble SV6 clock support - several collected codepieces
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -78,8 +78,8 @@ extern int printf (const char *, ...);
0
};
-static unsigned long cvt_trimtaip (unsigned char *, int, struct format *, clocktime_t *, void *);
-static unsigned long inp_trimtaip (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_trimtaip;
+static parse_inp_fnc_t inp_trimtaip;
clockformat_t clock_trimtaip =
{
@@ -92,7 +92,8 @@ clockformat_t clock_trimtaip =
0 /* no private data */
};
-static unsigned long
+/* parse_cvt_fnc_t cvt_trimtaip */
+static u_long
cvt_trimtaip(
unsigned char *buffer,
int size,
@@ -141,31 +142,31 @@ cvt_trimtaip(
}
/*
- * inp_trimtaip
+ * parse_inp_fnc_t inp_trimtaip
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_trimtaip(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
unsigned int rtc;
-
+
parseprintf(DD_PARSE, ("inp_trimtaip(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
+
switch (ch)
{
case '>':
parseprintf(DD_PARSE, ("inp_trimptaip: START seen\n"));
-
+
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
return PARSE_INP_SKIP;
-
+
case '<':
parseprintf(DD_PARSE, ("inp_trimtaip: END seen\n"));
if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
diff --git a/libparse/clk_trimtsip.c b/libparse/clk_trimtsip.c
index 743e39c..6c71d75 100644
--- a/libparse/clk_trimtsip.c
+++ b/libparse/clk_trimtsip.c
@@ -7,7 +7,7 @@
* Thanks to Sven Dietrich for providing test hardware
*
* Copyright (c) 1995-2009 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -116,7 +116,7 @@ struct trimble
#define STATUS_UNSAFE 1 /* not enough receivers for full precision */
#define STATUS_SYNC 2 /* enough information for good operation */
-static unsigned long inp_tsip (parse_t *, unsigned int, timestamp_t *);
+static unsigned long inp_tsip (parse_t *, char, timestamp_t *);
static unsigned long cvt_trimtsip (unsigned char *, int, struct format *, clocktime_t *, void *);
struct clockformat clock_trimtsip =
@@ -136,7 +136,7 @@ struct clockformat clock_trimtsip =
static unsigned long
inp_tsip(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
@@ -183,7 +183,7 @@ inp_tsip(
/* DLE,ETX -> end of packet */
parseio->parse_data[parseio->parse_index++] = DLE;
parseio->parse_data[parseio->parse_index] = ch;
- parseio->parse_ldsize = parseio->parse_index+1;
+ parseio->parse_ldsize = (u_short) (parseio->parse_index + 1);
memcpy(parseio->parse_ldata, parseio->parse_data, parseio->parse_ldsize);
parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = DLE;
parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
@@ -200,13 +200,13 @@ inp_tsip(
return PARSE_INP_SKIP;
}
-
-static int
+
+static short
getshort(
unsigned char *p
)
{
- return get_msb_short(&p);
+ return (short) get_msb_short(&p);
}
/*
@@ -245,7 +245,7 @@ cvt_trimtsip(
{
unsigned char *bp;
cmd = buffer[1];
-
+
switch(cmd)
{
case CMD_RCURTIME:
@@ -258,15 +258,15 @@ cvt_trimtsip(
bp = &mb(0);
if (fetch_ieee754(&bp, IEEE_SINGLE, &secs, trim_offsets) != IEEE_OK)
return CVT_FAIL|CVT_BADFMT;
-
+
if ((secs.l_i <= 0) ||
(t->t_utcknown == 0))
{
clock_time->flags = PARSEB_POWERUP;
return CVT_OK;
}
- if (week < 990) {
- week += 1024;
+ if (week < GPSWRAP) {
+ week += GPSWEEKS;
}
/* time OK */
@@ -275,7 +275,7 @@ cvt_trimtsip(
bp = &mb(6);
if (fetch_ieee754(&bp, IEEE_SINGLE, &utcoffset, trim_offsets) != IEEE_OK)
return CVT_FAIL|CVT_BADFMT;
-
+
L_SUB(&secs, &utcoffset); /* adjust GPS time to UTC time */
gpstolfp((unsigned short)week, (unsigned short)0,
@@ -289,10 +289,10 @@ cvt_trimtsip(
if (t->t_leap == ADDSECOND)
clock_time->flags |= PARSEB_LEAPADD;
-
+
if (t->t_leap == DELSECOND)
clock_time->flags |= PARSEB_LEAPDEL;
-
+
switch (t->t_operable)
{
case STATUS_SYNC:
@@ -307,12 +307,12 @@ cvt_trimtsip(
clock_time->flags |= PARSEB_NOSYNC|PARSEB_POWERUP;
break;
}
-
+
if (t->t_mode == 0)
clock_time->flags |= PARSEB_POSITION;
-
+
clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_POSITION;
-
+
return CVT_OK;
} /* case 0x41 */
@@ -346,26 +346,26 @@ cvt_trimtsip(
{
l_fp t0t;
unsigned char *lbp;
-
+
/* UTC correction data - derive a leap warning */
- int tls = t->t_gpsutc = getshort((unsigned char *)&mb(12)); /* current leap correction (GPS-UTC) */
- int tlsf = t->t_gpsutcleap = getshort((unsigned char *)&mb(24)); /* new leap correction */
-
- t->t_weekleap = getshort((unsigned char *)&mb(20)); /* week no of leap correction */
- if (t->t_weekleap < 990)
- t->t_weekleap += 1024;
-
- t->t_dayleap = getshort((unsigned char *)&mb(22)); /* day in week of leap correction */
- t->t_week = getshort((unsigned char *)&mb(18)); /* current week no */
- if (t->t_week < 990)
- t->t_week += 1024;
-
+ int tls = t->t_gpsutc = (u_short) getshort((unsigned char *)&mb(12)); /* current leap correction (GPS-UTC) */
+ int tlsf = t->t_gpsutcleap = (u_short) getshort((unsigned char *)&mb(24)); /* new leap correction */
+
+ t->t_weekleap = (u_short) getshort((unsigned char *)&mb(20)); /* week no of leap correction */
+ if (t->t_weekleap < GPSWRAP)
+ t->t_weekleap = (u_short)(t->t_weekleap + GPSWEEKS);
+
+ t->t_dayleap = (u_short) getshort((unsigned char *)&mb(22)); /* day in week of leap correction */
+ t->t_week = (u_short) getshort((unsigned char *)&mb(18)); /* current week no */
+ if (t->t_week < GPSWRAP)
+ t->t_week = (u_short)(t->t_weekleap + GPSWEEKS);
+
lbp = (unsigned char *)&mb(14); /* last update time */
if (fetch_ieee754(&lbp, IEEE_SINGLE, &t0t, trim_offsets) != IEEE_OK)
return CVT_FAIL|CVT_BADFMT;
t->t_utcknown = t0t.l_ui != 0;
-
+
if ((t->t_utcknown) && /* got UTC information */
(tlsf != tls) && /* something will change */
((t->t_weekleap - t->t_week) < 5)) /* and close in the future */
diff --git a/libparse/clk_varitext.c b/libparse/clk_varitext.c
index 295ce0a..022549e 100644
--- a/libparse/clk_varitext.c
+++ b/libparse/clk_varitext.c
@@ -9,14 +9,14 @@
* clk_varitext.c,v 1.5 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* Varitext code variant by A.McConnell 1997/01/19
- *
+ *
* Supports Varitext's Radio Clock
- *
+ *
* Used the Meinberg/Computime clock as a template for Varitext Radio Clock
*
* Codebase:
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -67,31 +67,31 @@ static const u_char VT_LAST_TELEGRAM_OK = 0x20;
/*
* The Varitext receiver sends a datagram in the following format every minute
- *
- * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLFSTXXX
+ *
+ * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLFSTXXX
* Pos 0123456789012345678901 2 3 4567
* 0000000000111111111122 2 2 2222
- * Parse T: : : : : : : \r\n
- *
- * T Startcharacter "T" specifies start of the timestamp
- * YY Year MM Month 1-12
- * MD Day of the month
- * WD Day of week
- * HH Hour
- * MM Minute
- * SS Second
- * CR Carriage return
- * LF Linefeed
+ * Parse T: : : : : : : \r\n
+ *
+ * T Startcharacter "T" specifies start of the timestamp
+ * YY Year MM Month 1-12
+ * MD Day of the month
+ * WD Day of week
+ * HH Hour
+ * MM Minute
+ * SS Second
+ * CR Carriage return
+ * LF Linefeed
* ST Status character
* Bit 0 - Set= Initialised; Reset=Time Invalid (DO NOT USE)
- * Bit 1 - Set= Synchronised; Reset= Unsynchronised
- * Bit 2 - Set= Alarm state; Reset= No alarm
- * Bit 3 - Set= BST; Reset= GMT
- * Bit 4 - Set= Seasonal change in approx hour; Reset= No seasonal change expected
+ * Bit 1 - Set= Synchronised; Reset= Unsynchronised
+ * Bit 2 - Set= Alarm state; Reset= No alarm
+ * Bit 3 - Set= BST; Reset= GMT
+ * Bit 4 - Set= Seasonal change in approx hour; Reset= No seasonal change expected
* Bit 5 - Set= Last MSF telegram was OK; Reset= Last telegram was in error;
- * Bit 6 - Always set
+ * Bit 6 - Always set
* Bit 7 - Unused
- * XXX Checksum calculated using Fletcher's method (ignored for now).
+ * XXX Checksum calculated using Fletcher's method (ignored for now).
*/
static struct format varitext_fmt =
@@ -105,8 +105,8 @@ static struct format varitext_fmt =
0
};
-static u_long cvt_varitext (unsigned char *, int, struct format *, clocktime_t *, void *);
-static u_long inp_varitext (parse_t *, unsigned int, timestamp_t *);
+static parse_cvt_fnc_t cvt_varitext;
+static parse_inp_fnc_t inp_varitext;
struct varitext {
unsigned char start_found;
@@ -128,11 +128,11 @@ clockformat_t clock_varitext =
};
/*
- * cvt_varitext
- *
+ * parse_cvt_fnc_t cvt_varitext
+ *
* convert simple type format
*/
-static u_long
+static u_long
cvt_varitext(
unsigned char *buffer,
int size,
@@ -142,7 +142,7 @@ cvt_varitext(
)
{
- if (!Strok(buffer, format->fixed_string)) {
+ if (!Strok(buffer, format->fixed_string)) {
return CVT_NONE;
} else {
if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
@@ -156,7 +156,7 @@ cvt_varitext(
Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
format->field_offsets[O_MIN].length) ||
Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
- format->field_offsets[O_SEC].length)) {
+ format->field_offsets[O_SEC].length)) {
return CVT_FAIL | CVT_BADFMT;
} else {
u_char *f = (u_char*) &buffer[format->field_offsets[O_FLAGS].offset];
@@ -170,24 +170,25 @@ cvt_varitext(
clock_time->flags |= PARSEB_DST;
}
/*
- if (!((*f) & VT_INITIALISED)) Clock not initialised
+ if (!((*f) & VT_INITIALISED)) Clock not initialised
clock_time->flags |= PARSEB_POWERUP;
-
- if (!((*f) & VT_SYNCHRONISED)) Clock not synchronised
+
+ if (!((*f) & VT_SYNCHRONISED)) Clock not synchronised
clock_time->flags |= PARSEB_NOSYNC;
-
- if (((*f) & VT_SEASON_CHANGE)) Seasonal change expected in the next hour
+
+ if (((*f) & VT_SEASON_CHANGE)) Seasonal change expected in the next hour
clock_time->flags |= PARSEB_ANNOUNCE;
*/
- return CVT_OK;
+ return CVT_OK;
}
}
}
-static u_long
+/* parse_inp_fnc_t inp_varitext */
+static u_long
inp_varitext(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
@@ -196,10 +197,10 @@ inp_varitext(
parseprintf(DD_PARSE, ("inp_varitext(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
- if (!t)
+ if (!t)
return PARSE_INP_SKIP; /* local data not allocated - sigh! */
- if (ch == 'T')
+ if (ch == 'T')
t->tstamp = *tstamp;
if ((t->previous_ch == 'T') && (ch == ':'))
@@ -224,7 +225,7 @@ inp_varitext(
return rtc;
}
- if (t->end_found)
+ if (t->end_found)
{
if (++(t->end_count) == 4) /* Finally found the end of the message */
{
@@ -235,16 +236,16 @@ inp_varitext(
return parse_end(parseio);
else
return rtc;
- }
+ }
}
- if ((t->previous_ch == '\r') && (ch == '\n'))
+ if ((t->previous_ch == '\r') && (ch == '\n'))
{
t->end_found = 1;
}
}
-
+
t->previous_ch = ch;
return PARSE_INP_SKIP;
diff --git a/libparse/clk_wharton.c b/libparse/clk_wharton.c
index 55ab43a..a65bc53 100644
--- a/libparse/clk_wharton.c
+++ b/libparse/clk_wharton.c
@@ -74,8 +74,11 @@ extern void printf (const char *, ...);
*
*/
+static parse_cvt_fnc_t cvt_wharton_400a;
+static parse_inp_fnc_t inp_wharton_400a;
+
/*
- * cvt_wharton_400a
+ * parse_cvt_fnc_t cvt_wharton_400a
*
* convert simple type format
*/
@@ -121,14 +124,14 @@ cvt_wharton_400a(
}
/*
- * inp_wharton_400a
+ * parse_inp_fnc_t inp_wharton_400a
*
- * grep data from input stream
+ * grab data from input stream
*/
static u_long
inp_wharton_400a(
parse_t *parseio,
- unsigned int ch,
+ char ch,
timestamp_t *tstamp
)
{
@@ -166,7 +169,7 @@ clockformat_t clock_wharton_400a =
0, /* conversion configuration */
"WHARTON 400A Series clock Output Format 1", /* String format name */
15, /* string buffer */
- 0 /* no private data (complete pakets) */
+ 0 /* no private data (complete packets) */
};
#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_WHARTON_400A) */
diff --git a/libparse/data_mbg.c b/libparse/data_mbg.c
index 97bef35..0b3808c 100644
--- a/libparse/data_mbg.c
+++ b/libparse/data_mbg.c
@@ -43,6 +43,7 @@
#include "ntp_types.h"
#include "ntp_stdlib.h"
#include "ntp_fp.h"
+#include "ntp_calendar.h"
#include "mbg_gps166.h"
#include "binio.h"
#include "ieee754io.h"
@@ -63,10 +64,10 @@ put_mbg_header(
GPS_MSG_HDR *headerp
)
{
- put_lsb_short(bufpp, headerp->gps_cmd);
- put_lsb_short(bufpp, headerp->gps_len);
- put_lsb_short(bufpp, headerp->gps_data_csum);
- put_lsb_short(bufpp, headerp->gps_hdr_csum);
+ put_lsb_short(bufpp, headerp->cmd);
+ put_lsb_short(bufpp, headerp->len);
+ put_lsb_short(bufpp, headerp->data_csum);
+ put_lsb_short(bufpp, headerp->hdr_csum);
}
void
@@ -75,7 +76,7 @@ get_mbg_sw_rev(
SW_REV *sw_revp
)
{
- sw_revp->code = get_lsb_short(bufpp);
+ sw_revp->code = get_lsb_uint16(bufpp);
memcpy(sw_revp->name, *bufpp, sizeof(sw_revp->name));
*bufpp += sizeof(sw_revp->name);
}
@@ -86,8 +87,8 @@ get_mbg_ascii_msg(
ASCII_MSG *ascii_msgp
)
{
- ascii_msgp->csum = get_lsb_short(bufpp);
- ascii_msgp->valid = get_lsb_short(bufpp);
+ ascii_msgp->csum = (CSUM) get_lsb_short(bufpp);
+ ascii_msgp->valid = get_lsb_int16(bufpp);
memcpy(ascii_msgp->s, *bufpp, sizeof(ascii_msgp->s));
*bufpp += sizeof(ascii_msgp->s);
}
@@ -98,7 +99,7 @@ get_mbg_svno(
SVNO *svnop
)
{
- *svnop = get_lsb_short(bufpp);
+ *svnop = (SVNO) get_lsb_short(bufpp);
}
void
@@ -107,7 +108,7 @@ get_mbg_health(
HEALTH *healthp
)
{
- *healthp = get_lsb_short(bufpp);
+ *healthp = (HEALTH) get_lsb_short(bufpp);
}
void
@@ -116,7 +117,7 @@ get_mbg_cfg(
CFG *cfgp
)
{
- *cfgp = get_lsb_short(bufpp);
+ *cfgp = (CFG) get_lsb_short(bufpp);
}
void
@@ -125,7 +126,7 @@ get_mbg_tgps(
T_GPS *tgpsp
)
{
- tgpsp->wn = get_lsb_short(bufpp);
+ tgpsp->wn = get_lsb_uint16(bufpp);
tgpsp->sec = get_lsb_long(bufpp);
tgpsp->tick = get_lsb_long(bufpp);
}
@@ -133,20 +134,20 @@ get_mbg_tgps(
void
get_mbg_tm(
unsigned char **buffpp,
- TM *tmp
+ TM_GPS *tmp
)
{
- tmp->year = get_lsb_short(buffpp);
+ tmp->year = get_lsb_int16(buffpp);
tmp->month = *(*buffpp)++;
- tmp->mday = *(*buffpp)++;
- tmp->yday = get_lsb_short(buffpp);
- tmp->wday = *(*buffpp)++;
- tmp->hour = *(*buffpp)++;
- tmp->minute = *(*buffpp)++;
- tmp->second = *(*buffpp)++;
- tmp->frac = get_lsb_long(buffpp);
+ tmp->mday = *(*buffpp)++;
+ tmp->yday = get_lsb_int16(buffpp);
+ tmp->wday = *(*buffpp)++;
+ tmp->hour = *(*buffpp)++;
+ tmp->min = *(*buffpp)++;
+ tmp->sec = *(*buffpp)++;
+ tmp->frac = get_lsb_long(buffpp);
tmp->offs_from_utc = get_lsb_long(buffpp);
- tmp->status= get_lsb_short(buffpp);
+ tmp->status = get_lsb_uint16(buffpp);
}
void
@@ -155,7 +156,7 @@ get_mbg_ttm(
TTM *ttmp
)
{
- ttmp->channel = get_lsb_short(buffpp);
+ ttmp->channel = get_lsb_int16(buffpp);
get_mbg_tgps(buffpp, &ttmp->t);
get_mbg_tm(buffpp, &ttmp->tm);
}
@@ -166,9 +167,9 @@ get_mbg_synth(
SYNTH *synthp
)
{
- synthp->freq = get_lsb_short(buffpp);
- synthp->range = get_lsb_short(buffpp);
- synthp->phase = get_lsb_short(buffpp);
+ synthp->freq = get_lsb_int16(buffpp);
+ synthp->range = get_lsb_int16(buffpp);
+ synthp->phase = get_lsb_int16(buffpp);
}
static void
@@ -201,7 +202,7 @@ get_mbg_antinfo(
ANT_INFO *antinfop
)
{
- antinfop->status = get_lsb_short(buffpp);
+ antinfop->status = get_lsb_int16(buffpp);
get_mbg_tm(buffpp, &antinfop->tm_disconn);
get_mbg_tm(buffpp, &antinfop->tm_reconn);
antinfop->delta_t = get_lsb_long(buffpp);
@@ -216,8 +217,8 @@ mbg_time_status_str(
{
static struct state
{
- int flag; /* bit flag */
- const char *string; /* bit name */
+ int flag; /* bit flag */
+ const char *string; /* bit name */
} states[] =
{
{ TM_UTC, "UTC CORR" },
@@ -233,7 +234,7 @@ mbg_time_status_str(
{
char *start, *p;
struct state *s;
-
+
start = p = *buffpp;
for (s = states; s->flag; s++)
@@ -252,25 +253,27 @@ mbg_time_status_str(
*buffpp = p;
}
}
-
+
void
mbg_tm_str(
char **buffpp,
- TM *tmp,
- int size
+ TM_GPS *tmp,
+ int size,
+ int print_status
)
{
char *s = *buffpp;
snprintf(*buffpp, size, "%04d-%02d-%02d %02d:%02d:%02d.%07ld (%c%02d%02d) ",
tmp->year, tmp->month, tmp->mday,
- tmp->hour, tmp->minute, tmp->second, tmp->frac,
+ tmp->hour, tmp->min, tmp->sec, (long) tmp->frac,
(tmp->offs_from_utc < 0) ? '-' : '+',
- abs(tmp->offs_from_utc) / 3600,
- (abs(tmp->offs_from_utc) / 60) % 60);
+ abs((int)tmp->offs_from_utc) / 3600,
+ (abs((int)tmp->offs_from_utc) / 60) % 60);
*buffpp += strlen(*buffpp);
- mbg_time_status_str(buffpp, tmp->status, size - (*buffpp - s));
+ if (print_status)
+ mbg_time_status_str(buffpp, tmp->status, size - (*buffpp - s));
}
void
@@ -281,8 +284,8 @@ mbg_tgps_str(
)
{
snprintf(*buffpp, size, "week %d + %ld days + %ld.%07ld sec",
- tgpsp->wn, tgpsp->sec / 86400,
- tgpsp->sec % 86400, tgpsp->tick);
+ tgpsp->wn, (long) tgpsp->sec / SECSPERDAY,
+ (long) tgpsp->sec % SECSPERDAY, (long) tgpsp->tick);
*buffpp += strlen(*buffpp);
}
@@ -293,19 +296,19 @@ get_mbg_cfgh(
)
{
int i;
-
- cfghp->csum = get_lsb_short(buffpp);
- cfghp->valid = get_lsb_short(buffpp);
+
+ cfghp->csum = (CSUM) get_lsb_short(buffpp);
+ cfghp->valid = get_lsb_int16(buffpp);
get_mbg_tgps(buffpp, &cfghp->tot_51);
get_mbg_tgps(buffpp, &cfghp->tot_63);
get_mbg_tgps(buffpp, &cfghp->t0a);
- for (i = MIN_SVNO; i <= MAX_SVNO; i++)
+ for (i = 0; i < N_SVNO_GPS; i++)
{
get_mbg_cfg(buffpp, &cfghp->cfg[i]);
}
-
- for (i = MIN_SVNO; i <= MAX_SVNO; i++)
+
+ for (i = 0; i < N_SVNO_GPS; i++)
{
get_mbg_health(buffpp, &cfghp->health[i]);
}
@@ -317,23 +320,23 @@ get_mbg_utc(
UTC *utcp
)
{
- utcp->csum = get_lsb_short(buffpp);
- utcp->valid = get_lsb_short(buffpp);
+ utcp->csum = (CSUM) get_lsb_short(buffpp);
+ utcp->valid = get_lsb_int16(buffpp);
get_mbg_tgps(buffpp, &utcp->t0t);
-
+
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A0, mbg_double) != IEEE_OK)
{
L_CLR(&utcp->A0);
}
-
+
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A1, mbg_double) != IEEE_OK)
{
L_CLR(&utcp->A1);
}
- utcp->WNlsf = get_lsb_short(buffpp);
- utcp->DNt = get_lsb_short(buffpp);
+ utcp->WNlsf = get_lsb_uint16(buffpp);
+ utcp->DNt = get_lsb_int16(buffpp);
utcp->delta_tls = *(*buffpp)++;
utcp->delta_tlsf = *(*buffpp)++;
}
@@ -345,7 +348,7 @@ get_mbg_lla(
)
{
int i;
-
+
for (i = LAT; i <= ALT; i++)
{
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &lla[i], mbg_double) != IEEE_OK)
@@ -367,7 +370,7 @@ get_mbg_xyz(
)
{
int i;
-
+
for (i = XP; i <= ZP; i++)
{
if (fetch_ieee754(buffpp, IEEE_DOUBLE, &xyz[i], mbg_double) != IEEE_OK)
@@ -383,14 +386,14 @@ get_mbg_comparam(
COM_PARM *comparamp
)
{
- int i;
-
+ size_t i;
+
comparamp->baud_rate = get_lsb_long(buffpp);
for (i = 0; i < sizeof(comparamp->framing); i++)
{
comparamp->framing[i] = *(*buffpp)++;
}
- comparamp->handshake = get_lsb_short(buffpp);
+ comparamp->handshake = get_lsb_int16(buffpp);
}
void
@@ -400,12 +403,12 @@ get_mbg_portparam(
)
{
int i;
-
- for (i = 0; i < N_COM; i++)
+
+ for (i = 0; i < DEFAULT_N_COM; i++)
{
get_mbg_comparam(buffpp, &portparamp->com[i]);
}
- for (i = 0; i < N_COM; i++)
+ for (i = 0; i < DEFAULT_N_COM; i++)
{
portparamp->mode[i] = *(*buffpp)++;
}
@@ -416,20 +419,20 @@ get_mbg_portparam(
{ \
L_CLR(addr); \
}
-
+
void
get_mbg_eph(
unsigned char ** buffpp,
EPH *ephp
)
{
- ephp->csum = get_lsb_short(buffpp);
- ephp->valid = get_lsb_short(buffpp);
-
- ephp->health = get_lsb_short(buffpp);
- ephp->IODC = get_lsb_short(buffpp);
- ephp->IODE2 = get_lsb_short(buffpp);
- ephp->IODE3 = get_lsb_short(buffpp);
+ ephp->csum = (CSUM) get_lsb_short(buffpp);
+ ephp->valid = get_lsb_int16(buffpp);
+
+ ephp->health = (HEALTH) get_lsb_short(buffpp);
+ ephp->IODC = (IOD) get_lsb_short(buffpp);
+ ephp->IODE2 = (IOD) get_lsb_short(buffpp);
+ ephp->IODE3 = (IOD) get_lsb_short(buffpp);
get_mbg_tgps(buffpp, &ephp->tt);
get_mbg_tgps(buffpp, &ephp->t0c);
@@ -456,7 +459,7 @@ get_mbg_eph(
FETCH_DOUBLE(buffpp, &ephp->af2);
FETCH_DOUBLE(buffpp, &ephp->tgd);
- ephp->URA = get_lsb_short(buffpp);
+ ephp->URA = get_lsb_uint16(buffpp);
ephp->L2code = *(*buffpp)++;
ephp->L2flag = *(*buffpp)++;
@@ -468,10 +471,10 @@ get_mbg_alm(
ALM *almp
)
{
- almp->csum = get_lsb_short(buffpp);
- almp->valid = get_lsb_short(buffpp);
-
- almp->health = get_lsb_short(buffpp);
+ almp->csum = (CSUM) get_lsb_short(buffpp);
+ almp->valid = get_lsb_int16(buffpp);
+
+ almp->health = (HEALTH) get_lsb_short(buffpp);
get_mbg_tgps(buffpp, &almp->t0a);
@@ -493,8 +496,8 @@ get_mbg_iono(
IONO *ionop
)
{
- ionop->csum = get_lsb_short(buffpp);
- ionop->valid = get_lsb_short(buffpp);
+ ionop->csum = (CSUM) get_lsb_short(buffpp);
+ ionop->valid = get_lsb_int16(buffpp);
FETCH_DOUBLE(buffpp, &ionop->alpha_0);
FETCH_DOUBLE(buffpp, &ionop->alpha_1);
diff --git a/libparse/gpstolfp.c b/libparse/gpstolfp.c
index 5354dd3..c162429 100644
--- a/libparse/gpstolfp.c
+++ b/libparse/gpstolfp.c
@@ -34,10 +34,8 @@
*/
#include <config.h>
#include "ntp_fp.h"
-
-#define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */
-#define SECSPERWEEK (unsigned)(604800) /* seconds per week - GPS tells us about weeks */
-#define GPSWRAP 990 /* assume week count less than this in the previous epoch */
+#include "ntp_calendar.h"
+#include "parse.h"
void
gpstolfp(
@@ -49,10 +47,10 @@ gpstolfp(
{
if (weeks < GPSWRAP)
{
- weeks += 1024;
+ weeks += GPSWEEKS;
}
- lfp->l_ui = weeks * SECSPERWEEK + days * 86400 + seconds + GPSORIGIN; /* convert to NTP time */
+ lfp->l_ui = (uint32_t)(weeks * SECSPERWEEK + days * SECSPERDAY + seconds + GPSORIGIN); /* convert to NTP time */
lfp->l_uf = 0;
}
diff --git a/libparse/info_trimble.c b/libparse/info_trimble.c
index 6456e0f..53b2e32 100644
--- a/libparse/info_trimble.c
+++ b/libparse/info_trimble.c
@@ -48,7 +48,7 @@ cmd_info_t trimble_scmds[] = {
{ CMD_CHIGH8CNT, "CMD_CHIGH8CNT", "high-8 (best 4) / high-6 (overdetermined) control (0x75)", "", 0 },
{ CMD_CMAXDGPSCOR, "CMD_CMAXDGPSCOR", "maximum rate of DGPS corrections (0x77)", "", 0 },
{ CMD_CSUPER, "CMD_CSUPER", "super paket (0x8E)", "", 0 },
- { 0xFF, "", "" }
+ { 0xFF, "", "", "", 0 }
};
@@ -90,5 +90,5 @@ cmd_info_t trimble_rcmds[] = {
{ CMD_RDOUBLELLA, "CMD_RDOUBLELLA", "double precision LLA (0x84)", "gps_position_ext(LLA)", RO|DEF },
{ CMD_RDGPSSTAT, "CMD_RDGPSSTAT", "differential correction status (0x85)", "trimble_dgpsstatus", RO },
{ CMD_RSUPER, "CMD_RSUPER", "super paket (0x8F)", "", 0 },
- { 0xFF, "", "" }
+ { 0xFF, "", "", "", 0 }
};
diff --git a/libparse/mkinfo_rcmd.sed b/libparse/mkinfo_rcmd.sed
index 5238d5c..b8ed623 100644
--- a/libparse/mkinfo_rcmd.sed
+++ b/libparse/mkinfo_rcmd.sed
@@ -4,5 +4,5 @@
cmd_info_t trimble_rcmds[] = {
s!^#define[ \ ][ \ ]*\(CMD_R[^ \ ]*\)[ \ ][ \ ]*\([^ \ ]*\)[ \ ][ \ ]*/\*[ \ ][ \ ]*\(.*\)[ \ ]*:\([^:]*\):\([^:]*\)[ \ ][ \ ]*\*/!\ { \1, "\1", "\3 (\2)", "\4", \5 },!p
$a\
-\ { 0xFF, "", "" }\
+\ { 0xFF, "", "", "", 0 }\
};
diff --git a/libparse/mkinfo_scmd.sed b/libparse/mkinfo_scmd.sed
index 9c17f39..fb58d32 100644
--- a/libparse/mkinfo_scmd.sed
+++ b/libparse/mkinfo_scmd.sed
@@ -11,5 +11,5 @@
cmd_info_t trimble_scmds[] = {
s!^#define[ ][ ]*\(CMD_C[^ ]*\)[ ][ ]*\([^ ]*\)[ ][ ]*/\*[ ][ ]*\(.*\)[ ][ ]*\*/! { \1, "\1", "\3 (\2)", "", 0 },!p
$a\
-\ { 0xFF, "", "" }\
+\ { 0xFF, "", "", "", 0 }\
};
diff --git a/libparse/parse.c b/libparse/parse.c
index 85e5299..9e663f9 100644
--- a/libparse/parse.c
+++ b/libparse/parse.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/ntp4-dev/libparse/parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_20050806_A
- *
+ *
* parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_20050806_A
*
* Parser module for reference clock
@@ -12,7 +12,7 @@
* when PARSEKERNEL is not defined NTP time stamps will be used.
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -106,7 +106,7 @@ Strcmp(
while (!(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
@@ -154,10 +154,10 @@ parse_ioinit(
)
{
parseprintf(DD_PARSE, ("parse_iostart\n"));
-
+
parseio->parse_plen = 0;
parseio->parse_pdata = (void *)0;
-
+
parseio->parse_data = 0;
parseio->parse_ldata = 0;
parseio->parse_dsize = 0;
@@ -166,7 +166,7 @@ parse_ioinit(
parseio->parse_ioflags = PARSE_IO_CS7; /* usual unix default */
parseio->parse_index = 0;
parseio->parse_ldsize = 0;
-
+
return 1;
}
@@ -188,15 +188,15 @@ parse_ioend(
unsigned int
parse_restart(
parse_t *parseio,
- unsigned int ch
+ char ch
)
{
unsigned int updated = PARSE_INP_SKIP;
-
+
/*
* re-start packet - timeout - overflow - start symbol
*/
-
+
if (parseio->parse_index)
{
/*
@@ -208,17 +208,17 @@ parse_restart(
parseio->parse_ldsize = parseio->parse_index;
updated = PARSE_INP_TIME;
}
-
+
parseio->parse_index = 1;
parseio->parse_data[0] = ch;
parseprintf(DD_PARSE, ("parse: parse_restart: buffer start (updated = %x)\n", updated));
return updated;
}
-
+
unsigned int
parse_addchar(
parse_t *parseio,
- unsigned int ch
+ char ch
)
{
/*
@@ -239,7 +239,7 @@ parse_addchar(
*/
return parse_restart(parseio, ch);
}
-
+
unsigned int
parse_end(
parse_t *parseio
@@ -260,11 +260,11 @@ parse_end(
int
parse_ioread(
register parse_t *parseio,
- register unsigned int ch,
+ register char ch,
register timestamp_t *tstamp
)
{
- register unsigned updated = CVT_NONE;
+ register u_int updated = CVT_NONE;
/*
* within STREAMS CSx (x < 8) chars still have the upper bits set
* so we normalize the characters by masking unecessary bits off.
@@ -282,9 +282,9 @@ parse_ioread(
case PARSE_IO_CS7:
ch &= 0x7F;
break;
-
+
case PARSE_IO_CS8:
- ch &= 0xFF;
+ ch &= (char) 0xFFU;
break;
}
@@ -306,18 +306,18 @@ parse_ioread(
{
updated = CVT_OK;
}
-
+
if (input_status & PARSE_INP_TIME) /* time sample is available */
{
- updated = timepacket(parseio);
+ updated = (u_int) timepacket(parseio);
}
-
+
if (input_status & PARSE_INP_DATA) /* got additional data */
{
updated |= CVT_ADDITIONAL;
}
}
-
+
/*
* remember last character time
@@ -353,7 +353,7 @@ parse_iopps(
register timestamp_t *ptime
)
{
- register unsigned updated = CVT_NONE;
+ register u_int updated = CVT_NONE;
/*
* PPS pulse information will only be delivered to ONE clock format
@@ -364,7 +364,7 @@ parse_iopps(
if (clockformats[parseio->parse_lformat]->syncpps)
{
- updated = clockformats[parseio->parse_lformat]->syncpps(parseio, status == SYNC_ONE, ptime);
+ updated = (u_int) clockformats[parseio->parse_lformat]->syncpps(parseio, status == SYNC_ONE, ptime);
parseprintf(DD_PARSE, ("parse_iopps: updated = 0x%x\n", updated));
}
@@ -403,13 +403,13 @@ parse_to_unixtime(
)
{
#define SETRTC(_X_) { if (cvtrtc) *cvtrtc = (_X_); }
- static int days_of_month[] =
+ static int days_of_month[] =
{
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
register int i;
time_t t;
-
+
if (clock_time->utctime)
return clock_time->utctime; /* if the conversion routine gets it right away - why not */
@@ -423,12 +423,12 @@ parse_to_unixtime(
SETRTC(CVT_FAIL|CVT_BADDATE);
return -1;
}
-
+
/*
* sorry, slow section here - but it's not time critical anyway
*/
t = julian0(clock_time->year) - julian0(1970); /* Y2kFixes */
- /* month */
+ /* month */
if (clock_time->month <= 0 || clock_time->month > 12)
{
SETRTC(CVT_FAIL|CVT_BADDATE);
@@ -466,7 +466,7 @@ parse_to_unixtime(
t = TIMES24(t) + clock_time->hour;
- /* min */
+ /* min */
if (clock_time->minute < 0 || clock_time->minute > 59)
{
SETRTC(CVT_FAIL|CVT_BADTIME);
@@ -475,7 +475,7 @@ parse_to_unixtime(
t = TIMES60(t) + clock_time->minute;
/* sec */
-
+
if (clock_time->second < 0 || clock_time->second > 60) /* allow for LEAPs */
{
SETRTC(CVT_FAIL|CVT_BADTIME);
@@ -510,7 +510,7 @@ Stoi(
while(*s == ' ')
s++;
-
+
if (*s == '-')
{
s++;
@@ -519,7 +519,7 @@ Stoi(
else
if (*s == '+')
s++;
-
+
for(;;)
{
c = *s++;
@@ -573,16 +573,16 @@ updatetimeinfo(
{
int s = splhigh();
#endif
-
+
parseio->parse_lstate = parseio->parse_dtime.parse_state | flags | PARSEB_TIMECODE;
-
+
parseio->parse_dtime.parse_state = parseio->parse_lstate;
#ifdef PARSEKERNEL
(void)splx((unsigned int)s);
}
#endif
-
+
#ifdef PARSEKERNEL
parseprintf(DD_PARSE, ("updatetimeinfo status=0x%x, time=%x\n", parseio->parse_dtime.parse_state,
@@ -591,7 +591,7 @@ updatetimeinfo(
parseprintf(DD_PARSE, ("updatetimeinfo status=0x%lx, time=%x\n", (long)parseio->parse_dtime.parse_state,
parseio->parse_dtime.parse_time.fp.l_ui));
#endif
-
+
return CVT_OK; /* everything fine and dandy... */
}
@@ -614,7 +614,7 @@ syn_simple(
}
/*
- * pps_simple
+ * parse_pps_fnc_t pps_simple
*
* handle a pps time stamp
*/
@@ -628,12 +628,12 @@ pps_simple(
{
parseio->parse_dtime.parse_ptime = *ptime;
parseio->parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
-
+
return CVT_NONE;
}
/*
- * pps_one
+ * parse_pps_fnc_t pps_one
*
* handle a pps time stamp in ONE edge
*/
@@ -647,12 +647,12 @@ pps_one(
{
if (status)
return pps_simple(parseio, status, ptime);
-
+
return CVT_NONE;
}
/*
- * pps_zero
+ * parse_pps_fnc_t pps_zero
*
* handle a pps time stamp in ZERO edge
*/
@@ -666,7 +666,7 @@ pps_zero(
{
if (!status)
return pps_simple(parseio, status, ptime);
-
+
return CVT_NONE;
}
@@ -684,13 +684,13 @@ timepacket(
register time_t t;
u_long cvtrtc; /* current conversion result */
clocktime_t clock_time;
-
+
memset((char *)&clock_time, 0, sizeof clock_time);
format = parseio->parse_lformat;
if (format == (unsigned short)~0)
return CVT_NONE;
-
+
switch ((cvtrtc = clockformats[format]->convert ?
clockformats[format]->convert((unsigned char *)parseio->parse_ldata, parseio->parse_ldsize, (struct format *)(clockformats[format]->data), &clock_time, parseio->parse_pdata) :
CVT_NONE) & CVT_MASK)
@@ -698,17 +698,17 @@ timepacket(
case CVT_FAIL:
parseio->parse_badformat++;
break;
-
+
case CVT_NONE:
/*
* too bad - pretend bad format
*/
parseio->parse_badformat++;
break;
-
+
case CVT_OK:
break;
-
+
case CVT_SKIP:
return CVT_NONE;
@@ -716,7 +716,7 @@ timepacket(
/* shouldn't happen */
#ifndef PARSEKERNEL
msyslog(LOG_WARNING, "parse: INTERNAL error: bad return code of convert routine \"%s\"", clockformats[format]->name);
-#endif
+#endif
return CVT_FAIL|cvtrtc;
}
@@ -724,7 +724,7 @@ timepacket(
{
return CVT_FAIL|cvtrtc;
}
-
+
/*
* time stamp
*/
@@ -732,7 +732,7 @@ timepacket(
parseio->parse_dtime.parse_time.tv.tv_sec = t;
parseio->parse_dtime.parse_time.tv.tv_usec = clock_time.usecond;
#else
- parseio->parse_dtime.parse_time.fp.l_ui = t + JAN_1970;
+ parseio->parse_dtime.parse_time.fp.l_ui = (uint32_t) (t + JAN_1970);
TVUTOTSF(clock_time.usecond, parseio->parse_dtime.parse_time.fp.l_uf);
#endif
@@ -758,7 +758,7 @@ parse_timecode(
*/
dct->parsegettc.parse_badformat = parse->parse_badformat;
parse->parse_badformat = 0;
-
+
if (parse->parse_ldsize <= PARSE_TCMAX)
{
dct->parsegettc.parse_count = parse->parse_ldsize;
@@ -771,7 +771,7 @@ parse_timecode(
}
}
-
+
/*ARGSUSED*/
int
parse_setfmt(
@@ -792,7 +792,7 @@ parse_setfmt(
if (parse->parse_pdata)
FREE(parse->parse_pdata, parse->parse_plen);
parse->parse_pdata = 0;
-
+
parse->parse_plen = clockformats[i]->plen;
if (parse->parse_plen)
@@ -809,9 +809,9 @@ parse_setfmt(
if (parse->parse_data)
FREE(parse->parse_data, (unsigned)(parse->parse_dsize * 2 + 2));
parse->parse_ldata = parse->parse_data = 0;
-
+
parse->parse_dsize = clockformats[i]->length;
-
+
if (parse->parse_dsize)
{
parse->parse_data = (char*)MALLOC((unsigned)(parse->parse_dsize * 2 + 2));
@@ -820,20 +820,20 @@ parse_setfmt(
if (parse->parse_pdata)
FREE(parse->parse_pdata, parse->parse_plen);
parse->parse_pdata = 0;
-
+
parseprintf(DD_PARSE, ("init failed: malloc for data area failed\n"));
return 0;
}
}
-
+
/*
* leave room for '\0'
*/
parse->parse_ldata = parse->parse_data + parse->parse_dsize + 1;
-
+
parse->parse_lformat = i;
-
+
return 1;
}
}
@@ -852,7 +852,7 @@ parse_getfmt(
if (dct->parseformat.parse_format < nformats &&
Strlen(clockformats[dct->parseformat.parse_format]->name) <= PARSE_TCMAX)
{
- dct->parseformat.parse_count = Strlen(clockformats[dct->parseformat.parse_format]->name)+1;
+ dct->parseformat.parse_count = (unsigned short) (Strlen(clockformats[dct->parseformat.parse_format]->name) + 1);
memcpy(dct->parseformat.parse_buffer, clockformats[dct->parseformat.parse_format]->name, dct->parseformat.parse_count);
return 1;
}
@@ -870,7 +870,7 @@ parse_setcs(
)
{
parse->parse_ioflags &= ~PARSE_IO_CSIZE;
- parse->parse_ioflags |= dct->parsesetcs.parse_cs & PARSE_IO_CSIZE;
+ parse->parse_ioflags |= (int) (dct->parsesetcs.parse_cs & PARSE_IO_CSIZE);
return 1;
}
diff --git a/libparse/parse_conf.c b/libparse/parse_conf.c
index b7234dd..37871c9 100644
--- a/libparse/parse_conf.c
+++ b/libparse/parse_conf.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/ntp4-dev/libparse/parse_conf.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* parse_conf.c,v 4.9 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* Parser configuration module for reference clocks
@@ -12,7 +12,7 @@
* when STREAM is not defined NTP time stamps will be used.
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/libparse/parsesolaris.c b/libparse/parsesolaris.c
index d3756af..8c91257 100644
--- a/libparse/parsesolaris.c
+++ b/libparse/parsesolaris.c
@@ -1,12 +1,12 @@
/*
* /src/NTP/ntp4-dev/libparse/parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* STREAMS module for reference clocks
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -74,7 +74,7 @@ static struct fmodsw fmod_templ =
extern struct mod_ops mod_strmodops;
-static struct modlstrmod modlstrmod =
+static struct modlstrmod modlstrmod =
{
&mod_strmodops, /* a STREAMS module */
"PARSE - NTP reference", /* name this baby - keep room for revision number */
@@ -100,13 +100,13 @@ _init(
)
{
static char revision[] = "4.6";
- char *s, *S;
+ char *s, *S;
char *t;
-
+
#ifndef lint
t = rcsid;
#endif
-
+
/*
* copy RCS revision into Drv_name
*
@@ -125,20 +125,20 @@ _init(
}
if (*s == ' ') s++;
}
-
- t = modlstrmod.strmod_linkinfo;
+
+ t = modlstrmod.strmod_linkinfo;
while (*t && (*t != ' '))
{
t++;
}
if (*t == ' ') t++;
-
+
S = s;
while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
{
S++;
}
-
+
if (*s && *t && (S > s))
{
if (strlen(t) >= (S - s))
@@ -308,7 +308,7 @@ setup_stream(
}
else
{
- pprintf(DD_OPEN, "parse: setup_stream - FAILED - no MEMORY for allocb\n");
+ pprintf(DD_OPEN, "parse: setup_stream - FAILED - no MEMORY for allocb\n");
return 0;
}
}
@@ -325,18 +325,18 @@ parseopen(
{
register parsestream_t *parse;
static int notice = 0;
-
- pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q);
-
+
+ pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q);
+
if (sflag != MODOPEN)
{ /* open only for modules */
- pprintf(DD_OPEN, "parse: OPEN - FAILED - not MODOPEN\n");
+ pprintf(DD_OPEN, "parse: OPEN - FAILED - not MODOPEN\n");
return EIO;
}
if (q->q_ptr != (caddr_t)NULL)
{
- pprintf(DD_OPEN, "parse: OPEN - FAILED - EXCLUSIVE ONLY\n");
+ pprintf(DD_OPEN, "parse: OPEN - FAILED - EXCLUSIVE ONLY\n");
return EBUSY;
}
@@ -346,10 +346,10 @@ parseopen(
return ENOMEM;
}
- pprintf(DD_OPEN, "parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr);
+ pprintf(DD_OPEN, "parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr);
WR(q)->q_ptr = q->q_ptr;
- pprintf(DD_OPEN, "parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", WR(q), WR(q)->q_ptr);
-
+ pprintf(DD_OPEN, "parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", WR(q), WR(q)->q_ptr);
+
parse = (parsestream_t *) q->q_ptr;
bzero((caddr_t)parse, sizeof(*parse));
parse->parse_queue = q;
@@ -360,7 +360,7 @@ parseopen(
qprocson(q);
- pprintf(DD_OPEN, "parse: OPEN - initializing io subsystem q=%x\n", q);
+ pprintf(DD_OPEN, "parse: OPEN - initializing io subsystem q=%x\n", q);
if (!parse_ioinit(&parse->parse_io))
{
@@ -374,12 +374,12 @@ parseopen(
return EIO;
}
- pprintf(DD_OPEN, "parse: OPEN - initializing stream q=%x\n", q);
+ pprintf(DD_OPEN, "parse: OPEN - initializing stream q=%x\n", q);
if (setup_stream(q, M_PARSE))
{
(void) init_linemon(q); /* hook up PPS ISR routines if possible */
- pprintf(DD_OPEN, "parse: OPEN - SUCCEEDED\n");
+ pprintf(DD_OPEN, "parse: OPEN - SUCCEEDED\n");
/*
* I know that you know the delete key, but you didn't write this
@@ -412,19 +412,19 @@ parseclose(
{
register parsestream_t *parse = (parsestream_t *)q->q_ptr;
register unsigned long s;
-
+
pprintf(DD_CLOSE, "parse: CLOSE\n");
-
+
qprocsoff(q);
s = splhigh();
-
+
if (parse->parse_dqueue)
close_linemon(parse->parse_dqueue, q);
parse->parse_dqueue = (queue_t *)0;
(void) splx(s);
-
+
parse_ioend(&parse->parse_io);
kmem_free((caddr_t)parse, sizeof(parsestream_t));
@@ -444,7 +444,7 @@ parsersvc(
)
{
mblk_t *mp;
-
+
while ((mp = getq(q)))
{
if (canputnext(q) || (mp->b_datap->db_type > QPCTL))
@@ -477,15 +477,15 @@ parsewput(
register mblk_t *datap;
register struct iocblk *iocp;
parsestream_t *parse = (parsestream_t *)q->q_ptr;
-
+
pprintf(DD_WPUT, "parse: parsewput\n");
-
+
switch (mp->b_datap->db_type)
{
default:
putnext(q, mp);
break;
-
+
case M_IOCTL:
iocp = (void *)mp->b_rptr;
switch (iocp->ioc_cmd)
@@ -519,7 +519,7 @@ parsewput(
iocp->ioc_count = sizeof(struct ppsclockev);
qreply(q, mp);
break;
-
+
case PARSEIOC_ENABLE:
case PARSEIOC_DISABLE:
{
@@ -537,7 +537,7 @@ parsewput(
}
qreply(q, mp);
break;
- }
+ }
case PARSEIOC_TIMECODE:
case PARSEIOC_SETFMT:
@@ -553,7 +553,7 @@ parsewput(
pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_TIMECODE\n");
ok = parse_timecode(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_SETFMT:
pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_SETFMT\n");
ok = parse_setfmt(dct, &parse->parse_io);
@@ -600,7 +600,7 @@ rdchar(
else
{
register mblk_t *mmp = *mp;
-
+
*mp = (*mp)->b_cont;
freeb(mmp);
}
@@ -619,7 +619,7 @@ parserput(
{
register unsigned char type;
mblk_t *mp = imp;
-
+
switch (type = mp->b_datap->db_type)
{
default:
@@ -636,7 +636,7 @@ parserput(
else
putq(q, mp);
break;
-
+
case M_BREAK:
case M_DATA:
{
@@ -691,7 +691,7 @@ parserput(
if (nmp) freemsg(nmp);
parse_iodone(&parse->parse_io);
}
- }
+ }
}
else
{
@@ -733,7 +733,7 @@ parserput(
gethrestime(&hres_time);
c_time.tv.tv_sec = hres_time.tv_sec;
c_time.tv.tv_usec = hres_time.tv_nsec / 1000;
-
+
pprintf(DD_RPUT, "parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN");
if ((parse->parse_status & PARSE_ENABLE) &&
@@ -758,7 +758,7 @@ parserput(
}
else
putq(q, mp);
-
+
if (status)
{
parse->parse_ppsclockev.tv = c_time.tv;
@@ -780,7 +780,7 @@ init_linemon(
)
{
register queue_t *dq;
-
+
dq = WR(q);
/*
* we ARE doing very bad things down here (basically stealing ISR
@@ -916,14 +916,14 @@ init_zs_linemon(
szs->zsops.zsop_xsint = (void (*) (struct zscom *))zs_xsisr; /* place our bastard */
szs->oldzsops = zs->zs_ops;
emergencyzs = zs->zs_ops;
-
+
zs->zs_ops = &szs->zsops; /* hook it up */
/*
- * XXX: this is usually done via zsopinit()
+ * XXX: this is usually done via zsopinit()
* - have yet to find a way to call that routine
*/
zs->zs_xsint = (void (*) (struct zscom *))zs_xsisr;
-
+
mutex_exit(zs->zs_excl);
pprintf(DD_INSTALL, "init_zs_linemon: CD monitor installed\n");
@@ -934,7 +934,7 @@ init_zs_linemon(
}
/*
- * unregister our ISR routine - must call under splhigh() (or
+ * unregister our ISR routine - must call under splhigh() (or
* whatever block ZS status interrupts)
*/
static void
@@ -970,7 +970,7 @@ close_zs_linemon(
mutex_exit(zs->zs_excl);
kmem_free((caddr_t)szs, sizeof (struct savedzsops));
-
+
pprintf(DD_INSTALL, "close_zs_linemon: CD monitor deleted\n");
return;
}
@@ -1005,7 +1005,7 @@ zs_xsisr(
{
timestamp_t cdevent;
register int status;
-
+
/*
* time stamp
*/
@@ -1024,7 +1024,7 @@ zs_xsisr(
* ok - now the hard part - find ourself
*/
loopcheck = MAXDEPTH;
-
+
while (q)
{
if (q->q_qinfo && q->q_qinfo->qi_minfo)
@@ -1052,7 +1052,7 @@ zs_xsisr(
*/
parse_iodone(&((parsestream_t *)q->q_ptr)->parse_io);
}
-
+
if (status)
{
((parsestream_t *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
@@ -1091,9 +1091,9 @@ zs_xsisr(
SCC_WRITE0(ZSWR0_RESET_STATUS); /* might kill other conditions here */
return;
}
- }
+ }
- pprintf(DD_ISR, "zs_xsisr: non CD event 0x%x for \"%s\"\n",
+ pprintf(DD_ISR, "zs_xsisr: non CD event 0x%x for \"%s\"\n",
(za->za_rr0 ^ zsstatus) & ~ZSRR0_CD,dname);
/*
* we are now gathered here to process some unusual external status
@@ -1108,7 +1108,7 @@ zs_xsisr(
q = za->za_ttycommon.t_readq;
loopcheck = MAXDEPTH;
-
+
/*
* the real thing for everything else ...
*/
@@ -1120,7 +1120,7 @@ zs_xsisr(
if (!strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
{
register void (*zsisr) (struct zscom *);
-
+
/*
* back home - phew (hopping along stream queues might
* prove dangerous to your health)
@@ -1129,7 +1129,7 @@ zs_xsisr(
zsisr(zs);
else
panic("zs_xsisr: unable to locate original ISR");
-
+
pprintf(DD_ISR, "zs_xsisr: non CD event was processed for \"%s\"\n", dname);
/*
* now back to our program ...
@@ -1151,7 +1151,7 @@ zs_xsisr(
* corrupted TTY structures
*/
printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
-
+
if (emergencyzs && emergencyzs->zsop_xsint)
emergencyzs->zsop_xsint(zs);
else
diff --git a/libparse/parsestreams.c b/libparse/parsestreams.c
index 3fb4cc3..6cd9d8f 100644
--- a/libparse/parsestreams.c
+++ b/libparse/parsestreams.c
@@ -1,13 +1,13 @@
/*
* /src/NTP/ntp4-dev/libparse/parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
- *
+ *
* parsestreams.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A
*
* STREAMS module for reference clocks
* (SunOS4.x)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -110,7 +110,7 @@ static char mnam[] = "PARSEPPS "; /* name this baby - keep room for revision
#else
static char mnam[] = "PARSE "; /* name this baby - keep room for revision number */
#endif
-struct vdldrv parsesync_vd =
+struct vdldrv parsesync_vd =
{
VDMAGIC_PSEUDO, /* nothing like a real driver - a STREAMS module */
mnam,
@@ -166,7 +166,7 @@ Strcmp(
while (!(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
@@ -186,10 +186,10 @@ Strncmp(
while (n-- && !(c = *s++ - *t++) && *s && *t)
/* empty loop */;
-
+
return c;
}
-
+
void
ntp_memset(
char *a,
@@ -217,12 +217,12 @@ xxxinit(
{
extern struct fmodsw fmodsw[];
extern int fmodcnt;
-
+
struct fmodsw *fm = fmodsw;
struct fmodsw *fmend = &fmodsw[fmodcnt];
struct fmodsw *ifm = (struct fmodsw *)0;
char *mname = parseinfo.st_rdinit->qi_minfo->mi_idname;
-
+
switch (fc)
{
case VDLOAD:
@@ -233,13 +233,13 @@ xxxinit(
*/
while (fm <= fmend)
{
- if (!Strncmp(fm->f_name, mname, FMNAMESZ))
+ if (!Strncmp(fm->f_name, mname, FMNAMESZ))
{
printf("vddrinit[%s]: STREAMS module already loaded.\n", mname);
return(EBUSY);
}
else
- if ((ifm == (struct fmodsw *)0) &&
+ if ((ifm == (struct fmodsw *)0) &&
(fm->f_name[0] == '\0') &&
(fm->f_str == (struct streamtab *)0))
{
@@ -261,7 +261,7 @@ xxxinit(
{
static char revision[] = "4.7";
char *s, *S, *t;
-
+
s = rcsid; /* NOOP - keep compilers happy */
Strncpy(ifm->f_name, mname, FMNAMESZ);
@@ -285,20 +285,20 @@ xxxinit(
}
if (*s == ' ') s++;
}
-
- t = parsesync_vd.Drv_name;
+
+ t = parsesync_vd.Drv_name;
while (*t && (*t != ' '))
{
t++;
}
if (*t == ' ') t++;
-
+
S = s;
while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
{
S++;
}
-
+
if (*s && *t && (S > s))
{
if (Strlen(t) >= (S - s))
@@ -307,9 +307,9 @@ xxxinit(
}
}
return (0);
- }
+ }
break;
-
+
case VDUNLOAD:
if (parsebusy > 0)
{
@@ -328,7 +328,7 @@ xxxinit(
fm->f_name[0] = '\0';
fm->f_str = (struct streamtab *)0;
fm++;
-
+
break;
}
fm++;
@@ -341,14 +341,14 @@ xxxinit(
else
return (0);
}
-
+
case VDSTAT:
return (0);
default:
return (EIO);
-
+
}
return EIO;
}
@@ -460,7 +460,7 @@ setup_stream(
}
else
{
- parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
+ parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
return 0;
}
}
@@ -476,37 +476,37 @@ parseopen(
{
register parsestream_t *parse;
static int notice = 0;
-
- parseprintf(DD_OPEN,("parse: OPEN\n"));
-
+
+ parseprintf(DD_OPEN,("parse: OPEN\n"));
+
if (sflag != MODOPEN)
{ /* open only for modules */
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
return OPENFAIL;
}
if (q->q_ptr != (caddr_t)NULL)
{
u.u_error = EBUSY;
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
return OPENFAIL;
}
#ifdef VDDRV
parsebusy++;
#endif
-
+
q->q_ptr = (caddr_t)kmem_alloc(sizeof(parsestream_t));
if (q->q_ptr == (caddr_t)0)
{
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - no memory\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - FAILED - no memory\n"));
#ifdef VDDRV
parsebusy--;
#endif
return OPENFAIL;
}
WR(q)->q_ptr = q->q_ptr;
-
+
parse = (parsestream_t *)(void *)q->q_ptr;
bzero((caddr_t)parse, sizeof(*parse));
parse->parse_queue = q;
@@ -531,7 +531,7 @@ parseopen(
{
(void) init_linemon(q); /* hook up PPS ISR routines if possible */
- parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
+ parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
/*
* I know that you know the delete key, but you didn't write this
@@ -569,17 +569,17 @@ parseclose(
{
register parsestream_t *parse = (parsestream_t *)(void *)q->q_ptr;
register unsigned long s;
-
+
parseprintf(DD_CLOSE,("parse: CLOSE\n"));
-
+
s = splhigh();
-
+
if (parse->parse_dqueue)
close_linemon(parse->parse_dqueue, q);
parse->parse_dqueue = (queue_t *)0;
(void) splx(s);
-
+
parse_ioend(&parse->parse_io);
kmem_free((caddr_t)parse, sizeof(parsestream_t));
@@ -602,7 +602,7 @@ parsersvc(
)
{
mblk_t *mp;
-
+
while ((mp = getq(q)))
{
if (canput(q->q_next) || (mp->b_datap->db_type > QPCTL))
@@ -635,15 +635,15 @@ parsewput(
register mblk_t *datap;
register struct iocblk *iocp;
parsestream_t *parse = (parsestream_t *)(void *)q->q_ptr;
-
+
parseprintf(DD_WPUT,("parse: parsewput\n"));
-
+
switch (mp->b_datap->db_type)
{
default:
putnext(q, mp);
break;
-
+
case M_IOCTL:
iocp = (struct iocblk *)(void *)mp->b_rptr;
switch (iocp->ioc_cmd)
@@ -676,7 +676,7 @@ parsewput(
iocp->ioc_count = sizeof(struct ppsclockev);
qreply(q, mp);
break;
-
+
case PARSEIOC_ENABLE:
case PARSEIOC_DISABLE:
{
@@ -694,7 +694,7 @@ parsewput(
}
qreply(q, mp);
break;
- }
+ }
case PARSEIOC_TIMECODE:
case PARSEIOC_SETFMT:
@@ -710,7 +710,7 @@ parsewput(
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_TIMECODE\n"));
ok = parse_timecode(dct, &parse->parse_io);
break;
-
+
case PARSEIOC_SETFMT:
parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_SETFMT\n"));
ok = parse_setfmt(dct, &parse->parse_io);
@@ -757,7 +757,7 @@ rdchar(
else
{
register mblk_t *mmp = *mp;
-
+
*mp = (*mp)->b_cont;
freeb(mmp);
}
@@ -775,7 +775,7 @@ parserput(
)
{
unsigned char type;
-
+
switch (type = mp->b_datap->db_type)
{
default:
@@ -791,7 +791,7 @@ parserput(
else
putq(q, mp);
break;
-
+
case M_BREAK:
case M_DATA:
{
@@ -844,7 +844,7 @@ parserput(
if (nmp) freemsg(nmp);
parse_iodone(&parse->parse_io);
}
- }
+ }
}
else
{
@@ -883,7 +883,7 @@ parserput(
register int status = cd_invert ^ (type == M_UNHANGUP);
uniqtime(&ctime.tv);
-
+
parseprintf(DD_RPUT,("parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN"));
if ((parse->parse_status & PARSE_ENABLE) &&
@@ -908,7 +908,7 @@ parserput(
}
else
putq(q, mp);
-
+
if (status)
{
parse->parse_ppsclockev.tv = ctime.tv;
@@ -930,7 +930,7 @@ init_linemon(
)
{
register queue_t *dq;
-
+
dq = WR(q);
/*
* we ARE doing very bad things down here (basically stealing ISR
@@ -1038,7 +1038,7 @@ init_zs_linemon(
else
{
unsigned long s;
-
+
/*
* we do a direct replacement, in case others fiddle also
* if somebody else grabs our hook and we disconnect
@@ -1064,9 +1064,9 @@ init_zs_linemon(
szs->zsops.zsop_xsint = zs_xsisr; /* place our bastard */
szs->oldzsops = zs->zs_ops;
emergencyzs = zs->zs_ops;
-
+
zsopinit(zs, &szs->zsops); /* hook it up */
-
+
(void) splx(s);
parseprintf(DD_INSTALL, ("init_zs_linemon: CD monitor installed\n"));
@@ -1099,11 +1099,11 @@ close_zs_linemon(
else
{
register struct savedzsops *szs = (struct savedzsops *)parsestream->parse_data;
-
+
zsopinit(zs, szs->oldzsops); /* reset to previous handler functions */
kmem_free((caddr_t)szs, sizeof (struct savedzsops));
-
+
parseprintf(DD_INSTALL, ("close_zs_linemon: CD monitor deleted\n"));
return;
}
@@ -1148,7 +1148,7 @@ zs_xsisr(
{
timestamp_t cdevent;
register int status;
-
+
za->za_rr0 = (za->za_rr0 & ~(cdmask)) | (zsstatus & (cdmask));
#ifdef PPS_SYNC
@@ -1163,7 +1163,7 @@ zs_xsisr(
* time stamp
*/
uniqtime(&cdevent.tv);
-
+
#ifdef PPS_SYNC
(void)splx(s);
#endif
@@ -1190,7 +1190,7 @@ zs_xsisr(
* ok - now the hard part - find ourself
*/
loopcheck = MAXDEPTH;
-
+
while (q)
{
if (q->q_qinfo && q->q_qinfo->qi_minfo)
@@ -1218,7 +1218,7 @@ zs_xsisr(
*/
parse_iodone(&((parsestream_t *)(void *)q->q_ptr)->parse_io);
}
-
+
if (status)
{
((parsestream_t *)(void *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
@@ -1251,13 +1251,13 @@ zs_xsisr(
zsaddr->zscc_control = ZSWR0_RESET_STATUS; /* might kill other conditions here */
return 0;
}
- }
+ }
if (zsstatus & cdmask) /* fake CARRIER status */
za->za_flags |= ZAS_CARR_ON;
else
za->za_flags &= ~ZAS_CARR_ON;
-
+
/*
* we are now gathered here to process some unusual external status
* interrupts.
@@ -1271,7 +1271,7 @@ zs_xsisr(
q = za->za_ttycommon.t_readq;
loopcheck = MAXDEPTH;
-
+
/*
* the real thing for everything else ...
*/
@@ -1283,7 +1283,7 @@ zs_xsisr(
if (!Strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
{
register int (*zsisr) (struct zscom *);
-
+
/*
* back home - phew (hopping along stream queues might
* prove dangerous to your health)
@@ -1292,7 +1292,7 @@ zs_xsisr(
return zsisr(zs);
else
panic("zs_xsisr: unable to locate original ISR");
-
+
parseprintf(DD_ISR, ("zs_xsisr: non CD event was processed for \"%s\"\n", dname));
/*
* now back to our program ...
@@ -1314,7 +1314,7 @@ zs_xsisr(
* corrupted TTY structures
*/
printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
-
+
if (emergencyzs && emergencyzs->zsop_xsint)
emergencyzs->zsop_xsint(zs);
else
diff --git a/libparse/trim_info.c b/libparse/trim_info.c
index 619e238..4178209 100644
--- a/libparse/trim_info.c
+++ b/libparse/trim_info.c
@@ -6,7 +6,7 @@
* $Created: Sun Aug 2 20:20:34 1998 $
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100755
index 0000000..3061e3c
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,9636 @@
+
+# libtool (GNU libtool) 2.4
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool 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 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --no-quiet, --no-silent
+# print informational messages (default)
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print more informational messages than default
+# --no-verbose don't print the extra informational messages
+# --version print version information
+# -h, --help, --help-all print short, long, or detailed help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE. When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.4
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4
+TIMESTAMP=""
+package_revision=1.3293
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+ s@/\./@/@g
+ t dotsl
+ s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+# value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test "$func_normal_abspath_tpath" = / ; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result" ; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+# value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=${func_dirname_result}
+ if test "x$func_relative_path_tlibdir" = x ; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test "x$func_stripname_result" != x ; then
+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+ fi
+
+ # Normalisation. If bindir is libdir, return empty string,
+ # else relative path ending with a slash; either way, target
+ # file name can be directly appended.
+ if test ! -z "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result/"
+ func_relative_path_result=$func_stripname_result
+ fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "$1" | $SED \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $opt_debug
+
+ $SED -n '/(C)/!b go
+ :more
+ /\./!{
+ N
+ s/\n# / /
+ b more
+ }
+ :go
+ /^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ echo
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ :print
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
+ ret=$?
+ if test -z "$1"; then
+ exit $ret
+ fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $opt_debug
+
+ func_error "missing argument for $1."
+ exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^--[^=]*=//'
+
+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+ func_quote_for_eval "${2}"
+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly. This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+ # this just eases exit handling
+ while test $# -gt 0; do
+ opt="$1"
+ shift
+ case $opt in
+ --debug|-x) opt_debug='set -x'
+ func_echo "enabling shell trace mode"
+ $opt_debug
+ ;;
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+ --config)
+ opt_config=:
+func_config
+ ;;
+ --dlopen|-dlopen)
+ optarg="$1"
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+ shift
+ ;;
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=:
+ ;;
+ --features)
+ opt_features=:
+func_features
+ ;;
+ --finish)
+ opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ --help)
+ opt_help=:
+ ;;
+ --help-all)
+ opt_help_all=:
+opt_help=': help-all'
+ ;;
+ --mode)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_mode="$optarg"
+case $optarg in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+esac
+ shift
+ ;;
+ --no-silent|--no-quiet)
+ opt_silent=false
+func_append preserve_args " $opt"
+ ;;
+ --no-verbose)
+ opt_verbose=false
+func_append preserve_args " $opt"
+ ;;
+ --silent|--quiet)
+ opt_silent=:
+func_append preserve_args " $opt"
+ opt_verbose=false
+ ;;
+ --verbose|-v)
+ opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+ ;;
+ --tag)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+ --version) func_version ;;
+
+ # Separate optargs to long options:
+ --*=*)
+ func_split_long_opt "$opt"
+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-n*|-v*)
+ func_split_short_opt "$opt"
+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # Validate options:
+
+ # save first non-option argument
+ if test "$#" -gt 0; then
+ nonopt="$opt"
+ shift
+ fi
+
+ # preserve --debug
+ test "$opt_debug" = : || func_append preserve_args " --debug"
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$opt_mode' for more information."
+ }
+
+
+ # Bail if the options were screwed
+ $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case "$lt_sysroot:$1" in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result="=$func_stripname_result"
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $opt_debug
+ func_convert_core_file_wine_to_w32_result="$1"
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $opt_debug
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=""
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $opt_debug
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $opt_debug
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $opt_debug
+ if test -z "$2" && test -n "$1" ; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " \`$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result="$1"
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $opt_debug
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " \`$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result="$3"
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $opt_debug
+ case $4 in
+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $opt_debug
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $opt_debug
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $opt_debug
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $opt_debug
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_append_quoted lastarg "$arg"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try \`$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test "$opt_help" = :; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ sed '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "\`$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument \`$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=""
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname" ; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename="$func_basename_result"
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename" ; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $opt_debug
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $opt_debug
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive which possess that section. Heuristic: eliminate
+ # all those which have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $opt_debug
+ if func_cygming_gnu_implib_p "$1" ; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1" ; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=""
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ if test "$lock_old_archive_extraction" = yes; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test "$lock_old_archive_extraction" = yes; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (strcmp (argv[i], debug_opt) == 0)
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
+
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $opt_debug
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir="$arg"
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps ; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test "$prefer_static_libs" = yes ||
+ test "$prefer_static_libs,$installed" = "built,no"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$lt_sysroot$libdir"
+ absdir="$lt_sysroot$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ case "$host" in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ echo
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$opt_mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|qnx|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ func_append libobjs " $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$opt_mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test "$want_nocaseglob" = yes; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_apped perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd1 in $cmds; do
+ IFS="$save_ifs"
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test "$try_normal_branch" = yes \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=${output_objdir}/${output_la}.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " ${wl}-bind_at_load"
+ func_append finalize_command " ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ func_append oldobjs " $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test "x$bindir" != x ;
+ then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=yes ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ odir="$objdir"
+ else
+ odir="$dir/$objdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$opt_mode" = uninstall && odir="$dir"
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test "$opt_mode" = clean; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case "$opt_mode" in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$opt_mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ func_append rmfiles " $odir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$opt_mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/missing b/missing
new file mode 100755
index 0000000..894e786
--- /dev/null
+++ b/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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 2, 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/ntpd/Makefile.am b/ntpd/Makefile.am
index b3af527..344ac8e 100644
--- a/ntpd/Makefile.am
+++ b/ntpd/Makefile.am
@@ -90,7 +90,7 @@ man_MANS= ntpd.$(NTPD_MS)
LDADD_NTPD_COMMON = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS)
LDADD_NTPD_COMMON += $(LIBM) $(LDADD_NTP) $(LSCF)
-ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_NTPD_COMMON)
+ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_NTPD_COMMON) $(LDADD_LIBUTIL)
ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a $(LDADD_NTPD_COMMON)
ntpdsim_CPPFLAGS = $(AM_CPPFLAGS) -DSIM
check_y2k_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_LIBNTP) $(PTHREAD_LIBS)
diff --git a/ntpd/Makefile.in b/ntpd/Makefile.in
index ddb2ad3..0eccb11 100644
--- a/ntpd/Makefile.in
+++ b/ntpd/Makefile.in
@@ -52,8 +52,7 @@ subdir = ntpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -64,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -81,6 +81,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -157,8 +159,7 @@ am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
ntpd_DEPENDENCIES = $(am__DEPENDENCIES_2) ../libntp/libntp.a \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_3)
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
am__objects_2 = ntpdsim-ntp_config.$(OBJEXT) ntpdsim-ntp_io.$(OBJEXT) \
ntpdsim-ntp_parser.$(OBJEXT) ntpdsim-ntp_scanner.$(OBJEXT) \
ntpdsim-ntpd.$(OBJEXT) ntpdsim-ntpd-opts.$(OBJEXT) \
@@ -255,6 +256,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -289,7 +291,9 @@ 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@
@@ -428,6 +432,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
@@ -536,7 +545,7 @@ man_MANS = ntpd.$(NTPD_MS)
# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
LDADD_NTPD_COMMON = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS) \
$(LIBM) $(LDADD_NTP) $(LSCF)
-ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_NTPD_COMMON)
+ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_NTPD_COMMON) $(LDADD_LIBUTIL)
ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a $(LDADD_NTPD_COMMON)
ntpdsim_CPPFLAGS = $(AM_CPPFLAGS) -DSIM
check_y2k_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_LIBNTP) $(PTHREAD_LIBS)
diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c
index 045c0a9..14e86f7 100644
--- a/ntpd/cmd_args.c
+++ b/ntpd/cmd_args.c
@@ -76,6 +76,9 @@ getCmdOpts(
if (HAVE_OPT( PANICGATE ))
allow_panic = TRUE;
+ if (HAVE_OPT( FORCE_STEP_ONCE ))
+ force_step_once = TRUE;
+
#ifdef HAVE_DROPROOT
if (HAVE_OPT( JAILDIR )) {
droproot = 1;
@@ -175,14 +178,14 @@ getCmdOpts(
if (HAVE_OPT( UPDATEINTERVAL )) {
long val = OPT_VALUE_UPDATEINTERVAL;
-
+
if (val >= 0)
interface_interval = val;
else {
- fprintf(stderr,
+ fprintf(stderr,
"command line interface update interval %ld must not be negative\n",
val);
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"command line interface update interval %ld must not be negative",
val);
errflg++;
diff --git a/ntpd/invoke-ntp.conf.texi b/ntpd/invoke-ntp.conf.texi
index 78d3baf..7151efb 100644
--- a/ntpd/invoke-ntp.conf.texi
+++ b/ntpd/invoke-ntp.conf.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:56:50 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:25:50 AM by AutoGen 5.18.5pre4
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@@ -365,6 +365,20 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
@ref{Authentication Options}.
+@item @code{mdnstries} @kbd{number}
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+@code{mdnstries}
+times.
+After all,
+@code{ntpd}
+may be starting before mDNS.
+The default value for
+@code{mdnstries}
+is 5.
@end table
@node Authentication Support
@subsection Authentication Support
@@ -2468,7 +2482,7 @@ holds
the names of all peer variables and the
@code{clock_var_list}
holds the names of the reference clock variables.
-@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{srep} | @code{stepout} @kbd{stepout}]}
+@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{step} | @code{stepback} @kbd{stepback} | @code{stepfwd} @kbd{stepfwd} | @code{stepout} @kbd{stepout}]}
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@@ -2525,6 +2539,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+@item @code{stepback} @kbd{stepback}
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+@item @code{stepfwd} @kbd{stepfwd}
+As for stepback, but for the forward direction.
@item @code{stepout} @kbd{stepout}
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/invoke-ntp.keys.texi b/ntpd/invoke-ntp.keys.texi
index b79bba8..b0d4940 100644
--- a/ntpd/invoke-ntp.keys.texi
+++ b/ntpd/invoke-ntp.keys.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:56:52 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:25:52 AM by AutoGen 5.18.5pre4
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
diff --git a/ntpd/invoke-ntpd.texi b/ntpd/invoke-ntpd.texi
index 11ccce4..b6c69db 100644
--- a/ntpd/invoke-ntpd.texi
+++ b/ntpd/invoke-ntpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:56:55 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:25:54 AM by AutoGen 5.18.5pre4
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -95,6 +95,7 @@ This software is released under the NTP license, <http://ntp.org/license>.
* ntpd configfile:: configfile option (-c)
* ntpd driftfile:: driftfile option (-f)
* ntpd panicgate:: panicgate option (-g)
+* ntpd force-step-once:: force-step-once option (-G)
* ntpd jaildir:: jaildir option (-i)
* ntpd interface:: interface option (-I)
* ntpd keyfile:: keyfile option (-k)
@@ -141,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.7p482
+ntpd - NTP daemon program - Ver. 4.2.8p2
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
@@ -162,6 +163,7 @@ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-f Str driftfile frequency drift file name
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
+ -G no force-step-once Step any initial offset correction.
-i Str jaildir Jail directory
-I Str interface Listen on an interface name or address
- may appear multiple times
@@ -298,7 +300,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
@code{driftfile} @kbd{driftfile}
-configuration specification in the
+configuration specification in the
@file{/etc/ntp.conf}
file.
@node ntpd panicgate
@@ -326,6 +328,21 @@ options.
See the
@code{tinker}
configuration file directive for other options.
+@node ntpd force-step-once
+@subsection force-step-once option (-G)
+@cindex ntpd-force-step-once
+
+This is the ``step any initial offset correction.'' option.
+Normally,
+@code{ntpd}
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the @code{tinker} configuration file directive for other options.
@node ntpd jaildir
@subsection jaildir option (-i)
@cindex ntpd-jaildir
@@ -370,7 +387,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-@code{interface} command, which is more versatile.
+@code{interface} command, which is more versatile.
@node ntpd keyfile
@subsection keyfile option (-k)
@cindex ntpd-keyfile
diff --git a/ntpd/keyword-gen-utd b/ntpd/keyword-gen-utd
index 7474a56..b9b59bd 100644
--- a/ntpd/keyword-gen-utd
+++ b/ntpd/keyword-gen-utd
@@ -1 +1 @@
- * Generated 2013-08-04 04:56:14 UTC diff_ignore_line
+ * Generated 2015-03-16 09:05:44 UTC diff_ignore_line
diff --git a/ntpd/keyword-gen.c b/ntpd/keyword-gen.c
index d4f7758..5872e2a 100644
--- a/ntpd/keyword-gen.c
+++ b/ntpd/keyword-gen.c
@@ -97,6 +97,7 @@ struct key_tok ntp_keywords[] = {
{ "iburst", T_Iburst, FOLLBY_TOKEN },
{ "key", T_Key, FOLLBY_TOKEN },
{ "maxpoll", T_Maxpoll, FOLLBY_TOKEN },
+{ "mdnstries", T_Mdnstries, FOLLBY_TOKEN },
{ "minpoll", T_Minpoll, FOLLBY_TOKEN },
{ "mode", T_Mode, FOLLBY_TOKEN },
{ "noselect", T_Noselect, FOLLBY_TOKEN },
@@ -205,6 +206,8 @@ struct key_tok ntp_keywords[] = {
{ "filenum", T_Filenum, FOLLBY_TOKEN },
/* tinker_option */
{ "step", T_Step, FOLLBY_TOKEN },
+{ "stepback", T_Stepback, FOLLBY_TOKEN },
+{ "stepfwd", T_Stepfwd, FOLLBY_TOKEN },
{ "panic", T_Panic, FOLLBY_TOKEN },
{ "dispersion", T_Dispersion, FOLLBY_TOKEN },
{ "stepout", T_Stepout, FOLLBY_TOKEN },
@@ -357,7 +360,7 @@ generate_fsm(void)
fprintf(stderr,
"keyword-gen sst[%u] too small "
"for keyword '%s' id %d\n",
- COUNTOF(sst),
+ (int)COUNTOF(sst),
ntp_keywords[i].key,
token);
exit(4);
diff --git a/ntpd/ntp.conf.5man b/ntpd/ntp.conf.5man
index 389f23e..f1ed4b2 100644
--- a/ntpd/ntp.conf.5man
+++ b/ntpd/ntp.conf.5man
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5man "02 Dec 2014" "4.2.7p482" "File Formats"
+.TH ntp.conf 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-7eaizK/ag-wfaayK)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:37 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -415,6 +415,21 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]mdnstries\f[] \f\*[I-Font]number\f[]
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+\f\*[B-Font]mdnstries\f[]
+times.
+After all,
+\f\*[B-Font]ntpd\f[]
+may be starting before mDNS.
+The default value for
+\f\*[B-Font]mdnstries\f[]
+is 5.
.PP
.SH Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2771,7 +2786,7 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
-.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
+.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@@ -2837,6 +2852,21 @@ Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.TP 7
+.NOP \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[]
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.TP 7
+.NOP \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[]
+As for stepback, but for the forward direction.
+.TP 7
.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
The argument is the stepout timeout, which by default is 900 s.
It can
@@ -2974,9 +3004,9 @@ RFC5905
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
diff --git a/ntpd/ntp.conf.5mdoc b/ntpd/ntp.conf.5mdoc
index 998a274..1a52a12 100644
--- a/ntpd/ntp.conf.5mdoc
+++ b/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:58 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -402,6 +402,20 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric\-key or
public\-key authentication as described in
.Sx Authentication Options .
+.It Ic mdnstries Ar number
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+.Ic mdnstries
+times.
+After all,
+.Ic ntpd
+may be starting before mDNS.
+The default value for
+.Ic mdnstries
+is 5.
.El
.Sh Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2604,7 +2618,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
-.Cm step Ar srep |
+.Cm step Ar step |
+.Cm stepback Ar stepback |
+.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@@ -2664,6 +2680,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+.It Cm stepback Ar stepback
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.It Cm stepfwd Ar stepfwd
+As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can
@@ -2784,9 +2813,9 @@ A snapshot of this documentation is available in HTML format in
.%O RFC5905
.Re
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
diff --git a/ntpd/ntp.conf.def b/ntpd/ntp.conf.def
index 5a5af21..e5c44b7 100644
--- a/ntpd/ntp.conf.def
+++ b/ntpd/ntp.conf.def
@@ -404,6 +404,20 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
.Sx Authentication Options .
+.It Ic mdnstries Ar number
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+.Ic mdnstries
+times.
+After all,
+.Ic ntpd
+may be starting before mDNS.
+The default value for
+.Ic mdnstries
+is 5.
.El
.Sh Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2606,7 +2620,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
-.Cm step Ar srep |
+.Cm step Ar step |
+.Cm stepback Ar stepback |
+.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@@ -2666,6 +2682,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+.It Cm stepback Ar stepback
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.It Cm stepfwd Ar stepfwd
+As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/ntp.conf.html b/ntpd/ntp.conf.html
index 15632da..7ab25e3 100644
--- a/ntpd/ntp.conf.html
+++ b/ntpd/ntp.conf.html
@@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the configuration file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.7p482 of <code>ntp.conf</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp.conf</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -403,6 +403,19 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
<a href="#Authentication-Options">Authentication Options</a>.
+<br><dt><code>mdnstries</code> <kbd>number</kbd><dd>If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+<code>mdnstries</code>
+times.
+After all,
+<code>ntpd</code>
+may be starting before mDNS.
+The default value for
+<code>mdnstries</code>
+is 5.
</dl>
<div class="node">
<p><hr>
@@ -2450,7 +2463,7 @@ holds
the names of all peer variables and the
<code>clock_var_list</code>
holds the names of the reference clock variables.
-<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>srep</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><dd>This command can be used to alter several system variables in
+<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>step</kbd><code> | stepback </code><kbd>stepback</kbd><code> | stepfwd </code><kbd>stepfwd</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><dd>This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
configuration file before any other configuration options.
@@ -2500,6 +2513,17 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+<br><dt><code>stepback</code> <kbd>stepback</kbd><dd>The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+<br><dt><code>stepfwd</code> <kbd>stepfwd</kbd><dd>As for stepback, but for the forward direction.
<br><dt><code>stepout</code> <kbd>stepout</kbd><dd>The argument is the stepout timeout, which by default is 900 s.
It can
be set to any positive number in seconds.
diff --git a/ntpd/ntp.conf.man.in b/ntpd/ntp.conf.man.in
index 3261b6c..548151d 100644
--- a/ntpd/ntp.conf.man.in
+++ b/ntpd/ntp.conf.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5 "02 Dec 2014" "4.2.7p482" "File Formats"
+.TH ntp.conf 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-7eaizK/ag-wfaayK)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:37 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -415,6 +415,21 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]mdnstries\f[] \f\*[I-Font]number\f[]
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+\f\*[B-Font]mdnstries\f[]
+times.
+After all,
+\f\*[B-Font]ntpd\f[]
+may be starting before mDNS.
+The default value for
+\f\*[B-Font]mdnstries\f[]
+is 5.
.PP
.SH Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2771,7 +2786,7 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
-.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
+.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@@ -2837,6 +2852,21 @@ Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.TP 7
+.NOP \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[]
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.TP 7
+.NOP \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[]
+As for stepback, but for the forward direction.
+.TP 7
.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
The argument is the stepout timeout, which by default is 900 s.
It can
@@ -2974,9 +3004,9 @@ RFC5905
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
diff --git a/ntpd/ntp.conf.mdoc.in b/ntpd/ntp.conf.mdoc.in
index 3a236d5..da935ed 100644
--- a/ntpd/ntp.conf.mdoc.in
+++ b/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:58 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -402,6 +402,20 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric\-key or
public\-key authentication as described in
.Sx Authentication Options .
+.It Ic mdnstries Ar number
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+.Ic mdnstries
+times.
+After all,
+.Ic ntpd
+may be starting before mDNS.
+The default value for
+.Ic mdnstries
+is 5.
.El
.Sh Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2604,7 +2618,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
-.Cm step Ar srep |
+.Cm step Ar step |
+.Cm stepback Ar stepback |
+.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@@ -2664,6 +2680,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+.It Cm stepback Ar stepback
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.It Cm stepfwd Ar stepfwd
+As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can
@@ -2784,9 +2813,9 @@ A snapshot of this documentation is available in HTML format in
.%O RFC5905
.Re
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
diff --git a/ntpd/ntp.keys.5man b/ntpd/ntp.keys.5man
index 52acb7f..a505afb 100644
--- a/ntpd/ntp.keys.5man
+++ b/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "02 Dec 2014" "4.2.7p482" "File Formats"
+.TH ntp.keys 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:42 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -158,9 +158,9 @@ the default name of the configuration file
\fCntpdc\fR(1ntpdcmdoc)\f[],
\fCsntp\fR(1sntpmdoc)\f[]
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpd/ntp.keys.5mdoc b/ntpd/ntp.keys.5mdoc
index 56ad9c1..a7157ec 100644
--- a/ntpd/ntp.keys.5mdoc
+++ b/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:01 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -145,9 +145,9 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Xr ntpdc 1ntpdcmdoc ,
.Xr sntp 1sntpmdoc
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpd/ntp.keys.html b/ntpd/ntp.keys.html
index ab4b9b7..98a22ef 100644
--- a/ntpd/ntp.keys.html
+++ b/ntpd/ntp.keys.html
@@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the symmetric key file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.7p482 of <code>ntp.keys</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp.keys</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/ntpd/ntp.keys.man.in b/ntpd/ntp.keys.man.in
index 943b27e..c7585af 100644
--- a/ntpd/ntp.keys.man.in
+++ b/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "02 Dec 2014" "4.2.7p482" "File Formats"
+.TH ntp.keys 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:42 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -158,9 +158,9 @@ the default name of the configuration file
\fCntpdc\fR(@NTPDC_MS@)\f[],
\fCsntp\fR(@SNTP_MS@)\f[]
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpd/ntp.keys.mdoc.in b/ntpd/ntp.keys.mdoc.in
index b2a24e9..e6590db 100644
--- a/ntpd/ntp.keys.mdoc.in
+++ b/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:01 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -145,9 +145,9 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Xr ntpdc @NTPDC_MS@ ,
.Xr sntp @SNTP_MS@
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c
index 0f48983..a224579 100644
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -128,6 +128,8 @@ typedef struct peer_resolved_ctx_tag {
#define ISEOL(c) ((c) == '#' || (c) == '\n' || (c) == '\0')
#define ISSPACE(c) ((c) == ' ' || (c) == '\t')
+#define _UC(str) ((char *)(intptr_t)(str))
+
/*
* Definitions of things either imported from or exported to outside
*/
@@ -316,6 +318,7 @@ static void config_ntpd(config_tree *);
static void config_other_modes(config_tree *);
static void config_auth(config_tree *);
static void config_access(config_tree *);
+static void config_mdnstries(config_tree *);
static void config_phone(config_tree *);
static void config_setvar(config_tree *);
static void config_ttl(config_tree *);
@@ -355,6 +358,7 @@ static u_int32 get_logmask(const char *);
#ifndef SIM
static int getnetnum(const char *num, sockaddr_u *addr, int complain,
enum gnn_type a_type);
+
#endif
@@ -392,6 +396,7 @@ init_syntax_tree(
)
{
ZERO(*ptree);
+ ptree->mdnstries = 5;
}
@@ -502,7 +507,7 @@ dump_config_tree(
int_node *counter_set;
string_node *str_node;
- const char *s;
+ const char *s = NULL;
char *s1;
char *s2;
char timestamp[80];
@@ -1105,7 +1110,7 @@ create_attr_rangeval(
attr_val *
create_attr_sval(
int attr,
- char *s
+ const char *s
)
{
attr_val *my_val;
@@ -1114,7 +1119,7 @@ create_attr_sval(
my_val->attr = attr;
if (NULL == s) /* free() hates NULL */
s = estrdup("");
- my_val->value.s = s;
+ my_val->value.s = _UC(s);
my_val->type = T_String;
return my_val;
@@ -1329,7 +1334,7 @@ create_unpeer_node(
* We treat all valid 16-bit numbers as association IDs.
*/
pch = addr->address;
- while (*pch && isdigit(*pch))
+ while (*pch && isdigit((unsigned char)*pch))
pch++;
if (!*pch
@@ -2457,12 +2462,12 @@ config_access(
/* It would be swell if we could identify the line number */
if ((RES_KOD & flags) && !(RES_LIMITED & flags)) {
- char *kod_where = (my_node->addr)
+ const char *kod_where = (my_node->addr)
? my_node->addr->address
: (mflags & RESM_SOURCE)
? "source"
: "default";
- char *kod_warn = "KOD does nothing without LIMITED.";
+ const char *kod_warn = "KOD does nothing without LIMITED.";
fprintf(stderr, "restrict %s: %s\n", kod_where, kod_warn);
msyslog(LOG_WARNING, "restrict %s: %s", kod_where, kod_warn);
@@ -2700,6 +2705,14 @@ config_tinker(
item = LOOP_MAX;
break;
+ case T_Stepback:
+ item = LOOP_MAX_BACK;
+ break;
+
+ case T_Stepfwd:
+ item = LOOP_MAX_FWD;
+ break;
+
case T_Stepout:
item = LOOP_MINSTEP;
break;
@@ -3033,7 +3046,7 @@ config_phone(
config_tree *ptree
)
{
- int i;
+ size_t i;
string_node * sn;
i = 0;
@@ -3045,13 +3058,23 @@ config_phone(
sys_phone[i] = NULL;
} else {
msyslog(LOG_INFO,
- "phone: Number of phone entries exceeds %lu. Ignoring phone %s...",
- (u_long)(COUNTOF(sys_phone) - 1), sn->s);
+ "phone: Number of phone entries exceeds %zu. Ignoring phone %s...",
+ (COUNTOF(sys_phone) - 1), sn->s);
}
}
}
#endif /* !SIM */
+static void
+config_mdnstries(
+ config_tree *ptree
+ )
+{
+#ifdef HAVE_DNSREGISTRATION
+ extern int mdnstries;
+ mdnstries = ptree->mdnstries;
+#endif /* HAVE_DNSREGISTRATION */
+}
#ifdef FREE_CFG_T
static void
@@ -3110,7 +3133,7 @@ config_ttl(
config_tree *ptree
)
{
- int i = 0;
+ size_t i = 0;
int_node *curr_ttl;
curr_ttl = HEAD_PFIFO(ptree->ttl);
@@ -3119,8 +3142,8 @@ config_ttl(
sys_ttl[i++] = (u_char)curr_ttl->i;
else
msyslog(LOG_INFO,
- "ttl: Number of TTL entries exceeds %lu. Ignoring TTL %d...",
- (u_long)COUNTOF(sys_ttl), curr_ttl->i);
+ "ttl: Number of TTL entries exceeds %zu. Ignoring TTL %d...",
+ COUNTOF(sys_ttl), curr_ttl->i);
}
sys_ttlmax = i - 1;
}
@@ -4286,6 +4309,7 @@ config_ntpd(
config_system_opts(ptree);
config_logconfig(ptree);
config_phone(ptree);
+ config_mdnstries(ptree);
config_setvar(ptree);
config_ttl(ptree);
config_trap(ptree);
@@ -4427,7 +4451,7 @@ getconfig(
&& check_netinfo && !(config_netinfo = get_netinfo_config())
#endif /* HAVE_NETINFO */
) {
- msyslog(LOG_INFO, "getconfig: Couldn't open <%s>", FindConfig(config_file));
+ msyslog(LOG_INFO, "getconfig: Couldn't open <%s>: %m", FindConfig(config_file));
#ifndef SYS_WINNT
io_open_sockets();
@@ -4441,7 +4465,7 @@ getconfig(
* Broadcast clients can sometimes run without
* a configuration file.
*/
- msyslog(LOG_INFO, "getconfig: Couldn't open <%s>", FindConfig(alt_config_file));
+ msyslog(LOG_INFO, "getconfig: Couldn't open <%s>: %m", FindConfig(alt_config_file));
io_open_sockets();
return;
@@ -4886,7 +4910,7 @@ ntp_rlimit(
int rl_what,
rlim_t rl_value,
int rl_scale,
- char * rl_sstr
+ const char * rl_sstr
)
{
struct rlimit rl;
diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c
index 266978e..aa9f78c 100644
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -58,13 +58,10 @@ static u_short ctlclkstatus (struct refclockstat *);
static void ctl_flushpkt (u_char);
static void ctl_putdata (const char *, unsigned int, int);
static void ctl_putstr (const char *, const char *, size_t);
-static void ctl_putdblf (const char *, const char *, double);
-const char ctl_def_dbl_fmt[] = "%.3f";
-#define ctl_putdbl(tag, d) ctl_putdblf(tag, ctl_def_dbl_fmt, d)
-const char ctl_def_dbl6_fmt[] = "%.6f";
-#define ctl_putdbl6(tag, d) ctl_putdblf(tag, ctl_def_dbl6_fmt, d)
-const char ctl_def_sfp_fmt[] = "%g";
-#define ctl_putsfp(tag, sfp) ctl_putdblf(tag, ctl_def_sfp_fmt, \
+static void ctl_putdblf (const char *, int, int, double);
+#define ctl_putdbl(tag, d) ctl_putdblf(tag, 1, 3, d)
+#define ctl_putdbl6(tag, d) ctl_putdblf(tag, 1, 6, d)
+#define ctl_putsfp(tag, sfp) ctl_putdblf(tag, 0, -1, \
FPTOD(sfp))
static void ctl_putuint (const char *, u_long);
static void ctl_puthex (const char *, u_long);
@@ -223,7 +220,8 @@ static const struct ctl_proc control_codes[] = {
#define CS_TIMER_OVERRUNS 86
#define CS_TIMER_XMTS 87
#define CS_FUZZ 88
-#define CS_MAX_NOAUTOKEY CS_FUZZ
+#define CS_WANDER_THRESH 89
+#define CS_MAX_NOAUTOKEY CS_WANDER_THRESH
#ifdef AUTOKEY
#define CS_FLAGS (1 + CS_MAX_NOAUTOKEY)
#define CS_HOST (2 + CS_MAX_NOAUTOKEY)
@@ -418,6 +416,7 @@ static const struct ctl_var sys_var[] = {
{ CS_TIMER_OVERRUNS, RO, "timer_overruns" }, /* 86 */
{ CS_TIMER_XMTS, RO, "timer_xmts" }, /* 87 */
{ CS_FUZZ, RO, "fuzz" }, /* 88 */
+ { CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 89 */
#ifdef AUTOKEY
{ CS_FLAGS, RO, "flags" }, /* 1 + CS_MAX_NOAUTOKEY */
{ CS_HOST, RO, "host" }, /* 2 + CS_MAX_NOAUTOKEY */
@@ -480,7 +479,7 @@ static const struct ctl_var peer_var[] = {
{ 0, PADDING, "" }, /* 0 */
{ CP_CONFIG, RO, "config" }, /* 1 */
{ CP_AUTHENABLE, RO, "authenable" }, /* 2 */
- { CP_AUTHENTIC, RO, "authentic" }, /* 3 */
+ { CP_AUTHENTIC, RO, "authentic" }, /* 3 */
{ CP_SRCADR, RO, "srcadr" }, /* 4 */
{ CP_SRCPORT, RO, "srcport" }, /* 5 */
{ CP_DSTADR, RO, "dstadr" }, /* 6 */
@@ -532,7 +531,7 @@ static const struct ctl_var peer_var[] = {
{ CP_FLAGS, RO, "flags" }, /* 1 + CP_MAX_NOAUTOKEY */
{ CP_HOST, RO, "host" }, /* 2 + CP_MAX_NOAUTOKEY */
{ CP_VALID, RO, "valid" }, /* 3 + CP_MAX_NOAUTOKEY */
- { CP_INITSEQ, RO, "initsequence" }, /* 4 + CP_MAX_NOAUTOKEY */
+ { CP_INITSEQ, RO, "initsequence" }, /* 4 + CP_MAX_NOAUTOKEY */
{ CP_INITKEY, RO, "initkey" }, /* 5 + CP_MAX_NOAUTOKEY */
{ CP_INITTSP, RO, "timestamp" }, /* 6 + CP_MAX_NOAUTOKEY */
{ CP_SIGNATURE, RO, "signature" }, /* 7 + CP_MAX_NOAUTOKEY */
@@ -685,37 +684,37 @@ int num_ctl_traps;
*/
#ifdef REFCLOCK
static const u_char clocktypes[] = {
- CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
+ CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
CTL_SST_TS_LOCAL, /* REFCLK_LOCALCLOCK (1) */
- CTL_SST_TS_UHF, /* deprecated REFCLK_GPS_TRAK (2) */
+ CTL_SST_TS_UHF, /* deprecated REFCLK_GPS_TRAK (2) */
CTL_SST_TS_HF, /* REFCLK_WWV_PST (3) */
CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM (4) */
- CTL_SST_TS_UHF, /* REFCLK_TRUETIME (5) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_AUDIO (6) */
+ CTL_SST_TS_UHF, /* REFCLK_TRUETIME (5) */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_AUDIO (6) */
CTL_SST_TS_HF, /* REFCLK_CHU (7) */
CTL_SST_TS_LF, /* REFCLOCK_PARSE (default) (8) */
CTL_SST_TS_LF, /* REFCLK_GPS_MX4200 (9) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_AS2201 (10) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_ARBITER (11) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_TPRO (12) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_AS2201 (10) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_ARBITER (11) */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_TPRO (12) */
CTL_SST_TS_ATOM, /* REFCLK_ATOM_LEITCH (13) */
CTL_SST_TS_LF, /* deprecated REFCLK_MSF_EES (14) */
- CTL_SST_TS_NTP, /* not used (15) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_BANCOMM (16) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_DATU (17) */
+ CTL_SST_TS_NTP, /* not used (15) */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_BANCOMM (16) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_DATU (17) */
CTL_SST_TS_TELEPHONE, /* REFCLK_NIST_ACTS (18) */
CTL_SST_TS_HF, /* REFCLK_WWV_HEATH (19) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_NMEA (20) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_VME (21) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_NMEA (20) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_VME (21) */
CTL_SST_TS_ATOM, /* REFCLK_ATOM_PPS (22) */
CTL_SST_TS_NTP, /* not used (23) */
CTL_SST_TS_NTP, /* not used (24) */
- CTL_SST_TS_NTP, /* not used (25) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_HP (26) */
+ CTL_SST_TS_NTP, /* not used (25) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_HP (26) */
CTL_SST_TS_LF, /* REFCLK_ARCRON_MSF (27) */
CTL_SST_TS_UHF, /* REFCLK_SHM (28) */
- CTL_SST_TS_UHF, /* REFCLK_PALISADE (29) */
- CTL_SST_TS_UHF, /* REFCLK_ONCORE (30) */
+ CTL_SST_TS_UHF, /* REFCLK_PALISADE (29) */
+ CTL_SST_TS_UHF, /* REFCLK_ONCORE (30) */
CTL_SST_TS_UHF, /* REFCLK_JUPITER (31) */
CTL_SST_TS_LF, /* REFCLK_CHRONOLOG (32) */
CTL_SST_TS_LF, /* REFCLK_DUMBCLOCK (33) */
@@ -723,7 +722,7 @@ static const u_char clocktypes[] = {
CTL_SST_TS_LF, /* REFCLK_PCF (35) */
CTL_SST_TS_HF, /* REFCLK_WWV (36) */
CTL_SST_TS_LF, /* REFCLK_FG (37) */
- CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
+ CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
CTL_SST_TS_UHF, /* REFCLK_HOPF_PCI (39) */
CTL_SST_TS_LF, /* REFCLK_JJY (40) */
CTL_SST_TS_UHF, /* REFCLK_TT560 (41) */
@@ -754,17 +753,17 @@ static u_char ctl_sys_num_events;
u_long ctltimereset; /* time stats reset */
u_long numctlreq; /* number of requests we've received */
u_long numctlbadpkts; /* number of bad control packets */
-u_long numctlresponses; /* number of resp packets sent with data */
-u_long numctlfrags; /* number of fragments sent */
+u_long numctlresponses; /* number of resp packets sent with data */
+u_long numctlfrags; /* number of fragments sent */
u_long numctlerrors; /* number of error responses sent */
u_long numctltooshort; /* number of too short input packets */
-u_long numctlinputresp; /* number of responses on input */
-u_long numctlinputfrag; /* number of fragments on input */
+u_long numctlinputresp; /* number of responses on input */
+u_long numctlinputfrag; /* number of fragments on input */
u_long numctlinputerr; /* number of input pkts with err bit set */
-u_long numctlbadoffset; /* number of input pkts with nonzero offset */
+u_long numctlbadoffset; /* number of input pkts with nonzero offset */
u_long numctlbadversion; /* number of input pkts with unknown version */
u_long numctldatatooshort; /* data too short for count */
-u_long numctlbadop; /* bad op code found in packet */
+u_long numctlbadop; /* bad op code found in packet */
u_long numasyncmsgs; /* number of async messages we've sent */
/*
@@ -783,6 +782,7 @@ static int res_offset; /* offset of payload in response */
static u_char * datapt;
static u_char * dataend;
static int datalinelen;
+static int datasent; /* flag to avoid initial ", " */
static int datanotbinflag;
static sockaddr_u *rmt_addr;
static struct interface *lcl_inter;
@@ -801,13 +801,17 @@ static u_char res_async; /* sending async trap response? */
static char *reqpt;
static char *reqend;
+#ifndef MIN
+#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
+#endif
+
/*
* init_control - initialize request data
*/
void
init_control(void)
{
- int i;
+ size_t i;
#ifdef HAVE_UNAME
uname(&utsnamebuf);
@@ -842,9 +846,9 @@ ctl_error(
* Fill in the fields. We assume rpkt.sequence and rpkt.associd
* have already been filled in.
*/
- rpkt.r_m_e_op = CTL_RESPONSE | CTL_ERROR |
+ rpkt.r_m_e_op = (u_char)CTL_RESPONSE | CTL_ERROR |
(res_opcode & CTL_OP_MASK);
- rpkt.status = htons((errcode << 8) & 0xff00);
+ rpkt.status = htons((u_short)(errcode << 8) & 0xff00);
rpkt.count = 0;
/*
@@ -860,7 +864,7 @@ ctl_error(
CTL_HEADER_LEN);
}
-/*
+/*
* save_config - Implements ntpq -c "saveconfig <filename>"
* Writes current configuration including any runtime
* changes by ntpq's :config or config-from-file
@@ -919,11 +923,12 @@ save_config(
* allow timestamping of the saved config filename with
* strftime() format such as:
* ntpq -c "saveconfig ntp-%Y%m%d-%H%M%S.conf"
+ * XXX: Nice feature, but not too safe.
*/
if (0 == strftime(filename, sizeof(filename), filespec,
localtime(&now)))
strlcpy(filename, filespec, sizeof(filename));
-
+
/*
* Conceptually we should be searching for DIRSEP in filename,
* however Windows actually recognizes both forward and
@@ -1003,7 +1008,7 @@ process_control(
const struct ctl_proc *cc;
keyid_t *pkid;
int properlen;
- int maclen;
+ size_t maclen;
DPRINTF(3, ("in process_control()\n"));
@@ -1019,11 +1024,11 @@ process_control(
* If the length is less than required for the header, or
* it is a response or a fragment, ignore this.
*/
- if (rbufp->recv_length < CTL_HEADER_LEN
+ if (rbufp->recv_length < (int)CTL_HEADER_LEN
|| (CTL_RESPONSE | CTL_MORE | CTL_ERROR) & pkt->r_m_e_op
|| pkt->offset != 0) {
DPRINTF(1, ("invalid format in control packet\n"));
- if (rbufp->recv_length < CTL_HEADER_LEN)
+ if (rbufp->recv_length < (int)CTL_HEADER_LEN)
numctltooshort++;
if (CTL_RESPONSE & pkt->r_m_e_op)
numctlinputresp++;
@@ -1063,6 +1068,7 @@ process_control(
req_count = (int)ntohs(pkt->count);
datanotbinflag = FALSE;
datalinelen = 0;
+ datasent = 0;
datapt = rpkt.u.data;
dataend = &rpkt.u.data[CTL_MAX_DATA_LEN];
@@ -1092,7 +1098,7 @@ process_control(
res_authenticate = TRUE;
pkid = (void *)((char *)pkt + properlen);
res_keyid = ntohl(*pkid);
- DPRINTF(3, ("recv_len %d, properlen %d, wants auth with keyid %08x, MAC length=%d\n",
+ DPRINTF(3, ("recv_len %d, properlen %d, wants auth with keyid %08x, MAC length=%zu\n",
rbufp->recv_length, properlen, res_keyid,
maclen));
@@ -1216,7 +1222,7 @@ ctl_flushpkt(
u_char more
)
{
- int i;
+ size_t i;
int dlen;
int sendlen;
int maclen;
@@ -1312,16 +1318,17 @@ static void
ctl_putdata(
const char *dp,
unsigned int dlen,
- int bin /* set to 1 when data is binary */
+ int bin /* set to 1 when data is binary */
)
{
int overhead;
+ unsigned int currentlen;
overhead = 0;
if (!bin) {
datanotbinflag = TRUE;
overhead = 3;
- if (datapt != rpkt.u.data) {
+ if (datasent) {
*datapt++ = ',';
datalinelen++;
if ((dlen + datalinelen + 1) >= MAXDATALINELEN) {
@@ -1338,15 +1345,26 @@ ctl_putdata(
/*
* Save room for trailing junk
*/
- if (dlen + overhead + datapt > dataend) {
+ while (dlen + overhead + datapt > dataend) {
/*
* Not enough room in this one, flush it out.
*/
+ currentlen = MIN(dlen, (unsigned int)(dataend - datapt));
+
+ memcpy(datapt, dp, currentlen);
+
+ datapt += currentlen;
+ dp += currentlen;
+ dlen -= currentlen;
+ datalinelen += currentlen;
+
ctl_flushpkt(CTL_MORE);
}
+
memcpy(datapt, dp, dlen);
datapt += dlen;
datalinelen += dlen;
+ datasent = TRUE;
}
@@ -1424,7 +1442,8 @@ ctl_putunqstr(
static void
ctl_putdblf(
const char * tag,
- const char * fmt,
+ int use_f,
+ int precision,
double d
)
{
@@ -1437,8 +1456,9 @@ ctl_putdblf(
while (*cq != '\0')
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), fmt, d);
+ NTP_INSIST((size_t)(cp - buffer) < sizeof(buffer));
+ snprintf(cp, sizeof(buffer) - (cp - buffer), use_f ? "%.*f" : "%.*g",
+ precision, d);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
}
@@ -1462,13 +1482,40 @@ ctl_putuint(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "%lu", uval);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
}
/*
+ * ctl_putcal - write a decoded calendar data into the response
+ */
+static void
+ctl_putcal(
+ const char *tag,
+ const struct calendar *pcal
+ )
+{
+ char buffer[100];
+ unsigned numch;
+
+ numch = snprintf(buffer, sizeof(buffer),
+ "%s=%04d%02d%02d%02d%02d",
+ tag,
+ pcal->year,
+ pcal->month,
+ pcal->monthday,
+ pcal->hour,
+ pcal->minute
+ );
+ NTP_INSIST(numch < sizeof(buffer));
+ ctl_putdata(buffer, numch, 0);
+
+ return;
+}
+
+/*
* ctl_putfs - write a decoded filestamp into the response
*/
static void
@@ -1493,7 +1540,7 @@ ctl_putfs(
tm = gmtime(&fstamp);
if (NULL == tm)
return;
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_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);
@@ -1522,7 +1569,7 @@ ctl_puthex(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_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);
@@ -1548,7 +1595,7 @@ ctl_putint(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "%ld", ival);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
@@ -1574,7 +1621,7 @@ ctl_putts(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_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);
@@ -1606,7 +1653,7 @@ ctl_putadr(
cq = numtoa(addr32);
else
cq = stoa(addr);
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "%s", cq);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
@@ -1641,9 +1688,9 @@ ctl_putrefid(
return;
iptr = (char *)&refid;
iplim = iptr + sizeof(refid);
- for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
+ for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
iptr++, optr++)
- if (isprint(*iptr))
+ if (isprint((int)*iptr))
*optr = *iptr;
else
*optr = '.';
@@ -1677,7 +1724,7 @@ ctl_putarray(
if (i == 0)
i = NTP_SHIFT;
i--;
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer),
" %.2f", arr[i] * 1e3);
cp += strlen(cp);
@@ -1700,9 +1747,6 @@ ctl_putsys(
double kb;
double dtemp;
const char *ss;
- size_t len;
- int firstvarname;
- const struct ctl_var *k;
#ifdef AUTOKEY
struct cert_info *cp;
#endif /* AUTOKEY */
@@ -1712,7 +1756,7 @@ ctl_putsys(
static const double to_ms =
# ifdef STA_NANO
- 1.0e-6; /* nsec to msec */
+ 1.0e-6; /* nsec to msec */
# else
1.0e-3; /* usec to msec */
# endif
@@ -1848,11 +1892,11 @@ ctl_putsys(
{
char buf[CTL_MAX_DATA_LEN];
//buffPointer, firstElementPointer, buffEndPointer
- register char *buffp, *buffend;
- register int firstVarName;
- register const char *ss;
- register int len;
- register struct ctl_var *k;
+ char *buffp, *buffend;
+ int firstVarName;
+ const char *ss1;
+ int len;
+ const struct ctl_var *k;
buffp = buf;
buffend = buf + sizeof(buf);
@@ -1881,11 +1925,11 @@ ctl_putsys(
continue;
if (NULL == k->text)
continue;
- ss = strchr(k->text, '=');
- if (NULL == ss)
+ ss1 = strchr(k->text, '=');
+ if (NULL == ss1)
len = strlen(k->text);
else
- len = ss - k->text;
+ len = ss1 - k->text;
if (buffp + len + 1 >= buffend)
break;
if (firstVarName) {
@@ -1904,12 +1948,12 @@ ctl_putsys(
ctl_putdata(buf, (unsigned)( buffp - buf ), 0);
break;
}
-
+
case CS_TAI:
if (sys_tai > 0)
ctl_putuint(sys_var[CS_TAI].text, sys_tai);
break;
-
+
case CS_LEAPTAB:
{
leap_signature_t lsig;
@@ -1918,7 +1962,7 @@ ctl_putsys(
ctl_putfs(sys_var[CS_LEAPTAB].text, lsig.ttime);
break;
}
-
+
case CS_LEAPEND:
{
leap_signature_t lsig;
@@ -2063,7 +2107,7 @@ ctl_putsys(
break;
case CS_AUTHRESET:
- ctl_putuint(sys_var[varid].text,
+ ctl_putuint(sys_var[varid].text,
current_time - auth_timereset);
break;
@@ -2097,8 +2141,8 @@ ctl_putsys(
case CS_K_OFFSET:
CTL_IF_KERNLOOP(
- ctl_putdblf,
- (sys_var[varid].text, "%g", to_ms * ntx.offset)
+ ctl_putdblf,
+ (sys_var[varid].text, 0, -1, to_ms * ntx.offset)
);
break;
@@ -2112,7 +2156,7 @@ ctl_putsys(
case CS_K_MAXERR:
CTL_IF_KERNLOOP(
ctl_putdblf,
- (sys_var[varid].text, "%.6g",
+ (sys_var[varid].text, 0, 6,
to_ms * ntx.maxerror)
);
break;
@@ -2120,7 +2164,7 @@ ctl_putsys(
case CS_K_ESTERR:
CTL_IF_KERNLOOP(
ctl_putdblf,
- (sys_var[varid].text, "%.6g",
+ (sys_var[varid].text, 0, 6,
to_ms * ntx.esterror)
);
break;
@@ -2144,7 +2188,7 @@ ctl_putsys(
case CS_K_PRECISION:
CTL_IF_KERNLOOP(
ctl_putdblf,
- (sys_var[varid].text, "%.6g",
+ (sys_var[varid].text, 0, 6,
to_ms * ntx.precision)
);
break;
@@ -2277,6 +2321,9 @@ ctl_putsys(
case CS_FUZZ:
ctl_putdbl(sys_var[varid].text, sys_fuzz * 1e3);
break;
+ case CS_WANDER_THRESH:
+ ctl_putdbl(sys_var[varid].text, wander_threshold * 1e6);
+ break;
#ifdef AUTOKEY
case CS_FLAGS:
if (crypto_flags)
@@ -2319,14 +2366,11 @@ ctl_putsys(
case CS_CERTIF:
for (cp = cinfo; cp != NULL; cp = cp->link) {
- tstamp_t tstamp;
-
snprintf(str, sizeof(str), "%s %s 0x%x",
cp->subject, cp->issuer, cp->flags);
ctl_putstr(sys_var[CS_CERTIF].text, str,
strlen(str));
- tstamp = caltontp(&(cp->last)); /* XXX too small to hold some values, but that's what ctl_putfs requires */
- ctl_putfs(sys_var[CS_REVTIME].text, tstamp);
+ ctl_putcal(sys_var[CS_REVTIME].text, &(cp->last));
}
break;
@@ -2586,7 +2630,7 @@ ctl_putpeer(
memcpy(s, k->text, i);
s += i;
}
- if (s + 2 < be) {
+ if (s + 2 < be) {
*s++ = '"';
*s = '\0';
ctl_putdata(buf, (u_int)(s - buf), 0);
@@ -2665,7 +2709,7 @@ ctl_putpeer(
strlen(p->ident));
break;
-
+
#endif /* AUTOKEY */
}
}
@@ -2774,7 +2818,7 @@ ctl_putclock(
sizeof(buf))
break; /* really long var name */
- snprintf(s, sizeof(buf), "%s=\"",
+ snprintf(s, sizeof(buf), "%s=\"",
clock_var[CC_VARLIST].text);
s += strlen(s);
t = s;
@@ -2887,7 +2931,7 @@ ctl_getitem(
cp++;
while (cp < reqend && *cp != ',') {
*tp++ = *cp++;
- if (tp - buf >= sizeof(buf)) {
+ if ((size_t)(tp - buf) >= sizeof(buf)) {
ctl_error(CERR_BADFMT);
numctlbadpkts++;
NLOG(NLOG_SYSEVENT)
@@ -2959,7 +3003,7 @@ read_status(
{
struct peer *peer;
const u_char *cp;
- int n;
+ size_t n;
/* a_st holds association ID, status pairs alternating */
u_short a_st[CTL_MAX_DATA_LEN / sizeof(u_short)];
@@ -3017,7 +3061,7 @@ read_peervars(void)
const struct ctl_var *v;
struct peer *peer;
const u_char *cp;
- int i;
+ size_t i;
char * valuep;
u_char wants[CP_MAXCODE + 1];
u_int gotvar;
@@ -3262,7 +3306,7 @@ static void configure(
snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"runtime configuration prohibited by restrict ... nomodify");
- ctl_putdata(remote_config.err_msg,
+ ctl_putdata(remote_config.err_msg,
strlen(remote_config.err_msg), 0);
ctl_flushpkt(0);
NLOG(NLOG_SYSINFO)
@@ -3275,6 +3319,20 @@ static void configure(
/* Initialize the remote config buffer */
data_count = reqend - reqpt;
+
+ if (data_count > sizeof(remote_config.buffer) - 2) {
+ snprintf(remote_config.err_msg,
+ sizeof(remote_config.err_msg),
+ "runtime configuration failed: request too long");
+ ctl_putdata(remote_config.err_msg,
+ strlen(remote_config.err_msg), 0);
+ ctl_flushpkt(0);
+ msyslog(LOG_NOTICE,
+ "runtime config from %s rejected: request too long",
+ stoa(&rbufp->recv_srcadr));
+ return;
+ }
+
memcpy(remote_config.buffer, reqpt, data_count);
if (data_count > 0
&& '\n' != remote_config.buffer[data_count - 1])
@@ -3304,7 +3362,7 @@ static void configure(
config_remotely(&rbufp->recv_srcadr);
- /*
+ /*
* Check if errors were reported. If not, output 'Config
* Succeeded'. Else output the error count. It would be nice
* to output any parser error messages.
@@ -3313,10 +3371,10 @@ static void configure(
retval = snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"Config Succeeded");
- if (retval > 0)
+ if (retval > 0)
remote_config.err_pos += retval;
}
-
+
ctl_putdata(remote_config.err_msg, remote_config.err_pos, 0);
ctl_flushpkt(0);
@@ -3679,7 +3737,7 @@ static void read_mru_list(
const char * pch;
char * pnonce;
int nonce_valid;
- int i;
+ size_t i;
int priors;
u_short hash;
mon_entry * mon;
@@ -3708,9 +3766,9 @@ static void read_mru_list(
set_var(&in_parms, maxlstint_text, sizeof(maxlstint_text), 0);
set_var(&in_parms, laddr_text, sizeof(laddr_text), 0);
for (i = 0; i < COUNTOF(last); i++) {
- snprintf(buf, sizeof(buf), last_fmt, i);
+ snprintf(buf, sizeof(buf), last_fmt, (int)i);
set_var(&in_parms, buf, strlen(buf) + 1, 0);
- snprintf(buf, sizeof(buf), addr_fmt, i);
+ snprintf(buf, sizeof(buf), addr_fmt, (int)i);
set_var(&in_parms, buf, strlen(buf) + 1, 0);
}
@@ -3729,6 +3787,7 @@ static void read_mru_list(
while (NULL != (v = ctl_getitem(in_parms, &val)) &&
!(EOV & v->flags)) {
+ int si;
if (!strcmp(nonce_text, v->text)) {
if (NULL != pnonce)
@@ -3751,20 +3810,20 @@ static void read_mru_list(
} else if (!strcmp(laddr_text, v->text)) {
if (decodenetnum(val, &laddr))
lcladr = getinterface(&laddr, 0);
- } else if (1 == sscanf(v->text, last_fmt, &i) &&
- i < COUNTOF(last)) {
+ } else if (1 == sscanf(v->text, last_fmt, &si) &&
+ (size_t)si < COUNTOF(last)) {
if (2 == sscanf(val, "0x%08x.%08x", &ui, &uf)) {
- last[i].l_ui = ui;
- last[i].l_uf = uf;
- if (!SOCK_UNSPEC(&addr[i]) &&
- i == priors)
+ last[si].l_ui = ui;
+ last[si].l_uf = uf;
+ if (!SOCK_UNSPEC(&addr[si]) &&
+ si == priors)
priors++;
}
- } else if (1 == sscanf(v->text, addr_fmt, &i) &&
- i < COUNTOF(addr)) {
- if (decodenetnum(val, &addr[i])
- && last[i].l_ui && last[i].l_uf &&
- i == priors)
+ } else if (1 == sscanf(v->text, addr_fmt, &si) &&
+ (size_t)si < COUNTOF(addr)) {
+ if (decodenetnum(val, &addr[si])
+ && last[si].l_ui && last[si].l_uf &&
+ si == priors)
priors++;
}
}
@@ -3798,7 +3857,7 @@ static void read_mru_list(
* Find the starting point if one was provided.
*/
mon = NULL;
- for (i = 0; i < priors; i++) {
+ for (i = 0; i < (size_t)priors; i++) {
hash = MON_HASH(&addr[i]);
for (mon = mon_hash[hash];
mon != NULL;
@@ -3825,7 +3884,7 @@ static void read_mru_list(
pch = sptoa(&mon->rmtadr);
ctl_putunqstr("addr.older", pch, strlen(pch));
- /*
+ /*
* Move on to the first entry the client doesn't have,
* except in the special case of a limit of one. In
* that case return the starting point entry.
@@ -3835,7 +3894,7 @@ static void read_mru_list(
} else { /* start with the oldest */
mon = TAIL_DLIST(mon_mru_list, mru);
}
-
+
/*
* send up to limit= entries in up to frags= datagrams
*/
@@ -4594,7 +4653,7 @@ ctlfindtrap(
for (n = 0; n < COUNTOF(ctl_traps); n++)
if ((ctl_traps[n].tr_flags & TRAP_INUSE)
&& ADDR_PORT_EQ(raddr, &ctl_traps[n].tr_addr)
- && (linter == ctl_traps[n].tr_localaddr))
+ && (linter == ctl_traps[n].tr_localaddr))
return &ctl_traps[n];
return NULL;
@@ -4651,7 +4710,7 @@ report_event(
const char * src;
u_char errlast;
- errlast = (u_char)err & ~PEER_EVENT;
+ errlast = (u_char)err & ~PEER_EVENT;
if (peer->last_event == errlast)
peer->num_events = 0;
if (peer->num_events >= CTL_PEER_MAXEVENTS)
@@ -4873,7 +4932,7 @@ set_var(
t++;
}
if (*s == *t && ((*t == '=') || !*t)) {
- td = erealloc(k->text, size);
+ td = erealloc((void *)(intptr_t)k->text, size);
memcpy(td, data, size);
k->text = td;
k->flags = def;
@@ -4923,7 +4982,7 @@ get_ext_sys_var(const char *tag)
}
}
}
-
+
return val;
}
@@ -4936,7 +4995,7 @@ free_varlist(
struct ctl_var *k;
if (kv) {
for (k = kv; !(k->flags & EOV); k++)
- free((void *)k->text);
+ free((void *)(intptr_t)k->text);
free((void *)kv);
}
}
diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c
index e66d5c7..5795ae8 100644
--- a/ntpd/ntp_crypto.c
+++ b/ntpd/ntp_crypto.c
@@ -139,6 +139,7 @@ static int calcomp(struct calendar *pjd1, struct calendar *pjd2)
#define TAI_1972 10 /* initial TAI offset (s) */
#define MAX_LEAP 100 /* max UTC leapseconds (s) */
#define VALUE_LEN (6 * 4) /* min response field length */
+#define MAX_VALLEN (65535 - VALUE_LEN)
#define YEAR (60 * 60 * 24 * 365) /* seconds in year */
/*
@@ -179,8 +180,8 @@ static char *rand_file = NULL; /* random seed file */
*/
static int crypto_verify (struct exten *, struct value *,
struct peer *);
-static int crypto_encrypt (struct exten *, struct value *,
- keyid_t *);
+static int crypto_encrypt (const u_char *, u_int, keyid_t *,
+ struct value *);
static int crypto_alice (struct peer *, struct value *);
static int crypto_alice2 (struct peer *, struct value *);
static int crypto_alice3 (struct peer *, struct value *);
@@ -423,7 +424,6 @@ crypto_recv(
int has_mac; /* length of MAC field */
int authlen; /* offset of MAC field */
associd_t associd; /* association ID */
- tstamp_t tstamp = 0; /* timestamp */
tstamp_t fstamp = 0; /* filestamp */
u_int len; /* extension field length */
u_int code; /* extension field opcode */
@@ -448,11 +448,12 @@ crypto_recv(
*/
authlen = LEN_PKT_NOMAC;
hismode = (int)PKT_MODE((&rbufp->recv_pkt)->li_vn_mode);
- while ((has_mac = rbufp->recv_length - authlen) > MAX_MAC_LEN) {
+ while ((has_mac = rbufp->recv_length - authlen) > (int)MAX_MAC_LEN) {
pkt = (u_int32 *)&rbufp->recv_pkt + authlen / 4;
ep = (struct exten *)pkt;
code = ntohl(ep->opcode) & 0xffff0000;
len = ntohl(ep->opcode) & 0x0000ffff;
+ // HMS: Why pkt[1] instead of ep->associd ?
associd = (associd_t)ntohl(pkt[1]);
rval = XEVNT_OK;
#ifdef DEBUG
@@ -473,9 +474,14 @@ crypto_recv(
}
if (len >= VALUE_LEN) {
- tstamp = ntohl(ep->tstamp);
fstamp = ntohl(ep->fstamp);
vallen = ntohl(ep->vallen);
+ /*
+ * Bug 2761: I hope this isn't too early...
+ */
+ if ( vallen == 0
+ || len - VALUE_LEN < vallen)
+ return XEVNT_LEN;
}
switch (code) {
@@ -526,8 +532,9 @@ crypto_recv(
rval = XEVNT_ERR;
break;
}
+ INSIST(len >= VALUE_LEN);
if (vallen == 0 || vallen > MAXHOSTNAME ||
- len < VALUE_LEN + vallen) {
+ len - VALUE_LEN < vallen) {
rval = XEVNT_LEN;
break;
}
@@ -820,15 +827,24 @@ crypto_recv(
* errors.
*/
if (vallen == (u_int)EVP_PKEY_size(host_pkey)) {
+ u_int32 *cookiebuf = malloc(
+ RSA_size(host_pkey->pkey.rsa));
+ if (!cookiebuf) {
+ rval = XEVNT_CKY;
+ break;
+ }
+
if (RSA_private_decrypt(vallen,
(u_char *)ep->pkt,
- (u_char *)&temp32,
+ (u_char *)cookiebuf,
host_pkey->pkey.rsa,
- RSA_PKCS1_OAEP_PADDING) <= 0) {
+ RSA_PKCS1_OAEP_PADDING) != 4) {
rval = XEVNT_CKY;
+ free(cookiebuf);
break;
} else {
- cookie = ntohl(temp32);
+ cookie = ntohl(*cookiebuf);
+ free(cookiebuf);
}
} else {
rval = XEVNT_CKY;
@@ -1185,8 +1201,9 @@ crypto_xmit(
* choice.
*/
case CRYPTO_CERT | CRYPTO_RESP:
- vallen = ntohl(ep->vallen);
- if (vallen == 0 || vallen > MAXHOSTNAME) {
+ vallen = ntohl(ep->vallen); /* Must be <64k */
+ if (vallen == 0 || vallen > MAXHOSTNAME ||
+ len - VALUE_LEN < vallen) {
rval = XEVNT_LEN;
break;
}
@@ -1336,7 +1353,10 @@ crypto_xmit(
* anything goes wrong.
*/
case CRYPTO_COOK | CRYPTO_RESP:
- if ((opcode & 0xffff) < VALUE_LEN) {
+ vallen = ntohl(ep->vallen); /* Must be <64k */
+ if ( vallen == 0
+ || (vallen >= MAX_VALLEN)
+ || (opcode & 0x0000ffff) < VALUE_LEN + vallen) {
rval = XEVNT_LEN;
break;
}
@@ -1344,8 +1364,8 @@ crypto_xmit(
tcookie = cookie;
else
tcookie = peer->hcookie;
- if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) ==
- XEVNT_OK) {
+ if ((rval = crypto_encrypt((const u_char *)ep->pkt, vallen, &tcookie, &vtemp))
+ == XEVNT_OK) {
len = crypto_send(fp, &vtemp, start);
value_free(&vtemp);
}
@@ -1485,13 +1505,16 @@ crypto_verify(
* up to the next word (4 octets).
*/
vallen = ntohl(ep->vallen);
- if (vallen == 0)
+ if ( vallen == 0
+ || vallen > MAX_VALLEN)
return (XEVNT_LEN);
i = (vallen + 3) / 4;
siglen = ntohl(ep->pkt[i++]);
- if (len < VALUE_LEN + ((vallen + 3) / 4) * 4 + ((siglen + 3) /
- 4) * 4)
+ if ( siglen > MAX_VALLEN
+ || len - VALUE_LEN < ((vallen + 3) / 4) * 4
+ || len - VALUE_LEN - ((vallen + 3) / 4) * 4
+ < ((siglen + 3) / 4) * 4)
return (XEVNT_LEN);
/*
@@ -1549,6 +1572,7 @@ crypto_verify(
* proventic bit. What a relief.
*/
EVP_VerifyInit(&ctx, peer->digest);
+ /* XXX: the "+ 12" needs to be at least documented... */
EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12);
if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen,
pkey) <= 0)
@@ -1561,35 +1585,32 @@ crypto_verify(
/*
- * crypto_encrypt - construct encrypted cookie and signature from
- * extension field and cookie
+ * crypto_encrypt - construct vp (encrypted cookie and signature) from
+ * the public key and cookie.
*
- * Returns
+ * Returns:
* XEVNT_OK success
* XEVNT_CKY bad or missing cookie
* XEVNT_PUB bad or missing public key
*/
static int
crypto_encrypt(
- struct exten *ep, /* extension pointer */
- struct value *vp, /* value pointer */
- keyid_t *cookie /* server cookie */
+ const u_char *ptr, /* Public Key */
+ u_int vallen, /* Length of Public Key */
+ keyid_t *cookie, /* server cookie */
+ struct value *vp /* value pointer */
)
{
EVP_PKEY *pkey; /* public key */
EVP_MD_CTX ctx; /* signature context */
tstamp_t tstamp; /* NTP timestamp */
u_int32 temp32;
- u_int len;
- const u_char *ptr;
u_char *puch;
/*
* Extract the public key from the request.
*/
- len = ntohl(ep->vallen);
- ptr = (void *)ep->pkt;
- pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len);
+ pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, vallen);
if (pkey == NULL) {
msyslog(LOG_ERR, "crypto_encrypt: %s",
ERR_error_string(ERR_get_error(), NULL));
@@ -1603,9 +1624,9 @@ crypto_encrypt(
tstamp = crypto_time();
vp->tstamp = htonl(tstamp);
vp->fstamp = hostval.tstamp;
- len = EVP_PKEY_size(pkey);
- vp->vallen = htonl(len);
- vp->ptr = emalloc(len);
+ vallen = EVP_PKEY_size(pkey);
+ vp->vallen = htonl(vallen);
+ vp->ptr = emalloc(vallen);
puch = vp->ptr;
temp32 = htonl(*cookie);
if (RSA_public_encrypt(4, (u_char *)&temp32, puch,
@@ -1623,8 +1644,8 @@ crypto_encrypt(
vp->sig = emalloc(sign_siglen);
EVP_SignInit(&ctx, sign_digest);
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
- EVP_SignUpdate(&ctx, vp->ptr, len);
- if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ EVP_SignUpdate(&ctx, vp->ptr, vallen);
+ if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey))
vp->siglen = htonl(sign_siglen);
return (XEVNT_OK);
}
@@ -1695,6 +1716,9 @@ crypto_ident(
* call in the protocol module.
*
* Returns extension field pointer (no errors)
+ *
+ * XXX: opcode and len should really be 32-bit quantities and
+ * we should make sure that str is not too big.
*/
struct exten *
crypto_args(
@@ -1707,23 +1731,30 @@ crypto_args(
tstamp_t tstamp; /* NTP timestamp */
struct exten *ep; /* extension field pointer */
u_int len; /* extension field length */
+ size_t slen = 0;
tstamp = crypto_time();
len = sizeof(struct exten);
- if (str != NULL)
- len += strlen(str);
+ if (str != NULL) {
+ slen = strlen(str);
+ INSIST(slen < MAX_VALLEN);
+ len += slen;
+ }
ep = emalloc_zero(len);
if (opcode == 0)
return (ep);
+ REQUIRE(0 == (len & ~0x0000ffff));
+ REQUIRE(0 == (opcode & ~0xffff0000));
+
ep->opcode = htonl(opcode + len);
ep->associd = htonl(associd);
ep->tstamp = htonl(tstamp);
ep->fstamp = hostval.tstamp;
ep->vallen = 0;
if (str != NULL) {
- ep->vallen = htonl(strlen(str));
- memcpy((char *)ep->pkt, str, strlen(str));
+ ep->vallen = htonl(slen);
+ memcpy((char *)ep->pkt, str, slen);
}
return (ep);
}
@@ -1736,6 +1767,8 @@ crypto_args(
* Note: it is not polite to send a nonempty signature with zero
* timestamp or a nonzero timestamp with an empty signature, but those
* rules are not enforced here.
+ *
+ * XXX This code won't work on a box with 16-bit ints.
*/
int
crypto_send(
@@ -1745,14 +1778,15 @@ crypto_send(
)
{
u_int len, vallen, siglen, opcode;
- int i, j;
+ u_int i, j;
/*
* Calculate extension field length and check for buffer
* overflow. Leave room for the MAC.
*/
- len = 16;
+ len = 16; /* XXX Document! */
vallen = ntohl(vp->vallen);
+ INSIST(vallen <= MAX_VALLEN);
len += ((vallen + 3) / 4 + 1) * 4;
siglen = ntohl(vp->siglen);
len += ((siglen + 3) / 4 + 1) * 4;
@@ -1773,7 +1807,7 @@ crypto_send(
i = 0;
if (vallen > 0 && vp->ptr != NULL) {
j = vallen / 4;
- if (j * 4 < (int)vallen)
+ if (j * 4 < vallen)
ep->pkt[i + j++] = 0;
memcpy(&ep->pkt[i], vp->ptr, vallen);
i += j;
@@ -1786,13 +1820,14 @@ crypto_send(
ep->pkt[i++] = vp->siglen;
if (siglen > 0 && vp->sig != NULL) {
j = siglen / 4;
- if (j * 4 < (int)siglen)
+ if (j * 4 < siglen)
ep->pkt[i + j++] = 0;
memcpy(&ep->pkt[i], vp->sig, siglen);
i += j;
}
opcode = ntohl(ep->opcode);
ep->opcode = htonl((opcode & 0xffff0000) | len);
+ ENSURE(len <= MAX_VALLEN);
return (len);
}
@@ -1829,7 +1864,6 @@ crypto_update(void)
if (hostval.tstamp == 0)
return;
-
/*
* Sign public key and timestamps. The filestamp is derived from
* the host key file extension from wherever the file was
@@ -1946,7 +1980,7 @@ asn_to_calendar (
struct calendar *pjd /* pointer to result */
)
{
- int len; /* length of ASN1_TIME string */
+ size_t len; /* length of ASN1_TIME string */
char v[24]; /* writable copy of ASN1_TIME string */
unsigned long temp; /* result from strtoul */
@@ -2157,7 +2191,8 @@ crypto_bob(
tstamp_t tstamp; /* NTP timestamp */
BIGNUM *bn, *bk, *r;
u_char *ptr;
- u_int len;
+ u_int len; /* extension field length */
+ u_int vallen = 0; /* value length */
/*
* If the IFF parameters are not valid, something awful
@@ -2172,8 +2207,11 @@ crypto_bob(
/*
* Extract r from the challenge.
*/
- len = ntohl(ep->vallen);
- if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) {
+ 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) {
msyslog(LOG_ERR, "crypto_bob: %s",
ERR_error_string(ERR_get_error(), NULL));
return (XEVNT_ERR);
@@ -2185,7 +2223,7 @@ crypto_bob(
*/
bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new();
sdsa = DSA_SIG_new();
- BN_rand(bk, len * 8, -1, 1); /* k */
+ BN_rand(bk, vallen * 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 */
@@ -2204,30 +2242,37 @@ crypto_bob(
* Encode the values in ASN.1 and sign. The filestamp is from
* the local file.
*/
- len = i2d_DSA_SIG(sdsa, NULL);
- if (len == 0) {
+ vallen = i2d_DSA_SIG(sdsa, NULL);
+ if (vallen == 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);
+ DSA_SIG_free(sdsa);
+ return (XEVNT_LEN);
+ }
memset(vp, 0, sizeof(struct value));
tstamp = crypto_time();
vp->tstamp = htonl(tstamp);
vp->fstamp = htonl(iffkey_info->fstamp);
- vp->vallen = htonl(len);
- ptr = emalloc(len);
+ vp->vallen = htonl(vallen);
+ ptr = emalloc(vallen);
vp->ptr = ptr;
i2d_DSA_SIG(sdsa, &ptr);
DSA_SIG_free(sdsa);
if (tstamp == 0)
return (XEVNT_OK);
+ /* XXX: more validation to make sure the sign fits... */
vp->sig = emalloc(sign_siglen);
EVP_SignInit(&ctx, sign_digest);
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
- EVP_SignUpdate(&ctx, vp->ptr, len);
- if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ EVP_SignUpdate(&ctx, vp->ptr, vallen);
+ if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey))
vp->siglen = htonl(sign_siglen);
return (XEVNT_OK);
}
@@ -3048,7 +3093,7 @@ cert_sign(
X509_gmtime_adj(X509_get_notAfter(cert), YEAR);
subj = X509_get_issuer_name(cert);
X509_NAME_add_entry_by_txt(subj, "commonName", MBSTRING_ASC,
- hostval.ptr, strlen(hostval.ptr), -1, 0);
+ hostval.ptr, strlen((const char *)hostval.ptr), -1, 0);
subj = X509_get_subject_name(req);
X509_set_subject_name(cert, subj);
X509_set_pubkey(cert, pkey);
@@ -3089,7 +3134,7 @@ cert_sign(
vp->vallen = htonl(len);
vp->ptr = emalloc(len);
ptr = vp->ptr;
- i2d_X509(cert, &ptr);
+ i2d_X509(cert, (unsigned char **)(intptr_t)&ptr);
vp->siglen = 0;
if (tstamp != 0) {
vp->sig = emalloc(sign_siglen);
@@ -3421,7 +3466,7 @@ cert_parse(
/*
* Check for a certificate loop.
*/
- if (strcmp(hostval.ptr, ret->issuer) == 0) {
+ if (strcmp((const char *)hostval.ptr, ret->issuer) == 0) {
msyslog(LOG_NOTICE,
"cert_parse: certificate trail loop %s",
ret->subject);
diff --git a/ntpd/ntp_filegen.c b/ntpd/ntp_filegen.c
index a1703a9..4ee9095 100644
--- a/ntpd/ntp_filegen.c
+++ b/ntpd/ntp_filegen.c
@@ -617,7 +617,7 @@ filegen_statsdir(void)
#ifdef DEBUG
void
filegen_unregister(
- char *name
+ const char *name
)
{
struct filegen_entry ** ppfe;
diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c
index 0f335ea..1ee7098 100644
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -217,7 +217,7 @@ static isc_boolean_t socket_multicast_disable(endpt *, sockaddr_u *);
#ifdef DEBUG
static void interface_dump (const endpt *);
static void sockaddr_dump (const sockaddr_u *);
-static void print_interface (const endpt *, char *, char *);
+static void print_interface (const endpt *, const char *, const char *);
#define DPRINT_INTERFACE(level, args) do { if (debug >= (level)) { print_interface args; } } while (0)
#else
#define DPRINT_INTERFACE(level, args) do {} while (0)
@@ -269,7 +269,9 @@ static SOCKET open_socket (sockaddr_u *, int, int, endpt *);
static char * fdbits (int, fd_set *);
static void set_reuseaddr (int);
static isc_boolean_t socket_broadcast_enable (struct interface *, SOCKET, sockaddr_u *);
+#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
static isc_boolean_t socket_broadcast_disable (struct interface *, sockaddr_u *);
+#endif
typedef struct remaddr remaddr_t;
@@ -548,7 +550,7 @@ sockaddr_dump(const sockaddr_u *psau)
* print_interface - helper to output debug information
*/
static void
-print_interface(const endpt *iface, char *pfx, char *sfx)
+print_interface(const endpt *iface, const char *pfx, const char *sfx)
{
printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, ifindex=%u, sin=%s",
pfx,
@@ -714,7 +716,6 @@ is_ip_address(
)
{
struct in_addr in4;
- struct in6_addr in6;
struct addrinfo hints;
struct addrinfo *result;
struct sockaddr_in6 *resaddr6;
@@ -1646,16 +1647,15 @@ set_wildcard_reuse(
static isc_boolean_t
-is_anycast(
+check_flags6(
sockaddr_u *psau,
- const char *name
+ const char *name,
+ u_int32 flags6
)
{
-#if defined(INCLUDE_IPV6_SUPPORT) && defined(SIOCGIFAFLAG_IN6) && \
- defined(IN6_IFF_ANYCAST)
+#if defined(INCLUDE_IPV6_SUPPORT) && defined(SIOCGIFAFLAG_IN6)
struct in6_ifreq ifr6;
int fd;
- u_int32 flags6;
if (psau->sa.sa_family != AF_INET6)
return ISC_FALSE;
@@ -1669,13 +1669,45 @@ is_anycast(
return ISC_FALSE;
}
close(fd);
- flags6 = ifr6.ifr_ifru.ifru_flags6;
- if ((flags6 & IN6_IFF_ANYCAST) != 0)
+ if ((ifr6.ifr_ifru.ifru_flags6 & flags6) != 0)
return ISC_TRUE;
-#endif /* INCLUDE_IPV6_SUPPORT && SIOCGIFAFLAG_IN6 && IN6_IFF_ANYCAST */
+#endif /* INCLUDE_IPV6_SUPPORT && SIOCGIFAFLAG_IN6 */
+ return ISC_FALSE;
+}
+
+static isc_boolean_t
+is_anycast(
+ sockaddr_u *psau,
+ const char *name
+ )
+{
+#ifdef IN6_IFF_ANYCAST
+ return check_flags6(psau, name, IN6_IFF_ANYCAST);
+#else
return ISC_FALSE;
+#endif
}
+static isc_boolean_t
+is_valid(
+ sockaddr_u *psau,
+ const char *name
+ )
+{
+ u_int32 flags6;
+
+ flags6 = 0;
+#ifdef IN6_IFF_DEPARTED
+ flags6 |= IN6_IFF_DEPARTED;
+#endif
+#ifdef IN6_IFF_DETACHED
+ flags6 |= IN6_IFF_DETACHED;
+#endif
+#ifdef IN6_IFF_TENTATIVE
+ flags6 |= IN6_IFF_TENTATIVE;
+#endif
+ return check_flags6(psau, name, flags6) ? ISC_FALSE : ISC_TRUE;
+}
/*
* update_interface strategy
@@ -1809,6 +1841,12 @@ update_interfaces(
continue;
/*
+ * skip any address that is an invalid state to be used
+ */
+ if (!is_valid(&enumep.sin, isc_if.name))
+ continue;
+
+ /*
* map to local *address* in order to map all duplicate
* interfaces to an endpt structure with the appropriate
* socket. Our name space is (ip-address), NOT
@@ -1968,6 +2006,9 @@ update_interfaces(
if (broadcast_client_enabled)
io_setbclient();
+ if (sys_bclient)
+ io_setbclient();
+
return new_interface_found;
}
@@ -2232,6 +2273,7 @@ socket_broadcast_enable(
#endif /* SO_BROADCAST */
}
+#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
/*
* Remove a broadcast address from a given socket
* The socket is in the ep_list all we need to do is disable
@@ -2258,6 +2300,7 @@ socket_broadcast_disable(
return ISC_FALSE;
#endif /* SO_BROADCAST */
}
+#endif /* OS_MISSES_SPECIFIC_ROUTE_UPDATES */
#endif /* OPEN_BCAST_SOCKET */
@@ -2311,7 +2354,7 @@ enable_multicast_if(
#ifdef IP_MULTICAST_LOOP
TYPEOF_IP_MULTICAST_LOOP off = 0;
#endif
-#ifdef IPV6_MULTICAST_LOOP
+#if defined(INCLUDE_IPV6_MULTICAST_SUPPORT) && defined(IPV6_MULTICAST_LOOP)
u_int off6 = 0;
#endif
@@ -2792,7 +2835,6 @@ open_socket(
{
SOCKET fd;
int errval;
- char scopetext[16];
/*
* int is OK for REUSEADR per
* http://www.kohala.com/start/mcast.api.txt
@@ -2942,16 +2984,10 @@ open_socket(
|| debug > 1
#endif
) {
- if (SCOPE(addr))
- snprintf(scopetext, sizeof(scopetext),
- "%%%d", SCOPE(addr));
- else
- scopetext[0] = 0;
-
msyslog(LOG_ERR,
- "bind(%d) AF_INET%s %s%s#%d%s flags 0x%x failed: %m",
+ "bind(%d) AF_INET%s %s#%d%s flags 0x%x failed: %m",
fd, IS_IPV6(addr) ? "6" : "",
- stoa(addr), scopetext, SRCPORT(addr),
+ stoa(addr), SRCPORT(addr),
IS_MCAST(addr) ? " (multicast)" : "",
interf->flags);
}
@@ -3195,8 +3231,8 @@ read_refclock_packet(
}
i = (rp->datalen == 0
- || rp->datalen > sizeof(rb->recv_space))
- ? sizeof(rb->recv_space)
+ || rp->datalen > (int)sizeof(rb->recv_space))
+ ? (int)sizeof(rb->recv_space)
: rp->datalen;
do {
buflen = read(fd, (char *)&rb->recv_space, (u_int)i);
@@ -3318,8 +3354,8 @@ fetch_timestamp(
tvp->tv_usec = (long)(ticks * 1e6 *
sys_tick);
}
- DPRINTF(4, ("fetch_timestamp: system usec network time stamp: %ld.%06ld\n",
- tvp->tv_sec, tvp->tv_usec));
+ DPRINTF(4, ("fetch_timestamp: system usec network time stamp: %jd.%06ld\n",
+ (intmax_t)tvp->tv_sec, (long)tvp->tv_usec));
nts = tval_stamp_to_lfp(*tvp);
break;
#endif /* HAVE_TIMESTAMP */
@@ -3443,6 +3479,29 @@ read_network_packet(
fd, buflen, stoa(&rb->recv_srcadr)));
/*
+ ** Bug 2672: Some OSes (MacOSX and Linux) don't block spoofed ::1
+ */
+
+ if (AF_INET6 == itf->family) {
+ DPRINTF(2, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n",
+ stoa(&rb->recv_srcadr),
+ IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr)),
+ stoa(&itf->sin),
+ !IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&itf->sin))
+ ));
+
+ if ( IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr))
+ && !IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&itf->sin))
+ ) {
+ packets_dropped++;
+ DPRINTF(2, ("DROPPING that packet\n"));
+ freerecvbuf(rb);
+ return buflen;
+ }
+ DPRINTF(2, ("processing that packet\n"));
+ }
+
+ /*
* Got one. Mark how and when it got here,
* put it on the full list and do bookkeeping.
*/
@@ -4010,7 +4069,7 @@ calc_addr_distance(
found_greater = FALSE;
a1_greater = FALSE; /* suppress pot. uninit. warning */
- for (i = 0; i < sizeof(NSRCADR6(a1)); i++) {
+ for (i = 0; i < (int)sizeof(NSRCADR6(a1)); i++) {
if (!found_greater &&
NSRCADR6(a1)[i] != NSRCADR6(a2)[i]) {
found_greater = TRUE;
@@ -4053,7 +4112,7 @@ cmp_addr_distance(
return 1;
}
- for (i = 0; i < sizeof(NSRCADR6(d1)); i++) {
+ for (i = 0; i < (int)sizeof(NSRCADR6(d1)); i++) {
if (NSRCADR6(d1)[i] < NSRCADR6(d2)[i])
return -1;
else if (NSRCADR6(d1)[i] > NSRCADR6(d2)[i])
diff --git a/ntpd/ntp_keyword.h b/ntpd/ntp_keyword.h
index 8b82ec0..7237936 100644
--- a/ntpd/ntp_keyword.h
+++ b/ntpd/ntp_keyword.h
@@ -2,7 +2,7 @@
* ntp_keyword.h
*
* NOTE: edit this file with caution, it is generated by keyword-gen.c
- * Generated 2013-08-04 04:56:14 UTC diff_ignore_line
+ * Generated 2015-03-16 09:05:44 UTC diff_ignore_line
*
*/
#include "ntp_scanner.h"
@@ -10,7 +10,7 @@
#define LOWEST_KEYWORD_ID 258
-const char * const keyword_text[186] = {
+const char * const keyword_text[189] = {
/* 0 258 T_Abbrev */ "abbrev",
/* 1 259 T_Age */ "age",
/* 2 260 T_All */ "all",
@@ -99,109 +99,112 @@ const char * const keyword_text[186] = {
/* 85 343 T_Maxdist */ "maxdist",
/* 86 344 T_Maxmem */ "maxmem",
/* 87 345 T_Maxpoll */ "maxpoll",
- /* 88 346 T_Mem */ "mem",
- /* 89 347 T_Memlock */ "memlock",
- /* 90 348 T_Minclock */ "minclock",
- /* 91 349 T_Mindepth */ "mindepth",
- /* 92 350 T_Mindist */ "mindist",
- /* 93 351 T_Minimum */ "minimum",
- /* 94 352 T_Minpoll */ "minpoll",
- /* 95 353 T_Minsane */ "minsane",
- /* 96 354 T_Mode */ "mode",
- /* 97 355 T_Mode7 */ "mode7",
- /* 98 356 T_Monitor */ "monitor",
- /* 99 357 T_Month */ "month",
- /* 100 358 T_Mru */ "mru",
- /* 101 359 T_Multicastclient */ "multicastclient",
- /* 102 360 T_Nic */ "nic",
- /* 103 361 T_Nolink */ "nolink",
- /* 104 362 T_Nomodify */ "nomodify",
- /* 105 363 T_Nomrulist */ "nomrulist",
- /* 106 364 T_None */ "none",
- /* 107 365 T_Nonvolatile */ "nonvolatile",
- /* 108 366 T_Nopeer */ "nopeer",
- /* 109 367 T_Noquery */ "noquery",
- /* 110 368 T_Noselect */ "noselect",
- /* 111 369 T_Noserve */ "noserve",
- /* 112 370 T_Notrap */ "notrap",
- /* 113 371 T_Notrust */ "notrust",
- /* 114 372 T_Ntp */ "ntp",
- /* 115 373 T_Ntpport */ "ntpport",
- /* 116 374 T_NtpSignDsocket */ "ntpsigndsocket",
- /* 117 375 T_Orphan */ "orphan",
- /* 118 376 T_Orphanwait */ "orphanwait",
- /* 119 377 T_Panic */ "panic",
- /* 120 378 T_Peer */ "peer",
- /* 121 379 T_Peerstats */ "peerstats",
- /* 122 380 T_Phone */ "phone",
- /* 123 381 T_Pid */ "pid",
- /* 124 382 T_Pidfile */ "pidfile",
- /* 125 383 T_Pool */ "pool",
- /* 126 384 T_Port */ "port",
- /* 127 385 T_Preempt */ "preempt",
- /* 128 386 T_Prefer */ "prefer",
- /* 129 387 T_Protostats */ "protostats",
- /* 130 388 T_Pw */ "pw",
- /* 131 389 T_Randfile */ "randfile",
- /* 132 390 T_Rawstats */ "rawstats",
- /* 133 391 T_Refid */ "refid",
- /* 134 392 T_Requestkey */ "requestkey",
- /* 135 393 T_Reset */ "reset",
- /* 136 394 T_Restrict */ "restrict",
- /* 137 395 T_Revoke */ "revoke",
- /* 138 396 T_Rlimit */ "rlimit",
- /* 139 397 T_Saveconfigdir */ "saveconfigdir",
- /* 140 398 T_Server */ "server",
- /* 141 399 T_Setvar */ "setvar",
- /* 142 400 T_Source */ "source",
- /* 143 401 T_Stacksize */ "stacksize",
- /* 144 402 T_Statistics */ "statistics",
- /* 145 403 T_Stats */ "stats",
- /* 146 404 T_Statsdir */ "statsdir",
- /* 147 405 T_Step */ "step",
- /* 148 406 T_Stepout */ "stepout",
- /* 149 407 T_Stratum */ "stratum",
- /* 150 408 T_String */ NULL,
- /* 151 409 T_Sys */ "sys",
- /* 152 410 T_Sysstats */ "sysstats",
- /* 153 411 T_Tick */ "tick",
- /* 154 412 T_Time1 */ "time1",
- /* 155 413 T_Time2 */ "time2",
- /* 156 414 T_Timer */ "timer",
- /* 157 415 T_Timingstats */ "timingstats",
- /* 158 416 T_Tinker */ "tinker",
- /* 159 417 T_Tos */ "tos",
- /* 160 418 T_Trap */ "trap",
- /* 161 419 T_True */ "true",
- /* 162 420 T_Trustedkey */ "trustedkey",
- /* 163 421 T_Ttl */ "ttl",
- /* 164 422 T_Type */ "type",
- /* 165 423 T_U_int */ NULL,
- /* 166 424 T_Unconfig */ "unconfig",
- /* 167 425 T_Unpeer */ "unpeer",
- /* 168 426 T_Version */ "version",
- /* 169 427 T_WanderThreshold */ NULL,
- /* 170 428 T_Week */ "week",
- /* 171 429 T_Wildcard */ "wildcard",
- /* 172 430 T_Xleave */ "xleave",
- /* 173 431 T_Year */ "year",
- /* 174 432 T_Flag */ NULL,
- /* 175 433 T_EOC */ NULL,
- /* 176 434 T_Simulate */ "simulate",
- /* 177 435 T_Beep_Delay */ "beep_delay",
- /* 178 436 T_Sim_Duration */ "simulation_duration",
- /* 179 437 T_Server_Offset */ "server_offset",
- /* 180 438 T_Duration */ "duration",
- /* 181 439 T_Freq_Offset */ "freq_offset",
- /* 182 440 T_Wander */ "wander",
- /* 183 441 T_Jitter */ "jitter",
- /* 184 442 T_Prop_Delay */ "prop_delay",
- /* 185 443 T_Proc_Delay */ "proc_delay"
+ /* 88 346 T_Mdnstries */ "mdnstries",
+ /* 89 347 T_Mem */ "mem",
+ /* 90 348 T_Memlock */ "memlock",
+ /* 91 349 T_Minclock */ "minclock",
+ /* 92 350 T_Mindepth */ "mindepth",
+ /* 93 351 T_Mindist */ "mindist",
+ /* 94 352 T_Minimum */ "minimum",
+ /* 95 353 T_Minpoll */ "minpoll",
+ /* 96 354 T_Minsane */ "minsane",
+ /* 97 355 T_Mode */ "mode",
+ /* 98 356 T_Mode7 */ "mode7",
+ /* 99 357 T_Monitor */ "monitor",
+ /* 100 358 T_Month */ "month",
+ /* 101 359 T_Mru */ "mru",
+ /* 102 360 T_Multicastclient */ "multicastclient",
+ /* 103 361 T_Nic */ "nic",
+ /* 104 362 T_Nolink */ "nolink",
+ /* 105 363 T_Nomodify */ "nomodify",
+ /* 106 364 T_Nomrulist */ "nomrulist",
+ /* 107 365 T_None */ "none",
+ /* 108 366 T_Nonvolatile */ "nonvolatile",
+ /* 109 367 T_Nopeer */ "nopeer",
+ /* 110 368 T_Noquery */ "noquery",
+ /* 111 369 T_Noselect */ "noselect",
+ /* 112 370 T_Noserve */ "noserve",
+ /* 113 371 T_Notrap */ "notrap",
+ /* 114 372 T_Notrust */ "notrust",
+ /* 115 373 T_Ntp */ "ntp",
+ /* 116 374 T_Ntpport */ "ntpport",
+ /* 117 375 T_NtpSignDsocket */ "ntpsigndsocket",
+ /* 118 376 T_Orphan */ "orphan",
+ /* 119 377 T_Orphanwait */ "orphanwait",
+ /* 120 378 T_Panic */ "panic",
+ /* 121 379 T_Peer */ "peer",
+ /* 122 380 T_Peerstats */ "peerstats",
+ /* 123 381 T_Phone */ "phone",
+ /* 124 382 T_Pid */ "pid",
+ /* 125 383 T_Pidfile */ "pidfile",
+ /* 126 384 T_Pool */ "pool",
+ /* 127 385 T_Port */ "port",
+ /* 128 386 T_Preempt */ "preempt",
+ /* 129 387 T_Prefer */ "prefer",
+ /* 130 388 T_Protostats */ "protostats",
+ /* 131 389 T_Pw */ "pw",
+ /* 132 390 T_Randfile */ "randfile",
+ /* 133 391 T_Rawstats */ "rawstats",
+ /* 134 392 T_Refid */ "refid",
+ /* 135 393 T_Requestkey */ "requestkey",
+ /* 136 394 T_Reset */ "reset",
+ /* 137 395 T_Restrict */ "restrict",
+ /* 138 396 T_Revoke */ "revoke",
+ /* 139 397 T_Rlimit */ "rlimit",
+ /* 140 398 T_Saveconfigdir */ "saveconfigdir",
+ /* 141 399 T_Server */ "server",
+ /* 142 400 T_Setvar */ "setvar",
+ /* 143 401 T_Source */ "source",
+ /* 144 402 T_Stacksize */ "stacksize",
+ /* 145 403 T_Statistics */ "statistics",
+ /* 146 404 T_Stats */ "stats",
+ /* 147 405 T_Statsdir */ "statsdir",
+ /* 148 406 T_Step */ "step",
+ /* 149 407 T_Stepback */ "stepback",
+ /* 150 408 T_Stepfwd */ "stepfwd",
+ /* 151 409 T_Stepout */ "stepout",
+ /* 152 410 T_Stratum */ "stratum",
+ /* 153 411 T_String */ NULL,
+ /* 154 412 T_Sys */ "sys",
+ /* 155 413 T_Sysstats */ "sysstats",
+ /* 156 414 T_Tick */ "tick",
+ /* 157 415 T_Time1 */ "time1",
+ /* 158 416 T_Time2 */ "time2",
+ /* 159 417 T_Timer */ "timer",
+ /* 160 418 T_Timingstats */ "timingstats",
+ /* 161 419 T_Tinker */ "tinker",
+ /* 162 420 T_Tos */ "tos",
+ /* 163 421 T_Trap */ "trap",
+ /* 164 422 T_True */ "true",
+ /* 165 423 T_Trustedkey */ "trustedkey",
+ /* 166 424 T_Ttl */ "ttl",
+ /* 167 425 T_Type */ "type",
+ /* 168 426 T_U_int */ NULL,
+ /* 169 427 T_Unconfig */ "unconfig",
+ /* 170 428 T_Unpeer */ "unpeer",
+ /* 171 429 T_Version */ "version",
+ /* 172 430 T_WanderThreshold */ NULL,
+ /* 173 431 T_Week */ "week",
+ /* 174 432 T_Wildcard */ "wildcard",
+ /* 175 433 T_Xleave */ "xleave",
+ /* 176 434 T_Year */ "year",
+ /* 177 435 T_Flag */ NULL,
+ /* 178 436 T_EOC */ NULL,
+ /* 179 437 T_Simulate */ "simulate",
+ /* 180 438 T_Beep_Delay */ "beep_delay",
+ /* 181 439 T_Sim_Duration */ "simulation_duration",
+ /* 182 440 T_Server_Offset */ "server_offset",
+ /* 183 441 T_Duration */ "duration",
+ /* 184 442 T_Freq_Offset */ "freq_offset",
+ /* 185 443 T_Wander */ "wander",
+ /* 186 444 T_Jitter */ "jitter",
+ /* 187 445 T_Prop_Delay */ "prop_delay",
+ /* 188 446 T_Proc_Delay */ "proc_delay"
};
-#define SCANNER_INIT_S 822
+#define SCANNER_INIT_S 837
-const scan_state sst[825] = {
+const scan_state sst[840] = {
/*SS_T( ch, f-by, match, other ), */
0, /* 0 */
S_ST( '-', 3, 322, 0 ), /* 1 */
@@ -247,7 +250,7 @@ const scan_state sst[825] = {
S_ST( 'd', 3, 42, 0 ), /* 41 beep_ */
S_ST( 'e', 3, 43, 0 ), /* 42 beep_d */
S_ST( 'l', 3, 44, 0 ), /* 43 beep_de */
- S_ST( 'a', 3, 435, 0 ), /* 44 beep_del */
+ S_ST( 'a', 3, 438, 0 ), /* 44 beep_del */
S_ST( 'r', 3, 46, 34 ), /* 45 b */
S_ST( 'o', 3, 47, 0 ), /* 46 br */
S_ST( 'a', 3, 48, 0 ), /* 47 bro */
@@ -345,7 +348,7 @@ const scan_state sst[825] = {
S_ST( 'a', 3, 140, 0 ), /* 139 dur */
S_ST( 't', 3, 141, 0 ), /* 140 dura */
S_ST( 'i', 3, 142, 0 ), /* 141 durat */
- S_ST( 'o', 3, 438, 0 ), /* 142 durati */
+ S_ST( 'o', 3, 441, 0 ), /* 142 durati */
S_ST( 'e', 3, 144, 105 ), /* 143 */
S_ST( 'n', 3, 292, 0 ), /* 144 e */
S_ST( 'a', 3, 146, 0 ), /* 145 en */
@@ -371,7 +374,7 @@ const scan_state sst[825] = {
S_ST( 'f', 3, 166, 0 ), /* 165 freq_o */
S_ST( 'f', 3, 167, 0 ), /* 166 freq_of */
S_ST( 's', 3, 168, 0 ), /* 167 freq_off */
- S_ST( 'e', 3, 439, 0 ), /* 168 freq_offs */
+ S_ST( 'e', 3, 442, 0 ), /* 168 freq_offs */
S_ST( 'u', 3, 170, 161 ), /* 169 f */
S_ST( 'd', 3, 171, 0 ), /* 170 fu */
S_ST( 'g', 3, 304, 0 ), /* 171 fud */
@@ -431,7 +434,7 @@ const scan_state sst[825] = {
S_ST( 'i', 3, 226, 0 ), /* 225 j */
S_ST( 't', 3, 227, 0 ), /* 226 ji */
S_ST( 't', 3, 228, 0 ), /* 227 jit */
- S_ST( 'e', 3, 441, 0 ), /* 228 jitt */
+ S_ST( 'e', 3, 444, 0 ), /* 228 jitt */
S_ST( 'k', 3, 236, 224 ), /* 229 */
S_ST( 'e', 3, 324, 0 ), /* 230 k */
S_ST( 'r', 3, 232, 0 ), /* 231 ke */
@@ -456,7 +459,7 @@ const scan_state sst[825] = {
S_ST( 's', 3, 251, 249 ), /* 250 li */
S_ST( 't', 3, 252, 0 ), /* 251 lis */
S_ST( 'e', 3, 332, 0 ), /* 252 list */
- S_ST( 'o', 3, 446, 244 ), /* 253 l */
+ S_ST( 'o', 3, 449, 244 ), /* 253 l */
S_ST( 'g', 3, 315, 0 ), /* 254 lo */
S_ST( 'c', 3, 256, 0 ), /* 255 log */
S_ST( 'o', 3, 257, 0 ), /* 256 logc */
@@ -520,7 +523,7 @@ const scan_state sst[825] = {
S_ST( 'e', 1, 0, 0 ), /* 314 T_Includefile */
S_ST( 'f', 3, 317, 255 ), /* 315 log */
S_ST( 'e', 0, 0, 0 ), /* 316 T_Interface */
- S_ST( 'i', 3, 408, 0 ), /* 317 logf */
+ S_ST( 'i', 3, 411, 0 ), /* 317 logf */
S_ST( 'o', 0, 0, 193 ), /* 318 T_Io */
S_ST( '4', 0, 0, 0 ), /* 319 T_Ipv4 */
S_ST( '4', 0, 0, 0 ), /* 320 T_Ipv4_flag */
@@ -549,484 +552,499 @@ const scan_state sst[825] = {
S_ST( 't', 0, 0, 0 ), /* 343 T_Maxdist */
S_ST( 'm', 0, 0, 0 ), /* 344 T_Maxmem */
S_ST( 'l', 0, 0, 0 ), /* 345 T_Maxpoll */
- S_ST( 'm', 0, 492, 0 ), /* 346 T_Mem */
- S_ST( 'k', 0, 0, 0 ), /* 347 T_Memlock */
- S_ST( 'k', 0, 0, 0 ), /* 348 T_Minclock */
- S_ST( 'h', 0, 0, 0 ), /* 349 T_Mindepth */
- S_ST( 't', 0, 0, 0 ), /* 350 T_Mindist */
- S_ST( 'm', 0, 0, 0 ), /* 351 T_Minimum */
- S_ST( 'l', 0, 0, 0 ), /* 352 T_Minpoll */
- S_ST( 'e', 0, 0, 0 ), /* 353 T_Minsane */
- S_ST( 'e', 0, 355, 0 ), /* 354 T_Mode */
- S_ST( '7', 0, 0, 0 ), /* 355 T_Mode7 */
- S_ST( 'r', 0, 0, 0 ), /* 356 T_Monitor */
- S_ST( 'h', 0, 0, 0 ), /* 357 T_Month */
- S_ST( 'u', 0, 0, 0 ), /* 358 T_Mru */
- S_ST( 't', 2, 0, 0 ), /* 359 T_Multicastclient */
- S_ST( 'c', 0, 0, 0 ), /* 360 T_Nic */
- S_ST( 'k', 0, 0, 0 ), /* 361 T_Nolink */
- S_ST( 'y', 0, 0, 0 ), /* 362 T_Nomodify */
- S_ST( 't', 0, 0, 0 ), /* 363 T_Nomrulist */
- S_ST( 'e', 0, 0, 0 ), /* 364 T_None */
- S_ST( 'e', 0, 0, 0 ), /* 365 T_Nonvolatile */
- S_ST( 'r', 0, 0, 0 ), /* 366 T_Nopeer */
- S_ST( 'y', 0, 0, 0 ), /* 367 T_Noquery */
- S_ST( 't', 0, 0, 0 ), /* 368 T_Noselect */
- S_ST( 'e', 0, 0, 0 ), /* 369 T_Noserve */
- S_ST( 'p', 0, 0, 0 ), /* 370 T_Notrap */
- S_ST( 't', 0, 0, 0 ), /* 371 T_Notrust */
- S_ST( 'p', 0, 588, 0 ), /* 372 T_Ntp */
- S_ST( 't', 0, 0, 0 ), /* 373 T_Ntpport */
- S_ST( 't', 1, 0, 0 ), /* 374 T_NtpSignDsocket */
- S_ST( 'n', 0, 603, 0 ), /* 375 T_Orphan */
- S_ST( 't', 0, 0, 0 ), /* 376 T_Orphanwait */
- S_ST( 'c', 0, 0, 0 ), /* 377 T_Panic */
- S_ST( 'r', 1, 612, 0 ), /* 378 T_Peer */
- S_ST( 's', 0, 0, 0 ), /* 379 T_Peerstats */
- S_ST( 'e', 2, 0, 0 ), /* 380 T_Phone */
- S_ST( 'd', 0, 620, 0 ), /* 381 T_Pid */
- S_ST( 'e', 1, 0, 0 ), /* 382 T_Pidfile */
- S_ST( 'l', 1, 0, 0 ), /* 383 T_Pool */
- S_ST( 't', 0, 0, 0 ), /* 384 T_Port */
- S_ST( 't', 0, 0, 0 ), /* 385 T_Preempt */
- S_ST( 'r', 0, 0, 0 ), /* 386 T_Prefer */
- S_ST( 's', 0, 0, 0 ), /* 387 T_Protostats */
- S_ST( 'w', 1, 0, 626 ), /* 388 T_Pw */
- S_ST( 'e', 1, 0, 0 ), /* 389 T_Randfile */
- S_ST( 's', 0, 0, 0 ), /* 390 T_Rawstats */
- S_ST( 'd', 1, 0, 0 ), /* 391 T_Refid */
- S_ST( 'y', 0, 0, 0 ), /* 392 T_Requestkey */
- S_ST( 't', 0, 0, 0 ), /* 393 T_Reset */
- S_ST( 't', 0, 0, 0 ), /* 394 T_Restrict */
- S_ST( 'e', 0, 0, 0 ), /* 395 T_Revoke */
- S_ST( 't', 0, 0, 0 ), /* 396 T_Rlimit */
- S_ST( 'r', 1, 0, 0 ), /* 397 T_Saveconfigdir */
- S_ST( 'r', 1, 703, 0 ), /* 398 T_Server */
- S_ST( 'r', 1, 0, 0 ), /* 399 T_Setvar */
- S_ST( 'e', 0, 0, 0 ), /* 400 T_Source */
- S_ST( 'e', 0, 0, 0 ), /* 401 T_Stacksize */
- S_ST( 's', 0, 0, 0 ), /* 402 T_Statistics */
- S_ST( 's', 0, 746, 741 ), /* 403 T_Stats */
- S_ST( 'r', 1, 0, 0 ), /* 404 T_Statsdir */
- S_ST( 'p', 0, 749, 0 ), /* 405 T_Step */
- S_ST( 't', 0, 0, 0 ), /* 406 T_Stepout */
- S_ST( 'm', 0, 0, 0 ), /* 407 T_Stratum */
- S_ST( 'l', 3, 334, 0 ), /* 408 logfi */
- S_ST( 's', 0, 756, 0 ), /* 409 T_Sys */
- S_ST( 's', 0, 0, 0 ), /* 410 T_Sysstats */
- S_ST( 'k', 0, 0, 0 ), /* 411 T_Tick */
- S_ST( '1', 0, 0, 0 ), /* 412 T_Time1 */
- S_ST( '2', 0, 0, 412 ), /* 413 T_Time2 */
- S_ST( 'r', 0, 0, 413 ), /* 414 T_Timer */
- S_ST( 's', 0, 0, 0 ), /* 415 T_Timingstats */
- S_ST( 'r', 0, 0, 0 ), /* 416 T_Tinker */
- S_ST( 's', 0, 0, 0 ), /* 417 T_Tos */
- S_ST( 'p', 1, 0, 0 ), /* 418 T_Trap */
- S_ST( 'e', 0, 0, 0 ), /* 419 T_True */
- S_ST( 'y', 0, 0, 0 ), /* 420 T_Trustedkey */
- S_ST( 'l', 0, 0, 0 ), /* 421 T_Ttl */
- S_ST( 'e', 0, 0, 0 ), /* 422 T_Type */
- S_ST( 'o', 3, 427, 254 ), /* 423 lo */
- S_ST( 'g', 1, 0, 0 ), /* 424 T_Unconfig */
- S_ST( 'r', 1, 0, 0 ), /* 425 T_Unpeer */
- S_ST( 'n', 0, 0, 0 ), /* 426 T_Version */
- S_ST( 'p', 3, 432, 0 ), /* 427 loo */
- S_ST( 'k', 0, 0, 0 ), /* 428 T_Week */
- S_ST( 'd', 0, 0, 0 ), /* 429 T_Wildcard */
- S_ST( 'e', 0, 0, 0 ), /* 430 T_Xleave */
- S_ST( 'r', 0, 0, 0 ), /* 431 T_Year */
- S_ST( 's', 3, 433, 0 ), /* 432 loop */
- S_ST( 't', 3, 444, 0 ), /* 433 loops */
- S_ST( 'e', 0, 0, 0 ), /* 434 T_Simulate */
- S_ST( 'y', 0, 0, 0 ), /* 435 T_Beep_Delay */
- S_ST( 'n', 0, 0, 0 ), /* 436 T_Sim_Duration */
- S_ST( 't', 0, 0, 0 ), /* 437 T_Server_Offset */
- S_ST( 'n', 0, 0, 0 ), /* 438 T_Duration */
- S_ST( 't', 0, 0, 0 ), /* 439 T_Freq_Offset */
- S_ST( 'r', 0, 0, 0 ), /* 440 T_Wander */
- S_ST( 'r', 0, 0, 0 ), /* 441 T_Jitter */
- S_ST( 'y', 0, 0, 0 ), /* 442 T_Prop_Delay */
- S_ST( 'y', 0, 0, 0 ), /* 443 T_Proc_Delay */
- S_ST( 'a', 3, 445, 0 ), /* 444 loopst */
- S_ST( 't', 3, 335, 0 ), /* 445 loopsta */
- S_ST( 'w', 3, 447, 423 ), /* 446 lo */
- S_ST( 'p', 3, 448, 0 ), /* 447 low */
- S_ST( 'r', 3, 449, 0 ), /* 448 lowp */
- S_ST( 'i', 3, 450, 0 ), /* 449 lowpr */
- S_ST( 'o', 3, 451, 0 ), /* 450 lowpri */
- S_ST( 't', 3, 452, 0 ), /* 451 lowprio */
- S_ST( 'r', 3, 453, 0 ), /* 452 lowpriot */
- S_ST( 'a', 3, 336, 0 ), /* 453 lowpriotr */
- S_ST( 'm', 3, 528, 237 ), /* 454 */
- S_ST( 'a', 3, 473, 0 ), /* 455 m */
- S_ST( 'n', 3, 457, 0 ), /* 456 ma */
- S_ST( 'y', 3, 458, 0 ), /* 457 man */
- S_ST( 'c', 3, 459, 0 ), /* 458 many */
- S_ST( 'a', 3, 460, 0 ), /* 459 manyc */
- S_ST( 's', 3, 461, 0 ), /* 460 manyca */
- S_ST( 't', 3, 467, 0 ), /* 461 manycas */
- S_ST( 'c', 3, 463, 0 ), /* 462 manycast */
- S_ST( 'l', 3, 464, 0 ), /* 463 manycastc */
- S_ST( 'i', 3, 465, 0 ), /* 464 manycastcl */
- S_ST( 'e', 3, 466, 0 ), /* 465 manycastcli */
- S_ST( 'n', 3, 337, 0 ), /* 466 manycastclie */
- S_ST( 's', 3, 468, 462 ), /* 467 manycast */
- S_ST( 'e', 3, 469, 0 ), /* 468 manycasts */
- S_ST( 'r', 3, 470, 0 ), /* 469 manycastse */
- S_ST( 'v', 3, 471, 0 ), /* 470 manycastser */
- S_ST( 'e', 3, 338, 0 ), /* 471 manycastserv */
- S_ST( 's', 3, 339, 456 ), /* 472 ma */
- S_ST( 'x', 3, 488, 472 ), /* 473 ma */
- S_ST( 'a', 3, 475, 0 ), /* 474 max */
- S_ST( 'g', 3, 340, 0 ), /* 475 maxa */
- S_ST( 'c', 3, 477, 474 ), /* 476 max */
- S_ST( 'l', 3, 478, 0 ), /* 477 maxc */
- S_ST( 'o', 3, 479, 0 ), /* 478 maxcl */
- S_ST( 'c', 3, 341, 0 ), /* 479 maxclo */
- S_ST( 'd', 3, 484, 476 ), /* 480 max */
- S_ST( 'e', 3, 482, 0 ), /* 481 maxd */
- S_ST( 'p', 3, 483, 0 ), /* 482 maxde */
- S_ST( 't', 3, 342, 0 ), /* 483 maxdep */
- S_ST( 'i', 3, 485, 481 ), /* 484 maxd */
- S_ST( 's', 3, 343, 0 ), /* 485 maxdi */
- S_ST( 'm', 3, 487, 480 ), /* 486 max */
- S_ST( 'e', 3, 344, 0 ), /* 487 maxm */
- S_ST( 'p', 3, 489, 486 ), /* 488 max */
- S_ST( 'o', 3, 490, 0 ), /* 489 maxp */
- S_ST( 'l', 3, 345, 0 ), /* 490 maxpo */
- S_ST( 'e', 3, 346, 455 ), /* 491 m */
- S_ST( 'l', 3, 493, 0 ), /* 492 mem */
- S_ST( 'o', 3, 494, 0 ), /* 493 meml */
- S_ST( 'c', 3, 347, 0 ), /* 494 memlo */
- S_ST( 'i', 3, 496, 491 ), /* 495 m */
- S_ST( 'n', 3, 513, 0 ), /* 496 mi */
- S_ST( 'c', 3, 498, 0 ), /* 497 min */
- S_ST( 'l', 3, 499, 0 ), /* 498 minc */
- S_ST( 'o', 3, 500, 0 ), /* 499 mincl */
- S_ST( 'c', 3, 348, 0 ), /* 500 minclo */
- S_ST( 'd', 3, 505, 497 ), /* 501 min */
- S_ST( 'e', 3, 503, 0 ), /* 502 mind */
- S_ST( 'p', 3, 504, 0 ), /* 503 minde */
- S_ST( 't', 3, 349, 0 ), /* 504 mindep */
- S_ST( 'i', 3, 506, 502 ), /* 505 mind */
- S_ST( 's', 3, 350, 0 ), /* 506 mindi */
- S_ST( 'i', 3, 508, 501 ), /* 507 min */
- S_ST( 'm', 3, 509, 0 ), /* 508 mini */
- S_ST( 'u', 3, 351, 0 ), /* 509 minim */
- S_ST( 'p', 3, 511, 507 ), /* 510 min */
- S_ST( 'o', 3, 512, 0 ), /* 511 minp */
- S_ST( 'l', 3, 352, 0 ), /* 512 minpo */
- S_ST( 's', 3, 514, 510 ), /* 513 min */
- S_ST( 'a', 3, 515, 0 ), /* 514 mins */
- S_ST( 'n', 3, 353, 0 ), /* 515 minsa */
- S_ST( 'o', 3, 518, 495 ), /* 516 m */
- S_ST( 'd', 3, 354, 0 ), /* 517 mo */
- S_ST( 'n', 3, 522, 517 ), /* 518 mo */
- S_ST( 'i', 3, 520, 0 ), /* 519 mon */
- S_ST( 't', 3, 521, 0 ), /* 520 moni */
- S_ST( 'o', 3, 356, 0 ), /* 521 monit */
- S_ST( 't', 3, 357, 519 ), /* 522 mon */
- S_ST( 'r', 3, 358, 516 ), /* 523 m */
- S_ST( 's', 3, 525, 523 ), /* 524 m */
- S_ST( 's', 3, 526, 0 ), /* 525 ms */
- S_ST( 'n', 3, 527, 0 ), /* 526 mss */
- S_ST( 't', 3, 328, 0 ), /* 527 mssn */
- S_ST( 'u', 3, 529, 524 ), /* 528 m */
- S_ST( 'l', 3, 530, 0 ), /* 529 mu */
- S_ST( 't', 3, 531, 0 ), /* 530 mul */
- S_ST( 'i', 3, 532, 0 ), /* 531 mult */
- S_ST( 'c', 3, 533, 0 ), /* 532 multi */
- S_ST( 'a', 3, 534, 0 ), /* 533 multic */
- S_ST( 's', 3, 535, 0 ), /* 534 multica */
- S_ST( 't', 3, 536, 0 ), /* 535 multicas */
- S_ST( 'c', 3, 537, 0 ), /* 536 multicast */
- S_ST( 'l', 3, 538, 0 ), /* 537 multicastc */
- S_ST( 'i', 3, 539, 0 ), /* 538 multicastcl */
- S_ST( 'e', 3, 540, 0 ), /* 539 multicastcli */
- S_ST( 'n', 3, 359, 0 ), /* 540 multicastclie */
- S_ST( 'n', 3, 584, 454 ), /* 541 */
- S_ST( 'i', 3, 360, 0 ), /* 542 n */
- S_ST( 'o', 3, 579, 542 ), /* 543 n */
- S_ST( 'l', 3, 545, 0 ), /* 544 no */
- S_ST( 'i', 3, 546, 0 ), /* 545 nol */
- S_ST( 'n', 3, 361, 0 ), /* 546 noli */
- S_ST( 'm', 3, 552, 544 ), /* 547 no */
- S_ST( 'o', 3, 549, 0 ), /* 548 nom */
- S_ST( 'd', 3, 550, 0 ), /* 549 nomo */
- S_ST( 'i', 3, 551, 0 ), /* 550 nomod */
- S_ST( 'f', 3, 362, 0 ), /* 551 nomodi */
- S_ST( 'r', 3, 553, 548 ), /* 552 nom */
- S_ST( 'u', 3, 554, 0 ), /* 553 nomr */
- S_ST( 'l', 3, 555, 0 ), /* 554 nomru */
- S_ST( 'i', 3, 556, 0 ), /* 555 nomrul */
- S_ST( 's', 3, 363, 0 ), /* 556 nomruli */
- S_ST( 'n', 3, 558, 547 ), /* 557 no */
- S_ST( 'v', 3, 559, 364 ), /* 558 non */
- S_ST( 'o', 3, 560, 0 ), /* 559 nonv */
- S_ST( 'l', 3, 561, 0 ), /* 560 nonvo */
- S_ST( 'a', 3, 562, 0 ), /* 561 nonvol */
- S_ST( 't', 3, 563, 0 ), /* 562 nonvola */
- S_ST( 'i', 3, 564, 0 ), /* 563 nonvolat */
- S_ST( 'l', 3, 365, 0 ), /* 564 nonvolati */
- S_ST( 'p', 3, 566, 557 ), /* 565 no */
- S_ST( 'e', 3, 567, 0 ), /* 566 nop */
- S_ST( 'e', 3, 366, 0 ), /* 567 nope */
- S_ST( 'q', 3, 569, 565 ), /* 568 no */
- S_ST( 'u', 3, 570, 0 ), /* 569 noq */
- S_ST( 'e', 3, 571, 0 ), /* 570 noqu */
- S_ST( 'r', 3, 367, 0 ), /* 571 noque */
- S_ST( 's', 3, 573, 568 ), /* 572 no */
- S_ST( 'e', 3, 577, 0 ), /* 573 nos */
- S_ST( 'l', 3, 575, 0 ), /* 574 nose */
- S_ST( 'e', 3, 576, 0 ), /* 575 nosel */
- S_ST( 'c', 3, 368, 0 ), /* 576 nosele */
- S_ST( 'r', 3, 578, 574 ), /* 577 nose */
- S_ST( 'v', 3, 369, 0 ), /* 578 noser */
- S_ST( 't', 3, 580, 572 ), /* 579 no */
- S_ST( 'r', 3, 582, 0 ), /* 580 not */
- S_ST( 'a', 3, 370, 0 ), /* 581 notr */
- S_ST( 'u', 3, 583, 581 ), /* 582 notr */
- S_ST( 's', 3, 371, 0 ), /* 583 notru */
- S_ST( 't', 3, 372, 543 ), /* 584 n */
- S_ST( 'p', 3, 586, 0 ), /* 585 ntp */
- S_ST( 'o', 3, 587, 0 ), /* 586 ntpp */
- S_ST( 'r', 3, 373, 0 ), /* 587 ntppo */
- S_ST( 's', 3, 589, 585 ), /* 588 ntp */
- S_ST( 'i', 3, 590, 0 ), /* 589 ntps */
- S_ST( 'g', 3, 591, 0 ), /* 590 ntpsi */
- S_ST( 'n', 3, 592, 0 ), /* 591 ntpsig */
- S_ST( 'd', 3, 593, 0 ), /* 592 ntpsign */
- S_ST( 's', 3, 594, 0 ), /* 593 ntpsignd */
- S_ST( 'o', 3, 595, 0 ), /* 594 ntpsignds */
- S_ST( 'c', 3, 596, 0 ), /* 595 ntpsigndso */
- S_ST( 'k', 3, 597, 0 ), /* 596 ntpsigndsoc */
- S_ST( 'e', 3, 374, 0 ), /* 597 ntpsigndsock */
- S_ST( 'o', 3, 599, 541 ), /* 598 */
- S_ST( 'r', 3, 600, 0 ), /* 599 o */
- S_ST( 'p', 3, 601, 0 ), /* 600 or */
- S_ST( 'h', 3, 602, 0 ), /* 601 orp */
- S_ST( 'a', 3, 375, 0 ), /* 602 orph */
- S_ST( 'w', 3, 604, 0 ), /* 603 orphan */
- S_ST( 'a', 3, 605, 0 ), /* 604 orphanw */
- S_ST( 'i', 3, 376, 0 ), /* 605 orphanwa */
- S_ST( 'p', 3, 388, 598 ), /* 606 */
- S_ST( 'a', 3, 608, 0 ), /* 607 p */
- S_ST( 'n', 3, 609, 0 ), /* 608 pa */
- S_ST( 'i', 3, 377, 0 ), /* 609 pan */
- S_ST( 'e', 3, 611, 607 ), /* 610 p */
- S_ST( 'e', 3, 378, 0 ), /* 611 pe */
- S_ST( 's', 3, 613, 0 ), /* 612 peer */
- S_ST( 't', 3, 614, 0 ), /* 613 peers */
- S_ST( 'a', 3, 615, 0 ), /* 614 peerst */
- S_ST( 't', 3, 379, 0 ), /* 615 peersta */
- S_ST( 'h', 3, 617, 610 ), /* 616 p */
- S_ST( 'o', 3, 618, 0 ), /* 617 ph */
- S_ST( 'n', 3, 380, 0 ), /* 618 pho */
- S_ST( 'i', 3, 381, 616 ), /* 619 p */
- S_ST( 'f', 3, 621, 0 ), /* 620 pid */
- S_ST( 'i', 3, 622, 0 ), /* 621 pidf */
- S_ST( 'l', 3, 382, 0 ), /* 622 pidfi */
- S_ST( 'o', 3, 625, 619 ), /* 623 p */
- S_ST( 'o', 3, 383, 0 ), /* 624 po */
- S_ST( 'r', 3, 384, 624 ), /* 625 po */
- S_ST( 'r', 3, 633, 623 ), /* 626 p */
- S_ST( 'e', 3, 631, 0 ), /* 627 pr */
- S_ST( 'e', 3, 629, 0 ), /* 628 pre */
- S_ST( 'm', 3, 630, 0 ), /* 629 pree */
- S_ST( 'p', 3, 385, 0 ), /* 630 preem */
- S_ST( 'f', 3, 632, 628 ), /* 631 pre */
- S_ST( 'e', 3, 386, 0 ), /* 632 pref */
- S_ST( 'o', 3, 646, 627 ), /* 633 pr */
- S_ST( 'c', 3, 635, 0 ), /* 634 pro */
- S_ST( '_', 3, 636, 0 ), /* 635 proc */
- S_ST( 'd', 3, 637, 0 ), /* 636 proc_ */
- S_ST( 'e', 3, 638, 0 ), /* 637 proc_d */
- S_ST( 'l', 3, 639, 0 ), /* 638 proc_de */
- S_ST( 'a', 3, 443, 0 ), /* 639 proc_del */
- S_ST( 'p', 3, 641, 634 ), /* 640 pro */
- S_ST( '_', 3, 642, 0 ), /* 641 prop */
- S_ST( 'd', 3, 643, 0 ), /* 642 prop_ */
- S_ST( 'e', 3, 644, 0 ), /* 643 prop_d */
- S_ST( 'l', 3, 645, 0 ), /* 644 prop_de */
- S_ST( 'a', 3, 442, 0 ), /* 645 prop_del */
- S_ST( 't', 3, 647, 640 ), /* 646 pro */
- S_ST( 'o', 3, 648, 0 ), /* 647 prot */
- S_ST( 's', 3, 649, 0 ), /* 648 proto */
- S_ST( 't', 3, 650, 0 ), /* 649 protos */
- S_ST( 'a', 3, 651, 0 ), /* 650 protost */
- S_ST( 't', 3, 387, 0 ), /* 651 protosta */
- S_ST( 'r', 3, 683, 606 ), /* 652 */
- S_ST( 'a', 3, 659, 0 ), /* 653 r */
- S_ST( 'n', 3, 655, 0 ), /* 654 ra */
- S_ST( 'd', 3, 656, 0 ), /* 655 ran */
- S_ST( 'f', 3, 657, 0 ), /* 656 rand */
- S_ST( 'i', 3, 658, 0 ), /* 657 randf */
- S_ST( 'l', 3, 389, 0 ), /* 658 randfi */
- S_ST( 'w', 3, 660, 654 ), /* 659 ra */
- S_ST( 's', 3, 661, 0 ), /* 660 raw */
- S_ST( 't', 3, 662, 0 ), /* 661 raws */
- S_ST( 'a', 3, 663, 0 ), /* 662 rawst */
- S_ST( 't', 3, 390, 0 ), /* 663 rawsta */
- S_ST( 'e', 3, 680, 653 ), /* 664 r */
- S_ST( 'f', 3, 666, 0 ), /* 665 re */
- S_ST( 'i', 3, 391, 0 ), /* 666 ref */
- S_ST( 'q', 3, 668, 665 ), /* 667 re */
- S_ST( 'u', 3, 669, 0 ), /* 668 req */
- S_ST( 'e', 3, 670, 0 ), /* 669 requ */
- S_ST( 's', 3, 671, 0 ), /* 670 reque */
- S_ST( 't', 3, 672, 0 ), /* 671 reques */
- S_ST( 'k', 3, 673, 0 ), /* 672 request */
- S_ST( 'e', 3, 392, 0 ), /* 673 requestk */
- S_ST( 's', 3, 676, 667 ), /* 674 re */
- S_ST( 'e', 3, 393, 0 ), /* 675 res */
- S_ST( 't', 3, 677, 675 ), /* 676 res */
- S_ST( 'r', 3, 678, 0 ), /* 677 rest */
- S_ST( 'i', 3, 679, 0 ), /* 678 restr */
- S_ST( 'c', 3, 394, 0 ), /* 679 restri */
- S_ST( 'v', 3, 681, 674 ), /* 680 re */
- S_ST( 'o', 3, 682, 0 ), /* 681 rev */
- S_ST( 'k', 3, 395, 0 ), /* 682 revo */
- S_ST( 'l', 3, 684, 664 ), /* 683 r */
- S_ST( 'i', 3, 685, 0 ), /* 684 rl */
- S_ST( 'm', 3, 686, 0 ), /* 685 rli */
- S_ST( 'i', 3, 396, 0 ), /* 686 rlim */
- S_ST( 's', 3, 755, 652 ), /* 687 */
- S_ST( 'a', 3, 689, 0 ), /* 688 s */
- S_ST( 'v', 3, 690, 0 ), /* 689 sa */
- S_ST( 'e', 3, 691, 0 ), /* 690 sav */
- S_ST( 'c', 3, 692, 0 ), /* 691 save */
- S_ST( 'o', 3, 693, 0 ), /* 692 savec */
- S_ST( 'n', 3, 694, 0 ), /* 693 saveco */
- S_ST( 'f', 3, 695, 0 ), /* 694 savecon */
- S_ST( 'i', 3, 696, 0 ), /* 695 saveconf */
- S_ST( 'g', 3, 697, 0 ), /* 696 saveconfi */
- S_ST( 'd', 3, 698, 0 ), /* 697 saveconfig */
- S_ST( 'i', 3, 397, 0 ), /* 698 saveconfigd */
- S_ST( 'e', 3, 709, 688 ), /* 699 s */
- S_ST( 'r', 3, 701, 0 ), /* 700 se */
- S_ST( 'v', 3, 702, 0 ), /* 701 ser */
- S_ST( 'e', 3, 398, 0 ), /* 702 serv */
- S_ST( '_', 3, 704, 0 ), /* 703 server */
- S_ST( 'o', 3, 705, 0 ), /* 704 server_ */
- S_ST( 'f', 3, 706, 0 ), /* 705 server_o */
- S_ST( 'f', 3, 707, 0 ), /* 706 server_of */
- S_ST( 's', 3, 708, 0 ), /* 707 server_off */
- S_ST( 'e', 3, 437, 0 ), /* 708 server_offs */
- S_ST( 't', 3, 710, 700 ), /* 709 se */
- S_ST( 'v', 3, 711, 0 ), /* 710 set */
- S_ST( 'a', 3, 399, 0 ), /* 711 setv */
- S_ST( 'i', 3, 713, 699 ), /* 712 s */
- S_ST( 'm', 3, 714, 0 ), /* 713 si */
- S_ST( 'u', 3, 715, 0 ), /* 714 sim */
- S_ST( 'l', 3, 716, 0 ), /* 715 simu */
- S_ST( 'a', 3, 717, 0 ), /* 716 simul */
- S_ST( 't', 3, 718, 0 ), /* 717 simula */
- S_ST( 'i', 3, 719, 434 ), /* 718 simulat */
- S_ST( 'o', 3, 720, 0 ), /* 719 simulati */
- S_ST( 'n', 3, 721, 0 ), /* 720 simulatio */
- S_ST( '_', 3, 722, 0 ), /* 721 simulation */
- S_ST( 'd', 3, 723, 0 ), /* 722 simulation_ */
- S_ST( 'u', 3, 724, 0 ), /* 723 simulation_d */
- S_ST( 'r', 3, 725, 0 ), /* 724 simulation_du */
- S_ST( 'a', 3, 726, 0 ), /* 725 simulation_dur */
- S_ST( 't', 3, 727, 0 ), /* 726 simulation_dura */
- S_ST( 'i', 3, 728, 0 ), /* 727 simulation_durat */
- S_ST( 'o', 3, 436, 0 ), /* 728 simulation_durati */
- S_ST( 'o', 3, 730, 712 ), /* 729 s */
- S_ST( 'u', 3, 731, 0 ), /* 730 so */
- S_ST( 'r', 3, 732, 0 ), /* 731 sou */
- S_ST( 'c', 3, 400, 0 ), /* 732 sour */
- S_ST( 't', 3, 751, 729 ), /* 733 s */
- S_ST( 'a', 3, 740, 0 ), /* 734 st */
- S_ST( 'c', 3, 736, 0 ), /* 735 sta */
- S_ST( 'k', 3, 737, 0 ), /* 736 stac */
- S_ST( 's', 3, 738, 0 ), /* 737 stack */
- S_ST( 'i', 3, 739, 0 ), /* 738 stacks */
- S_ST( 'z', 3, 401, 0 ), /* 739 stacksi */
- S_ST( 't', 3, 403, 735 ), /* 740 sta */
- S_ST( 'i', 3, 742, 0 ), /* 741 stat */
- S_ST( 's', 3, 743, 0 ), /* 742 stati */
- S_ST( 't', 3, 744, 0 ), /* 743 statis */
- S_ST( 'i', 3, 745, 0 ), /* 744 statist */
- S_ST( 'c', 3, 402, 0 ), /* 745 statisti */
- S_ST( 'd', 3, 747, 0 ), /* 746 stats */
- S_ST( 'i', 3, 404, 0 ), /* 747 statsd */
- S_ST( 'e', 3, 405, 734 ), /* 748 st */
- S_ST( 'o', 3, 750, 0 ), /* 749 step */
- S_ST( 'u', 3, 406, 0 ), /* 750 stepo */
- S_ST( 'r', 3, 752, 748 ), /* 751 st */
- S_ST( 'a', 3, 753, 0 ), /* 752 str */
- S_ST( 't', 3, 754, 0 ), /* 753 stra */
- S_ST( 'u', 3, 407, 0 ), /* 754 strat */
- S_ST( 'y', 3, 409, 733 ), /* 755 s */
- S_ST( 's', 3, 757, 0 ), /* 756 sys */
- S_ST( 't', 3, 758, 0 ), /* 757 syss */
- S_ST( 'a', 3, 759, 0 ), /* 758 sysst */
- S_ST( 't', 3, 410, 0 ), /* 759 syssta */
- S_ST( 't', 3, 786, 687 ), /* 760 */
- S_ST( 'i', 3, 772, 0 ), /* 761 t */
- S_ST( 'c', 3, 411, 0 ), /* 762 ti */
- S_ST( 'm', 3, 765, 762 ), /* 763 ti */
- S_ST( 'e', 3, 414, 0 ), /* 764 tim */
- S_ST( 'i', 3, 766, 764 ), /* 765 tim */
- S_ST( 'n', 3, 767, 0 ), /* 766 timi */
- S_ST( 'g', 3, 768, 0 ), /* 767 timin */
- S_ST( 's', 3, 769, 0 ), /* 768 timing */
- S_ST( 't', 3, 770, 0 ), /* 769 timings */
- S_ST( 'a', 3, 771, 0 ), /* 770 timingst */
- S_ST( 't', 3, 415, 0 ), /* 771 timingsta */
- S_ST( 'n', 3, 773, 763 ), /* 772 ti */
- S_ST( 'k', 3, 774, 0 ), /* 773 tin */
- S_ST( 'e', 3, 416, 0 ), /* 774 tink */
- S_ST( 'o', 3, 417, 761 ), /* 775 t */
- S_ST( 'r', 3, 778, 775 ), /* 776 t */
- S_ST( 'a', 3, 418, 0 ), /* 777 tr */
- S_ST( 'u', 3, 779, 777 ), /* 778 tr */
- S_ST( 's', 3, 780, 419 ), /* 779 tru */
- S_ST( 't', 3, 781, 0 ), /* 780 trus */
- S_ST( 'e', 3, 782, 0 ), /* 781 trust */
- S_ST( 'd', 3, 783, 0 ), /* 782 truste */
- S_ST( 'k', 3, 784, 0 ), /* 783 trusted */
- S_ST( 'e', 3, 420, 0 ), /* 784 trustedk */
- S_ST( 't', 3, 421, 776 ), /* 785 t */
- S_ST( 'y', 3, 787, 785 ), /* 786 t */
- S_ST( 'p', 3, 422, 0 ), /* 787 ty */
- S_ST( 'u', 3, 789, 760 ), /* 788 */
- S_ST( 'n', 3, 795, 0 ), /* 789 u */
- S_ST( 'c', 3, 791, 0 ), /* 790 un */
- S_ST( 'o', 3, 792, 0 ), /* 791 unc */
- S_ST( 'n', 3, 793, 0 ), /* 792 unco */
- S_ST( 'f', 3, 794, 0 ), /* 793 uncon */
- S_ST( 'i', 3, 424, 0 ), /* 794 unconf */
- S_ST( 'p', 3, 796, 790 ), /* 795 un */
- S_ST( 'e', 3, 797, 0 ), /* 796 unp */
- S_ST( 'e', 3, 425, 0 ), /* 797 unpe */
- S_ST( 'v', 3, 799, 788 ), /* 798 */
- S_ST( 'e', 3, 800, 0 ), /* 799 v */
- S_ST( 'r', 3, 801, 0 ), /* 800 ve */
- S_ST( 's', 3, 802, 0 ), /* 801 ver */
- S_ST( 'i', 3, 803, 0 ), /* 802 vers */
- S_ST( 'o', 3, 426, 0 ), /* 803 versi */
- S_ST( 'w', 3, 811, 798 ), /* 804 */
- S_ST( 'a', 3, 806, 0 ), /* 805 w */
- S_ST( 'n', 3, 807, 0 ), /* 806 wa */
- S_ST( 'd', 3, 808, 0 ), /* 807 wan */
- S_ST( 'e', 3, 440, 0 ), /* 808 wand */
- S_ST( 'e', 3, 810, 805 ), /* 809 w */
- S_ST( 'e', 3, 428, 0 ), /* 810 we */
- S_ST( 'i', 3, 812, 809 ), /* 811 w */
- S_ST( 'l', 3, 813, 0 ), /* 812 wi */
- S_ST( 'd', 3, 814, 0 ), /* 813 wil */
- S_ST( 'c', 3, 815, 0 ), /* 814 wild */
- S_ST( 'a', 3, 816, 0 ), /* 815 wildc */
- S_ST( 'r', 3, 429, 0 ), /* 816 wildca */
- S_ST( 'x', 3, 818, 804 ), /* 817 */
- S_ST( 'l', 3, 819, 0 ), /* 818 x */
- S_ST( 'e', 3, 820, 0 ), /* 819 xl */
- S_ST( 'a', 3, 821, 0 ), /* 820 xle */
- S_ST( 'v', 3, 430, 0 ), /* 821 xlea */
- S_ST( 'y', 3, 823, 817 ), /* 822 [initial state] */
- S_ST( 'e', 3, 824, 0 ), /* 823 y */
- S_ST( 'a', 3, 431, 0 ) /* 824 ye */
+ S_ST( 's', 0, 0, 0 ), /* 346 T_Mdnstries */
+ S_ST( 'm', 0, 502, 0 ), /* 347 T_Mem */
+ S_ST( 'k', 0, 0, 0 ), /* 348 T_Memlock */
+ S_ST( 'k', 0, 0, 0 ), /* 349 T_Minclock */
+ S_ST( 'h', 0, 0, 0 ), /* 350 T_Mindepth */
+ S_ST( 't', 0, 0, 0 ), /* 351 T_Mindist */
+ S_ST( 'm', 0, 0, 0 ), /* 352 T_Minimum */
+ S_ST( 'l', 0, 0, 0 ), /* 353 T_Minpoll */
+ S_ST( 'e', 0, 0, 0 ), /* 354 T_Minsane */
+ S_ST( 'e', 0, 356, 0 ), /* 355 T_Mode */
+ S_ST( '7', 0, 0, 0 ), /* 356 T_Mode7 */
+ S_ST( 'r', 0, 0, 0 ), /* 357 T_Monitor */
+ S_ST( 'h', 0, 0, 0 ), /* 358 T_Month */
+ S_ST( 'u', 0, 0, 0 ), /* 359 T_Mru */
+ S_ST( 't', 2, 0, 0 ), /* 360 T_Multicastclient */
+ S_ST( 'c', 0, 0, 0 ), /* 361 T_Nic */
+ S_ST( 'k', 0, 0, 0 ), /* 362 T_Nolink */
+ S_ST( 'y', 0, 0, 0 ), /* 363 T_Nomodify */
+ S_ST( 't', 0, 0, 0 ), /* 364 T_Nomrulist */
+ S_ST( 'e', 0, 0, 0 ), /* 365 T_None */
+ S_ST( 'e', 0, 0, 0 ), /* 366 T_Nonvolatile */
+ S_ST( 'r', 0, 0, 0 ), /* 367 T_Nopeer */
+ S_ST( 'y', 0, 0, 0 ), /* 368 T_Noquery */
+ S_ST( 't', 0, 0, 0 ), /* 369 T_Noselect */
+ S_ST( 'e', 0, 0, 0 ), /* 370 T_Noserve */
+ S_ST( 'p', 0, 0, 0 ), /* 371 T_Notrap */
+ S_ST( 't', 0, 0, 0 ), /* 372 T_Notrust */
+ S_ST( 'p', 0, 598, 0 ), /* 373 T_Ntp */
+ S_ST( 't', 0, 0, 0 ), /* 374 T_Ntpport */
+ S_ST( 't', 1, 0, 0 ), /* 375 T_NtpSignDsocket */
+ S_ST( 'n', 0, 613, 0 ), /* 376 T_Orphan */
+ S_ST( 't', 0, 0, 0 ), /* 377 T_Orphanwait */
+ S_ST( 'c', 0, 0, 0 ), /* 378 T_Panic */
+ S_ST( 'r', 1, 622, 0 ), /* 379 T_Peer */
+ S_ST( 's', 0, 0, 0 ), /* 380 T_Peerstats */
+ S_ST( 'e', 2, 0, 0 ), /* 381 T_Phone */
+ S_ST( 'd', 0, 630, 0 ), /* 382 T_Pid */
+ S_ST( 'e', 1, 0, 0 ), /* 383 T_Pidfile */
+ S_ST( 'l', 1, 0, 0 ), /* 384 T_Pool */
+ S_ST( 't', 0, 0, 0 ), /* 385 T_Port */
+ S_ST( 't', 0, 0, 0 ), /* 386 T_Preempt */
+ S_ST( 'r', 0, 0, 0 ), /* 387 T_Prefer */
+ S_ST( 's', 0, 0, 0 ), /* 388 T_Protostats */
+ S_ST( 'w', 1, 0, 636 ), /* 389 T_Pw */
+ S_ST( 'e', 1, 0, 0 ), /* 390 T_Randfile */
+ S_ST( 's', 0, 0, 0 ), /* 391 T_Rawstats */
+ S_ST( 'd', 1, 0, 0 ), /* 392 T_Refid */
+ S_ST( 'y', 0, 0, 0 ), /* 393 T_Requestkey */
+ S_ST( 't', 0, 0, 0 ), /* 394 T_Reset */
+ S_ST( 't', 0, 0, 0 ), /* 395 T_Restrict */
+ S_ST( 'e', 0, 0, 0 ), /* 396 T_Revoke */
+ S_ST( 't', 0, 0, 0 ), /* 397 T_Rlimit */
+ S_ST( 'r', 1, 0, 0 ), /* 398 T_Saveconfigdir */
+ S_ST( 'r', 1, 713, 0 ), /* 399 T_Server */
+ S_ST( 'r', 1, 0, 0 ), /* 400 T_Setvar */
+ S_ST( 'e', 0, 0, 0 ), /* 401 T_Source */
+ S_ST( 'e', 0, 0, 0 ), /* 402 T_Stacksize */
+ S_ST( 's', 0, 0, 0 ), /* 403 T_Statistics */
+ S_ST( 's', 0, 756, 751 ), /* 404 T_Stats */
+ S_ST( 'r', 1, 0, 0 ), /* 405 T_Statsdir */
+ S_ST( 'p', 0, 764, 0 ), /* 406 T_Step */
+ S_ST( 'k', 0, 0, 0 ), /* 407 T_Stepback */
+ S_ST( 'd', 0, 0, 0 ), /* 408 T_Stepfwd */
+ S_ST( 't', 0, 0, 0 ), /* 409 T_Stepout */
+ S_ST( 'm', 0, 0, 0 ), /* 410 T_Stratum */
+ S_ST( 'l', 3, 334, 0 ), /* 411 logfi */
+ S_ST( 's', 0, 771, 0 ), /* 412 T_Sys */
+ S_ST( 's', 0, 0, 0 ), /* 413 T_Sysstats */
+ S_ST( 'k', 0, 0, 0 ), /* 414 T_Tick */
+ S_ST( '1', 0, 0, 0 ), /* 415 T_Time1 */
+ S_ST( '2', 0, 0, 415 ), /* 416 T_Time2 */
+ S_ST( 'r', 0, 0, 416 ), /* 417 T_Timer */
+ S_ST( 's', 0, 0, 0 ), /* 418 T_Timingstats */
+ S_ST( 'r', 0, 0, 0 ), /* 419 T_Tinker */
+ S_ST( 's', 0, 0, 0 ), /* 420 T_Tos */
+ S_ST( 'p', 1, 0, 0 ), /* 421 T_Trap */
+ S_ST( 'e', 0, 0, 0 ), /* 422 T_True */
+ S_ST( 'y', 0, 0, 0 ), /* 423 T_Trustedkey */
+ S_ST( 'l', 0, 0, 0 ), /* 424 T_Ttl */
+ S_ST( 'e', 0, 0, 0 ), /* 425 T_Type */
+ S_ST( 'o', 3, 430, 254 ), /* 426 lo */
+ S_ST( 'g', 1, 0, 0 ), /* 427 T_Unconfig */
+ S_ST( 'r', 1, 0, 0 ), /* 428 T_Unpeer */
+ S_ST( 'n', 0, 0, 0 ), /* 429 T_Version */
+ S_ST( 'p', 3, 435, 0 ), /* 430 loo */
+ S_ST( 'k', 0, 0, 0 ), /* 431 T_Week */
+ S_ST( 'd', 0, 0, 0 ), /* 432 T_Wildcard */
+ S_ST( 'e', 0, 0, 0 ), /* 433 T_Xleave */
+ S_ST( 'r', 0, 0, 0 ), /* 434 T_Year */
+ S_ST( 's', 3, 436, 0 ), /* 435 loop */
+ S_ST( 't', 3, 447, 0 ), /* 436 loops */
+ S_ST( 'e', 0, 0, 0 ), /* 437 T_Simulate */
+ S_ST( 'y', 0, 0, 0 ), /* 438 T_Beep_Delay */
+ S_ST( 'n', 0, 0, 0 ), /* 439 T_Sim_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 440 T_Server_Offset */
+ S_ST( 'n', 0, 0, 0 ), /* 441 T_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 442 T_Freq_Offset */
+ S_ST( 'r', 0, 0, 0 ), /* 443 T_Wander */
+ S_ST( 'r', 0, 0, 0 ), /* 444 T_Jitter */
+ S_ST( 'y', 0, 0, 0 ), /* 445 T_Prop_Delay */
+ S_ST( 'y', 0, 0, 0 ), /* 446 T_Proc_Delay */
+ S_ST( 'a', 3, 448, 0 ), /* 447 loopst */
+ S_ST( 't', 3, 335, 0 ), /* 448 loopsta */
+ S_ST( 'w', 3, 450, 426 ), /* 449 lo */
+ S_ST( 'p', 3, 451, 0 ), /* 450 low */
+ S_ST( 'r', 3, 452, 0 ), /* 451 lowp */
+ S_ST( 'i', 3, 453, 0 ), /* 452 lowpr */
+ S_ST( 'o', 3, 454, 0 ), /* 453 lowpri */
+ S_ST( 't', 3, 455, 0 ), /* 454 lowprio */
+ S_ST( 'r', 3, 456, 0 ), /* 455 lowpriot */
+ S_ST( 'a', 3, 336, 0 ), /* 456 lowpriotr */
+ S_ST( 'm', 3, 538, 237 ), /* 457 */
+ S_ST( 'a', 3, 476, 0 ), /* 458 m */
+ S_ST( 'n', 3, 460, 0 ), /* 459 ma */
+ S_ST( 'y', 3, 461, 0 ), /* 460 man */
+ S_ST( 'c', 3, 462, 0 ), /* 461 many */
+ S_ST( 'a', 3, 463, 0 ), /* 462 manyc */
+ S_ST( 's', 3, 464, 0 ), /* 463 manyca */
+ S_ST( 't', 3, 470, 0 ), /* 464 manycas */
+ S_ST( 'c', 3, 466, 0 ), /* 465 manycast */
+ S_ST( 'l', 3, 467, 0 ), /* 466 manycastc */
+ S_ST( 'i', 3, 468, 0 ), /* 467 manycastcl */
+ S_ST( 'e', 3, 469, 0 ), /* 468 manycastcli */
+ S_ST( 'n', 3, 337, 0 ), /* 469 manycastclie */
+ S_ST( 's', 3, 471, 465 ), /* 470 manycast */
+ S_ST( 'e', 3, 472, 0 ), /* 471 manycasts */
+ S_ST( 'r', 3, 473, 0 ), /* 472 manycastse */
+ S_ST( 'v', 3, 474, 0 ), /* 473 manycastser */
+ S_ST( 'e', 3, 338, 0 ), /* 474 manycastserv */
+ S_ST( 's', 3, 339, 459 ), /* 475 ma */
+ S_ST( 'x', 3, 491, 475 ), /* 476 ma */
+ S_ST( 'a', 3, 478, 0 ), /* 477 max */
+ S_ST( 'g', 3, 340, 0 ), /* 478 maxa */
+ S_ST( 'c', 3, 480, 477 ), /* 479 max */
+ S_ST( 'l', 3, 481, 0 ), /* 480 maxc */
+ S_ST( 'o', 3, 482, 0 ), /* 481 maxcl */
+ S_ST( 'c', 3, 341, 0 ), /* 482 maxclo */
+ S_ST( 'd', 3, 487, 479 ), /* 483 max */
+ S_ST( 'e', 3, 485, 0 ), /* 484 maxd */
+ S_ST( 'p', 3, 486, 0 ), /* 485 maxde */
+ S_ST( 't', 3, 342, 0 ), /* 486 maxdep */
+ S_ST( 'i', 3, 488, 484 ), /* 487 maxd */
+ S_ST( 's', 3, 343, 0 ), /* 488 maxdi */
+ S_ST( 'm', 3, 490, 483 ), /* 489 max */
+ S_ST( 'e', 3, 344, 0 ), /* 490 maxm */
+ S_ST( 'p', 3, 492, 489 ), /* 491 max */
+ S_ST( 'o', 3, 493, 0 ), /* 492 maxp */
+ S_ST( 'l', 3, 345, 0 ), /* 493 maxpo */
+ S_ST( 'd', 3, 495, 458 ), /* 494 m */
+ S_ST( 'n', 3, 496, 0 ), /* 495 md */
+ S_ST( 's', 3, 497, 0 ), /* 496 mdn */
+ S_ST( 't', 3, 498, 0 ), /* 497 mdns */
+ S_ST( 'r', 3, 499, 0 ), /* 498 mdnst */
+ S_ST( 'i', 3, 500, 0 ), /* 499 mdnstr */
+ S_ST( 'e', 3, 346, 0 ), /* 500 mdnstri */
+ S_ST( 'e', 3, 347, 494 ), /* 501 m */
+ S_ST( 'l', 3, 503, 0 ), /* 502 mem */
+ S_ST( 'o', 3, 504, 0 ), /* 503 meml */
+ S_ST( 'c', 3, 348, 0 ), /* 504 memlo */
+ S_ST( 'i', 3, 506, 501 ), /* 505 m */
+ S_ST( 'n', 3, 523, 0 ), /* 506 mi */
+ S_ST( 'c', 3, 508, 0 ), /* 507 min */
+ S_ST( 'l', 3, 509, 0 ), /* 508 minc */
+ S_ST( 'o', 3, 510, 0 ), /* 509 mincl */
+ S_ST( 'c', 3, 349, 0 ), /* 510 minclo */
+ S_ST( 'd', 3, 515, 507 ), /* 511 min */
+ S_ST( 'e', 3, 513, 0 ), /* 512 mind */
+ S_ST( 'p', 3, 514, 0 ), /* 513 minde */
+ S_ST( 't', 3, 350, 0 ), /* 514 mindep */
+ S_ST( 'i', 3, 516, 512 ), /* 515 mind */
+ S_ST( 's', 3, 351, 0 ), /* 516 mindi */
+ S_ST( 'i', 3, 518, 511 ), /* 517 min */
+ S_ST( 'm', 3, 519, 0 ), /* 518 mini */
+ S_ST( 'u', 3, 352, 0 ), /* 519 minim */
+ S_ST( 'p', 3, 521, 517 ), /* 520 min */
+ S_ST( 'o', 3, 522, 0 ), /* 521 minp */
+ S_ST( 'l', 3, 353, 0 ), /* 522 minpo */
+ S_ST( 's', 3, 524, 520 ), /* 523 min */
+ S_ST( 'a', 3, 525, 0 ), /* 524 mins */
+ S_ST( 'n', 3, 354, 0 ), /* 525 minsa */
+ S_ST( 'o', 3, 528, 505 ), /* 526 m */
+ S_ST( 'd', 3, 355, 0 ), /* 527 mo */
+ S_ST( 'n', 3, 532, 527 ), /* 528 mo */
+ S_ST( 'i', 3, 530, 0 ), /* 529 mon */
+ S_ST( 't', 3, 531, 0 ), /* 530 moni */
+ S_ST( 'o', 3, 357, 0 ), /* 531 monit */
+ S_ST( 't', 3, 358, 529 ), /* 532 mon */
+ S_ST( 'r', 3, 359, 526 ), /* 533 m */
+ S_ST( 's', 3, 535, 533 ), /* 534 m */
+ S_ST( 's', 3, 536, 0 ), /* 535 ms */
+ S_ST( 'n', 3, 537, 0 ), /* 536 mss */
+ S_ST( 't', 3, 328, 0 ), /* 537 mssn */
+ S_ST( 'u', 3, 539, 534 ), /* 538 m */
+ S_ST( 'l', 3, 540, 0 ), /* 539 mu */
+ S_ST( 't', 3, 541, 0 ), /* 540 mul */
+ S_ST( 'i', 3, 542, 0 ), /* 541 mult */
+ S_ST( 'c', 3, 543, 0 ), /* 542 multi */
+ S_ST( 'a', 3, 544, 0 ), /* 543 multic */
+ S_ST( 's', 3, 545, 0 ), /* 544 multica */
+ S_ST( 't', 3, 546, 0 ), /* 545 multicas */
+ S_ST( 'c', 3, 547, 0 ), /* 546 multicast */
+ S_ST( 'l', 3, 548, 0 ), /* 547 multicastc */
+ S_ST( 'i', 3, 549, 0 ), /* 548 multicastcl */
+ S_ST( 'e', 3, 550, 0 ), /* 549 multicastcli */
+ S_ST( 'n', 3, 360, 0 ), /* 550 multicastclie */
+ S_ST( 'n', 3, 594, 457 ), /* 551 */
+ S_ST( 'i', 3, 361, 0 ), /* 552 n */
+ S_ST( 'o', 3, 589, 552 ), /* 553 n */
+ S_ST( 'l', 3, 555, 0 ), /* 554 no */
+ S_ST( 'i', 3, 556, 0 ), /* 555 nol */
+ S_ST( 'n', 3, 362, 0 ), /* 556 noli */
+ S_ST( 'm', 3, 562, 554 ), /* 557 no */
+ S_ST( 'o', 3, 559, 0 ), /* 558 nom */
+ S_ST( 'd', 3, 560, 0 ), /* 559 nomo */
+ S_ST( 'i', 3, 561, 0 ), /* 560 nomod */
+ S_ST( 'f', 3, 363, 0 ), /* 561 nomodi */
+ S_ST( 'r', 3, 563, 558 ), /* 562 nom */
+ S_ST( 'u', 3, 564, 0 ), /* 563 nomr */
+ S_ST( 'l', 3, 565, 0 ), /* 564 nomru */
+ S_ST( 'i', 3, 566, 0 ), /* 565 nomrul */
+ S_ST( 's', 3, 364, 0 ), /* 566 nomruli */
+ S_ST( 'n', 3, 568, 557 ), /* 567 no */
+ S_ST( 'v', 3, 569, 365 ), /* 568 non */
+ S_ST( 'o', 3, 570, 0 ), /* 569 nonv */
+ S_ST( 'l', 3, 571, 0 ), /* 570 nonvo */
+ S_ST( 'a', 3, 572, 0 ), /* 571 nonvol */
+ S_ST( 't', 3, 573, 0 ), /* 572 nonvola */
+ S_ST( 'i', 3, 574, 0 ), /* 573 nonvolat */
+ S_ST( 'l', 3, 366, 0 ), /* 574 nonvolati */
+ S_ST( 'p', 3, 576, 567 ), /* 575 no */
+ S_ST( 'e', 3, 577, 0 ), /* 576 nop */
+ S_ST( 'e', 3, 367, 0 ), /* 577 nope */
+ S_ST( 'q', 3, 579, 575 ), /* 578 no */
+ S_ST( 'u', 3, 580, 0 ), /* 579 noq */
+ S_ST( 'e', 3, 581, 0 ), /* 580 noqu */
+ S_ST( 'r', 3, 368, 0 ), /* 581 noque */
+ S_ST( 's', 3, 583, 578 ), /* 582 no */
+ S_ST( 'e', 3, 587, 0 ), /* 583 nos */
+ S_ST( 'l', 3, 585, 0 ), /* 584 nose */
+ S_ST( 'e', 3, 586, 0 ), /* 585 nosel */
+ S_ST( 'c', 3, 369, 0 ), /* 586 nosele */
+ S_ST( 'r', 3, 588, 584 ), /* 587 nose */
+ S_ST( 'v', 3, 370, 0 ), /* 588 noser */
+ S_ST( 't', 3, 590, 582 ), /* 589 no */
+ S_ST( 'r', 3, 592, 0 ), /* 590 not */
+ S_ST( 'a', 3, 371, 0 ), /* 591 notr */
+ S_ST( 'u', 3, 593, 591 ), /* 592 notr */
+ S_ST( 's', 3, 372, 0 ), /* 593 notru */
+ S_ST( 't', 3, 373, 553 ), /* 594 n */
+ S_ST( 'p', 3, 596, 0 ), /* 595 ntp */
+ S_ST( 'o', 3, 597, 0 ), /* 596 ntpp */
+ S_ST( 'r', 3, 374, 0 ), /* 597 ntppo */
+ S_ST( 's', 3, 599, 595 ), /* 598 ntp */
+ S_ST( 'i', 3, 600, 0 ), /* 599 ntps */
+ S_ST( 'g', 3, 601, 0 ), /* 600 ntpsi */
+ S_ST( 'n', 3, 602, 0 ), /* 601 ntpsig */
+ S_ST( 'd', 3, 603, 0 ), /* 602 ntpsign */
+ S_ST( 's', 3, 604, 0 ), /* 603 ntpsignd */
+ S_ST( 'o', 3, 605, 0 ), /* 604 ntpsignds */
+ S_ST( 'c', 3, 606, 0 ), /* 605 ntpsigndso */
+ S_ST( 'k', 3, 607, 0 ), /* 606 ntpsigndsoc */
+ S_ST( 'e', 3, 375, 0 ), /* 607 ntpsigndsock */
+ S_ST( 'o', 3, 609, 551 ), /* 608 */
+ S_ST( 'r', 3, 610, 0 ), /* 609 o */
+ S_ST( 'p', 3, 611, 0 ), /* 610 or */
+ S_ST( 'h', 3, 612, 0 ), /* 611 orp */
+ S_ST( 'a', 3, 376, 0 ), /* 612 orph */
+ S_ST( 'w', 3, 614, 0 ), /* 613 orphan */
+ S_ST( 'a', 3, 615, 0 ), /* 614 orphanw */
+ S_ST( 'i', 3, 377, 0 ), /* 615 orphanwa */
+ S_ST( 'p', 3, 389, 608 ), /* 616 */
+ S_ST( 'a', 3, 618, 0 ), /* 617 p */
+ S_ST( 'n', 3, 619, 0 ), /* 618 pa */
+ S_ST( 'i', 3, 378, 0 ), /* 619 pan */
+ S_ST( 'e', 3, 621, 617 ), /* 620 p */
+ S_ST( 'e', 3, 379, 0 ), /* 621 pe */
+ S_ST( 's', 3, 623, 0 ), /* 622 peer */
+ S_ST( 't', 3, 624, 0 ), /* 623 peers */
+ S_ST( 'a', 3, 625, 0 ), /* 624 peerst */
+ S_ST( 't', 3, 380, 0 ), /* 625 peersta */
+ S_ST( 'h', 3, 627, 620 ), /* 626 p */
+ S_ST( 'o', 3, 628, 0 ), /* 627 ph */
+ S_ST( 'n', 3, 381, 0 ), /* 628 pho */
+ S_ST( 'i', 3, 382, 626 ), /* 629 p */
+ S_ST( 'f', 3, 631, 0 ), /* 630 pid */
+ S_ST( 'i', 3, 632, 0 ), /* 631 pidf */
+ S_ST( 'l', 3, 383, 0 ), /* 632 pidfi */
+ S_ST( 'o', 3, 635, 629 ), /* 633 p */
+ S_ST( 'o', 3, 384, 0 ), /* 634 po */
+ S_ST( 'r', 3, 385, 634 ), /* 635 po */
+ S_ST( 'r', 3, 643, 633 ), /* 636 p */
+ S_ST( 'e', 3, 641, 0 ), /* 637 pr */
+ S_ST( 'e', 3, 639, 0 ), /* 638 pre */
+ S_ST( 'm', 3, 640, 0 ), /* 639 pree */
+ S_ST( 'p', 3, 386, 0 ), /* 640 preem */
+ S_ST( 'f', 3, 642, 638 ), /* 641 pre */
+ S_ST( 'e', 3, 387, 0 ), /* 642 pref */
+ S_ST( 'o', 3, 656, 637 ), /* 643 pr */
+ S_ST( 'c', 3, 645, 0 ), /* 644 pro */
+ S_ST( '_', 3, 646, 0 ), /* 645 proc */
+ S_ST( 'd', 3, 647, 0 ), /* 646 proc_ */
+ S_ST( 'e', 3, 648, 0 ), /* 647 proc_d */
+ S_ST( 'l', 3, 649, 0 ), /* 648 proc_de */
+ S_ST( 'a', 3, 446, 0 ), /* 649 proc_del */
+ S_ST( 'p', 3, 651, 644 ), /* 650 pro */
+ S_ST( '_', 3, 652, 0 ), /* 651 prop */
+ S_ST( 'd', 3, 653, 0 ), /* 652 prop_ */
+ S_ST( 'e', 3, 654, 0 ), /* 653 prop_d */
+ S_ST( 'l', 3, 655, 0 ), /* 654 prop_de */
+ S_ST( 'a', 3, 445, 0 ), /* 655 prop_del */
+ S_ST( 't', 3, 657, 650 ), /* 656 pro */
+ S_ST( 'o', 3, 658, 0 ), /* 657 prot */
+ S_ST( 's', 3, 659, 0 ), /* 658 proto */
+ S_ST( 't', 3, 660, 0 ), /* 659 protos */
+ S_ST( 'a', 3, 661, 0 ), /* 660 protost */
+ S_ST( 't', 3, 388, 0 ), /* 661 protosta */
+ S_ST( 'r', 3, 693, 616 ), /* 662 */
+ S_ST( 'a', 3, 669, 0 ), /* 663 r */
+ S_ST( 'n', 3, 665, 0 ), /* 664 ra */
+ S_ST( 'd', 3, 666, 0 ), /* 665 ran */
+ S_ST( 'f', 3, 667, 0 ), /* 666 rand */
+ S_ST( 'i', 3, 668, 0 ), /* 667 randf */
+ S_ST( 'l', 3, 390, 0 ), /* 668 randfi */
+ S_ST( 'w', 3, 670, 664 ), /* 669 ra */
+ S_ST( 's', 3, 671, 0 ), /* 670 raw */
+ S_ST( 't', 3, 672, 0 ), /* 671 raws */
+ S_ST( 'a', 3, 673, 0 ), /* 672 rawst */
+ S_ST( 't', 3, 391, 0 ), /* 673 rawsta */
+ S_ST( 'e', 3, 690, 663 ), /* 674 r */
+ S_ST( 'f', 3, 676, 0 ), /* 675 re */
+ S_ST( 'i', 3, 392, 0 ), /* 676 ref */
+ S_ST( 'q', 3, 678, 675 ), /* 677 re */
+ S_ST( 'u', 3, 679, 0 ), /* 678 req */
+ S_ST( 'e', 3, 680, 0 ), /* 679 requ */
+ S_ST( 's', 3, 681, 0 ), /* 680 reque */
+ S_ST( 't', 3, 682, 0 ), /* 681 reques */
+ S_ST( 'k', 3, 683, 0 ), /* 682 request */
+ S_ST( 'e', 3, 393, 0 ), /* 683 requestk */
+ S_ST( 's', 3, 686, 677 ), /* 684 re */
+ S_ST( 'e', 3, 394, 0 ), /* 685 res */
+ S_ST( 't', 3, 687, 685 ), /* 686 res */
+ S_ST( 'r', 3, 688, 0 ), /* 687 rest */
+ S_ST( 'i', 3, 689, 0 ), /* 688 restr */
+ S_ST( 'c', 3, 395, 0 ), /* 689 restri */
+ S_ST( 'v', 3, 691, 684 ), /* 690 re */
+ S_ST( 'o', 3, 692, 0 ), /* 691 rev */
+ S_ST( 'k', 3, 396, 0 ), /* 692 revo */
+ S_ST( 'l', 3, 694, 674 ), /* 693 r */
+ S_ST( 'i', 3, 695, 0 ), /* 694 rl */
+ S_ST( 'm', 3, 696, 0 ), /* 695 rli */
+ S_ST( 'i', 3, 397, 0 ), /* 696 rlim */
+ S_ST( 's', 3, 770, 662 ), /* 697 */
+ S_ST( 'a', 3, 699, 0 ), /* 698 s */
+ S_ST( 'v', 3, 700, 0 ), /* 699 sa */
+ S_ST( 'e', 3, 701, 0 ), /* 700 sav */
+ S_ST( 'c', 3, 702, 0 ), /* 701 save */
+ S_ST( 'o', 3, 703, 0 ), /* 702 savec */
+ S_ST( 'n', 3, 704, 0 ), /* 703 saveco */
+ S_ST( 'f', 3, 705, 0 ), /* 704 savecon */
+ S_ST( 'i', 3, 706, 0 ), /* 705 saveconf */
+ S_ST( 'g', 3, 707, 0 ), /* 706 saveconfi */
+ S_ST( 'd', 3, 708, 0 ), /* 707 saveconfig */
+ S_ST( 'i', 3, 398, 0 ), /* 708 saveconfigd */
+ S_ST( 'e', 3, 719, 698 ), /* 709 s */
+ S_ST( 'r', 3, 711, 0 ), /* 710 se */
+ S_ST( 'v', 3, 712, 0 ), /* 711 ser */
+ S_ST( 'e', 3, 399, 0 ), /* 712 serv */
+ S_ST( '_', 3, 714, 0 ), /* 713 server */
+ S_ST( 'o', 3, 715, 0 ), /* 714 server_ */
+ S_ST( 'f', 3, 716, 0 ), /* 715 server_o */
+ S_ST( 'f', 3, 717, 0 ), /* 716 server_of */
+ S_ST( 's', 3, 718, 0 ), /* 717 server_off */
+ S_ST( 'e', 3, 440, 0 ), /* 718 server_offs */
+ S_ST( 't', 3, 720, 710 ), /* 719 se */
+ S_ST( 'v', 3, 721, 0 ), /* 720 set */
+ S_ST( 'a', 3, 400, 0 ), /* 721 setv */
+ S_ST( 'i', 3, 723, 709 ), /* 722 s */
+ S_ST( 'm', 3, 724, 0 ), /* 723 si */
+ S_ST( 'u', 3, 725, 0 ), /* 724 sim */
+ S_ST( 'l', 3, 726, 0 ), /* 725 simu */
+ S_ST( 'a', 3, 727, 0 ), /* 726 simul */
+ S_ST( 't', 3, 728, 0 ), /* 727 simula */
+ S_ST( 'i', 3, 729, 437 ), /* 728 simulat */
+ S_ST( 'o', 3, 730, 0 ), /* 729 simulati */
+ S_ST( 'n', 3, 731, 0 ), /* 730 simulatio */
+ S_ST( '_', 3, 732, 0 ), /* 731 simulation */
+ S_ST( 'd', 3, 733, 0 ), /* 732 simulation_ */
+ S_ST( 'u', 3, 734, 0 ), /* 733 simulation_d */
+ S_ST( 'r', 3, 735, 0 ), /* 734 simulation_du */
+ S_ST( 'a', 3, 736, 0 ), /* 735 simulation_dur */
+ S_ST( 't', 3, 737, 0 ), /* 736 simulation_dura */
+ S_ST( 'i', 3, 738, 0 ), /* 737 simulation_durat */
+ S_ST( 'o', 3, 439, 0 ), /* 738 simulation_durati */
+ S_ST( 'o', 3, 740, 722 ), /* 739 s */
+ S_ST( 'u', 3, 741, 0 ), /* 740 so */
+ S_ST( 'r', 3, 742, 0 ), /* 741 sou */
+ S_ST( 'c', 3, 401, 0 ), /* 742 sour */
+ S_ST( 't', 3, 766, 739 ), /* 743 s */
+ S_ST( 'a', 3, 750, 0 ), /* 744 st */
+ S_ST( 'c', 3, 746, 0 ), /* 745 sta */
+ S_ST( 'k', 3, 747, 0 ), /* 746 stac */
+ S_ST( 's', 3, 748, 0 ), /* 747 stack */
+ S_ST( 'i', 3, 749, 0 ), /* 748 stacks */
+ S_ST( 'z', 3, 402, 0 ), /* 749 stacksi */
+ S_ST( 't', 3, 404, 745 ), /* 750 sta */
+ S_ST( 'i', 3, 752, 0 ), /* 751 stat */
+ S_ST( 's', 3, 753, 0 ), /* 752 stati */
+ S_ST( 't', 3, 754, 0 ), /* 753 statis */
+ S_ST( 'i', 3, 755, 0 ), /* 754 statist */
+ S_ST( 'c', 3, 403, 0 ), /* 755 statisti */
+ S_ST( 'd', 3, 757, 0 ), /* 756 stats */
+ S_ST( 'i', 3, 405, 0 ), /* 757 statsd */
+ S_ST( 'e', 3, 406, 744 ), /* 758 st */
+ S_ST( 'b', 3, 760, 0 ), /* 759 step */
+ S_ST( 'a', 3, 761, 0 ), /* 760 stepb */
+ S_ST( 'c', 3, 407, 0 ), /* 761 stepba */
+ S_ST( 'f', 3, 763, 759 ), /* 762 step */
+ S_ST( 'w', 3, 408, 0 ), /* 763 stepf */
+ S_ST( 'o', 3, 765, 762 ), /* 764 step */
+ S_ST( 'u', 3, 409, 0 ), /* 765 stepo */
+ S_ST( 'r', 3, 767, 758 ), /* 766 st */
+ S_ST( 'a', 3, 768, 0 ), /* 767 str */
+ S_ST( 't', 3, 769, 0 ), /* 768 stra */
+ S_ST( 'u', 3, 410, 0 ), /* 769 strat */
+ S_ST( 'y', 3, 412, 743 ), /* 770 s */
+ S_ST( 's', 3, 772, 0 ), /* 771 sys */
+ S_ST( 't', 3, 773, 0 ), /* 772 syss */
+ S_ST( 'a', 3, 774, 0 ), /* 773 sysst */
+ S_ST( 't', 3, 413, 0 ), /* 774 syssta */
+ S_ST( 't', 3, 801, 697 ), /* 775 */
+ S_ST( 'i', 3, 787, 0 ), /* 776 t */
+ S_ST( 'c', 3, 414, 0 ), /* 777 ti */
+ S_ST( 'm', 3, 780, 777 ), /* 778 ti */
+ S_ST( 'e', 3, 417, 0 ), /* 779 tim */
+ S_ST( 'i', 3, 781, 779 ), /* 780 tim */
+ S_ST( 'n', 3, 782, 0 ), /* 781 timi */
+ S_ST( 'g', 3, 783, 0 ), /* 782 timin */
+ S_ST( 's', 3, 784, 0 ), /* 783 timing */
+ S_ST( 't', 3, 785, 0 ), /* 784 timings */
+ S_ST( 'a', 3, 786, 0 ), /* 785 timingst */
+ S_ST( 't', 3, 418, 0 ), /* 786 timingsta */
+ S_ST( 'n', 3, 788, 778 ), /* 787 ti */
+ S_ST( 'k', 3, 789, 0 ), /* 788 tin */
+ S_ST( 'e', 3, 419, 0 ), /* 789 tink */
+ S_ST( 'o', 3, 420, 776 ), /* 790 t */
+ S_ST( 'r', 3, 793, 790 ), /* 791 t */
+ S_ST( 'a', 3, 421, 0 ), /* 792 tr */
+ S_ST( 'u', 3, 794, 792 ), /* 793 tr */
+ S_ST( 's', 3, 795, 422 ), /* 794 tru */
+ S_ST( 't', 3, 796, 0 ), /* 795 trus */
+ S_ST( 'e', 3, 797, 0 ), /* 796 trust */
+ S_ST( 'd', 3, 798, 0 ), /* 797 truste */
+ S_ST( 'k', 3, 799, 0 ), /* 798 trusted */
+ S_ST( 'e', 3, 423, 0 ), /* 799 trustedk */
+ S_ST( 't', 3, 424, 791 ), /* 800 t */
+ S_ST( 'y', 3, 802, 800 ), /* 801 t */
+ S_ST( 'p', 3, 425, 0 ), /* 802 ty */
+ S_ST( 'u', 3, 804, 775 ), /* 803 */
+ S_ST( 'n', 3, 810, 0 ), /* 804 u */
+ S_ST( 'c', 3, 806, 0 ), /* 805 un */
+ S_ST( 'o', 3, 807, 0 ), /* 806 unc */
+ S_ST( 'n', 3, 808, 0 ), /* 807 unco */
+ S_ST( 'f', 3, 809, 0 ), /* 808 uncon */
+ S_ST( 'i', 3, 427, 0 ), /* 809 unconf */
+ S_ST( 'p', 3, 811, 805 ), /* 810 un */
+ S_ST( 'e', 3, 812, 0 ), /* 811 unp */
+ S_ST( 'e', 3, 428, 0 ), /* 812 unpe */
+ S_ST( 'v', 3, 814, 803 ), /* 813 */
+ S_ST( 'e', 3, 815, 0 ), /* 814 v */
+ S_ST( 'r', 3, 816, 0 ), /* 815 ve */
+ S_ST( 's', 3, 817, 0 ), /* 816 ver */
+ S_ST( 'i', 3, 818, 0 ), /* 817 vers */
+ S_ST( 'o', 3, 429, 0 ), /* 818 versi */
+ S_ST( 'w', 3, 826, 813 ), /* 819 */
+ S_ST( 'a', 3, 821, 0 ), /* 820 w */
+ S_ST( 'n', 3, 822, 0 ), /* 821 wa */
+ S_ST( 'd', 3, 823, 0 ), /* 822 wan */
+ S_ST( 'e', 3, 443, 0 ), /* 823 wand */
+ S_ST( 'e', 3, 825, 820 ), /* 824 w */
+ S_ST( 'e', 3, 431, 0 ), /* 825 we */
+ S_ST( 'i', 3, 827, 824 ), /* 826 w */
+ S_ST( 'l', 3, 828, 0 ), /* 827 wi */
+ S_ST( 'd', 3, 829, 0 ), /* 828 wil */
+ S_ST( 'c', 3, 830, 0 ), /* 829 wild */
+ S_ST( 'a', 3, 831, 0 ), /* 830 wildc */
+ S_ST( 'r', 3, 432, 0 ), /* 831 wildca */
+ S_ST( 'x', 3, 833, 819 ), /* 832 */
+ S_ST( 'l', 3, 834, 0 ), /* 833 x */
+ S_ST( 'e', 3, 835, 0 ), /* 834 xl */
+ S_ST( 'a', 3, 836, 0 ), /* 835 xle */
+ S_ST( 'v', 3, 433, 0 ), /* 836 xlea */
+ S_ST( 'y', 3, 838, 832 ), /* 837 [initial state] */
+ S_ST( 'e', 3, 839, 0 ), /* 838 y */
+ S_ST( 'a', 3, 434, 0 ) /* 839 ye */
};
diff --git a/ntpd/ntp_leapsec.c b/ntpd/ntp_leapsec.c
index 14b8cd9..eeef89f 100644
--- a/ntpd/ntp_leapsec.c
+++ b/ntpd/ntp_leapsec.c
@@ -787,7 +787,7 @@ leapsec_add(
const vint64 * now64 ,
int insert)
{
- vint64 ttime, stime;
+ vint64 ttime, starttime;
struct calendar fts;
leap_info_t li;
@@ -815,12 +815,12 @@ leapsec_add(
fts.hour = 0;
fts.minute = 0;
fts.second = 0;
- stime = ntpcal_date_to_ntp64(&fts);
+ starttime = ntpcal_date_to_ntp64(&fts);
fts.month++;
ttime = ntpcal_date_to_ntp64(&fts);
li.ttime = ttime;
- li.stime = ttime.D_s.lo - stime.D_s.lo;
+ li.stime = ttime.D_s.lo - starttime.D_s.lo;
li.taiof = (pt->head.size ? pt->info[0].taiof : pt->head.base_tai)
+ (insert ? 1 : -1);
li.dynls = 1;
@@ -839,7 +839,7 @@ leapsec_raw(
int taiof,
int dynls)
{
- vint64 stime;
+ vint64 starttime;
struct calendar fts;
leap_info_t li;
@@ -856,9 +856,9 @@ leapsec_raw(
return FALSE;
}
fts.month--; /* was in range 1..12, no overflow here! */
- stime = ntpcal_date_to_ntp64(&fts);
+ starttime = ntpcal_date_to_ntp64(&fts);
li.ttime = *ttime;
- li.stime = ttime->D_s.lo - stime.D_s.lo;
+ li.stime = ttime->D_s.lo - starttime.D_s.lo;
li.taiof = (int16_t)taiof;
li.dynls = (dynls != 0);
return add_range(pt, &li);
@@ -920,7 +920,8 @@ do_leap_hash(
/* now do the byte twiddle */
for (wi=0; wi < 5; ++wi)
for (di=3; di >= 0; --di) {
- mac->hv[wi*4 + di] = (unsigned char)tmp[wi];
+ mac->hv[wi*4 + di] =
+ (unsigned char)(tmp[wi] & 0x0FF);
tmp[wi] >>= 8;
}
return TRUE;
@@ -972,7 +973,7 @@ leapsec_validate(
do_hash_data(&mdctx, line+2);
else if (!strncmp(line, "#$", 2))
do_hash_data(&mdctx, line+2);
- else if (isdigit(line[0]))
+ else if (isdigit((unsigned char)line[0]))
do_hash_data(&mdctx, line);
}
isc_sha1_final(&mdctx, ldig.hv);
diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c
index 87db726..e47f83b 100644
--- a/ntpd/ntp_loopfilter.c
+++ b/ntpd/ntp_loopfilter.c
@@ -8,6 +8,9 @@
# include <config.h>
#endif
+#ifdef USE_SNPRINTB
+# include <util.h>
+#endif
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_unixtime.h"
@@ -43,7 +46,7 @@
#define CLOCK_LIMIT 30 /* poll-adjust threshold */
#define CLOCK_PGATE 4. /* poll-adjust gate */
#define PPS_MAXAGE 120 /* kernel pps signal timeout (s) */
-#define FREQTOD(x) ((x) / 65536e6) /* NTP to double */
+#define FREQTOD(x) ((x) / 65536e6) /* NTP to double */
#define DTOFREQ(x) ((int32)((x) * 65536e6)) /* double to NTP */
/*
@@ -103,7 +106,8 @@
/*
* Program variables that can be tinkered.
*/
-double clock_max = CLOCK_MAX; /* step threshold */
+double clock_max_back = CLOCK_MAX; /* step threshold */
+double clock_max_fwd = CLOCK_MAX; /* step threshold */
double clock_minstep = CLOCK_MINSTEP; /* stepout threshold */
double clock_panic = CLOCK_PANIC; /* panic threshold */
double clock_phi = CLOCK_PHI; /* dispersion rate (s/s) */
@@ -149,8 +153,10 @@ int kern_enable = TRUE; /* kernel support enabled */
int hardpps_enable; /* kernel PPS discipline enabled */
int ext_enable; /* external clock enabled */
int pps_stratum; /* pps stratum */
-int allow_panic = FALSE; /* allow panic correction */
-int mode_ntpdate = FALSE; /* exit on first clock set */
+int kernel_status; /* from ntp_adjtime */
+int allow_panic = FALSE; /* allow panic correction (-g) */
+int force_step_once = FALSE; /* always step time once at startup (-G) */
+int mode_ntpdate = FALSE; /* exit on first clock set (-q) */
int freq_cnt; /* initial frequency clamp */
int freq_set; /* initial set frequency switch */
@@ -182,6 +188,21 @@ static sigjmp_buf env; /* environment var. for pll_trap() */
#endif /* SIGSYS */
#endif /* KERNEL_PLL */
+static void
+sync_status(const char *what, int ostatus, int nstatus)
+{
+ char obuf[256], nbuf[256], tbuf[1024];
+#if defined(USE_SNPRINTB) && defined (STA_FMT)
+ snprintb(obuf, sizeof(obuf), STA_FMT, ostatus);
+ snprintb(nbuf, sizeof(nbuf), STA_FMT, nstatus);
+#else
+ snprintf(obuf, sizeof(obuf), "%04x", ostatus);
+ snprintf(nbuf, sizeof(nbuf), "%04x", nstatus);
+#endif
+ snprintf(tbuf, sizeof(tbuf), "%s status: %s -> %s", what, obuf, nbuf);
+ report_event(EVNT_KERN, NULL, tbuf);
+}
+
/*
* file_name - return pointer to non-relative portion of this C file pathname
*/
@@ -189,7 +210,9 @@ static char *file_name(void)
{
if (this_file == NULL) {
(void)strncpy(relative_path, __FILE__, PATH_MAX);
- for (this_file=relative_path; *this_file && ! isalnum(*this_file); this_file++) ;
+ for (this_file=relative_path;
+ *this_file && ! isalnum((unsigned char)*this_file);
+ this_file++) ;
}
return this_file;
}
@@ -259,47 +282,69 @@ ntp_adjtime_error_handler(
}
break;
#ifdef TIME_OK
- case TIME_OK: /* 0 no leap second warning */
- /* OK means OK */
+ case TIME_OK: /* 0: synchronized, no leap second warning */
+ /* msyslog(LOG_INFO, "kernel reports time is synchronized normally"); */
break;
+#else
+# warning TIME_OK is not defined
#endif
#ifdef TIME_INS
- case TIME_INS: /* 1 positive leap second warning */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports positive leap second warning state",
- caller, file_name(), line
- );
+ case TIME_INS: /* 1: positive leap second warning */
+ msyslog(LOG_INFO, "kernel reports leap second insertion scheduled");
break;
+#else
+# warning TIME_INS is not defined
#endif
#ifdef TIME_DEL
- case TIME_DEL: /* 2 negative leap second warning */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports negative leap second warning state",
- caller, file_name(), line
- );
+ case TIME_DEL: /* 2: negative leap second warning */
+ msyslog(LOG_INFO, "kernel reports leap second deletion scheduled");
break;
+#else
+# warning TIME_DEL is not defined
#endif
#ifdef TIME_OOP
- case TIME_OOP: /* 3 leap second in progress */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second in progress",
- caller, file_name(), line
- );
+ case TIME_OOP: /* 3: leap second in progress */
+ msyslog(LOG_INFO, "kernel reports leap second in progress");
break;
+#else
+# warning TIME_OOP is not defined
#endif
#ifdef TIME_WAIT
- case TIME_WAIT: /* 4 leap second has occured */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second has occured",
- caller, file_name(), line
- );
+ case TIME_WAIT: /* 4: leap second has occured */
+ msyslog(LOG_INFO, "kernel reports leap second has occurred");
break;
+#else
+# warning TIME_WAIT is not defined
#endif
#ifdef TIME_ERROR
- case TIME_ERROR: /* loss of synchronization */
+ case TIME_ERROR: /* 5: unsynchronized, or loss of synchronization */
+ /* error (see status word) */
if (pps_call && !(ptimex->status & STA_PPSSIGNAL))
report_event(EVNT_KERN, NULL,
"PPS no signal");
errno = saved_errno;
DPRINTF(1, ("kernel loop status (%s) %d %m\n",
k_st_flags(ptimex->status), errno));
+ /*
+ * This code may be returned when ntp_adjtime() has just
+ * been called for the first time, quite a while after
+ * startup, when ntpd just starts to discipline the kernel
+ * time. In this case the occurrence of this message
+ * can be pretty confusing.
+ *
+ * HMS: How about a message when we begin kernel processing:
+ * Determining kernel clock state...
+ * so an initial TIME_ERROR message is less confising,
+ * or skipping the first message (ugh),
+ * or ???
+ * msyslog(LOG_INFO, "kernel reports time synchronization lost");
+ */
+ errno = saved_errno; /* may not be needed */
+ msyslog(LOG_INFO, "kernel reports TIME_ERROR: %#x: %s %m",
+ ptimex->status, k_st_flags(ptimex->status));
break;
+#else
+# warning TIME_ERROR is not defined
#endif
default:
msyslog(LOG_NOTICE, "%s: %s line %d: unhandled return value %d from ntp_adjtime in %s at line %d",
@@ -383,7 +428,8 @@ local_clock(
* directly to the terminal.
*/
if (mode_ntpdate) {
- if (fabs(fp_offset) > clock_max && clock_max > 0) {
+ if ( ( fp_offset > clock_max_fwd && clock_max_fwd > 0)
+ || (-fp_offset > clock_max_back && clock_max_back > 0)) {
step_systime(fp_offset);
msyslog(LOG_NOTICE, "ntpd: time set %+.6f s",
fp_offset);
@@ -432,10 +478,10 @@ local_clock(
* threshold (128 ms) and when it does not. Under certain
* conditions updates are suspended until the stepout theshold
* (900 s) is exceeded. See the documentation on how these
- * thresholds interact with commands and command line options.
+ * thresholds interact with commands and command line options.
*
* Note the kernel is disabled if step is disabled or greater
- * than 0.5 s or in ntpdate mode.
+ * than 0.5 s or in ntpdate mode.
*/
osys_poll = sys_poll;
if (sys_poll < peer->minpoll)
@@ -445,7 +491,14 @@ local_clock(
mu = current_time - clock_epoch;
clock_frequency = drift_comp;
rval = 1;
- if (fabs(fp_offset) > clock_max && clock_max > 0) {
+ if ( ( fp_offset > clock_max_fwd && clock_max_fwd > 0)
+ || (-fp_offset > clock_max_back && clock_max_back > 0)
+ || force_step_once ) {
+ if (force_step_once) {
+ force_step_once = FALSE; /* we want this only once after startup */
+ msyslog(LOG_NOTICE, "Doing intital time step" );
+ }
+
switch (state) {
/*
@@ -505,7 +558,7 @@ local_clock(
* threshold. Note that a single spike greater than the
* step threshold is always suppressed, even with a
* long time constant.
- */
+ */
default:
snprintf(tbuf, sizeof(tbuf), "%+.6f s",
fp_offset);
@@ -523,7 +576,6 @@ local_clock(
}
rstclock(EVNT_SYNC, 0);
} else {
-
/*
* The offset is less than the step threshold. Calculate
* the jitter as the exponentially weighted offset
@@ -585,9 +637,9 @@ local_clock(
/*
* The PLL frequency gain (numerator) depends on
* the minimum of the update interval and Allan
- * intercept. This reduces the PLL gain when the
+ * intercept. This reduces the PLL gain when the
* FLL becomes effective.
- */
+ */
etemp = min(ULOGTOD(allan_xpt), mu);
dtemp = 4 * CLOCK_PLL * ULOGTOD(sys_poll);
clock_frequency += fp_offset * etemp / (dtemp *
@@ -663,16 +715,17 @@ local_clock(
* Enable/disable the PPS if requested.
*/
if (hardpps_enable) {
+ ntv.status |= (STA_PPSTIME | STA_PPSFREQ);
if (!(pll_status & STA_PPSTIME))
- report_event(EVNT_KERN,
- NULL, "PPS enabled");
- ntv.status |= STA_PPSTIME | STA_PPSFREQ;
+ sync_status("PPS enabled",
+ pll_status,
+ ntv.status);
} else {
+ ntv.status &= ~(STA_PPSTIME | STA_PPSFREQ);
if (pll_status & STA_PPSTIME)
- report_event(EVNT_KERN,
- NULL, "PPS disabled");
- ntv.status &= ~(STA_PPSTIME |
- STA_PPSFREQ);
+ sync_status("PPS disabled",
+ pll_status,
+ ntv.status);
}
if (sys_leap == LEAP_ADDSECOND)
ntv.status |= STA_INS;
@@ -685,8 +738,13 @@ local_clock(
* the pps. In any case, fetch the kernel offset,
* frequency and jitter.
*/
- if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
- ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
+ ntp_adj_ret = ntp_adjtime(&ntv);
+ /*
+ * A squeal is a return status < 0, or a state change.
+ */
+ if ((0 > ntp_adj_ret) || (ntp_adj_ret != kernel_status)) {
+ kernel_status = ntp_adj_ret;
+ ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
}
pll_status = ntv.status;
#ifdef STA_NANO
@@ -867,7 +925,7 @@ adj_host_clock(
clock_offset -= offset_adj;
/*
* Windows port adj_systime() must be called each second,
- * even if the argument is zero, to ease emulation of
+ * even if the argument is zero, to ease emulation of
* adjtime() using Windows' slew API which controls the rate
* but does not automatically stop slewing when an offset
* has decayed to zero.
@@ -896,7 +954,7 @@ rstclock(
report_event(trans, NULL, NULL);
state = trans;
last_offset = clock_offset = offset;
- clock_epoch = current_time;
+ clock_epoch = current_time;
}
@@ -1142,6 +1200,21 @@ loop_config(
break;
case LOOP_KERN_CLEAR:
+#if 0 /* XXX: needs more review, and how can we get here? */
+#ifndef LOCKCLOCK
+# ifdef KERNEL_PLL
+ if (pll_control && kern_enable) {
+ memset((char *)&ntv, 0, sizeof(ntv));
+ ntv.modes = MOD_STATUS;
+ ntv.status = STA_UNSYNC;
+ ntp_adjtime(&ntv);
+ sync_status("kernel time sync disabled",
+ pll_status,
+ ntv.status);
+ }
+# endif /* KERNEL_PLL */
+#endif /* LOCKCLOCK */
+#endif
break;
/*
@@ -1154,12 +1227,12 @@ loop_config(
case LOOP_CODEC: /* audio codec frequency (codec) */
clock_codec = freq / 1e6;
break;
-
+
case LOOP_PHI: /* dispersion threshold (dispersion) */
clock_phi = freq / 1e6;
break;
- case LOOP_FREQ: /* initial frequency (freq) */
+ case LOOP_FREQ: /* initial frequency (freq) */
init_drift_comp = freq;
freq_set++;
break;
@@ -1180,8 +1253,27 @@ loop_config(
break;
case LOOP_MAX: /* step threshold (step) */
- clock_max = freq;
- if (clock_max == 0 || clock_max > 0.5)
+ clock_max_fwd = clock_max_back = freq;
+ if (freq == 0 || freq > 0.5)
+ select_loop(FALSE);
+ break;
+
+ case LOOP_MAX_BACK: /* step threshold (step) */
+ clock_max_back = freq;
+ /*
+ * Leave using the kernel discipline code unless both
+ * limits are massive. This assumes the reason to stop
+ * using it is that it's pointless, not that it goes wrong.
+ */
+ if ( (clock_max_back == 0 || clock_max_back > 0.5)
+ || (clock_max_fwd == 0 || clock_max_fwd > 0.5))
+ select_loop(FALSE);
+ break;
+
+ case LOOP_MAX_FWD: /* step threshold (step) */
+ clock_max_fwd = freq;
+ if ( (clock_max_back == 0 || clock_max_back > 0.5)
+ || (clock_max_fwd == 0 || clock_max_fwd > 0.5))
select_loop(FALSE);
break;
@@ -1189,7 +1281,7 @@ loop_config(
if (freq < CLOCK_MINSTEP)
clock_minstep = CLOCK_MINSTEP;
else
- clock_minstep = freq;
+ clock_minstep = freq;
break;
case LOOP_TICK: /* tick increment (tick) */
diff --git a/ntpd/ntp_parser.c b/ntpd/ntp_parser.c
index b3f4e4f..0cf5519 100644
--- a/ntpd/ntp_parser.c
+++ b/ntpd/ntp_parser.c
@@ -96,7 +96,7 @@
# define ONLY_SIM(a) NULL
#endif
-#line 100 "../../ntpd/ntp_parser.c" /* yacc.c:339 */
+#line 100 "ntp_parser.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
@@ -219,104 +219,107 @@ extern int yydebug;
T_Maxdist = 343,
T_Maxmem = 344,
T_Maxpoll = 345,
- T_Mem = 346,
- T_Memlock = 347,
- T_Minclock = 348,
- T_Mindepth = 349,
- T_Mindist = 350,
- T_Minimum = 351,
- T_Minpoll = 352,
- T_Minsane = 353,
- T_Mode = 354,
- T_Mode7 = 355,
- T_Monitor = 356,
- T_Month = 357,
- T_Mru = 358,
- T_Multicastclient = 359,
- T_Nic = 360,
- T_Nolink = 361,
- T_Nomodify = 362,
- T_Nomrulist = 363,
- T_None = 364,
- T_Nonvolatile = 365,
- T_Nopeer = 366,
- T_Noquery = 367,
- T_Noselect = 368,
- T_Noserve = 369,
- T_Notrap = 370,
- T_Notrust = 371,
- T_Ntp = 372,
- T_Ntpport = 373,
- T_NtpSignDsocket = 374,
- T_Orphan = 375,
- T_Orphanwait = 376,
- T_Panic = 377,
- T_Peer = 378,
- T_Peerstats = 379,
- T_Phone = 380,
- T_Pid = 381,
- T_Pidfile = 382,
- T_Pool = 383,
- T_Port = 384,
- T_Preempt = 385,
- T_Prefer = 386,
- T_Protostats = 387,
- T_Pw = 388,
- T_Randfile = 389,
- T_Rawstats = 390,
- T_Refid = 391,
- T_Requestkey = 392,
- T_Reset = 393,
- T_Restrict = 394,
- T_Revoke = 395,
- T_Rlimit = 396,
- T_Saveconfigdir = 397,
- T_Server = 398,
- T_Setvar = 399,
- T_Source = 400,
- T_Stacksize = 401,
- T_Statistics = 402,
- T_Stats = 403,
- T_Statsdir = 404,
- T_Step = 405,
- T_Stepout = 406,
- T_Stratum = 407,
- T_String = 408,
- T_Sys = 409,
- T_Sysstats = 410,
- T_Tick = 411,
- T_Time1 = 412,
- T_Time2 = 413,
- T_Timer = 414,
- T_Timingstats = 415,
- T_Tinker = 416,
- T_Tos = 417,
- T_Trap = 418,
- T_True = 419,
- T_Trustedkey = 420,
- T_Ttl = 421,
- T_Type = 422,
- T_U_int = 423,
- T_Unconfig = 424,
- T_Unpeer = 425,
- T_Version = 426,
- T_WanderThreshold = 427,
- T_Week = 428,
- T_Wildcard = 429,
- T_Xleave = 430,
- T_Year = 431,
- T_Flag = 432,
- T_EOC = 433,
- T_Simulate = 434,
- T_Beep_Delay = 435,
- T_Sim_Duration = 436,
- T_Server_Offset = 437,
- T_Duration = 438,
- T_Freq_Offset = 439,
- T_Wander = 440,
- T_Jitter = 441,
- T_Prop_Delay = 442,
- T_Proc_Delay = 443
+ T_Mdnstries = 346,
+ T_Mem = 347,
+ T_Memlock = 348,
+ T_Minclock = 349,
+ T_Mindepth = 350,
+ T_Mindist = 351,
+ T_Minimum = 352,
+ T_Minpoll = 353,
+ T_Minsane = 354,
+ T_Mode = 355,
+ T_Mode7 = 356,
+ T_Monitor = 357,
+ T_Month = 358,
+ T_Mru = 359,
+ T_Multicastclient = 360,
+ T_Nic = 361,
+ T_Nolink = 362,
+ T_Nomodify = 363,
+ T_Nomrulist = 364,
+ T_None = 365,
+ T_Nonvolatile = 366,
+ T_Nopeer = 367,
+ T_Noquery = 368,
+ T_Noselect = 369,
+ T_Noserve = 370,
+ T_Notrap = 371,
+ T_Notrust = 372,
+ T_Ntp = 373,
+ T_Ntpport = 374,
+ T_NtpSignDsocket = 375,
+ T_Orphan = 376,
+ T_Orphanwait = 377,
+ T_Panic = 378,
+ T_Peer = 379,
+ T_Peerstats = 380,
+ T_Phone = 381,
+ T_Pid = 382,
+ T_Pidfile = 383,
+ T_Pool = 384,
+ T_Port = 385,
+ T_Preempt = 386,
+ T_Prefer = 387,
+ T_Protostats = 388,
+ T_Pw = 389,
+ T_Randfile = 390,
+ T_Rawstats = 391,
+ T_Refid = 392,
+ T_Requestkey = 393,
+ T_Reset = 394,
+ T_Restrict = 395,
+ T_Revoke = 396,
+ T_Rlimit = 397,
+ T_Saveconfigdir = 398,
+ T_Server = 399,
+ T_Setvar = 400,
+ T_Source = 401,
+ T_Stacksize = 402,
+ T_Statistics = 403,
+ T_Stats = 404,
+ T_Statsdir = 405,
+ T_Step = 406,
+ T_Stepback = 407,
+ T_Stepfwd = 408,
+ T_Stepout = 409,
+ T_Stratum = 410,
+ T_String = 411,
+ T_Sys = 412,
+ T_Sysstats = 413,
+ T_Tick = 414,
+ T_Time1 = 415,
+ T_Time2 = 416,
+ T_Timer = 417,
+ T_Timingstats = 418,
+ T_Tinker = 419,
+ T_Tos = 420,
+ T_Trap = 421,
+ T_True = 422,
+ T_Trustedkey = 423,
+ T_Ttl = 424,
+ T_Type = 425,
+ T_U_int = 426,
+ T_Unconfig = 427,
+ T_Unpeer = 428,
+ T_Version = 429,
+ T_WanderThreshold = 430,
+ T_Week = 431,
+ T_Wildcard = 432,
+ T_Xleave = 433,
+ T_Year = 434,
+ T_Flag = 435,
+ T_EOC = 436,
+ T_Simulate = 437,
+ T_Beep_Delay = 438,
+ T_Sim_Duration = 439,
+ T_Server_Offset = 440,
+ T_Duration = 441,
+ T_Freq_Offset = 442,
+ T_Wander = 443,
+ T_Jitter = 444,
+ T_Prop_Delay = 445,
+ T_Proc_Delay = 446
};
#endif
/* Tokens. */
@@ -408,104 +411,107 @@ extern int yydebug;
#define T_Maxdist 343
#define T_Maxmem 344
#define T_Maxpoll 345
-#define T_Mem 346
-#define T_Memlock 347
-#define T_Minclock 348
-#define T_Mindepth 349
-#define T_Mindist 350
-#define T_Minimum 351
-#define T_Minpoll 352
-#define T_Minsane 353
-#define T_Mode 354
-#define T_Mode7 355
-#define T_Monitor 356
-#define T_Month 357
-#define T_Mru 358
-#define T_Multicastclient 359
-#define T_Nic 360
-#define T_Nolink 361
-#define T_Nomodify 362
-#define T_Nomrulist 363
-#define T_None 364
-#define T_Nonvolatile 365
-#define T_Nopeer 366
-#define T_Noquery 367
-#define T_Noselect 368
-#define T_Noserve 369
-#define T_Notrap 370
-#define T_Notrust 371
-#define T_Ntp 372
-#define T_Ntpport 373
-#define T_NtpSignDsocket 374
-#define T_Orphan 375
-#define T_Orphanwait 376
-#define T_Panic 377
-#define T_Peer 378
-#define T_Peerstats 379
-#define T_Phone 380
-#define T_Pid 381
-#define T_Pidfile 382
-#define T_Pool 383
-#define T_Port 384
-#define T_Preempt 385
-#define T_Prefer 386
-#define T_Protostats 387
-#define T_Pw 388
-#define T_Randfile 389
-#define T_Rawstats 390
-#define T_Refid 391
-#define T_Requestkey 392
-#define T_Reset 393
-#define T_Restrict 394
-#define T_Revoke 395
-#define T_Rlimit 396
-#define T_Saveconfigdir 397
-#define T_Server 398
-#define T_Setvar 399
-#define T_Source 400
-#define T_Stacksize 401
-#define T_Statistics 402
-#define T_Stats 403
-#define T_Statsdir 404
-#define T_Step 405
-#define T_Stepout 406
-#define T_Stratum 407
-#define T_String 408
-#define T_Sys 409
-#define T_Sysstats 410
-#define T_Tick 411
-#define T_Time1 412
-#define T_Time2 413
-#define T_Timer 414
-#define T_Timingstats 415
-#define T_Tinker 416
-#define T_Tos 417
-#define T_Trap 418
-#define T_True 419
-#define T_Trustedkey 420
-#define T_Ttl 421
-#define T_Type 422
-#define T_U_int 423
-#define T_Unconfig 424
-#define T_Unpeer 425
-#define T_Version 426
-#define T_WanderThreshold 427
-#define T_Week 428
-#define T_Wildcard 429
-#define T_Xleave 430
-#define T_Year 431
-#define T_Flag 432
-#define T_EOC 433
-#define T_Simulate 434
-#define T_Beep_Delay 435
-#define T_Sim_Duration 436
-#define T_Server_Offset 437
-#define T_Duration 438
-#define T_Freq_Offset 439
-#define T_Wander 440
-#define T_Jitter 441
-#define T_Prop_Delay 442
-#define T_Proc_Delay 443
+#define T_Mdnstries 346
+#define T_Mem 347
+#define T_Memlock 348
+#define T_Minclock 349
+#define T_Mindepth 350
+#define T_Mindist 351
+#define T_Minimum 352
+#define T_Minpoll 353
+#define T_Minsane 354
+#define T_Mode 355
+#define T_Mode7 356
+#define T_Monitor 357
+#define T_Month 358
+#define T_Mru 359
+#define T_Multicastclient 360
+#define T_Nic 361
+#define T_Nolink 362
+#define T_Nomodify 363
+#define T_Nomrulist 364
+#define T_None 365
+#define T_Nonvolatile 366
+#define T_Nopeer 367
+#define T_Noquery 368
+#define T_Noselect 369
+#define T_Noserve 370
+#define T_Notrap 371
+#define T_Notrust 372
+#define T_Ntp 373
+#define T_Ntpport 374
+#define T_NtpSignDsocket 375
+#define T_Orphan 376
+#define T_Orphanwait 377
+#define T_Panic 378
+#define T_Peer 379
+#define T_Peerstats 380
+#define T_Phone 381
+#define T_Pid 382
+#define T_Pidfile 383
+#define T_Pool 384
+#define T_Port 385
+#define T_Preempt 386
+#define T_Prefer 387
+#define T_Protostats 388
+#define T_Pw 389
+#define T_Randfile 390
+#define T_Rawstats 391
+#define T_Refid 392
+#define T_Requestkey 393
+#define T_Reset 394
+#define T_Restrict 395
+#define T_Revoke 396
+#define T_Rlimit 397
+#define T_Saveconfigdir 398
+#define T_Server 399
+#define T_Setvar 400
+#define T_Source 401
+#define T_Stacksize 402
+#define T_Statistics 403
+#define T_Stats 404
+#define T_Statsdir 405
+#define T_Step 406
+#define T_Stepback 407
+#define T_Stepfwd 408
+#define T_Stepout 409
+#define T_Stratum 410
+#define T_String 411
+#define T_Sys 412
+#define T_Sysstats 413
+#define T_Tick 414
+#define T_Time1 415
+#define T_Time2 416
+#define T_Timer 417
+#define T_Timingstats 418
+#define T_Tinker 419
+#define T_Tos 420
+#define T_Trap 421
+#define T_True 422
+#define T_Trustedkey 423
+#define T_Ttl 424
+#define T_Type 425
+#define T_U_int 426
+#define T_Unconfig 427
+#define T_Unpeer 428
+#define T_Version 429
+#define T_WanderThreshold 430
+#define T_Week 431
+#define T_Wildcard 432
+#define T_Xleave 433
+#define T_Year 434
+#define T_Flag 435
+#define T_EOC 436
+#define T_Simulate 437
+#define T_Beep_Delay 438
+#define T_Sim_Duration 439
+#define T_Server_Offset 440
+#define T_Duration 441
+#define T_Freq_Offset 442
+#define T_Wander 443
+#define T_Jitter 444
+#define T_Prop_Delay 445
+#define T_Proc_Delay 446
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -531,7 +537,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 535 "../../ntpd/ntp_parser.c" /* yacc.c:355 */
+#line 541 "ntp_parser.c" /* yacc.c:355 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -546,7 +552,7 @@ int yyparse (struct FILE_INFO *ip_file);
/* Copy the second part of user declarations. */
-#line 550 "../../ntpd/ntp_parser.c" /* yacc.c:358 */
+#line 556 "ntp_parser.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -786,23 +792,23 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 203
+#define YYFINAL 207
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 653
+#define YYLAST 622
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 194
+#define YYNTOKENS 197
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 104
/* YYNRULES -- Number of rules. */
-#define YYNRULES 307
+#define YYNRULES 310
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 411
+#define YYNSTATES 415
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 443
+#define YYMAXUTOK 446
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -815,15 +821,15 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 190, 191, 2, 2, 2, 2, 2, 2, 2, 2,
+ 193, 194, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 189, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 192, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 192, 2, 193, 2, 2, 2, 2,
+ 2, 2, 2, 195, 2, 196, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -855,44 +861,45 @@ static const yytype_uint8 yytranslate[] =
155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
- 185, 186, 187, 188
+ 185, 186, 187, 188, 189, 190, 191
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 363, 363, 367, 368, 369, 383, 384, 385, 386,
- 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
- 404, 414, 415, 416, 417, 418, 422, 423, 428, 433,
- 435, 441, 442, 450, 451, 452, 456, 461, 462, 463,
- 464, 465, 466, 467, 468, 472, 474, 479, 480, 481,
- 482, 483, 484, 488, 493, 502, 512, 513, 523, 525,
- 527, 538, 545, 547, 552, 554, 556, 558, 560, 569,
- 575, 576, 584, 586, 598, 599, 600, 601, 602, 611,
- 616, 621, 629, 631, 633, 638, 639, 640, 641, 642,
- 643, 647, 648, 649, 650, 659, 661, 670, 680, 685,
- 693, 694, 695, 696, 697, 698, 699, 700, 705, 706,
- 714, 724, 733, 748, 753, 754, 758, 759, 763, 764,
- 765, 766, 767, 768, 769, 778, 782, 786, 794, 802,
- 810, 825, 840, 853, 854, 862, 863, 864, 865, 866,
- 867, 868, 869, 870, 871, 872, 873, 874, 875, 876,
- 880, 885, 893, 898, 899, 900, 904, 909, 917, 922,
- 923, 924, 925, 926, 927, 928, 929, 937, 947, 952,
- 960, 962, 964, 966, 968, 973, 974, 978, 979, 980,
- 981, 989, 994, 999, 1007, 1012, 1013, 1014, 1023, 1025,
- 1030, 1035, 1043, 1045, 1062, 1063, 1064, 1065, 1066, 1067,
- 1071, 1072, 1080, 1085, 1090, 1098, 1103, 1104, 1105, 1106,
- 1107, 1108, 1109, 1110, 1119, 1120, 1121, 1128, 1135, 1151,
- 1170, 1175, 1177, 1179, 1181, 1183, 1190, 1195, 1196, 1197,
- 1201, 1202, 1203, 1207, 1208, 1212, 1219, 1229, 1238, 1243,
- 1245, 1250, 1251, 1259, 1261, 1269, 1274, 1282, 1307, 1314,
- 1324, 1325, 1329, 1330, 1331, 1332, 1336, 1337, 1338, 1342,
- 1347, 1352, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1376,
- 1381, 1389, 1394, 1402, 1404, 1408, 1413, 1418, 1426, 1431,
- 1439, 1448, 1449, 1453, 1454, 1463, 1481, 1485, 1490, 1498,
- 1503, 1504, 1508, 1513, 1521, 1526, 1531, 1536, 1541, 1549,
- 1554, 1559, 1567, 1572, 1573, 1574, 1575, 1576
+ 0, 366, 366, 370, 371, 372, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 407, 417, 418, 419, 420, 421, 425, 426, 431, 436,
+ 438, 444, 445, 453, 454, 455, 459, 464, 465, 466,
+ 467, 468, 469, 470, 471, 475, 477, 482, 483, 484,
+ 485, 486, 487, 491, 496, 505, 515, 516, 526, 528,
+ 530, 532, 543, 550, 552, 557, 559, 561, 563, 565,
+ 574, 580, 581, 589, 591, 603, 604, 605, 606, 607,
+ 616, 621, 626, 634, 636, 638, 643, 644, 645, 646,
+ 647, 648, 652, 653, 654, 655, 664, 666, 675, 685,
+ 690, 698, 699, 700, 701, 702, 703, 704, 705, 710,
+ 711, 719, 729, 738, 753, 758, 759, 763, 764, 768,
+ 769, 770, 771, 772, 773, 774, 783, 787, 791, 799,
+ 807, 815, 830, 845, 858, 859, 867, 868, 869, 870,
+ 871, 872, 873, 874, 875, 876, 877, 878, 879, 880,
+ 881, 885, 890, 898, 903, 904, 905, 909, 914, 922,
+ 927, 928, 929, 930, 931, 932, 933, 934, 942, 952,
+ 957, 965, 967, 969, 971, 973, 978, 979, 983, 984,
+ 985, 986, 994, 999, 1004, 1012, 1017, 1018, 1019, 1028,
+ 1030, 1035, 1040, 1048, 1050, 1067, 1068, 1069, 1070, 1071,
+ 1072, 1076, 1077, 1085, 1090, 1095, 1103, 1108, 1109, 1110,
+ 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1126, 1127, 1128,
+ 1135, 1142, 1158, 1177, 1182, 1184, 1186, 1188, 1190, 1197,
+ 1202, 1203, 1204, 1208, 1209, 1210, 1214, 1215, 1219, 1226,
+ 1236, 1245, 1250, 1252, 1257, 1258, 1266, 1268, 1276, 1281,
+ 1289, 1314, 1321, 1331, 1332, 1336, 1337, 1338, 1339, 1343,
+ 1344, 1345, 1349, 1354, 1359, 1367, 1368, 1369, 1370, 1371,
+ 1372, 1373, 1383, 1388, 1396, 1401, 1409, 1411, 1415, 1420,
+ 1425, 1433, 1438, 1446, 1455, 1456, 1460, 1461, 1470, 1488,
+ 1492, 1497, 1505, 1510, 1511, 1515, 1520, 1528, 1533, 1538,
+ 1543, 1548, 1556, 1561, 1566, 1574, 1579, 1580, 1581, 1582,
+ 1583
};
#endif
@@ -918,42 +925,44 @@ static const char *const yytname[] =
"T_Link", "T_Listen", "T_Logconfig", "T_Logfile", "T_Loopstats",
"T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver", "T_Mask",
"T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist", "T_Maxmem",
- "T_Maxpoll", "T_Mem", "T_Memlock", "T_Minclock", "T_Mindepth",
- "T_Mindist", "T_Minimum", "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7",
- "T_Monitor", "T_Month", "T_Mru", "T_Multicastclient", "T_Nic",
- "T_Nolink", "T_Nomodify", "T_Nomrulist", "T_None", "T_Nonvolatile",
- "T_Nopeer", "T_Noquery", "T_Noselect", "T_Noserve", "T_Notrap",
- "T_Notrust", "T_Ntp", "T_Ntpport", "T_NtpSignDsocket", "T_Orphan",
- "T_Orphanwait", "T_Panic", "T_Peer", "T_Peerstats", "T_Phone", "T_Pid",
- "T_Pidfile", "T_Pool", "T_Port", "T_Preempt", "T_Prefer", "T_Protostats",
- "T_Pw", "T_Randfile", "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset",
- "T_Restrict", "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server",
- "T_Setvar", "T_Source", "T_Stacksize", "T_Statistics", "T_Stats",
- "T_Statsdir", "T_Step", "T_Stepout", "T_Stratum", "T_String", "T_Sys",
- "T_Sysstats", "T_Tick", "T_Time1", "T_Time2", "T_Timer", "T_Timingstats",
- "T_Tinker", "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl",
- "T_Type", "T_U_int", "T_Unconfig", "T_Unpeer", "T_Version",
- "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year",
- "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
- "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
- "T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'",
- "$accept", "configuration", "command_list", "command", "server_command",
- "client_type", "address", "ip_address", "address_fam", "option_list",
- "option", "option_flag", "option_flag_keyword", "option_int",
- "option_int_keyword", "option_str", "option_str_keyword",
- "unpeer_command", "unpeer_keyword", "other_mode_command",
- "authentication_command", "crypto_command_list", "crypto_command",
- "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
- "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
- "monitoring_command", "stats_list", "stat", "filegen_option_list",
- "filegen_option", "link_nolink", "enable_disable", "filegen_type",
- "access_control_command", "ac_flag_list", "access_control_flag",
- "discard_option_list", "discard_option", "discard_option_keyword",
- "mru_option_list", "mru_option", "mru_option_keyword", "fudge_command",
- "fudge_factor_list", "fudge_factor", "fudge_factor_dbl_keyword",
- "fudge_factor_bool_keyword", "rlimit_command", "rlimit_option_list",
- "rlimit_option", "rlimit_option_keyword", "system_option_command",
- "system_option_list", "system_option", "system_option_flag_keyword",
+ "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock", "T_Minclock",
+ "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minpoll", "T_Minsane",
+ "T_Mode", "T_Mode7", "T_Monitor", "T_Month", "T_Mru",
+ "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist",
+ "T_None", "T_Nonvolatile", "T_Nopeer", "T_Noquery", "T_Noselect",
+ "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
+ "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_Panic", "T_Peer",
+ "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", "T_Port",
+ "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
+ "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
+ "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
+ "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
+ "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
+ "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
+ "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
+ "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_Unconfig", "T_Unpeer",
+ "T_Version", "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave",
+ "T_Year", "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay",
+ "T_Sim_Duration", "T_Server_Offset", "T_Duration", "T_Freq_Offset",
+ "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay", "'='", "'('",
+ "')'", "'{'", "'}'", "$accept", "configuration", "command_list",
+ "command", "server_command", "client_type", "address", "ip_address",
+ "address_fam", "option_list", "option", "option_flag",
+ "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
+ "option_str_keyword", "unpeer_command", "unpeer_keyword",
+ "other_mode_command", "authentication_command", "crypto_command_list",
+ "crypto_command", "crypto_str_keyword", "orphan_mode_command",
+ "tos_option_list", "tos_option", "tos_option_int_keyword",
+ "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
+ "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
+ "filegen_type", "access_control_command", "ac_flag_list",
+ "access_control_flag", "discard_option_list", "discard_option",
+ "discard_option_keyword", "mru_option_list", "mru_option",
+ "mru_option_keyword", "fudge_command", "fudge_factor_list",
+ "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
+ "rlimit_command", "rlimit_option_list", "rlimit_option",
+ "rlimit_option_keyword", "system_option_command", "system_option_list",
+ "system_option", "system_option_flag_keyword",
"system_option_local_flag_keyword", "tinker_command",
"tinker_option_list", "tinker_option", "tinker_option_keyword",
"miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_str_keyword",
@@ -994,15 +1003,15 @@ static const yytype_uint16 yytoknum[] =
405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
- 435, 436, 437, 438, 439, 440, 441, 442, 443, 61,
- 40, 41, 123, 125
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 61, 40, 41, 123, 125
};
# endif
-#define YYPACT_NINF -178
+#define YYPACT_NINF -182
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-178)))
+ (!!((Yystate) == (-182)))
#define YYTABLE_NINF -7
@@ -1013,48 +1022,48 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 26, -153, -30, -178, -178, -178, -28, -178, 166, 18,
- -109, 166, -178, 200, -47, -178, -102, -178, -96, -93,
- -178, -89, -178, -178, -47, 330, -47, -178, -178, -85,
- -178, -76, -178, -178, 20, -2, 45, 22, -22, -178,
- -178, -67, 200, -65, -178, 107, 520, -63, -53, 35,
- -178, -178, -178, 46, 203, -94, -178, -47, -178, -47,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -21, -55, -54, -178, 4, -178, -178, -77, -178, -178,
- -178, 158, -178, -178, -178, -178, -178, -178, -178, -178,
- 166, -178, -178, -178, -178, -178, -178, 18, -178, 47,
- 84, -178, 166, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, 49, -178, -33, 361, -178,
- -178, -178, -89, -178, -178, -47, -178, -178, -178, -178,
- -178, -178, -178, -178, 330, -178, 58, -47, -178, -178,
- -31, -178, -178, -178, -178, -178, -178, -178, -178, -2,
- -178, -178, 94, 98, -178, -178, 43, -178, -178, -178,
- -178, -22, -178, 68, -57, -178, 200, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, 107, -178, -21,
- -178, -178, -25, -178, -178, -178, -178, -178, -178, -178,
- -178, 520, -178, 75, -21, -178, -178, 86, -53, -178,
- -178, -178, 87, -178, -19, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, 3, -107, -178, -178,
- -178, -178, -178, 88, -178, 7, -178, -178, -178, -178,
- -5, 8, -178, -178, -178, -178, 23, 111, -178, -178,
- 49, -178, -21, -25, -178, -178, -178, -178, -178, -178,
- -178, -178, 482, -178, -178, 482, 482, -63, -178, -178,
- 28, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, -46, 144, -178, -178, -178, 416, -178, -178, -178,
- -178, -178, -178, -178, -178, -127, 5, 10, -178, -178,
- -178, -178, 40, -178, -178, 24, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, 482, 482, -178, 167, -63, 142, -178, 143, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -51, -178,
- 57, 27, 34, -117, -178, 29, -178, -21, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, 482, -178, -178,
- -178, -178, 32, -178, -178, -178, -47, -178, -178, -178,
- 33, -178, -178, -178, 38, 52, -21, 39, -146, -178,
- 59, -21, -178, -178, -178, 50, -44, -178, -178, -178,
- -178, -178, 60, 63, 41, -178, 71, -178, -21, -178,
- -178
+ 18, -161, -18, -182, -182, -182, -10, -182, 189, 11,
+ -103, 189, -182, 7, -49, -182, -100, -182, -97, -90,
+ -182, -84, -182, -182, -49, 13, 365, -49, -182, -182,
+ -81, -182, -80, -182, -182, 20, 86, 104, 21, -33,
+ -182, -182, -73, 7, -72, -182, 51, 500, -71, -54,
+ 26, -182, -182, -182, 90, 205, -83, -182, -49, -182,
+ -49, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -8, -65, -51, -182, -9, -182, -182, -91, -182,
+ -182, -182, -15, -182, -182, -182, -182, -182, -182, -182,
+ -182, 189, -182, -182, -182, -182, -182, -182, 11, -182,
+ 46, 85, -182, 189, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 92, -182, -35, 366,
+ -182, -182, -182, -84, -182, -182, -49, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 365, -182, 68, -49,
+ -182, -182, -23, -182, -182, -182, -182, -182, -182, -182,
+ -182, 86, -182, -182, 114, 121, -182, -182, 67, -182,
+ -182, -182, -182, -33, -182, 93, -28, -182, 7, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, 51, -182, -8, -182, -182, -17, -182, -182, -182,
+ -182, -182, -182, -182, -182, 500, -182, 107, -8, -182,
+ -182, 112, -54, -182, -182, -182, 113, -182, 8, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -2, -147, -182, -182, -182, -182, -182, 128, -182, 25,
+ -182, -182, -182, -182, 116, 37, -182, -182, -182, -182,
+ 38, 135, -182, -182, 92, -182, -8, -17, -182, -182,
+ -182, -182, -182, -182, -182, -182, 445, -182, -182, 445,
+ 445, -71, -182, -182, 40, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -52, 163, -182, -182, -182,
+ 261, -182, -182, -182, -182, -182, -182, -182, -182, -114,
+ 27, 14, -182, -182, -182, -182, 55, -182, -182, 0,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, 445, 445, -182, 185, -71,
+ 153, -182, 156, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -53, -182, 61, 30, 43, -133, -182, 23,
+ -182, -8, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, 445, -182, -182, -182, -182, 32, -182, -182, -182,
+ -49, -182, -182, -182, 45, -182, -182, -182, 41, 50,
+ -8, 47, -157, -182, 56, -8, -182, -182, -182, 49,
+ 130, -182, -182, -182, -182, -182, 110, 59, 54, -182,
+ 70, -182, -8, -182, -182
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1062,80 +1071,80 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 0, 0, 0, 24, 58, 227, 0, 70, 0, 0,
- 237, 0, 220, 0, 0, 230, 0, 250, 0, 0,
- 231, 0, 233, 25, 0, 0, 0, 251, 228, 0,
- 23, 0, 232, 22, 0, 0, 0, 0, 0, 234,
- 21, 0, 0, 0, 229, 0, 0, 0, 0, 0,
- 56, 57, 286, 0, 2, 0, 7, 0, 8, 0,
- 9, 10, 13, 11, 12, 14, 15, 16, 17, 18,
- 0, 0, 0, 214, 0, 215, 19, 0, 5, 61,
- 62, 63, 194, 195, 196, 197, 200, 198, 199, 201,
- 189, 191, 192, 193, 153, 154, 155, 125, 151, 0,
- 235, 221, 188, 100, 101, 102, 103, 107, 104, 105,
- 106, 108, 29, 30, 28, 0, 26, 0, 6, 64,
- 65, 247, 222, 246, 279, 59, 159, 160, 161, 162,
- 163, 164, 165, 166, 126, 157, 0, 60, 69, 277,
- 223, 66, 262, 263, 264, 265, 266, 267, 268, 259,
- 261, 133, 29, 30, 133, 133, 26, 67, 187, 185,
- 186, 181, 183, 0, 0, 224, 95, 99, 96, 206,
- 207, 208, 209, 210, 211, 212, 213, 202, 204, 0,
- 90, 85, 0, 86, 94, 92, 93, 91, 89, 87,
- 88, 79, 81, 0, 0, 241, 273, 0, 68, 272,
- 274, 270, 226, 1, 0, 4, 31, 55, 284, 283,
- 216, 217, 218, 258, 257, 256, 0, 0, 78, 74,
- 75, 76, 77, 0, 71, 0, 190, 150, 152, 236,
- 97, 0, 177, 178, 179, 180, 0, 0, 175, 176,
- 167, 169, 0, 0, 27, 219, 245, 278, 156, 158,
- 276, 260, 129, 133, 133, 132, 127, 0, 182, 184,
- 0, 98, 203, 205, 282, 280, 281, 84, 80, 82,
- 83, 225, 0, 271, 269, 3, 20, 252, 253, 254,
- 249, 255, 248, 290, 291, 0, 0, 0, 73, 72,
- 117, 116, 0, 114, 115, 0, 109, 112, 113, 173,
- 174, 172, 168, 170, 171, 135, 136, 137, 138, 139,
- 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 134, 130, 131, 133, 240, 0, 0, 242, 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, 293, 0, 288, 0, 110, 124,
- 120, 122, 118, 119, 121, 123, 111, 128, 239, 238,
- 244, 243, 0, 45, 46, 53, 0, 287, 285, 292,
- 0, 289, 275, 296, 0, 0, 0, 0, 0, 298,
- 0, 0, 294, 297, 295, 0, 0, 303, 304, 305,
- 306, 307, 0, 0, 0, 299, 0, 301, 0, 300,
- 302
+ 0, 0, 0, 24, 58, 230, 0, 71, 0, 0,
+ 240, 0, 223, 0, 0, 233, 0, 253, 0, 0,
+ 234, 0, 236, 25, 0, 0, 0, 0, 254, 231,
+ 0, 23, 0, 235, 22, 0, 0, 0, 0, 0,
+ 237, 21, 0, 0, 0, 232, 0, 0, 0, 0,
+ 0, 56, 57, 289, 0, 2, 0, 7, 0, 8,
+ 0, 9, 10, 13, 11, 12, 14, 15, 16, 17,
+ 18, 0, 0, 0, 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, 238, 224, 189, 101, 102, 103, 104, 108, 105,
+ 106, 107, 109, 29, 30, 28, 0, 26, 0, 6,
+ 65, 66, 250, 225, 249, 282, 59, 61, 160, 161,
+ 162, 163, 164, 165, 166, 167, 127, 158, 0, 60,
+ 70, 280, 226, 67, 265, 266, 267, 268, 269, 270,
+ 271, 262, 264, 134, 29, 30, 134, 134, 26, 68,
+ 188, 186, 187, 182, 184, 0, 0, 227, 96, 100,
+ 97, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 203, 205, 0, 91, 86, 0, 87, 95, 93,
+ 94, 92, 90, 88, 89, 80, 82, 0, 0, 244,
+ 276, 0, 69, 275, 277, 273, 229, 1, 0, 4,
+ 31, 55, 287, 286, 219, 220, 221, 261, 260, 259,
+ 0, 0, 79, 75, 76, 77, 78, 0, 72, 0,
+ 191, 151, 153, 239, 98, 0, 178, 179, 180, 181,
+ 0, 0, 176, 177, 168, 170, 0, 0, 27, 222,
+ 248, 281, 157, 159, 279, 263, 130, 134, 134, 133,
+ 128, 0, 183, 185, 0, 99, 204, 206, 285, 283,
+ 284, 85, 81, 83, 84, 228, 0, 274, 272, 3,
+ 20, 255, 256, 257, 252, 258, 251, 293, 294, 0,
+ 0, 0, 74, 73, 118, 117, 0, 115, 116, 0,
+ 110, 113, 114, 174, 175, 173, 169, 171, 172, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 135, 131, 132, 134, 243, 0,
+ 0, 245, 0, 37, 38, 39, 54, 47, 49, 48,
+ 51, 40, 41, 42, 43, 50, 52, 44, 32, 33,
+ 36, 34, 0, 35, 0, 0, 0, 0, 296, 0,
+ 291, 0, 111, 125, 121, 123, 119, 120, 122, 124,
+ 112, 129, 242, 241, 247, 246, 0, 45, 46, 53,
+ 0, 290, 288, 295, 0, 292, 278, 299, 0, 0,
+ 0, 0, 0, 301, 0, 0, 297, 300, 298, 0,
+ 0, 306, 307, 308, 309, 310, 0, 0, 0, 302,
+ 0, 304, 0, 303, 305
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -178, -178, -178, -40, -178, -178, -14, -35, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, 64, -178, -178, -178,
- -178, -32, -178, -178, -178, -178, -178, -178, -151, -178,
- -178, 141, -178, -178, 116, -178, -178, -178, 11, -178,
- -178, -178, -178, 93, -178, -178, 248, -69, -178, -178,
- -178, -178, 83, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, 139, -178, -178, -178, -178, -178,
- -178, 119, -178, -178, 67, -178, -178, 243, 36, -177,
- -178, -178, -178, -15, -178, -178, -82, -178, -178, -178,
- -116, -178, -126, -178
+ -182, -182, -182, -45, -182, -182, -14, -36, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 60, -182, -182, -182,
+ -182, -38, -182, -182, -182, -182, -182, -182, -142, -182,
+ -182, 134, -182, -182, 120, -182, -182, -182, 5, -182,
+ -182, -182, -182, 96, -182, -182, 250, -42, -182, -182,
+ -182, -182, 81, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, 140, -182, -182, -182, -182, -182,
+ -182, 117, -182, -182, 63, -182, -182, 240, 22, -181,
+ -182, -182, -182, -16, -182, -182, -86, -182, -182, -182,
+ -120, -182, -132, -182
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 53, 54, 55, 56, 57, 124, 116, 117, 276,
- 344, 345, 346, 347, 348, 349, 350, 58, 59, 60,
- 61, 81, 224, 225, 62, 191, 192, 193, 194, 63,
- 166, 111, 230, 296, 297, 298, 366, 64, 252, 320,
- 97, 98, 99, 134, 135, 136, 65, 240, 241, 242,
- 243, 66, 161, 162, 163, 67, 90, 91, 92, 93,
- 68, 177, 178, 179, 69, 70, 71, 72, 101, 165,
- 369, 271, 327, 122, 123, 73, 74, 282, 216, 75,
- 149, 150, 202, 198, 199, 200, 140, 125, 267, 210,
- 76, 77, 285, 286, 287, 353, 354, 385, 355, 388,
- 389, 402, 403, 404
+ -1, 54, 55, 56, 57, 58, 125, 117, 118, 280,
+ 348, 349, 350, 351, 352, 353, 354, 59, 60, 61,
+ 62, 82, 228, 229, 63, 195, 196, 197, 198, 64,
+ 168, 112, 234, 300, 301, 302, 370, 65, 256, 324,
+ 98, 99, 100, 136, 137, 138, 66, 244, 245, 246,
+ 247, 67, 163, 164, 165, 68, 91, 92, 93, 94,
+ 69, 181, 182, 183, 70, 71, 72, 73, 102, 167,
+ 373, 275, 331, 123, 124, 74, 75, 286, 220, 76,
+ 151, 152, 206, 202, 203, 204, 142, 126, 271, 214,
+ 77, 78, 289, 290, 291, 357, 358, 389, 359, 392,
+ 393, 406, 407, 408
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1143,142 +1152,136 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 115, 156, 263, 255, 256, 142, 143, 196, 277, 373,
- 167, 208, 195, 264, 204, 325, 351, 270, 112, 158,
- 113, 226, 155, 144, 290, 78, 351, 1, 359, 94,
- 79, 291, 80, 226, 292, 265, 2, 387, 213, 209,
- 3, 4, 5, 206, 100, 207, 203, 392, 6, 7,
- 360, 118, 231, 283, 284, 8, 9, 119, 214, 10,
- 120, 145, 11, 12, 121, 303, 13, 278, 138, 279,
- 159, 293, 151, 283, 284, 14, 378, 139, 245, 15,
- 141, 215, 157, 326, 205, 16, 164, 17, 168, 146,
- 114, 232, 233, 234, 235, 201, 18, 19, 211, 212,
- 20, 294, 321, 322, 21, 22, 114, 228, 23, 24,
- 152, 247, 153, 169, 95, 217, 229, 374, 249, 96,
- 244, 253, 250, 247, 160, 254, 361, 257, 259, 25,
- 26, 27, 260, 362, 261, 269, 28, 197, 170, 266,
- 397, 398, 399, 400, 401, 29, 272, 274, 288, 30,
- 363, 31, 147, 32, 33, 171, 280, 148, 172, 275,
- 289, 299, 295, 34, 35, 36, 37, 38, 39, 40,
- 41, 301, 367, 42, 82, 43, 300, 281, 83, 328,
- 381, 324, 44, 356, 84, 236, 218, 45, 46, 47,
- 154, 48, 49, 358, 368, 50, 51, 364, 114, 357,
- 365, 237, 371, 372, -6, 52, 238, 239, 219, 390,
- 375, 220, 377, 2, 395, 384, 376, 3, 4, 5,
- 103, 380, 323, 382, 104, 6, 7, 386, 391, 173,
- 408, 410, 8, 9, 85, 387, 10, 394, 227, 11,
- 12, 407, 396, 13, 397, 398, 399, 400, 401, 409,
- 248, 302, 14, 405, 258, 268, 15, 174, 175, 102,
- 262, 246, 16, 176, 17, 273, 86, 87, 251, 137,
- 352, 379, 393, 18, 19, 0, 406, 20, 0, 304,
- 105, 21, 22, 88, 0, 23, 24, 0, 0, 0,
- 370, 221, 222, 0, 0, 0, 0, 0, 223, 0,
- 0, 0, 0, 0, 0, 0, 25, 26, 27, 0,
- 0, 0, 0, 28, 89, 0, 0, 0, 0, 0,
- 0, 0, 29, 0, 106, 0, 30, 0, 31, 0,
- 32, 33, 107, 0, 0, 108, 0, 0, 0, 0,
- 34, 35, 36, 37, 38, 39, 40, 41, 0, 0,
- 42, 0, 43, 0, 0, 109, 0, 0, 0, 44,
- 110, 0, 383, 0, 45, 46, 47, 0, 48, 49,
- 0, 2, 50, 51, 0, 3, 4, 5, 0, 0,
- 0, -6, 52, 6, 7, 126, 127, 128, 129, 0,
- 8, 9, 0, 0, 10, 0, 0, 11, 12, 0,
- 0, 13, 0, 0, 0, 0, 0, 0, 0, 0,
- 14, 0, 0, 0, 15, 130, 0, 131, 0, 132,
- 16, 0, 17, 0, 133, 329, 0, 0, 0, 0,
- 0, 18, 19, 330, 0, 20, 0, 0, 0, 21,
- 22, 0, 0, 23, 24, 0, 0, 0, 0, 0,
+ 116, 158, 267, 281, 363, 169, 200, 377, 160, 329,
+ 208, 355, 199, 222, 259, 260, 113, 274, 114, 1,
+ 79, 268, 95, 157, 212, 217, 364, 104, 2, 391,
+ 355, 105, 3, 4, 5, 223, 287, 288, 224, 396,
+ 6, 7, 80, 269, 210, 218, 211, 8, 9, 230,
+ 81, 10, 213, 101, 11, 12, 119, 171, 13, 120,
+ 161, 230, 282, 382, 283, 307, 121, 14, 219, 287,
+ 288, 15, 122, 127, 249, 140, 141, 16, 330, 17,
+ 143, 159, 172, 166, 170, 115, 205, 106, 18, 19,
+ 207, 215, 20, 144, 145, 235, 21, 22, 209, 173,
+ 23, 24, 174, 365, 221, 216, 232, 115, 96, 25,
+ 366, 146, 251, 97, 162, 325, 326, 233, 378, 225,
+ 226, 248, 26, 27, 28, 251, 227, 367, 253, 29,
+ 265, 153, 107, 254, 236, 237, 238, 239, 30, 201,
+ 108, 257, 31, 109, 32, 294, 33, 34, 258, 147,
+ 270, 261, 295, 263, 284, 296, 35, 36, 37, 38,
+ 39, 40, 41, 42, 264, 110, 43, 273, 44, 154,
+ 111, 155, 276, 278, 175, 285, 368, 45, 148, 369,
+ 385, 293, 46, 47, 48, 371, 49, 50, 292, 279,
+ 51, 52, 297, 303, 304, 305, 328, 83, 332, -6,
+ 53, 84, 176, 177, 178, 179, 361, 85, 360, 394,
+ 180, 362, 372, 375, 399, 2, 376, 379, 384, 3,
+ 4, 5, 380, 298, 381, 327, 386, 6, 7, 240,
+ 388, 414, 231, 390, 8, 9, 391, 398, 10, 395,
+ 411, 11, 12, 149, 400, 13, 412, 241, 150, 306,
+ 156, 413, 242, 243, 14, 272, 252, 86, 15, 262,
+ 115, 103, 266, 250, 16, 277, 17, 139, 255, 308,
+ 333, 383, 397, 356, 410, 18, 19, 0, 334, 20,
+ 0, 0, 0, 21, 22, 0, 299, 23, 24, 0,
+ 87, 88, 0, 374, 0, 0, 25, 401, 402, 403,
+ 404, 405, 0, 0, 0, 0, 409, 89, 0, 26,
+ 27, 28, 0, 335, 336, 0, 29, 401, 402, 403,
+ 404, 405, 0, 0, 0, 30, 0, 0, 0, 31,
+ 337, 32, 0, 33, 34, 0, 0, 0, 90, 0,
+ 0, 0, 0, 35, 36, 37, 38, 39, 40, 41,
+ 42, 338, 0, 43, 0, 44, 0, 0, 0, 339,
+ 0, 340, 0, 0, 45, 0, 387, 0, 0, 46,
+ 47, 48, 0, 49, 50, 341, 2, 51, 52, 0,
+ 3, 4, 5, 0, 0, 0, -6, 53, 6, 7,
+ 0, 0, 342, 343, 0, 8, 9, 0, 0, 10,
+ 0, 0, 11, 12, 0, 0, 13, 0, 0, 0,
+ 0, 0, 0, 0, 0, 14, 0, 0, 0, 15,
+ 128, 129, 130, 131, 0, 16, 0, 17, 344, 0,
+ 345, 0, 0, 0, 0, 346, 18, 19, 0, 347,
+ 20, 0, 0, 0, 21, 22, 0, 0, 23, 24,
+ 132, 0, 133, 0, 134, 0, 0, 25, 0, 0,
+ 135, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 26, 27, 28, 0, 0, 0, 0, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 30, 0, 0, 0,
+ 31, 309, 32, 0, 33, 34, 0, 0, 0, 310,
+ 0, 0, 0, 0, 35, 36, 37, 38, 39, 40,
+ 41, 42, 0, 184, 43, 0, 44, 311, 312, 185,
+ 313, 186, 0, 0, 0, 45, 314, 0, 0, 0,
+ 46, 47, 48, 0, 49, 50, 0, 0, 51, 52,
+ 0, 0, 0, 0, 0, 0, 0, 187, 53, 0,
+ 0, 0, 0, 315, 316, 0, 0, 317, 318, 0,
+ 319, 320, 321, 0, 322, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 25, 26, 27, 0, 331, 332,
- 0, 28, 0, 0, 0, 0, 0, 0, 0, 0,
- 29, 0, 0, 0, 30, 333, 31, 0, 32, 33,
- 0, 0, 0, 0, 0, 0, 0, 0, 34, 35,
- 36, 37, 38, 39, 40, 41, 334, 0, 42, 0,
- 43, 0, 0, 335, 0, 336, 0, 44, 0, 0,
- 0, 0, 45, 46, 47, 0, 48, 49, 305, 337,
- 50, 51, 0, 180, 0, 0, 306, 0, 0, 181,
- 52, 182, 0, 0, 0, 0, 338, 339, 0, 0,
- 0, 0, 0, 0, 307, 308, 0, 309, 0, 0,
- 0, 0, 0, 310, 0, 0, 0, 183, 0, 0,
+ 0, 0, 0, 0, 0, 0, 188, 0, 189, 0,
+ 0, 0, 0, 0, 190, 0, 191, 0, 0, 192,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 340, 0, 341, 0, 0, 0, 0, 342, 0, 311,
- 312, 343, 0, 313, 314, 0, 315, 316, 317, 0,
- 318, 0, 0, 0, 0, 0, 184, 0, 185, 0,
- 0, 0, 0, 186, 0, 187, 0, 0, 188, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 189, 190, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 319
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 323,
+ 0, 193, 194
};
static const yytype_int16 yycheck[] =
{
- 14, 36, 179, 154, 155, 7, 8, 60, 5, 60,
- 42, 32, 47, 38, 54, 61, 143, 194, 65, 41,
- 67, 90, 36, 25, 29, 178, 143, 1, 4, 11,
- 60, 36, 60, 102, 39, 60, 10, 183, 34, 60,
- 14, 15, 16, 57, 153, 59, 0, 193, 22, 23,
- 26, 153, 3, 180, 181, 29, 30, 153, 54, 33,
- 153, 63, 36, 37, 153, 242, 40, 64, 153, 66,
- 92, 76, 27, 180, 181, 49, 193, 153, 118, 53,
- 60, 77, 60, 129, 178, 59, 153, 61, 153, 91,
- 153, 42, 43, 44, 45, 60, 70, 71, 153, 153,
- 74, 106, 253, 254, 78, 79, 153, 60, 82, 83,
- 65, 125, 67, 6, 96, 192, 32, 168, 60, 101,
- 153, 27, 153, 137, 146, 27, 102, 84, 60, 103,
- 104, 105, 189, 109, 166, 60, 110, 190, 31, 164,
- 184, 185, 186, 187, 188, 119, 60, 60, 60, 123,
- 126, 125, 154, 127, 128, 48, 153, 159, 51, 178,
- 153, 153, 167, 137, 138, 139, 140, 141, 142, 143,
- 144, 60, 323, 147, 8, 149, 153, 174, 12, 35,
- 357, 153, 156, 178, 18, 136, 28, 161, 162, 163,
- 145, 165, 166, 153, 27, 169, 170, 173, 153, 189,
- 176, 152, 60, 60, 178, 179, 157, 158, 50, 386,
- 153, 53, 178, 10, 391, 182, 189, 14, 15, 16,
- 20, 192, 257, 191, 24, 22, 23, 189, 189, 122,
- 189, 408, 29, 30, 68, 183, 33, 178, 97, 36,
- 37, 178, 192, 40, 184, 185, 186, 187, 188, 178,
- 134, 240, 49, 193, 161, 191, 53, 150, 151, 11,
- 177, 122, 59, 156, 61, 198, 100, 101, 149, 26,
- 285, 353, 388, 70, 71, -1, 402, 74, -1, 243,
- 80, 78, 79, 117, -1, 82, 83, -1, -1, -1,
- 325, 133, 134, -1, -1, -1, -1, -1, 140, -1,
- -1, -1, -1, -1, -1, -1, 103, 104, 105, -1,
- -1, -1, -1, 110, 148, -1, -1, -1, -1, -1,
- -1, -1, 119, -1, 124, -1, 123, -1, 125, -1,
- 127, 128, 132, -1, -1, 135, -1, -1, -1, -1,
- 137, 138, 139, 140, 141, 142, 143, 144, -1, -1,
- 147, -1, 149, -1, -1, 155, -1, -1, -1, 156,
- 160, -1, 376, -1, 161, 162, 163, -1, 165, 166,
- -1, 10, 169, 170, -1, 14, 15, 16, -1, -1,
- -1, 178, 179, 22, 23, 55, 56, 57, 58, -1,
- 29, 30, -1, -1, 33, -1, -1, 36, 37, -1,
- -1, 40, -1, -1, -1, -1, -1, -1, -1, -1,
- 49, -1, -1, -1, 53, 85, -1, 87, -1, 89,
- 59, -1, 61, -1, 94, 9, -1, -1, -1, -1,
- -1, 70, 71, 17, -1, 74, -1, -1, -1, 78,
- 79, -1, -1, 82, 83, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 103, 104, 105, -1, 52, 53,
- -1, 110, -1, -1, -1, -1, -1, -1, -1, -1,
- 119, -1, -1, -1, 123, 69, 125, -1, 127, 128,
- -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
- 139, 140, 141, 142, 143, 144, 90, -1, 147, -1,
- 149, -1, -1, 97, -1, 99, -1, 156, -1, -1,
- -1, -1, 161, 162, 163, -1, 165, 166, 46, 113,
- 169, 170, -1, 13, -1, -1, 54, -1, -1, 19,
- 179, 21, -1, -1, -1, -1, 130, 131, -1, -1,
- -1, -1, -1, -1, 72, 73, -1, 75, -1, -1,
- -1, -1, -1, 81, -1, -1, -1, 47, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 164, -1, 166, -1, -1, -1, -1, 171, -1, 107,
- 108, 175, -1, 111, 112, -1, 114, 115, 116, -1,
- 118, -1, -1, -1, -1, -1, 86, -1, 88, -1,
- -1, -1, -1, 93, -1, 95, -1, -1, 98, -1,
+ 14, 37, 183, 5, 4, 43, 60, 60, 41, 61,
+ 55, 144, 48, 28, 156, 157, 65, 198, 67, 1,
+ 181, 38, 11, 37, 32, 34, 26, 20, 10, 186,
+ 144, 24, 14, 15, 16, 50, 183, 184, 53, 196,
+ 22, 23, 60, 60, 58, 54, 60, 29, 30, 91,
+ 60, 33, 60, 156, 36, 37, 156, 6, 40, 156,
+ 93, 103, 64, 196, 66, 246, 156, 49, 77, 183,
+ 184, 53, 156, 60, 119, 156, 156, 59, 130, 61,
+ 60, 60, 31, 156, 156, 156, 60, 80, 70, 71,
+ 0, 156, 74, 7, 8, 3, 78, 79, 181, 48,
+ 82, 83, 51, 103, 195, 156, 60, 156, 97, 91,
+ 110, 25, 126, 102, 147, 257, 258, 32, 171, 134,
+ 135, 156, 104, 105, 106, 139, 141, 127, 60, 111,
+ 168, 27, 125, 156, 42, 43, 44, 45, 120, 193,
+ 133, 27, 124, 136, 126, 29, 128, 129, 27, 63,
+ 167, 84, 36, 60, 156, 39, 138, 139, 140, 141,
+ 142, 143, 144, 145, 192, 158, 148, 60, 150, 65,
+ 163, 67, 60, 60, 123, 177, 176, 159, 92, 179,
+ 361, 156, 164, 165, 166, 327, 168, 169, 60, 181,
+ 172, 173, 76, 156, 156, 60, 156, 8, 35, 181,
+ 182, 12, 151, 152, 153, 154, 192, 18, 181, 390,
+ 159, 156, 27, 60, 395, 10, 60, 156, 195, 14,
+ 15, 16, 192, 107, 181, 261, 194, 22, 23, 137,
+ 185, 412, 98, 192, 29, 30, 186, 181, 33, 192,
+ 181, 36, 37, 157, 195, 40, 192, 155, 162, 244,
+ 146, 181, 160, 161, 49, 195, 136, 68, 53, 163,
+ 156, 11, 181, 123, 59, 202, 61, 27, 151, 247,
+ 9, 357, 392, 289, 406, 70, 71, -1, 17, 74,
+ -1, -1, -1, 78, 79, -1, 170, 82, 83, -1,
+ 101, 102, -1, 329, -1, -1, 91, 187, 188, 189,
+ 190, 191, -1, -1, -1, -1, 196, 118, -1, 104,
+ 105, 106, -1, 52, 53, -1, 111, 187, 188, 189,
+ 190, 191, -1, -1, -1, 120, -1, -1, -1, 124,
+ 69, 126, -1, 128, 129, -1, -1, -1, 149, -1,
+ -1, -1, -1, 138, 139, 140, 141, 142, 143, 144,
+ 145, 90, -1, 148, -1, 150, -1, -1, -1, 98,
+ -1, 100, -1, -1, 159, -1, 380, -1, -1, 164,
+ 165, 166, -1, 168, 169, 114, 10, 172, 173, -1,
+ 14, 15, 16, -1, -1, -1, 181, 182, 22, 23,
+ -1, -1, 131, 132, -1, 29, 30, -1, -1, 33,
+ -1, -1, 36, 37, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, -1, -1, 49, -1, -1, -1, 53,
+ 55, 56, 57, 58, -1, 59, -1, 61, 167, -1,
+ 169, -1, -1, -1, -1, 174, 70, 71, -1, 178,
+ 74, -1, -1, -1, 78, 79, -1, -1, 82, 83,
+ 85, -1, 87, -1, 89, -1, -1, 91, -1, -1,
+ 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 104, 105, 106, -1, -1, -1, -1, 111, -1, -1,
+ -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
+ 124, 46, 126, -1, 128, 129, -1, -1, -1, 54,
+ -1, -1, -1, -1, 138, 139, 140, 141, 142, 143,
+ 144, 145, -1, 13, 148, -1, 150, 72, 73, 19,
+ 75, 21, -1, -1, -1, 159, 81, -1, -1, -1,
+ 164, 165, 166, -1, 168, 169, -1, -1, 172, 173,
+ -1, -1, -1, -1, -1, -1, -1, 47, 182, -1,
+ -1, -1, -1, 108, 109, -1, -1, 112, 113, -1,
+ 115, 116, 117, -1, 119, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 86, -1, 88, -1,
+ -1, -1, -1, -1, 94, -1, 96, -1, -1, 99,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 120, 121, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 171
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 174,
+ -1, 121, 122
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1287,82 +1290,83 @@ static const yytype_uint16 yystos[] =
{
0, 1, 10, 14, 15, 16, 22, 23, 29, 30,
33, 36, 37, 40, 49, 53, 59, 61, 70, 71,
- 74, 78, 79, 82, 83, 103, 104, 105, 110, 119,
- 123, 125, 127, 128, 137, 138, 139, 140, 141, 142,
- 143, 144, 147, 149, 156, 161, 162, 163, 165, 166,
- 169, 170, 179, 195, 196, 197, 198, 199, 211, 212,
- 213, 214, 218, 223, 231, 240, 245, 249, 254, 258,
- 259, 260, 261, 269, 270, 273, 284, 285, 178, 60,
- 60, 215, 8, 12, 18, 68, 100, 101, 117, 148,
- 250, 251, 252, 253, 11, 96, 101, 234, 235, 236,
- 153, 262, 250, 20, 24, 80, 124, 132, 135, 155,
- 160, 225, 65, 67, 153, 200, 201, 202, 153, 153,
- 153, 153, 267, 268, 200, 281, 55, 56, 57, 58,
- 85, 87, 89, 94, 237, 238, 239, 281, 153, 153,
- 280, 60, 7, 8, 25, 63, 91, 154, 159, 274,
- 275, 27, 65, 67, 145, 200, 201, 60, 41, 92,
- 146, 246, 247, 248, 153, 263, 224, 225, 153, 6,
- 31, 48, 51, 122, 150, 151, 156, 255, 256, 257,
- 13, 19, 21, 47, 86, 88, 93, 95, 98, 120,
- 121, 219, 220, 221, 222, 201, 60, 190, 277, 278,
- 279, 60, 276, 0, 197, 178, 200, 200, 32, 60,
- 283, 153, 153, 34, 54, 77, 272, 192, 28, 50,
- 53, 133, 134, 140, 216, 217, 251, 235, 60, 32,
- 226, 3, 42, 43, 44, 45, 136, 152, 157, 158,
- 241, 242, 243, 244, 153, 197, 268, 200, 238, 60,
- 153, 275, 232, 27, 27, 232, 232, 84, 247, 60,
- 189, 225, 256, 283, 38, 60, 164, 282, 220, 60,
- 283, 265, 60, 278, 60, 178, 203, 5, 64, 66,
- 153, 174, 271, 180, 181, 286, 287, 288, 60, 153,
- 29, 36, 39, 76, 106, 167, 227, 228, 229, 153,
- 153, 60, 242, 283, 282, 46, 54, 72, 73, 75,
- 81, 107, 108, 111, 112, 114, 115, 116, 118, 171,
- 233, 232, 232, 201, 153, 61, 129, 266, 35, 9,
- 17, 52, 53, 69, 90, 97, 99, 113, 130, 131,
- 164, 166, 171, 175, 204, 205, 206, 207, 208, 209,
- 210, 143, 287, 289, 290, 292, 178, 189, 153, 4,
- 26, 102, 109, 126, 173, 176, 230, 232, 27, 264,
- 201, 60, 60, 60, 168, 153, 189, 178, 193, 290,
- 192, 283, 191, 200, 182, 291, 189, 183, 293, 294,
- 283, 189, 193, 294, 178, 283, 192, 184, 185, 186,
- 187, 188, 295, 296, 297, 193, 296, 178, 189, 178,
- 283
+ 74, 78, 79, 82, 83, 91, 104, 105, 106, 111,
+ 120, 124, 126, 128, 129, 138, 139, 140, 141, 142,
+ 143, 144, 145, 148, 150, 159, 164, 165, 166, 168,
+ 169, 172, 173, 182, 198, 199, 200, 201, 202, 214,
+ 215, 216, 217, 221, 226, 234, 243, 248, 252, 257,
+ 261, 262, 263, 264, 272, 273, 276, 287, 288, 181,
+ 60, 60, 218, 8, 12, 18, 68, 101, 102, 118,
+ 149, 253, 254, 255, 256, 11, 97, 102, 237, 238,
+ 239, 156, 265, 253, 20, 24, 80, 125, 133, 136,
+ 158, 163, 228, 65, 67, 156, 203, 204, 205, 156,
+ 156, 156, 156, 270, 271, 203, 284, 60, 55, 56,
+ 57, 58, 85, 87, 89, 95, 240, 241, 242, 284,
+ 156, 156, 283, 60, 7, 8, 25, 63, 92, 157,
+ 162, 277, 278, 27, 65, 67, 146, 203, 204, 60,
+ 41, 93, 147, 249, 250, 251, 156, 266, 227, 228,
+ 156, 6, 31, 48, 51, 123, 151, 152, 153, 154,
+ 159, 258, 259, 260, 13, 19, 21, 47, 86, 88,
+ 94, 96, 99, 121, 122, 222, 223, 224, 225, 204,
+ 60, 193, 280, 281, 282, 60, 279, 0, 200, 181,
+ 203, 203, 32, 60, 286, 156, 156, 34, 54, 77,
+ 275, 195, 28, 50, 53, 134, 135, 141, 219, 220,
+ 254, 238, 60, 32, 229, 3, 42, 43, 44, 45,
+ 137, 155, 160, 161, 244, 245, 246, 247, 156, 200,
+ 271, 203, 241, 60, 156, 278, 235, 27, 27, 235,
+ 235, 84, 250, 60, 192, 228, 259, 286, 38, 60,
+ 167, 285, 223, 60, 286, 268, 60, 281, 60, 181,
+ 206, 5, 64, 66, 156, 177, 274, 183, 184, 289,
+ 290, 291, 60, 156, 29, 36, 39, 76, 107, 170,
+ 230, 231, 232, 156, 156, 60, 245, 286, 285, 46,
+ 54, 72, 73, 75, 81, 108, 109, 112, 113, 115,
+ 116, 117, 119, 174, 236, 235, 235, 204, 156, 61,
+ 130, 269, 35, 9, 17, 52, 53, 69, 90, 98,
+ 100, 114, 131, 132, 167, 169, 174, 178, 207, 208,
+ 209, 210, 211, 212, 213, 144, 290, 292, 293, 295,
+ 181, 192, 156, 4, 26, 103, 110, 127, 176, 179,
+ 233, 235, 27, 267, 204, 60, 60, 60, 171, 156,
+ 192, 181, 196, 293, 195, 286, 194, 203, 185, 294,
+ 192, 186, 296, 297, 286, 192, 196, 297, 181, 286,
+ 195, 187, 188, 189, 190, 191, 298, 299, 300, 196,
+ 299, 181, 192, 181, 286
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 194, 195, 196, 196, 196, 197, 197, 197, 197,
- 197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
- 198, 199, 199, 199, 199, 199, 200, 200, 201, 202,
- 202, 203, 203, 204, 204, 204, 205, 206, 206, 206,
- 206, 206, 206, 206, 206, 207, 207, 208, 208, 208,
- 208, 208, 208, 209, 210, 211, 212, 212, 213, 213,
- 213, 214, 214, 214, 214, 214, 214, 214, 214, 214,
- 215, 215, 216, 216, 217, 217, 217, 217, 217, 218,
- 219, 219, 220, 220, 220, 221, 221, 221, 221, 221,
- 221, 222, 222, 222, 222, 223, 223, 223, 224, 224,
- 225, 225, 225, 225, 225, 225, 225, 225, 226, 226,
- 227, 227, 227, 227, 228, 228, 229, 229, 230, 230,
- 230, 230, 230, 230, 230, 231, 231, 231, 231, 231,
- 231, 231, 231, 232, 232, 233, 233, 233, 233, 233,
- 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
- 234, 234, 235, 236, 236, 236, 237, 237, 238, 239,
- 239, 239, 239, 239, 239, 239, 239, 240, 241, 241,
- 242, 242, 242, 242, 242, 243, 243, 244, 244, 244,
- 244, 245, 246, 246, 247, 248, 248, 248, 249, 249,
- 250, 250, 251, 251, 252, 252, 252, 252, 252, 252,
- 253, 253, 254, 255, 255, 256, 257, 257, 257, 257,
- 257, 257, 257, 257, 258, 258, 258, 258, 258, 258,
- 258, 258, 258, 258, 258, 258, 258, 259, 259, 259,
- 260, 260, 260, 261, 261, 262, 262, 262, 263, 264,
- 264, 265, 265, 266, 266, 267, 267, 268, 269, 269,
- 270, 270, 271, 271, 271, 271, 272, 272, 272, 273,
- 274, 274, 275, 275, 275, 275, 275, 275, 275, 276,
- 276, 277, 277, 278, 278, 279, 280, 280, 281, 281,
- 282, 282, 282, 283, 283, 284, 285, 286, 286, 287,
- 288, 288, 289, 289, 290, 291, 292, 293, 293, 294,
- 295, 295, 296, 297, 297, 297, 297, 297
+ 0, 197, 198, 199, 199, 199, 200, 200, 200, 200,
+ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+ 201, 202, 202, 202, 202, 202, 203, 203, 204, 205,
+ 205, 206, 206, 207, 207, 207, 208, 209, 209, 209,
+ 209, 209, 209, 209, 209, 210, 210, 211, 211, 211,
+ 211, 211, 211, 212, 213, 214, 215, 215, 216, 216,
+ 216, 216, 217, 217, 217, 217, 217, 217, 217, 217,
+ 217, 218, 218, 219, 219, 220, 220, 220, 220, 220,
+ 221, 222, 222, 223, 223, 223, 224, 224, 224, 224,
+ 224, 224, 225, 225, 225, 225, 226, 226, 226, 227,
+ 227, 228, 228, 228, 228, 228, 228, 228, 228, 229,
+ 229, 230, 230, 230, 230, 231, 231, 232, 232, 233,
+ 233, 233, 233, 233, 233, 233, 234, 234, 234, 234,
+ 234, 234, 234, 234, 235, 235, 236, 236, 236, 236,
+ 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
+ 236, 237, 237, 238, 239, 239, 239, 240, 240, 241,
+ 242, 242, 242, 242, 242, 242, 242, 242, 243, 244,
+ 244, 245, 245, 245, 245, 245, 246, 246, 247, 247,
+ 247, 247, 248, 249, 249, 250, 251, 251, 251, 252,
+ 252, 253, 253, 254, 254, 255, 255, 255, 255, 255,
+ 255, 256, 256, 257, 258, 258, 259, 260, 260, 260,
+ 260, 260, 260, 260, 260, 260, 260, 261, 261, 261,
+ 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
+ 262, 262, 262, 263, 263, 263, 264, 264, 265, 265,
+ 265, 266, 267, 267, 268, 268, 269, 269, 270, 270,
+ 271, 272, 272, 273, 273, 274, 274, 274, 274, 275,
+ 275, 275, 276, 277, 277, 278, 278, 278, 278, 278,
+ 278, 278, 279, 279, 280, 280, 281, 281, 282, 283,
+ 283, 284, 284, 285, 285, 285, 286, 286, 287, 288,
+ 289, 289, 290, 291, 291, 292, 292, 293, 294, 295,
+ 296, 296, 297, 298, 298, 299, 300, 300, 300, 300,
+ 300
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -1375,30 +1379,31 @@ static const yytype_uint8 yyr2[] =
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,
- 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,
+ 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,
- 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, 2, 2, 2, 3,
- 1, 2, 2, 2, 2, 3, 2, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 0, 4, 1,
- 0, 0, 2, 2, 2, 2, 1, 1, 3, 3,
+ 1, 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, 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
+ 2, 2, 3, 1, 2, 2, 2, 2, 3, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 0, 4, 1, 0, 0, 2, 2, 2, 2, 1,
+ 1, 3, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 1, 2, 1, 1, 1, 5, 2,
+ 1, 2, 1, 1, 1, 1, 1, 1, 5, 1,
+ 3, 2, 3, 1, 1, 2, 1, 5, 4, 3,
+ 2, 1, 6, 3, 2, 3, 1, 1, 1, 1,
+ 1
};
@@ -2077,7 +2082,7 @@ yyreduce:
switch (yyn)
{
case 5:
-#line 370 "ntp_parser.y" /* yacc.c:1646 */
+#line 373 "ntp_parser.y" /* yacc.c:1646 */
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2089,85 +2094,85 @@ yyreduce:
ip_file->err_line_no,
ip_file->err_col_no);
}
-#line 2093 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2098 "ntp_parser.c" /* yacc.c:1646 */
break;
case 20:
-#line 405 "ntp_parser.y" /* yacc.c:1646 */
+#line 408 "ntp_parser.y" /* yacc.c:1646 */
{
peer_node *my_node;
my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.peers, my_node);
}
-#line 2104 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2109 "ntp_parser.c" /* yacc.c:1646 */
break;
case 27:
-#line 424 "ntp_parser.y" /* yacc.c:1646 */
+#line 427 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
-#line 2110 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2115 "ntp_parser.c" /* yacc.c:1646 */
break;
case 28:
-#line 429 "ntp_parser.y" /* yacc.c:1646 */
+#line 432 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
-#line 2116 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2121 "ntp_parser.c" /* yacc.c:1646 */
break;
case 29:
-#line 434 "ntp_parser.y" /* yacc.c:1646 */
+#line 437 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET; }
-#line 2122 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2127 "ntp_parser.c" /* yacc.c:1646 */
break;
case 30:
-#line 436 "ntp_parser.y" /* yacc.c:1646 */
+#line 439 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET6; }
-#line 2128 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2133 "ntp_parser.c" /* yacc.c:1646 */
break;
case 31:
-#line 441 "ntp_parser.y" /* yacc.c:1646 */
+#line 444 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2134 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2139 "ntp_parser.c" /* yacc.c:1646 */
break;
case 32:
-#line 443 "ntp_parser.y" /* yacc.c:1646 */
+#line 446 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2143 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2148 "ntp_parser.c" /* yacc.c:1646 */
break;
case 36:
-#line 457 "ntp_parser.y" /* yacc.c:1646 */
+#line 460 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2149 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2154 "ntp_parser.c" /* yacc.c:1646 */
break;
case 45:
-#line 473 "ntp_parser.y" /* yacc.c:1646 */
+#line 476 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2155 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2160 "ntp_parser.c" /* yacc.c:1646 */
break;
case 46:
-#line 475 "ntp_parser.y" /* yacc.c:1646 */
+#line 478 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2161 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2166 "ntp_parser.c" /* yacc.c:1646 */
break;
case 53:
-#line 489 "ntp_parser.y" /* yacc.c:1646 */
+#line 492 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2167 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2172 "ntp_parser.c" /* yacc.c:1646 */
break;
case 55:
-#line 503 "ntp_parser.y" /* yacc.c:1646 */
+#line 506 "ntp_parser.y" /* yacc.c:1646 */
{
unpeer_node *my_node;
@@ -2175,79 +2180,85 @@ yyreduce:
if (my_node)
APPEND_G_FIFO(cfgt.unpeers, my_node);
}
-#line 2179 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2184 "ntp_parser.c" /* yacc.c:1646 */
break;
case 58:
-#line 524 "ntp_parser.y" /* yacc.c:1646 */
+#line 527 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.broadcastclient = 1; }
-#line 2185 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2190 "ntp_parser.c" /* yacc.c:1646 */
break;
case 59:
-#line 526 "ntp_parser.y" /* yacc.c:1646 */
+#line 529 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
-#line 2191 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2196 "ntp_parser.c" /* yacc.c:1646 */
break;
case 60:
-#line 528 "ntp_parser.y" /* yacc.c:1646 */
+#line 531 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
-#line 2197 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2202 "ntp_parser.c" /* yacc.c:1646 */
break;
case 61:
-#line 539 "ntp_parser.y" /* yacc.c:1646 */
+#line 533 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.mdnstries = (yyvsp[0].Integer); }
+#line 2208 "ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 62:
+#line 544 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *atrv;
atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, atrv);
}
-#line 2208 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2219 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 62:
-#line 546 "ntp_parser.y" /* yacc.c:1646 */
+ case 63:
+#line 551 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.control_key = (yyvsp[0].Integer); }
-#line 2214 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2225 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 63:
-#line 548 "ntp_parser.y" /* yacc.c:1646 */
+ case 64:
+#line 553 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.cryptosw++;
CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2223 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2234 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 64:
-#line 553 "ntp_parser.y" /* yacc.c:1646 */
+ case 65:
+#line 558 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keys = (yyvsp[0].String); }
-#line 2229 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2240 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 65:
-#line 555 "ntp_parser.y" /* yacc.c:1646 */
+ case 66:
+#line 560 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keysdir = (yyvsp[0].String); }
-#line 2235 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2246 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 66:
-#line 557 "ntp_parser.y" /* yacc.c:1646 */
+ case 67:
+#line 562 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.request_key = (yyvsp[0].Integer); }
-#line 2241 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2252 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 67:
-#line 559 "ntp_parser.y" /* yacc.c:1646 */
+ case 68:
+#line 564 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.revoke = (yyvsp[0].Integer); }
-#line 2247 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2258 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 68:
-#line 561 "ntp_parser.y" /* yacc.c:1646 */
+ case 69:
+#line 566 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
@@ -2256,38 +2267,38 @@ yyreduce:
// else
// LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
}
-#line 2260 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2271 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 69:
-#line 570 "ntp_parser.y" /* yacc.c:1646 */
+ case 70:
+#line 575 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
-#line 2266 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2277 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 70:
-#line 575 "ntp_parser.y" /* yacc.c:1646 */
+ case 71:
+#line 580 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2272 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2283 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 71:
-#line 577 "ntp_parser.y" /* yacc.c:1646 */
+ case 72:
+#line 582 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2281 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2292 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 72:
-#line 585 "ntp_parser.y" /* yacc.c:1646 */
+ case 73:
+#line 590 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2287 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2298 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 73:
-#line 587 "ntp_parser.y" /* yacc.c:1646 */
+ case 74:
+#line 592 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = NULL;
cfgt.auth.revoke = (yyvsp[0].Integer);
@@ -2296,59 +2307,59 @@ yyreduce:
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
-#line 2300 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2311 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 79:
-#line 612 "ntp_parser.y" /* yacc.c:1646 */
+ case 80:
+#line 617 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
-#line 2306 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2317 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 80:
-#line 617 "ntp_parser.y" /* yacc.c:1646 */
+ case 81:
+#line 622 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2326 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 81:
-#line 622 "ntp_parser.y" /* yacc.c:1646 */
+ case 82:
+#line 627 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2324 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2335 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 82:
-#line 630 "ntp_parser.y" /* yacc.c:1646 */
+ case 83:
+#line 635 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2330 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2341 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 83:
-#line 632 "ntp_parser.y" /* yacc.c:1646 */
+ case 84:
+#line 637 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2336 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2347 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 84:
-#line 634 "ntp_parser.y" /* yacc.c:1646 */
+ case 85:
+#line 639 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2342 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2353 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 95:
-#line 660 "ntp_parser.y" /* yacc.c:1646 */
+ case 96:
+#line 665 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
-#line 2348 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2359 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 96:
-#line 662 "ntp_parser.y" /* yacc.c:1646 */
+ case 97:
+#line 667 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
cfgt.stats_dir = (yyvsp[0].String);
@@ -2357,55 +2368,55 @@ yyreduce:
yyerror(ip_file, "statsdir remote configuration ignored");
}
}
-#line 2361 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2372 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 97:
-#line 671 "ntp_parser.y" /* yacc.c:1646 */
+ case 98:
+#line 676 "ntp_parser.y" /* yacc.c:1646 */
{
filegen_node *fgn;
fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.filegen_opts, fgn);
}
-#line 2372 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2383 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 98:
-#line 681 "ntp_parser.y" /* yacc.c:1646 */
+ case 99:
+#line 686 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2381 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2392 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 99:
-#line 686 "ntp_parser.y" /* yacc.c:1646 */
+ case 100:
+#line 691 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2390 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2401 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 108:
-#line 705 "ntp_parser.y" /* yacc.c:1646 */
+ case 109:
+#line 710 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2396 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2407 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 109:
-#line 707 "ntp_parser.y" /* yacc.c:1646 */
+ case 110:
+#line 712 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2405 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2416 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 110:
-#line 715 "ntp_parser.y" /* yacc.c:1646 */
+ case 111:
+#line 720 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
@@ -2415,11 +2426,11 @@ yyreduce:
yyerror(ip_file, "filegen file remote config ignored");
}
}
-#line 2419 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2430 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 111:
-#line 725 "ntp_parser.y" /* yacc.c:1646 */
+ case 112:
+#line 730 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2428,11 +2439,11 @@ yyreduce:
yyerror(ip_file, "filegen type remote config ignored");
}
}
-#line 2432 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2443 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 112:
-#line 734 "ntp_parser.y" /* yacc.c:1646 */
+ case 113:
+#line 739 "ntp_parser.y" /* yacc.c:1646 */
{
const char *err;
@@ -2447,33 +2458,33 @@ yyreduce:
yyerror(ip_file, err);
}
}
-#line 2451 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2462 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 113:
-#line 749 "ntp_parser.y" /* yacc.c:1646 */
+ case 114:
+#line 754 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2457 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2468 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 125:
-#line 779 "ntp_parser.y" /* yacc.c:1646 */
+ case 126:
+#line 784 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2465 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2476 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 126:
-#line 783 "ntp_parser.y" /* yacc.c:1646 */
+ case 127:
+#line 788 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2473 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2484 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 127:
-#line 787 "ntp_parser.y" /* yacc.c:1646 */
+ case 128:
+#line 792 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2481,11 +2492,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2485 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2496 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 128:
-#line 795 "ntp_parser.y" /* yacc.c:1646 */
+ case 129:
+#line 800 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2493,11 +2504,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2497 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2508 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 129:
-#line 803 "ntp_parser.y" /* yacc.c:1646 */
+ case 130:
+#line 808 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2505,11 +2516,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2509 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2520 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 130:
-#line 811 "ntp_parser.y" /* yacc.c:1646 */
+ case 131:
+#line 816 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2524,11 +2535,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2528 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2539 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 131:
-#line 826 "ntp_parser.y" /* yacc.c:1646 */
+ case 132:
+#line 831 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2543,11 +2554,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2547 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2558 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 132:
-#line 841 "ntp_parser.y" /* yacc.c:1646 */
+ case 133:
+#line 846 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node * rn;
@@ -2556,199 +2567,199 @@ yyreduce:
NULL, NULL, (yyvsp[0].Int_fifo), ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2560 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2571 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 133:
-#line 853 "ntp_parser.y" /* yacc.c:1646 */
+ case 134:
+#line 858 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Int_fifo) = NULL; }
-#line 2566 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2577 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 134:
-#line 855 "ntp_parser.y" /* yacc.c:1646 */
+ case 135:
+#line 860 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2575 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2586 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 150:
-#line 881 "ntp_parser.y" /* yacc.c:1646 */
+ case 151:
+#line 886 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2584 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2595 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 151:
-#line 886 "ntp_parser.y" /* yacc.c:1646 */
+ case 152:
+#line 891 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2593 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2604 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 152:
-#line 894 "ntp_parser.y" /* yacc.c:1646 */
+ case 153:
+#line 899 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2599 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2610 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 156:
-#line 905 "ntp_parser.y" /* yacc.c:1646 */
+ case 157:
+#line 910 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2608 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2619 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 157:
-#line 910 "ntp_parser.y" /* yacc.c:1646 */
+ case 158:
+#line 915 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2617 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2628 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 158:
-#line 918 "ntp_parser.y" /* yacc.c:1646 */
+ case 159:
+#line 923 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2623 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2634 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 167:
-#line 938 "ntp_parser.y" /* yacc.c:1646 */
+ case 168:
+#line 943 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.fudge, aon);
}
-#line 2634 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2645 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 168:
-#line 948 "ntp_parser.y" /* yacc.c:1646 */
+ case 169:
+#line 953 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2643 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2654 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 169:
-#line 953 "ntp_parser.y" /* yacc.c:1646 */
+ case 170:
+#line 958 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2652 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
- break;
-
- case 170:
-#line 961 "ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2658 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2663 "ntp_parser.c" /* yacc.c:1646 */
break;
case 171:
-#line 963 "ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2664 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 966 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 2669 "ntp_parser.c" /* yacc.c:1646 */
break;
case 172:
-#line 965 "ntp_parser.y" /* yacc.c:1646 */
+#line 968 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2670 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2675 "ntp_parser.c" /* yacc.c:1646 */
break;
case 173:
-#line 967 "ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2676 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 970 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2681 "ntp_parser.c" /* yacc.c:1646 */
break;
case 174:
-#line 969 "ntp_parser.y" /* yacc.c:1646 */
+#line 972 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2682 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2687 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 181:
-#line 990 "ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
-#line 2688 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 175:
+#line 974 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2693 "ntp_parser.c" /* yacc.c:1646 */
break;
case 182:
#line 995 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
+#line 2699 "ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 183:
+#line 1000 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2697 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2708 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 183:
-#line 1000 "ntp_parser.y" /* yacc.c:1646 */
+ case 184:
+#line 1005 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2706 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2717 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 184:
-#line 1008 "ntp_parser.y" /* yacc.c:1646 */
+ case 185:
+#line 1013 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2712 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2723 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 188:
-#line 1024 "ntp_parser.y" /* yacc.c:1646 */
+ case 189:
+#line 1029 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2718 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2729 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 189:
-#line 1026 "ntp_parser.y" /* yacc.c:1646 */
+ case 190:
+#line 1031 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2724 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2735 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 190:
-#line 1031 "ntp_parser.y" /* yacc.c:1646 */
+ case 191:
+#line 1036 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2733 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2744 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 191:
-#line 1036 "ntp_parser.y" /* yacc.c:1646 */
+ case 192:
+#line 1041 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2742 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2753 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 192:
-#line 1044 "ntp_parser.y" /* yacc.c:1646 */
+ case 193:
+#line 1049 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2748 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2759 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 193:
-#line 1046 "ntp_parser.y" /* yacc.c:1646 */
+ case 194:
+#line 1051 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
@@ -2762,63 +2773,63 @@ yyreduce:
yyerror(ip_file, err_str);
}
}
-#line 2766 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2777 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 202:
-#line 1081 "ntp_parser.y" /* yacc.c:1646 */
+ case 203:
+#line 1086 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
-#line 2772 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2783 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 203:
-#line 1086 "ntp_parser.y" /* yacc.c:1646 */
+ case 204:
+#line 1091 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2781 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2792 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 204:
-#line 1091 "ntp_parser.y" /* yacc.c:1646 */
+ case 205:
+#line 1096 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2790 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2801 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 205:
-#line 1099 "ntp_parser.y" /* yacc.c:1646 */
+ case 206:
+#line 1104 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2796 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2807 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 216:
-#line 1122 "ntp_parser.y" /* yacc.c:1646 */
+ case 219:
+#line 1129 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2807 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2818 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 217:
-#line 1129 "ntp_parser.y" /* yacc.c:1646 */
+ case 220:
+#line 1136 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2818 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2829 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 218:
-#line 1136 "ntp_parser.y" /* yacc.c:1646 */
+ case 221:
+#line 1143 "ntp_parser.y" /* yacc.c:1646 */
{
char error_text[64];
attr_val *av;
@@ -2834,11 +2845,11 @@ yyreduce:
yyerror(ip_file, error_text);
}
}
-#line 2838 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2849 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 219:
-#line 1152 "ntp_parser.y" /* yacc.c:1646 */
+ case 222:
+#line 1159 "ntp_parser.y" /* yacc.c:1646 */
{
if (!input_from_file) {
yyerror(ip_file, "remote includefile ignored");
@@ -2857,72 +2868,72 @@ yyreduce:
}
}
}
-#line 2861 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2872 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 220:
-#line 1171 "ntp_parser.y" /* yacc.c:1646 */
+ case 223:
+#line 1178 "ntp_parser.y" /* yacc.c:1646 */
{
while (curr_include_level != -1)
FCLOSE(fp[curr_include_level--]);
}
-#line 2870 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2881 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 221:
-#line 1176 "ntp_parser.y" /* yacc.c:1646 */
+ case 224:
+#line 1183 "ntp_parser.y" /* yacc.c:1646 */
{ /* see drift_parm below for actions */ }
-#line 2876 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2887 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 222:
-#line 1178 "ntp_parser.y" /* yacc.c:1646 */
+ case 225:
+#line 1185 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
-#line 2882 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2893 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 223:
-#line 1180 "ntp_parser.y" /* yacc.c:1646 */
+ case 226:
+#line 1187 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
-#line 2888 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2899 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 224:
-#line 1182 "ntp_parser.y" /* yacc.c:1646 */
+ case 227:
+#line 1189 "ntp_parser.y" /* yacc.c:1646 */
{ APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
-#line 2894 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2905 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 225:
-#line 1184 "ntp_parser.y" /* yacc.c:1646 */
+ case 228:
+#line 1191 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.trap, aon);
}
-#line 2905 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2916 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 226:
-#line 1191 "ntp_parser.y" /* yacc.c:1646 */
+ case 229:
+#line 1198 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
-#line 2911 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2922 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 235:
-#line 1213 "ntp_parser.y" /* yacc.c:1646 */
+ case 238:
+#line 1220 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2922 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2933 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 236:
-#line 1220 "ntp_parser.y" /* yacc.c:1646 */
+ case 239:
+#line 1227 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
@@ -2931,82 +2942,82 @@ yyreduce:
av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2935 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2946 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 237:
-#line 1229 "ntp_parser.y" /* yacc.c:1646 */
+ case 240:
+#line 1236 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval(T_Driftfile, "");
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2946 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2957 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 238:
-#line 1239 "ntp_parser.y" /* yacc.c:1646 */
+ case 241:
+#line 1246 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
-#line 2952 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2963 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 240:
-#line 1245 "ntp_parser.y" /* yacc.c:1646 */
+ case 243:
+#line 1252 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 2958 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2969 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 241:
-#line 1250 "ntp_parser.y" /* yacc.c:1646 */
+ case 244:
+#line 1257 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2964 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2975 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 242:
-#line 1252 "ntp_parser.y" /* yacc.c:1646 */
+ case 245:
+#line 1259 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2973 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2984 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 243:
-#line 1260 "ntp_parser.y" /* yacc.c:1646 */
+ case 246:
+#line 1267 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2979 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2990 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 244:
-#line 1262 "ntp_parser.y" /* yacc.c:1646 */
+ case 247:
+#line 1269 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
destroy_address_node((yyvsp[0].Address_node));
}
-#line 2988 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2999 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 245:
-#line 1270 "ntp_parser.y" /* yacc.c:1646 */
+ case 248:
+#line 1277 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2997 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3008 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 246:
-#line 1275 "ntp_parser.y" /* yacc.c:1646 */
+ case 249:
+#line 1282 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3006 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3017 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 247:
-#line 1283 "ntp_parser.y" /* yacc.c:1646 */
+ case 250:
+#line 1290 "ntp_parser.y" /* yacc.c:1646 */
{
char prefix;
char * type;
@@ -3028,141 +3039,141 @@ yyreduce:
(yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
YYFREE((yyvsp[0].String));
}
-#line 3032 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3043 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 248:
-#line 1308 "ntp_parser.y" /* yacc.c:1646 */
+ case 251:
+#line 1315 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3043 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3054 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 249:
-#line 1315 "ntp_parser.y" /* yacc.c:1646 */
+ case 252:
+#line 1322 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3054 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3065 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 259:
-#line 1343 "ntp_parser.y" /* yacc.c:1646 */
+ case 262:
+#line 1350 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
-#line 3060 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3071 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 260:
-#line 1348 "ntp_parser.y" /* yacc.c:1646 */
+ case 263:
+#line 1355 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3069 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3080 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 261:
-#line 1353 "ntp_parser.y" /* yacc.c:1646 */
+ case 264:
+#line 1360 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3078 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3089 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 269:
-#line 1377 "ntp_parser.y" /* yacc.c:1646 */
+ case 272:
+#line 1384 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3087 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3098 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 270:
-#line 1382 "ntp_parser.y" /* yacc.c:1646 */
+ case 273:
+#line 1389 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3096 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3107 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 271:
-#line 1390 "ntp_parser.y" /* yacc.c:1646 */
+ case 274:
+#line 1397 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3105 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3116 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 272:
-#line 1395 "ntp_parser.y" /* yacc.c:1646 */
+ case 275:
+#line 1402 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3114 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3125 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 273:
-#line 1403 "ntp_parser.y" /* yacc.c:1646 */
+ case 276:
+#line 1410 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
-#line 3120 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3131 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 275:
-#line 1409 "ntp_parser.y" /* yacc.c:1646 */
+ case 278:
+#line 1416 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
-#line 3126 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3137 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 276:
-#line 1414 "ntp_parser.y" /* yacc.c:1646 */
+ case 279:
+#line 1421 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = (yyvsp[-1].String_fifo);
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3135 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3146 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 277:
-#line 1419 "ntp_parser.y" /* yacc.c:1646 */
+ case 280:
+#line 1426 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = NULL;
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3144 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3155 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 278:
-#line 1427 "ntp_parser.y" /* yacc.c:1646 */
+ case 281:
+#line 1434 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3153 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3164 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 279:
-#line 1432 "ntp_parser.y" /* yacc.c:1646 */
+ case 282:
+#line 1439 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = NULL;
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3162 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3173 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 280:
-#line 1440 "ntp_parser.y" /* yacc.c:1646 */
+ case 283:
+#line 1447 "ntp_parser.y" /* yacc.c:1646 */
{
if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
yyerror(ip_file, "Integer value is not boolean (0 or 1). Assuming 1");
@@ -3171,29 +3182,29 @@ yyreduce:
(yyval.Integer) = (yyvsp[0].Integer);
}
}
-#line 3175 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3186 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 281:
-#line 1448 "ntp_parser.y" /* yacc.c:1646 */
+ case 284:
+#line 1455 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 1; }
-#line 3181 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3192 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 282:
-#line 1449 "ntp_parser.y" /* yacc.c:1646 */
+ case 285:
+#line 1456 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 3187 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3198 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 283:
-#line 1453 "ntp_parser.y" /* yacc.c:1646 */
+ case 286:
+#line 1460 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (double)(yyvsp[0].Integer); }
-#line 3193 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3204 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 285:
-#line 1464 "ntp_parser.y" /* yacc.c:1646 */
+ case 288:
+#line 1471 "ntp_parser.y" /* yacc.c:1646 */
{
sim_node *sn;
@@ -3203,125 +3214,125 @@ yyreduce:
/* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
-#line 3207 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3218 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 286:
-#line 1481 "ntp_parser.y" /* yacc.c:1646 */
+ case 289:
+#line 1488 "ntp_parser.y" /* yacc.c:1646 */
{ old_config_style = 0; }
-#line 3213 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3224 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 287:
-#line 1486 "ntp_parser.y" /* yacc.c:1646 */
+ case 290:
+#line 1493 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3222 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3233 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 288:
-#line 1491 "ntp_parser.y" /* yacc.c:1646 */
+ case 291:
+#line 1498 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3231 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3242 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 289:
-#line 1499 "ntp_parser.y" /* yacc.c:1646 */
+ case 292:
+#line 1506 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3237 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3248 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 292:
-#line 1509 "ntp_parser.y" /* yacc.c:1646 */
+ case 295:
+#line 1516 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3246 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3257 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 293:
-#line 1514 "ntp_parser.y" /* yacc.c:1646 */
+ case 296:
+#line 1521 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3255 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3266 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 294:
-#line 1522 "ntp_parser.y" /* yacc.c:1646 */
+ case 297:
+#line 1529 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
-#line 3261 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3272 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 295:
-#line 1527 "ntp_parser.y" /* yacc.c:1646 */
+ case 298:
+#line 1534 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (yyvsp[-1].Double); }
-#line 3267 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3278 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 296:
-#line 1532 "ntp_parser.y" /* yacc.c:1646 */
+ case 299:
+#line 1539 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = (yyvsp[0].Address_node); }
-#line 3273 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3284 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 297:
-#line 1537 "ntp_parser.y" /* yacc.c:1646 */
+ case 300:
+#line 1544 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3282 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3293 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 298:
-#line 1542 "ntp_parser.y" /* yacc.c:1646 */
+ case 301:
+#line 1549 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3291 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3302 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 299:
-#line 1550 "ntp_parser.y" /* yacc.c:1646 */
+ case 302:
+#line 1557 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
-#line 3297 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3308 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 300:
-#line 1555 "ntp_parser.y" /* yacc.c:1646 */
+ case 303:
+#line 1562 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3306 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3317 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 301:
-#line 1560 "ntp_parser.y" /* yacc.c:1646 */
+ case 304:
+#line 1567 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3326 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 302:
-#line 1568 "ntp_parser.y" /* yacc.c:1646 */
+ case 305:
+#line 1575 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3321 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3332 "ntp_parser.c" /* yacc.c:1646 */
break;
-#line 3325 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3336 "ntp_parser.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3549,7 +3560,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1579 "ntp_parser.y" /* yacc.c:1906 */
+#line 1586 "ntp_parser.y" /* yacc.c:1906 */
void
diff --git a/ntpd/ntp_parser.h b/ntpd/ntp_parser.h
index c830157..2804e54 100644
--- a/ntpd/ntp_parser.h
+++ b/ntpd/ntp_parser.h
@@ -30,8 +30,8 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-#ifndef YY_YY_______NTPD_NTP_PARSER_H_INCLUDED
-# define YY_YY_______NTPD_NTP_PARSER_H_INCLUDED
+#ifndef YY_YY_NTP_PARSER_H_INCLUDED
+# define YY_YY_NTP_PARSER_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -133,104 +133,107 @@ extern int yydebug;
T_Maxdist = 343,
T_Maxmem = 344,
T_Maxpoll = 345,
- T_Mem = 346,
- T_Memlock = 347,
- T_Minclock = 348,
- T_Mindepth = 349,
- T_Mindist = 350,
- T_Minimum = 351,
- T_Minpoll = 352,
- T_Minsane = 353,
- T_Mode = 354,
- T_Mode7 = 355,
- T_Monitor = 356,
- T_Month = 357,
- T_Mru = 358,
- T_Multicastclient = 359,
- T_Nic = 360,
- T_Nolink = 361,
- T_Nomodify = 362,
- T_Nomrulist = 363,
- T_None = 364,
- T_Nonvolatile = 365,
- T_Nopeer = 366,
- T_Noquery = 367,
- T_Noselect = 368,
- T_Noserve = 369,
- T_Notrap = 370,
- T_Notrust = 371,
- T_Ntp = 372,
- T_Ntpport = 373,
- T_NtpSignDsocket = 374,
- T_Orphan = 375,
- T_Orphanwait = 376,
- T_Panic = 377,
- T_Peer = 378,
- T_Peerstats = 379,
- T_Phone = 380,
- T_Pid = 381,
- T_Pidfile = 382,
- T_Pool = 383,
- T_Port = 384,
- T_Preempt = 385,
- T_Prefer = 386,
- T_Protostats = 387,
- T_Pw = 388,
- T_Randfile = 389,
- T_Rawstats = 390,
- T_Refid = 391,
- T_Requestkey = 392,
- T_Reset = 393,
- T_Restrict = 394,
- T_Revoke = 395,
- T_Rlimit = 396,
- T_Saveconfigdir = 397,
- T_Server = 398,
- T_Setvar = 399,
- T_Source = 400,
- T_Stacksize = 401,
- T_Statistics = 402,
- T_Stats = 403,
- T_Statsdir = 404,
- T_Step = 405,
- T_Stepout = 406,
- T_Stratum = 407,
- T_String = 408,
- T_Sys = 409,
- T_Sysstats = 410,
- T_Tick = 411,
- T_Time1 = 412,
- T_Time2 = 413,
- T_Timer = 414,
- T_Timingstats = 415,
- T_Tinker = 416,
- T_Tos = 417,
- T_Trap = 418,
- T_True = 419,
- T_Trustedkey = 420,
- T_Ttl = 421,
- T_Type = 422,
- T_U_int = 423,
- T_Unconfig = 424,
- T_Unpeer = 425,
- T_Version = 426,
- T_WanderThreshold = 427,
- T_Week = 428,
- T_Wildcard = 429,
- T_Xleave = 430,
- T_Year = 431,
- T_Flag = 432,
- T_EOC = 433,
- T_Simulate = 434,
- T_Beep_Delay = 435,
- T_Sim_Duration = 436,
- T_Server_Offset = 437,
- T_Duration = 438,
- T_Freq_Offset = 439,
- T_Wander = 440,
- T_Jitter = 441,
- T_Prop_Delay = 442,
- T_Proc_Delay = 443
+ T_Mdnstries = 346,
+ T_Mem = 347,
+ T_Memlock = 348,
+ T_Minclock = 349,
+ T_Mindepth = 350,
+ T_Mindist = 351,
+ T_Minimum = 352,
+ T_Minpoll = 353,
+ T_Minsane = 354,
+ T_Mode = 355,
+ T_Mode7 = 356,
+ T_Monitor = 357,
+ T_Month = 358,
+ T_Mru = 359,
+ T_Multicastclient = 360,
+ T_Nic = 361,
+ T_Nolink = 362,
+ T_Nomodify = 363,
+ T_Nomrulist = 364,
+ T_None = 365,
+ T_Nonvolatile = 366,
+ T_Nopeer = 367,
+ T_Noquery = 368,
+ T_Noselect = 369,
+ T_Noserve = 370,
+ T_Notrap = 371,
+ T_Notrust = 372,
+ T_Ntp = 373,
+ T_Ntpport = 374,
+ T_NtpSignDsocket = 375,
+ T_Orphan = 376,
+ T_Orphanwait = 377,
+ T_Panic = 378,
+ T_Peer = 379,
+ T_Peerstats = 380,
+ T_Phone = 381,
+ T_Pid = 382,
+ T_Pidfile = 383,
+ T_Pool = 384,
+ T_Port = 385,
+ T_Preempt = 386,
+ T_Prefer = 387,
+ T_Protostats = 388,
+ T_Pw = 389,
+ T_Randfile = 390,
+ T_Rawstats = 391,
+ T_Refid = 392,
+ T_Requestkey = 393,
+ T_Reset = 394,
+ T_Restrict = 395,
+ T_Revoke = 396,
+ T_Rlimit = 397,
+ T_Saveconfigdir = 398,
+ T_Server = 399,
+ T_Setvar = 400,
+ T_Source = 401,
+ T_Stacksize = 402,
+ T_Statistics = 403,
+ T_Stats = 404,
+ T_Statsdir = 405,
+ T_Step = 406,
+ T_Stepback = 407,
+ T_Stepfwd = 408,
+ T_Stepout = 409,
+ T_Stratum = 410,
+ T_String = 411,
+ T_Sys = 412,
+ T_Sysstats = 413,
+ T_Tick = 414,
+ T_Time1 = 415,
+ T_Time2 = 416,
+ T_Timer = 417,
+ T_Timingstats = 418,
+ T_Tinker = 419,
+ T_Tos = 420,
+ T_Trap = 421,
+ T_True = 422,
+ T_Trustedkey = 423,
+ T_Ttl = 424,
+ T_Type = 425,
+ T_U_int = 426,
+ T_Unconfig = 427,
+ T_Unpeer = 428,
+ T_Version = 429,
+ T_WanderThreshold = 430,
+ T_Week = 431,
+ T_Wildcard = 432,
+ T_Xleave = 433,
+ T_Year = 434,
+ T_Flag = 435,
+ T_EOC = 436,
+ T_Simulate = 437,
+ T_Beep_Delay = 438,
+ T_Sim_Duration = 439,
+ T_Server_Offset = 440,
+ T_Duration = 441,
+ T_Freq_Offset = 442,
+ T_Wander = 443,
+ T_Jitter = 444,
+ T_Prop_Delay = 445,
+ T_Proc_Delay = 446
};
#endif
/* Tokens. */
@@ -322,104 +325,107 @@ extern int yydebug;
#define T_Maxdist 343
#define T_Maxmem 344
#define T_Maxpoll 345
-#define T_Mem 346
-#define T_Memlock 347
-#define T_Minclock 348
-#define T_Mindepth 349
-#define T_Mindist 350
-#define T_Minimum 351
-#define T_Minpoll 352
-#define T_Minsane 353
-#define T_Mode 354
-#define T_Mode7 355
-#define T_Monitor 356
-#define T_Month 357
-#define T_Mru 358
-#define T_Multicastclient 359
-#define T_Nic 360
-#define T_Nolink 361
-#define T_Nomodify 362
-#define T_Nomrulist 363
-#define T_None 364
-#define T_Nonvolatile 365
-#define T_Nopeer 366
-#define T_Noquery 367
-#define T_Noselect 368
-#define T_Noserve 369
-#define T_Notrap 370
-#define T_Notrust 371
-#define T_Ntp 372
-#define T_Ntpport 373
-#define T_NtpSignDsocket 374
-#define T_Orphan 375
-#define T_Orphanwait 376
-#define T_Panic 377
-#define T_Peer 378
-#define T_Peerstats 379
-#define T_Phone 380
-#define T_Pid 381
-#define T_Pidfile 382
-#define T_Pool 383
-#define T_Port 384
-#define T_Preempt 385
-#define T_Prefer 386
-#define T_Protostats 387
-#define T_Pw 388
-#define T_Randfile 389
-#define T_Rawstats 390
-#define T_Refid 391
-#define T_Requestkey 392
-#define T_Reset 393
-#define T_Restrict 394
-#define T_Revoke 395
-#define T_Rlimit 396
-#define T_Saveconfigdir 397
-#define T_Server 398
-#define T_Setvar 399
-#define T_Source 400
-#define T_Stacksize 401
-#define T_Statistics 402
-#define T_Stats 403
-#define T_Statsdir 404
-#define T_Step 405
-#define T_Stepout 406
-#define T_Stratum 407
-#define T_String 408
-#define T_Sys 409
-#define T_Sysstats 410
-#define T_Tick 411
-#define T_Time1 412
-#define T_Time2 413
-#define T_Timer 414
-#define T_Timingstats 415
-#define T_Tinker 416
-#define T_Tos 417
-#define T_Trap 418
-#define T_True 419
-#define T_Trustedkey 420
-#define T_Ttl 421
-#define T_Type 422
-#define T_U_int 423
-#define T_Unconfig 424
-#define T_Unpeer 425
-#define T_Version 426
-#define T_WanderThreshold 427
-#define T_Week 428
-#define T_Wildcard 429
-#define T_Xleave 430
-#define T_Year 431
-#define T_Flag 432
-#define T_EOC 433
-#define T_Simulate 434
-#define T_Beep_Delay 435
-#define T_Sim_Duration 436
-#define T_Server_Offset 437
-#define T_Duration 438
-#define T_Freq_Offset 439
-#define T_Wander 440
-#define T_Jitter 441
-#define T_Prop_Delay 442
-#define T_Proc_Delay 443
+#define T_Mdnstries 346
+#define T_Mem 347
+#define T_Memlock 348
+#define T_Minclock 349
+#define T_Mindepth 350
+#define T_Mindist 351
+#define T_Minimum 352
+#define T_Minpoll 353
+#define T_Minsane 354
+#define T_Mode 355
+#define T_Mode7 356
+#define T_Monitor 357
+#define T_Month 358
+#define T_Mru 359
+#define T_Multicastclient 360
+#define T_Nic 361
+#define T_Nolink 362
+#define T_Nomodify 363
+#define T_Nomrulist 364
+#define T_None 365
+#define T_Nonvolatile 366
+#define T_Nopeer 367
+#define T_Noquery 368
+#define T_Noselect 369
+#define T_Noserve 370
+#define T_Notrap 371
+#define T_Notrust 372
+#define T_Ntp 373
+#define T_Ntpport 374
+#define T_NtpSignDsocket 375
+#define T_Orphan 376
+#define T_Orphanwait 377
+#define T_Panic 378
+#define T_Peer 379
+#define T_Peerstats 380
+#define T_Phone 381
+#define T_Pid 382
+#define T_Pidfile 383
+#define T_Pool 384
+#define T_Port 385
+#define T_Preempt 386
+#define T_Prefer 387
+#define T_Protostats 388
+#define T_Pw 389
+#define T_Randfile 390
+#define T_Rawstats 391
+#define T_Refid 392
+#define T_Requestkey 393
+#define T_Reset 394
+#define T_Restrict 395
+#define T_Revoke 396
+#define T_Rlimit 397
+#define T_Saveconfigdir 398
+#define T_Server 399
+#define T_Setvar 400
+#define T_Source 401
+#define T_Stacksize 402
+#define T_Statistics 403
+#define T_Stats 404
+#define T_Statsdir 405
+#define T_Step 406
+#define T_Stepback 407
+#define T_Stepfwd 408
+#define T_Stepout 409
+#define T_Stratum 410
+#define T_String 411
+#define T_Sys 412
+#define T_Sysstats 413
+#define T_Tick 414
+#define T_Time1 415
+#define T_Time2 416
+#define T_Timer 417
+#define T_Timingstats 418
+#define T_Tinker 419
+#define T_Tos 420
+#define T_Trap 421
+#define T_True 422
+#define T_Trustedkey 423
+#define T_Ttl 424
+#define T_Type 425
+#define T_U_int 426
+#define T_Unconfig 427
+#define T_Unpeer 428
+#define T_Version 429
+#define T_WanderThreshold 430
+#define T_Week 431
+#define T_Wildcard 432
+#define T_Xleave 433
+#define T_Year 434
+#define T_Flag 435
+#define T_EOC 436
+#define T_Simulate 437
+#define T_Beep_Delay 438
+#define T_Sim_Duration 439
+#define T_Server_Offset 440
+#define T_Duration 441
+#define T_Freq_Offset 442
+#define T_Wander 443
+#define T_Jitter 444
+#define T_Prop_Delay 445
+#define T_Proc_Delay 446
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -445,7 +451,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 449 "../../ntpd/ntp_parser.h" /* yacc.c:1909 */
+#line 455 "ntp_parser.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -456,4 +462,4 @@ extern YYSTYPE yylval;
int yyparse (struct FILE_INFO *ip_file);
-#endif /* !YY_YY_______NTPD_NTP_PARSER_H_INCLUDED */
+#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
diff --git a/ntpd/ntp_parser.y b/ntpd/ntp_parser.y
index e75bffe..e878e79 100644
--- a/ntpd/ntp_parser.y
+++ b/ntpd/ntp_parser.y
@@ -159,6 +159,7 @@
%token <Integer> T_Maxdist
%token <Integer> T_Maxmem
%token <Integer> T_Maxpoll
+%token <Integer> T_Mdnstries
%token <Integer> T_Mem
%token <Integer> T_Memlock
%token <Integer> T_Minclock
@@ -219,6 +220,8 @@
%token <Integer> T_Stats
%token <Integer> T_Statsdir
%token <Integer> T_Step
+%token <Integer> T_Stepback
+%token <Integer> T_Stepfwd
%token <Integer> T_Stepout
%token <Integer> T_Stratum
%token <String> T_String /* not a token */
@@ -526,6 +529,8 @@ other_mode_command
{ CONCAT_G_FIFOS(cfgt.manycastserver, $2); }
| T_Multicastclient address_list
{ CONCAT_G_FIFOS(cfgt.multicastclient, $2); }
+ | T_Mdnstries T_Integer
+ { cfgt.mdnstries = $2; }
;
@@ -1106,6 +1111,8 @@ tinker_option_keyword
| T_Huffpuff
| T_Panic
| T_Step
+ | T_Stepback
+ | T_Stepfwd
| T_Stepout
| T_Tick
;
diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c
index 495ee30..d42d804 100644
--- a/ntpd/ntp_peer.c
+++ b/ntpd/ntp_peer.c
@@ -92,6 +92,7 @@ int peer_free_count; /* count of free structures */
* value every time an association is mobilized.
*/
static associd_t current_association_ID; /* association ID */
+static associd_t initial_association_ID; /* association ID */
/*
* Memory allocation watermarks.
@@ -147,6 +148,7 @@ init_peer(void)
do
current_association_ID = ntp_random() & ASSOCID_MAX;
while (!current_association_ID);
+ initial_association_ID = current_association_ID;
}
@@ -1036,3 +1038,21 @@ findmanycastpeer(
return peer;
}
+
+/* peer_cleanup - clean peer list prior to shutdown */
+void peer_cleanup(void)
+{
+ struct peer *peer;
+ associd_t assoc;
+
+ for (assoc = initial_association_ID; assoc != current_association_ID; assoc++) {
+ if (assoc != 0U) {
+ peer = findpeerbyassoc(assoc);
+ if (peer != NULL)
+ unpeer(peer);
+ }
+ }
+ peer = findpeerbyassoc(current_association_ID);
+ if (peer != NULL)
+ unpeer(peer);
+}
diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
index 2f7543f..577b5fb 100644
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -245,7 +245,7 @@ transmit(
/*
* Update the reachability status. If not heard for
* three consecutive polls, stuff infinity in the clock
- * filter.
+ * filter.
*/
oreach = peer->reach;
peer->outdate = current_time;
@@ -290,7 +290,7 @@ transmit(
* If preemptible and we have more peers than maxclock,
* and this peer has the minimum score of preemptibles,
* demobilize.
- */
+ */
if (peer->unreach >= NTP_UNREACH) {
hpoll++;
/* ephemeral: no FLAG_CONFIG nor FLAG_PREEMPT */
@@ -335,7 +335,7 @@ transmit(
peer->retry--;
/*
- * Do not transmit if in broadcast client mode.
+ * Do not transmit if in broadcast client mode.
*/
if (peer->hmode != MODE_BCLIENT)
peer_xmit(peer);
@@ -442,7 +442,7 @@ receive(
return; /* no flakeway */
}
}
-
+
/*
* Version check must be after the query packets, since they
* intentionally use an early version.
@@ -486,18 +486,18 @@ receive(
*/
authlen = LEN_PKT_NOMAC;
has_mac = rbufp->recv_length - authlen;
- while (has_mac != 0) {
+ while (has_mac > 0) {
u_int32 len;
#ifdef AUTOKEY
u_int32 hostlen;
struct exten *ep;
#endif /*AUTOKEY */
- if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) {
+ if (has_mac % 4 != 0 || has_mac < (int)MIN_MAC_LEN) {
sys_badlength++;
return; /* bad length */
}
- if (has_mac <= MAX_MAC_LEN) {
+ if (has_mac <= (int)MAX_MAC_LEN) {
skeyid = ntohl(((u_int32 *)pkt)[authlen / 4]);
break;
@@ -541,6 +541,14 @@ receive(
}
/*
+ * If has_mac is < 0 we had a malformed packet.
+ */
+ if (has_mac < 0) {
+ sys_badlength++;
+ return; /* bad length */
+ }
+
+ /*
* If authentication required, a MAC must be present.
*/
if (restrict_mask & RES_DONTTRUST && has_mac == 0) {
@@ -651,7 +659,7 @@ receive(
* If the signature is 20 bytes long, the last 16 of
* which are zero, then this is a Microsoft client
* wanting AD-style authentication of the server's
- * reply.
+ * reply.
*
* This is described in Microsoft's WSPP docs, in MS-SNTP:
* http://msdn.microsoft.com/en-us/library/cc212930.aspx
@@ -672,7 +680,7 @@ receive(
* broadcast or unicast address as appropriate.
*/
if (crypto_flags && skeyid > NTP_MAXKEY) {
-
+
/*
* More on the autokey dance (AKD). A cookie is
* constructed from public and private values.
@@ -698,7 +706,7 @@ receive(
* # if unsync, 0
* % can't happen
*/
- if (has_mac < MAX_MD5_LEN) {
+ if (has_mac < (int)MAX_MD5_LEN) {
sys_badauth++;
return;
}
@@ -736,7 +744,7 @@ receive(
* purposes is zero. Note the hash is saved for
* use later in the autokey mambo.
*/
- if (authlen > LEN_PKT_NOMAC && pkeyid != 0) {
+ if (authlen > (int)LEN_PKT_NOMAC && pkeyid != 0) {
session_key(&rbufp->recv_srcadr,
dstadr_sin, skeyid, 0, 2);
tkeyid = session_key(
@@ -866,7 +874,7 @@ receive(
* curious and could be an intruder attempting to clog, so we
* just ignore it.
*
- * If the packet is authentic and the manycastclient or pool
+ * If the packet is authentic and the manycastclient or pool
* association is found, we mobilize a client association and
* copy pertinent variables from the manycastclient or pool
* association to the new client association. If not, just
@@ -1089,6 +1097,7 @@ receive(
fast_xmit(rbufp, MODE_ACTIVE, 0,
restrict_mask);
sys_restricted++;
+ return;
}
}
@@ -1247,16 +1256,6 @@ receive(
}
/*
- * Update the state variables.
- */
- if (peer->flip == 0) {
- if (hismode != MODE_BROADCAST)
- peer->rec = p_xmt;
- peer->dst = rbufp->recv_time;
- }
- peer->xmt = p_xmt;
-
- /*
* If this is a crypto_NAK, the server cannot authenticate a
* client packet. The server might have just changed keys. Clear
* the association and restart the protocol.
@@ -1275,19 +1274,21 @@ receive(
#endif /* AUTOKEY */
return;
- /*
- * If the digest fails, the client cannot authenticate a server
+ /*
+ * If the digest fails or it's missing for authenticated
+ * associations, the client cannot authenticate a server
* reply to a client packet previously sent. The loopback check
* is designed to avoid a bait-and-switch attack, which was
* possible in past versions. If symmetric modes, return a
* crypto-NAK. The peer should restart the protocol.
*/
- } else if (!AUTH(has_mac || (restrict_mask & RES_DONTTRUST),
- is_authentic)) {
+ } else if (!AUTH(peer->keyid || has_mac ||
+ (restrict_mask & RES_DONTTRUST), is_authentic)) {
report_event(PEVNT_AUTH, peer, "digest");
peer->flash |= TEST5; /* bad auth */
peer->badauth++;
- if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)
+ if (has_mac &&
+ (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE))
fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask);
if (peer->flags & FLAG_PREEMPT) {
unpeer(peer);
@@ -1301,6 +1302,16 @@ receive(
}
/*
+ * Update the state variables.
+ */
+ if (peer->flip == 0) {
+ if (hismode != MODE_BROADCAST)
+ peer->rec = p_xmt;
+ peer->dst = rbufp->recv_time;
+ }
+ peer->xmt = p_xmt;
+
+ /*
* Set the peer ppoll to the maximum of the packet ppoll and the
* peer minpoll. If a kiss-o'-death, set the peer minpoll to
* this maximum and advance the headway to give the sender some
@@ -1568,7 +1579,7 @@ process_packet(
/*
* If the peer was previously unreachable, raise a trap. In any
* case, mark it reachable.
- */
+ */
if (!peer->reach) {
report_event(PEVNT_REACH, peer, NULL);
peer->timereachable = current_time;
@@ -1635,8 +1646,8 @@ process_packet(
* Interleaved broadcast mode. Use interleaved timestamps.
* t1 = peer->borg, t2 = p_org, t3 = p_org, t4 = aorg
*/
- if (peer->flags & FLAG_XB) {
- ci = p_org; /* delay */
+ if (peer->flags & FLAG_XB) {
+ ci = p_org; /* delay */
L_SUB(&ci, &peer->aorg);
LFPTOD(&ci, t34);
ci = p_org; /* t2 - t1 */
@@ -1765,7 +1776,7 @@ process_packet(
p_del, peer->r21 / 1e3, peer->r34 / 1e3,
td);
#endif
- }
+ }
#endif /* ASSYM */
/*
@@ -2092,7 +2103,7 @@ poll_update(
void
peer_clear(
struct peer *peer, /* peer structure */
- char *ident /* tally lights */
+ const char *ident /* tally lights */
)
{
u_char u;
@@ -2231,7 +2242,7 @@ clock_filter(
for (i = NTP_SHIFT - 1; i >= 0; i--) {
if (i != 0)
peer->filter_disp[j] += dtemp;
- if (peer->filter_disp[j] >= MAXDISPERSE) {
+ if (peer->filter_disp[j] >= MAXDISPERSE) {
peer->filter_disp[j] = MAXDISPERSE;
dst[i] = MAXDISPERSE;
} else if (peer->update - peer->filter_epoch[j] >
@@ -2246,7 +2257,7 @@ clock_filter(
}
/*
- * If the clock has stabilized, sort the samples by distance.
+ * If the clock has stabilized, sort the samples by distance.
*/
if (freq_cnt == 0) {
for (i = 1; i < NTP_SHIFT; i++) {
@@ -2280,7 +2291,7 @@ clock_filter(
continue;
m++;
}
-
+
/*
* Compute the dispersion and jitter. The dispersion is weighted
* exponentially by NTP_FWEIGHT (0.5) so it is normalized close
@@ -2382,7 +2393,7 @@ clock_select(void)
struct peer *peer;
int i, j, k, n;
int nlist, nl2;
- int allow, osurv;
+ int allow;
int speer;
double d, e, f, g;
double high, low;
@@ -2411,7 +2422,6 @@ clock_select(void)
* enough to handle all associations.
*/
osys_peer = sys_peer;
- osurv = sys_survivors;
sys_survivors = 0;
#ifdef LOCKCLOCK
sys_leap = LEAP_NOTINSYNC;
@@ -2485,9 +2495,9 @@ clock_select(void)
/*
* If this peer could have the orphan parent
* as a synchronization ancestor, exclude it
- * from selection to avoid forming a
+ * from selection to avoid forming a
* synchronization loop within the orphan mesh,
- * triggering stratum climb to infinity
+ * triggering stratum climb to infinity
* instability. Peers at stratum higher than
* the orphan stratum could have the orphan
* parent in ancestry so are excluded.
@@ -2595,7 +2605,7 @@ clock_select(void)
for (allow = 0; 2 * allow < nlist; allow++) {
/*
- * Bound the interval (low, high) as the smallest
+ * Bound the interval (low, high) as the smallest
* interval containing points from the most sources.
*/
n = 0;
@@ -2631,7 +2641,7 @@ clock_select(void)
* We assert the correct time is contained in the interval, but
* the best offset estimate for the interval might not be
* contained in the interval. For this purpose, a truechimer is
- * defined as the midpoint of an interval that overlaps the
+ * defined as the midpoint of an interval that overlaps the
* intersection interval.
*/
j = 0;
@@ -2651,9 +2661,10 @@ clock_select(void)
* include any of them in the cluster population.
*/
if (peer->flags & FLAG_PPS) {
- if (typepps == NULL)
+ if (typepps == NULL)
typepps = peer;
- continue;
+ if (!(peer->flags & FLAG_TSTAMP_PPS))
+ continue;
}
#endif /* REFCLOCK */
@@ -2664,7 +2675,7 @@ clock_select(void)
nlist = j;
/*
- * If no survivors remain at this point, check if the modem
+ * If no survivors remain at this point, check if the modem
* driver, local driver or orphan parent in that order. If so,
* nominate the first one found as the only survivor.
* Otherwise, give up and leave the island to the rats.
@@ -2701,7 +2712,7 @@ clock_select(void)
* by root distance. Continue voting as long as there are more
* than sys_minclock survivors and the select jitter of the peer
* with the worst metric is greater than the minimum peer
- * jitter. Stop if we are about to discard a TRUE or PREFER
+ * jitter. Stop if we are about to discard a TRUE or PREFER
* peer, who of course have the immunity idol.
*/
while (1) {
@@ -2807,7 +2818,7 @@ clock_select(void)
typesystem = peers[speer].peer;
if (osys_peer == NULL || osys_peer == typesystem) {
- sys_clockhop = 0;
+ sys_clockhop = 0;
} else if ((x = fabs(typesystem->offset -
osys_peer->offset)) < sys_mindisp) {
if (sys_clockhop == 0)
@@ -2981,7 +2992,7 @@ peer_xmit(
)
{
struct pkt xpkt; /* transmit packet */
- int sendlen, authlen;
+ size_t sendlen, authlen;
keyid_t xkeyid = 0; /* transmit key ID */
l_fp xmt_tx, xmt_ty;
@@ -3065,7 +3076,7 @@ peer_xmit(
LFPTOD(&xmt_ty, peer->xleave);
#ifdef DEBUG
if (debug)
- printf("transmit: at %ld %s->%s mode %d len %d\n",
+ printf("transmit: at %ld %s->%s mode %d len %zu\n",
current_time, peer->dstadr ?
stoa(&peer->dstadr->sin) : "-",
stoa(&peer->srcadr), peer->hmode, sendlen);
@@ -3105,7 +3116,7 @@ peer_xmit(
* the session key is generated.
*/
while (1) {
-
+
/*
* Allocate and initialize a keylist if not
* already done. Then, use the list in inverse
@@ -3157,7 +3168,7 @@ peer_xmit(
break;
/*
- * In symmetric modes the parameter, certificate,
+ * In symmetric modes the parameter, certificate,
* identity, cookie and autokey exchanges are
* required. The leapsecond exchange is optional. But, a
* peer will not believe the other peer until the other
@@ -3312,11 +3323,11 @@ peer_xmit(
* Calculate the next session key. Since extension
* fields are present, the cookie value is zero.
*/
- if (sendlen > LEN_PKT_NOMAC) {
+ if (sendlen > (int)LEN_PKT_NOMAC) {
session_key(&peer->dstadr->sin, &peer->srcadr,
xkeyid, 0, 2);
}
- }
+ }
#endif /* AUTOKEY */
/*
@@ -3354,7 +3365,7 @@ peer_xmit(
authtrust(xkeyid, 0);
#endif /* AUTOKEY */
if (sendlen > sizeof(xpkt)) {
- msyslog(LOG_ERR, "proto: buffer overflow %u", sendlen);
+ msyslog(LOG_ERR, "proto: buffer overflow %zu", sendlen);
exit (-1);
}
peer->t21_bytes = sendlen;
@@ -3379,7 +3390,7 @@ peer_xmit(
#ifdef AUTOKEY
#ifdef DEBUG
if (debug)
- printf("transmit: at %ld %s->%s mode %d keyid %08x len %d index %d\n",
+ printf("transmit: at %ld %s->%s mode %d keyid %08x len %zu index %d\n",
current_time, latoa(peer->dstadr),
ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
peer->keynumber);
@@ -3590,7 +3601,7 @@ pool_xmit(
&hints,
0, /* no retry */
&pool_name_resolved,
- (void *)(u_int)pool->associd);
+ (void *)(intptr_t)pool->associd);
if (!rc)
DPRINTF(1, ("pool DNS lookup %s started\n",
pool->hostname));
@@ -3611,7 +3622,7 @@ pool_xmit(
return; /* out of addresses, re-query DNS next poll */
restrict_mask = restrictions(rmtadr);
if (RES_FLAGS & restrict_mask)
- restrict_source(rmtadr, 0,
+ restrict_source(rmtadr, 0,
current_time + POOL_SOLICIT_WINDOW + 1);
lcladr = findinterface(rmtadr);
memset(&xpkt, 0, sizeof(xpkt));
@@ -3696,7 +3707,7 @@ pool_name_resolved(
return;
}
- assoc = (associd_t)(u_int)context;
+ assoc = (associd_t)(intptr_t)context;
pool = findpeerbyassoc(assoc);
if (NULL == pool) {
msyslog(LOG_ERR,
diff --git a/ntpd/ntp_request.c b/ntpd/ntp_request.c
index 157304b..8ffebad 100644
--- a/ntpd/ntp_request.c
+++ b/ntpd/ntp_request.c
@@ -58,7 +58,7 @@ struct req_proc {
* Universal request codes
*/
static const struct req_proc univ_codes[] = {
- { NO_REQUEST, NOAUTH, 0, 0 }
+ { NO_REQUEST, NOAUTH, 0, 0, NULL }
};
static void req_ack (sockaddr_u *, endpt *, struct req_pkt *, int);
@@ -231,7 +231,7 @@ static endpt *frominter;
void
init_request (void)
{
- int i;
+ size_t i;
numrequests = 0;
numresppkts = 0;
@@ -261,7 +261,7 @@ req_ack(
rpkt.auth_seq = AUTH_SEQ(0, 0);
rpkt.implementation = inpkt->implementation;
rpkt.request = inpkt->request;
- rpkt.err_nitems = ERR_NITEMS(errcode, 0);
+ rpkt.err_nitems = ERR_NITEMS(errcode, 0);
rpkt.mbz_itemsize = MBZ_ITEMSIZE(0);
/*
@@ -448,7 +448,7 @@ process_private(
|| (++ec, INFO_SEQ(inpkt->auth_seq) != 0)
|| (++ec, INFO_ERR(inpkt->err_nitems) != 0)
|| (++ec, INFO_MBZ(inpkt->mbz_itemsize) != 0)
- || (++ec, rbufp->recv_length < REQ_LEN_HDR)
+ || (++ec, rbufp->recv_length < (int)REQ_LEN_HDR)
) {
NLOG(NLOG_SYSEVENT)
if (current_time >= quiet_until) {
@@ -599,11 +599,10 @@ process_private(
return;
}
if (recv_len > REQ_LEN_NOMAC + MAX_MAC_LEN) {
- DPRINTF(5, ("bad pkt length %lu\n",
- (u_long)recv_len));
+ DPRINTF(5, ("bad pkt length %zu\n", recv_len));
msyslog(LOG_ERR,
- "process_private: bad pkt length %lu",
- (u_long)recv_len);
+ "process_private: bad pkt length %zu",
+ recv_len);
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
@@ -2076,7 +2075,7 @@ req_get_traps(
{
struct info_trap *it;
struct ctl_trap *tr;
- int i;
+ size_t i;
if (num_ctl_traps == 0) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
diff --git a/ntpd/ntp_restrict.c b/ntpd/ntp_restrict.c
index 6e75667..9948d54 100644
--- a/ntpd/ntp_restrict.c
+++ b/ntpd/ntp_restrict.c
@@ -46,7 +46,7 @@
#define MASK_IPV6_ADDR(dst, src, msk) \
do { \
int idx; \
- for (idx = 0; idx < COUNTOF((dst)->s6_addr); idx++) { \
+ for (idx = 0; idx < (int)COUNTOF((dst)->s6_addr); idx++) { \
(dst)->s6_addr[idx] = (src)->s6_addr[idx] \
& (msk)->s6_addr[idx]; \
} \
@@ -298,7 +298,7 @@ match_restrict6_addr(
MASK_IPV6_ADDR(&masked, addr, &res->u.v6.mask);
if (ADDR6_EQ(&masked, &res->u.v6.addr)
&& (!(RESM_NTPONLY & res->mflags)
- || NTP_PORT == port))
+ || NTP_PORT == (int)port))
break;
}
return res;
diff --git a/ntpd/ntp_scanner.c b/ntpd/ntp_scanner.c
index 3e09856..a7c1992 100644
--- a/ntpd/ntp_scanner.c
+++ b/ntpd/ntp_scanner.c
@@ -70,12 +70,12 @@ keyword(
int token
)
{
- int i;
+ size_t i;
const char *text;
i = token - LOWEST_KEYWORD_ID;
- if (i >= 0 && i < COUNTOF(keyword_text))
+ if (i < COUNTOF(keyword_text))
text = keyword_text[i];
else
text = NULL;
@@ -297,7 +297,7 @@ is_integer(
/* Check that all the remaining characters are digits */
for (; lexeme[i] != '\0'; i++) {
- if (!isdigit(lexeme[i]))
+ if (!isdigit((unsigned char)lexeme[i]))
return FALSE;
}
@@ -322,7 +322,7 @@ is_u_int(
int is_hex;
i = 0;
- if ('0' == lexeme[i] && 'x' == tolower(lexeme[i + 1])) {
+ if ('0' == lexeme[i] && 'x' == tolower((unsigned char)lexeme[i + 1])) {
i += 2;
is_hex = TRUE;
} else {
@@ -331,9 +331,9 @@ is_u_int(
/* Check that all the remaining characters are digits */
for (; lexeme[i] != '\0'; i++) {
- if (is_hex && !isxdigit(lexeme[i]))
+ if (is_hex && !isxdigit((unsigned char)lexeme[i]))
return FALSE;
- if (!is_hex && !isdigit(lexeme[i]))
+ if (!is_hex && !isdigit((unsigned char)lexeme[i]))
return FALSE;
}
@@ -357,14 +357,14 @@ is_double(
i++;
/* Read the integer part */
- for (; lexeme[i] && isdigit(lexeme[i]); i++)
+ for (; lexeme[i] && isdigit((unsigned char)lexeme[i]); i++)
num_digits++;
/* Check for the optional decimal point */
if ('.' == lexeme[i]) {
i++;
/* Check for any digits after the decimal point */
- for (; lexeme[i] && isdigit(lexeme[i]); i++)
+ for (; lexeme[i] && isdigit((unsigned char)lexeme[i]); i++)
num_digits++;
}
@@ -380,7 +380,7 @@ is_double(
return 1;
/* There is still more input, read the exponent */
- if ('e' == tolower(lexeme[i]))
+ if ('e' == tolower((unsigned char)lexeme[i]))
i++;
else
return 0;
@@ -390,7 +390,7 @@ is_double(
i++;
/* Now read the exponent part */
- while (lexeme[i] && isdigit(lexeme[i]))
+ while (lexeme[i] && isdigit((unsigned char)lexeme[i]))
i++;
/* Check if we are done */
@@ -455,7 +455,7 @@ create_string_token(
* ignore end of line whitespace
*/
pch = lexeme;
- while (*pch && isspace(*pch))
+ while (*pch && isspace((unsigned char)*pch))
pch++;
if (!*pch) {
@@ -481,7 +481,7 @@ yylex(
)
{
static follby followedby = FOLLBY_TOKEN;
- int i;
+ size_t i;
int instring;
int yylval_was_set;
int converted;
@@ -502,7 +502,7 @@ yylex(
if (EOF == ch) {
- if (!input_from_file || !curr_include_level)
+ if (!input_from_file || curr_include_level <= 0)
return 0;
FCLOSE(fp[curr_include_level]);
@@ -640,7 +640,7 @@ yylex(
} else if (is_u_int(yytext)) {
yylval_was_set = TRUE;
if ('0' == yytext[0] &&
- 'x' == tolower(yytext[1]))
+ 'x' == tolower((unsigned char)yytext[1]))
converted = sscanf(&yytext[2], "%x",
&yylval.U_int);
else
diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c
index a7da52b..c4bc901 100644
--- a/ntpd/ntp_util.c
+++ b/ntpd/ntp_util.c
@@ -679,7 +679,7 @@ record_raw_stats(
int version,
int mode,
int stratum,
- int poll,
+ int ppoll,
int precision,
double root_delay, /* seconds */
double root_dispersion,/* seconds */
@@ -702,7 +702,7 @@ record_raw_stats(
stoa(srcadr), dstadr ? stoa(dstadr) : "-",
ulfptoa(t1, 9), ulfptoa(t2, 9),
ulfptoa(t3, 9), ulfptoa(t4, 9),
- leap, version, mode, stratum, poll, precision,
+ leap, version, mode, stratum, ppoll, precision,
root_delay, root_dispersion, refid_str(refid, stratum));
fflush(rawstats.fp);
}
diff --git a/ntpd/ntpd-opts.c b/ntpd/ntpd-opts.c
index 4c298c5..910689d 100644
--- a/ntpd/ntpd-opts.c
+++ b/ntpd/ntpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed December 2, 2014 at 08:54:08 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:23:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -50,7 +50,7 @@ extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright (ntpd_opt_strs+0)
-#define zLicenseDescrip (ntpd_opt_strs+314)
+#define zLicenseDescrip (ntpd_opt_strs+340)
/*
* global included definitions
@@ -74,150 +74,154 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpd options
*/
-static char const ntpd_opt_strs[3011] =
-/* 0 */ "ntpd 4.2.7p482\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const ntpd_opt_strs[3129] =
+/* 0 */ "ntpd 4.2.8p2\n"
+ "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
" <http://ntp.org/license>\n"
" <http://opensource.org/licenses/ntp-license.php>\n\0"
-/* 314 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 340 */ "Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose with or without fee is hereby granted,\n"
"provided that the above copyright notice appears in all copies and that\n"
"both the copyright notice and this permission notice appear in supporting\n"
"documentation, and that the name The University of Delaware not be used in\n"
"advertising or publicity pertaining to distribution of the software without\n"
- "specific, written prior permission. The University of Delaware makes no\n"
- "representations about the suitability this software for any purpose. It is\n"
- "provided \"as is\" without express or implied warranty.\n\0"
-/* 954 */ "Force IPv4 DNS name resolution\0"
-/* 985 */ "IPV4\0"
-/* 990 */ "ipv4\0"
-/* 995 */ "Force IPv6 DNS name resolution\0"
-/* 1026 */ "IPV6\0"
-/* 1031 */ "ipv6\0"
-/* 1036 */ "Require crypto authentication\0"
-/* 1066 */ "AUTHREQ\0"
-/* 1074 */ "authreq\0"
-/* 1082 */ "Do not require crypto authentication\0"
-/* 1119 */ "AUTHNOREQ\0"
-/* 1129 */ "authnoreq\0"
-/* 1139 */ "Allow us to sync to broadcast servers\0"
-/* 1177 */ "BCASTSYNC\0"
-/* 1187 */ "bcastsync\0"
-/* 1197 */ "configuration file name\0"
-/* 1221 */ "CONFIGFILE\0"
-/* 1232 */ "configfile\0"
-/* 1243 */ "Increase debug verbosity level\0"
-/* 1274 */ "DEBUG_LEVEL\0"
-/* 1286 */ "debug-level\0"
-/* 1298 */ "Set the debug verbosity level\0"
-/* 1328 */ "SET_DEBUG_LEVEL\0"
-/* 1344 */ "set-debug-level\0"
-/* 1360 */ "frequency drift file name\0"
-/* 1386 */ "DRIFTFILE\0"
-/* 1396 */ "driftfile\0"
-/* 1406 */ "Allow the first adjustment to be Big\0"
-/* 1443 */ "PANICGATE\0"
-/* 1453 */ "panicgate\0"
-/* 1463 */ "Jail directory\0"
-/* 1478 */ "JAILDIR\0"
-/* 1486 */ "jaildir\0"
-/* 1494 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
-/* 1573 */ "Listen on an interface name or address\0"
-/* 1612 */ "INTERFACE\0"
-/* 1622 */ "interface\0"
-/* 1632 */ "path to symmetric keys\0"
-/* 1655 */ "KEYFILE\0"
-/* 1663 */ "keyfile\0"
-/* 1671 */ "path to the log file\0"
-/* 1692 */ "LOGFILE\0"
-/* 1700 */ "logfile\0"
-/* 1708 */ "Do not listen to virtual interfaces\0"
-/* 1744 */ "NOVIRTUALIPS\0"
-/* 1757 */ "novirtualips\0"
-/* 1770 */ "Modify Multimedia Timer (Windows only)\0"
-/* 1809 */ "MODIFYMMTIMER\0"
-/* 1823 */ "modifymmtimer\0"
-/* 1837 */ "Do not fork\0"
-/* 1849 */ "NOFORK\0"
-/* 1856 */ "nofork\0"
-/* 1863 */ "Run at high priority\0"
-/* 1884 */ "NICE\0"
-/* 1889 */ "nice\0"
-/* 1894 */ "path to the PID file\0"
-/* 1915 */ "PIDFILE\0"
-/* 1923 */ "pidfile\0"
-/* 1931 */ "Process priority\0"
-/* 1948 */ "PRIORITY\0"
-/* 1957 */ "priority\0"
-/* 1966 */ "Set the time and quit\0"
-/* 1988 */ "QUIT\0"
-/* 1993 */ "quit\0"
-/* 1998 */ "Broadcast/propagation delay\0"
-/* 2026 */ "PROPAGATIONDELAY\0"
-/* 2043 */ "propagationdelay\0"
-/* 2060 */ "Save parsed configuration and quit\0"
-/* 2095 */ "SAVECONFIGQUIT\0"
-/* 2110 */ "saveconfigquit\0"
-/* 2125 */ "Statistics file location\0"
-/* 2150 */ "STATSDIR\0"
-/* 2159 */ "statsdir\0"
-/* 2168 */ "Trusted key number\0"
-/* 2187 */ "TRUSTEDKEY\0"
-/* 2198 */ "trustedkey\0"
-/* 2209 */ "Run as userid (or userid:groupid)\0"
-/* 2243 */ "USER\0"
-/* 2248 */ "user\0"
-/* 2253 */ "interval in seconds between scans for new or dropped interfaces\0"
-/* 2317 */ "UPDATEINTERVAL\0"
-/* 2332 */ "updateinterval\0"
-/* 2347 */ "make ARG an ntp variable (RW)\0"
-/* 2377 */ "VAR\0"
-/* 2381 */ "var\0"
-/* 2385 */ "make ARG an ntp variable (RW|DEF)\0"
-/* 2419 */ "DVAR\0"
-/* 2424 */ "dvar\0"
-/* 2429 */ "Seconds to wait for first clock sync\0"
-/* 2466 */ "WAIT_SYNC\0"
-/* 2476 */ "wait-sync\0"
-/* 2486 */ "Slew up to 600 seconds\0"
-/* 2509 */ "SLEW\0"
-/* 2514 */ "slew\0"
-/* 2519 */ "Use CPU cycle counter (Windows only)\0"
-/* 2556 */ "USEPCC\0"
-/* 2563 */ "usepcc\0"
-/* 2570 */ "Force CPU cycle counter use (Windows only)\0"
-/* 2613 */ "PCCFREQ\0"
-/* 2621 */ "pccfreq\0"
-/* 2629 */ "Register with mDNS as a NTP server\0"
-/* 2664 */ "MDNS\0"
-/* 2669 */ "mdns\0"
-/* 2674 */ "display extended usage information and exit\0"
-/* 2718 */ "help\0"
-/* 2723 */ "extended usage information passed thru pager\0"
-/* 2768 */ "more-help\0"
-/* 2778 */ "output version information and exit\0"
-/* 2814 */ "version\0"
-/* 2822 */ "NTPD\0"
-/* 2827 */ "ntpd - NTP daemon program - Ver. 4.2.7p482\n"
+ "specific, written prior permission. The University of Delaware and Network\n"
+ "Time Foundation makes no representations about the suitability this\n"
+ "software for any purpose. It is provided \"as is\" without express or\n"
+ "implied warranty.\n\0"
+/* 1008 */ "Force IPv4 DNS name resolution\0"
+/* 1039 */ "IPV4\0"
+/* 1044 */ "ipv4\0"
+/* 1049 */ "Force IPv6 DNS name resolution\0"
+/* 1080 */ "IPV6\0"
+/* 1085 */ "ipv6\0"
+/* 1090 */ "Require crypto authentication\0"
+/* 1120 */ "AUTHREQ\0"
+/* 1128 */ "authreq\0"
+/* 1136 */ "Do not require crypto authentication\0"
+/* 1173 */ "AUTHNOREQ\0"
+/* 1183 */ "authnoreq\0"
+/* 1193 */ "Allow us to sync to broadcast servers\0"
+/* 1231 */ "BCASTSYNC\0"
+/* 1241 */ "bcastsync\0"
+/* 1251 */ "configuration file name\0"
+/* 1275 */ "CONFIGFILE\0"
+/* 1286 */ "configfile\0"
+/* 1297 */ "Increase debug verbosity level\0"
+/* 1328 */ "DEBUG_LEVEL\0"
+/* 1340 */ "debug-level\0"
+/* 1352 */ "Set the debug verbosity level\0"
+/* 1382 */ "SET_DEBUG_LEVEL\0"
+/* 1398 */ "set-debug-level\0"
+/* 1414 */ "frequency drift file name\0"
+/* 1440 */ "DRIFTFILE\0"
+/* 1450 */ "driftfile\0"
+/* 1460 */ "Allow the first adjustment to be Big\0"
+/* 1497 */ "PANICGATE\0"
+/* 1507 */ "panicgate\0"
+/* 1517 */ "Step any initial offset correction.\0"
+/* 1553 */ "FORCE_STEP_ONCE\0"
+/* 1569 */ "force-step-once\0"
+/* 1585 */ "Jail directory\0"
+/* 1600 */ "JAILDIR\0"
+/* 1608 */ "jaildir\0"
+/* 1616 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
+/* 1695 */ "Listen on an interface name or address\0"
+/* 1734 */ "INTERFACE\0"
+/* 1744 */ "interface\0"
+/* 1754 */ "path to symmetric keys\0"
+/* 1777 */ "KEYFILE\0"
+/* 1785 */ "keyfile\0"
+/* 1793 */ "path to the log file\0"
+/* 1814 */ "LOGFILE\0"
+/* 1822 */ "logfile\0"
+/* 1830 */ "Do not listen to virtual interfaces\0"
+/* 1866 */ "NOVIRTUALIPS\0"
+/* 1879 */ "novirtualips\0"
+/* 1892 */ "Modify Multimedia Timer (Windows only)\0"
+/* 1931 */ "MODIFYMMTIMER\0"
+/* 1945 */ "modifymmtimer\0"
+/* 1959 */ "Do not fork\0"
+/* 1971 */ "NOFORK\0"
+/* 1978 */ "nofork\0"
+/* 1985 */ "Run at high priority\0"
+/* 2006 */ "NICE\0"
+/* 2011 */ "nice\0"
+/* 2016 */ "path to the PID file\0"
+/* 2037 */ "PIDFILE\0"
+/* 2045 */ "pidfile\0"
+/* 2053 */ "Process priority\0"
+/* 2070 */ "PRIORITY\0"
+/* 2079 */ "priority\0"
+/* 2088 */ "Set the time and quit\0"
+/* 2110 */ "QUIT\0"
+/* 2115 */ "quit\0"
+/* 2120 */ "Broadcast/propagation delay\0"
+/* 2148 */ "PROPAGATIONDELAY\0"
+/* 2165 */ "propagationdelay\0"
+/* 2182 */ "Save parsed configuration and quit\0"
+/* 2217 */ "SAVECONFIGQUIT\0"
+/* 2232 */ "saveconfigquit\0"
+/* 2247 */ "Statistics file location\0"
+/* 2272 */ "STATSDIR\0"
+/* 2281 */ "statsdir\0"
+/* 2290 */ "Trusted key number\0"
+/* 2309 */ "TRUSTEDKEY\0"
+/* 2320 */ "trustedkey\0"
+/* 2331 */ "Run as userid (or userid:groupid)\0"
+/* 2365 */ "USER\0"
+/* 2370 */ "user\0"
+/* 2375 */ "interval in seconds between scans for new or dropped interfaces\0"
+/* 2439 */ "UPDATEINTERVAL\0"
+/* 2454 */ "updateinterval\0"
+/* 2469 */ "make ARG an ntp variable (RW)\0"
+/* 2499 */ "VAR\0"
+/* 2503 */ "var\0"
+/* 2507 */ "make ARG an ntp variable (RW|DEF)\0"
+/* 2541 */ "DVAR\0"
+/* 2546 */ "dvar\0"
+/* 2551 */ "Seconds to wait for first clock sync\0"
+/* 2588 */ "WAIT_SYNC\0"
+/* 2598 */ "wait-sync\0"
+/* 2608 */ "Slew up to 600 seconds\0"
+/* 2631 */ "SLEW\0"
+/* 2636 */ "slew\0"
+/* 2641 */ "Use CPU cycle counter (Windows only)\0"
+/* 2678 */ "USEPCC\0"
+/* 2685 */ "usepcc\0"
+/* 2692 */ "Force CPU cycle counter use (Windows only)\0"
+/* 2735 */ "PCCFREQ\0"
+/* 2743 */ "pccfreq\0"
+/* 2751 */ "Register with mDNS as a NTP server\0"
+/* 2786 */ "MDNS\0"
+/* 2791 */ "mdns\0"
+/* 2796 */ "display extended usage information and exit\0"
+/* 2840 */ "help\0"
+/* 2845 */ "extended usage information passed thru pager\0"
+/* 2890 */ "more-help\0"
+/* 2900 */ "output version information and exit\0"
+/* 2936 */ "version\0"
+/* 2944 */ "NTPD\0"
+/* 2949 */ "ntpd - NTP daemon program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
-/* 2960 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2994 */ "\n\0"
-/* 2996 */ "ntpd 4.2.7p482";
+/* 3080 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 3114 */ "\n\0"
+/* 3116 */ "ntpd 4.2.8p2";
/**
* ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv4 option */
-#define IPV4_DESC (ntpd_opt_strs+954)
+#define IPV4_DESC (ntpd_opt_strs+1008)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpd_opt_strs+985)
+#define IPV4_NAME (ntpd_opt_strs+1039)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpd_opt_strs+990)
+#define IPV4_name (ntpd_opt_strs+1044)
/** Other options that appear in conjunction with the ipv4 option */
static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
@@ -229,11 +233,11 @@ static int const aIpv4CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (ntpd_opt_strs+995)
+#define IPV6_DESC (ntpd_opt_strs+1049)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpd_opt_strs+1026)
+#define IPV6_NAME (ntpd_opt_strs+1080)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpd_opt_strs+1031)
+#define IPV6_name (ntpd_opt_strs+1085)
/** Other options that appear in conjunction with the ipv6 option */
static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
@@ -245,11 +249,11 @@ static int const aIpv6CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the authreq option */
-#define AUTHREQ_DESC (ntpd_opt_strs+1036)
+#define AUTHREQ_DESC (ntpd_opt_strs+1090)
/** Upper-cased name for the authreq option */
-#define AUTHREQ_NAME (ntpd_opt_strs+1066)
+#define AUTHREQ_NAME (ntpd_opt_strs+1120)
/** Name string for the authreq option */
-#define AUTHREQ_name (ntpd_opt_strs+1074)
+#define AUTHREQ_name (ntpd_opt_strs+1128)
/** Other options that appear in conjunction with the authreq option */
static int const aAuthreqCantList[] = {
INDEX_OPT_AUTHNOREQ, NO_EQUIVALENT };
@@ -261,11 +265,11 @@ static int const aAuthreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the authnoreq option */
-#define AUTHNOREQ_DESC (ntpd_opt_strs+1082)
+#define AUTHNOREQ_DESC (ntpd_opt_strs+1136)
/** Upper-cased name for the authnoreq option */
-#define AUTHNOREQ_NAME (ntpd_opt_strs+1119)
+#define AUTHNOREQ_NAME (ntpd_opt_strs+1173)
/** Name string for the authnoreq option */
-#define AUTHNOREQ_name (ntpd_opt_strs+1129)
+#define AUTHNOREQ_name (ntpd_opt_strs+1183)
/** Other options that appear in conjunction with the authnoreq option */
static int const aAuthnoreqCantList[] = {
INDEX_OPT_AUTHREQ, NO_EQUIVALENT };
@@ -276,11 +280,11 @@ static int const aAuthnoreqCantList[] = {
* bcastsync option description:
*/
/** Descriptive text for the bcastsync option */
-#define BCASTSYNC_DESC (ntpd_opt_strs+1139)
+#define BCASTSYNC_DESC (ntpd_opt_strs+1193)
/** Upper-cased name for the bcastsync option */
-#define BCASTSYNC_NAME (ntpd_opt_strs+1177)
+#define BCASTSYNC_NAME (ntpd_opt_strs+1231)
/** Name string for the bcastsync option */
-#define BCASTSYNC_name (ntpd_opt_strs+1187)
+#define BCASTSYNC_name (ntpd_opt_strs+1241)
/** Compiled in flag settings for the bcastsync option */
#define BCASTSYNC_FLAGS (OPTST_DISABLED)
@@ -288,11 +292,11 @@ static int const aAuthnoreqCantList[] = {
* configfile option description:
*/
/** Descriptive text for the configfile option */
-#define CONFIGFILE_DESC (ntpd_opt_strs+1197)
+#define CONFIGFILE_DESC (ntpd_opt_strs+1251)
/** Upper-cased name for the configfile option */
-#define CONFIGFILE_NAME (ntpd_opt_strs+1221)
+#define CONFIGFILE_NAME (ntpd_opt_strs+1275)
/** Name string for the configfile option */
-#define CONFIGFILE_name (ntpd_opt_strs+1232)
+#define CONFIGFILE_name (ntpd_opt_strs+1286)
/** Compiled in flag settings for the configfile option */
#define CONFIGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -301,11 +305,11 @@ static int const aAuthnoreqCantList[] = {
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1243)
+#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1297)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1274)
+#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1328)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpd_opt_strs+1286)
+#define DEBUG_LEVEL_name (ntpd_opt_strs+1340)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
@@ -313,11 +317,11 @@ static int const aAuthnoreqCantList[] = {
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (ntpd_opt_strs+1298)
+#define SET_DEBUG_LEVEL_DESC (ntpd_opt_strs+1352)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntpd_opt_strs+1328)
+#define SET_DEBUG_LEVEL_NAME (ntpd_opt_strs+1382)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntpd_opt_strs+1344)
+#define SET_DEBUG_LEVEL_name (ntpd_opt_strs+1398)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -326,11 +330,11 @@ static int const aAuthnoreqCantList[] = {
* driftfile option description:
*/
/** Descriptive text for the driftfile option */
-#define DRIFTFILE_DESC (ntpd_opt_strs+1360)
+#define DRIFTFILE_DESC (ntpd_opt_strs+1414)
/** Upper-cased name for the driftfile option */
-#define DRIFTFILE_NAME (ntpd_opt_strs+1386)
+#define DRIFTFILE_NAME (ntpd_opt_strs+1440)
/** Name string for the driftfile option */
-#define DRIFTFILE_name (ntpd_opt_strs+1396)
+#define DRIFTFILE_name (ntpd_opt_strs+1450)
/** Compiled in flag settings for the driftfile option */
#define DRIFTFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -339,24 +343,36 @@ static int const aAuthnoreqCantList[] = {
* panicgate option description:
*/
/** Descriptive text for the panicgate option */
-#define PANICGATE_DESC (ntpd_opt_strs+1406)
+#define PANICGATE_DESC (ntpd_opt_strs+1460)
/** Upper-cased name for the panicgate option */
-#define PANICGATE_NAME (ntpd_opt_strs+1443)
+#define PANICGATE_NAME (ntpd_opt_strs+1497)
/** Name string for the panicgate option */
-#define PANICGATE_name (ntpd_opt_strs+1453)
+#define PANICGATE_name (ntpd_opt_strs+1507)
/** Compiled in flag settings for the panicgate option */
#define PANICGATE_FLAGS (OPTST_DISABLED)
/**
+ * force_step_once option description:
+ */
+/** Descriptive text for the force_step_once option */
+#define FORCE_STEP_ONCE_DESC (ntpd_opt_strs+1517)
+/** Upper-cased name for the force_step_once option */
+#define FORCE_STEP_ONCE_NAME (ntpd_opt_strs+1553)
+/** Name string for the force_step_once option */
+#define FORCE_STEP_ONCE_name (ntpd_opt_strs+1569)
+/** Compiled in flag settings for the force_step_once option */
+#define FORCE_STEP_ONCE_FLAGS (OPTST_DISABLED)
+
+/**
* jaildir option description:
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the jaildir option */
-#define JAILDIR_DESC (ntpd_opt_strs+1463)
+#define JAILDIR_DESC (ntpd_opt_strs+1585)
/** Upper-cased name for the jaildir option */
-#define JAILDIR_NAME (ntpd_opt_strs+1478)
+#define JAILDIR_NAME (ntpd_opt_strs+1600)
/** Name string for the jaildir option */
-#define JAILDIR_name (ntpd_opt_strs+1486)
+#define JAILDIR_name (ntpd_opt_strs+1608)
/** Compiled in flag settings for the jaildir option */
#define JAILDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -365,19 +381,19 @@ static int const aAuthnoreqCantList[] = {
#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define JAILDIR_NAME NULL
/** Descriptive text for the jaildir option */
-#define JAILDIR_DESC (ntpd_opt_strs+1494)
-#define JAILDIR_name (ntpd_opt_strs+1486)
+#define JAILDIR_DESC (ntpd_opt_strs+1616)
+#define JAILDIR_name (ntpd_opt_strs+1608)
#endif /* HAVE_DROPROOT */
/**
* interface option description:
*/
/** Descriptive text for the interface option */
-#define INTERFACE_DESC (ntpd_opt_strs+1573)
+#define INTERFACE_DESC (ntpd_opt_strs+1695)
/** Upper-cased name for the interface option */
-#define INTERFACE_NAME (ntpd_opt_strs+1612)
+#define INTERFACE_NAME (ntpd_opt_strs+1734)
/** Name string for the interface option */
-#define INTERFACE_name (ntpd_opt_strs+1622)
+#define INTERFACE_name (ntpd_opt_strs+1744)
/** Compiled in flag settings for the interface option */
#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -386,11 +402,11 @@ static int const aAuthnoreqCantList[] = {
* keyfile option description:
*/
/** Descriptive text for the keyfile option */
-#define KEYFILE_DESC (ntpd_opt_strs+1632)
+#define KEYFILE_DESC (ntpd_opt_strs+1754)
/** Upper-cased name for the keyfile option */
-#define KEYFILE_NAME (ntpd_opt_strs+1655)
+#define KEYFILE_NAME (ntpd_opt_strs+1777)
/** Name string for the keyfile option */
-#define KEYFILE_name (ntpd_opt_strs+1663)
+#define KEYFILE_name (ntpd_opt_strs+1785)
/** Compiled in flag settings for the keyfile option */
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -399,11 +415,11 @@ static int const aAuthnoreqCantList[] = {
* logfile option description:
*/
/** Descriptive text for the logfile option */
-#define LOGFILE_DESC (ntpd_opt_strs+1671)
+#define LOGFILE_DESC (ntpd_opt_strs+1793)
/** Upper-cased name for the logfile option */
-#define LOGFILE_NAME (ntpd_opt_strs+1692)
+#define LOGFILE_NAME (ntpd_opt_strs+1814)
/** Name string for the logfile option */
-#define LOGFILE_name (ntpd_opt_strs+1700)
+#define LOGFILE_name (ntpd_opt_strs+1822)
/** Compiled in flag settings for the logfile option */
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -412,11 +428,11 @@ static int const aAuthnoreqCantList[] = {
* novirtualips option description:
*/
/** Descriptive text for the novirtualips option */
-#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1708)
+#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1830)
/** Upper-cased name for the novirtualips option */
-#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1744)
+#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1866)
/** Name string for the novirtualips option */
-#define NOVIRTUALIPS_name (ntpd_opt_strs+1757)
+#define NOVIRTUALIPS_name (ntpd_opt_strs+1879)
/** Compiled in flag settings for the novirtualips option */
#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
@@ -425,11 +441,11 @@ static int const aAuthnoreqCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the modifymmtimer option */
-#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1770)
+#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1892)
/** Upper-cased name for the modifymmtimer option */
-#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1809)
+#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1931)
/** Name string for the modifymmtimer option */
-#define MODIFYMMTIMER_name (ntpd_opt_strs+1823)
+#define MODIFYMMTIMER_name (ntpd_opt_strs+1945)
/** Compiled in flag settings for the modifymmtimer option */
#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
@@ -445,11 +461,11 @@ static int const aAuthnoreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the nofork option */
-#define NOFORK_DESC (ntpd_opt_strs+1837)
+#define NOFORK_DESC (ntpd_opt_strs+1959)
/** Upper-cased name for the nofork option */
-#define NOFORK_NAME (ntpd_opt_strs+1849)
+#define NOFORK_NAME (ntpd_opt_strs+1971)
/** Name string for the nofork option */
-#define NOFORK_name (ntpd_opt_strs+1856)
+#define NOFORK_name (ntpd_opt_strs+1978)
/** Other options that appear in conjunction with the nofork option */
static int const aNoforkCantList[] = {
INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
@@ -460,11 +476,11 @@ static int const aNoforkCantList[] = {
* nice option description:
*/
/** Descriptive text for the nice option */
-#define NICE_DESC (ntpd_opt_strs+1863)
+#define NICE_DESC (ntpd_opt_strs+1985)
/** Upper-cased name for the nice option */
-#define NICE_NAME (ntpd_opt_strs+1884)
+#define NICE_NAME (ntpd_opt_strs+2006)
/** Name string for the nice option */
-#define NICE_name (ntpd_opt_strs+1889)
+#define NICE_name (ntpd_opt_strs+2011)
/** Compiled in flag settings for the nice option */
#define NICE_FLAGS (OPTST_DISABLED)
@@ -472,11 +488,11 @@ static int const aNoforkCantList[] = {
* pidfile option description:
*/
/** Descriptive text for the pidfile option */
-#define PIDFILE_DESC (ntpd_opt_strs+1894)
+#define PIDFILE_DESC (ntpd_opt_strs+2016)
/** Upper-cased name for the pidfile option */
-#define PIDFILE_NAME (ntpd_opt_strs+1915)
+#define PIDFILE_NAME (ntpd_opt_strs+2037)
/** Name string for the pidfile option */
-#define PIDFILE_name (ntpd_opt_strs+1923)
+#define PIDFILE_name (ntpd_opt_strs+2045)
/** Compiled in flag settings for the pidfile option */
#define PIDFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -485,11 +501,11 @@ static int const aNoforkCantList[] = {
* priority option description:
*/
/** Descriptive text for the priority option */
-#define PRIORITY_DESC (ntpd_opt_strs+1931)
+#define PRIORITY_DESC (ntpd_opt_strs+2053)
/** Upper-cased name for the priority option */
-#define PRIORITY_NAME (ntpd_opt_strs+1948)
+#define PRIORITY_NAME (ntpd_opt_strs+2070)
/** Name string for the priority option */
-#define PRIORITY_name (ntpd_opt_strs+1957)
+#define PRIORITY_name (ntpd_opt_strs+2079)
/** Compiled in flag settings for the priority option */
#define PRIORITY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -499,11 +515,11 @@ static int const aNoforkCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the quit option */
-#define QUIT_DESC (ntpd_opt_strs+1966)
+#define QUIT_DESC (ntpd_opt_strs+2088)
/** Upper-cased name for the quit option */
-#define QUIT_NAME (ntpd_opt_strs+1988)
+#define QUIT_NAME (ntpd_opt_strs+2110)
/** Name string for the quit option */
-#define QUIT_name (ntpd_opt_strs+1993)
+#define QUIT_name (ntpd_opt_strs+2115)
/** Other options that appear in conjunction with the quit option */
static int const aQuitCantList[] = {
INDEX_OPT_SAVECONFIGQUIT,
@@ -515,11 +531,11 @@ static int const aQuitCantList[] = {
* propagationdelay option description:
*/
/** Descriptive text for the propagationdelay option */
-#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+1998)
+#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+2120)
/** Upper-cased name for the propagationdelay option */
-#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2026)
+#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2148)
/** Name string for the propagationdelay option */
-#define PROPAGATIONDELAY_name (ntpd_opt_strs+2043)
+#define PROPAGATIONDELAY_name (ntpd_opt_strs+2165)
/** Compiled in flag settings for the propagationdelay option */
#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -530,11 +546,11 @@ static int const aQuitCantList[] = {
*/
#ifdef SAVECONFIG
/** Descriptive text for the saveconfigquit option */
-#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2060)
+#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2182)
/** Upper-cased name for the saveconfigquit option */
-#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2095)
+#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2217)
/** Name string for the saveconfigquit option */
-#define SAVECONFIGQUIT_name (ntpd_opt_strs+2110)
+#define SAVECONFIGQUIT_name (ntpd_opt_strs+2232)
/** Other options that appear in conjunction with the saveconfigquit option */
static int const aSaveconfigquitCantList[] = {
INDEX_OPT_QUIT,
@@ -555,11 +571,11 @@ static int const aSaveconfigquitCantList[] = {
* statsdir option description:
*/
/** Descriptive text for the statsdir option */
-#define STATSDIR_DESC (ntpd_opt_strs+2125)
+#define STATSDIR_DESC (ntpd_opt_strs+2247)
/** Upper-cased name for the statsdir option */
-#define STATSDIR_NAME (ntpd_opt_strs+2150)
+#define STATSDIR_NAME (ntpd_opt_strs+2272)
/** Name string for the statsdir option */
-#define STATSDIR_name (ntpd_opt_strs+2159)
+#define STATSDIR_name (ntpd_opt_strs+2281)
/** Compiled in flag settings for the statsdir option */
#define STATSDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -568,11 +584,11 @@ static int const aSaveconfigquitCantList[] = {
* trustedkey option description:
*/
/** Descriptive text for the trustedkey option */
-#define TRUSTEDKEY_DESC (ntpd_opt_strs+2168)
+#define TRUSTEDKEY_DESC (ntpd_opt_strs+2290)
/** Upper-cased name for the trustedkey option */
-#define TRUSTEDKEY_NAME (ntpd_opt_strs+2187)
+#define TRUSTEDKEY_NAME (ntpd_opt_strs+2309)
/** Name string for the trustedkey option */
-#define TRUSTEDKEY_name (ntpd_opt_strs+2198)
+#define TRUSTEDKEY_name (ntpd_opt_strs+2320)
/** Compiled in flag settings for the trustedkey option */
#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -582,11 +598,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the user option */
-#define USER_DESC (ntpd_opt_strs+2209)
+#define USER_DESC (ntpd_opt_strs+2331)
/** Upper-cased name for the user option */
-#define USER_NAME (ntpd_opt_strs+2243)
+#define USER_NAME (ntpd_opt_strs+2365)
/** Name string for the user option */
-#define USER_name (ntpd_opt_strs+2248)
+#define USER_name (ntpd_opt_strs+2370)
/** Compiled in flag settings for the user option */
#define USER_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -595,19 +611,19 @@ static int const aSaveconfigquitCantList[] = {
#define USER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define USER_NAME NULL
/** Descriptive text for the user option */
-#define USER_DESC (ntpd_opt_strs+1494)
-#define USER_name (ntpd_opt_strs+2248)
+#define USER_DESC (ntpd_opt_strs+1616)
+#define USER_name (ntpd_opt_strs+2370)
#endif /* HAVE_DROPROOT */
/**
* updateinterval option description:
*/
/** Descriptive text for the updateinterval option */
-#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2253)
+#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2375)
/** Upper-cased name for the updateinterval option */
-#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2317)
+#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2439)
/** Name string for the updateinterval option */
-#define UPDATEINTERVAL_name (ntpd_opt_strs+2332)
+#define UPDATEINTERVAL_name (ntpd_opt_strs+2454)
/** Compiled in flag settings for the updateinterval option */
#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -616,11 +632,11 @@ static int const aSaveconfigquitCantList[] = {
* var option description:
*/
/** Descriptive text for the var option */
-#define VAR_DESC (ntpd_opt_strs+2347)
+#define VAR_DESC (ntpd_opt_strs+2469)
/** Upper-cased name for the var option */
-#define VAR_NAME (ntpd_opt_strs+2377)
+#define VAR_NAME (ntpd_opt_strs+2499)
/** Name string for the var option */
-#define VAR_name (ntpd_opt_strs+2381)
+#define VAR_name (ntpd_opt_strs+2503)
/** Compiled in flag settings for the var option */
#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -629,11 +645,11 @@ static int const aSaveconfigquitCantList[] = {
* dvar option description:
*/
/** Descriptive text for the dvar option */
-#define DVAR_DESC (ntpd_opt_strs+2385)
+#define DVAR_DESC (ntpd_opt_strs+2507)
/** Upper-cased name for the dvar option */
-#define DVAR_NAME (ntpd_opt_strs+2419)
+#define DVAR_NAME (ntpd_opt_strs+2541)
/** Name string for the dvar option */
-#define DVAR_name (ntpd_opt_strs+2424)
+#define DVAR_name (ntpd_opt_strs+2546)
/** Compiled in flag settings for the dvar option */
#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -644,11 +660,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_WORKING_FORK
/** Descriptive text for the wait-sync option */
-#define WAIT_SYNC_DESC (ntpd_opt_strs+2429)
+#define WAIT_SYNC_DESC (ntpd_opt_strs+2551)
/** Upper-cased name for the wait-sync option */
-#define WAIT_SYNC_NAME (ntpd_opt_strs+2466)
+#define WAIT_SYNC_NAME (ntpd_opt_strs+2588)
/** Name string for the wait-sync option */
-#define WAIT_SYNC_name (ntpd_opt_strs+2476)
+#define WAIT_SYNC_name (ntpd_opt_strs+2598)
/** Other options that appear in conjunction with the wait-sync option */
static int const aWait_SyncCantList[] = {
INDEX_OPT_NOFORK,
@@ -670,11 +686,11 @@ static int const aWait_SyncCantList[] = {
* slew option description:
*/
/** Descriptive text for the slew option */
-#define SLEW_DESC (ntpd_opt_strs+2486)
+#define SLEW_DESC (ntpd_opt_strs+2608)
/** Upper-cased name for the slew option */
-#define SLEW_NAME (ntpd_opt_strs+2509)
+#define SLEW_NAME (ntpd_opt_strs+2631)
/** Name string for the slew option */
-#define SLEW_name (ntpd_opt_strs+2514)
+#define SLEW_name (ntpd_opt_strs+2636)
/** Compiled in flag settings for the slew option */
#define SLEW_FLAGS (OPTST_DISABLED)
@@ -683,11 +699,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the usepcc option */
-#define USEPCC_DESC (ntpd_opt_strs+2519)
+#define USEPCC_DESC (ntpd_opt_strs+2641)
/** Upper-cased name for the usepcc option */
-#define USEPCC_NAME (ntpd_opt_strs+2556)
+#define USEPCC_NAME (ntpd_opt_strs+2678)
/** Name string for the usepcc option */
-#define USEPCC_name (ntpd_opt_strs+2563)
+#define USEPCC_name (ntpd_opt_strs+2685)
/** Compiled in flag settings for the usepcc option */
#define USEPCC_FLAGS (OPTST_DISABLED)
@@ -703,11 +719,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the pccfreq option */
-#define PCCFREQ_DESC (ntpd_opt_strs+2570)
+#define PCCFREQ_DESC (ntpd_opt_strs+2692)
/** Upper-cased name for the pccfreq option */
-#define PCCFREQ_NAME (ntpd_opt_strs+2613)
+#define PCCFREQ_NAME (ntpd_opt_strs+2735)
/** Name string for the pccfreq option */
-#define PCCFREQ_name (ntpd_opt_strs+2621)
+#define PCCFREQ_name (ntpd_opt_strs+2743)
/** Compiled in flag settings for the pccfreq option */
#define PCCFREQ_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -724,11 +740,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef HAVE_DNSREGISTRATION
/** Descriptive text for the mdns option */
-#define MDNS_DESC (ntpd_opt_strs+2629)
+#define MDNS_DESC (ntpd_opt_strs+2751)
/** Upper-cased name for the mdns option */
-#define MDNS_NAME (ntpd_opt_strs+2664)
+#define MDNS_NAME (ntpd_opt_strs+2786)
/** Name string for the mdns option */
-#define MDNS_name (ntpd_opt_strs+2669)
+#define MDNS_name (ntpd_opt_strs+2791)
/** Compiled in flag settings for the mdns option */
#define MDNS_FLAGS (OPTST_DISABLED)
@@ -742,11 +758,11 @@ static int const aWait_SyncCantList[] = {
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpd_opt_strs+2674)
-#define HELP_name (ntpd_opt_strs+2718)
+#define HELP_DESC (ntpd_opt_strs+2796)
+#define HELP_name (ntpd_opt_strs+2840)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpd_opt_strs+2723)
-#define MORE_HELP_name (ntpd_opt_strs+2768)
+#define MORE_HELP_DESC (ntpd_opt_strs+2845)
+#define MORE_HELP_name (ntpd_opt_strs+2890)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -759,8 +775,8 @@ static int const aWait_SyncCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpd_opt_strs+2778)
-#define VER_name (ntpd_opt_strs+2814)
+#define VER_DESC (ntpd_opt_strs+2900)
+#define VER_name (ntpd_opt_strs+2936)
/**
* Declare option callback procedures
*/
@@ -900,8 +916,20 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PANICGATE_DESC, PANICGATE_NAME, PANICGATE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 10, VALUE_OPT_JAILDIR,
- /* equiv idx, value */ 10, VALUE_OPT_JAILDIR,
+ { /* entry idx, value */ 10, VALUE_OPT_FORCE_STEP_ONCE,
+ /* equiv idx, value */ 10, VALUE_OPT_FORCE_STEP_ONCE,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ FORCE_STEP_ONCE_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --force_step_once */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ FORCE_STEP_ONCE_DESC, FORCE_STEP_ONCE_NAME, FORCE_STEP_ONCE_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 11, VALUE_OPT_JAILDIR,
+ /* equiv idx, value */ 11, VALUE_OPT_JAILDIR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ JAILDIR_FLAGS, 0,
@@ -912,8 +940,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ JAILDIR_DESC, JAILDIR_NAME, JAILDIR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 11, VALUE_OPT_INTERFACE,
- /* equiv idx, value */ 11, VALUE_OPT_INTERFACE,
+ { /* entry idx, value */ 12, VALUE_OPT_INTERFACE,
+ /* equiv idx, value */ 12, VALUE_OPT_INTERFACE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ INTERFACE_FLAGS, 0,
@@ -924,8 +952,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ INTERFACE_DESC, INTERFACE_NAME, INTERFACE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 12, VALUE_OPT_KEYFILE,
- /* equiv idx, value */ 12, VALUE_OPT_KEYFILE,
+ { /* entry idx, value */ 13, VALUE_OPT_KEYFILE,
+ /* equiv idx, value */ 13, VALUE_OPT_KEYFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KEYFILE_FLAGS, 0,
@@ -936,8 +964,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 13, VALUE_OPT_LOGFILE,
- /* equiv idx, value */ 13, VALUE_OPT_LOGFILE,
+ { /* entry idx, value */ 14, VALUE_OPT_LOGFILE,
+ /* equiv idx, value */ 14, VALUE_OPT_LOGFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ LOGFILE_FLAGS, 0,
@@ -948,8 +976,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
- /* equiv idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
+ { /* entry idx, value */ 15, VALUE_OPT_NOVIRTUALIPS,
+ /* equiv idx, value */ 15, VALUE_OPT_NOVIRTUALIPS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOVIRTUALIPS_FLAGS, 0,
@@ -960,8 +988,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NOVIRTUALIPS_DESC, NOVIRTUALIPS_NAME, NOVIRTUALIPS_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
- /* equiv idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
+ { /* entry idx, value */ 16, VALUE_OPT_MODIFYMMTIMER,
+ /* equiv idx, value */ 16, VALUE_OPT_MODIFYMMTIMER,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MODIFYMMTIMER_FLAGS, 0,
@@ -972,8 +1000,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ MODIFYMMTIMER_DESC, MODIFYMMTIMER_NAME, MODIFYMMTIMER_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 16, VALUE_OPT_NOFORK,
- /* equiv idx, value */ 16, VALUE_OPT_NOFORK,
+ { /* entry idx, value */ 17, VALUE_OPT_NOFORK,
+ /* equiv idx, value */ 17, VALUE_OPT_NOFORK,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOFORK_FLAGS, 0,
@@ -984,8 +1012,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 17, VALUE_OPT_NICE,
- /* equiv idx, value */ 17, VALUE_OPT_NICE,
+ { /* entry idx, value */ 18, VALUE_OPT_NICE,
+ /* equiv idx, value */ 18, VALUE_OPT_NICE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NICE_FLAGS, 0,
@@ -996,8 +1024,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NICE_DESC, NICE_NAME, NICE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 18, VALUE_OPT_PIDFILE,
- /* equiv idx, value */ 18, VALUE_OPT_PIDFILE,
+ { /* entry idx, value */ 19, VALUE_OPT_PIDFILE,
+ /* equiv idx, value */ 19, VALUE_OPT_PIDFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PIDFILE_FLAGS, 0,
@@ -1008,8 +1036,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PIDFILE_DESC, PIDFILE_NAME, PIDFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 19, VALUE_OPT_PRIORITY,
- /* equiv idx, value */ 19, VALUE_OPT_PRIORITY,
+ { /* entry idx, value */ 20, VALUE_OPT_PRIORITY,
+ /* equiv idx, value */ 20, VALUE_OPT_PRIORITY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PRIORITY_FLAGS, 0,
@@ -1020,8 +1048,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 20, VALUE_OPT_QUIT,
- /* equiv idx, value */ 20, VALUE_OPT_QUIT,
+ { /* entry idx, value */ 21, VALUE_OPT_QUIT,
+ /* equiv idx, value */ 21, VALUE_OPT_QUIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ QUIT_FLAGS, 0,
@@ -1032,8 +1060,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ QUIT_DESC, QUIT_NAME, QUIT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
- /* equiv idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
+ { /* entry idx, value */ 22, VALUE_OPT_PROPAGATIONDELAY,
+ /* equiv idx, value */ 22, VALUE_OPT_PROPAGATIONDELAY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PROPAGATIONDELAY_FLAGS, 0,
@@ -1044,8 +1072,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PROPAGATIONDELAY_DESC, PROPAGATIONDELAY_NAME, PROPAGATIONDELAY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
- /* equiv idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
+ { /* entry idx, value */ 23, VALUE_OPT_SAVECONFIGQUIT,
+ /* equiv idx, value */ 23, VALUE_OPT_SAVECONFIGQUIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SAVECONFIGQUIT_FLAGS, 0,
@@ -1056,8 +1084,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ SAVECONFIGQUIT_DESC, SAVECONFIGQUIT_NAME, SAVECONFIGQUIT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 23, VALUE_OPT_STATSDIR,
- /* equiv idx, value */ 23, VALUE_OPT_STATSDIR,
+ { /* entry idx, value */ 24, VALUE_OPT_STATSDIR,
+ /* equiv idx, value */ 24, VALUE_OPT_STATSDIR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ STATSDIR_FLAGS, 0,
@@ -1068,8 +1096,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ STATSDIR_DESC, STATSDIR_NAME, STATSDIR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
- /* equiv idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
+ { /* entry idx, value */ 25, VALUE_OPT_TRUSTEDKEY,
+ /* equiv idx, value */ 25, VALUE_OPT_TRUSTEDKEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ TRUSTEDKEY_FLAGS, 0,
@@ -1080,8 +1108,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ TRUSTEDKEY_DESC, TRUSTEDKEY_NAME, TRUSTEDKEY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 25, VALUE_OPT_USER,
- /* equiv idx, value */ 25, VALUE_OPT_USER,
+ { /* entry idx, value */ 26, VALUE_OPT_USER,
+ /* equiv idx, value */ 26, VALUE_OPT_USER,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USER_FLAGS, 0,
@@ -1092,8 +1120,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ USER_DESC, USER_NAME, USER_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
- /* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
+ { /* entry idx, value */ 27, VALUE_OPT_UPDATEINTERVAL,
+ /* equiv idx, value */ 27, VALUE_OPT_UPDATEINTERVAL,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ UPDATEINTERVAL_FLAGS, 0,
@@ -1104,8 +1132,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ UPDATEINTERVAL_DESC, UPDATEINTERVAL_NAME, UPDATEINTERVAL_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 27, VALUE_OPT_VAR,
- /* equiv idx, value */ 27, VALUE_OPT_VAR,
+ { /* entry idx, value */ 28, VALUE_OPT_VAR,
+ /* equiv idx, value */ 28, VALUE_OPT_VAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ VAR_FLAGS, 0,
@@ -1116,8 +1144,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ VAR_DESC, VAR_NAME, VAR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 28, VALUE_OPT_DVAR,
- /* equiv idx, value */ 28, VALUE_OPT_DVAR,
+ { /* entry idx, value */ 29, VALUE_OPT_DVAR,
+ /* equiv idx, value */ 29, VALUE_OPT_DVAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ DVAR_FLAGS, 0,
@@ -1128,8 +1156,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ DVAR_DESC, DVAR_NAME, DVAR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 29, VALUE_OPT_WAIT_SYNC,
- /* equiv idx, value */ 29, VALUE_OPT_WAIT_SYNC,
+ { /* entry idx, value */ 30, VALUE_OPT_WAIT_SYNC,
+ /* equiv idx, value */ 30, VALUE_OPT_WAIT_SYNC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ WAIT_SYNC_FLAGS, 0,
@@ -1140,8 +1168,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ WAIT_SYNC_DESC, WAIT_SYNC_NAME, WAIT_SYNC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 30, VALUE_OPT_SLEW,
- /* equiv idx, value */ 30, VALUE_OPT_SLEW,
+ { /* entry idx, value */ 31, VALUE_OPT_SLEW,
+ /* equiv idx, value */ 31, VALUE_OPT_SLEW,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SLEW_FLAGS, 0,
@@ -1152,8 +1180,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 31, VALUE_OPT_USEPCC,
- /* equiv idx, value */ 31, VALUE_OPT_USEPCC,
+ { /* entry idx, value */ 32, VALUE_OPT_USEPCC,
+ /* equiv idx, value */ 32, VALUE_OPT_USEPCC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USEPCC_FLAGS, 0,
@@ -1164,8 +1192,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ USEPCC_DESC, USEPCC_NAME, USEPCC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 32, VALUE_OPT_PCCFREQ,
- /* equiv idx, value */ 32, VALUE_OPT_PCCFREQ,
+ { /* entry idx, value */ 33, VALUE_OPT_PCCFREQ,
+ /* equiv idx, value */ 33, VALUE_OPT_PCCFREQ,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PCCFREQ_FLAGS, 0,
@@ -1176,8 +1204,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PCCFREQ_DESC, PCCFREQ_NAME, PCCFREQ_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 33, VALUE_OPT_MDNS,
- /* equiv idx, value */ 33, VALUE_OPT_MDNS,
+ { /* entry idx, value */ 34, VALUE_OPT_MDNS,
+ /* equiv idx, value */ 34, VALUE_OPT_MDNS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MDNS_FLAGS, 0,
@@ -1230,21 +1258,21 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpd. */
-#define zPROGNAME (ntpd_opt_strs+2822)
+#define zPROGNAME (ntpd_opt_strs+2944)
/** Reference to the title line for ntpd usage. */
-#define zUsageTitle (ntpd_opt_strs+2827)
+#define zUsageTitle (ntpd_opt_strs+2949)
/** There is no ntpd configuration file. */
#define zRcName NULL
/** There are no directories to search for ntpd config files. */
#define apzHomeList NULL
/** The ntpd program bug email address. */
-#define zBugsAddr (ntpd_opt_strs+2960)
+#define zBugsAddr (ntpd_opt_strs+3080)
/** Clarification/explanation of what ntpd does. */
-#define zExplain (ntpd_opt_strs+2994)
+#define zExplain (ntpd_opt_strs+3114)
/** Extra detail explaining what ntpd does. */
#define zDetail (NULL)
/** The full version string for ntpd. */
-#define zFullVersion (ntpd_opt_strs+2996)
+#define zFullVersion (ntpd_opt_strs+3116)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -1366,7 +1394,7 @@ tOptions ntpdOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 37 /* full option count */, 34 /* user option count */,
+ 38 /* full option count */, 35 /* user option count */,
ntpd_full_usage, ntpd_short_usage,
NULL, NULL,
PKGDATADIR, ntpd_packager_info
@@ -1501,8 +1529,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.7p482\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("ntpd 4.2.8p2\n\
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1516,9 +1544,10 @@ provided that the above copyright notice appears in all copies and that\n\
both the copyright notice and this permission notice appear in supporting\n\
documentation, and that the name The University of Delaware not be used in\n\
advertising or publicity pertaining to distribution of the software without\n\
-specific, written prior permission. The University of Delaware makes no\n\
-representations about the suitability this software for any purpose. It is\n\
-provided \"as is\" without express or implied warranty.\n"));
+specific, written prior permission. The University of Delaware and Network\n\
+Time Foundation makes no representations about the suitability this\n\
+software for any purpose. It is provided \"as is\" without express or\n\
+implied warranty.\n"));
/* referenced via ntpdOptions.pOptDesc->pzText */
puts(_("Force IPv4 DNS name resolution"));
@@ -1551,6 +1580,9 @@ provided \"as is\" without express or implied warranty.\n"));
puts(_("Allow the first adjustment to be Big"));
/* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Step any initial offset correction."));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
puts(_("Jail directory"));
/* referenced via ntpdOptions.pOptDesc->pzText */
@@ -1638,7 +1670,7 @@ provided \"as is\" without express or implied warranty.\n"));
puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */
- puts(_("ntpd - NTP daemon program - Ver. 4.2.7p482\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@@ -1646,7 +1678,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
- puts(_("ntpd 4.2.7p482"));
+ puts(_("ntpd 4.2.8p2"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpd/ntpd-opts.h b/ntpd/ntpd-opts.h
index 7a33779..682aebd 100644
--- a/ntpd/ntpd-opts.h
+++ b/ntpd/ntpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed December 2, 2014 at 08:54:07 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:23:13 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -74,40 +74,41 @@ typedef enum {
INDEX_OPT_SET_DEBUG_LEVEL = 7,
INDEX_OPT_DRIFTFILE = 8,
INDEX_OPT_PANICGATE = 9,
- INDEX_OPT_JAILDIR = 10,
- INDEX_OPT_INTERFACE = 11,
- INDEX_OPT_KEYFILE = 12,
- INDEX_OPT_LOGFILE = 13,
- INDEX_OPT_NOVIRTUALIPS = 14,
- INDEX_OPT_MODIFYMMTIMER = 15,
- INDEX_OPT_NOFORK = 16,
- INDEX_OPT_NICE = 17,
- INDEX_OPT_PIDFILE = 18,
- INDEX_OPT_PRIORITY = 19,
- INDEX_OPT_QUIT = 20,
- INDEX_OPT_PROPAGATIONDELAY = 21,
- INDEX_OPT_SAVECONFIGQUIT = 22,
- INDEX_OPT_STATSDIR = 23,
- INDEX_OPT_TRUSTEDKEY = 24,
- INDEX_OPT_USER = 25,
- INDEX_OPT_UPDATEINTERVAL = 26,
- INDEX_OPT_VAR = 27,
- INDEX_OPT_DVAR = 28,
- INDEX_OPT_WAIT_SYNC = 29,
- INDEX_OPT_SLEW = 30,
- INDEX_OPT_USEPCC = 31,
- INDEX_OPT_PCCFREQ = 32,
- INDEX_OPT_MDNS = 33,
- INDEX_OPT_VERSION = 34,
- INDEX_OPT_HELP = 35,
- INDEX_OPT_MORE_HELP = 36
+ INDEX_OPT_FORCE_STEP_ONCE = 10,
+ INDEX_OPT_JAILDIR = 11,
+ INDEX_OPT_INTERFACE = 12,
+ INDEX_OPT_KEYFILE = 13,
+ INDEX_OPT_LOGFILE = 14,
+ INDEX_OPT_NOVIRTUALIPS = 15,
+ INDEX_OPT_MODIFYMMTIMER = 16,
+ INDEX_OPT_NOFORK = 17,
+ INDEX_OPT_NICE = 18,
+ INDEX_OPT_PIDFILE = 19,
+ INDEX_OPT_PRIORITY = 20,
+ INDEX_OPT_QUIT = 21,
+ INDEX_OPT_PROPAGATIONDELAY = 22,
+ INDEX_OPT_SAVECONFIGQUIT = 23,
+ INDEX_OPT_STATSDIR = 24,
+ INDEX_OPT_TRUSTEDKEY = 25,
+ INDEX_OPT_USER = 26,
+ INDEX_OPT_UPDATEINTERVAL = 27,
+ INDEX_OPT_VAR = 28,
+ INDEX_OPT_DVAR = 29,
+ INDEX_OPT_WAIT_SYNC = 30,
+ INDEX_OPT_SLEW = 31,
+ INDEX_OPT_USEPCC = 32,
+ INDEX_OPT_PCCFREQ = 33,
+ INDEX_OPT_MDNS = 34,
+ INDEX_OPT_VERSION = 35,
+ INDEX_OPT_HELP = 36,
+ INDEX_OPT_MORE_HELP = 37
} teOptIndex;
/** count of all options for ntpd */
-#define OPTION_CT 37
+#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.2.7p482"
+#define NTPD_VERSION "4.2.8p2"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.7p482"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@@ -199,6 +200,10 @@ typedef enum {
# warning undefining PANICGATE due to option name conflict
# undef PANICGATE
# endif
+# ifdef FORCE_STEP_ONCE
+# warning undefining FORCE_STEP_ONCE due to option name conflict
+# undef FORCE_STEP_ONCE
+# endif
# ifdef JAILDIR
# warning undefining JAILDIR due to option name conflict
# undef JAILDIR
@@ -306,6 +311,7 @@ typedef enum {
# undef SET_DEBUG_LEVEL
# undef DRIFTFILE
# undef PANICGATE
+# undef FORCE_STEP_ONCE
# undef JAILDIR
# undef INTERFACE
# undef KEYFILE
@@ -348,6 +354,7 @@ typedef enum {
#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
#define VALUE_OPT_DRIFTFILE 'f'
#define VALUE_OPT_PANICGATE 'g'
+#define VALUE_OPT_FORCE_STEP_ONCE 'G'
#define VALUE_OPT_JAILDIR 'i'
#define VALUE_OPT_INTERFACE 'I'
#define VALUE_OPT_KEYFILE 'k'
diff --git a/ntpd/ntpd.1ntpdman b/ntpd/ntpd.1ntpdman
index 810e071..5ded89b 100644
--- a/ntpd/ntpd.1ntpdman
+++ b/ntpd/ntpd.1ntpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd 1ntpdman "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpd 1ntpdman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-AtaWSL/ag-MtaORL)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-TQays3/ag-5Qaqr3)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:46 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:45 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -175,7 +175,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.TP
@@ -196,6 +196,20 @@ See the
\fBtinker\fP
configuration file directive for other options.
.TP
+.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-force\-step\-once\f[]
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
+.TP
.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
Jail directory.
.sp
@@ -220,7 +234,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
path to symmetric keys.
@@ -959,9 +973,9 @@ RFC5908
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/ntpd/ntpd.1ntpdmdoc b/ntpd/ntpd.1ntpdmdoc
index 5b02dd1..14b38e4 100644
--- a/ntpd/ntpd.1ntpdmdoc
+++ b/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:03 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:02 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -144,7 +144,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.It Fl g , Fl \-panicgate
@@ -163,6 +163,19 @@ options.
See the
\fBtinker\fP
configuration file directive for other options.
+.It Fl G , Fl \-force\-step\-once
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
Jail directory.
.sp
@@ -186,7 +199,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
path to symmetric keys.
.sp
@@ -867,9 +880,9 @@ A snapshot of this documentation is available in HTML format in
.%O RFC5908
.Re
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c
index ef1baa7..529e6ce 100644
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -168,8 +168,8 @@ int root_dropped;
char *user; /* User to switch to */
char *group; /* group to switch to */
const char *chrootdir; /* directory to chroot to */
-int sw_uid;
-int sw_gid;
+uid_t sw_uid;
+gid_t sw_gid;
char *endp;
struct group *gr;
struct passwd *pw;
@@ -937,6 +937,10 @@ 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 (user && setuid(sw_uid)) {
msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user);
exit (-1);
@@ -1258,6 +1262,7 @@ finish(
if (mdns != NULL)
DNSServiceRefDeallocate(mdns);
# endif
+ peer_cleanup();
exit(0);
}
#endif /* !SIM && SIGDIE1 */
diff --git a/ntpd/ntpd.html b/ntpd/ntpd.html
index 25b6caa..8919ee9 100644
--- a/ntpd/ntpd.html
+++ b/ntpd/ntpd.html
@@ -39,7 +39,7 @@ The program can operate in any of several modes, including client/server,
symmetric and broadcast modes, and with both symmetric-key and public-key
cryptography.
- <p>This document applies to version 4.2.7p482 of <code>ntpd</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description
@@ -169,7 +169,8 @@ This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
<li><a accesskey="6" href="#ntpd-configfile">ntpd configfile</a>: configfile option (-c)
<li><a accesskey="7" href="#ntpd-driftfile">ntpd driftfile</a>: driftfile option (-f)
<li><a accesskey="8" href="#ntpd-panicgate">ntpd panicgate</a>: panicgate option (-g)
-<li><a accesskey="9" href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
+<li><a accesskey="9" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>: force-step-once option (-G)
+<li><a href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
<li><a href="#ntpd-interface">ntpd interface</a>: interface option (-I)
<li><a href="#ntpd-keyfile">ntpd keyfile</a>: keyfile option (-k)
<li><a href="#ntpd-logfile">ntpd logfile</a>: logfile option (-l)
@@ -219,7 +220,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpd - NTP daemon program - Ver. 4.2.7p481
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p2-RC3
Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ &lt;server1&gt; ... &lt;serverN&gt; ]
Flg Arg Option-Name Description
@@ -240,6 +241,7 @@ Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ].
-f Str driftfile frequency drift file name
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
+ -G no force-step-once Step any initial offset correction.
-i Str jaildir Jail directory
-I Str interface Listen on an interface name or address
- may appear multiple times
@@ -413,7 +415,7 @@ configuration specification in the
file.
<div class="node">
<p><hr>
-<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
+<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-driftfile">ntpd driftfile</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<br>
@@ -443,15 +445,37 @@ See the
configuration file directive for other options.
<div class="node">
<p><hr>
-<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
+<a name="ntpd-force_002dstep_002donce"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-panicgate">ntpd panicgate</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<br>
</div>
+<h4 class="subsection">force-step-once option (-G)</h4>
+
+<p><a name="index-ntpd_002dforce_002dstep_002donce-11"></a>
+This is the &ldquo;step any initial offset correction.&rdquo; option.
+Normally,
+<code>ntpd</code>
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the <code>tinker</code> configuration file directive for other options.
+<div class="node">
+<p><hr>
+<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
<h4 class="subsection">jaildir option (-i)</h4>
-<p><a name="index-ntpd_002djaildir-11"></a>
+<p><a name="index-ntpd_002djaildir-12"></a>
This is the &ldquo;jail directory&rdquo; option.
This option takes a string argument.
@@ -482,7 +506,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">interface option (-I)</h4>
-<p><a name="index-ntpd_002dinterface-12"></a>
+<p><a name="index-ntpd_002dinterface-13"></a>
This is the &ldquo;listen on an interface name or address&rdquo; option.
This option takes a string argument <span class="file">iface</span>.
@@ -506,7 +530,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">keyfile option (-k)</h4>
-<p><a name="index-ntpd_002dkeyfile-13"></a>
+<p><a name="index-ntpd_002dkeyfile-14"></a>
This is the &ldquo;path to symmetric keys&rdquo; option.
This option takes a string argument.
Specify the name and path of the symmetric key file.
@@ -525,7 +549,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">logfile option (-l)</h4>
-<p><a name="index-ntpd_002dlogfile-14"></a>
+<p><a name="index-ntpd_002dlogfile-15"></a>
This is the &ldquo;path to the log file&rdquo; option.
This option takes a string argument.
Specify the name and path of the log file.
@@ -543,7 +567,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">novirtualips option (-L)</h4>
-<p><a name="index-ntpd_002dnovirtualips-15"></a>
+<p><a name="index-ntpd_002dnovirtualips-16"></a>
This is the &ldquo;do not listen to virtual interfaces&rdquo; option.
Do not listen to virtual interfaces, defined as those with
names containing a colon. This option is deprecated. Please
@@ -559,7 +583,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">modifymmtimer option (-M)</h4>
-<p><a name="index-ntpd_002dmodifymmtimer-16"></a>
+<p><a name="index-ntpd_002dmodifymmtimer-17"></a>
This is the &ldquo;modify multimedia timer (windows only)&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@@ -580,7 +604,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">nice option (-N)</h4>
-<p><a name="index-ntpd_002dnice-17"></a>
+<p><a name="index-ntpd_002dnice-18"></a>
This is the &ldquo;run at high priority&rdquo; option.
To the extent permitted by the operating system, run
<code>ntpd</code>
@@ -595,7 +619,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">pidfile option (-p)</h4>
-<p><a name="index-ntpd_002dpidfile-18"></a>
+<p><a name="index-ntpd_002dpidfile-19"></a>
This is the &ldquo;path to the pid file&rdquo; option.
This option takes a string argument.
Specify the name and path of the file used to record
@@ -614,7 +638,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">priority option (-P)</h4>
-<p><a name="index-ntpd_002dpriority-19"></a>
+<p><a name="index-ntpd_002dpriority-20"></a>
This is the &ldquo;process priority&rdquo; option.
This option takes a number argument.
To the extent permitted by the operating system, run
@@ -632,7 +656,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">quit option (-q)</h4>
-<p><a name="index-ntpd_002dquit-20"></a>
+<p><a name="index-ntpd_002dquit-21"></a>
This is the &ldquo;set the time and quit&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@@ -662,7 +686,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">propagationdelay option (-r)</h4>
-<p><a name="index-ntpd_002dpropagationdelay-21"></a>
+<p><a name="index-ntpd_002dpropagationdelay-22"></a>
This is the &ldquo;broadcast/propagation delay&rdquo; option.
This option takes a string argument.
Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
@@ -676,7 +700,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">saveconfigquit option</h4>
-<p><a name="index-ntpd_002dsaveconfigquit-22"></a>
+<p><a name="index-ntpd_002dsaveconfigquit-23"></a>
This is the &ldquo;save parsed configuration and quit&rdquo; option.
This option takes a string argument.
@@ -700,7 +724,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">statsdir option (-s)</h4>
-<p><a name="index-ntpd_002dstatsdir-23"></a>
+<p><a name="index-ntpd_002dstatsdir-24"></a>
This is the &ldquo;statistics file location&rdquo; option.
This option takes a string argument.
Specify the directory path for files created by the statistics facility.
@@ -717,7 +741,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">trustedkey option (-t)</h4>
-<p><a name="index-ntpd_002dtrustedkey-24"></a>
+<p><a name="index-ntpd_002dtrustedkey-25"></a>
This is the &ldquo;trusted key number&rdquo; option.
This option takes a string argument <span class="file">tkey</span>.
@@ -737,7 +761,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">user option (-u)</h4>
-<p><a name="index-ntpd_002duser-25"></a>
+<p><a name="index-ntpd_002duser-26"></a>
This is the &ldquo;run as userid (or userid:groupid)&rdquo; option.
This option takes a string argument.
@@ -762,7 +786,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">updateinterval option (-U)</h4>
-<p><a name="index-ntpd_002dupdateinterval-26"></a>
+<p><a name="index-ntpd_002dupdateinterval-27"></a>
This is the &ldquo;interval in seconds between scans for new or dropped interfaces&rdquo; option.
This option takes a number argument.
Give the time in seconds between two scans for new or dropped interfaces.
@@ -779,7 +803,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">wait-sync option (-w)</h4>
-<p><a name="index-ntpd_002dwait_002dsync-27"></a>
+<p><a name="index-ntpd_002dwait_002dsync-28"></a>
This is the &ldquo;seconds to wait for first clock sync&rdquo; option.
This option takes a number argument.
@@ -808,7 +832,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">slew option (-x)</h4>
-<p><a name="index-ntpd_002dslew-28"></a>
+<p><a name="index-ntpd_002dslew-29"></a>
This is the &ldquo;slew up to 600 seconds&rdquo; option.
Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
@@ -833,7 +857,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">usepcc option</h4>
-<p><a name="index-ntpd_002dusepcc-29"></a>
+<p><a name="index-ntpd_002dusepcc-30"></a>
This is the &ldquo;use cpu cycle counter (windows only)&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@@ -855,7 +879,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">pccfreq option</h4>
-<p><a name="index-ntpd_002dpccfreq-30"></a>
+<p><a name="index-ntpd_002dpccfreq-31"></a>
This is the &ldquo;force cpu cycle counter use (windows only)&rdquo; option.
This option takes a string argument.
@@ -877,7 +901,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">mdns option (-m)</h4>
-<p><a name="index-ntpd_002dmdns-31"></a>
+<p><a name="index-ntpd_002dmdns-32"></a>
This is the &ldquo;register with mdns as a ntp server&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
diff --git a/ntpd/ntpd.man.in b/ntpd/ntpd.man.in
index a6824ca..d9497a3 100644
--- a/ntpd/ntpd.man.in
+++ b/ntpd/ntpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd @NTPD_MS@ "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpd @NTPD_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-AtaWSL/ag-MtaORL)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-TQays3/ag-5Qaqr3)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:46 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:45 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -175,7 +175,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.TP
@@ -196,6 +196,20 @@ See the
\fBtinker\fP
configuration file directive for other options.
.TP
+.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-force\-step\-once\f[]
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
+.TP
.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
Jail directory.
.sp
@@ -220,7 +234,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
path to symmetric keys.
@@ -959,9 +973,9 @@ RFC5908
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/ntpd/ntpd.mdoc.in b/ntpd/ntpd.mdoc.in
index 1c06102..4458532 100644
--- a/ntpd/ntpd.mdoc.in
+++ b/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:03 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:02 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -144,7 +144,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.It Fl g , Fl \-panicgate
@@ -163,6 +163,19 @@ options.
See the
\fBtinker\fP
configuration file directive for other options.
+.It Fl G , Fl \-force\-step\-once
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
Jail directory.
.sp
@@ -186,7 +199,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
path to symmetric keys.
.sp
@@ -867,9 +880,9 @@ A snapshot of this documentation is available in HTML format in
.%O RFC5908
.Re
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/ntpd/ntpdbase-opts.def b/ntpd/ntpdbase-opts.def
index 110504e..66b9535 100644
--- a/ntpd/ntpdbase-opts.def
+++ b/ntpd/ntpdbase-opts.def
@@ -87,7 +87,7 @@ flag = {
by default.
This is the same operation as the
@code{driftfile} @kbd{driftfile}
- configuration specification in the
+ configuration specification in the
@file{/etc/ntp.conf}
file.
_EndOfDoc_;
@@ -115,6 +115,24 @@ flag = {
};
flag = {
+ name = force_step_once;
+ value = G;
+ descrip = "Step any initial offset correction.";
+ doc = <<- _EndOfDoc_
+ Normally,
+ @code{ntpd}
+ steps the time if the time offset exceeds the step threshold,
+ which is 128 ms by default, and otherwise slews the time.
+ This option forces the initial offset correction to be stepped,
+ so the highest time accuracy can be achieved quickly.
+ However, this may also cause the time to be stepped back
+ so this option must not be used if
+ applications requiring monotonic time are running.
+ See the @code{tinker} configuration file directive for other options.
+ _EndOfDoc_;
+};
+
+flag = {
ifdef = HAVE_DROPROOT;
name = jaildir;
value = i;
@@ -150,7 +168,7 @@ flag = {
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
- @code{interface} command, which is more versatile.
+ @code{interface} command, which is more versatile.
_EndOfDoc_;
};
diff --git a/ntpd/refclock_acts.c b/ntpd/refclock_acts.c
index 36322fd..f62cc46 100644
--- a/ntpd/refclock_acts.c
+++ b/ntpd/refclock_acts.c
@@ -343,7 +343,7 @@ acts_receive(
up->bufptr = up->buf;
acts_message(peer, up->buf);
}
- } else if (!iscntrl(*tptr)) {
+ } else if (!iscntrl((unsigned char)*tptr)) {
*up->bufptr++ = *tptr;
if (*tptr == '*' || *tptr == '#') {
up->tstamp = pp->lastrec;
@@ -515,7 +515,7 @@ acts_timeout(
up->unit);
fd = refclock_open(device, SPEED232, LDISC_ACTS |
LDISC_RAW | LDISC_REMOTE);
- if (fd <= 0) {
+ if (fd < 0) {
msyslog(LOG_ERR, "acts: open fails %m");
return;
}
diff --git a/ntpd/refclock_arc.c b/ntpd/refclock_arc.c
index b2c063e..e5d4cb4 100644
--- a/ntpd/refclock_arc.c
+++ b/ntpd/refclock_arc.c
@@ -843,7 +843,7 @@ send_slow(
static int
get2(char *p, int *val)
{
- if (!isdigit((int)p[0]) || !isdigit((int)p[1])) return 0;
+ if (!isdigit((unsigned char)p[0]) || !isdigit((unsigned char)p[1])) return 0;
*val = (p[0] - '0') * 10 + p[1] - '0';
return 1;
}
@@ -851,7 +851,7 @@ get2(char *p, int *val)
static int
get1(char *p, int *val)
{
- if (!isdigit((int)p[0])) return 0;
+ if (!isdigit((unsigned char)p[0])) return 0;
*val = p[0] - '0';
return 1;
}
@@ -943,7 +943,7 @@ arc_receive(
#ifdef DEBUG
if(debug) { /* Show \r as `R', other non-printing char as `?'. */
printf("arc: stamp -->%c<-- (%d chars rcvd)\n",
- ((c == '\r') ? 'R' : (isgraph((int)c) ? c : '?')),
+ ((c == '\r') ? 'R' : (isgraph((unsigned char)c) ? c : '?')),
rbufp->recv_length);
}
#endif
diff --git a/ntpd/refclock_chu.c b/ntpd/refclock_chu.c
index 9c7093d..6b1ae55 100644
--- a/ntpd/refclock_chu.c
+++ b/ntpd/refclock_chu.c
@@ -967,15 +967,11 @@ chu_serial_receive(
struct recvbuf *rbufp /* receive buffer structure pointer */
)
{
- struct chuunit *up;
- struct refclockproc *pp;
struct peer *peer;
u_char *dpt; /* receive buffer pointer */
peer = rbufp->recv_peer;
- pp = peer->procptr;
- up = pp->unitptr;
dpt = (u_char *)&rbufp->recv_space;
chu_decode(peer, *dpt, rbufp->recv_time);
diff --git a/ntpd/refclock_gpsdjson.c b/ntpd/refclock_gpsdjson.c
index 6150982..2171a4f 100644
--- a/ntpd/refclock_gpsdjson.c
+++ b/ntpd/refclock_gpsdjson.c
@@ -52,7 +52,7 @@
#if defined(HAVE_SYS_POLL_H)
# include <sys/poll.h>
-#elif defined(HAVE_SYS_SLECET_H)
+#elif defined(HAVE_SYS_SELECT_H)
# include <sys/select.h>
#else
# error need poll() or select()
@@ -204,8 +204,8 @@ static int syslogok(clockprocT * const pp, gpsd_unitT * const up);
* data and selecting the GPS device name we created from our unit
* number. [Note: This is a format string!]
*/
-static const char * s_logon =
- "?WATCH={\"enable\":true,\"json\":true,\"device\":\"%s\"};\r\n";
+#define s_logon \
+ "?WATCH={\"enable\":true,\"json\":true,\"device\":\"%s\"};\r\n"
/* We keep a static list of network addresses for 'localhost:gpsd', and
* we try to connect to them in round-robin fashion.
@@ -854,7 +854,7 @@ process_tpv(
const char * gps_time;
int gps_mode;
double ept, epp, epx, epy, epv;
- int log2;
+ int xlog2;
gps_mode = (int)json_object_lookup_int_default(
jctx, 0, "mode", 0);
@@ -920,9 +920,9 @@ process_tpv(
ept = min(ept, epp );
ept = min(ept, 0.5 );
ept = max(ept, 1.0-9);
- ept = frexp(ept, &log2);
+ ept = frexp(ept, &xlog2);
- peer->precision = log2;
+ peer->precision = xlog2;
}
/* ------------------------------------------------------------------ */
@@ -1270,7 +1270,7 @@ convert_ascii_time(
ep = strptime(gps_time, "%Y-%m-%dT%H:%M:%S", &gd);
if (*ep == '.') {
dw = 100000000;
- while (isdigit(*++ep)) {
+ while (isdigit((unsigned char)*++ep)) {
ts.tv_nsec += (*ep - '0') * dw;
dw /= 10;
}
diff --git a/ntpd/refclock_heath.c b/ntpd/refclock_heath.c
index 435d8f6..aed056c 100644
--- a/ntpd/refclock_heath.c
+++ b/ntpd/refclock_heath.c
@@ -379,7 +379,7 @@ heath_receive(
/*
* Determine synchronization and last update
*/
- if (!isdigit((int)dsec))
+ if (!isdigit((unsigned char)dsec))
pp->leap = LEAP_NOTINSYNC;
else {
pp->nsec = (dsec - '0') * 100000000;
diff --git a/ntpd/refclock_hpgps.c b/ntpd/refclock_hpgps.c
index 1d26d25..0b45fc7 100644
--- a/ntpd/refclock_hpgps.c
+++ b/ntpd/refclock_hpgps.c
@@ -156,7 +156,7 @@ hpgps_start(
register struct hpgpsunit *up;
struct refclockproc *pp;
int fd;
- int ldisc;
+ int speed, ldisc;
char device[20];
/*
@@ -165,10 +165,13 @@ hpgps_start(
*/
snprintf(device, sizeof(device), DEVICE, unit);
ldisc = LDISC_CLK;
+ speed = SPEED232;
/* mode parameter to server config line shares ttl slot */
- if (1 == peer->ttl)
+ if (1 == peer->ttl) {
ldisc |= LDISC_7O1;
- fd = refclock_open(device, SPEED232Z, ldisc);
+ speed = SPEED232Z;
+ }
+ fd = refclock_open(device, speed, ldisc);
if (fd <= 0)
return (0);
/*
diff --git a/ntpd/refclock_irig.c b/ntpd/refclock_irig.c
index 46c01fb..abc94f6 100644
--- a/ntpd/refclock_irig.c
+++ b/ntpd/refclock_irig.c
@@ -762,7 +762,7 @@ irig_baud(
* persist for lots of samples.
*/
up->exing = -up->yxing;
- if (fabs(up->envxing - up->envphase) <= 1) {
+ if (abs(up->envxing - up->envphase) <= 1) {
up->tcount++;
if (up->tcount > 20 * up->tc) {
up->tc++;
@@ -980,10 +980,8 @@ irig_poll(
)
{
struct refclockproc *pp;
- struct irigunit *up;
pp = peer->procptr;
- up = pp->unitptr;
if (pp->coderecv == pp->codeproc) {
refclock_report(peer, CEVNT_TIMEOUT);
diff --git a/ntpd/refclock_jjy.c b/ntpd/refclock_jjy.c
index d8ec6b7..e279ee3 100644
--- a/ntpd/refclock_jjy.c
+++ b/ntpd/refclock_jjy.c
@@ -297,9 +297,9 @@ struct refclock refclock_jjy = {
static struct
{
- char commandNumber ;
- char *commandLog ;
- char *command ;
+ const char commandNumber ;
+ const char *commandLog ;
+ const char *command ;
int commandLength ;
} tristate_jjy01_command_sequence[] =
{
@@ -337,8 +337,8 @@ static struct
static struct
{
char commandNumber ;
- char *commandLog ;
- char *command ;
+ const char *commandLog ;
+ const char *command ;
int commandLength ;
} tristate_gpsclock01_command_sequence[] =
{
@@ -741,7 +741,7 @@ static int
jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_tristate_jjy01" ;
+ static const char *sFunctionName = "jjy_receive_tristate_jjy01" ;
#endif
struct jjyunit *up ;
@@ -756,7 +756,7 @@ jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
char sLogText [ MAX_LOGTEXT ], sReplyText [ MAX_LOGTEXT ] ;
- char *pCmd ;
+ const char *pCmd ;
int iCmdLen ;
/*
@@ -930,7 +930,7 @@ static int
jjy_receive_cdex_jst2000 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_cdex_jst2000" ;
+ static const char *sFunctionName = "jjy_receive_cdex_jst2000" ;
#endif
struct jjyunit *up ;
@@ -1010,7 +1010,7 @@ static int
jjy_receive_echokeisokuki_lt2000 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_echokeisokuki_lt2000" ;
+ static const char *sFunctionName = "jjy_receive_echokeisokuki_lt2000" ;
#endif
struct jjyunit *up ;
@@ -1052,7 +1052,7 @@ jjy_receive_echokeisokuki_lt2000 ( struct recvbuf *rbufp )
if ( up->operationmode == 1 ) {
#ifdef DEBUG
if ( debug ) {
- printf ( "%s (refclock_jjy.c) : send '#'\n", sFunctionName ) ;
+ printf ( "%s (refclock_jjy.c) : send '#'\n", __func__ ) ;
}
#endif
if ( write ( pp->io.fd, "#",1 ) != 1 ) {
@@ -1169,7 +1169,7 @@ static int
jjy_receive_citizentic_jjy200 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_citizentic_jjy200" ;
+ static const char *sFunctionName = "jjy_receive_citizentic_jjy200" ;
#endif
struct jjyunit *up ;
@@ -1264,7 +1264,7 @@ static int
jjy_receive_tristate_gpsclock01 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_tristate_gpsclock01" ;
+ static const char *sFunctionName = "jjy_receive_tristate_gpsclock01" ;
#endif
struct jjyunit *up ;
@@ -1279,7 +1279,7 @@ jjy_receive_tristate_gpsclock01 ( struct recvbuf *rbufp )
char sLogText [ MAX_LOGTEXT ], sReplyText [ MAX_LOGTEXT ] ;
- char *pCmd ;
+ const char *pCmd ;
int iCmdLen ;
/*
@@ -1519,13 +1519,13 @@ static void
jjy_poll_tristate_jjy01 ( int unit, struct peer *peer )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_poll_tristate_jjy01" ;
+ static const char *sFunctionName = "jjy_poll_tristate_jjy01" ;
#endif
struct jjyunit *up;
struct refclockproc *pp;
- char *pCmd ;
+ const char *pCmd ;
int iCmdLen ;
pp = peer->procptr;
@@ -1641,13 +1641,13 @@ static void
jjy_poll_tristate_gpsclock01 ( int unit, struct peer *peer )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_poll_tristate_gpsclock01" ;
+ static const char *sFunctionName = "jjy_poll_tristate_gpsclock01" ;
#endif
struct jjyunit *up;
struct refclockproc *pp;
- char *pCmd ;
+ const char *pCmd ;
int iCmdLen ;
pp = peer->procptr;
@@ -1690,7 +1690,7 @@ jjy_poll_tristate_gpsclock01 ( int unit, struct peer *peer )
static void
printableString ( char *sOutput, int iOutputLen, char *sInput, int iInputLen )
{
- char *printableControlChar[] = {
+ const char *printableControlChar[] = {
"<NUL>", "<SOH>", "<STX>", "<ETX>",
"<EOT>", "<ENQ>", "<ACK>", "<BEL>",
"<BS>" , "<HT>" , "<LF>" , "<VT>" ,
@@ -1700,16 +1700,15 @@ printableString ( char *sOutput, int iOutputLen, char *sInput, int iInputLen )
"<CAN>", "<EM>" , "<SUB>", "<ESC>",
"<FS>" , "<GS>" , "<RS>" , "<US>" ,
" " } ;
+
+ size_t i, j, n ;
size_t InputLen;
size_t OutputLen;
- size_t i;
- size_t j;
- size_t n;
InputLen = (size_t)iInputLen;
OutputLen = (size_t)iOutputLen;
for ( i = j = 0 ; i < InputLen && j < OutputLen ; i ++ ) {
- if ( isprint( sInput[i] ) ) {
+ if ( isprint( (unsigned char)sInput[i] ) ) {
n = 1 ;
if ( j + 1 >= OutputLen )
break ;
@@ -1732,7 +1731,7 @@ printableString ( char *sOutput, int iOutputLen, char *sInput, int iInputLen )
j += n ;
}
- sOutput[min(j, iOutputLen - 1)] = '\0' ;
+ sOutput[min(j, (size_t)iOutputLen - 1)] = '\0' ;
}
diff --git a/ntpd/refclock_jupiter.c b/ntpd/refclock_jupiter.c
index 377fc56..02b33df 100644
--- a/ntpd/refclock_jupiter.c
+++ b/ntpd/refclock_jupiter.c
@@ -136,8 +136,8 @@ static int jupiter_config (struct instance *);
static void jupiter_debug (struct peer *, const char *,
const char *, ...)
__attribute__ ((format (printf, 3, 4)));
-static char * jupiter_parse_t (struct instance *, u_short *);
-static char * jupiter_parse_gpos (struct instance *, u_short *);
+static const char * jupiter_parse_t (struct instance *, u_short *);
+static const char * jupiter_parse_gpos (struct instance *, u_short *);
static void jupiter_platform (struct instance *, u_int);
static void jupiter_poll (int, struct peer *);
static void jupiter_control (int, const struct refclockstat *,
@@ -275,7 +275,7 @@ jupiter_shutdown(int unit, struct peer *peer)
static int
jupiter_config(struct instance *instance)
{
- jupiter_debug(instance->peer, "jupiter_config", "init receiver");
+ jupiter_debug(instance->peer, __func__, "init receiver");
/*
* Initialize the unit variables
@@ -283,8 +283,7 @@ jupiter_config(struct instance *instance)
instance->sloppyclockflag = instance->peer->procptr->sloppyclockflag;
instance->moving = !!(instance->sloppyclockflag & CLK_FLAG2);
if (instance->moving)
- jupiter_debug(instance->peer, "jupiter_config",
- "mobile platform");
+ jupiter_debug(instance->peer, __func__, "mobile platform");
instance->pollcnt = 2;
instance->polled = 0;
@@ -368,7 +367,7 @@ jupiter_ppsapi(
#if DEBUG
if (debug) {
time_pps_getparams(instance->pps_handle, &instance->pps_params);
- jupiter_debug(instance->peer, "refclock_jupiter",
+ jupiter_debug(instance->peer, __func__,
"pps capability 0x%x version %d mode 0x%x kern %d",
capability, instance->pps_params.api_version,
instance->pps_params.mode, instance->hardpps);
@@ -498,8 +497,7 @@ jupiter_control(
instance->sloppyclockflag = pp->sloppyclockflag;
if ((instance->sloppyclockflag & CLK_FLAG2) !=
(sloppyclockflag & CLK_FLAG2)) {
- jupiter_debug(peer,
- "jupiter_control",
+ jupiter_debug(peer, __func__,
"mode switch: reset receiver");
jupiter_config(instance);
return;
@@ -513,10 +511,11 @@ jupiter_control(
static void
jupiter_receive(struct recvbuf *rbufp)
{
- int bpcnt, cc, size, ppsret;
+ size_t bpcnt;
+ int cc, size, ppsret;
time_t last_timecode;
u_int32 laststime;
- char *cp;
+ const char *cp;
u_char *bp;
u_short *sp;
struct jid *ip;
@@ -535,7 +534,7 @@ jupiter_receive(struct recvbuf *rbufp)
bpcnt = rbufp->recv_length;
/* This shouldn't happen */
- if (bpcnt > (int)sizeof(instance->sbuf) - instance->ssize)
+ if (bpcnt > sizeof(instance->sbuf) - instance->ssize)
bpcnt = sizeof(instance->sbuf) - instance->ssize;
/* Append to input buffer */
@@ -543,7 +542,7 @@ jupiter_receive(struct recvbuf *rbufp)
instance->ssize += bpcnt;
/* While there's at least a header and we parse an intact message */
- while (instance->ssize > sizeof(*hp) && (cc = jupiter_recv(instance)) > 0) {
+ while (instance->ssize > (int)sizeof(*hp) && (cc = jupiter_recv(instance)) > 0) {
instance->pollcnt = 2;
tstamp = rbufp->recv_time;
@@ -554,8 +553,8 @@ jupiter_receive(struct recvbuf *rbufp)
case JUPITER_O_PULSE:
if (size != sizeof(struct jpulse)) {
- jupiter_debug(peer,
- "jupiter_receive", "pulse: len %d != %u",
+ jupiter_debug(peer, __func__,
+ "pulse: len %d != %u",
size, (int)sizeof(struct jpulse));
refclock_report(peer, CEVNT_BADREPLY);
break;
@@ -574,7 +573,7 @@ jupiter_receive(struct recvbuf *rbufp)
laststime = instance->stime;
instance->stime = DS2UI(((struct jpulse *)sp)->stime);
if (laststime != 0 && instance->stime - laststime <= 21) {
- jupiter_debug(peer, "jupiter_receive",
+ jupiter_debug(peer, __func__,
"avoided firmware bug (stime %.2f, laststime %.2f)",
(double)instance->stime * 0.01, (double)laststime * 0.01);
break;
@@ -595,8 +594,8 @@ jupiter_receive(struct recvbuf *rbufp)
/* Parse timecode (even when there's no pps) */
last_timecode = instance->timecode;
if ((cp = jupiter_parse_t(instance, sp)) != NULL) {
- jupiter_debug(peer,
- "jupiter_receive", "pulse: %s", cp);
+ jupiter_debug(peer, __func__,
+ "pulse: %s", cp);
break;
}
@@ -645,24 +644,24 @@ jupiter_receive(struct recvbuf *rbufp)
case JUPITER_O_GPOS:
if (size != sizeof(struct jgpos)) {
- jupiter_debug(peer,
- "jupiter_receive", "gpos: len %d != %u",
+ jupiter_debug(peer, __func__,
+ "gpos: len %d != %u",
size, (int)sizeof(struct jgpos));
refclock_report(peer, CEVNT_BADREPLY);
break;
}
if ((cp = jupiter_parse_gpos(instance, sp)) != NULL) {
- jupiter_debug(peer,
- "jupiter_receive", "gpos: %s", cp);
+ jupiter_debug(peer, __func__,
+ "gpos: %s", cp);
break;
}
break;
case JUPITER_O_ID:
if (size != sizeof(struct jid)) {
- jupiter_debug(peer,
- "jupiter_receive", "id: len %d != %u",
+ jupiter_debug(peer, __func__,
+ "id: len %d != %u",
size, (int)sizeof(struct jid));
refclock_report(peer, CEVNT_BADREPLY);
break;
@@ -672,8 +671,8 @@ jupiter_receive(struct recvbuf *rbufp)
* just powered instance, it needs to be reconfigured.
*/
ip = (struct jid *)sp;
- jupiter_debug(peer,
- "jupiter_receive", "%s chan ver %s, %s (%s)",
+ jupiter_debug(peer, __func__,
+ "%s chan ver %s, %s (%s)",
ip->chans, ip->vers, ip->date, ip->opts);
msyslog(LOG_DEBUG,
"jupiter_receive: %s chan ver %s, %s (%s)",
@@ -681,8 +680,7 @@ jupiter_receive(struct recvbuf *rbufp)
if (instance->wantid)
instance->wantid = 0;
else {
- jupiter_debug(peer,
- "jupiter_receive", "reset receiver");
+ jupiter_debug(peer, __func__, "reset receiver");
jupiter_config(instance);
/*
* Restore since jupiter_config() just
@@ -693,8 +691,7 @@ jupiter_receive(struct recvbuf *rbufp)
break;
default:
- jupiter_debug(peer,
- "jupiter_receive", "unknown message id %d",
+ jupiter_debug(peer, __func__, "unknown message id %d",
getshort(hp->id));
break;
}
@@ -707,7 +704,7 @@ jupiter_receive(struct recvbuf *rbufp)
}
}
-static char *
+static const char *
jupiter_parse_t(struct instance *instance, u_short *sp)
{
struct tm *tm;
@@ -757,8 +754,8 @@ jupiter_parse_t(struct instance *instance, u_short *sp)
}
else if (sweek == 0 && instance->lastsweek == WEEKSECS - 1) {
++instance->gweek;
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "NEW gps week %u", instance->gweek);
+ jupiter_debug(instance->peer, __func__,
+ "NEW gps week %u", instance->gweek);
}
/*
@@ -774,14 +771,14 @@ jupiter_parse_t(struct instance *instance, u_short *sp)
* Then we warped.
*/
if (instance->lastsweek == sweek)
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "gps sweek not incrementing (%d)",
+ jupiter_debug(instance->peer, __func__,
+ "gps sweek not incrementing (%d)",
sweek);
else if (instance->lastsweek != 2 * WEEKSECS &&
instance->lastsweek + 1 != sweek &&
!(sweek == 0 && instance->lastsweek == WEEKSECS - 1))
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "gps sweek jumped (was %d, now %d)",
+ jupiter_debug(instance->peer, __func__,
+ "gps sweek jumped (was %d, now %d)",
instance->lastsweek, sweek);
instance->lastsweek = sweek;
@@ -792,16 +789,16 @@ jupiter_parse_t(struct instance *instance, u_short *sp)
if (last_timecode == 0)
/* XXX debugging */
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "UTC <none> (gweek/sweek %u/%u)",
+ jupiter_debug(instance->peer, __func__,
+ "UTC <none> (gweek/sweek %u/%u)",
instance->gweek, sweek);
else {
/* XXX debugging */
tm = gmtime(&last_timecode);
cp = asctime(tm);
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "UTC %.24s (gweek/sweek %u/%u)",
+ jupiter_debug(instance->peer, __func__,
+ "UTC %.24s (gweek/sweek %u/%u)",
cp, instance->gweek, sweek);
/* Billboard last_timecode (which is now the current time) */
@@ -829,7 +826,7 @@ jupiter_parse_t(struct instance *instance, u_short *sp)
return (NULL);
}
-static char *
+static const char *
jupiter_parse_gpos(struct instance *instance, u_short *sp)
{
struct jgpos *jg;
@@ -861,8 +858,8 @@ jupiter_parse_gpos(struct instance *instance, u_short *sp)
tm = gmtime(&t);
cp = asctime(tm);
- jupiter_debug(instance->peer,
- "jupiter_parse_g", "GPS %.24s (gweek/sweek %u/%u)",
+ jupiter_debug(instance->peer, __func__,
+ "GPS %.24s (gweek/sweek %u/%u)",
cp, instance->gpos_gweek, instance->gpos_sweek);
return (NULL);
}
@@ -903,7 +900,7 @@ static char *
jupiter_send(struct instance *instance, struct jheader *hp)
{
u_int len, size;
- int cc;
+ ssize_t cc;
u_short *sp;
static char errstr[132];
@@ -921,7 +918,7 @@ jupiter_send(struct instance *instance, struct jheader *hp)
msnprintf(errstr, sizeof(errstr), "write: %m");
return (errstr);
} else if (cc != (int)size) {
- snprintf(errstr, sizeof(errstr), "short write (%d != %u)", cc, size);
+ snprintf(errstr, sizeof(errstr), "short write (%zd != %u)", cc, size);
return (errstr);
}
return (NULL);
@@ -954,7 +951,7 @@ jupiter_reqmsg(struct instance *instance, u_int id,
rp->trigger = putshort(interval == 0);
rp->interval = putshort(interval);
if ((cp = jupiter_send(instance, hp)) != NULL)
- jupiter_debug(instance->peer, "jupiter_reqmsg", "%u: %s", id, cp);
+ jupiter_debug(instance->peer, __func__, "%u: %s", id, cp);
}
/* Cancel periodic message output */
@@ -973,7 +970,7 @@ jupiter_canmsg(struct instance *instance, u_int id)
hp = &canmsg;
hp->id = putshort(id);
if ((cp = jupiter_send(instance, hp)) != NULL)
- jupiter_debug(instance->peer, "jupiter_canmsg", "%u: %s", id, cp);
+ jupiter_debug(instance->peer, __func__, "%u: %s", id, cp);
}
/* Request a single message output */
@@ -992,7 +989,7 @@ jupiter_reqonemsg(struct instance *instance, u_int id)
hp = &reqonemsg;
hp->id = putshort(id);
if ((cp = jupiter_send(instance, hp)) != NULL)
- jupiter_debug(instance->peer, "jupiter_reqonemsg", "%u: %s", id, cp);
+ jupiter_debug(instance->peer, __func__, "%u: %s", id, cp);
}
/* Set the platform dynamics */
@@ -1017,7 +1014,7 @@ jupiter_platform(struct instance *instance, u_int platform)
pp = &platmsg.jplat;
pp->platform = putshort(platform);
if ((cp = jupiter_send(instance, hp)) != NULL)
- jupiter_debug(instance->peer, "jupiter_platform", "%u: %s", platform, cp);
+ jupiter_debug(instance->peer, __func__, "%u: %s", platform, cp);
}
/* Checksum "len" shorts */
@@ -1054,13 +1051,14 @@ jupiter_recv(struct instance *instance)
hp = (struct jheader *)sp;
if (getshort(hp->sync) != JUPITER_SYNC) {
/* Wasn't at the front, sync up */
- jupiter_debug(instance->peer, "jupiter_recv", "syncing");
+ jupiter_debug(instance->peer, __func__, "syncing");
bp = (u_char *)sp;
n = size;
while (n >= 2) {
if (bp[0] != (JUPITER_SYNC & 0xff)) {
/*
- jupiter_debug(instance->peer, "{0x%x}", bp[0]);
+ jupiter_debug(instance->peer, __func__,
+ "{0x%x}", bp[0]);
*/
++bp;
--n;
@@ -1069,13 +1067,14 @@ jupiter_recv(struct instance *instance)
if (bp[1] == ((JUPITER_SYNC >> 8) & 0xff))
break;
/*
- jupiter_debug(instance->peer, "{0x%x 0x%x}", bp[0], bp[1]);
+ jupiter_debug(instance->peer, __func__,
+ "{0x%x 0x%x}", bp[0], bp[1]);
*/
bp += 2;
n -= 2;
}
/*
- jupiter_debug(instance->peer, "\n");
+ jupiter_debug(instance->peer, __func__, "\n");
*/
/* Shuffle data to front of input buffer */
if (n > 0)
@@ -1088,7 +1087,7 @@ jupiter_recv(struct instance *instance)
if (jupiter_cksum(sp, (cc / sizeof(u_short) - 1)) !=
getshort(hp->hsum)) {
- jupiter_debug(instance->peer, "jupiter_recv", "bad header checksum!");
+ jupiter_debug(instance->peer, __func__, "bad header checksum!");
/* This is drastic but checksum errors should be rare */
instance->ssize = 0;
return (0);
@@ -1106,7 +1105,7 @@ jupiter_recv(struct instance *instance)
sp = (u_short *)(hp + 1);
if (jupiter_cksum(sp, len) != getshort(sp[len])) {
jupiter_debug(instance->peer,
- "jupiter_recv", "bad payload checksum!");
+ __func__, "bad payload checksum!");
/* This is drastic but checksum errors should be rare */
instance->ssize = 0;
return (0);
diff --git a/ntpd/refclock_neoclock4x.c b/ntpd/refclock_neoclock4x.c
index a0067e9..6fda0f0 100644
--- a/ntpd/refclock_neoclock4x.c
+++ b/ntpd/refclock_neoclock4x.c
@@ -143,7 +143,7 @@ static void neol_jdn_to_ymd (unsigned long, int *, int *, int *);
static void neol_localtime (unsigned long, int* , int*, int*, int*, int*, int*);
static unsigned long neol_mktime (int, int, int, int, int, int);
#if !defined(NEOCLOCK4X_FIRMWARE)
-static int neol_query_firmware (int, int, char *, int);
+static int neol_query_firmware (int, int, char *, size_t);
static int neol_check_firmware (int, const char*, char *);
#endif
@@ -785,9 +785,9 @@ neol_hexatoi_len(const char str[],
int i;
int n = 0;
- for(i=0; isxdigit((int)str[i]) && i < maxlen; i++)
+ for(i=0; isxdigit((unsigned char)str[i]) && i < maxlen; i++)
{
- hexdigit = isdigit((int)str[i]) ? toupper(str[i]) - '0' : toupper(str[i]) - 'A' + 10;
+ hexdigit = isdigit((unsigned char)str[i]) ? toupper((unsigned char)str[i]) - '0' : toupper((unsigned char)str[i]) - 'A' + 10;
n = 16 * n + hexdigit;
}
*result = n;
@@ -803,7 +803,7 @@ neol_atoi_len(const char str[],
int i;
int n = 0;
- for(i=0; isdigit((int)str[i]) && i < maxlen; i++)
+ for(i=0; isdigit((unsigned char)str[i]) && i < maxlen; i++)
{
digit = str[i] - '0';
n = 10 * n + digit;
@@ -898,10 +898,10 @@ static int
neol_query_firmware(int fd,
int unit,
char *firmware,
- int maxlen)
+ size_t maxlen)
{
char tmpbuf[256];
- int len;
+ size_t len;
int lastsearch;
unsigned char c;
int last_c_was_crlf;
@@ -1001,7 +1001,7 @@ neol_query_firmware(int fd,
tmpbuf[len++] = (char) c;
}
tmpbuf[len] = '\0';
- if(len > sizeof(tmpbuf)-5)
+ if (len > sizeof(tmpbuf)-5)
break;
}
}
diff --git a/ntpd/refclock_nmea.c b/ntpd/refclock_nmea.c
index 58867f4..126b530 100644
--- a/ntpd/refclock_nmea.c
+++ b/ntpd/refclock_nmea.c
@@ -29,6 +29,9 @@
#include <sys/stat.h>
#include <stdio.h>
#include <ctype.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
#include "ntpd.h"
#include "ntp_io.h"
@@ -311,7 +314,7 @@ static int unfold_century (struct calendar * jd, u_int32 rec_ui);
static int gpsfix_century (struct calendar * jd, const gps_weektm * wd,
u_short * ccentury);
static l_fp eval_gps_time (struct peer * peer, const struct calendar * gpst,
- const struct timespec * gpso, const l_fp * recv);
+ const struct timespec * gpso, const l_fp * xrecv);
static int nmead_open (const char * device);
static void save_ltc (struct refclockproc * const, const char * const,
@@ -406,7 +409,7 @@ nmea_start(
size_t devlen;
u_int32 rate;
int baudrate;
- char * baudtext;
+ const char * baudtext;
/* Get baudrate choice from mode byte bits 4/5/6 */
@@ -1145,7 +1148,7 @@ nmea_poll(
*/
if (peer->ttl & NMEA_EXTLOG_MASK) {
/* Log & reset counters with extended logging */
- char *nmea = pp->a_lastcode;
+ const char *nmea = pp->a_lastcode;
if (*nmea == '\0') nmea = "(none)";
mprintf_clock_stats(
&peer->srcadr, "%s %u %u %u %u %u %u",
@@ -1779,7 +1782,7 @@ eval_gps_time(
struct peer * peer, /* for logging etc */
const struct calendar * gpst, /* GPS time stamp */
const struct timespec * tofs, /* GPS frac second & offset */
- const l_fp * recv /* receive time stamp */
+ const l_fp * xrecv /* receive time stamp */
)
{
struct refclockproc * const pp = peer->procptr;
@@ -1835,7 +1838,7 @@ eval_gps_time(
}
/* - get unfold base: day of full recv time - 512 weeks */
- vi64 = ntpcal_ntp_to_ntp(recv->l_ui, NULL);
+ vi64 = ntpcal_ntp_to_ntp(xrecv->l_ui, NULL);
rs64 = ntpcal_daysplit(&vi64);
rcv_sec = rs64.lo;
rcv_day = rs64.hi - 512 * 7;
@@ -1845,7 +1848,7 @@ eval_gps_time(
* fractional day of the receive time, we shift the base day for
* the unfold by 1. */
if ( gps_sec < rcv_sec
- || (gps_sec == rcv_sec && retv.l_uf < recv->l_uf))
+ || (gps_sec == rcv_sec && retv.l_uf < xrecv->l_uf))
rcv_day += 1;
/* - don't warp ahead of GPS invention! */
diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c
index 3bc60bf..30924b8 100644
--- a/ntpd/refclock_oncore.c
+++ b/ntpd/refclock_oncore.c
@@ -328,7 +328,7 @@ struct instance {
u_char printed;
u_char polled;
u_long ev_serial;
- int Rcvptr;
+ unsigned Rcvptr;
u_char Rcvbuf[500];
u_char BEHa[160]; /* Ba, Ea or Ha */
u_char BEHn[80]; /* Bn , En , or Hn */
@@ -436,47 +436,47 @@ static struct msg_desc {
int shmem;
} oncore_messages[] = {
/* Ea and En first since they're most common */
- { "Ea", 76, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdimsdimsdsC" },
- { "Ba", 68, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdsC" },
- { "Ha", 154, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmaaaaoooohhhhmmmmVVvvhhddntimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddssrrccooooTTushmvvvvvvC" },
- { "Bn", 59, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffC" },
- { "En", 69, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffsffffsffffC" },
- { "Hn", 78, oncore_msg_BnEnHn, "" },
- { "Ab", 10, 0, "" },
- { "Ac", 11, 0, "" },
- { "Ad", 11, oncore_msg_Adef, "" },
- { "Ae", 11, oncore_msg_Adef, "" },
- { "Af", 15, oncore_msg_Adef, "" },
- { "Ag", 8, oncore_msg_Ag, "" }, /* Satellite mask angle */
- { "As", 20, oncore_msg_As, "" },
- { "At", 8, oncore_msg_At, "" },
- { "Au", 12, 0, "" },
- { "Av", 8, 0, "" },
- { "Aw", 8, 0, "" },
- { "Ay", 11, oncore_msg_Ay, "" },
- { "Az", 11, oncore_msg_Az, "" },
- { "AB", 8, 0, "" },
- { "Bb", 92, 0, "" },
- { "Bd", 23, oncore_msg_Bd, "" },
- { "Bj", 8, oncore_msg_Bj, "" },
- { "Bl", 41, oncore_msg_Bl, "" },
- { "Ca", 9, oncore_msg_CaFaIa, "" },
- { "Cb", 33, oncore_msg_Cb, "" },
- { "Cf", 7, oncore_msg_Cf, "" },
- { "Cg", 8, 0, "" },
- { "Ch", 9, 0, "" },
- { "Cj", 294, oncore_msg_Cj, "" },
- { "Ek", 71, 0, "" },
- { "Fa", 9, oncore_msg_CaFaIa, "" },
- { "Ga", 20, oncore_msg_Ga, "" },
- { "Gb", 17, oncore_msg_Gb, "" },
- { "Gc", 8, oncore_msg_Gc, "" },
- { "Gd", 8, 0, "" },
- { "Ge", 8, 0, "" },
- { "Gj", 21, oncore_msg_Gj, "" },
- { "Ia", 10, oncore_msg_CaFaIa, "" },
- { "Sz", 8, oncore_msg_Sz, "" },
- { {0}, 7, 0, "" }
+ { "Ea", 76, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdimsdimsdsC", 0 },
+ { "Ba", 68, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdsC", 0 },
+ { "Ha", 154, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmaaaaoooohhhhmmmmVVvvhhddntimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddssrrccooooTTushmvvvvvvC", 0 },
+ { "Bn", 59, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffC", 0 },
+ { "En", 69, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffsffffsffffC", 0 },
+ { "Hn", 78, oncore_msg_BnEnHn, "", 0 },
+ { "Ab", 10, 0, "", 0 },
+ { "Ac", 11, 0, "", 0 },
+ { "Ad", 11, oncore_msg_Adef, "", 0 },
+ { "Ae", 11, oncore_msg_Adef, "", 0 },
+ { "Af", 15, oncore_msg_Adef, "", 0 },
+ { "Ag", 8, oncore_msg_Ag, "", 0 }, /* Satellite mask angle */
+ { "As", 20, oncore_msg_As, "", 0 },
+ { "At", 8, oncore_msg_At, "", 0 },
+ { "Au", 12, 0, "", 0 },
+ { "Av", 8, 0, "", 0 },
+ { "Aw", 8, 0, "", 0 },
+ { "Ay", 11, oncore_msg_Ay, "", 0 },
+ { "Az", 11, oncore_msg_Az, "", 0 },
+ { "AB", 8, 0, "", 0 },
+ { "Bb", 92, 0, "", 0 },
+ { "Bd", 23, oncore_msg_Bd, "", 0 },
+ { "Bj", 8, oncore_msg_Bj, "", 0 },
+ { "Bl", 41, oncore_msg_Bl, "", 0 },
+ { "Ca", 9, oncore_msg_CaFaIa, "", 0 },
+ { "Cb", 33, oncore_msg_Cb, "", 0 },
+ { "Cf", 7, oncore_msg_Cf, "", 0 },
+ { "Cg", 8, 0, "", 0 },
+ { "Ch", 9, 0, "", 0 },
+ { "Cj", 294, oncore_msg_Cj, "", 0 },
+ { "Ek", 71, 0, "", 0 },
+ { "Fa", 9, oncore_msg_CaFaIa, "", 0 },
+ { "Ga", 20, oncore_msg_Ga, "", 0 },
+ { "Gb", 17, oncore_msg_Gb, "", 0 },
+ { "Gc", 8, oncore_msg_Gc, "", 0 },
+ { "Gd", 8, 0, "", 0 },
+ { "Ge", 8, 0, "", 0 },
+ { "Gj", 21, oncore_msg_Gj, "", 0 },
+ { "Ia", 10, oncore_msg_CaFaIa, "", 0 },
+ { "Sz", 8, oncore_msg_Sz, "", 0 },
+ { {0}, 7, 0, "", 0 }
};
@@ -848,7 +848,7 @@ oncore_ppsapi(
)
{
int cap, mode, mode1;
- char *cp;
+ const char *cp;
if (time_pps_getcap(instance->pps_h, &cap) < 0) {
oncore_log_f(instance, LOG_ERR, "time_pps_getcap failed: %m");
@@ -932,11 +932,11 @@ oncore_init_shmem(
struct instance *instance
)
{
- int i, l, n, fd, shmem_old_size, n1;
+ int l, fd;
u_char *cp, *cp1, *buf, *shmem_old;
struct msg_desc *mp;
struct stat sbuf;
- size_t shmem_length;
+ size_t i, n, n1, shmem_length, shmem_old_size;
/*
* The first thing we do is see if there is an instance->shmem_fname file (still)
@@ -1210,8 +1210,9 @@ oncore_read_config(
*/
FILE *fd;
- char *cp, *cc, *ca, line[100], units[2], device[64], **cpp;
- char *dirs[] = { "/etc/ntp", "/etc", 0 };
+ char *cc, *ca, line[100], units[2], device[64];
+ const char *dirs[] = { "/etc/ntp", "/etc", 0 };
+ const char *cp, **cpp;
int i, sign, lat_flg, long_flg, ht_flg, mode, mask;
double f1, f2, f3;
@@ -1239,19 +1240,20 @@ oncore_read_config(
mode = mask = 0;
lat_flg = long_flg = ht_flg = 0;
while (fgets(line, 100, fd)) {
+ char *cpw;
/* Remove comments */
- if ((cp = strchr(line, '#')))
- *cp = '\0';
+ if ((cpw = strchr(line, '#')))
+ *cpw = '\0';
/* Remove trailing space */
for (i = strlen(line);
- i > 0 && isascii((int)line[i - 1]) && isspace((int)line[i - 1]);
+ i > 0 && isascii((unsigned char)line[i - 1]) && isspace((unsigned char)line[i - 1]);
)
line[--i] = '\0';
/* Remove leading space */
- for (cc = line; *cc && isascii((int)*cc) && isspace((int)*cc); cc++)
+ for (cc = line; *cc && isascii((unsigned char)*cc) && isspace((unsigned char)*cc); cc++)
continue;
/* Stop if nothing left */
@@ -1260,16 +1262,16 @@ oncore_read_config(
/* Uppercase the command and find the arg */
for (ca = cc; *ca; ca++) {
- if (isascii((int)*ca)) {
- if (islower((int)*ca)) {
- *ca = toupper(*ca);
- } else if (isspace((int)*ca) || (*ca == '='))
+ if (isascii((unsigned char)*ca)) {
+ if (islower((unsigned char)*ca)) {
+ *ca = toupper((unsigned char)*ca);
+ } else if (isspace((unsigned char)*ca) || (*ca == '='))
break;
}
}
/* Remove space (and possible =) leading the arg */
- for (; *ca && isascii((int)*ca) && (isspace((int)*ca) || (*ca == '=')); ca++)
+ for (; *ca && isascii((unsigned char)*ca) && (isspace((unsigned char)*ca) || (*ca == '=')); ca++)
continue;
if (!strncmp(cc, "STATUS", (size_t) 6) || !strncmp(cc, "SHMEM", (size_t) 5)) {
@@ -1278,9 +1280,9 @@ oncore_read_config(
}
/* Uppercase argument as well */
- for (cp = ca; *cp; cp++)
- if (isascii((int)*cp) && islower((int)*cp))
- *cp = toupper(*cp);
+ for (cpw = ca; *cpw; cpw++)
+ if (isascii((unsigned char)*cpw) && islower((unsigned char)*cpw))
+ *cpw = toupper((unsigned char)*cpw);
if (!strncmp(cc, "LAT", (size_t) 3)) {
f1 = f2 = f3 = 0;
@@ -1477,8 +1479,7 @@ oncore_consume(
struct instance *instance
)
{
- int i, m;
- unsigned l;
+ unsigned i, m, l;
while (rcvptr >= 7) {
if (rcvbuf[0] != '@' || rcvbuf[1] != '@') {
@@ -1984,7 +1985,7 @@ oncore_msg_Ag(
size_t len
)
{
- char *cp;
+ const char *cp;
cp = "set to";
if (instance->o_state == ONCORE_RUN)
@@ -2503,9 +2504,9 @@ oncore_msg_Bl(
size_t len
)
{
- int chan, id, subframe, valid, page, i, j, tow;
+ int subframe, valid, page, i, j, tow;
int day_now, day_lsf;
- char *cp;
+ const char *cp;
enum {
WARN_NOT_YET,
WARN_0,
@@ -2516,8 +2517,6 @@ oncore_msg_Bl(
day_now = day_lsf = 0;
cp = NULL; /* keep gcc happy */
- chan = buf[4] & 0377;
- id = buf[5] & 0377;
subframe = buf[6] & 017;
valid = (buf[6] >> 4) & 017;
page = buf[7];
@@ -2889,19 +2888,20 @@ oncore_msg_Cj_id(
size_t len
)
{
- char *cp, *cp1, *cp2, Model[21];
+ char *cp2, Model[21];
+ const char *cp, *cp1;
/* Write Receiver ID message to clockstats file */
instance->Cj[294] = '\0';
- for (cp=(char *)instance->Cj; cp< (char *) &instance->Cj[294]; ) {
- cp1 = strchr(cp, '\r');
- if (!cp1)
- cp1 = (char *)&instance->Cj[294];
- *cp1 = '\0';
+ for (cp= (char *)instance->Cj; cp< (char *) &instance->Cj[294]; ) {
+ char *cpw = strchr(cp, '\r');
+ if (!cpw)
+ cpw = (char *)&instance->Cj[294];
+ *cpw = '\0';
oncore_log(instance, LOG_NOTICE, cp);
- *cp1 = '\r';
- cp = cp1+2;
+ *cpw = '\r';
+ cp = cpw+2;
}
/* next, the Firmware Version and Revision numbers */
@@ -2916,7 +2916,7 @@ oncore_msg_Cj_id(
;
cp1 = cp;
cp2 = Model;
- for (; !isspace((int)*cp) && cp-cp1 < 20; cp++, cp2++)
+ for (; !isspace((unsigned char)*cp) && cp-cp1 < 20; cp++, cp2++)
*cp2 = *cp;
*cp2 = '\0';
@@ -3046,7 +3046,7 @@ oncore_msg_Cj_init(
if (mode != 0) {
/* cable delay in ns */
memcpy(Cmd, oncore_cmd_Az, (size_t) sizeof(oncore_cmd_Az));
- w32_buf(&Cmd[-2+4], instance->delay);
+ w32_buf(&Cmd[-2+4], (int)instance->delay);
oncore_sendmsg(instance, Cmd, sizeof(oncore_cmd_Az)); /* 6,8,12 */
/* PPS offset in ns */
@@ -3146,7 +3146,7 @@ oncore_msg_Gb(
size_t len
)
{
- char * gmts;
+ const char * gmts;
int mo, d, y, h, m, s, gmth, gmtm;
mo = buf[4];
@@ -3177,7 +3177,7 @@ oncore_msg_Gc(
size_t len
)
{
- char *tbl[] = {"OFF", "ON", "SATELLITE", "TRAIM" };
+ const char *tbl[] = {"OFF", "ON", "SATELLITE", "TRAIM" };
instance->pps_control_msg_seen = 1;
oncore_log_f(instance, LOG_INFO, "PPS Control set to %s",
@@ -3202,7 +3202,7 @@ oncore_msg_Gj(
};
int dt;
- char *cp;
+ const char *cp;
instance->saw_Gj = 1; /* flag, saw_Gj, dont need to try Bj in check_leap */
@@ -3282,7 +3282,7 @@ oncore_antenna_report(
struct instance *instance,
enum antenna_state new_state)
{
- char *cp;
+ const char *cp;
if (instance->ant_state == new_state)
return;
diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c
index 2b396d8..0520311 100644
--- a/ntpd/refclock_palisade.c
+++ b/ntpd/refclock_palisade.c
@@ -584,7 +584,10 @@ TSIP_decode (
break;
}
- if (up->leap_status & PALISADE_LEAP_PENDING) {
+ up->month = mb(15);
+ if ( (up->leap_status & PALISADE_LEAP_PENDING) &&
+ /* Avoid early announce: https://bugs.ntp.org/2773 */
+ (6 == up->month || 12 == up->month) ) {
if (up->leap_status & PALISADE_UTC_TIME)
pp->leap = LEAP_ADDSECOND;
else
@@ -615,6 +618,7 @@ TSIP_decode (
pp->hour = mb(11);
pp->minute = mb(12);
pp->second = mb(13);
+ up->month = mb(14); /* Save for LEAP check */
#ifdef DEBUG
if (debug > 1)
@@ -645,7 +649,9 @@ TSIP_decode (
printf("TSIP_decode: unit %d\n", up->unit);
}
#endif
- if (getint((u_char *) &mb(10)) & 0x80)
+ if ( (getint((u_char *) &mb(10)) & 0x80) &&
+ /* Avoid early announce: https://bugs.ntp.org/2773 */
+ (6 == up->month || 12 == up->month) )
pp->leap = LEAP_ADDSECOND; /* we ASSUME addsecond */
else
pp->leap = LEAP_NOWARNING;
diff --git a/ntpd/refclock_palisade.h b/ntpd/refclock_palisade.h
index 4f1ab26..3782a5e 100644
--- a/ntpd/refclock_palisade.h
+++ b/ntpd/refclock_palisade.h
@@ -169,6 +169,7 @@ struct palisade_unit {
short rpt_cnt; /* TSIP packet length so far */
char rpt_buf[BMAX]; /* packet assembly buffer */
int type; /* Clock mode type */
+ int month; /* for LEAP filter */
};
/*
diff --git a/ntpd/refclock_parse.c b/ntpd/refclock_parse.c
index 052ec3a..195ec39 100644
--- a/ntpd/refclock_parse.c
+++ b/ntpd/refclock_parse.c
@@ -16,7 +16,7 @@
* SunOS 4.x and SunOS5.x.
*
* Copyright (c) 1995-2009 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -54,36 +54,36 @@
/*
* This driver currently provides the support for
- * - Meinberg receiver DCF77 PZF 535 (TCXO version) (DCF)
- * - Meinberg receiver DCF77 PZF 535 (OCXO version) (DCF)
- * - Meinberg receiver DCF77 PZF 509 (DCF)
+ * - Meinberg receiver DCF77 PZF535 (TCXO version) (DCF)
+ * - Meinberg receiver DCF77 PZF535 (OCXO version) (DCF)
+ * - Meinberg receiver DCF77 PZF509 (DCF)
* - Meinberg receiver DCF77 AM receivers (e.g. C51) (DCF)
* - IGEL CLOCK (DCF)
* - ELV DCF7000 (DCF)
* - Schmid clock (DCF)
* - Conrad DCF77 receiver module (DCF)
* - FAU DCF77 NTP receiver (TimeBrick) (DCF)
- * - WHARTON 400A Series clock (DCF)
+ * - WHARTON 400A Series clock (DCF)
*
- * - Meinberg GPS166/GPS167 (GPS)
+ * - Meinberg GPS receivers (GPS)
* - Trimble (TSIP and TAIP protocol) (GPS)
*
* - RCC8000 MSF Receiver (MSF)
- * - VARITEXT clock (MSF)
+ * - VARITEXT clock (MSF)
*/
/*
* Meinberg receivers are usually connected via a
- * 9600 baud serial line
+ * 9600/7E1 or 19200/8N1 serial line.
*
* The Meinberg GPS receivers also have a special NTP time stamp
* format. The firmware release is Uni-Erlangen.
*
* Meinberg generic receiver setup:
- * output time code every second
- * Baud rate 9600 7E2S
+ * output time code every second
+ * Baud rate 9600 7E2S
*
- * Meinberg GPS16x setup:
+ * Meinberg GPS receiver setup:
* output time code every second
* Baudrate 19200 8N1
*
@@ -91,7 +91,9 @@
* in Meinberg receivers.
*
* Special software versions are only sensible for the
- * GPS 16x family of receivers.
+ * oldest GPS receiver, GPS16x. For newer receiver types
+ * the output string format can be configured at the device,
+ * and the device name is generally GPSxxx instead of GPS16x.
*
* Meinberg can be reached via: http://www.meinberg.de/
*/
@@ -156,13 +158,13 @@
# endif
#endif
-#define BUFFER_SIZE(_BUF, _PTR) ((_BUF) + sizeof(_BUF) - (_PTR))
-#define BUFFER_SIZES(_BUF, _PTR, _SZ) ((_BUF) + (_SZ) - (_PTR))
+# define BUFFER_SIZE(_BUF, _PTR) ((int)((_BUF) + sizeof(_BUF) - (_PTR)))
+# define BUFFER_SIZES(_BUF, _PTR, _SZ) ((int)((_BUF) + (_SZ) - (_PTR)))
/*
* document type of PPS interfacing - copy of ifdef mechanism in local_input()
*/
-#undef PPS_METHOD
+#undef PPS_METHOD
#ifdef HAVE_PPSAPI
#define PPS_METHOD "PPS API"
@@ -181,6 +183,18 @@
#endif /* TIOCDCDTIMESTAMP */
#endif /* HAVE_PPSAPI */
+/*
+ * COND_DEF can be conditionally defined as DEF or 0. If defined as DEF
+ * then some more parse-specific variables are flagged to be printed with
+ * "ntpq -c cv <assid>". This can be lengthy, so by default COND_DEF
+ * should be defined as 0.
+ */
+#if 0
+# define COND_DEF DEF // enable this for testing
+#else
+# define COND_DEF 0 // enable this by default
+#endif
+
#include "ntp_io.h"
#include "ntp_stdlib.h"
@@ -382,7 +396,7 @@ struct parseunit
* PARSE io
*/
bind_t *binding; /* io handling binding */
-
+
/*
* parse state
*/
@@ -450,23 +464,23 @@ typedef struct poll_info
#define DCF_P_ID "DCFp" /* psuedo random phase shift */
#define GPS_ID "GPS" /* GPS receiver */
-#define NOCLOCK_ROOTDELAY 0.0
-#define NOCLOCK_BASEDELAY 0.0
-#define NOCLOCK_DESCRIPTION 0
+#define NOCLOCK_ROOTDELAY 0.0
+#define NOCLOCK_BASEDELAY 0.0
+#define NOCLOCK_DESCRIPTION 0
#define NOCLOCK_MAXUNSYNC 0
#define NOCLOCK_CFLAG 0
#define NOCLOCK_IFLAG 0
#define NOCLOCK_OFLAG 0
#define NOCLOCK_LFLAG 0
-#define NOCLOCK_ID "TILT"
-#define NOCLOCK_POLL NO_POLL
-#define NOCLOCK_INIT NO_INIT
-#define NOCLOCK_END NO_END
-#define NOCLOCK_DATA NO_LCLDATA
-#define NOCLOCK_FORMAT ""
-#define NOCLOCK_TYPE CTL_SST_TS_UNSPEC
-#define NOCLOCK_SAMPLES 0
-#define NOCLOCK_KEEP 0
+#define NOCLOCK_ID "TILT"
+#define NOCLOCK_POLL NO_POLL
+#define NOCLOCK_INIT NO_INIT
+#define NOCLOCK_END NO_END
+#define NOCLOCK_DATA NO_LCLDATA
+#define NOCLOCK_FORMAT ""
+#define NOCLOCK_TYPE CTL_SST_TS_UNSPEC
+#define NOCLOCK_SAMPLES 0
+#define NOCLOCK_KEEP 0
#define DCF_TYPE CTL_SST_TS_LF
#define GPS_TYPE CTL_SST_TS_UHF
@@ -536,14 +550,14 @@ typedef struct poll_info
#define DCFPZF535OCXO_FORMAT "Meinberg Standard"
/*
- * Meinberg GPS16X receiver
+ * Meinberg GPS receivers
*/
static void gps16x_message (struct parseunit *, parsetime_t *);
static int gps16x_poll_init (struct parseunit *);
#define GPS16X_ROOTDELAY 0.0 /* nothing here */
#define GPS16X_BASEDELAY 0.001968 /* XXX to be fixed ! 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define GPS16X_DESCRIPTION "Meinberg GPS16x receiver"
+#define GPS16X_DESCRIPTION "Meinberg GPS receiver"
#define GPS16X_MAXUNSYNC 60*60*96 /* only trust clock for 4 days
* @ 5e-9df/f we have accumulated
* at most an error of 1.73 ms
@@ -745,9 +759,9 @@ static void trimbletsip_event (struct parseunit *, int);
#define TRIMBLETAIP_INIT trimbletaip_init
#define TRIMBLETSIP_INIT trimbletsip_init
-#define TRIMBLETAIP_EVENT trimbletaip_event
+#define TRIMBLETAIP_EVENT trimbletaip_event
-#define TRIMBLETSIP_EVENT trimbletsip_event
+#define TRIMBLETSIP_EVENT trimbletsip_event
#define TRIMBLETSIP_MESSAGE trimbletsip_message
#define TRIMBLETAIP_END 0
@@ -804,7 +818,7 @@ static poll_info_t rcc8000_pollinfo = { RCC_POLLRATE, RCC_POLLCMD, RCC_CMDSIZE }
#define RCC8000_KEEP 3
/*
- * Hopf Radio clock 6021 Format
+ * Hopf Radio clock 6021 Format
*
*/
#define HOPF6021_ROOTDELAY 0.0
@@ -1200,7 +1214,7 @@ static struct parse_clockinfo
},
{ /* mode 12 */
HOPF6021_FLAGS,
- NO_POLL,
+ NO_POLL,
NO_INIT,
NO_EVENT,
NO_END,
@@ -1537,7 +1551,7 @@ clear_err(
{
if (lstate == ERR_ALL)
{
- int i;
+ size_t i;
for (i = 0; i < ERR_CNT; i++)
{
@@ -1576,7 +1590,7 @@ list_err(
if (do_it)
err->err_cnt++;
-
+
if (err->err_stage->err_count &&
(err->err_cnt >= err->err_stage->err_count))
{
@@ -1600,7 +1614,7 @@ list_err(
l_mktime(current_time - err->err_started));
err->err_suppressed = 0;
}
-
+
return do_it;
}
@@ -1638,7 +1652,7 @@ mkreadable(
if (!hex && /* no binary only */
(*src != '\\') && /* no plain \ */
(*src != '"') && /* no " */
- isprint((int)*src)) /* only printables */
+ isprint((unsigned char)*src)) /* only printables */
{ /* they are easy... */
*buffer++ = *src++;
blen--;
@@ -1715,7 +1729,7 @@ static int stream_setfmt (struct parseunit *, parsectl_t *);
static int stream_timecode (struct parseunit *, parsectl_t *);
static void stream_receive (struct recvbuf *);
#endif
-
+
static int local_init (struct parseunit *);
static void local_end (struct parseunit *);
static int local_nop (struct parseunit *);
@@ -1771,6 +1785,16 @@ static bind_t io_bindings[] =
},
{
(char *)0,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
}
};
@@ -1786,7 +1810,7 @@ ppsclock_init(
{
static char m1[] = "ppsclocd";
static char m2[] = "ppsclock";
-
+
/*
* now push the parse streams module
* it will ensure exclusive access to the device
@@ -1875,7 +1899,7 @@ stream_setcs(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_SETCS;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1898,7 +1922,7 @@ stream_enable(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_ENABLE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)0;
@@ -1922,7 +1946,7 @@ stream_disable(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_DISABLE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)0;
@@ -1947,7 +1971,7 @@ stream_getfmt(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_GETFMT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1970,7 +1994,7 @@ stream_setfmt(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_SETFMT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1995,12 +2019,12 @@ stream_timecode(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_TIMECODE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
strioc.ic_len = sizeof (*tcl);
-
+
if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
{
ERR(ERR_INTERNAL)
@@ -2035,7 +2059,7 @@ stream_receive(
return;
}
clear_err(parse, ERR_BADIO);
-
+
memmove((caddr_t)&parsetime,
(caddr_t)rbufp->recv_buffer,
sizeof(parsetime_t));
@@ -2201,7 +2225,7 @@ local_input(
{
struct timespec pps_timeout;
pps_info_t pps_info;
-
+
pps_timeout.tv_sec = 0;
pps_timeout.tv_nsec = 0;
@@ -2222,9 +2246,9 @@ local_input(
else
pts = pps_info.assert_timestamp;
- parse->parseio.parse_dtime.parse_ptime.fp.l_ui = pts.tv_sec + JAN_1970;
+ parse->parseio.parse_dtime.parse_ptime.fp.l_ui = (uint32_t) (pts.tv_sec + JAN_1970);
- dtemp = pts.tv_nsec / 1e9;
+ dtemp = (double) pts.tv_nsec / 1e9;
if (dtemp < 0.) {
dtemp += 1;
parse->parseio.parse_dtime.parse_ptime.fp.l_ui--;
@@ -2233,9 +2257,9 @@ local_input(
dtemp -= 1;
parse->parseio.parse_dtime.parse_ptime.fp.l_ui++;
}
- parse->parseio.parse_dtime.parse_ptime.fp.l_uf = dtemp * FRAC;
+ parse->parseio.parse_dtime.parse_ptime.fp.l_uf = (uint32_t)(dtemp * FRAC);
- parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
+ parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
#ifdef DEBUG
if (debug > 3)
{
@@ -2277,11 +2301,11 @@ local_input(
#else
#ifdef TIOCDCDTIMESTAMP
struct timeval dcd_time;
-
+
if (ioctl(parse->ppsfd, TIOCDCDTIMESTAMP, &dcd_time) != -1)
{
l_fp tstmp;
-
+
TVTOTS(&dcd_time, &tstmp);
tstmp.l_ui += JAN_1970;
L_SUB(&ts.fp, &tstmp);
@@ -2403,7 +2427,7 @@ local_receive(
return;
}
clear_err(parse, ERR_BADIO);
-
+
memmove((caddr_t)&parsetime,
(caddr_t)rbufp->recv_buffer,
sizeof(parsetime_t));
@@ -2452,6 +2476,31 @@ init_iobinding(
** support routines
**/
+static NTP_PRINTF(4, 5) char *
+ap(char *buffer, size_t len, char *pos, const char *fmt, ...)
+{
+ va_list va;
+ int l;
+ size_t rem = len - (pos - buffer);
+
+ if (rem == 0)
+ return pos;
+
+ va_start(va, fmt);
+ l = vsnprintf(pos, rem, fmt, va);
+ va_end(va);
+
+ if (l != -1) {
+ rem--;
+ if (rem >= (size_t)l)
+ pos += l;
+ else
+ pos += rem;
+ }
+
+ return pos;
+}
+
/*--------------------------------------------------
* convert a flag field to a string
*/
@@ -2476,11 +2525,11 @@ parsestate(
{ PARSEB_LEAPADD, "LEAP ADD WARNING" },
{ PARSEB_LEAPDEL, "LEAP DELETE WARNING" },
{ PARSEB_LEAPSECOND, "LEAP SECOND" },
- { PARSEB_ALTERNATE, "ALTERNATE ANTENNA" },
+ { PARSEB_CALLBIT, "CALL BIT" },
{ PARSEB_TIMECODE, "TIME CODE" },
{ PARSEB_PPS, "PPS" },
{ PARSEB_POSITION, "POSITION" },
- { 0 }
+ { 0, NULL }
};
static struct sbits
@@ -2493,12 +2542,11 @@ parsestate(
{ PARSEB_S_PPS, "PPS SIGNAL" },
{ PARSEB_S_ANTENNA, "ANTENNA" },
{ PARSEB_S_POSITION, "POSITION" },
- { 0 }
+ { 0, NULL }
};
int i;
char *s, *t;
-
*buffer = '\0';
s = t = buffer;
@@ -2508,42 +2556,37 @@ parsestate(
if (flagstrings[i].bit & lstate)
{
if (s != t)
- strlcpy(t, "; ", BUFFER_SIZES(buffer, t, size));
- if (strlcat(t, flagstrings[i].name, BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- t += strlen(t);
+ t = ap(buffer, size, t, "; ");
+ t = ap(buffer, size, t, "%s", flagstrings[i].name);
}
i++;
}
if (lstate & (PARSEB_S_LEAP|PARSEB_S_ANTENNA|PARSEB_S_PPS|PARSEB_S_POSITION))
{
- if (s != t &&
- strlcpy(t, "; ", BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- t += strlen(t);
+ if (s != t)
+ t = ap(buffer, size, t, "; ");
+
+ t = ap(buffer, size, t, "(");
- if (strlcpy(t, "(", BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- s = t = t + strlen(t);
+ s = t;
i = 0;
while (sflagstrings[i].bit)
{
if (sflagstrings[i].bit & lstate)
{
- if (t != s &&
- strlcpy(t, "; ", BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- t += 2;
-
- if (strlcpy(t, sflagstrings[i].name, BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- t += strlen(t);
+ if (t != s)
+ {
+ t = ap(buffer, size, t, "; ");
+ }
+
+ t = ap(buffer, size, t, "%s",
+ sflagstrings[i].name);
}
i++;
}
- strlcpy(t, ")", BUFFER_SIZES(buffer, t, size));
+ t = ap(buffer, size, t, ")");
}
return buffer;
}
@@ -2571,10 +2614,12 @@ parsestatus(
{ CVT_BADDATE, "DATE ILLEGAL" },
{ CVT_BADTIME, "TIME ILLEGAL" },
{ CVT_ADDITIONAL, "ADDITIONAL DATA" },
- { 0 }
+ { 0, NULL }
};
int i;
+ char *t;
+ t = buffer;
*buffer = '\0';
i = 0;
@@ -2582,9 +2627,9 @@ parsestatus(
{
if (flagstrings[i].bit & lstate)
{
- if (buffer[0])
- strlcat(buffer, "; ", size);
- strlcat(buffer, flagstrings[i].name, size);
+ if (t != buffer)
+ t = ap(buffer, size, t, "; ");
+ t = ap(buffer, size, t, "%s", flagstrings[i].name);
}
i++;
}
@@ -2614,12 +2659,12 @@ clockstatus(
{ CEVNT_PROP, "PROPAGATION DELAY" },
{ CEVNT_BADDATE, "ILLEGAL DATE" },
{ CEVNT_BADTIME, "ILLEGAL TIME" },
- { (unsigned)~0L }
+ { (unsigned)~0L, NULL }
};
int i;
i = 0;
- while (flagstrings[i].value != ~0)
+ while (flagstrings[i].value != (u_int)~0)
{
if (flagstrings[i].value == lstate)
{
@@ -2647,10 +2692,11 @@ l_mktime(
char *t;
buffer[0] = '\0';
+ t = buffer;
if ((tmp = delta / (60*60*24)) != 0)
{
- snprintf(buffer, BUFFER_SIZE(buffer, buffer), "%ldd+", (u_long)tmp);
+ t = ap(buffer, sizeof(buffer), t, "%ldd+", (u_long)tmp);
delta -= tmp * 60*60*24;
}
@@ -2659,10 +2705,8 @@ l_mktime(
m = delta % 60;
delta /= 60;
- t = buffer + strlen(buffer);
-
- snprintf(t, BUFFER_SIZE(buffer, t), "%02d:%02d:%02d",
- (int)delta, (int)m, (int)s);
+ t = ap(buffer, sizeof(buffer), t, "%02d:%02d:%02d",
+ (int)delta, (int)m, (int)s);
return buffer;
}
@@ -2778,7 +2822,7 @@ parse_shutdown(
{
parse->parse_type->cl_end(parse);
}
-
+
/*
* cleanup before leaving this world
*/
@@ -2791,7 +2835,7 @@ parse_shutdown(
io_closeclock(&parse->generic->io);
free_varlist(parse->kv);
-
+
NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
msyslog(LOG_INFO, "PARSE receiver #%d: reference clock \"%s\" removed",
CLK_UNIT(parse->peer), parse->parse_type->cl_description);
@@ -2817,14 +2861,14 @@ parse_hardpps(
if (CLK_PPS(parse->peer) && (parse->flags & PARSE_PPSKERNEL)) {
int i = 0;
- if (mode == PARSE_HARDPPS_ENABLE)
+ if (mode == PARSE_HARDPPS_ENABLE)
{
if (parse->flags & PARSE_CLEAR)
i = PPS_CAPTURECLEAR;
else
i = PPS_CAPTUREASSERT;
}
-
+
if (time_pps_kcbind(parse->atom.handle, PPS_KC_HARDPPS, i,
PPS_TSFMT_TSPEC) < 0) {
msyslog(LOG_ERR, "PARSE receiver #%d: time_pps_kcbind failed: %m",
@@ -2853,9 +2897,9 @@ parse_ppsapi(
)
{
int cap, mode_ppsoffset;
- char *cp;
-
- parse->flags &= ~PARSE_PPSCLOCK;
+ const char *cp;
+
+ parse->flags &= (u_char) (~PARSE_PPSCLOCK);
/*
* collect PPSAPI offset capability - should move into generic handling
@@ -2863,7 +2907,7 @@ parse_ppsapi(
if (time_pps_getcap(parse->atom.handle, &cap) < 0) {
msyslog(LOG_ERR, "PARSE receiver #%d: parse_ppsapi: time_pps_getcap failed: %m",
CLK_UNIT(parse->peer));
-
+
return 0;
}
@@ -2897,19 +2941,19 @@ parse_ppsapi(
CLK_UNIT(parse->peer), cp, cap);
mode_ppsoffset = 0;
} else {
- if (mode_ppsoffset == PPS_OFFSETCLEAR)
- {
- parse->atom.pps_params.clear_offset.tv_sec = -parse->ppsphaseadjust;
- parse->atom.pps_params.clear_offset.tv_nsec = -1e9*(parse->ppsphaseadjust - (long)parse->ppsphaseadjust);
+ if (mode_ppsoffset == PPS_OFFSETCLEAR)
+ {
+ parse->atom.pps_params.clear_offset.tv_sec = (time_t)(-parse->ppsphaseadjust);
+ parse->atom.pps_params.clear_offset.tv_nsec = (long)(-1e9*(parse->ppsphaseadjust - (double)(long)parse->ppsphaseadjust));
}
-
+
if (mode_ppsoffset == PPS_OFFSETASSERT)
- {
- parse->atom.pps_params.assert_offset.tv_sec = -parse->ppsphaseadjust;
- parse->atom.pps_params.assert_offset.tv_nsec = -1e9*(parse->ppsphaseadjust - (long)parse->ppsphaseadjust);
+ {
+ parse->atom.pps_params.assert_offset.tv_sec = (time_t)(-parse->ppsphaseadjust);
+ parse->atom.pps_params.assert_offset.tv_nsec = (long)(-1e9*(parse->ppsphaseadjust - (double)(long)parse->ppsphaseadjust));
}
}
-
+
parse->atom.pps_params.mode |= mode_ppsoffset;
if (time_pps_setparams(parse->atom.handle, &parse->atom.pps_params) < 0) {
@@ -2961,7 +3005,7 @@ parse_start(
type = CLK_TYPE(peer);
unit = CLK_UNIT(peer);
- if ((type == ~0) || (parse_clockinfo[type].cl_description == (char *)0))
+ if ((type == (u_int)~0) || (parse_clockinfo[type].cl_description == (char *)0))
{
msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: unsupported clock type %d (max %d)",
unit, CLK_REALTYPE(peer), ncltypes-1);
@@ -3013,9 +3057,9 @@ parse_start(
parse->kv = (struct ctl_var *)0;
clear_err(parse, ERR_ALL);
-
+
parse->parse_type = &parse_clockinfo[type];
-
+
parse->maxunsync = parse->parse_type->cl_maxunsync;
parse->generic->fudgetime1 = parse->parse_type->cl_basedelay;
@@ -3028,16 +3072,16 @@ parse_start(
peer->rootdelay = parse->parse_type->cl_rootdelay;
peer->sstclktype = parse->parse_type->cl_type;
peer->precision = sys_precision;
-
+
peer->stratum = STRATUM_REFCLOCK;
if (peer->stratum <= 1)
memmove((char *)&parse->generic->refid, parse->parse_type->cl_id, 4);
else
parse->generic->refid = htonl(PARSEHSREFID);
-
+
parse->generic->io.fd = fd232;
-
+
parse->peer = peer; /* marks it also as busy */
/*
@@ -3080,15 +3124,15 @@ parse_start(
}
#endif
- tio.c_cflag = parse_clockinfo[type].cl_cflag;
- tio.c_iflag = parse_clockinfo[type].cl_iflag;
- tio.c_oflag = parse_clockinfo[type].cl_oflag;
- tio.c_lflag = parse_clockinfo[type].cl_lflag;
-
+ tio.c_cflag = (tcflag_t) parse_clockinfo[type].cl_cflag;
+ tio.c_iflag = (tcflag_t) parse_clockinfo[type].cl_iflag;
+ tio.c_oflag = (tcflag_t) parse_clockinfo[type].cl_oflag;
+ tio.c_lflag = (tcflag_t) parse_clockinfo[type].cl_lflag;
+
#ifdef HAVE_TERMIOS
- if ((cfsetospeed(&tio, parse_clockinfo[type].cl_speed) == -1) ||
- (cfsetispeed(&tio, parse_clockinfo[type].cl_speed) == -1))
+ if ((cfsetospeed(&tio, (speed_t) parse_clockinfo[type].cl_speed) == -1) ||
+ (cfsetispeed(&tio, (speed_t) parse_clockinfo[type].cl_speed) == -1))
{
msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcset{i,o}speed(&tio, speed): %m", unit);
parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
@@ -3148,7 +3192,7 @@ parse_start(
if (CLK_PPS(parse->peer))
{
int i = 1;
-
+
if (ioctl(parse->ppsfd, TIOCSPPS, (caddr_t)&i) == 0)
{
parse->flags |= PARSE_PPSCLOCK;
@@ -3187,7 +3231,7 @@ parse_start(
*/
parse->generic->io.srcclock = peer;
parse->generic->io.datalen = 0;
-
+
parse->binding = init_iobinding(parse);
if (parse->binding == (bind_t *)0)
@@ -3234,11 +3278,8 @@ parse_start(
return 0; /* well, ok - special initialisation broke */
}
- tmp_ctl.parseformat.parse_count = strlcpy(tmp_ctl.parseformat.parse_buffer,
- parse->parse_type->cl_format,
- sizeof(tmp_ctl.parseformat.parse_buffer));
- if (tmp_ctl.parseformat.parse_count >= sizeof(tmp_ctl.parseformat.parse_buffer))
- tmp_ctl.parseformat.parse_count = sizeof(tmp_ctl.parseformat.parse_buffer) - 1;
+ strlcpy(tmp_ctl.parseformat.parse_buffer, parse->parse_type->cl_format, sizeof(tmp_ctl.parseformat.parse_buffer));
+ tmp_ctl.parseformat.parse_count = (u_short) strlen(tmp_ctl.parseformat.parse_buffer);
if (!PARSE_SETFMT(parse, &tmp_ctl))
{
@@ -3246,7 +3287,7 @@ parse_start(
parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
return 0; /* well, ok - special initialisation broke */
}
-
+
/*
* get rid of all IO accumulated so far
*/
@@ -3273,7 +3314,7 @@ parse_start(
return 0; /* well, ok - special initialisation broke */
}
}
-
+
/*
* Insert in async io device list.
*/
@@ -3338,8 +3379,8 @@ parse_ctl(
{
if (in->haveflags & (CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4))
{
- parse->flags = (parse->flags & ~(CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4)) |
- (in->flags & (CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4));
+ u_char mask = CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4;
+ parse->flags = (parse->flags & (u_char)(~mask)) | (in->flags & mask);
#if defined(HAVE_PPSAPI)
if (CLK_PPS(parse->peer))
{
@@ -3347,7 +3388,7 @@ parse_ctl(
}
#endif
}
-
+
if (in->haveflags & CLK_HAVETIME1)
{
parse->generic->fudgetime1 = in->fudgetime1;
@@ -3355,11 +3396,11 @@ parse_ctl(
CLK_UNIT(parse->peer),
parse->generic->fudgetime1);
}
-
+
if (in->haveflags & CLK_HAVETIME2)
{
parse->generic->fudgetime2 = in->fudgetime2;
- if (parse->flags & PARSE_TRUSTTIME)
+ if (parse->flags & PARSE_TRUSTTIME)
{
parse->maxunsync = (u_long)ABS(in->fudgetime2);
msyslog(LOG_INFO, "PARSE receiver #%d: new trust time %s",
@@ -3407,8 +3448,8 @@ parse_poll(
*/
parse->generic->polls++;
- if (parse->pollneeddata &&
- ((current_time - parse->pollneeddata) > (1<<(max(min(parse->peer->hpoll, parse->peer->ppoll), parse->peer->minpoll)))))
+ if (parse->pollneeddata &&
+ ((int)(current_time - parse->pollneeddata) > (1<<(max(min(parse->peer->hpoll, parse->peer->ppoll), parse->peer->minpoll)))))
{
/*
* start worrying when exceeding a poll inteval
@@ -3416,7 +3457,7 @@ parse_poll(
*/
parse->lastmissed = current_time;
parse_event(parse, CEVNT_TIMEOUT);
-
+
ERR(ERR_NODATA)
msyslog(LOG_WARNING, "PARSE receiver #%d: no data from device within poll interval (check receiver / wiring)", CLK_UNIT(parse->peer));
}
@@ -3474,7 +3515,7 @@ parse_control(
* handle changes
*/
parse_ctl(parse, in);
-
+
/*
* supply data
*/
@@ -3521,16 +3562,16 @@ parse_control(
}
start = tt = add_var(&out->kv_list, 128, RO|DEF);
- snprintf(tt, 128, "refclock_time=\"");
- tt += strlen(tt);
+ tt = ap(start, 128, tt, "refclock_time=\"");
if (parse->timedata.parse_time.fp.l_ui == 0)
{
- strlcpy(tt, "<UNDEFINED>\"", BUFFER_SIZES(start, tt, 128));
+ tt = ap(start, 128, tt, "<UNDEFINED>\"");
}
else
{
- snprintf(tt, 128, "%s\"", gmprettydate(&parse->timedata.parse_time.fp));
+ tt = ap(start, 128, tt, "%s\"",
+ gmprettydate(&parse->timedata.parse_time.fp));
}
if (!PARSE_GETTIMECODE(parse, &tmpctl))
@@ -3541,8 +3582,7 @@ parse_control(
else
{
start = tt = add_var(&out->kv_list, 512, RO|DEF);
- snprintf(tt, 512, "refclock_status=\"");
- tt += strlen(tt);
+ tt = ap(start, 512, tt, "refclock_status=\"");
/*
* copy PPS flags from last read transaction (informational only)
@@ -3550,18 +3590,20 @@ parse_control(
tmpctl.parsegettc.parse_state |= parse->timedata.parse_state &
(PARSEB_PPS|PARSEB_S_PPS);
- (void) parsestate(tmpctl.parsegettc.parse_state, tt, BUFFER_SIZES(start, tt, 512));
+ (void)parsestate(tmpctl.parsegettc.parse_state, tt, BUFFER_SIZES(start, tt, 512));
- strlcat(tt, "\"", BUFFER_SIZES(start, tt, 512));
+ tt += strlen(tt);
+
+ tt = ap(start, 512, tt, "\"");
if (tmpctl.parsegettc.parse_count)
mkascii(outstatus+strlen(outstatus), (int)(sizeof(outstatus)- strlen(outstatus) - 1),
tmpctl.parsegettc.parse_buffer, (unsigned)(tmpctl.parsegettc.parse_count));
}
-
+
tmpctl.parseformat.parse_format = tmpctl.parsegettc.parse_format;
-
+
if (!PARSE_GETFMT(parse, &tmpctl))
{
ERR(ERR_INTERNAL)
@@ -3569,11 +3611,19 @@ parse_control(
}
else
{
- tt = add_var(&out->kv_list, 80, RO|DEF);
- snprintf(tt, 80, "refclock_format=\"");
+ int count = tmpctl.parseformat.parse_count - 1;
+
+ start = tt = add_var(&out->kv_list, 80, RO|DEF);
+ tt = ap(start, 80, tt, "refclock_format=\"");
- strlcat(tt, tmpctl.parseformat.parse_buffer, 80);
- strlcat(tt,"\"", 80);
+ if (count > 0) {
+ tt = ap(start, 80, tt, "%*.*s",
+ count,
+ count,
+ tmpctl.parseformat.parse_buffer);
+ }
+
+ tt = ap(start, 80, tt, "\"");
}
/*
@@ -3581,8 +3631,7 @@ parse_control(
*/
start = tt = add_var(&out->kv_list, LEN_STATES, RO|DEF);
- strlcpy(tt, "refclock_states=\"", LEN_STATES);
- tt += strlen(tt);
+ tt = ap(start, LEN_STATES, tt, "refclock_states=\"");
for (i = 0; i <= CEVNT_MAX; i++)
{
@@ -3597,7 +3646,7 @@ parse_control(
percent /= 10;
d /= 10;
}
-
+
if (d)
percent = (percent * 10000) / d;
else
@@ -3607,36 +3656,37 @@ parse_control(
{
char item[80];
int count;
-
+
snprintf(item, 80, "%s%s%s: %s (%d.%02d%%)",
sum ? "; " : "",
(parse->generic->currentstatus == i) ? "*" : "",
clockstatus((unsigned int)i),
l_mktime(s_time),
(int)(percent / 100), (int)(percent % 100));
- if ((count = strlen(item)) < (LEN_STATES - 40 - (tt - start)))
+ if ((count = (int) strlen(item)) < (LEN_STATES - 40 - (tt - start)))
{
- strlcpy(tt, item, BUFFER_SIZES(start, tt, LEN_STATES));
- tt += count;
+ tt = ap(start, LEN_STATES, tt,
+ "%s", item);
}
sum += s_time;
}
}
-
- snprintf(tt, BUFFER_SIZES(start, tt, LEN_STATES), "; running time: %s\"", l_mktime(sum));
-
+
+ tt = ap(start, LEN_STATES, tt,
+ "; running time: %s\"", l_mktime(sum));
+
tt = add_var(&out->kv_list, 32, RO);
snprintf(tt, 32, "refclock_id=\"%s\"", parse->parse_type->cl_id);
-
+
tt = add_var(&out->kv_list, 80, RO);
snprintf(tt, 80, "refclock_iomode=\"%s\"", parse->binding->bd_description);
tt = add_var(&out->kv_list, 128, RO);
snprintf(tt, 128, "refclock_driver_version=\"%s\"", rcsid);
-
+
{
struct ctl_var *k;
-
+
k = parse->kv;
while (k && !(k->flags & EOV))
{
@@ -3644,8 +3694,8 @@ parse_control(
k++;
}
}
-
- out->lencode = strlen(outstatus);
+
+ out->lencode = (u_short) strlen(outstatus);
out->p_lastcode = outstatus;
}
}
@@ -3694,7 +3744,7 @@ parse_process(
{
l_fp off, rectime, reftime;
double fudge;
-
+
/* silence warning: 'off.Ul_i.Xl_i' may be used uninitialized in this function */
ZERO(off);
@@ -3707,11 +3757,11 @@ parse_process(
(parse->timedata.parse_status != parsetime->parse_status))
{
char buffer[400];
-
+
NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
msyslog(LOG_WARNING, "PARSE receiver #%d: conversion status \"%s\"",
CLK_UNIT(parse->peer), parsestatus(parsetime->parse_status, buffer, sizeof(buffer)));
-
+
if ((parsetime->parse_status & CVT_MASK) == CVT_FAIL)
{
/*
@@ -3720,7 +3770,7 @@ parse_process(
* the time code might be overwritten by the next packet
*/
parsectl_t tmpctl;
-
+
if (!PARSE_GETTIMECODE(parse, &tmpctl))
{
ERR(ERR_INTERNAL)
@@ -3758,7 +3808,7 @@ parse_process(
parse->timedata.parse_ptime = parsetime->parse_ptime;
}
break; /* well, still waiting - timeout is handled at higher levels */
-
+
case CVT_FAIL:
if (parsetime->parse_status & CVT_BADFMT)
{
@@ -3789,7 +3839,7 @@ parse_process(
if (parse->lastformat != parsetime->parse_format)
{
parsectl_t tmpctl;
-
+
tmpctl.parseformat.parse_format = parsetime->parse_format;
if (!PARSE_GETFMT(parse, &tmpctl))
@@ -3817,10 +3867,10 @@ parse_process(
/*
* something happend - except for PPS events
*/
-
+
(void) parsestate(parsetime->parse_state, tmp1, sizeof(tmp1));
(void) parsestate(parse->timedata.parse_state, tmp2, sizeof(tmp2));
-
+
NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
msyslog(LOG_INFO,"PARSE receiver #%d: STATE CHANGE: %s -> %s",
CLK_UNIT(parse->peer), tmp2, tmp1);
@@ -3923,12 +3973,12 @@ parse_process(
}
fudge = parse->generic->fudgetime1; /* standard RS232 Fudgefactor */
-
+
if (PARSE_TIMECODE(parsetime->parse_state))
{
rectime = parsetime->parse_stime.fp;
off = reftime = parsetime->parse_time.fp;
-
+
L_SUB(&off, &rectime); /* prepare for PPS adjustments logic */
#ifdef DEBUG
@@ -3973,7 +4023,7 @@ parse_process(
M_ISGEQ(0, 0x7fffffff, off.l_i, off.l_uf))
{
fudge = ppsphaseadjust; /* pick PPS fudge factor */
-
+
/*
* RS232 offsets within [-0.5..0.5[ - take PPS offsets
*/
@@ -3985,12 +4035,12 @@ parse_process(
reftime.l_ui++;
reftime.l_uf = 0;
-
+
/*
* implied on second offset
*/
off.l_uf = ~off.l_uf; /* map [0.5..1[ -> [-0.5..0[ */
- off.l_i = (off.l_uf & 0x8000000) ? -1 : 0; /* sign extend */
+ off.l_i = (off.l_uf & 0x80000000) ? -1 : 0; /* sign extend */
}
else
{
@@ -4051,7 +4101,7 @@ parse_process(
rectime = reftime;
L_SUB(&rectime, &off); /* just to keep the ntp interface happy */
-
+
#ifdef DEBUG
if (debug > 3)
printf("PARSE receiver #%d: calculated Reftime %s, Recvtime %s\n",
@@ -4076,14 +4126,14 @@ parse_process(
clear_err(parse, ERR_BADDATA);
clear_err(parse, ERR_NODATA);
clear_err(parse, ERR_INTERNAL);
-
+
/*
* and now stick it into the clock machine
* samples are only valid iff lastsync is not too old and
* we have seen the clock in sync at least once
* after the last time we didn't see an expected data telegram
* at startup being not in sync is also bad just like
- * POWERUP state unless PARSE_F_POWERUPTRUST is set
+ * POWERUP state unless PARSE_F_POWERUPTRUST is set
* see the clock states section above for more reasoning
*/
if (((current_time - parse->lastsync) > parse->maxunsync) ||
@@ -4123,9 +4173,9 @@ parse_process(
* only good/trusted samples are interesting
*/
#ifdef DEBUG
- if (debug > 2)
- {
- printf("PARSE receiver #%d: refclock_process_offset(reftime=%s, rectime=%s, Fudge=%f)\n",
+ if (debug > 2)
+ {
+ printf("PARSE receiver #%d: refclock_process_offset(reftime=%s, rectime=%s, Fudge=%f)\n",
CLK_UNIT(parse->peer),
prettydate(&reftime),
prettydate(&rectime),
@@ -4133,7 +4183,7 @@ parse_process(
}
#endif
parse->generic->lastref = reftime;
-
+
refclock_process_offset(parse->generic, reftime, rectime, fudge);
#ifdef HAVE_PPSAPI
@@ -4141,31 +4191,18 @@ parse_process(
* pass PPS information on to PPS clock
*/
if (PARSE_PPS(parsetime->parse_state) && CLK_PPS(parse->peer))
- {
- /* refclock_pps includes fudgetime1 - we keep the RS232 offset in there :-( */
- double savedtime1 = parse->generic->fudgetime1;
-
- parse->generic->fudgetime1 = fudge;
-
- if (refclock_pps(parse->peer, &parse->atom,
- parse->flags & (CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4))) {
- parse->peer->flags |= FLAG_PPS;
- } else {
- parse->peer->flags &= ~FLAG_PPS;
- }
-
- parse->generic->fudgetime1 = savedtime1;
-
+ {
+ parse->peer->flags |= (FLAG_PPS | FLAG_TSTAMP_PPS);
parse_hardpps(parse, PARSE_HARDPPS_ENABLE);
}
#endif
} else {
- parse_hardpps(parse, PARSE_HARDPPS_DISABLE);
- parse->peer->flags &= ~FLAG_PPS;
+ parse_hardpps(parse, PARSE_HARDPPS_DISABLE);
+ parse->peer->flags &= ~(FLAG_PPS | FLAG_TSTAMP_PPS);
}
/*
- * ready, unless the machine wants a sample or
+ * ready, unless the machine wants a sample or
* we are in fast startup mode (peer->dist > MAXDISTANCE)
*/
if (!parse->pollneeddata && parse->peer->disp <= MAXDISTANCE)
@@ -4177,56 +4214,71 @@ parse_process(
refclock_receive(parse->peer);
}
-
+
/**===========================================================================
** special code for special clocks
**/
static void
mk_utcinfo(
- char *t,
+ char *t, // pointer to the output string buffer
int wnt,
int wnlsf,
int dn,
int dtls,
int dtlsf,
- int size
+ int size // size of the output string buffer
)
{
- l_fp leapdate;
- char *start = t;
-
- snprintf(t, size, "current correction %d sec", dtls);
- t += strlen(t);
-
- if (wnlsf < 990)
- wnlsf += 1024;
-
- if (wnt < 990)
- wnt += 1024;
-
- gpstolfp((unsigned short)wnlsf, (unsigned short)dn, 0, &leapdate);
-
- if ((dtlsf != dtls) &&
- ((wnlsf - wnt) < 52))
- {
- snprintf(t, BUFFER_SIZES(start, t, size), ", next correction %d sec on %s, new GPS-UTC offset %d",
- dtlsf - dtls, gmprettydate(&leapdate), dtlsf);
- }
- else
- {
- snprintf(t, BUFFER_SIZES(start, t, size), ", last correction on %s",
- gmprettydate(&leapdate));
- }
+ /*
+ * The week number transmitted by the GPS satellites for the leap date
+ * is truncated to 8 bits only. If the nearest leap second date is off
+ * the current date by more than +/- 128 weeks then conversion to a
+ * calendar date is ambiguous. On the other hand, if a leap second is
+ * currently being announced (i.e. dtlsf != dtls) then the week number
+ * wnlsf is close enough, and we can unambiguously determine the date
+ * for which the leap second is scheduled.
+ */
+ if ( dtlsf != dtls )
+ {
+ time_t t_ls;
+ struct tm *tm;
+ int n = 0;
+
+ if (wnlsf < GPSWRAP)
+ wnlsf += GPSWEEKS;
+
+ if (wnt < GPSWRAP)
+ wnt += GPSWEEKS;
+
+ t_ls = (time_t) wnlsf * SECSPERWEEK
+ + (time_t) dn * SECSPERDAY
+ + GPS_SEC_BIAS - 1;
+
+ tm = gmtime( &t_ls );
+ if (tm == NULL) // gmtime() failed
+ {
+ snprintf( t, size, "** (gmtime() failed in mk_utcinfo())" );
+ return;
+ }
+
+ n += snprintf( t, size, "UTC offset transition from %is to %is due to leap second %s",
+ dtls, dtlsf, ( dtls < dtlsf ) ? "insertion" : "deletion" );
+ n += snprintf( t + n, size - n, " at UTC midnight at the end of %s, %04i-%02i-%02i",
+ daynames[tm->tm_wday], tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday );
+ }
+ else
+ snprintf( t, size, "UTC offset parameter: %is, no leap second announced.\n", dtls );
+
}
#ifdef CLOCK_MEINBERG
/**===========================================================================
- ** Meinberg GPS166/GPS167 support
+ ** Meinberg GPS receiver support
**/
/*------------------------------------------------------------
- * gps16x_message - process GPS16x messages
+ * gps16x_message - process messages from Meinberg GPS receiver
*/
static void
gps16x_message(
@@ -4238,12 +4290,12 @@ gps16x_message(
{
GPS_MSG_HDR header;
unsigned char *bufp = (unsigned char *)parsetime->parse_msg + 1;
-
+
#ifdef DEBUG
if (debug > 2)
{
char msgbuffer[600];
-
+
mkreadable(msgbuffer, sizeof(msgbuffer), (char *)parsetime->parse_msg, parsetime->parse_msglen, 1);
printf("PARSE receiver #%d: received message (%d bytes) >%s<\n",
CLK_UNIT(parse->peer),
@@ -4252,21 +4304,21 @@ gps16x_message(
}
#endif
get_mbg_header(&bufp, &header);
- if (header.gps_hdr_csum == mbg_csum(parsetime->parse_msg + 1, 6) &&
- (header.gps_len == 0 ||
- (header.gps_len < sizeof(parsetime->parse_msg) &&
- header.gps_data_csum == mbg_csum(bufp, header.gps_len))))
+ if (header.hdr_csum == mbg_csum(parsetime->parse_msg + 1, 6) &&
+ (header.len == 0 ||
+ (header.len < sizeof(parsetime->parse_msg) &&
+ header.data_csum == mbg_csum(bufp, header.len))))
{
/*
* clean message
*/
- switch (header.gps_cmd)
+ switch (header.cmd)
{
case GPS_SW_REV:
{
char buffer[64];
SW_REV gps_sw_rev;
-
+
get_mbg_sw_rev(&bufp, &gps_sw_rev);
snprintf(buffer, sizeof(buffer), "meinberg_gps_version=\"%x.%02x%s%s\"",
(gps_sw_rev.code >> 8) & 0xFF,
@@ -4277,54 +4329,56 @@ gps16x_message(
}
break;
- case GPS_STAT:
+ case GPS_BVAR_STAT:
{
static struct state
{
- unsigned short flag; /* status flag */
- unsigned const char *string; /* bit name */
+ BVAR_STAT flag; /* status flag */
+ const char *string; /* bit name */
} states[] =
{
- { TM_ANT_DISCONN, (const unsigned char *)"ANTENNA FAULTY" },
- { TM_SYN_FLAG, (const unsigned char *)"NO SYNC SIGNAL" },
- { TM_NO_SYNC, (const unsigned char *)"NO SYNC POWERUP" },
- { TM_NO_POS, (const unsigned char *)"NO POSITION" },
- { 0, (const unsigned char *)"" }
+ { BVAR_CFGH_INVALID, "Configuration/Health" },
+ { BVAR_ALM_NOT_COMPLETE, "Almanachs" },
+ { BVAR_UTC_INVALID, "UTC Correction" },
+ { BVAR_IONO_INVALID, "Ionospheric Correction" },
+ { BVAR_RCVR_POS_INVALID, "Receiver Position" },
+ { 0, "" }
};
- unsigned short status;
+ BVAR_STAT status;
struct state *s = states;
char buffer[512];
char *p, *b;
-
- status = get_lsb_short(&bufp);
- snprintf(buffer, sizeof(buffer), "meinberg_gps_status=\"[0x%04x] ", status);
-
+
+ status = (BVAR_STAT) get_lsb_short(&bufp);
+ p = b = buffer;
+ p = ap(buffer, sizeof(buffer), p,
+ "meinberg_gps_status=\"[0x%04x] ",
+ status);
+
if (status)
{
- p = b = buffer + strlen(buffer);
+ p = ap(buffer, sizeof(buffer), p, "incomplete buffered data: ");
+ b = p;
while (s->flag)
{
if (status & s->flag)
{
if (p != b)
{
- *p++ = ',';
- *p++ = ' ';
+ p = ap(buffer, sizeof(buffer), p, ", ");
}
-
- strlcat(p, (const char *)s->string, sizeof(buffer));
+
+ p = ap(buffer, sizeof(buffer), p, "%s", (const char *)s->string);
}
s++;
}
-
- *p++ = '"';
- *p = '\0';
+ p = ap(buffer, sizeof(buffer), p, "\"");
}
else
{
- strlcat(buffer, "<OK>\"", sizeof(buffer));
+ p = ap(buffer, sizeof(buffer), p, "<all buffered data complete>\"");
}
-
+
set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
}
break;
@@ -4333,282 +4387,259 @@ gps16x_message(
{
XYZ xyz;
char buffer[256];
-
+
get_mbg_xyz(&bufp, xyz);
snprintf(buffer, sizeof(buffer), "gps_position(XYZ)=\"%s m, %s m, %s m\"",
mfptoa(xyz[XP].l_ui, xyz[XP].l_uf, 1),
mfptoa(xyz[YP].l_ui, xyz[YP].l_uf, 1),
mfptoa(xyz[ZP].l_ui, xyz[ZP].l_uf, 1));
-
+
set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_POS_LLA:
{
LLA lla;
char buffer[256];
-
+
get_mbg_lla(&bufp, lla);
-
+
snprintf(buffer, sizeof(buffer), "gps_position(LLA)=\"%s deg, %s deg, %s m\"",
mfptoa(lla[LAT].l_ui, lla[LAT].l_uf, 4),
- mfptoa(lla[LON].l_ui, lla[LON].l_uf, 4),
+ mfptoa(lla[LON].l_ui, lla[LON].l_uf, 4),
mfptoa(lla[ALT].l_ui, lla[ALT].l_uf, 1));
-
+
set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_TZDL:
break;
-
+
case GPS_PORT_PARM:
break;
-
+
case GPS_SYNTH:
break;
-
+
case GPS_ANT_INFO:
{
ANT_INFO antinfo;
char buffer[512];
- char *p;
-
+ char *p, *q;
+
get_mbg_antinfo(&bufp, &antinfo);
- snprintf(buffer, sizeof(buffer), "meinberg_antenna_status=\"");
- p = buffer + strlen(buffer);
-
+ p = buffer;
+ p = ap(buffer, sizeof(buffer), p, "meinberg_antenna_status=\"");
switch (antinfo.status)
{
- case ANT_INVALID:
- strlcat(p, "<OK>", BUFFER_SIZE(buffer, p));
- p += strlen(p);
+ case ANT_INVALID: // No other fields valid since antenna has not yet been disconnected
+ p = ap(buffer, sizeof(buffer),
+ p, "<OK>");
break;
-
- case ANT_DISCONN:
- strlcat(p, "DISCONNECTED since ", BUFFER_SIZE(buffer, p));
+
+ case ANT_DISCONN: // Antenna is disconnected, tm_reconn and delta_t not yet set
+ q = ap(buffer, sizeof(buffer),
+ p, "DISCONNECTED since ");
NLOG(NLOG_CLOCKSTATUS)
ERR(ERR_BADSTATUS)
msyslog(LOG_ERR,"PARSE receiver #%d: ANTENNA FAILURE: %s",
CLK_UNIT(parse->peer), p);
-
- p += strlen(p);
- mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p));
+
+ p = q;
+ mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p), 0);
*p = '\0';
break;
-
- case ANT_RECONN:
- strlcat(p, "RECONNECTED on ", BUFFER_SIZE(buffer, p));
- p += strlen(p);
- mbg_tm_str(&p, &antinfo.tm_reconn, BUFFER_SIZE(buffer, p));
- snprintf(p, BUFFER_SIZE(buffer, p), ", reconnect clockoffset %c%ld.%07ld s, disconnect time ",
+
+ case ANT_RECONN: // Antenna had been disconnect, but receiver sync. after reconnect, so all fields valid
+ p = ap(buffer, sizeof(buffer),
+ p, "SYNC AFTER RECONNECT on ");
+ mbg_tm_str(&p, &antinfo.tm_reconn, BUFFER_SIZE(buffer, p), 0);
+ p = ap(buffer, sizeof(buffer),
+ p, ", clock offset at reconnect %c%ld.%07ld s, disconnect time ",
(antinfo.delta_t < 0) ? '-' : '+',
- ABS(antinfo.delta_t) / 10000,
- ABS(antinfo.delta_t) % 10000);
- p += strlen(p);
- mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p));
+ (long) ABS(antinfo.delta_t) / 10000,
+ (long) ABS(antinfo.delta_t) % 10000);
+ mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p), 0);
*p = '\0';
break;
-
+
default:
- snprintf(p, BUFFER_SIZE(buffer, p), "bad status 0x%04x", antinfo.status);
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer),
+ p, "bad status 0x%04x",
+ antinfo.status);
break;
}
-
- strlcat(p, "\"", BUFFER_SIZE(buffer, p));
-
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
+
+ p = ap(buffer, sizeof(buffer), p, "\"");
+
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_UCAP:
break;
-
+
case GPS_CFGH:
{
CFGH cfgh;
char buffer[512];
char *p;
-
+
get_mbg_cfgh(&bufp, &cfgh);
if (cfgh.valid)
{
+ const char *cp;
+ uint16_t tmp_val;
int i;
-
+
p = buffer;
- strlcpy(buffer, "gps_tot_51=\"", BUFFER_SIZE(buffer, p));
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer),
+ p, "gps_tot_51=\"");
mbg_tgps_str(&p, &cfgh.tot_51, BUFFER_SIZE(buffer, p));
- strlcpy(p, "\"", BUFFER_SIZE(buffer, p));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
-
+ p = ap(buffer, sizeof(buffer),
+ p, "\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
+
p = buffer;
- strlcpy(buffer, "gps_tot_63=\"", BUFFER_SIZE(buffer, p));
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer),
+ p, "gps_tot_63=\"");
mbg_tgps_str(&p, &cfgh.tot_63, BUFFER_SIZE(buffer, p));
- strlcpy(p, "\"", BUFFER_SIZE(buffer, p));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
-
+ p = ap(buffer, sizeof(buffer),
+ p, "\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
+
p = buffer;
- strlcpy(buffer, "gps_t0a=\"", BUFFER_SIZE(buffer, p));
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer),
+ p, "gps_t0a=\"");
mbg_tgps_str(&p, &cfgh.t0a, BUFFER_SIZE(buffer, p));
- strlcpy(p, "\"", BUFFER_SIZE(buffer, p));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
-
- for (i = MIN_SVNO; i < MAX_SVNO; i++)
+ p = ap(buffer, sizeof(buffer),
+ p, "\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
+
+ for (i = 0; i < N_SVNO_GPS; i++)
{
p = buffer;
- snprintf(p, BUFFER_SIZE(buffer, p), "gps_cfg[%d]=\"[0x%x] ", i, cfgh.cfg[i]);
- p += strlen(p);
- switch (cfgh.cfg[i] & 0x7)
- {
- case 0:
- strlcpy(p, "BLOCK I", BUFFER_SIZE(buffer, p));
- break;
- case 1:
- strlcpy(p, "BLOCK II", BUFFER_SIZE(buffer, p));
- break;
- default:
- strlcpy(p, "bad CFG", BUFFER_SIZE(buffer, p));
- break;
- }
- strlcat(p, "\"", BUFFER_SIZE(buffer, p));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
-
- p = buffer;
- snprintf(p, BUFFER_SIZE(buffer, p), "gps_health[%d]=\"[0x%x] ", i, cfgh.health[i]);
- p += strlen(p);
- switch ((cfgh.health[i] >> 5) & 0x7 )
- {
- case 0:
- strlcpy(p, "OK;", BUFFER_SIZE(buffer, p));
- break;
- case 1:
- strlcpy(p, "PARITY;", BUFFER_SIZE(buffer, p));
- break;
- case 2:
- strlcpy(p, "TLM/HOW;", BUFFER_SIZE(buffer, p));
- break;
- case 3:
- strlcpy(p, "Z-COUNT;", BUFFER_SIZE(buffer, p));
- break;
- case 4:
- strlcpy(p, "SUBFRAME 1,2,3;", BUFFER_SIZE(buffer, p));
- break;
- case 5:
- strlcpy(p, "SUBFRAME 4,5;", BUFFER_SIZE(buffer, p));
- break;
- case 6:
- strlcpy(p, "UPLOAD BAD;", BUFFER_SIZE(buffer, p));
- break;
- case 7:
- strlcpy(p, "DATA BAD;", BUFFER_SIZE(buffer, p));
- break;
+ p = ap(buffer, sizeof(buffer), p, "sv_info[%d]=\"PRN%d", i, i + N_SVNO_GPS);
+
+ tmp_val = cfgh.health[i]; /* a 6 bit SV health code */
+ p = ap(buffer, sizeof(buffer), p, "; health=0x%02x (", tmp_val);
+ /* "All Ones" has a special meaning" */
+ if (tmp_val == 0x3F) /* satellite is unusable or doesn't even exist */
+ cp = "SV UNAVAILABLE";
+ else {
+ /* The MSB contains a summary of the 3 MSBs of the 8 bit health code,
+ * indicating if the data sent by the satellite is OK or not. */
+ p = ap(buffer, sizeof(buffer), p, "DATA %s, ", (tmp_val & 0x20) ? "BAD" : "OK" );
+
+ /* The 5 LSBs contain the status of the different signals sent by the satellite. */
+ switch (tmp_val & 0x1F)
+ {
+ case 0x00: cp = "SIGNAL OK"; break;
+ /* codes 0x01 through 0x1B indicate that one or more
+ * specific signal components are weak or dead.
+ * We don't decode this here in detail. */
+ case 0x1C: cp = "SV IS TEMP OUT"; break;
+ case 0x1D: cp = "SV WILL BE TEMP OUT"; break;
+ default: cp = "TRANSMISSION PROBLEMS"; break;
+ }
}
-
- p += strlen(p);
-
- switch (cfgh.health[i] & 0x1F)
+ p = ap(buffer, sizeof(buffer), p, "%s)", cp );
+
+ tmp_val = cfgh.cfg[i]; /* a 4 bit SV configuration/type code */
+ p = ap(buffer, sizeof(buffer), p, "; cfg=0x%02x (", tmp_val);
+ switch (tmp_val & 0x7)
{
- case 0:
- strlcpy(p, "SIGNAL OK", BUFFER_SIZE(buffer, p));
- break;
- case 0x1C:
- strlcpy(p, "SV TEMP OUT", BUFFER_SIZE(buffer, p));
- break;
- case 0x1D:
- strlcpy(p, "SV WILL BE TEMP OUT", BUFFER_SIZE(buffer, p));
- break;
- case 0x1E:
- break;
- case 0x1F:
- strlcpy(p, "MULTIPLE ERRS", BUFFER_SIZE(buffer, p));
- break;
- default:
- strlcpy(p, "TRANSMISSION PROBLEMS", BUFFER_SIZE(buffer, p));
- break;
+ case 0x00: cp = "(reserved)"; break;
+ case 0x01: cp = "BLOCK II/IIA/IIR"; break;
+ case 0x02: cp = "BLOCK IIR-M"; break;
+ case 0x03: cp = "BLOCK IIF"; break;
+ case 0x04: cp = "BLOCK III"; break;
+ default: cp = "unknown SV type"; break;
}
-
- strlcat(p, "\"", sizeof(buffer));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
+ p = ap(buffer, sizeof(buffer), p, "%s", cp );
+ if (tmp_val & 0x08) /* A-S is on, P-code is encrypted */
+ p = ap( buffer, sizeof(buffer), p, ", A-S on" );
+
+ p = ap(buffer, sizeof(buffer), p, ")\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
}
}
}
break;
-
+
case GPS_ALM:
break;
-
+
case GPS_EPH:
break;
-
+
case GPS_UTC:
{
UTC utc;
char buffer[512];
char *p;
-
+
p = buffer;
-
+
get_mbg_utc(&bufp, &utc);
-
+
if (utc.valid)
{
- strlcpy(p, "gps_utc_correction=\"", sizeof(buffer));
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer), p, "gps_utc_correction=\"");
mk_utcinfo(p, utc.t0t.wn, utc.WNlsf, utc.DNt, utc.delta_tls, utc.delta_tlsf, BUFFER_SIZE(buffer, p));
- strlcat(p, "\"", BUFFER_SIZE(buffer, p));
+ p += strlen(p);
+ p = ap(buffer, sizeof(buffer), p, "\"");
}
else
{
- strlcpy(p, "gps_utc_correction=\"<NO UTC DATA>\"", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "gps_utc_correction=\"<NO UTC DATA>\"");
}
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_IONO:
break;
-
+
case GPS_ASCII_MSG:
{
ASCII_MSG gps_ascii_msg;
char buffer[128];
-
+
get_mbg_ascii_msg(&bufp, &gps_ascii_msg);
-
+
if (gps_ascii_msg.valid)
{
char buffer1[128];
mkreadable(buffer1, sizeof(buffer1), gps_ascii_msg.s, strlen(gps_ascii_msg.s), (int)0);
-
+
snprintf(buffer, sizeof(buffer), "gps_message=\"%s\"", buffer1);
}
else
- strlcpy(buffer, "gps_message=<NONE>", sizeof(buffer));
-
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
+ snprintf(buffer, sizeof(buffer), "gps_message=<NONE>");
+
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
-
+
break;
-
+
default:
break;
}
}
else
{
- msyslog(LOG_DEBUG, "PARSE receiver #%d: gps16x_message: message checksum error: hdr_csum = 0x%x (expected 0x%lx), data_len = %d, data_csum = 0x%x (expected 0x%lx)",
+ msyslog(LOG_DEBUG, "PARSE receiver #%d: gps16x_message: message checksum error: hdr_csum = 0x%x (expected 0x%x), "
+ "data_len = %d, data_csum = 0x%x (expected 0x%x)",
CLK_UNIT(parse->peer),
- header.gps_hdr_csum, mbg_csum(parsetime->parse_msg + 1, 6),
- header.gps_len,
- header.gps_data_csum, mbg_csum(bufp, (unsigned)((header.gps_len < sizeof(parsetime->parse_msg)) ? header.gps_len : 0)));
+ header.hdr_csum, mbg_csum(parsetime->parse_msg + 1, 6),
+ header.len,
+ header.data_csum, mbg_csum(bufp, (unsigned)((header.len < sizeof(parsetime->parse_msg)) ? header.len : 0)));
}
}
-
+
return;
}
@@ -4621,11 +4652,11 @@ gps16x_poll(
)
{
struct parseunit *parse = peer->procptr->unitptr;
-
- static GPS_MSG_HDR sequence[] =
+
+ static GPS_MSG_HDR sequence[] =
{
{ GPS_SW_REV, 0, 0, 0 },
- { GPS_STAT, 0, 0, 0 },
+ { GPS_BVAR_STAT, 0, 0, 0 },
{ GPS_UTC, 0, 0, 0 },
{ GPS_ASCII_MSG, 0, 0, 0 },
{ GPS_ANT_INFO, 0, 0, 0 },
@@ -4639,41 +4670,41 @@ gps16x_poll(
unsigned char cmd_buffer[64];
unsigned char *outp = cmd_buffer;
GPS_MSG_HDR *header;
-
+
if (((poll_info_t *)parse->parse_type->cl_data)->rate)
{
parse->peer->procptr->nextaction = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
}
- if (sequence[parse->localstate].gps_cmd == (unsigned short)~0)
+ if (sequence[parse->localstate].cmd == (unsigned short)~0)
parse->localstate = 0;
-
+
header = sequence + parse->localstate++;
-
+
*outp++ = SOH; /* start command */
-
+
put_mbg_header(&outp, header);
outp = cmd_buffer + 1;
-
- header->gps_hdr_csum = (short)mbg_csum(outp, 6);
+
+ header->hdr_csum = (short)mbg_csum(outp, 6);
put_mbg_header(&outp, header);
-
+
#ifdef DEBUG
if (debug > 2)
{
char buffer[128];
-
+
mkreadable(buffer, sizeof(buffer), (char *)cmd_buffer, (unsigned)(outp - cmd_buffer), 1);
printf("PARSE receiver #%d: transmitted message #%ld (%d bytes) >%s<\n",
CLK_UNIT(parse->peer),
parse->localstate - 1,
(int)(outp - cmd_buffer),
- buffer);
+ buffer);
}
#endif
-
- rtc = write(parse->generic->io.fd, cmd_buffer, (unsigned long)(outp - cmd_buffer));
-
+
+ rtc = (int) write(parse->generic->io.fd, cmd_buffer, (unsigned long)(outp - cmd_buffer));
+
if (rtc < 0)
{
ERR(ERR_BADIO)
@@ -4722,7 +4753,7 @@ gps16x_poll_init(
return 1;
}
#endif /* CLOCK_MEINBERG */
-
+
/**===========================================================================
** clock polling support
**/
@@ -4735,11 +4766,11 @@ poll_dpoll(
struct parseunit *parse
)
{
- int rtc;
+ long rtc;
const char *ps = ((poll_info_t *)parse->parse_type->cl_data)->string;
- int ct = ((poll_info_t *)parse->parse_type->cl_data)->count;
+ long ct = ((poll_info_t *)parse->parse_type->cl_data)->count;
- rtc = write(parse->generic->io.fd, ps, (unsigned long)ct);
+ rtc = write(parse->generic->io.fd, ps, ct);
if (rtc < 0)
{
ERR(ERR_BADIO)
@@ -4749,7 +4780,7 @@ poll_dpoll(
if (rtc != ct)
{
ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd incomplete (%d of %d bytes sent)", CLK_UNIT(parse->peer), rtc, ct);
+ msyslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd incomplete (%ld of %ld bytes sent)", CLK_UNIT(parse->peer), rtc, ct);
}
clear_err(parse, ERR_BADIO);
}
@@ -4763,7 +4794,7 @@ poll_poll(
)
{
struct parseunit *parse = peer->procptr->unitptr;
-
+
if (parse->parse_type->cl_poll)
parse->parse_type->cl_poll(parse);
@@ -4789,7 +4820,7 @@ poll_init(
return 0;
}
-
+
/**===========================================================================
** Trimble support
**/
@@ -4819,7 +4850,7 @@ trimbletaip_init(
else
{
tio.c_cc[VEOL] = TRIMBLETAIP_EOL;
-
+
if (TTY_SETATTR(parse->generic->io.fd, &tio) == -1)
{
msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_init: tcsetattr(fd, &tio): %m", CLK_UNIT(parse->peer));
@@ -4838,7 +4869,7 @@ static const char *taipinit[] = {
">FTM00020001<",
(char *)0
};
-
+
static void
trimbletaip_event(
struct parseunit *parse,
@@ -4855,7 +4886,7 @@ trimbletaip_event(
iv = taipinit;
while (*iv)
{
- int rtc = write(parse->generic->io.fd, *iv, strlen(*iv));
+ int rtc = (int) write(parse->generic->io.fd, *iv, strlen(*iv));
if (rtc < 0)
{
msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_event: failed to send cmd to clock: %m", CLK_UNIT(parse->peer));
@@ -4863,7 +4894,7 @@ trimbletaip_event(
}
else
{
- if (rtc != strlen(*iv))
+ if (rtc != (int)strlen(*iv))
{
msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_event: failed to send cmd incomplete (%d of %d bytes sent)",
CLK_UNIT(parse->peer), rtc, (int)strlen(*iv));
@@ -4983,19 +5014,19 @@ union uval {
float fv;
double dv;
};
-
+
struct txbuf
{
short idx; /* index to first unused byte */
u_char *txt; /* pointer to actual data buffer */
};
-void sendcmd (struct txbuf *buf, int c);
-void sendbyte (struct txbuf *buf, int b);
-void sendetx (struct txbuf *buf, struct parseunit *parse);
-void sendint (struct txbuf *buf, int a);
-void sendflt (struct txbuf *buf, double a);
-
+void sendcmd (struct txbuf *buf, int c);
+void sendbyte (struct txbuf *buf, int b);
+void sendetx (struct txbuf *buf, struct parseunit *parse);
+void sendint (struct txbuf *buf, int a);
+void sendflt (struct txbuf *buf, double a);
+
void
sendcmd(
struct txbuf *buf,
@@ -5007,12 +5038,12 @@ sendcmd(
buf->idx = 2;
}
-void sendcmd (struct txbuf *buf, int c);
-void sendbyte (struct txbuf *buf, int b);
-void sendetx (struct txbuf *buf, struct parseunit *parse);
-void sendint (struct txbuf *buf, int a);
-void sendflt (struct txbuf *buf, double a);
-
+void sendcmd (struct txbuf *buf, int c);
+void sendbyte (struct txbuf *buf, int b);
+void sendetx (struct txbuf *buf, struct parseunit *parse);
+void sendint (struct txbuf *buf, int a);
+void sendflt (struct txbuf *buf, double a);
+
void
sendbyte(
struct txbuf *buf,
@@ -5044,18 +5075,18 @@ sendetx(
if (debug > 2)
{
char buffer[256];
-
+
mkreadable(buffer, sizeof(buffer), (char *)buf->txt, (unsigned)buf->idx, 1);
printf("PARSE receiver #%d: transmitted message (%d bytes) >%s<\n",
CLK_UNIT(parse->peer),
- buf->idx, buffer);
+ buf->idx, buffer);
}
#endif
clear_err(parse, ERR_BADIO);
}
}
-void
+void
sendint(
struct txbuf *buf,
int a
@@ -5075,7 +5106,7 @@ sendflt(
int i;
union uval uval;
- uval.fv = a;
+ uval.fv = (float) a;
#ifdef WORDS_BIGENDIAN
for (i=0; i<=3; i++)
#else
@@ -5107,12 +5138,12 @@ trimbletsip_setup(
if (t)
t->last_reset = current_time;
-
+
buf.txt = buffer;
-
+
sendcmd(&buf, CMD_CVERSION); /* request software versions */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_COPERPARAM); /* set operating parameters */
sendbyte(&buf, 4); /* static */
sendflt(&buf, 5.0*D2R); /* elevation angle mask = 10 deg XXX */
@@ -5120,25 +5151,25 @@ trimbletsip_setup(
sendflt(&buf, 12.0); /* PDOP mask = 12 */
sendflt(&buf, 8.0); /* PDOP switch level = 8 */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CMODESEL); /* fix mode select */
sendbyte(&buf, 1); /* time transfer mode */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CMESSAGE); /* request system message */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CSUPER); /* superpacket fix */
sendbyte(&buf, 0x2); /* binary mode */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CIOOPTIONS); /* set I/O options */
sendbyte(&buf, TRIM_POS_OPT); /* position output */
sendbyte(&buf, 0x00); /* no velocity output */
sendbyte(&buf, TRIM_TIME_OPT); /* UTC, compute on seconds */
sendbyte(&buf, 0x00); /* no raw measurements */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CUTCPARAM); /* request UTC correction data */
sendetx(&buf, parse);
@@ -5162,7 +5193,7 @@ trimble_check(
u_char buffer[256];
struct txbuf buf;
buf.txt = buffer;
-
+
if (t)
{
if (current_time > t->last_msg + TRIMBLETSIP_IDLE_TIME)
@@ -5170,18 +5201,18 @@ trimble_check(
}
poll_poll(parse->peer); /* emit query string and re-arm timer */
-
+
if (t && t->qtracking)
{
u_long oldsats = t->ltrack & ~t->ctrack;
-
+
t->qtracking = 0;
t->ltrack = t->ctrack;
-
+
if (oldsats)
{
int i;
-
+
for (i = 0; oldsats; i++) {
if (oldsats & (1 << i))
{
@@ -5192,7 +5223,7 @@ trimble_check(
oldsats &= ~(1 << i);
}
}
-
+
sendcmd(&buf, CMD_CSTATTRACK);
sendbyte(&buf, 0x00); /* current tracking set */
sendetx(&buf, parse);
@@ -5207,7 +5238,7 @@ trimbletsip_end(
struct parseunit *parse
)
{ trimble_t *t = parse->localdata;
-
+
if (t)
{
free(t);
@@ -5238,9 +5269,9 @@ trimbletsip_init(
if (!parse->localdata)
{
trimble_t *t;
-
+
t = (trimble_t *)(parse->localdata = emalloc(sizeof(trimble_t)));
-
+
if (t)
{
memset((char *)t, 0, sizeof(trimble_t));
@@ -5320,7 +5351,7 @@ getflt(
)
{
union uval uval;
-
+
#ifdef WORDS_BIGENDIAN
uval.bd[0] = *bp++;
uval.bd[1] = *bp++;
@@ -5341,7 +5372,7 @@ getdbl(
)
{
union uval uval;
-
+
#ifdef WORDS_BIGENDIAN
uval.bd[0] = *bp++;
uval.bd[1] = *bp++;
@@ -5369,7 +5400,7 @@ getshort(
unsigned char *p
)
{
- return get_msb_short(&p);
+ return (int) get_msb_short(&p);
}
/*--------------------------------------------------
@@ -5386,7 +5417,7 @@ trimbletsip_message(
{
unsigned char *buffer = parsetime->parse_msg;
unsigned int size = parsetime->parse_msglen;
-
+
if ((size < 4) ||
(buffer[0] != DLE) ||
(buffer[size-1] != ETX) ||
@@ -5394,7 +5425,7 @@ trimbletsip_message(
{
#ifdef DEBUG
if (debug > 2) {
- int i;
+ size_t i;
printf("TRIMBLE BAD packet, size %d:\n ", size);
for (i = 0; i < size; i++) {
@@ -5408,16 +5439,16 @@ trimbletsip_message(
}
else
{
- int var_flag;
+ u_short var_flag;
trimble_t *tr = parse->localdata;
unsigned int cmd = buffer[1];
char pbuffer[200];
char *t = pbuffer;
cmd_info_t *s;
-
+
#ifdef DEBUG
if (debug > 3) {
- int i;
+ size_t i;
printf("TRIMBLE packet 0x%02x, size %d:\n ", cmd, size);
for (i = 0; i < size; i++) {
@@ -5430,12 +5461,12 @@ trimbletsip_message(
if (tr)
tr->last_msg = current_time;
-
+
s = trimble_convert(cmd, trimble_rcmds);
-
+
if (s)
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%s=\"", s->varname);
+ t = ap(pbuffer, sizeof(pbuffer), t, "%s=\"", s->varname);
}
else
{
@@ -5443,47 +5474,43 @@ trimbletsip_message(
return;
}
- var_flag = s->varmode;
+ var_flag = (u_short) s->varmode;
- t += strlen(t);
-
switch(cmd)
{
case CMD_RCURTIME:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%f, %d, %f",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%f, %d, %f",
getflt((unsigned char *)&mb(0)), getshort((unsigned char *)&mb(4)),
getflt((unsigned char *)&mb(6)));
break;
-
+
case CMD_RBEST4:
- strlcpy(t, "mode: ", BUFFER_SIZE(pbuffer, t));
- t += strlen(t);
+ t = ap(pbuffer, sizeof(pbuffer), t, "mode: ");
switch (mb(0) & 0xF)
{
default:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "0x%x", mb(0) & 0x7);
+ t = ap(pbuffer, sizeof(pbuffer), t,
+ "0x%x", mb(0) & 0x7);
break;
case 1:
- strlcpy(t, "0D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "0D");
break;
-
+
case 3:
- strlcpy(t, "2D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "2D");
break;
-
+
case 4:
- strlcpy(t, "3D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "3D");
break;
}
- t += strlen(t);
if (mb(0) & 0x10)
- strlcpy(t, "-MANUAL, ", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "-MANUAL, ");
else
- strlcpy(t, "-AUTO, ", BUFFER_SIZE(pbuffer, t));
- t += strlen(t);
-
- snprintf(t, BUFFER_SIZE(pbuffer, t), "satellites %02d %02d %02d %02d, PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f",
+ t = ap(pbuffer, sizeof(pbuffer), t, "-AUTO, ");
+
+ t = ap(pbuffer, sizeof(pbuffer), t, "satellites %02d %02d %02d %02d, PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f",
mb(1), mb(2), mb(3), mb(4),
getflt((unsigned char *)&mb(5)),
getflt((unsigned char *)&mb(9)),
@@ -5491,12 +5518,12 @@ trimbletsip_message(
getflt((unsigned char *)&mb(17)));
break;
-
+
case CMD_RVERSION:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%d.%d (%d/%d/%d)",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%d.%d (%d/%d/%d)",
mb(0)&0xff, mb(1)&0xff, 1900+(mb(4)&0xff), mb(2)&0xff, mb(3)&0xff);
break;
-
+
case CMD_RRECVHEALTH:
{
static const char *msgs[] =
@@ -5510,57 +5537,54 @@ trimbletsip_message(
"<BIT 6>",
"<BIT 7>"
};
-
+
int i, bits;
-
+
switch (mb(0) & 0xFF)
{
default:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "illegal value 0x%02x", mb(0) & 0xFF);
+ t = ap(pbuffer, sizeof(pbuffer), t, "illegal value 0x%02x", mb(0) & 0xFF);
break;
case 0x00:
- strlcpy(t, "doing position fixes", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "doing position fixes");
break;
case 0x01:
- strlcpy(t, "no GPS time yet", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "no GPS time yet");
break;
case 0x03:
- strlcpy(t, "PDOP too high", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "PDOP too high");
break;
case 0x08:
- strlcpy(t, "no usable satellites", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "no usable satellites");
break;
case 0x09:
- strlcpy(t, "only ONE usable satellite", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "only ONE usable satellite");
break;
case 0x0A:
- strlcpy(t, "only TWO usable satellites", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "only TWO usable satellites");
break;
case 0x0B:
- strlcpy(t, "only THREE usable satellites", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "only THREE usable satellites");
break;
case 0x0C:
- strlcpy(t, "the chosen satellite is unusable", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "the chosen satellite is unusable");
break;
}
- t += strlen(t);
-
bits = mb(1) & 0xFF;
-
+
for (i = 0; i < 8; i++)
if (bits & (0x1<<i))
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), ", %s", msgs[i]);
- t += strlen(t);
+ t = ap(pbuffer, sizeof(pbuffer), t, ", %s", msgs[i]);
}
}
break;
-
+
case CMD_RMESSAGE:
mkreadable(t, (int)BUFFER_SIZE(pbuffer, t), (char *)&mb(0), (unsigned)(size - 2 - (&mb(0) - buffer)), 0);
break;
-
+
case CMD_RMACHSTAT:
{
static const char *msgs[] =
@@ -5574,39 +5598,36 @@ trimbletsip_message(
"<BIT 6>",
"<BIT 7>"
};
-
+
int i, bits;
- snprintf(t, BUFFER_SIZE(pbuffer, t), "machine id 0x%02x", mb(0) & 0xFF);
- t += strlen(t);
-
+ t = ap(pbuffer, sizeof(pbuffer), t, "machine id 0x%02x", mb(0) & 0xFF);
bits = mb(1) & 0xFF;
-
+
for (i = 0; i < 8; i++)
if (bits & (0x1<<i))
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), ", %s", msgs[i]);
- t += strlen(t);
+ t = ap(pbuffer, sizeof(pbuffer), t, ", %s", msgs[i]);
}
- snprintf(t, BUFFER_SIZE(pbuffer, t), ", Superpackets %ssupported", (mb(2) & 0xFF) ? "" :"un" );
+ t = ap(pbuffer, sizeof(pbuffer), t, ", Superpackets %ssupported", (mb(2) & 0xFF) ? "" :"un" );
}
break;
-
+
case CMD_ROPERPARAM:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%2x %.1f %.1f %.1f %.1f",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%2x %.1f %.1f %.1f %.1f",
mb(0), getflt((unsigned char *)&mb(1)), getflt((unsigned char *)&mb(5)),
getflt((unsigned char *)&mb(9)), getflt((unsigned char *)&mb(13)));
break;
-
+
case CMD_RUTCPARAM:
{
float t0t = getflt((unsigned char *)&mb(14));
- short wnt = getshort((unsigned char *)&mb(18));
- short dtls = getshort((unsigned char *)&mb(12));
- short wnlsf = getshort((unsigned char *)&mb(20));
- short dn = getshort((unsigned char *)&mb(22));
- short dtlsf = getshort((unsigned char *)&mb(24));
+ short wnt = (short) getshort((unsigned char *)&mb(18));
+ short dtls = (short) getshort((unsigned char *)&mb(12));
+ short wnlsf = (short) getshort((unsigned char *)&mb(20));
+ short dn = (short) getshort((unsigned char *)&mb(22));
+ short dtlsf = (short) getshort((unsigned char *)&mb(24));
if ((int)t0t != 0)
{
@@ -5614,19 +5635,19 @@ trimbletsip_message(
}
else
{
- strlcpy(t, "<NO UTC DATA>", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "<NO UTC DATA>");
}
}
break;
case CMD_RSAT1BIAS:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%.1fm %.2fm/s at %.1fs",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%.1fm %.2fm/s at %.1fs",
getflt(&mb(0)), getflt(&mb(4)), getflt(&mb(8)));
break;
case CMD_RIOOPTIONS:
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%02x %02x %02x %02x",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%02x %02x %02x %02x",
mb(0), mb(1), mb(2), mb(3));
if (mb(0) != TRIM_POS_OPT ||
mb(2) != TRIM_TIME_OPT)
@@ -5635,18 +5656,18 @@ trimbletsip_message(
}
}
break;
-
+
case CMD_RSPOSXYZ:
{
double x = getflt((unsigned char *)&mb(0));
double y = getflt((unsigned char *)&mb(4));
double z = getflt((unsigned char *)&mb(8));
double f = getflt((unsigned char *)&mb(12));
-
+
if (f > 0.0)
- snprintf(t, BUFFER_SIZE(pbuffer, t), "x= %.1fm, y= %.1fm, z= %.1fm, time_of_fix= %f sec",
- x, y, z,
- f);
+ t = ap(pbuffer, sizeof(pbuffer), t, "x= %.1fm, y= %.1fm, z= %.1fm, time_of_fix= %f sec",
+ x, y, z,
+ f);
else
return;
}
@@ -5657,12 +5678,12 @@ trimbletsip_message(
double lat = getflt((unsigned char *)&mb(0));
double lng = getflt((unsigned char *)&mb(4));
double f = getflt((unsigned char *)&mb(12));
-
+
if (f > 0.0)
- snprintf(t, BUFFER_SIZE(pbuffer, t), "lat %f %c, long %f %c, alt %.2fm",
- ((lat < 0.0) ? (-lat) : (lat))*RTOD, (lat < 0.0 ? 'S' : 'N'),
- ((lng < 0.0) ? (-lng) : (lng))*RTOD, (lng < 0.0 ? 'W' : 'E'),
- getflt((unsigned char *)&mb(8)));
+ t = ap(pbuffer, sizeof(pbuffer), t, "lat %f %c, long %f %c, alt %.2fm",
+ ((lat < 0.0) ? (-lat) : (lat))*RTOD, (lat < 0.0 ? 'S' : 'N'),
+ ((lng < 0.0) ? (-lng) : (lng))*RTOD, (lng < 0.0 ? 'W' : 'E'),
+ getflt((unsigned char *)&mb(8)));
else
return;
}
@@ -5673,16 +5694,16 @@ trimbletsip_message(
double x = getdbl((unsigned char *)&mb(0));
double y = getdbl((unsigned char *)&mb(8));
double z = getdbl((unsigned char *)&mb(16));
- snprintf(t, BUFFER_SIZE(pbuffer, t), "x= %.1fm, y= %.1fm, z= %.1fm",
- x, y, z);
+ t = ap(pbuffer, sizeof(pbuffer), t, "x= %.1fm, y= %.1fm, z= %.1fm",
+ x, y, z);
}
break;
-
+
case CMD_RDOUBLELLA:
{
double lat = getdbl((unsigned char *)&mb(0));
double lng = getdbl((unsigned char *)&mb(8));
- snprintf(t, BUFFER_SIZE(pbuffer, t), "lat %f %c, lon %f %c, alt %.2fm",
+ t = ap(pbuffer, sizeof(pbuffer), t, "lat %f %c, lon %f %c, alt %.2fm",
((lat < 0.0) ? (-lat) : (lat))*RTOD, (lat < 0.0 ? 'S' : 'N'),
((lng < 0.0) ? (-lng) : (lng))*RTOD, (lng < 0.0 ? 'W' : 'E'),
getdbl((unsigned char *)&mb(16)));
@@ -5692,44 +5713,39 @@ trimbletsip_message(
case CMD_RALLINVIEW:
{
int i, sats;
-
- strlcpy(t, "mode: ", BUFFER_SIZE(pbuffer, t));
- t += strlen(t);
+
+ t = ap(pbuffer, sizeof(pbuffer), t, "mode: ");
switch (mb(0) & 0x7)
{
default:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "0x%x", mb(0) & 0x7);
+ t = ap(pbuffer, sizeof(pbuffer), t, "0x%x", mb(0) & 0x7);
break;
case 3:
- strlcpy(t, "2D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "2D");
break;
-
+
case 4:
- strlcpy(t, "3D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "3D");
break;
}
- t += strlen(t);
if (mb(0) & 0x8)
- strlcpy(t, "-MANUAL, ", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "-MANUAL, ");
else
- strlcpy(t, "-AUTO, ", BUFFER_SIZE(pbuffer, t));
- t += strlen(t);
-
+ t = ap(pbuffer, sizeof(pbuffer), t, "-AUTO, ");
+
sats = (mb(0)>>4) & 0xF;
-
- snprintf(t, BUFFER_SIZE(pbuffer, t), "PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f, %d satellite%s in view: ",
+
+ t = ap(pbuffer, sizeof(pbuffer), t, "PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f, %d satellite%s in view: ",
getflt((unsigned char *)&mb(1)),
getflt((unsigned char *)&mb(5)),
getflt((unsigned char *)&mb(9)),
getflt((unsigned char *)&mb(13)),
sats, (sats == 1) ? "" : "s");
- t += strlen(t);
for (i=0; i < sats; i++)
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%s%02d", i ? ", " : "", mb(17+i));
- t += strlen(t);
+ t = ap(pbuffer, sizeof(pbuffer), t, "%s%02d", i ? ", " : "", mb(17+i));
if (tr)
tr->ctrack |= (1 << (mb(17+i)-1));
}
@@ -5740,60 +5756,54 @@ trimbletsip_message(
}
}
break;
-
+
case CMD_RSTATTRACK:
{
- snprintf(t-2, BUFFER_SIZE(pbuffer, t-2), "[%02d]=\"", mb(0)); /* add index to var name */
- t += strlen(t);
-
+ t = ap(pbuffer, sizeof(pbuffer), t-2, "[%02d]=\"", mb(0)); /* add index to var name */
if (getflt((unsigned char *)&mb(4)) < 0.0)
{
- strlcpy(t, "<NO MEASUREMENTS>", BUFFER_SIZE(pbuffer, t));
- var_flag &= ~DEF;
+ t = ap(pbuffer, sizeof(pbuffer), t, "<NO MEASUREMENTS>");
+ var_flag &= (u_short)(~DEF);
}
else
- {
- snprintf(t, BUFFER_SIZE(pbuffer, t), "ch=%d, acq=%s, eph=%d, signal_level= %5.2f, elevation= %5.2f, azimuth= %6.2f",
+ {
+ t = ap(pbuffer, sizeof(pbuffer), t, "ch=%d, acq=%s, eph=%d, signal_level= %5.2f, elevation= %5.2f, azimuth= %6.2f",
(mb(1) & 0xFF)>>3,
mb(2) ? ((mb(2) == 1) ? "ACQ" : "SRCH") : "NEVER",
mb(3),
getflt((unsigned char *)&mb(4)),
getflt((unsigned char *)&mb(12)) * RTOD,
getflt((unsigned char *)&mb(16)) * RTOD);
- t += strlen(t);
if (mb(20))
{
- var_flag &= ~DEF;
- strlcpy(t, ", OLD", BUFFER_SIZE(pbuffer, t));
+ var_flag &= (u_short)(~DEF);
+ t = ap(pbuffer, sizeof(pbuffer), t, ", OLD");
}
- t += strlen(t);
if (mb(22))
{
if (mb(22) == 1)
- strlcpy(t, ", BAD PARITY", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, ", BAD PARITY");
else
if (mb(22) == 2)
- strlcpy(t, ", BAD EPH HEALTH", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, ", BAD EPH HEALTH");
}
- t += strlen(t);
if (mb(23))
- strlcpy(t, ", collecting data", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, ", collecting data");
}
}
break;
-
+
default:
- strlcpy(t, "<UNDECODED>", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "<UNDECODED>");
break;
}
- t += strlen(t);
- strlcpy(t,"\"", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "\"");
set_var(&parse->kv, pbuffer, sizeof(pbuffer), var_flag);
}
}
-
+
/**============================================================
** RAWDCF support
**/
diff --git a/ntpd/refclock_pcf.c b/ntpd/refclock_pcf.c
index 4379832..45b3475 100644
--- a/ntpd/refclock_pcf.c
+++ b/ntpd/refclock_pcf.c
@@ -140,7 +140,7 @@ pcf_poll(
pp = peer->procptr;
buf[0] = 0;
- if (read(pp->io.fd, buf, sizeof(buf)) < sizeof(buf) || buf[0] != 9) {
+ if (read(pp->io.fd, buf, sizeof(buf)) < (ssize_t)sizeof(buf) || buf[0] != 9) {
refclock_report(peer, CEVNT_FAULT);
return;
}
diff --git a/ntpd/refclock_ripencc.c b/ntpd/refclock_ripencc.c
index 75d8f38..602ca9d 100644
--- a/ntpd/refclock_ripencc.c
+++ b/ntpd/refclock_ripencc.c
@@ -680,7 +680,7 @@ ripencc_ppsapi(
"refclock_ripencc: time_pps_kcbind failed: %m");
return (0);
}
- pps_enable = 1;
+ hardpps_enable = 1;
}
peer->precision = PPS_PRECISION;
diff --git a/ntpd/refclock_shm.c b/ntpd/refclock_shm.c
index 6540e6f..7174abd 100644
--- a/ntpd/refclock_shm.c
+++ b/ntpd/refclock_shm.c
@@ -51,13 +51,17 @@
#define NSAMPLES 3 /* stages of median filter */
/*
+ * Mode flags
+ */
+#define SHM_MODE_PRIVATE 0x0001
+
+/*
* Function prototypes
*/
static int shm_start (int unit, struct peer *peer);
static void shm_shutdown (int unit, struct peer *peer);
static void shm_poll (int unit, struct peer *peer);
static void shm_timer (int unit, struct peer *peer);
-static void shm_peek (int unit, struct peer *peer);
static void shm_clockstats (int unit, struct peer *peer);
static void shm_control (int unit, const struct refclockstat * in_st,
struct refclockstat * out_st, struct peer *peer);
@@ -100,6 +104,7 @@ struct shmTime {
struct shmunit {
struct shmTime *shm; /* pointer to shared memory segment */
+ int forall; /* access for all UIDs? */
/* debugging/monitoring counters - reset when printed */
int ticks; /* number of attempts to read data*/
@@ -112,76 +117,87 @@ struct shmunit {
time_t max_delay; /* age/stale limit */
};
+static struct shmTime*
+getShmTime(
+ int unit,
+ int/*BOOL*/ forall
+ )
+{
+ struct shmTime *p = NULL;
-struct shmTime *getShmTime(int);
-
-struct shmTime *getShmTime (int unit) {
#ifndef SYS_WINNT
- int shmid=0;
+
+ int shmid;
/* 0x4e545030 is NTP0.
* Big units will give non-ascii but that's OK
* as long as everybody does it the same way.
*/
- shmid=shmget (0x4e545030 + unit, sizeof (struct shmTime),
- IPC_CREAT | ((unit < 2) ? 0600 : 0666));
+ shmid=shmget(0x4e545030 + unit, sizeof (struct shmTime),
+ IPC_CREAT | (forall ? 0666 : 0600));
if (shmid == -1) { /* error */
msyslog(LOG_ERR, "SHM shmget (unit %d): %m", unit);
- return 0;
+ return NULL;
}
- else { /* no error */
- struct shmTime *p = (struct shmTime *)shmat (shmid, 0, 0);
- if (p == (struct shmTime *)-1) { /* error */
- msyslog(LOG_ERR, "SHM shmat (unit %d): %m", unit);
- return 0;
- }
- return p;
+ p = (struct shmTime *)shmat (shmid, 0, 0);
+ if (p == (struct shmTime *)-1) { /* error */
+ msyslog(LOG_ERR, "SHM shmat (unit %d): %m", unit);
+ return NULL;
}
+ return p;
+
#else
- char buf[10];
+
+ static const char * nspref[2] = { "Local", "Global" };
+ char buf[20];
LPSECURITY_ATTRIBUTES psec = 0;
HANDLE shmid = 0;
SECURITY_DESCRIPTOR sd;
SECURITY_ATTRIBUTES sa;
+ unsigned int numch;
- snprintf(buf, sizeof(buf), "NTP%d", unit);
- if (unit >= 2) { /* world access */
+ numch = snprintf(buf, sizeof(buf), "%s\\NTP%d",
+ nspref[forall != 0], (unit & 0xFF));
+ if (numch >= sizeof(buf)) {
+ msyslog(LOG_ERR, "SHM name too long (unit %d)", unit);
+ return NULL;
+ }
+ if (forall) { /* world access */
if (!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION)) {
msyslog(LOG_ERR,"SHM InitializeSecurityDescriptor (unit %d): %m", unit);
- return 0;
+ return NULL;
}
- if (!SetSecurityDescriptorDacl(&sd, 1, 0, 0)) {
+ if (!SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE)) {
msyslog(LOG_ERR, "SHM SetSecurityDescriptorDacl (unit %d): %m", unit);
- return 0;
+ return NULL;
}
- sa.nLength=sizeof (SECURITY_ATTRIBUTES);
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = &sd;
- sa.bInheritHandle = 0;
+ sa.bInheritHandle = FALSE;
psec = &sa;
}
shmid = CreateFileMapping ((HANDLE)0xffffffff, psec, PAGE_READWRITE,
- 0, sizeof (struct shmTime), buf);
- if (!shmid) { /*error*/
- char buf[1000];
-
+ 0, sizeof (struct shmTime), buf);
+ if (shmid == NULL) { /*error*/
+ char buf[1000];
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
0, GetLastError (), 0, buf, sizeof (buf), 0);
msyslog(LOG_ERR, "SHM CreateFileMapping (unit %d): %s", unit, buf);
- return 0;
- } else {
- struct shmTime *p = (struct shmTime *) MapViewOfFile (shmid,
- FILE_MAP_WRITE, 0, 0, sizeof (struct shmTime));
- if (p == 0) { /*error*/
- char buf[1000];
-
- FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
- 0, GetLastError (), 0, buf, sizeof (buf), 0);
- msyslog(LOG_ERR,"SHM MapViewOfFile (unit %d): %s", unit, buf)
- return 0;
- }
- return p;
+ return NULL;
}
+ p = (struct shmTime *)MapViewOfFile(shmid, FILE_MAP_WRITE, 0, 0,
+ sizeof (struct shmTime));
+ if (p == NULL) { /*error*/
+ char buf[1000];
+ FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
+ 0, GetLastError (), 0, buf, sizeof (buf), 0);
+ msyslog(LOG_ERR,"SHM MapViewOfFile (unit %d): %s", unit, buf);
+ return NULL;
+ }
+
#endif
+
+ return p;
}
/*
* shm_start - attach to shared memory
@@ -192,18 +208,17 @@ shm_start(
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = emalloc_zero(sizeof(*up));
- pp = peer->procptr;
pp->io.clock_recv = noentry;
pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = -1;
- up = emalloc_zero(sizeof(*up));
+ up->forall = (unit >= 2) && !(peer->ttl & SHM_MODE_PRIVATE);
- up->shm = getShmTime(unit);
+ up->shm = getShmTime(unit, up->forall);
/*
* Initialize miscellaneous peer variables
@@ -243,12 +258,12 @@ shm_control(
struct peer * peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
-
- pp = peer->procptr;
- up = pp->unitptr;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
+ UNUSED_ARG(unit);
+ UNUSED_ARG(in_st);
+ UNUSED_ARG(out_st);
if (NULL == up)
return;
if (pp->sloppyclockflag & CLK_FLAG1)
@@ -269,31 +284,23 @@ shm_shutdown(
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
-
- pp = peer->procptr;
- up = pp->unitptr;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
+ UNUSED_ARG(unit);
if (NULL == up)
return;
#ifndef SYS_WINNT
+
/* HMS: shmdt() wants char* or const void * */
- (void) shmdt ((char *)up->shm);
+ (void)shmdt((char *)up->shm);
+
#else
- UnmapViewOfFile (up->shm);
-#endif
- free(up);
-}
+ UnmapViewOfFile(up->shm);
-/*
- * shm_timer - called every second
- */
-static void
-shm_timer(int unit, struct peer *peer)
-{
- shm_peek(unit, peer);
+#endif
+ free(up);
}
@@ -306,13 +313,10 @@ shm_poll(
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
int major_error;
- pp = peer->procptr;
- up = pp->unitptr;
-
pp->polls++;
/* get dominant reason if we have no samples at all */
@@ -345,16 +349,18 @@ shm_poll(
}
/*
- * shm_peek - try to grab a sample
+ * shm_timer - called onece every second.
+ *
+ * This tries to grab a sample from the SHM segment
*/
static void
-shm_peek(
+shm_timer(
int unit,
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
/* access order is important for lock-free SHM access; we
** enforce order by treating the whole structure volatile.
@@ -383,19 +389,16 @@ shm_peek(
* This is the main routine. It snatches the time from the shm
* board and tacks on a local timestamp.
*/
- pp = peer->procptr;
- up = pp->unitptr;
up->ticks++;
- if (up->shm == 0) {
+ if ((shm = up->shm) == NULL) {
/* try to map again - this may succeed if meanwhile some-
body has ipcrm'ed the old (unaccessible) shared mem segment */
- up->shm = getShmTime(unit);
- }
- shm = up->shm;
- if (shm == 0) {
- DPRINTF(1, ("%s: no SHM segment\n",
- refnumtoa(&peer->srcadr)));
- return;
+ shm = up->shm = getShmTime(unit, up->forall);
+ if (shm == NULL) {
+ DPRINTF(1, ("%s: no SHM segment\n",
+ refnumtoa(&peer->srcadr)));
+ return;
+ }
}
if ( ! shm->valid) {
DPRINTF(1, ("%s: SHM not ready\n",
@@ -542,28 +545,17 @@ static void shm_clockstats(
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
- char logbuf[64];
- unsigned int llen;
-
- pp = peer->procptr;
- up = pp->unitptr;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
+ UNUSED_ARG(unit);
if (pp->sloppyclockflag & CLK_FLAG4) {
- /* if snprintf() returns a negative values on errors
- ** (some older ones do) make sure we are NUL
- ** terminated. Using an unsigned result does the trick.
- */
- llen = snprintf(logbuf, sizeof(logbuf),
- "%3d %3d %3d %3d %3d",
- up->ticks, up->good, up->notready,
- up->bad, up->clash);
- logbuf[min(llen, sizeof(logbuf)-1)] = '\0';
- record_clock_stats(&peer->srcadr, logbuf);
+ mprintf_clock_stats(
+ &peer->srcadr, "%3d %3d %3d %3d %3d",
+ up->ticks, up->good, up->notready,
+ up->bad, up->clash);
}
up->ticks = up->good = up->notready = up->bad = up->clash = 0;
-
}
#else
diff --git a/ntpd/refclock_true.c b/ntpd/refclock_true.c
index 36ade81..7a5c491 100644
--- a/ntpd/refclock_true.c
+++ b/ntpd/refclock_true.c
@@ -215,6 +215,7 @@ struct refclock refclock_true = {
#if !defined(__STDC__)
# define true_debug (void)
#else
+NTP_PRINTF(2, 3)
static void
true_debug(struct peer *peer, const char *fmt, ...)
{
diff --git a/ntpd/refclock_wwv.c b/ntpd/refclock_wwv.c
index 14183b4..79c0afd 100644
--- a/ntpd/refclock_wwv.c
+++ b/ntpd/refclock_wwv.c
@@ -1338,7 +1338,7 @@ wwv_qrz(
if (sp->reach & (1 << AMAX))
sp->count--;
if (sp->synmax > ATHR && sp->synsnr > ASNR) {
- if (abs(epoch) < AWND * MS) {
+ if (labs(epoch) < AWND * MS) {
sp->reach |= 1;
sp->count++;
sp->mepoch = sp->lastpos = sp->pos;
@@ -1540,14 +1540,14 @@ wwv_endpoc(
*/
dtemp = (mepoch - zepoch) % WWV_SEC;
if (up->status & FGATE) {
- if (abs(dtemp) < MAXFREQ * MINAVG) {
+ if (fabs(dtemp) < MAXFREQ * MINAVG) {
up->freq += (dtemp / 2.) / ((mcount - zcount) *
FCONST);
if (up->freq > MAXFREQ)
up->freq = MAXFREQ;
else if (up->freq < -MAXFREQ)
up->freq = -MAXFREQ;
- if (abs(dtemp) < MAXFREQ * MINAVG / 2.) {
+ if (fabs(dtemp) < MAXFREQ * MINAVG / 2.) {
if (avginc < 3) {
avginc++;
} else {
diff --git a/ntpdate/Makefile.in b/ntpdate/Makefile.in
index d961900..0dcac19 100644
--- a/ntpdate/Makefile.in
+++ b/ntpdate/Makefile.in
@@ -48,8 +48,7 @@ subdir = ntpdate
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -60,6 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -77,6 +77,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -152,6 +154,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -186,7 +189,9 @@ 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@
@@ -325,6 +330,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpdate/ntpdate.c b/ntpdate/ntpdate.c
index 16569f3..08edc8b 100644
--- a/ntpdate/ntpdate.c
+++ b/ntpdate/ntpdate.c
@@ -751,7 +751,7 @@ receive(
*/
if (rbufp->recv_length == LEN_PKT_NOMAC)
has_mac = 0;
- else if (rbufp->recv_length >= LEN_PKT_NOMAC)
+ else if (rbufp->recv_length >= (int)LEN_PKT_NOMAC)
has_mac = 1;
else {
if (debug)
diff --git a/ntpdc/Makefile.in b/ntpdc/Makefile.in
index b31604d..0bb1e30 100644
--- a/ntpdc/Makefile.in
+++ b/ntpdc/Makefile.in
@@ -50,8 +50,7 @@ subdir = ntpdc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -62,6 +61,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -79,6 +79,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -186,6 +188,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -220,7 +223,9 @@ 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@
@@ -359,6 +364,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpdc/invoke-ntpdc.texi b/ntpdc/invoke-ntpdc.texi
index 57c73e5..246e51e 100644
--- a/ntpdc/invoke-ntpdc.texi
+++ b/ntpdc/invoke-ntpdc.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:57:32 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:26:32 AM by AutoGen 5.18.5pre4
# From the definitions ntpdc-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -76,7 +76,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpdc - vendor-specific NTPD control program - Ver. 4.2.7p482
+ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2
Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpdc/ntpdc-opts.c b/ntpdc/ntpdc-opts.c
index 8e595a4..94ccea7 100644
--- a/ntpdc/ntpdc-opts.c
+++ b/ntpdc/ntpdc-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed December 2, 2014 at 08:57:15 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpdc program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -50,7 +50,7 @@ extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright (ntpdc_opt_strs+0)
-#define zLicenseDescrip (ntpdc_opt_strs+315)
+#define zLicenseDescrip (ntpdc_opt_strs+341)
/*
* global included definitions
@@ -68,84 +68,85 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpdc options
*/
-static char const ntpdc_opt_strs[1861] =
-/* 0 */ "ntpdc 4.2.7p482\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const ntpdc_opt_strs[1911] =
+/* 0 */ "ntpdc 4.2.8p2\n"
+ "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
" <http://ntp.org/license>\n"
" <http://opensource.org/licenses/ntp-license.php>\n\0"
-/* 315 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 341 */ "Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose with or without fee is hereby granted,\n"
"provided that the above copyright notice appears in all copies and that\n"
"both the copyright notice and this permission notice appear in supporting\n"
"documentation, and that the name The University of Delaware not be used in\n"
"advertising or publicity pertaining to distribution of the software without\n"
- "specific, written prior permission. The University of Delaware makes no\n"
- "representations about the suitability this software for any purpose. It is\n"
- "provided \"as is\" without express or implied warranty.\n\0"
-/* 955 */ "Force IPv4 DNS name resolution\0"
-/* 986 */ "IPV4\0"
-/* 991 */ "ipv4\0"
-/* 996 */ "Force IPv6 DNS name resolution\0"
-/* 1027 */ "IPV6\0"
-/* 1032 */ "ipv6\0"
-/* 1037 */ "run a command and exit\0"
-/* 1060 */ "COMMAND\0"
-/* 1068 */ "command\0"
-/* 1076 */ "Increase debug verbosity level\0"
-/* 1107 */ "DEBUG_LEVEL\0"
-/* 1119 */ "debug-level\0"
-/* 1131 */ "Set the debug verbosity level\0"
-/* 1161 */ "SET_DEBUG_LEVEL\0"
-/* 1177 */ "set-debug-level\0"
-/* 1193 */ "Force ntpq to operate in interactive mode\0"
-/* 1235 */ "INTERACTIVE\0"
-/* 1247 */ "interactive\0"
-/* 1259 */ "Print a list of the peers\0"
-/* 1285 */ "LISTPEERS\0"
-/* 1295 */ "listpeers\0"
-/* 1305 */ "numeric host addresses\0"
-/* 1328 */ "NUMERIC\0"
-/* 1336 */ "numeric\0"
-/* 1344 */ "PEERS\0"
-/* 1350 */ "peers\0"
-/* 1356 */ "Show a list of the peers\0"
-/* 1381 */ "SHOWPEERS\0"
-/* 1391 */ "showpeers\0"
-/* 1401 */ "display extended usage information and exit\0"
-/* 1445 */ "help\0"
-/* 1450 */ "extended usage information passed thru pager\0"
-/* 1495 */ "more-help\0"
-/* 1505 */ "output version information and exit\0"
-/* 1541 */ "version\0"
-/* 1549 */ "save the option state to a config file\0"
-/* 1588 */ "save-opts\0"
-/* 1598 */ "load options from a config file\0"
-/* 1630 */ "LOAD_OPTS\0"
-/* 1640 */ "no-load-opts\0"
-/* 1653 */ "no\0"
-/* 1656 */ "NTPDC\0"
-/* 1662 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.7p482\n"
+ "specific, written prior permission. The University of Delaware and Network\n"
+ "Time Foundation makes no representations about the suitability this\n"
+ "software for any purpose. It is provided \"as is\" without express or\n"
+ "implied warranty.\n\0"
+/* 1009 */ "Force IPv4 DNS name resolution\0"
+/* 1040 */ "IPV4\0"
+/* 1045 */ "ipv4\0"
+/* 1050 */ "Force IPv6 DNS name resolution\0"
+/* 1081 */ "IPV6\0"
+/* 1086 */ "ipv6\0"
+/* 1091 */ "run a command and exit\0"
+/* 1114 */ "COMMAND\0"
+/* 1122 */ "command\0"
+/* 1130 */ "Increase debug verbosity level\0"
+/* 1161 */ "DEBUG_LEVEL\0"
+/* 1173 */ "debug-level\0"
+/* 1185 */ "Set the debug verbosity level\0"
+/* 1215 */ "SET_DEBUG_LEVEL\0"
+/* 1231 */ "set-debug-level\0"
+/* 1247 */ "Force ntpq to operate in interactive mode\0"
+/* 1289 */ "INTERACTIVE\0"
+/* 1301 */ "interactive\0"
+/* 1313 */ "Print a list of the peers\0"
+/* 1339 */ "LISTPEERS\0"
+/* 1349 */ "listpeers\0"
+/* 1359 */ "numeric host addresses\0"
+/* 1382 */ "NUMERIC\0"
+/* 1390 */ "numeric\0"
+/* 1398 */ "PEERS\0"
+/* 1404 */ "peers\0"
+/* 1410 */ "Show a list of the peers\0"
+/* 1435 */ "SHOWPEERS\0"
+/* 1445 */ "showpeers\0"
+/* 1455 */ "display extended usage information and exit\0"
+/* 1499 */ "help\0"
+/* 1504 */ "extended usage information passed thru pager\0"
+/* 1549 */ "more-help\0"
+/* 1559 */ "output version information and exit\0"
+/* 1595 */ "version\0"
+/* 1603 */ "save the option state to a config file\0"
+/* 1642 */ "save-opts\0"
+/* 1652 */ "load options from a config file\0"
+/* 1684 */ "LOAD_OPTS\0"
+/* 1694 */ "no-load-opts\0"
+/* 1707 */ "no\0"
+/* 1710 */ "NTPDC\0"
+/* 1716 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
-/* 1794 */ "$HOME\0"
-/* 1800 */ ".\0"
-/* 1802 */ ".ntprc\0"
-/* 1809 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1843 */ "\n\0"
-/* 1845 */ "ntpdc 4.2.7p482";
+/* 1846 */ "$HOME\0"
+/* 1852 */ ".\0"
+/* 1854 */ ".ntprc\0"
+/* 1861 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1895 */ "\n\0"
+/* 1897 */ "ntpdc 4.2.8p2";
/**
* ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv4 option */
-#define IPV4_DESC (ntpdc_opt_strs+955)
+#define IPV4_DESC (ntpdc_opt_strs+1009)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpdc_opt_strs+986)
+#define IPV4_NAME (ntpdc_opt_strs+1040)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpdc_opt_strs+991)
+#define IPV4_name (ntpdc_opt_strs+1045)
/** Other options that appear in conjunction with the ipv4 option */
static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
@@ -157,11 +158,11 @@ static int const aIpv4CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (ntpdc_opt_strs+996)
+#define IPV6_DESC (ntpdc_opt_strs+1050)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpdc_opt_strs+1027)
+#define IPV6_NAME (ntpdc_opt_strs+1081)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpdc_opt_strs+1032)
+#define IPV6_name (ntpdc_opt_strs+1086)
/** Other options that appear in conjunction with the ipv6 option */
static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
@@ -172,11 +173,11 @@ static int const aIpv6CantList[] = {
* command option description:
*/
/** Descriptive text for the command option */
-#define COMMAND_DESC (ntpdc_opt_strs+1037)
+#define COMMAND_DESC (ntpdc_opt_strs+1091)
/** Upper-cased name for the command option */
-#define COMMAND_NAME (ntpdc_opt_strs+1060)
+#define COMMAND_NAME (ntpdc_opt_strs+1114)
/** Name string for the command option */
-#define COMMAND_name (ntpdc_opt_strs+1068)
+#define COMMAND_name (ntpdc_opt_strs+1122)
/** Compiled in flag settings for the command option */
#define COMMAND_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -185,11 +186,11 @@ static int const aIpv6CantList[] = {
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntpdc_opt_strs+1076)
+#define DEBUG_LEVEL_DESC (ntpdc_opt_strs+1130)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpdc_opt_strs+1107)
+#define DEBUG_LEVEL_NAME (ntpdc_opt_strs+1161)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpdc_opt_strs+1119)
+#define DEBUG_LEVEL_name (ntpdc_opt_strs+1173)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
@@ -197,11 +198,11 @@ static int const aIpv6CantList[] = {
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (ntpdc_opt_strs+1131)
+#define SET_DEBUG_LEVEL_DESC (ntpdc_opt_strs+1185)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntpdc_opt_strs+1161)
+#define SET_DEBUG_LEVEL_NAME (ntpdc_opt_strs+1215)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntpdc_opt_strs+1177)
+#define SET_DEBUG_LEVEL_name (ntpdc_opt_strs+1231)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -211,11 +212,11 @@ static int const aIpv6CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the interactive option */
-#define INTERACTIVE_DESC (ntpdc_opt_strs+1193)
+#define INTERACTIVE_DESC (ntpdc_opt_strs+1247)
/** Upper-cased name for the interactive option */
-#define INTERACTIVE_NAME (ntpdc_opt_strs+1235)
+#define INTERACTIVE_NAME (ntpdc_opt_strs+1289)
/** Name string for the interactive option */
-#define INTERACTIVE_name (ntpdc_opt_strs+1247)
+#define INTERACTIVE_name (ntpdc_opt_strs+1301)
/** Other options that appear in conjunction with the interactive option */
static int const aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
@@ -230,11 +231,11 @@ static int const aInteractiveCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the listpeers option */
-#define LISTPEERS_DESC (ntpdc_opt_strs+1259)
+#define LISTPEERS_DESC (ntpdc_opt_strs+1313)
/** Upper-cased name for the listpeers option */
-#define LISTPEERS_NAME (ntpdc_opt_strs+1285)
+#define LISTPEERS_NAME (ntpdc_opt_strs+1339)
/** Name string for the listpeers option */
-#define LISTPEERS_name (ntpdc_opt_strs+1295)
+#define LISTPEERS_name (ntpdc_opt_strs+1349)
/** Other options that appear in conjunction with the listpeers option */
static int const aListpeersCantList[] = {
INDEX_OPT_COMMAND, NO_EQUIVALENT };
@@ -245,11 +246,11 @@ static int const aListpeersCantList[] = {
* numeric option description:
*/
/** Descriptive text for the numeric option */
-#define NUMERIC_DESC (ntpdc_opt_strs+1305)
+#define NUMERIC_DESC (ntpdc_opt_strs+1359)
/** Upper-cased name for the numeric option */
-#define NUMERIC_NAME (ntpdc_opt_strs+1328)
+#define NUMERIC_NAME (ntpdc_opt_strs+1382)
/** Name string for the numeric option */
-#define NUMERIC_name (ntpdc_opt_strs+1336)
+#define NUMERIC_name (ntpdc_opt_strs+1390)
/** Compiled in flag settings for the numeric option */
#define NUMERIC_FLAGS (OPTST_DISABLED)
@@ -258,11 +259,11 @@ static int const aListpeersCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the peers option */
-#define PEERS_DESC (ntpdc_opt_strs+1259)
+#define PEERS_DESC (ntpdc_opt_strs+1313)
/** Upper-cased name for the peers option */
-#define PEERS_NAME (ntpdc_opt_strs+1344)
+#define PEERS_NAME (ntpdc_opt_strs+1398)
/** Name string for the peers option */
-#define PEERS_name (ntpdc_opt_strs+1350)
+#define PEERS_name (ntpdc_opt_strs+1404)
/** Other options that appear in conjunction with the peers option */
static int const aPeersCantList[] = {
INDEX_OPT_COMMAND, NO_EQUIVALENT };
@@ -274,11 +275,11 @@ static int const aPeersCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the showpeers option */
-#define SHOWPEERS_DESC (ntpdc_opt_strs+1356)
+#define SHOWPEERS_DESC (ntpdc_opt_strs+1410)
/** Upper-cased name for the showpeers option */
-#define SHOWPEERS_NAME (ntpdc_opt_strs+1381)
+#define SHOWPEERS_NAME (ntpdc_opt_strs+1435)
/** Name string for the showpeers option */
-#define SHOWPEERS_name (ntpdc_opt_strs+1391)
+#define SHOWPEERS_name (ntpdc_opt_strs+1445)
/** Other options that appear in conjunction with the showpeers option */
static int const aShowpeersCantList[] = {
INDEX_OPT_COMMAND, NO_EQUIVALENT };
@@ -288,11 +289,11 @@ static int const aShowpeersCantList[] = {
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpdc_opt_strs+1401)
-#define HELP_name (ntpdc_opt_strs+1445)
+#define HELP_DESC (ntpdc_opt_strs+1455)
+#define HELP_name (ntpdc_opt_strs+1499)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpdc_opt_strs+1450)
-#define MORE_HELP_name (ntpdc_opt_strs+1495)
+#define MORE_HELP_DESC (ntpdc_opt_strs+1504)
+#define MORE_HELP_name (ntpdc_opt_strs+1549)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -305,14 +306,14 @@ static int const aShowpeersCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpdc_opt_strs+1505)
-#define VER_name (ntpdc_opt_strs+1541)
-#define SAVE_OPTS_DESC (ntpdc_opt_strs+1549)
-#define SAVE_OPTS_name (ntpdc_opt_strs+1588)
-#define LOAD_OPTS_DESC (ntpdc_opt_strs+1598)
-#define LOAD_OPTS_NAME (ntpdc_opt_strs+1630)
-#define NO_LOAD_OPTS_name (ntpdc_opt_strs+1640)
-#define LOAD_OPTS_pfx (ntpdc_opt_strs+1653)
+#define VER_DESC (ntpdc_opt_strs+1559)
+#define VER_name (ntpdc_opt_strs+1595)
+#define SAVE_OPTS_DESC (ntpdc_opt_strs+1603)
+#define SAVE_OPTS_name (ntpdc_opt_strs+1642)
+#define LOAD_OPTS_DESC (ntpdc_opt_strs+1652)
+#define LOAD_OPTS_NAME (ntpdc_opt_strs+1684)
+#define NO_LOAD_OPTS_name (ntpdc_opt_strs+1694)
+#define LOAD_OPTS_pfx (ntpdc_opt_strs+1707)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -521,24 +522,24 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpdc. */
-#define zPROGNAME (ntpdc_opt_strs+1656)
+#define zPROGNAME (ntpdc_opt_strs+1710)
/** Reference to the title line for ntpdc usage. */
-#define zUsageTitle (ntpdc_opt_strs+1662)
+#define zUsageTitle (ntpdc_opt_strs+1716)
/** ntpdc configuration file name. */
-#define zRcName (ntpdc_opt_strs+1802)
+#define zRcName (ntpdc_opt_strs+1854)
/** Directories to search for ntpdc config files. */
static char const * const apzHomeList[3] = {
- ntpdc_opt_strs+1794,
- ntpdc_opt_strs+1800,
+ ntpdc_opt_strs+1846,
+ ntpdc_opt_strs+1852,
NULL };
/** The ntpdc program bug email address. */
-#define zBugsAddr (ntpdc_opt_strs+1809)
+#define zBugsAddr (ntpdc_opt_strs+1861)
/** Clarification/explanation of what ntpdc does. */
-#define zExplain (ntpdc_opt_strs+1843)
+#define zExplain (ntpdc_opt_strs+1895)
/** Extra detail explaining what ntpdc does. */
#define zDetail (NULL)
/** The full version string for ntpdc. */
-#define zFullVersion (ntpdc_opt_strs+1845)
+#define zFullVersion (ntpdc_opt_strs+1897)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -795,8 +796,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdcOptions.pzCopyright */
- puts(_("ntpdc 4.2.7p482\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("ntpdc 4.2.8p2\n\
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -810,9 +811,10 @@ provided that the above copyright notice appears in all copies and that\n\
both the copyright notice and this permission notice appear in supporting\n\
documentation, and that the name The University of Delaware not be used in\n\
advertising or publicity pertaining to distribution of the software without\n\
-specific, written prior permission. The University of Delaware makes no\n\
-representations about the suitability this software for any purpose. It is\n\
-provided \"as is\" without express or implied warranty.\n"));
+specific, written prior permission. The University of Delaware and Network\n\
+Time Foundation makes no representations about the suitability this\n\
+software for any purpose. It is provided \"as is\" without express or\n\
+implied warranty.\n"));
/* referenced via ntpdcOptions.pOptDesc->pzText */
puts(_("Force IPv4 DNS name resolution"));
@@ -860,14 +862,14 @@ provided \"as is\" without express or implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpdcOptions.pzUsageTitle */
- puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.7p482\n\
+ puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpdcOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpdcOptions.pzFullVersion */
- puts(_("ntpdc 4.2.7p482"));
+ puts(_("ntpdc 4.2.8p2"));
/* referenced via ntpdcOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpdc/ntpdc-opts.h b/ntpdc/ntpdc-opts.h
index 182f77a..8476359 100644
--- a/ntpdc/ntpdc-opts.h
+++ b/ntpdc/ntpdc-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed December 2, 2014 at 08:57:15 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpdc program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -83,9 +83,9 @@ typedef enum {
/** count of all options for ntpdc */
#define OPTION_CT 15
/** ntpdc version */
-#define NTPDC_VERSION "4.2.7p482"
+#define NTPDC_VERSION "4.2.8p2"
/** Full ntpdc version text */
-#define NTPDC_FULL_VERSION "ntpdc 4.2.7p482"
+#define NTPDC_FULL_VERSION "ntpdc 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpdc/ntpdc.1ntpdcman b/ntpdc/ntpdc.1ntpdcman
index a3579bb..ecff16b 100644
--- a/ntpdc/ntpdc.1ntpdcman
+++ b/ntpdc/ntpdc.1ntpdcman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc 1ntpdcman "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpdc 1ntpdcman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6QaWHN/ag-hRaOGN)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-dXaWh5/ag-rXaOg5)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:28 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:27 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -848,7 +848,7 @@ RFC1305
.SH AUTHORS
The formatting directives in this document came from FreeBSD.
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/ntpdc/ntpdc.1ntpdcmdoc b/ntpdc/ntpdc.1ntpdcmdoc
index 46f1fa5..7f0c363 100644
--- a/ntpdc/ntpdc.1ntpdcmdoc
+++ b/ntpdc/ntpdc.1ntpdcmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPDC 1ntpdcmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:34 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:34 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -787,7 +787,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
The formatting directives in this document came from FreeBSD.
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/ntpdc/ntpdc.c b/ntpdc/ntpdc.c
index 3595184..ce35bd4 100644
--- a/ntpdc/ntpdc.c
+++ b/ntpdc/ntpdc.c
@@ -96,8 +96,10 @@ static void hostnames (struct parse *, FILE *);
static void setdebug (struct parse *, FILE *);
static void quit (struct parse *, FILE *);
static void version (struct parse *, FILE *);
-static void warning (const char *, const char *, const char *);
-static void error (const char *, const char *, const char *);
+static void warning (const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
+static void error (const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
static u_long getkeyid (const char *);
@@ -506,7 +508,7 @@ openhost(
sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
if (sockfd == INVALID_SOCKET) {
- error("socket", "", "");
+ error("socket");
exit(-1);
}
@@ -517,7 +519,7 @@ openhost(
if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
&rbufsize, sizeof(int)) == -1)
- error("setsockopt", "", "");
+ error("setsockopt");
}
# endif
#endif
@@ -528,7 +530,7 @@ openhost(
#else
if (connect(sockfd, ai->ai_addr, ai->ai_addrlen) == -1) {
#endif /* SYS_VXWORKS */
- error("connect", "", "");
+ error("connect");
exit(-1);
}
@@ -551,7 +553,7 @@ sendpkt(
)
{
if (send(sockfd, xdata, xdatalen, 0) == -1) {
- warning("write to %s failed", currenthost, "");
+ warning("write to %s failed", currenthost);
return -1;
}
@@ -600,7 +602,7 @@ getresponse(
int numrecv;
int seq;
fd_set fds;
- int n;
+ ssize_t n;
int pad;
/*
@@ -629,7 +631,7 @@ getresponse(
n = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvo);
if (n == -1) {
- warning("select fails", "", "");
+ warning("select fails");
return -1;
}
if (n == 0) {
@@ -648,7 +650,7 @@ getresponse(
printf("Received sequence numbers");
for (n = 0; n <= MAXSEQ; n++)
if (haveseq[n])
- printf(" %d,", n);
+ printf(" %zd,", n);
if (lastseq != 999)
printf(" last frame received\n");
else
@@ -660,7 +662,7 @@ getresponse(
n = recv(sockfd, (char *)&rpkt, sizeof(rpkt), 0);
if (n == -1) {
- warning("read", "", "");
+ warning("read");
return -1;
}
@@ -668,9 +670,9 @@ getresponse(
/*
* Check for format errors. Bug proofing.
*/
- if (n < RESP_HEADER_SIZE) {
+ if (n < (ssize_t)RESP_HEADER_SIZE) {
if (debug)
- printf("Short (%d byte) packet received\n", n);
+ printf("Short (%zd byte) packet received\n", n);
goto again;
}
if (INFO_VERSION(rpkt.rm_vn_mode) > NTP_VERSION ||
@@ -738,8 +740,8 @@ getresponse(
if ((size_t)datasize > (n-RESP_HEADER_SIZE)) {
if (debug)
printf(
- "Received items %d, size %d (total %d), data in packet is %lu\n",
- items, size, datasize, (u_long)(n-RESP_HEADER_SIZE));
+ "Received items %d, size %d (total %d), data in packet is %zu\n",
+ items, size, datasize, n-RESP_HEADER_SIZE);
goto again;
}
@@ -920,11 +922,11 @@ sendrequest(
if (!maclen) {
fprintf(stderr, "Key not found\n");
return 1;
- } else if (maclen != (info_auth_hashlen + sizeof(keyid_t))) {
+ } else if (maclen != (int)(info_auth_hashlen + sizeof(keyid_t))) {
fprintf(stderr,
- "%d octet MAC, %lu expected with %lu octet digest\n",
- maclen, (u_long)(info_auth_hashlen + sizeof(keyid_t)),
- (u_long)info_auth_hashlen);
+ "%d octet MAC, %zu expected with %zu octet digest\n",
+ maclen, (info_auth_hashlen + sizeof(keyid_t)),
+ info_auth_hashlen);
return 1;
}
return sendpkt(&qpkt, reqsize + maclen);
@@ -973,7 +975,7 @@ again:
res = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvzero);
if (res == -1) {
- warning("polling select", "", "");
+ warning("polling select");
return -1;
} else if (res > 0)
@@ -1868,34 +1870,44 @@ version(
}
+static void __attribute__((__format__(__printf__, 1, 0)))
+vwarning(const char *fmt, va_list ap)
+{
+ int serrno = errno;
+ (void) fprintf(stderr, "%s: ", progname);
+ vfprintf(stderr, fmt, ap);
+ (void) fprintf(stderr, ": %s\n", strerror(serrno));
+}
+
/*
* warning - print a warning message
*/
-static void
+static void __attribute__((__format__(__printf__, 1, 2)))
warning(
const char *fmt,
- const char *st1,
- const char *st2
+ ...
)
{
- (void) fprintf(stderr, "%s: ", progname);
- (void) fprintf(stderr, fmt, st1, st2);
- (void) fprintf(stderr, ": ");
- perror("");
+ va_list ap;
+ va_start(ap, fmt);
+ vwarning(fmt, ap);
+ va_end(ap);
}
/*
* error - print a message and exit
*/
-static void
+static void __attribute__((__format__(__printf__, 1, 2)))
error(
const char *fmt,
- const char *st1,
- const char *st2
+ ...
)
{
- warning(fmt, st1, st2);
+ va_list ap;
+ va_start(ap, fmt);
+ vwarning(fmt, ap);
+ va_end(ap);
exit(1);
}
diff --git a/ntpdc/ntpdc.h b/ntpdc/ntpdc.h
index bfc2228..6da4a5c 100644
--- a/ntpdc/ntpdc.h
+++ b/ntpdc/ntpdc.h
@@ -43,7 +43,7 @@ typedef struct {
struct parse {
char *keyword;
arg_v argval[MAXARGS + MOREARGS];
- int nargs;
+ size_t nargs;
};
/*
diff --git a/ntpdc/ntpdc.html b/ntpdc/ntpdc.html
index 8381a2b..37e195c 100644
--- a/ntpdc/ntpdc.html
+++ b/ntpdc/ntpdc.html
@@ -36,7 +36,7 @@ display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
- <p>This document applies to version 4.2.7p482 of <code>ntpdc</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpdc</code>.
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
@@ -152,7 +152,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.7p482
+<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2
Usage: ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpdc/ntpdc.man.in b/ntpdc/ntpdc.man.in
index db5d1cc..71aa128 100644
--- a/ntpdc/ntpdc.man.in
+++ b/ntpdc/ntpdc.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc @NTPDC_MS@ "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpdc @NTPDC_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6QaWHN/ag-hRaOGN)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-dXaWh5/ag-rXaOg5)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:28 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:27 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -848,7 +848,7 @@ RFC1305
.SH AUTHORS
The formatting directives in this document came from FreeBSD.
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/ntpdc/ntpdc.mdoc.in b/ntpdc/ntpdc.mdoc.in
index 95b2a23..8a89e48 100644
--- a/ntpdc/ntpdc.mdoc.in
+++ b/ntpdc/ntpdc.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPDC @NTPDC_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:34 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:34 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -787,7 +787,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
The formatting directives in this document came from FreeBSD.
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/ntpdc/ntpdc_ops.c b/ntpdc/ntpdc_ops.c
index b0e7af0..be8ffa2 100644
--- a/ntpdc/ntpdc_ops.c
+++ b/ntpdc/ntpdc_ops.c
@@ -1346,7 +1346,7 @@ again:
sendsize = v4sizeof(struct conf_peer);
items = 1;
- while (pcmd->nargs > items) {
+ while (pcmd->nargs > (size_t)items) {
if (STREQ(pcmd->argval[items].string, "prefer"))
flags |= CONF_FLAG_PREFER;
else if (STREQ(pcmd->argval[items].string, "burst"))
@@ -1571,7 +1571,7 @@ doset(
sys.flags = 0;
res = 0;
- for (items = 0; items < pcmd->nargs; items++) {
+ for (items = 0; (size_t)items < pcmd->nargs; items++) {
if (STREQ(pcmd->argval[items].string, "auth"))
sys.flags |= SYS_FLAG_AUTH;
else if (STREQ(pcmd->argval[items].string, "bclient"))
@@ -1833,7 +1833,7 @@ do_restrict(
u_int32 num;
u_long bit;
int i;
- int res;
+ size_t res;
int err;
int sendsize;
@@ -2095,7 +2095,7 @@ reset(
int itemsize;
char *dummy;
int i;
- int res;
+ size_t res;
int err;
err = 0;
@@ -2262,7 +2262,7 @@ do_trustkey(
)
{
u_long keyids[MAXARGS];
- int i;
+ size_t i;
int items;
int itemsize;
char *dummy;
@@ -3055,7 +3055,7 @@ iflist(
int res
)
{
- static char *actions = "?.+-";
+ static const char *actions = "?.+-";
sockaddr_u saddr;
if (res != 0)
diff --git a/ntpq/Makefile.in b/ntpq/Makefile.in
index ccb5a84..fad9001 100644
--- a/ntpq/Makefile.in
+++ b/ntpq/Makefile.in
@@ -50,8 +50,7 @@ subdir = ntpq
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -62,6 +61,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -79,6 +79,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -193,6 +195,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -227,7 +230,9 @@ 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@
@@ -366,6 +371,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpq/invoke-ntpq.texi b/ntpq/invoke-ntpq.texi
index e30ccd1..505bb23 100644
--- a/ntpq/invoke-ntpq.texi
+++ b/ntpq/invoke-ntpq.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:58:08 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:27:07 AM by AutoGen 5.18.5pre4
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -835,7 +835,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.7p482
+ntpq - standard NTP query program - Ver. 4.2.8p2
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpq/ntpq-opts.c b/ntpq/ntpq-opts.c
index 733b0dd..74f3d3d 100644
--- a/ntpq/ntpq-opts.c
+++ b/ntpq/ntpq-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed December 2, 2014 at 08:57:37 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:37 AM by AutoGen 5.18.5pre4
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpq program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -50,7 +50,7 @@ extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright (ntpq_opt_strs+0)
-#define zLicenseDescrip (ntpq_opt_strs+314)
+#define zLicenseDescrip (ntpq_opt_strs+340)
/*
* global included definitions
@@ -68,84 +68,85 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpq options
*/
-static char const ntpq_opt_strs[1875] =
-/* 0 */ "ntpq 4.2.7p482\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const ntpq_opt_strs[1925] =
+/* 0 */ "ntpq 4.2.8p2\n"
+ "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
" <http://ntp.org/license>\n"
" <http://opensource.org/licenses/ntp-license.php>\n\0"
-/* 314 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 340 */ "Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose with or without fee is hereby granted,\n"
"provided that the above copyright notice appears in all copies and that\n"
"both the copyright notice and this permission notice appear in supporting\n"
"documentation, and that the name The University of Delaware not be used in\n"
"advertising or publicity pertaining to distribution of the software without\n"
- "specific, written prior permission. The University of Delaware makes no\n"
- "representations about the suitability this software for any purpose. It is\n"
- "provided \"as is\" without express or implied warranty.\n\0"
-/* 954 */ "Force IPv4 DNS name resolution\0"
-/* 985 */ "IPV4\0"
-/* 990 */ "ipv4\0"
-/* 995 */ "Force IPv6 DNS name resolution\0"
-/* 1026 */ "IPV6\0"
-/* 1031 */ "ipv6\0"
-/* 1036 */ "run a command and exit\0"
-/* 1059 */ "COMMAND\0"
-/* 1067 */ "command\0"
-/* 1075 */ "Increase debug verbosity level\0"
-/* 1106 */ "DEBUG_LEVEL\0"
-/* 1118 */ "debug-level\0"
-/* 1130 */ "Set the debug verbosity level\0"
-/* 1160 */ "SET_DEBUG_LEVEL\0"
-/* 1176 */ "set-debug-level\0"
-/* 1192 */ "Force ntpq to operate in interactive mode\0"
-/* 1234 */ "INTERACTIVE\0"
-/* 1246 */ "interactive\0"
-/* 1258 */ "numeric host addresses\0"
-/* 1281 */ "NUMERIC\0"
-/* 1289 */ "numeric\0"
-/* 1297 */ "Always output status line with readvar\0"
-/* 1336 */ "OLD_RV\0"
-/* 1343 */ "old-rv\0"
-/* 1350 */ "Print a list of the peers\0"
-/* 1376 */ "PEERS\0"
-/* 1382 */ "peers\0"
-/* 1388 */ "Display the full 'remote' value\0"
-/* 1420 */ "WIDE\0"
-/* 1425 */ "wide\0"
-/* 1430 */ "display extended usage information and exit\0"
-/* 1474 */ "help\0"
-/* 1479 */ "extended usage information passed thru pager\0"
-/* 1524 */ "more-help\0"
-/* 1534 */ "output version information and exit\0"
-/* 1570 */ "version\0"
-/* 1578 */ "save the option state to a config file\0"
-/* 1617 */ "save-opts\0"
-/* 1627 */ "load options from a config file\0"
-/* 1659 */ "LOAD_OPTS\0"
-/* 1669 */ "no-load-opts\0"
-/* 1682 */ "no\0"
-/* 1685 */ "NTPQ\0"
-/* 1690 */ "ntpq - standard NTP query program - Ver. 4.2.7p482\n"
+ "specific, written prior permission. The University of Delaware and Network\n"
+ "Time Foundation makes no representations about the suitability this\n"
+ "software for any purpose. It is provided \"as is\" without express or\n"
+ "implied warranty.\n\0"
+/* 1008 */ "Force IPv4 DNS name resolution\0"
+/* 1039 */ "IPV4\0"
+/* 1044 */ "ipv4\0"
+/* 1049 */ "Force IPv6 DNS name resolution\0"
+/* 1080 */ "IPV6\0"
+/* 1085 */ "ipv6\0"
+/* 1090 */ "run a command and exit\0"
+/* 1113 */ "COMMAND\0"
+/* 1121 */ "command\0"
+/* 1129 */ "Increase debug verbosity level\0"
+/* 1160 */ "DEBUG_LEVEL\0"
+/* 1172 */ "debug-level\0"
+/* 1184 */ "Set the debug verbosity level\0"
+/* 1214 */ "SET_DEBUG_LEVEL\0"
+/* 1230 */ "set-debug-level\0"
+/* 1246 */ "Force ntpq to operate in interactive mode\0"
+/* 1288 */ "INTERACTIVE\0"
+/* 1300 */ "interactive\0"
+/* 1312 */ "numeric host addresses\0"
+/* 1335 */ "NUMERIC\0"
+/* 1343 */ "numeric\0"
+/* 1351 */ "Always output status line with readvar\0"
+/* 1390 */ "OLD_RV\0"
+/* 1397 */ "old-rv\0"
+/* 1404 */ "Print a list of the peers\0"
+/* 1430 */ "PEERS\0"
+/* 1436 */ "peers\0"
+/* 1442 */ "Display the full 'remote' value\0"
+/* 1474 */ "WIDE\0"
+/* 1479 */ "wide\0"
+/* 1484 */ "display extended usage information and exit\0"
+/* 1528 */ "help\0"
+/* 1533 */ "extended usage information passed thru pager\0"
+/* 1578 */ "more-help\0"
+/* 1588 */ "output version information and exit\0"
+/* 1624 */ "version\0"
+/* 1632 */ "save the option state to a config file\0"
+/* 1671 */ "save-opts\0"
+/* 1681 */ "load options from a config file\0"
+/* 1713 */ "LOAD_OPTS\0"
+/* 1723 */ "no-load-opts\0"
+/* 1736 */ "no\0"
+/* 1739 */ "NTPQ\0"
+/* 1744 */ "ntpq - standard NTP query program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
-/* 1811 */ "$HOME\0"
-/* 1817 */ ".\0"
-/* 1819 */ ".ntprc\0"
-/* 1826 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1860 */ "ntpq 4.2.7p482";
+/* 1863 */ "$HOME\0"
+/* 1869 */ ".\0"
+/* 1871 */ ".ntprc\0"
+/* 1878 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1912 */ "ntpq 4.2.8p2";
/**
* ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv4 option */
-#define IPV4_DESC (ntpq_opt_strs+954)
+#define IPV4_DESC (ntpq_opt_strs+1008)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpq_opt_strs+985)
+#define IPV4_NAME (ntpq_opt_strs+1039)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpq_opt_strs+990)
+#define IPV4_name (ntpq_opt_strs+1044)
/** Other options that appear in conjunction with the ipv4 option */
static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
@@ -157,11 +158,11 @@ static int const aIpv4CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (ntpq_opt_strs+995)
+#define IPV6_DESC (ntpq_opt_strs+1049)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpq_opt_strs+1026)
+#define IPV6_NAME (ntpq_opt_strs+1080)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpq_opt_strs+1031)
+#define IPV6_name (ntpq_opt_strs+1085)
/** Other options that appear in conjunction with the ipv6 option */
static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
@@ -172,11 +173,11 @@ static int const aIpv6CantList[] = {
* command option description:
*/
/** Descriptive text for the command option */
-#define COMMAND_DESC (ntpq_opt_strs+1036)
+#define COMMAND_DESC (ntpq_opt_strs+1090)
/** Upper-cased name for the command option */
-#define COMMAND_NAME (ntpq_opt_strs+1059)
+#define COMMAND_NAME (ntpq_opt_strs+1113)
/** Name string for the command option */
-#define COMMAND_name (ntpq_opt_strs+1067)
+#define COMMAND_name (ntpq_opt_strs+1121)
/** Compiled in flag settings for the command option */
#define COMMAND_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -185,11 +186,11 @@ static int const aIpv6CantList[] = {
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntpq_opt_strs+1075)
+#define DEBUG_LEVEL_DESC (ntpq_opt_strs+1129)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1106)
+#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1160)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpq_opt_strs+1118)
+#define DEBUG_LEVEL_name (ntpq_opt_strs+1172)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
@@ -197,11 +198,11 @@ static int const aIpv6CantList[] = {
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1130)
+#define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1184)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1160)
+#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1214)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1176)
+#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1230)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -211,11 +212,11 @@ static int const aIpv6CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the interactive option */
-#define INTERACTIVE_DESC (ntpq_opt_strs+1192)
+#define INTERACTIVE_DESC (ntpq_opt_strs+1246)
/** Upper-cased name for the interactive option */
-#define INTERACTIVE_NAME (ntpq_opt_strs+1234)
+#define INTERACTIVE_NAME (ntpq_opt_strs+1288)
/** Name string for the interactive option */
-#define INTERACTIVE_name (ntpq_opt_strs+1246)
+#define INTERACTIVE_name (ntpq_opt_strs+1300)
/** Other options that appear in conjunction with the interactive option */
static int const aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
@@ -227,11 +228,11 @@ static int const aInteractiveCantList[] = {
* numeric option description:
*/
/** Descriptive text for the numeric option */
-#define NUMERIC_DESC (ntpq_opt_strs+1258)
+#define NUMERIC_DESC (ntpq_opt_strs+1312)
/** Upper-cased name for the numeric option */
-#define NUMERIC_NAME (ntpq_opt_strs+1281)
+#define NUMERIC_NAME (ntpq_opt_strs+1335)
/** Name string for the numeric option */
-#define NUMERIC_name (ntpq_opt_strs+1289)
+#define NUMERIC_name (ntpq_opt_strs+1343)
/** Compiled in flag settings for the numeric option */
#define NUMERIC_FLAGS (OPTST_DISABLED)
@@ -239,11 +240,11 @@ static int const aInteractiveCantList[] = {
* old-rv option description:
*/
/** Descriptive text for the old-rv option */
-#define OLD_RV_DESC (ntpq_opt_strs+1297)
+#define OLD_RV_DESC (ntpq_opt_strs+1351)
/** Upper-cased name for the old-rv option */
-#define OLD_RV_NAME (ntpq_opt_strs+1336)
+#define OLD_RV_NAME (ntpq_opt_strs+1390)
/** Name string for the old-rv option */
-#define OLD_RV_name (ntpq_opt_strs+1343)
+#define OLD_RV_name (ntpq_opt_strs+1397)
/** Compiled in flag settings for the old-rv option */
#define OLD_RV_FLAGS (OPTST_DISABLED)
@@ -252,11 +253,11 @@ static int const aInteractiveCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the peers option */
-#define PEERS_DESC (ntpq_opt_strs+1350)
+#define PEERS_DESC (ntpq_opt_strs+1404)
/** Upper-cased name for the peers option */
-#define PEERS_NAME (ntpq_opt_strs+1376)
+#define PEERS_NAME (ntpq_opt_strs+1430)
/** Name string for the peers option */
-#define PEERS_name (ntpq_opt_strs+1382)
+#define PEERS_name (ntpq_opt_strs+1436)
/** Other options that appear in conjunction with the peers option */
static int const aPeersCantList[] = {
INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
@@ -267,22 +268,22 @@ static int const aPeersCantList[] = {
* wide option description:
*/
/** Descriptive text for the wide option */
-#define WIDE_DESC (ntpq_opt_strs+1388)
+#define WIDE_DESC (ntpq_opt_strs+1442)
/** Upper-cased name for the wide option */
-#define WIDE_NAME (ntpq_opt_strs+1420)
+#define WIDE_NAME (ntpq_opt_strs+1474)
/** Name string for the wide option */
-#define WIDE_name (ntpq_opt_strs+1425)
+#define WIDE_name (ntpq_opt_strs+1479)
/** Compiled in flag settings for the wide option */
#define WIDE_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpq_opt_strs+1430)
-#define HELP_name (ntpq_opt_strs+1474)
+#define HELP_DESC (ntpq_opt_strs+1484)
+#define HELP_name (ntpq_opt_strs+1528)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpq_opt_strs+1479)
-#define MORE_HELP_name (ntpq_opt_strs+1524)
+#define MORE_HELP_DESC (ntpq_opt_strs+1533)
+#define MORE_HELP_name (ntpq_opt_strs+1578)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -295,14 +296,14 @@ static int const aPeersCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpq_opt_strs+1534)
-#define VER_name (ntpq_opt_strs+1570)
-#define SAVE_OPTS_DESC (ntpq_opt_strs+1578)
-#define SAVE_OPTS_name (ntpq_opt_strs+1617)
-#define LOAD_OPTS_DESC (ntpq_opt_strs+1627)
-#define LOAD_OPTS_NAME (ntpq_opt_strs+1659)
-#define NO_LOAD_OPTS_name (ntpq_opt_strs+1669)
-#define LOAD_OPTS_pfx (ntpq_opt_strs+1682)
+#define VER_DESC (ntpq_opt_strs+1588)
+#define VER_name (ntpq_opt_strs+1624)
+#define SAVE_OPTS_DESC (ntpq_opt_strs+1632)
+#define SAVE_OPTS_name (ntpq_opt_strs+1671)
+#define LOAD_OPTS_DESC (ntpq_opt_strs+1681)
+#define LOAD_OPTS_NAME (ntpq_opt_strs+1713)
+#define NO_LOAD_OPTS_name (ntpq_opt_strs+1723)
+#define LOAD_OPTS_pfx (ntpq_opt_strs+1736)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -511,24 +512,24 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpq. */
-#define zPROGNAME (ntpq_opt_strs+1685)
+#define zPROGNAME (ntpq_opt_strs+1739)
/** Reference to the title line for ntpq usage. */
-#define zUsageTitle (ntpq_opt_strs+1690)
+#define zUsageTitle (ntpq_opt_strs+1744)
/** ntpq configuration file name. */
-#define zRcName (ntpq_opt_strs+1819)
+#define zRcName (ntpq_opt_strs+1871)
/** Directories to search for ntpq config files. */
static char const * const apzHomeList[3] = {
- ntpq_opt_strs+1811,
- ntpq_opt_strs+1817,
+ ntpq_opt_strs+1863,
+ ntpq_opt_strs+1869,
NULL };
/** The ntpq program bug email address. */
-#define zBugsAddr (ntpq_opt_strs+1826)
+#define zBugsAddr (ntpq_opt_strs+1878)
/** Clarification/explanation of what ntpq does. */
#define zExplain (NULL)
/** Extra detail explaining what ntpq does. */
#define zDetail (NULL)
/** The full version string for ntpq. */
-#define zFullVersion (ntpq_opt_strs+1860)
+#define zFullVersion (ntpq_opt_strs+1912)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -785,8 +786,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpqOptions.pzCopyright */
- puts(_("ntpq 4.2.7p482\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("ntpq 4.2.8p2\n\
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -800,9 +801,10 @@ provided that the above copyright notice appears in all copies and that\n\
both the copyright notice and this permission notice appear in supporting\n\
documentation, and that the name The University of Delaware not be used in\n\
advertising or publicity pertaining to distribution of the software without\n\
-specific, written prior permission. The University of Delaware makes no\n\
-representations about the suitability this software for any purpose. It is\n\
-provided \"as is\" without express or implied warranty.\n"));
+specific, written prior permission. The University of Delaware and Network\n\
+Time Foundation makes no representations about the suitability this\n\
+software for any purpose. It is provided \"as is\" without express or\n\
+implied warranty.\n"));
/* referenced via ntpqOptions.pOptDesc->pzText */
puts(_("Force IPv4 DNS name resolution"));
@@ -850,11 +852,11 @@ provided \"as is\" without express or implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpqOptions.pzUsageTitle */
- puts(_("ntpq - standard NTP query program - Ver. 4.2.7p482\n\
+ puts(_("ntpq - standard NTP query program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */
- puts(_("ntpq 4.2.7p482"));
+ puts(_("ntpq 4.2.8p2"));
/* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpq/ntpq-opts.h b/ntpq/ntpq-opts.h
index c6c4f8d..43301b9 100644
--- a/ntpq/ntpq-opts.h
+++ b/ntpq/ntpq-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed December 2, 2014 at 08:57:37 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:37 AM by AutoGen 5.18.5pre4
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpq program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -83,9 +83,9 @@ typedef enum {
/** count of all options for ntpq */
#define OPTION_CT 15
/** ntpq version */
-#define NTPQ_VERSION "4.2.7p482"
+#define NTPQ_VERSION "4.2.8p2"
/** Full ntpq version text */
-#define NTPQ_FULL_VERSION "ntpq 4.2.7p482"
+#define NTPQ_FULL_VERSION "ntpq 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c
index 5460f80..8bd4fdb 100644
--- a/ntpq/ntpq-subs.c
+++ b/ntpq/ntpq-subs.c
@@ -269,7 +269,7 @@ char flash2[] = " .+* "; /* flash decode for version 2 */
char flash3[] = " x.-+#*o"; /* flash decode for peer status version 3 */
struct varlist {
- char *name;
+ const char *name;
char *value;
} g_varlist[MAXLIST] = { { 0, 0 } };
@@ -330,7 +330,11 @@ typedef struct var_display_collection_tag {
l_fp lfp; /* NTP_LFP */
} v; /* retrieved value */
} vdc;
-
+#if !defined(MISSING_C99_STRUCT_INIT)
+# define VDC_INIT(a, b, c) { .tag = a, .display = b, .type = c }
+#else
+# define VDC_INIT(a, b, c) { a, b, c }
+#endif
/*
* other local function prototypes
*/
@@ -362,7 +366,7 @@ static mru ** hash_table;
* qsort comparison function table for mrulist(). The first two
* entries are NULL because they are handled without qsort().
*/
-const static qsort_cmp mru_qcmp_table[MRUSORT_MAX] = {
+static const qsort_cmp mru_qcmp_table[MRUSORT_MAX] = {
NULL, /* MRUSORT_DEF unused */
NULL, /* MRUSORT_R_DEF unused */
&qcmp_mru_avgint, /* MRUSORT_AVGINT */
@@ -477,7 +481,7 @@ dormvlist(
(void) fprintf(stderr, "Variable `%s' not found\n",
name);
} else {
- free((void *)vl->name);
+ free((void *)(intptr_t)vl->name);
if (vl->value != 0)
free(vl->value);
for ( ; (vl+1) < (g_varlist + MAXLIST)
@@ -502,7 +506,7 @@ doclearvlist(
register struct varlist *vl;
for (vl = vlist; vl < vlist + MAXLIST && vl->name != 0; vl++) {
- free((void *)vl->name);
+ free((void *)(intptr_t)vl->name);
vl->name = 0;
if (vl->value != 0) {
free(vl->value);
@@ -2192,7 +2196,7 @@ fetch_nonce(
return FALSE;
}
- if (rsize <= sizeof(nonce_eq) - 1 ||
+ if ((size_t)rsize <= sizeof(nonce_eq) - 1 ||
strncmp(rdata, nonce_eq, sizeof(nonce_eq) - 1)) {
fprintf(stderr, "unexpected nonce response format: %.*s\n",
rsize, rdata);
@@ -2935,7 +2939,7 @@ mrulist(
double flstint;
int avgint;
int lstint;
- int i;
+ size_t i;
order = MRUSORT_DEF;
parms_buf[0] = '\0';
@@ -3041,7 +3045,7 @@ mrulist(
LFPTOD(&interval, favgint);
favgint /= recent->count;
avgint = (int)(favgint + 0.5);
- fprintf(fp, "%6d %6d %4hx %c %d %d %6d %5hu %s\n",
+ fprintf(fp, "%6d %6d %4hx %c %d %d %6d %5u %s\n",
lstint, avgint, recent->rs,
(RES_KOD & recent->rs)
? 'K'
@@ -3179,7 +3183,6 @@ ifstats(
char * tag;
char * val;
int fields;
- u_int ifnum;
u_int ui;
ifstats_row row;
int comprende;
@@ -3198,7 +3201,6 @@ ifstats(
ZERO(row);
fields = 0;
- ifnum = 0;
ui = 0;
while (nextvar(&dsize, &datap, &tag, &val)) {
if (debug > 1)
@@ -3396,7 +3398,6 @@ reslist(
char * tag;
char * val;
int fields;
- u_int idx;
u_int ui;
reslist_row row;
int comprende;
@@ -3415,7 +3416,6 @@ reslist(
ZERO(row);
fields = 0;
- idx = 0;
ui = 0;
while (nextvar(&dsize, &datap, &tag, &val)) {
if (debug > 1)
@@ -3656,19 +3656,19 @@ sysstats(
)
{
static vdc sysstats_vdc[] = {
- { "ss_uptime", "uptime: ", NTP_STR },
- { "ss_reset", "sysstats reset: ", NTP_STR },
- { "ss_received", "packets received: ", NTP_STR },
- { "ss_thisver", "current version: ", NTP_STR },
- { "ss_oldver", "older version: ", NTP_STR },
- { "ss_badformat", "bad length or format: ", NTP_STR },
- { "ss_badauth", "authentication failed:", NTP_STR },
- { "ss_declined", "declined: ", NTP_STR },
- { "ss_restricted", "restricted: ", NTP_STR },
- { "ss_limited", "rate limited: ", NTP_STR },
- { "ss_kodsent", "KoD responses: ", NTP_STR },
- { "ss_processed", "processed for time: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("ss_uptime", "uptime: ", NTP_STR),
+ VDC_INIT("ss_reset", "sysstats reset: ", NTP_STR),
+ VDC_INIT("ss_received", "packets received: ", NTP_STR),
+ VDC_INIT("ss_thisver", "current version: ", NTP_STR),
+ VDC_INIT("ss_oldver", "older version: ", NTP_STR),
+ VDC_INIT("ss_badformat", "bad length or format: ", NTP_STR),
+ VDC_INIT("ss_badauth", "authentication failed:", NTP_STR),
+ VDC_INIT("ss_declined", "declined: ", NTP_STR),
+ VDC_INIT("ss_restricted", "restricted: ", NTP_STR),
+ VDC_INIT("ss_limited", "rate limited: ", NTP_STR),
+ VDC_INIT("ss_kodsent", "KoD responses: ", NTP_STR),
+ VDC_INIT("ss_processed", "processed for time: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, sysstats_vdc, FALSE, fp);
@@ -3685,21 +3685,21 @@ sysinfo(
)
{
static vdc sysinfo_vdc[] = {
- { "peeradr", "system peer: ", NTP_ADP },
- { "peermode", "system peer mode: ", NTP_MODE },
- { "leap", "leap indicator: ", NTP_2BIT },
- { "stratum", "stratum: ", NTP_STR },
- { "precision", "log2 precision: ", NTP_STR },
- { "rootdelay", "root delay: ", NTP_STR },
- { "rootdisp", "root dispersion: ", NTP_STR },
- { "refid", "reference ID: ", NTP_STR },
- { "reftime", "reference time: ", NTP_LFP },
- { "sys_jitter", "system jitter: ", NTP_STR },
- { "clk_jitter", "clock jitter: ", NTP_STR },
- { "clk_wander", "clock wander: ", NTP_STR },
- { "bcastdelay", "broadcast delay: ", NTP_STR },
- { "authdelay", "symm. auth. delay:", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("peeradr", "system peer: ", NTP_ADP),
+ VDC_INIT("peermode", "system peer mode: ", NTP_MODE),
+ VDC_INIT("leap", "leap indicator: ", NTP_2BIT),
+ VDC_INIT("stratum", "stratum: ", NTP_STR),
+ VDC_INIT("precision", "log2 precision: ", NTP_STR),
+ VDC_INIT("rootdelay", "root delay: ", NTP_STR),
+ VDC_INIT("rootdisp", "root dispersion: ", NTP_STR),
+ VDC_INIT("refid", "reference ID: ", NTP_STR),
+ VDC_INIT("reftime", "reference time: ", NTP_LFP),
+ VDC_INIT("sys_jitter", "system jitter: ", NTP_STR),
+ VDC_INIT("clk_jitter", "clock jitter: ", NTP_STR),
+ VDC_INIT("clk_wander", "clock wander: ", NTP_STR),
+ VDC_INIT("bcastdelay", "broadcast delay: ", NTP_STR),
+ VDC_INIT("authdelay", "symm. auth. delay:", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, sysinfo_vdc, TRUE, fp);
@@ -3716,23 +3716,23 @@ kerninfo(
)
{
static vdc kerninfo_vdc[] = {
- { "koffset", "pll offset: ", NTP_STR },
- { "kfreq", "pll frequency: ", NTP_STR },
- { "kmaxerr", "maximum error: ", NTP_STR },
- { "kesterr", "estimated error: ", NTP_STR },
- { "kstflags", "kernel status: ", NTP_STR },
- { "ktimeconst", "pll time constant: ", NTP_STR },
- { "kprecis", "precision: ", NTP_STR },
- { "kfreqtol", "frequency tolerance: ", NTP_STR },
- { "kppsfreq", "pps frequency: ", NTP_STR },
- { "kppsstab", "pps stability: ", NTP_STR },
- { "kppsjitter", "pps jitter: ", NTP_STR },
- { "kppscalibdur", "calibration interval ", NTP_STR },
- { "kppscalibs", "calibration cycles: ", NTP_STR },
- { "kppsjitexc", "jitter exceeded: ", NTP_STR },
- { "kppsstbexc", "stability exceeded: ", NTP_STR },
- { "kppscaliberrs", "calibration errors: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("koffset", "pll offset: ", NTP_STR),
+ VDC_INIT("kfreq", "pll frequency: ", NTP_STR),
+ VDC_INIT("kmaxerr", "maximum error: ", NTP_STR),
+ VDC_INIT("kesterr", "estimated error: ", NTP_STR),
+ VDC_INIT("kstflags", "kernel status: ", NTP_STR),
+ VDC_INIT("ktimeconst", "pll time constant: ", NTP_STR),
+ VDC_INIT("kprecis", "precision: ", NTP_STR),
+ VDC_INIT("kfreqtol", "frequency tolerance: ", NTP_STR),
+ VDC_INIT("kppsfreq", "pps frequency: ", NTP_STR),
+ VDC_INIT("kppsstab", "pps stability: ", NTP_STR),
+ VDC_INIT("kppsjitter", "pps jitter: ", NTP_STR),
+ VDC_INIT("kppscalibdur", "calibration interval ", NTP_STR),
+ VDC_INIT("kppscalibs", "calibration cycles: ", NTP_STR),
+ VDC_INIT("kppsjitexc", "jitter exceeded: ", NTP_STR),
+ VDC_INIT("kppsstbexc", "stability exceeded: ", NTP_STR),
+ VDC_INIT("kppscaliberrs", "calibration errors: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, kerninfo_vdc, TRUE, fp);
@@ -3749,15 +3749,15 @@ monstats(
)
{
static vdc monstats_vdc[] = {
- { "mru_enabled", "enabled: ", NTP_STR },
- { "mru_depth", "addresses: ", NTP_STR },
- { "mru_deepest", "peak addresses: ", NTP_STR },
- { "mru_maxdepth", "maximum addresses: ", NTP_STR },
- { "mru_mindepth", "reclaim above count:", NTP_STR },
- { "mru_maxage", "reclaim older than: ", NTP_STR },
- { "mru_mem", "kilobytes: ", NTP_STR },
- { "mru_maxmem", "maximum kilobytes: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("mru_enabled", "enabled: ", NTP_STR),
+ VDC_INIT("mru_depth", "addresses: ", NTP_STR),
+ VDC_INIT("mru_deepest", "peak addresses: ", NTP_STR),
+ VDC_INIT("mru_maxdepth", "maximum addresses: ", NTP_STR),
+ VDC_INIT("mru_mindepth", "reclaim above count:", NTP_STR),
+ VDC_INIT("mru_maxage", "reclaim older than: ", NTP_STR),
+ VDC_INIT("mru_mem", "kilobytes: ", NTP_STR),
+ VDC_INIT("mru_maxmem", "maximum kilobytes: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, monstats_vdc, FALSE, fp);
@@ -3774,19 +3774,19 @@ iostats(
)
{
static vdc iostats_vdc[] = {
- { "iostats_reset", "time since reset: ", NTP_STR },
- { "total_rbuf", "receive buffers: ", NTP_STR },
- { "free_rbuf", "free receive buffers: ", NTP_STR },
- { "used_rbuf", "used receive buffers: ", NTP_STR },
- { "rbuf_lowater", "low water refills: ", NTP_STR },
- { "io_dropped", "dropped packets: ", NTP_STR },
- { "io_ignored", "ignored packets: ", NTP_STR },
- { "io_received", "received packets: ", NTP_STR },
- { "io_sent", "packets sent: ", NTP_STR },
- { "io_sendfailed", "packet send failures: ", NTP_STR },
- { "io_wakeups", "input wakeups: ", NTP_STR },
- { "io_goodwakeups", "useful input wakeups: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("iostats_reset", "time since reset: ", NTP_STR),
+ VDC_INIT("total_rbuf", "receive buffers: ", NTP_STR),
+ VDC_INIT("free_rbuf", "free receive buffers: ", NTP_STR),
+ VDC_INIT("used_rbuf", "used receive buffers: ", NTP_STR),
+ VDC_INIT("rbuf_lowater", "low water refills: ", NTP_STR),
+ VDC_INIT("io_dropped", "dropped packets: ", NTP_STR),
+ VDC_INIT("io_ignored", "ignored packets: ", NTP_STR),
+ VDC_INIT("io_received", "received packets: ", NTP_STR),
+ VDC_INIT("io_sent", "packets sent: ", NTP_STR),
+ VDC_INIT("io_sendfailed", "packet send failures: ", NTP_STR),
+ VDC_INIT("io_wakeups", "input wakeups: ", NTP_STR),
+ VDC_INIT("io_goodwakeups", "useful input wakeups: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, iostats_vdc, FALSE, fp);
@@ -3803,10 +3803,10 @@ timerstats(
)
{
static vdc timerstats_vdc[] = {
- { "timerstats_reset", "time since reset: ", NTP_STR },
- { "timer_overruns", "timer overruns: ", NTP_STR },
- { "timer_xmts", "calls to transmit: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("timerstats_reset", "time since reset: ", NTP_STR),
+ VDC_INIT("timer_overruns", "timer overruns: ", NTP_STR),
+ VDC_INIT("timer_xmts", "calls to transmit: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, timerstats_vdc, FALSE, fp);
@@ -3823,16 +3823,16 @@ authinfo(
)
{
static vdc authinfo_vdc[] = {
- { "authreset", "time since reset:", NTP_STR },
- { "authkeys", "stored keys: ", NTP_STR },
- { "authfreek", "free keys: ", NTP_STR },
- { "authklookups", "key lookups: ", NTP_STR },
- { "authknotfound", "keys not found: ", NTP_STR },
- { "authkuncached", "uncached keys: ", NTP_STR },
- { "authkexpired", "expired keys: ", NTP_STR },
- { "authencrypts", "encryptions: ", NTP_STR },
- { "authdecrypts", "decryptions: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("authreset", "time since reset:", NTP_STR),
+ VDC_INIT("authkeys", "stored keys: ", NTP_STR),
+ VDC_INIT("authfreek", "free keys: ", NTP_STR),
+ VDC_INIT("authklookups", "key lookups: ", NTP_STR),
+ VDC_INIT("authknotfound", "keys not found: ", NTP_STR),
+ VDC_INIT("authkuncached", "uncached keys: ", NTP_STR),
+ VDC_INIT("authkexpired", "expired keys: ", NTP_STR),
+ VDC_INIT("authencrypts", "encryptions: ", NTP_STR),
+ VDC_INIT("authdecrypts", "decryptions: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, authinfo_vdc, FALSE, fp);
@@ -3849,20 +3849,20 @@ pstats(
)
{
static vdc pstats_vdc[] = {
- { "src", "remote host: ", NTP_ADD },
- { "dst", "local address: ", NTP_ADD },
- { "timerec", "time last received: ", NTP_STR },
- { "timer", "time until next send:", NTP_STR },
- { "timereach", "reachability change: ", NTP_STR },
- { "sent", "packets sent: ", NTP_STR },
- { "received", "packets received: ", NTP_STR },
- { "badauth", "bad authentication: ", NTP_STR },
- { "bogusorg", "bogus origin: ", NTP_STR },
- { "oldpkt", "duplicate: ", NTP_STR },
- { "seldisp", "bad dispersion: ", NTP_STR },
- { "selbroken", "bad reference time: ", NTP_STR },
- { "candidate", "candidate order: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("src", "remote host: ", NTP_ADD),
+ VDC_INIT("dst", "local address: ", NTP_ADD),
+ VDC_INIT("timerec", "time last received: ", NTP_STR),
+ VDC_INIT("timer", "time until next send:", NTP_STR),
+ VDC_INIT("timereach", "reachability change: ", NTP_STR),
+ VDC_INIT("sent", "packets sent: ", NTP_STR),
+ VDC_INIT("received", "packets received: ", NTP_STR),
+ VDC_INIT("badauth", "bad authentication: ", NTP_STR),
+ VDC_INIT("bogusorg", "bogus origin: ", NTP_STR),
+ VDC_INIT("oldpkt", "duplicate: ", NTP_STR),
+ VDC_INIT("seldisp", "bad dispersion: ", NTP_STR),
+ VDC_INIT("selbroken", "bad reference time: ", NTP_STR),
+ VDC_INIT("candidate", "candidate order: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
associd_t associd;
@@ -3872,4 +3872,3 @@ pstats(
collect_display_vdc(associd, pstats_vdc, TRUE, fp);
}
-
diff --git a/ntpq/ntpq.1ntpqman b/ntpq/ntpq.1ntpqman
index bc203c3..444a91f 100644
--- a/ntpq/ntpq.1ntpqman
+++ b/ntpq/ntpq.1ntpqman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpq 1ntpqman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-fJaqSO/ag-rJaiRO)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-SOays6/ag-4Oaqr6)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:04 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:03 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1397,9 +1397,9 @@ libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpq/ntpq.1ntpqmdoc b/ntpq/ntpq.1ntpqmdoc
index 8d70a07..d28b09e 100644
--- a/ntpq/ntpq.1ntpqmdoc
+++ b/ntpq/ntpq.1ntpqmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPQ 1ntpqmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:10 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:09 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -943,9 +943,9 @@ libopts had an internal operational error. Please report
it to autogen\-users@lists.sourceforge.net. Thank you.
.El
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpq/ntpq.c b/ntpq/ntpq.c
index 2ffdfc7..90cae41 100644
--- a/ntpq/ntpq.c
+++ b/ntpq/ntpq.c
@@ -201,8 +201,10 @@ static void raw (struct parse *, FILE *);
static void cooked (struct parse *, FILE *);
static void authenticate (struct parse *, FILE *);
static void ntpversion (struct parse *, FILE *);
-static void warning (const char *, const char *, const char *);
-static void error (const char *, const char *, const char *);
+static void warning (const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
+static void error (const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
static u_long getkeyid (const char *);
static void atoascii (const char *, size_t, char *, size_t);
static void cookedprint (int, int, const char *, int, int, FILE *);
@@ -315,7 +317,7 @@ struct sock_timeval tvsout = { DEFSTIMEOUT, 0 };/* secondary time out */
l_fp delay_time; /* delay time */
char currenthost[LENHOSTNAME]; /* current host name */
int currenthostisnum; /* is prior text from IP? */
-struct sockaddr_in hostaddr = { 0 }; /* host address */
+struct sockaddr_in hostaddr; /* host address */
int showhostnames = 1; /* show host names by default */
int wideremote = 0; /* show wide remote names? */
@@ -678,7 +680,7 @@ openhost(
sockfd = socket(ai->ai_family, ai->ai_socktype,
ai->ai_protocol);
if (sockfd == INVALID_SOCKET) {
- error("socket", "", "");
+ error("socket");
freeaddrinfo(ai);
return 0;
}
@@ -689,7 +691,7 @@ openhost(
{ int rbufsize = DATASIZE + 2048; /* 2K for slop */
if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
&rbufsize, sizeof(int)) == -1)
- error("setsockopt", "", "");
+ error("setsockopt");
}
# endif
#endif
@@ -703,7 +705,7 @@ openhost(
ai->ai_addrlen) == -1)
#endif /* SYS_VXWORKS */
{
- error("connect", "", "");
+ error("connect");
freeaddrinfo(ai);
return 0;
}
@@ -761,10 +763,10 @@ sendpkt(
)
{
if (debug >= 3)
- printf("Sending %lu octets\n", (u_long)xdatalen);
+ printf("Sending %zu octets\n", xdatalen);
if (send(sockfd, xdata, (size_t)xdatalen, 0) == -1) {
- warning("write to %s failed", currenthost, "");
+ warning("write to %s failed", currenthost);
return -1;
}
@@ -835,7 +837,7 @@ getresponse(
n = select(sockfd + 1, &fds, NULL, NULL, &tvo);
if (n == -1) {
- warning("select fails", "", "");
+ warning("select fails");
return -1;
}
if (n == 0) {
@@ -874,7 +876,7 @@ getresponse(
n = recv(sockfd, (char *)&rpkt, sizeof(rpkt), 0);
if (n == -1) {
- warning("read", "", "");
+ warning("read");
return -1;
}
@@ -886,7 +888,7 @@ getresponse(
/*
* Check for format errors. Bug proofing.
*/
- if (n < CTL_HEADER_LEN) {
+ if (n < (int)CTL_HEADER_LEN) {
if (debug)
printf("Short (%d byte) packet received\n", n);
continue;
@@ -994,7 +996,7 @@ getresponse(
shouldbesize = (shouldbesize + 7) & ~7;
maclen = n - shouldbesize;
- if (maclen >= MIN_MAC_LEN) {
+ if (maclen >= (int)MIN_MAC_LEN) {
printf(
"Packet shows signs of authentication (total %d, data %d, mac %d)\n",
n, shouldbesize, maclen);
@@ -1226,9 +1228,9 @@ sendrequest(
return 1;
} else if ((size_t)maclen != (info_auth_hashlen + sizeof(keyid_t))) {
fprintf(stderr,
- "%d octet MAC, %lu expected with %lu octet digest\n",
- maclen, (u_long)(info_auth_hashlen + sizeof(keyid_t)),
- (u_long)info_auth_hashlen);
+ "%d octet MAC, %zu expected with %zu octet digest\n",
+ maclen, (info_auth_hashlen + sizeof(keyid_t)),
+ info_auth_hashlen);
return 1;
}
@@ -2620,37 +2622,46 @@ ntpversion(
}
+static void __attribute__((__format__(__printf__, 1, 0)))
+vwarning(const char *fmt, va_list ap)
+{
+ int serrno = errno;
+ (void) fprintf(stderr, "%s: ", progname);
+ vfprintf(stderr, fmt, ap);
+ (void) fprintf(stderr, ": %s", strerror(serrno));
+}
+
/*
* warning - print a warning message
*/
-static void
+static void __attribute__((__format__(__printf__, 1, 2)))
warning(
const char *fmt,
- const char *st1,
- const char *st2
+ ...
)
{
- (void) fprintf(stderr, "%s: ", progname);
- (void) fprintf(stderr, fmt, st1, st2);
- (void) fprintf(stderr, ": ");
- perror("");
+ va_list ap;
+ va_start(ap, fmt);
+ vwarning(fmt, ap);
+ va_end(ap);
}
/*
* error - print a message and exit
*/
-static void
+static void __attribute__((__format__(__printf__, 1, 2)))
error(
const char *fmt,
- const char *st1,
- const char *st2
+ ...
)
{
- warning(fmt, st1, st2);
+ va_list ap;
+ va_start(ap, fmt);
+ vwarning(fmt, ap);
+ va_end(ap);
exit(1);
}
-
/*
* getkeyid - prompt the user for a keyid to use
*/
@@ -2900,7 +2911,7 @@ nextvar(
srclen = strcspn(cp, ",=\r\n");
srclen = min(srclen, (size_t)(cpend - cp));
len = srclen;
- while (len > 0 && isspace(cp[len - 1]))
+ while (len > 0 && isspace((unsigned char)cp[len - 1]))
len--;
if (len > 0)
memcpy(name, cp, len);
@@ -2924,7 +2935,7 @@ nextvar(
* So far, so good. Copy out the value
*/
cp++; /* past '=' */
- while (cp < cpend && (isspace(*cp) && *cp != '\r' && *cp != '\n'))
+ while (cp < cpend && (isspace((unsigned char)*cp) && *cp != '\r' && *cp != '\n'))
cp++;
np = cp;
if ('"' == *np) {
@@ -2945,7 +2956,7 @@ nextvar(
/*
* Trim off any trailing whitespace
*/
- while (len > 0 && isspace(value[len - 1]))
+ while (len > 0 && isspace((unsigned char)value[len - 1]))
len--;
value[len] = '\0';
@@ -3028,7 +3039,7 @@ rawprint(
*/
if (cp == (cpend - 1) || *(cp + 1) != '\n')
makeascii(1, cp, fp);
- } else if (isspace(*cp) || isprint(*cp))
+ } else if (isspace((unsigned char)*cp) || isprint((unsigned char)*cp))
putc(*cp, fp);
else
makeascii(1, cp, fp);
@@ -3176,7 +3187,7 @@ tstflags(
*cp++ = ' ';
cb--;
}
- for (i = 0; i < COUNTOF(tstflagnames); i++) {
+ for (i = 0; i < (int)COUNTOF(tstflagnames); i++) {
if (val & 0x1) {
snprintf(cp, cb, "%s%s", sep,
tstflagnames[i]);
diff --git a/ntpq/ntpq.h b/ntpq/ntpq.h
index ec2bcb9..2575b88 100644
--- a/ntpq/ntpq.h
+++ b/ntpq/ntpq.h
@@ -79,7 +79,7 @@ typedef union {
struct parse {
const char *keyword;
arg_v argval[MAXARGS];
- int nargs;
+ size_t nargs;
};
/*
diff --git a/ntpq/ntpq.html b/ntpq/ntpq.html
index b3e7c67..5d7a8f3 100644
--- a/ntpq/ntpq.html
+++ b/ntpq/ntpq.html
@@ -44,7 +44,7 @@ monitor the operational status
and determine the performance of
<code>ntpd</code>, the NTP daemon.
- <p>This document applies to version 4.2.7p482 of <code>ntpq</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpq</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
@@ -759,7 +759,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpq - standard NTP query program - Ver. 4.2.7p481
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p2-RC3
Usage: ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpq/ntpq.man.in b/ntpq/ntpq.man.in
index 4daca5a..c5b9fb5 100644
--- a/ntpq/ntpq.man.in
+++ b/ntpq/ntpq.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpq @NTPQ_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-fJaqSO/ag-rJaiRO)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-SOays6/ag-4Oaqr6)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:04 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:03 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1397,9 +1397,9 @@ libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpq/ntpq.mdoc.in b/ntpq/ntpq.mdoc.in
index 9666347..32224f2 100644
--- a/ntpq/ntpq.mdoc.in
+++ b/ntpq/ntpq.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPQ @NTPQ_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:10 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:09 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -943,9 +943,9 @@ libopts had an internal operational error. Please report
it to autogen\-users@lists.sourceforge.net. Thank you.
.El
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpsnmpd/Makefile.in b/ntpsnmpd/Makefile.in
index 3ffaff7..de2a81c 100644
--- a/ntpsnmpd/Makefile.in
+++ b/ntpsnmpd/Makefile.in
@@ -48,8 +48,7 @@ subdir = ntpsnmpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -60,6 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -77,6 +77,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -181,6 +183,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -215,7 +218,9 @@ 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@
@@ -354,6 +359,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpsnmpd/invoke-ntpsnmpd.texi b/ntpsnmpd/invoke-ntpsnmpd.texi
index fbaad2c..addadab 100644
--- a/ntpsnmpd/invoke-ntpsnmpd.texi
+++ b/ntpsnmpd/invoke-ntpsnmpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsnmpd.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:58:24 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:27:22 AM by AutoGen 5.18.5pre4
# From the definitions ntpsnmpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -47,7 +47,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p482
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p2
Usage: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-n no nofork Do not fork
diff --git a/ntpsnmpd/netsnmp_daemonize.c b/ntpsnmpd/netsnmp_daemonize.c
index 969caa0..4311bac 100644
--- a/ntpsnmpd/netsnmp_daemonize.c
+++ b/ntpsnmpd/netsnmp_daemonize.c
@@ -40,6 +40,7 @@ SOFTWARE.
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
+#undef PACKAGE_URL
#undef PACKAGE_VERSION
#include <config.h>
diff --git a/ntpsnmpd/ntp_snmp.h b/ntpsnmpd/ntp_snmp.h
index 1e0499d..b605758 100644
--- a/ntpsnmpd/ntp_snmp.h
+++ b/ntpsnmpd/ntp_snmp.h
@@ -26,6 +26,9 @@
#ifdef PACKAGE_TARNAME
# undef PACKAGE_TARNAME
#endif
+#ifdef PACKAGE_URL
+# undef PACKAGE_URL
+#endif
#ifdef PACKAGE_VERSION
# undef PACKAGE_VERSION
#endif
diff --git a/ntpsnmpd/ntpsnmpd-opts.c b/ntpsnmpd/ntpsnmpd-opts.c
index f5dc900..7e0d34c 100644
--- a/ntpsnmpd/ntpsnmpd-opts.c
+++ b/ntpsnmpd/ntpsnmpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
*
- * It has been AutoGen-ed December 2, 2014 at 08:58:13 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:27:12 AM by AutoGen 5.18.5pre4
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpsnmpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -50,7 +50,7 @@ extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright (ntpsnmpd_opt_strs+0)
-#define zLicenseDescrip (ntpsnmpd_opt_strs+318)
+#define zLicenseDescrip (ntpsnmpd_opt_strs+344)
#ifndef NULL
@@ -60,64 +60,65 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpsnmpd options
*/
-static char const ntpsnmpd_opt_strs[1560] =
-/* 0 */ "ntpsnmpd 4.2.7p482\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const ntpsnmpd_opt_strs[1610] =
+/* 0 */ "ntpsnmpd 4.2.8p2\n"
+ "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
" <http://ntp.org/license>\n"
" <http://opensource.org/licenses/ntp-license.php>\n\0"
-/* 318 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 344 */ "Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose with or without fee is hereby granted,\n"
"provided that the above copyright notice appears in all copies and that\n"
"both the copyright notice and this permission notice appear in supporting\n"
"documentation, and that the name The University of Delaware not be used in\n"
"advertising or publicity pertaining to distribution of the software without\n"
- "specific, written prior permission. The University of Delaware makes no\n"
- "representations about the suitability this software for any purpose. It is\n"
- "provided \"as is\" without express or implied warranty.\n\0"
-/* 958 */ "Do not fork\0"
-/* 970 */ "NOFORK\0"
-/* 977 */ "nofork\0"
-/* 984 */ "Log to syslog()\0"
-/* 1000 */ "SYSLOG\0"
-/* 1007 */ "syslog\0"
-/* 1014 */ "The socket address ntpsnmpd uses to connect to net-snmpd\0"
-/* 1071 */ "AGENTXSOCKET\0"
-/* 1084 */ "agentxsocket\0"
-/* 1097 */ "unix:/var/agentx/master\0"
-/* 1121 */ "display extended usage information and exit\0"
-/* 1165 */ "help\0"
-/* 1170 */ "extended usage information passed thru pager\0"
-/* 1215 */ "more-help\0"
-/* 1225 */ "output version information and exit\0"
-/* 1261 */ "version\0"
-/* 1269 */ "save the option state to a config file\0"
-/* 1308 */ "save-opts\0"
-/* 1318 */ "load options from a config file\0"
-/* 1350 */ "LOAD_OPTS\0"
-/* 1360 */ "no-load-opts\0"
-/* 1373 */ "no\0"
-/* 1376 */ "NTPSNMPD\0"
-/* 1385 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p482\n"
+ "specific, written prior permission. The University of Delaware and Network\n"
+ "Time Foundation makes no representations about the suitability this\n"
+ "software for any purpose. It is provided \"as is\" without express or\n"
+ "implied warranty.\n\0"
+/* 1012 */ "Do not fork\0"
+/* 1024 */ "NOFORK\0"
+/* 1031 */ "nofork\0"
+/* 1038 */ "Log to syslog()\0"
+/* 1054 */ "SYSLOG\0"
+/* 1061 */ "syslog\0"
+/* 1068 */ "The socket address ntpsnmpd uses to connect to net-snmpd\0"
+/* 1125 */ "AGENTXSOCKET\0"
+/* 1138 */ "agentxsocket\0"
+/* 1151 */ "unix:/var/agentx/master\0"
+/* 1175 */ "display extended usage information and exit\0"
+/* 1219 */ "help\0"
+/* 1224 */ "extended usage information passed thru pager\0"
+/* 1269 */ "more-help\0"
+/* 1279 */ "output version information and exit\0"
+/* 1315 */ "version\0"
+/* 1323 */ "save the option state to a config file\0"
+/* 1362 */ "save-opts\0"
+/* 1372 */ "load options from a config file\0"
+/* 1404 */ "LOAD_OPTS\0"
+/* 1414 */ "no-load-opts\0"
+/* 1427 */ "no\0"
+/* 1430 */ "NTPSNMPD\0"
+/* 1439 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
-/* 1490 */ "$HOME\0"
-/* 1496 */ ".\0"
-/* 1498 */ ".ntprc\0"
-/* 1505 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1539 */ "\n\0"
-/* 1541 */ "ntpsnmpd 4.2.7p482";
+/* 1542 */ "$HOME\0"
+/* 1548 */ ".\0"
+/* 1550 */ ".ntprc\0"
+/* 1557 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1591 */ "\n\0"
+/* 1593 */ "ntpsnmpd 4.2.8p2";
/**
* nofork option description:
*/
/** Descriptive text for the nofork option */
-#define NOFORK_DESC (ntpsnmpd_opt_strs+958)
+#define NOFORK_DESC (ntpsnmpd_opt_strs+1012)
/** Upper-cased name for the nofork option */
-#define NOFORK_NAME (ntpsnmpd_opt_strs+970)
+#define NOFORK_NAME (ntpsnmpd_opt_strs+1024)
/** Name string for the nofork option */
-#define NOFORK_name (ntpsnmpd_opt_strs+977)
+#define NOFORK_name (ntpsnmpd_opt_strs+1031)
/** Compiled in flag settings for the nofork option */
#define NOFORK_FLAGS (OPTST_DISABLED)
@@ -125,11 +126,11 @@ static char const ntpsnmpd_opt_strs[1560] =
* syslog option description:
*/
/** Descriptive text for the syslog option */
-#define SYSLOG_DESC (ntpsnmpd_opt_strs+984)
+#define SYSLOG_DESC (ntpsnmpd_opt_strs+1038)
/** Upper-cased name for the syslog option */
-#define SYSLOG_NAME (ntpsnmpd_opt_strs+1000)
+#define SYSLOG_NAME (ntpsnmpd_opt_strs+1054)
/** Name string for the syslog option */
-#define SYSLOG_name (ntpsnmpd_opt_strs+1007)
+#define SYSLOG_name (ntpsnmpd_opt_strs+1061)
/** Compiled in flag settings for the syslog option */
#define SYSLOG_FLAGS (OPTST_DISABLED)
@@ -137,13 +138,13 @@ static char const ntpsnmpd_opt_strs[1560] =
* agentXSocket option description:
*/
/** Descriptive text for the agentXSocket option */
-#define AGENTXSOCKET_DESC (ntpsnmpd_opt_strs+1014)
+#define AGENTXSOCKET_DESC (ntpsnmpd_opt_strs+1068)
/** Upper-cased name for the agentXSocket option */
-#define AGENTXSOCKET_NAME (ntpsnmpd_opt_strs+1071)
+#define AGENTXSOCKET_NAME (ntpsnmpd_opt_strs+1125)
/** Name string for the agentXSocket option */
-#define AGENTXSOCKET_name (ntpsnmpd_opt_strs+1084)
+#define AGENTXSOCKET_name (ntpsnmpd_opt_strs+1138)
/** The compiled in default value for the agentXSocket option argument */
-#define AGENTXSOCKET_DFT_ARG (ntpsnmpd_opt_strs+1097)
+#define AGENTXSOCKET_DFT_ARG (ntpsnmpd_opt_strs+1151)
/** Compiled in flag settings for the agentXSocket option */
#define AGENTXSOCKET_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -151,11 +152,11 @@ static char const ntpsnmpd_opt_strs[1560] =
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpsnmpd_opt_strs+1121)
-#define HELP_name (ntpsnmpd_opt_strs+1165)
+#define HELP_DESC (ntpsnmpd_opt_strs+1175)
+#define HELP_name (ntpsnmpd_opt_strs+1219)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpsnmpd_opt_strs+1170)
-#define MORE_HELP_name (ntpsnmpd_opt_strs+1215)
+#define MORE_HELP_DESC (ntpsnmpd_opt_strs+1224)
+#define MORE_HELP_name (ntpsnmpd_opt_strs+1269)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -168,14 +169,14 @@ static char const ntpsnmpd_opt_strs[1560] =
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpsnmpd_opt_strs+1225)
-#define VER_name (ntpsnmpd_opt_strs+1261)
-#define SAVE_OPTS_DESC (ntpsnmpd_opt_strs+1269)
-#define SAVE_OPTS_name (ntpsnmpd_opt_strs+1308)
-#define LOAD_OPTS_DESC (ntpsnmpd_opt_strs+1318)
-#define LOAD_OPTS_NAME (ntpsnmpd_opt_strs+1350)
-#define NO_LOAD_OPTS_name (ntpsnmpd_opt_strs+1360)
-#define LOAD_OPTS_pfx (ntpsnmpd_opt_strs+1373)
+#define VER_DESC (ntpsnmpd_opt_strs+1279)
+#define VER_name (ntpsnmpd_opt_strs+1315)
+#define SAVE_OPTS_DESC (ntpsnmpd_opt_strs+1323)
+#define SAVE_OPTS_name (ntpsnmpd_opt_strs+1362)
+#define LOAD_OPTS_DESC (ntpsnmpd_opt_strs+1372)
+#define LOAD_OPTS_NAME (ntpsnmpd_opt_strs+1404)
+#define NO_LOAD_OPTS_name (ntpsnmpd_opt_strs+1414)
+#define LOAD_OPTS_pfx (ntpsnmpd_opt_strs+1427)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -300,24 +301,24 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpsnmpd. */
-#define zPROGNAME (ntpsnmpd_opt_strs+1376)
+#define zPROGNAME (ntpsnmpd_opt_strs+1430)
/** Reference to the title line for ntpsnmpd usage. */
-#define zUsageTitle (ntpsnmpd_opt_strs+1385)
+#define zUsageTitle (ntpsnmpd_opt_strs+1439)
/** ntpsnmpd configuration file name. */
-#define zRcName (ntpsnmpd_opt_strs+1498)
+#define zRcName (ntpsnmpd_opt_strs+1550)
/** Directories to search for ntpsnmpd config files. */
static char const * const apzHomeList[3] = {
- ntpsnmpd_opt_strs+1490,
- ntpsnmpd_opt_strs+1496,
+ ntpsnmpd_opt_strs+1542,
+ ntpsnmpd_opt_strs+1548,
NULL };
/** The ntpsnmpd program bug email address. */
-#define zBugsAddr (ntpsnmpd_opt_strs+1505)
+#define zBugsAddr (ntpsnmpd_opt_strs+1557)
/** Clarification/explanation of what ntpsnmpd does. */
-#define zExplain (ntpsnmpd_opt_strs+1539)
+#define zExplain (ntpsnmpd_opt_strs+1591)
/** Extra detail explaining what ntpsnmpd does. */
#define zDetail (NULL)
/** The full version string for ntpsnmpd. */
-#define zFullVersion (ntpsnmpd_opt_strs+1541)
+#define zFullVersion (ntpsnmpd_opt_strs+1593)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -553,8 +554,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpsnmpdOptions.pzCopyright */
- puts(_("ntpsnmpd 4.2.7p482\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("ntpsnmpd 4.2.8p2\n\
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -568,9 +569,10 @@ provided that the above copyright notice appears in all copies and that\n\
both the copyright notice and this permission notice appear in supporting\n\
documentation, and that the name The University of Delaware not be used in\n\
advertising or publicity pertaining to distribution of the software without\n\
-specific, written prior permission. The University of Delaware makes no\n\
-representations about the suitability this software for any purpose. It is\n\
-provided \"as is\" without express or implied warranty.\n"));
+specific, written prior permission. The University of Delaware and Network\n\
+Time Foundation makes no representations about the suitability this\n\
+software for any purpose. It is provided \"as is\" without express or\n\
+implied warranty.\n"));
/* referenced via ntpsnmpdOptions.pOptDesc->pzText */
puts(_("Do not fork"));
@@ -597,14 +599,14 @@ provided \"as is\" without express or implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpsnmpdOptions.pzUsageTitle */
- puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p482\n\
+ puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntpsnmpdOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpsnmpdOptions.pzFullVersion */
- puts(_("ntpsnmpd 4.2.7p482"));
+ puts(_("ntpsnmpd 4.2.8p2"));
/* referenced via ntpsnmpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpsnmpd/ntpsnmpd-opts.h b/ntpsnmpd/ntpsnmpd-opts.h
index f4608dd..5469615 100644
--- a/ntpsnmpd/ntpsnmpd-opts.h
+++ b/ntpsnmpd/ntpsnmpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
*
- * It has been AutoGen-ed December 2, 2014 at 08:58:13 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:27:12 AM by AutoGen 5.18.5pre4
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpsnmpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -76,9 +76,9 @@ typedef enum {
/** count of all options for ntpsnmpd */
#define OPTION_CT 8
/** ntpsnmpd version */
-#define NTPSNMPD_VERSION "4.2.7p482"
+#define NTPSNMPD_VERSION "4.2.8p2"
/** Full ntpsnmpd version text */
-#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.7p482"
+#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpsnmpd/ntpsnmpd.1ntpsnmpdman b/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
index 90b3481..9724e26 100644
--- a/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
+++ b/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd 1ntpsnmpdman "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpsnmpd 1ntpsnmpdman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-ELai0P/ag-QLaaZP)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-wFai4a/ag-JFaa3a)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:21 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:19 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -138,7 +138,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Heiko Gerstung"
.br
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc b/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
index 565004c..7326bee 100644
--- a/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
+++ b/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPSNMPD 1ntpsnmpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:27 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:25 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -110,7 +110,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
.An "Heiko Gerstung"
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpsnmpd/ntpsnmpd.html b/ntpsnmpd/ntpsnmpd.html
index 8987015..9d570bb 100644
--- a/ntpsnmpd/ntpsnmpd.html
+++ b/ntpsnmpd/ntpsnmpd.html
@@ -42,7 +42,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>The <code>ntpsnmpd</code> utility program is used to monitor NTP daemon <code>ntpd</code>
operations and determine performance. It uses the standard NTP mode 6 control
- <p>This document applies to version 4.2.7p482 of <code>ntpsnmpd</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpsnmpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpsnmpd-Description">ntpsnmpd Description</a>: Description
diff --git a/ntpsnmpd/ntpsnmpd.man.in b/ntpsnmpd/ntpsnmpd.man.in
index af9bafa..15ee8a2 100644
--- a/ntpsnmpd/ntpsnmpd.man.in
+++ b/ntpsnmpd/ntpsnmpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd @NTPSNMPD_MS@ "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpsnmpd @NTPSNMPD_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-ELai0P/ag-QLaaZP)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-wFai4a/ag-JFaa3a)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:21 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:19 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -138,7 +138,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Heiko Gerstung"
.br
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpsnmpd/ntpsnmpd.mdoc.in b/ntpsnmpd/ntpsnmpd.mdoc.in
index 594c7e3..5bf8bb9 100644
--- a/ntpsnmpd/ntpsnmpd.mdoc.in
+++ b/ntpsnmpd/ntpsnmpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPSNMPD @NTPSNMPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:27 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:25 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -110,7 +110,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
.An "Heiko Gerstung"
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/packageinfo.sh b/packageinfo.sh
index 6963a20..81106fe 100644
--- a/packageinfo.sh
+++ b/packageinfo.sh
@@ -41,11 +41,11 @@
# To see what UpdatePoint will do without modifying packageinfo.sh as it
# does by default, use the -t/--test option before the repo type:
#
-# shell# scripts/UpdatePoint -t stable
+# shell# scripts/build/UpdatePoint -t stable
#
# repotype must be stable or dev
-repotype=dev
+repotype=stable
# post-4.2.8:
# version=Major.Minor
@@ -55,7 +55,7 @@ repotype=dev
# UpdatePoint will fail if repotype is inconsistent with minor.
proto=4
major=2
-minor=7
+minor=8
case "${proto}.${major}" in
4.[012])
@@ -83,7 +83,7 @@ CLTAG=NTP_4_2_0
# - Numeric values increment
# - empty 'increments' to 1
# - NEW 'increments' to empty
-point=482
+point=2
### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint)
diff --git a/parseutil/Makefile.in b/parseutil/Makefile.in
index 963fd08..999f4f1 100644
--- a/parseutil/Makefile.in
+++ b/parseutil/Makefile.in
@@ -41,8 +41,7 @@ subdir = parseutil
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -53,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -70,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -147,6 +149,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -181,7 +184,9 @@ 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@
@@ -320,6 +325,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/parseutil/dcfd.c b/parseutil/dcfd.c
index 0db94c0..652b375 100644
--- a/parseutil/dcfd.c
+++ b/parseutil/dcfd.c
@@ -1,6 +1,6 @@
/*
* /src/NTP/REPOSITORY/ntp4-dev/parseutil/dcfd.c,v 4.18 2005/10/07 22:08:18 kardel RELEASE_20051008_A
- *
+ *
* dcfd.c,v 4.18 2005/10/07 22:08:18 kardel RELEASE_20051008_A
*
* DCF77 100/200ms pulse synchronisation daemon program (via 50Baud serial line)
@@ -14,7 +14,7 @@
* Leap second handling (at that level you should switch to NTP Version 4 - really!)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -198,7 +198,7 @@ static char skip_adjust = 1; /* discard first adjustment (bad samples) */
#define DCFB_ANNOUNCE 0x0001 /* switch time zone warning (DST switch) */
#define DCFB_DST 0x0002 /* DST in effect */
#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurrence) */
-#define DCFB_ALTERNATE 0x0008 /* alternate antenna used */
+#define DCFB_CALLBIT 0x0008 /* "call bit" used to signalize irregularities in the control facilities */
struct clocktime /* clock time broken up from time code */
{
@@ -219,9 +219,16 @@ typedef struct clocktime clocktime_t;
/*
* (usually) quick constant multiplications
*/
+#ifndef TIMES10
#define TIMES10(_X_) (((_X_) << 3) + ((_X_) << 1)) /* *8 + *2 */
+#endif
+#ifndef TIMES24
#define TIMES24(_X_) (((_X_) << 4) + ((_X_) << 3)) /* *16 + *8 */
+#endif
+#ifndef TIMES60
#define TIMES60(_X_) ((((_X_) << 4) - (_X_)) << 2) /* *(16 - 1) *4 */
+#endif
+
/*
* generic l_abs() function
*/
@@ -260,7 +267,8 @@ typedef struct clocktime clocktime_t;
* Second Contents
* 0 - 10 AM: free, FM: 0
* 11 - 14 free
- * 15 R - alternate antenna
+ * 15 R - "call bit" used to signalize irregularities in the control facilities
+ * (until 2003 indicated transmission via alternate antenna)
* 16 A1 - expect zone change (1 hour before)
* 17 - 18 Z1,Z2 - time zone
* 0 0 illegal
@@ -294,7 +302,7 @@ typedef struct clocktime clocktime_t;
* while the length is given as the difference between the start index and
* the start index of the following field.
*/
-static struct rawdcfcode
+static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@@ -361,7 +369,7 @@ static struct dcfparam
{
unsigned char onebits[60];
unsigned char zerobits[60];
-} dcfparam =
+} dcfparam =
{
"###############RADMLS1248124P124812P1248121241248112481248P", /* 'ONE' representation */
"--------------------s-------p------p----------------------p" /* 'ZERO' representation */
@@ -384,7 +392,7 @@ ext_bf(
register int i, first;
first = rawdcfcode[idx].offset;
-
+
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@@ -438,7 +446,7 @@ convert_rawdcf(
PRINTF("%-30s", "*** INCOMPLETE");
return CVT_NONE;
}
-
+
/*
* check Start and Parity bits
*/
@@ -495,7 +503,7 @@ convert_rawdcf(
clock_time->flags |= DCFB_LEAP;
if (ext_bf(buffer, DCF_R))
- clock_time->flags |= DCFB_ALTERNATE;
+ clock_time->flags |= DCFB_CALLBIT;
return CVT_OK;
}
@@ -739,7 +747,7 @@ cvt_rawdcf(
* if everything went well so far return the result of the symbolic
* conversion routine else just the accumulated errors
*/
- if (rtc != CVT_NONE)
+ if (rtc != CVT_NONE)
{
PRINTF("%-30s", "*** BAD DATA");
}
@@ -758,13 +766,13 @@ dcf_to_unixtime(
)
{
#define SETRTC(_X_) { if (cvtrtc) *cvtrtc = (_X_); }
- static int days_of_month[] =
+ static int days_of_month[] =
{
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
register int i;
time_t t;
-
+
/*
* map 2 digit years to 19xx (DCF77 is a 20th century item)
*/
@@ -847,7 +855,7 @@ dcf_to_unixtime(
*/
t = TIMES60(t) + clock_time->minute;
/* sec */
-
+
/*
* calculate UTC in minutes
*/
@@ -1247,7 +1255,7 @@ usage(
*/
static int
check_y2k( void )
-{
+{
int year; /* current working year */
int year0 = 1900; /* sarting year for NTP time */
int yearend; /* ending year we test for NTP time.
@@ -1306,7 +1314,7 @@ check_y2k( void )
* *a minor difference to arg2 type */
if ( ct.year != year )
{
- fprintf( stdout,
+ fprintf( stdout,
"%04d: dcf_to_unixtime(,%d) CORRUPTED ct.year: was %d\n",
(int)year, (int)Flag, (int)ct.year );
Error(year);
@@ -1316,9 +1324,9 @@ check_y2k( void )
Expected = t * 24 * 60 * 60;
if ( Observed != Expected || Flag )
{ /* time difference */
- fprintf( stdout,
+ fprintf( stdout,
"%04d: dcf_to_unixtime(,%d) FAILURE: was=%lu s/b=%lu (%ld)\n",
- year, (int)Flag,
+ year, (int)Flag,
(unsigned long)Observed, (unsigned long)Expected,
((long)Observed - (long)Expected) );
Error(year);
@@ -1344,7 +1352,7 @@ rawdcf_init(
* Here a voltage between the DTR and the RTS line is used. Unfortunately
* the name has changed from CIOCM_DTR to TIOCM_DTR recently.
*/
-
+
#ifdef TIOCM_DTR
int sl232 = TIOCM_DTR; /* turn on DTR for power supply */
#else
@@ -1438,7 +1446,7 @@ main(
errs=1;
}
break;
-
+
case 'd':
if (ac > 1)
{
@@ -1451,8 +1459,8 @@ main(
errs=1;
}
break;
-
- case 'Y':
+
+ case 'Y':
errs=check_y2k();
exit( errs ? 1 : 0 );
@@ -1519,7 +1527,7 @@ main(
unsigned int rtc = CVT_NONE;
rawdcf_init(fd);
-
+
timeout.tv_sec = 1;
timeout.tv_usec = 500000;
@@ -1560,7 +1568,7 @@ main(
*/
if (!interactive)
detach();
-
+
/*
* get syslog() initialized
*/
@@ -1618,7 +1626,7 @@ main(
it.it_interval.tv_usec = 0;
it.it_value.tv_sec = 1<<ADJINTERVAL;
it.it_value.tv_usec = 0;
-
+
if (setitimer(ITIMER_REAL, &it, (struct itimerval *)0) == -1)
{
syslog(LOG_ERR, "setitimer: %m");
@@ -1797,7 +1805,7 @@ main(
wday[clock_time.wday],
clock_time.hour, clock_time.minute, i, clock_time.day, clock_time.month,
clock_time.year,
- (clock_time.flags & DCFB_ALTERNATE) ? "R" : "_",
+ (clock_time.flags & DCFB_CALLBIT) ? "R" : "_",
(clock_time.flags & DCFB_ANNOUNCE) ? "A" : "_",
(clock_time.flags & DCFB_DST) ? "D" : "_",
(clock_time.flags & DCFB_LEAP) ? "L" : "_",
@@ -1829,7 +1837,7 @@ main(
fflush(stdout);
}
} while ((rrc == -1) && (errno == EINTR));
-
+
/*
* lost IO - sorry guys
*/
@@ -1839,7 +1847,7 @@ main(
}
closelog();
-
+
return 0;
}
diff --git a/parseutil/testdcf.c b/parseutil/testdcf.c
index c78c242..00bf059 100644
--- a/parseutil/testdcf.c
+++ b/parseutil/testdcf.c
@@ -2,11 +2,11 @@
* /src/NTP/ntp4-dev/parseutil/testdcf.c,v 4.10 2005/08/06 14:18:43 kardel RELEASE_20050806_A
*
* testdcf.c,v 4.10 2005/08/06 14:18:43 kardel RELEASE_20050806_A
- *
+ *
* simple DCF77 100/200ms pulse test program (via 50Baud serial line)
*
* Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -46,10 +46,10 @@
/*
* state flags
*/
-#define DCFB_ANNOUNCE 0x0001 /* switch time zone warning (DST switch) */
-#define DCFB_DST 0x0002 /* DST in effect */
-#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurrence) */
-#define DCFB_ALTERNATE 0x0008 /* alternate antenna used */
+#define DCFB_ANNOUNCE 0x0001 /* switch time zone warning (DST switch) */
+#define DCFB_DST 0x0002 /* DST in effect */
+#define DCFB_LEAP 0x0004 /* LEAP warning (1 hour prior to occurrence) */
+#define DCFB_CALLBIT 0x0008 /* "call bit" used to signalize irregularities in the control facilities */
struct clocktime /* clock time broken up from time code */
{
@@ -102,7 +102,8 @@ static char type(unsigned int);
* Second Contents
* 0 - 10 AM: free, FM: 0
* 11 - 14 free
- * 15 R - alternate antenna
+ * 15 R - "call bit" used to signalize irregularities in the control facilities
+ * (until 2003 indicated transmission via alternate antenna)
* 16 A1 - expect zone change (1 hour before)
* 17 - 18 Z1,Z2 - time zone
* 0 0 illegal
@@ -130,7 +131,7 @@ static char type(unsigned int);
static char revision[] = "4.10";
-static struct rawdcfcode
+static struct rawdcfcode
{
char offset; /* start bit */
} rawdcfcode[] =
@@ -185,7 +186,7 @@ ext_bf(
register int i, first;
first = rawdcfcode[idx].offset;
-
+
for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
{
sum <<= 1;
@@ -223,7 +224,7 @@ convert_rawdcf(
printf("%-30s", "*** INCOMPLETE");
return CVT_NONE;
}
-
+
/*
* check Start and Parity bits
*/
@@ -274,7 +275,7 @@ convert_rawdcf(
clock_time->flags |= DCFB_LEAP;
if (ext_bf(buffer, DCF_R))
- clock_time->flags |= DCFB_ALTERNATE;
+ clock_time->flags |= DCFB_CALLBIT;
return CVT_OK;
}
@@ -490,7 +491,7 @@ main(
wday[clock_time.wday],
(int)clock_time.hour, (int)clock_time.minute, (int)i, (int)clock_time.day, (int)clock_time.month,
(int)clock_time.year,
- (clock_time.flags & DCFB_ALTERNATE) ? "R" : "_",
+ (clock_time.flags & DCFB_CALLBIT) ? "R" : "_",
(clock_time.flags & DCFB_ANNOUNCE) ? "A" : "_",
(clock_time.flags & DCFB_DST) ? "D" : "_",
(clock_time.flags & DCFB_LEAP) ? "L" : "_"
diff --git a/ports/winnt/include/config.h b/ports/winnt/include/config.h
index b99aaa7..f56df9d 100644
--- a/ports/winnt/include/config.h
+++ b/ports/winnt/include/config.h
@@ -258,6 +258,7 @@ typedef int socklen_t;
/* Enable OpenSSL */
#define OPENSSL 1
+#define USE_OPENSSL_CRYPTO_RAND 1
/*
* Keywords and functions that Microsoft maps
@@ -299,9 +300,13 @@ typedef int socklen_t;
#define getpid _getpid
#define timegm _mkgmtime
#define errno_to_str isc__strerror
+/*
+ * symbol returning the name of the current function
+ */
+#define __func__ __FUNCTION__
typedef int pid_t; /* PID is an int */
-typedef int ssize_t; /* ssize is an int */
+typedef int ssize_t; /* ssize is an int */
/*
* Map the stream to the file number
@@ -452,6 +457,7 @@ typedef unsigned long uintptr_t;
#if defined(_MSC_VER) && _MSC_VER<1800
# define MISSING_INTTYPES_H 1 /* not provided by VS2012 and earlier */
# define MISSING_STDBOOL_H 1 /* not provided by VS2012 and earlier */
+# define MISSING_C99_STRUCT_INIT 1 /* see [Bug 2728] */
#else
#if defined(_MSC_VER) && _MSC_VER>=1800
/* VS2013 and above support C99 types */
diff --git a/ports/winnt/include/termios.h b/ports/winnt/include/termios.h
index 9c1cc62..94331af 100644
--- a/ports/winnt/include/termios.h
+++ b/ports/winnt/include/termios.h
@@ -205,7 +205,7 @@ struct termios
#define cfsetispeed(dcb, spd) (0)
extern int closeserial (int);
-extern int ioctl (int, int, int *);
+extern int ioctl (int, int, void *);
extern int tcsetattr (int, int, const struct termios *);
extern int tcgetattr (int, struct termios *);
extern int tcflush (int, int);
diff --git a/ports/winnt/libntp/arc4wrap.c b/ports/winnt/libntp/arc4wrap.c
new file mode 100644
index 0000000..9513d15
--- /dev/null
+++ b/ports/winnt/libntp/arc4wrap.c
@@ -0,0 +1,84 @@
+/*
+ * arc4wrap.c - wrapper for libevent's ARCFOUR random number generator
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ * --------------------------------------------------------------------
+ * This is an inclusion wrapper for the ARCFOUR implementation in
+ * libevent. It's main usage is to enable a openSSL-free build on Win32
+ * without a full integration of libevent. This provides Win32 specific
+ * glue to make the PRNG working. Porting to POSIX should be easy, but
+ * on most POSIX systems using openSSL is no problem and falling back to
+ * using ARCFOUR instead of the openSSL PRNG is not necessary. And even
+ * if it is, there's a good chance that ARCFOUR is a system library.
+ */
+#include <config.h>
+#ifdef _WIN32
+# include <wincrypt.h>
+# include <process.h>
+#else
+# error this is currently a pure windows port
+#endif
+
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include "ntp_types.h"
+#include "ntp_stdlib.h"
+
+/* ARCFOUR implementation glue */
+/* export type is empty, since this goes into a static library*/
+#define ARC4RANDOM_EXPORT
+/* we use default uint32_t as UINT32 */
+#define ARC4RANDOM_UINT32 uint32_t
+/* do not use ARCFOUR's default includes - we gobble it all up here. */
+#define ARC4RANDOM_NO_INCLUDES
+/* And the locking. Could probably be left empty. */
+#define ARC4_LOCK_() private_lock_()
+#define ARC4_UNLOCK_() private_unlock_()
+
+/* support code */
+
+static void
+evutil_memclear_(
+ void *buf,
+ size_t len)
+{
+ memset(buf, 0, len);
+}
+
+/* locking uses a manual thread-safe ONCE pattern. There's no static
+ * initialiser pattern that can be used for critical sections, and
+ * we must make sure we do the creation exactly once on the first call.
+ */
+
+static long once_ = 0;
+static CRITICAL_SECTION csec_;
+
+static void
+private_lock_(void)
+{
+again:
+ switch (InterlockedCompareExchange(&once_, 1, 0)) {
+ case 0:
+ InitializeCriticalSection(&csec_);
+ InterlockedExchange(&once_, 2);
+ case 2:
+ EnterCriticalSection(&csec_);
+ break;
+
+ default:
+ YieldProcessor();
+ goto again;
+ }
+}
+
+static void
+private_unlock_(void)
+{
+ if (InterlockedExchangeAdd(&once_, 0) == 2)
+ LeaveCriticalSection(&csec_);
+}
+
+#pragma warning(disable : 4244)
+#include "../../../sntp/libevent/arc4random.c"
diff --git a/ports/winnt/libntp/getclock.c b/ports/winnt/libntp/getclock.c
index 68496bd..0fdcb69 100644
--- a/ports/winnt/libntp/getclock.c
+++ b/ports/winnt/libntp/getclock.c
@@ -33,6 +33,8 @@ getclock(
return -1;
}
+ if (NULL == get_sys_time_as_filetime)
+ init_win_precise_time();
(*get_sys_time_as_filetime)(&uNow.ft);
/*
diff --git a/ports/winnt/libntp/termios.c b/ports/winnt/libntp/termios.c
index 3fe4e48..5ac017d 100644
--- a/ports/winnt/libntp/termios.c
+++ b/ports/winnt/libntp/termios.c
@@ -468,12 +468,13 @@ int
ioctl(
int fd,
int op,
- int *pi
+ void *pv
)
{
HANDLE h;
int result;
int modctl;
+ int *pi = (int *) pv;
h = (HANDLE)_get_osfhandle(fd);
diff --git a/ports/winnt/ntpd/nt_clockstuff.c b/ports/winnt/ntpd/nt_clockstuff.c
index 052bfcd..dc2f150 100644
--- a/ports/winnt/ntpd/nt_clockstuff.c
+++ b/ports/winnt/ntpd/nt_clockstuff.c
@@ -68,8 +68,8 @@ BOOL init_randfile();
static long last_Adj = 0;
#define LS_CORR_INTV_SECS 2 /* seconds to apply leap second correction */
-#define LS_CORR_INTV ( (LONGLONG) HECTONANOSECONDS * LS_CORR_INTV_SECS )
-#define LS_CORR_LIMIT ( (LONGLONG) HECTONANOSECONDS / 2 ) // half a second
+#define LS_CORR_INTV ( 1000ul * LS_CORR_INTV_SECS )
+#define LS_CORR_LIMIT ( 250ul ) // quarter second
typedef union ft_ull {
FILETIME ft;
@@ -81,8 +81,6 @@ typedef union ft_ull {
/* leap second stuff */
static FT_ULL ls_ft;
static DWORD ls_time_adjustment;
-static ULONGLONG ls_ref_perf_cnt;
-static LONGLONG ls_elapsed;
static BOOL winnt_time_initialized = FALSE;
static BOOL winnt_use_interpolation = FALSE;
@@ -469,13 +467,15 @@ adj_systime(
/* ntp time scale origin as ticks since 1601-01-01 */
static const ULONGLONG HNS_JAN_1900 = 94354848000000000ull;
+ static DWORD ls_start_tick; /* start of slew in 1ms ticks */
+
static double adjtime_carry;
double dtemp;
u_char isneg;
BOOL rc;
long TimeAdjustment;
SYSTEMTIME st;
- ULONGLONG this_perf_count;
+ DWORD ls_elapsed;
FT_ULL curr_ft;
leap_result_t lsi;
@@ -542,7 +542,8 @@ adj_systime(
/* A leap second insert is scheduled at the end
* of the day. Since we have not yet computed the
* time stamp, do it now. Signal electric mode
- * for this insert.
+ * for this insert. We start processing 1 second early
+ * because we want to slew over 2 seconds.
*/
ls_ft.ull = lsi.ttime.Q_s * HECTONANOSECONDS
+ HNS_JAN_1900;
@@ -552,6 +553,10 @@ adj_systime(
"for %04d-%02d-%02d %02d:%02d:%02d UTC",
st.wYear, st.wMonth, st.wDay,
st.wHour, st.wMinute, st.wSecond);
+ /* slew starts with last second before insertion!
+ * And we have to tell the core that we deal with it.
+ */
+ ls_ft.ull -= (HECTONANOSECONDS + HECTONANOSECONDS/2);
leapsec_electric(TRUE);
} else if (lsi.tai_diff < 0) {
/* Do not handle negative leap seconds here. If this
@@ -574,29 +579,29 @@ adj_systime(
/*
* If the time stamp for the next leap second has been set
- * then check if the leap second must be handled
+ * then check if the leap second must be handled. We use
+ * free-running milliseconds from 'GetTickCount()', which
+ * is documented as not affected by clock and/or speed
+ * adjustments.
*/
if (ls_ft.ull != 0) {
- this_perf_count = perf_ctr();
-
if (0 == ls_time_adjustment) { /* has not yet been scheduled */
-
GetSystemTimeAsFileTime(&curr_ft.ft);
if (curr_ft.ull >= ls_ft.ull) {
+ ls_ft.ull = _UI64_MAX; /* guard against second schedule */
ls_time_adjustment = clockperiod / LS_CORR_INTV_SECS;
- ls_ref_perf_cnt = this_perf_count;
- ls_elapsed = 0;
- msyslog(LOG_NOTICE, "Inserting positive leap second.");
+ ls_start_tick = GetTickCount();
+ msyslog(LOG_NOTICE, "Started leap second insertion.");
}
+ ls_elapsed = 0;
} else { /* leap sec adjustment has been scheduled previously */
- ls_elapsed = (this_perf_count - ls_ref_perf_cnt)
- * HECTONANOSECONDS / PerfCtrFreq;
+ ls_elapsed = GetTickCount() - ls_start_tick;
}
if (ls_time_adjustment != 0) { /* leap second adjustment is currently active */
if (ls_elapsed > (LS_CORR_INTV - LS_CORR_LIMIT)) {
ls_time_adjustment = 0; /* leap second adjustment done */
- ls_ft.ull = 0;
+ msyslog(LOG_NOTICE, "Finished leap second insertion.");
}
/*
@@ -819,6 +824,10 @@ init_winnt_time(void)
msyslog(LOG_INFO, "MM timer resolution: %u..%u msec, set to %u msec",
tc.wPeriodMin, tc.wPeriodMax, wTimerRes );
+
+ /* Pause briefly before measuring the clock precision, see [Bug 2790] */
+ Sleep( 33 );
+
} else {
msyslog(LOG_ERR, "Multimedia timer unavailable");
}
diff --git a/ports/winnt/vs2005/libntp.vcproj b/ports/winnt/vs2005/libntp.vcproj
index f2d0b9e..fdc3374 100644
--- a/ports/winnt/vs2005/libntp.vcproj
+++ b/ports/winnt/vs2005/libntp.vcproj
@@ -181,6 +181,10 @@
>
</File>
<File
+ RelativePath="..\libntp\arc4wrap.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\lib\isc\assertions.c"
>
</File>
diff --git a/ports/winnt/vs2008/libntp/libntp.vcproj b/ports/winnt/vs2008/libntp/libntp.vcproj
index 6bf25cb..b87d178 100644
--- a/ports/winnt/vs2008/libntp/libntp.vcproj
+++ b/ports/winnt/vs2008/libntp/libntp.vcproj
@@ -193,6 +193,10 @@
>
</File>
<File
+ RelativePath="..\..\libntp\arc4wrap.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\..\lib\isc\assertions.c"
>
</File>
@@ -401,6 +405,10 @@
>
</File>
<File
+ RelativePath="..\..\..\..\libntp\ntp_crypto_rnd.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\..\libntp\ntp_intres.c"
>
</File>
@@ -874,11 +882,11 @@
>
</File>
<File
- RelativePath="..\..\include\sys\time.h"
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
>
</File>
<File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+ RelativePath="..\..\include\sys\time.h"
>
</File>
<File
diff --git a/ports/winnt/vs2013/libntp/libntp.vcxproj b/ports/winnt/vs2013/libntp/libntp.vcxproj
index d3b1b6e..1289c2d 100644
--- a/ports/winnt/vs2013/libntp/libntp.vcxproj
+++ b/ports/winnt/vs2013/libntp/libntp.vcxproj
@@ -544,6 +544,7 @@
<ClCompile Include="..\..\..\..\lib\isc\error.c" />
<ClCompile Include="..\..\..\..\lib\isc\event.c" />
<ClCompile Include="..\..\..\..\libntp\findconfig.c" />
+ <ClCompile Include="..\..\libntp\arc4wrap.c" />
<ClCompile Include="..\..\libntp\getclock.c" />
<ClCompile Include="..\..\..\..\libntp\getopt.c" />
<ClCompile Include="..\..\..\..\libntp\hextoint.c" />
@@ -571,6 +572,7 @@
<ClCompile Include="..\..\..\..\libntp\netof.c" />
<ClCompile Include="..\..\..\..\lib\isc\netscope.c" />
<ClCompile Include="..\..\..\..\libntp\ntp_calendar.c" />
+ <ClCompile Include="..\..\..\..\libntp\ntp_crypto_rnd.c" />
<ClCompile Include="..\..\..\..\libntp\ntp_intres.c" />
<ClCompile Include="..\..\..\..\libntp\ntp_libopts.c" />
<ClCompile Include="..\..\..\..\libntp\ntp_lineedit.c" />
diff --git a/ports/winnt/vs2013/libntp/libntp.vcxproj.filters b/ports/winnt/vs2013/libntp/libntp.vcxproj.filters
index 4eefad7..10596c6 100644
--- a/ports/winnt/vs2013/libntp/libntp.vcxproj.filters
+++ b/ports/winnt/vs2013/libntp/libntp.vcxproj.filters
@@ -317,6 +317,12 @@
<ClCompile Include="..\..\..\..\libntp\vint64ops.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ntp_crypto_rnd.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\arc4wrap.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\sntp\libopts\ag-char-map.h">
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 7ddf424..2664bef 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS= \
ntpsweep \
ntptrace \
lib \
+ update-leap \
$(NULL)
man1_MANS=
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 336c6c4..c0ff722 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -42,8 +42,7 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -54,6 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -71,6 +71,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -179,6 +181,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -213,7 +216,9 @@ 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@
@@ -352,6 +357,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
@@ -418,6 +428,7 @@ SUBDIRS = \
ntpsweep \
ntptrace \
lib \
+ update-leap \
$(NULL)
man1_MANS =
diff --git a/scripts/build/Makefile.in b/scripts/build/Makefile.in
index 212d26b..2f6b026 100644
--- a/scripts/build/Makefile.in
+++ b/scripts/build/Makefile.in
@@ -40,8 +40,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -52,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -69,6 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -110,6 +112,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -144,7 +147,9 @@ 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@
@@ -283,6 +288,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/build/UpdatePoint b/scripts/build/UpdatePoint
index e3c5957..61c0349 100755
--- a/scripts/build/UpdatePoint
+++ b/scripts/build/UpdatePoint
@@ -217,20 +217,26 @@ case "$repo" in
;;
esac
-case "$bp::$point" in
- 0::*)
+case "$repo::$bp::$point" in
+ *::0::*)
newpoint=$point
;;
- 1::[1-9]*)
+ dev::1::0)
+ newpoint=`expr $point + 1`
+ ;;
+ *::1::[1-9]*)
newpoint=`expr $point + 1`
;;
- 1::)
+ dev::1::)
+ newpoint=0
+ ;;
+ stable::1::)
newpoint=1
;;
- 1::[Nn][Ee][Ww])
+ *::1::[Nn][Ee][Ww])
newpoint=
;;
- *) echo "Unexpected value for 'point' <$point>!"
+ *) echo "Unexpected value for 'point' <$point>! (repo::bp::point is $repo::$bp::$point)"
exit 1
;;
esac
diff --git a/scripts/build/VersionName b/scripts/build/VersionName
index 71e31a9..84b5972 100755
--- a/scripts/build/VersionName
+++ b/scripts/build/VersionName
@@ -19,8 +19,17 @@ esac
. "$packageinfo"
NAME="$version"
-case $point in
- [1-9]*)
+case "$repotype::$point" in
+ dev::)
+ case "${proto}.${major}" in
+ 4.[012])
+ NAME="${NAME}p${point}"
+ ;;
+ *) NAME="${NAME}"
+ ;;
+ esac
+ ;;
+ stable::[1-9]* | dev::[0-9]*)
case "${proto}.${major}" in
4.[012])
NAME="${NAME}p${point}"
@@ -31,7 +40,7 @@ case $point in
;;
NEW) ;;
'') ;;
- *) echo "Unexpected value for 'point' <$point>!"
+ *) echo "Unexpected value for 'point' <$point>! (repotype is <$repotype>)"
exit 1
;;
esac
diff --git a/scripts/calc_tickadj/Makefile.in b/scripts/calc_tickadj/Makefile.in
index 4e5b34f..154e4a3 100644
--- a/scripts/calc_tickadj/Makefile.in
+++ b/scripts/calc_tickadj/Makefile.in
@@ -42,8 +42,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -54,6 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -71,6 +71,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -141,6 +143,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -175,7 +178,9 @@ 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@
@@ -314,6 +319,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
index 18e2310..e5008cc 100644
--- a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
+++ b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-yLaGPB/ag-LLaOOB)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_1aOBS/ag-n2aWAS)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:04 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:04 AM by AutoGen 5.18.5pre4
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
index 265ec39..7135beb 100644
--- a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
+++ b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:08 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:08 AM by AutoGen 5.18.5pre4
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/calc_tickadj/calc_tickadj.html b/scripts/calc_tickadj/calc_tickadj.html
index 0d42d6f..b64096d 100644
--- a/scripts/calc_tickadj/calc_tickadj.html
+++ b/scripts/calc_tickadj/calc_tickadj.html
@@ -31,7 +31,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<h2 class="unnumbered">calc_tickadj User's Manual</h2>
<p>This document describes the use of the NTP Project's <code>calc_tickadj</code> program.
-This document applies to version 4.2.7p482 of <code>calc_tickadj</code>.
+This document applies to version 4.2.8p2 of <code>calc_tickadj</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/scripts/calc_tickadj/calc_tickadj.man.in b/scripts/calc_tickadj/calc_tickadj.man.in
index 18e2310..e5008cc 100644
--- a/scripts/calc_tickadj/calc_tickadj.man.in
+++ b/scripts/calc_tickadj/calc_tickadj.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-yLaGPB/ag-LLaOOB)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_1aOBS/ag-n2aWAS)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:04 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:04 AM by AutoGen 5.18.5pre4
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/calc_tickadj/calc_tickadj.mdoc.in b/scripts/calc_tickadj/calc_tickadj.mdoc.in
index 265ec39..7135beb 100644
--- a/scripts/calc_tickadj/calc_tickadj.mdoc.in
+++ b/scripts/calc_tickadj/calc_tickadj.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:08 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:08 AM by AutoGen 5.18.5pre4
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/calc_tickadj/invoke-calc_tickadj.texi b/scripts/calc_tickadj/invoke-calc_tickadj.texi
index c274279..c9e44b8 100644
--- a/scripts/calc_tickadj/invoke-calc_tickadj.texi
+++ b/scripts/calc_tickadj/invoke-calc_tickadj.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-calc_tickadj.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:10 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:09 AM by AutoGen 5.18.5pre4
# From the definitions calc_tickadj-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
diff --git a/scripts/invoke-plot_summary.texi b/scripts/invoke-plot_summary.texi
index 64930ed..48ea5b4 100644
--- a/scripts/invoke-plot_summary.texi
+++ b/scripts/invoke-plot_summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:45 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:51 AM by AutoGen 5.18.5pre4
# From the definitions plot_summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -41,7 +41,7 @@ with a status code of 0.
@exampleindent 0
@example
-plot_summary - plot statistics generated by summary script - Ver. 4.2.7p482
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p2
USAGE: plot_summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Where the summary files are
diff --git a/scripts/invoke-summary.texi b/scripts/invoke-summary.texi
index 3ee25d3..16fc222 100644
--- a/scripts/invoke-summary.texi
+++ b/scripts/invoke-summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-summary.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:50 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:57 AM by AutoGen 5.18.5pre4
# From the definitions summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -42,7 +42,7 @@ with a status code of 0.
@exampleindent 0
@example
-summary - compute various stastics from NTP stat files - Ver. 4.2.7p482
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p2
USAGE: summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Directory containing stat files
diff --git a/scripts/lib/Makefile.in b/scripts/lib/Makefile.in
index 1afcf7d..2b0f097 100644
--- a/scripts/lib/Makefile.in
+++ b/scripts/lib/Makefile.in
@@ -39,8 +39,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -51,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -68,6 +68,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -131,6 +133,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -165,7 +168,9 @@ 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@
@@ -304,6 +309,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/lib/NTP/Util.pm b/scripts/lib/NTP/Util.pm
index 66f2453..cd2f9e5 100644
--- a/scripts/lib/NTP/Util.pm
+++ b/scripts/lib/NTP/Util.pm
@@ -93,18 +93,27 @@ sub do_dns {
sub ntp_peers {
my ($host) = @_;
- my $cmd = "$ntpq_path -np $host |";
+ $host ||= '';
+ my $cmd = "$ntpq_path -npw $host |";
open my $fh, $cmd or croak "Could not start ntpq: $!";
<$fh> for 1 .. 2;
- my @columns = qw(remote refid st t when poll reach delay offset jitter);
+ my @columns = qw(tally host refid st t when poll reach delay offset jitter);
my @peers;
while (<$fh>) {
- if (/(?:[\w\.\*-]+\s*){10}/) {
+ if (/^([ x+#*o-])((?:[\w.*:-]+\s+){10}|([\w.*:-]+\s+))$/) {
my $col = 0;
- push @peers, { map {; $columns[ $col++ ] => $_ } split /(?<=.)\s+/ };
+ my @line = ($1, split /\s+/, $2);
+ if( @line == 2 ) {
+ defined ($_ = <$fh>) or last;
+ s/^\s+//;
+ push @line, split /\s+/;
+ }
+ my $r = { map {; $columns[ $col++ ] => $_ } @line };
+ $r->{remote} = $r->{tally} . $r->{host};
+ push @peers, $r;
}
else {
#TODO return error (but not needed anywhere now)
@@ -135,3 +144,5 @@ sub ntp_sntp_line {
close $fh or croak "running sntp failed: $! (exit status $?)";
return ($offset, $stratum);
}
+
+1;
diff --git a/scripts/ntp-wait/Makefile.in b/scripts/ntp-wait/Makefile.in
index bb2eae7..a18414d 100644
--- a/scripts/ntp-wait/Makefile.in
+++ b/scripts/ntp-wait/Makefile.in
@@ -41,8 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -53,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -70,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -140,6 +142,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -174,7 +177,9 @@ 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@
@@ -313,6 +318,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/ntp-wait/invoke-ntp-wait.texi b/scripts/ntp-wait/invoke-ntp-wait.texi
index f329985..9053e8a 100644
--- a/scripts/ntp-wait/invoke-ntp-wait.texi
+++ b/scripts/ntp-wait/invoke-ntp-wait.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-wait.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:18 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:17 AM by AutoGen 5.18.5pre4
# From the definitions ntp-wait-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -61,7 +61,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.7p482
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p2
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/scripts/ntp-wait/ntp-wait-opts b/scripts/ntp-wait/ntp-wait-opts
index 73be46b..ff99fe5 100644
--- a/scripts/ntp-wait/ntp-wait-opts
+++ b/scripts/ntp-wait/ntp-wait-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntp-wait-opts)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:12 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:11 AM by AutoGen 5.18.5pre4
# From the definitions ntp-wait-opts.def
# and the template file perlopt
@@ -40,7 +40,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.7p482
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p2
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/scripts/ntp-wait/ntp-wait.1ntp-waitman b/scripts/ntp-wait/ntp-wait.1ntp-waitman
index 1eef06c..65a97fd 100644
--- a/scripts/ntp-wait/ntp-wait.1ntp-waitman
+++ b/scripts/ntp-wait/ntp-wait.1ntp-waitman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait 1ntp-waitman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH ntp-wait 1ntp-waitman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-DfaOdD/ag-PfaWcD)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-CkaW1T/ag-Oka40T)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:14 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:13 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc b/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
index 911452c..1340e5a 100644
--- a/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
+++ b/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_WAIT 1ntp-waitmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:21 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:20 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntp-wait/ntp-wait.html b/scripts/ntp-wait/ntp-wait.html
index a0cc721..7cc8b99 100644
--- a/scripts/ntp-wait/ntp-wait.html
+++ b/scripts/ntp-wait/ntp-wait.html
@@ -39,7 +39,7 @@ until the system's time has stabilized and synchronized,
and only then start any applicaitons (like database servers) that require
accurate and stable time.
- <p>This document applies to version 4.2.7p482 of <code>ntp-wait</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp-wait</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -114,7 +114,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.7p482
+<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p2
USAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/scripts/ntp-wait/ntp-wait.man.in b/scripts/ntp-wait/ntp-wait.man.in
index 971e7f2..a4edec4 100644
--- a/scripts/ntp-wait/ntp-wait.man.in
+++ b/scripts/ntp-wait/ntp-wait.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait @NTP_WAIT_MS@ "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH ntp-wait @NTP_WAIT_MS@ "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-DfaOdD/ag-PfaWcD)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-CkaW1T/ag-Oka40T)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:14 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:13 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntp-wait/ntp-wait.mdoc.in b/scripts/ntp-wait/ntp-wait.mdoc.in
index 23afeb7..c61340d 100644
--- a/scripts/ntp-wait/ntp-wait.mdoc.in
+++ b/scripts/ntp-wait/ntp-wait.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_WAIT @NTP_WAIT_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:21 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:20 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntpsweep/Makefile.in b/scripts/ntpsweep/Makefile.in
index f264ada..38af36a 100644
--- a/scripts/ntpsweep/Makefile.in
+++ b/scripts/ntpsweep/Makefile.in
@@ -41,8 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -53,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -70,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -141,6 +143,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -175,7 +178,9 @@ 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@
@@ -314,6 +319,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/ntpsweep/invoke-ntpsweep.texi b/scripts/ntpsweep/invoke-ntpsweep.texi
index f5dbf32..207577a 100644
--- a/scripts/ntpsweep/invoke-ntpsweep.texi
+++ b/scripts/ntpsweep/invoke-ntpsweep.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:25 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:23 AM by AutoGen 5.18.5pre4
# From the definitions ntpsweep-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -45,7 +45,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.7p482
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p2
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/scripts/ntpsweep/ntpsweep-opts b/scripts/ntpsweep/ntpsweep-opts
index d29f194..b833b08 100644
--- a/scripts/ntpsweep/ntpsweep-opts
+++ b/scripts/ntpsweep/ntpsweep-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntpsweep-opts)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:23 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:21 AM by AutoGen 5.18.5pre4
# From the definitions ntpsweep-opts.def
# and the template file perlopt
@@ -43,7 +43,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.7p482
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p2
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/scripts/ntpsweep/ntpsweep.1ntpsweepman b/scripts/ntpsweep/ntpsweep.1ntpsweepman
index 5695469..9ba9683 100644
--- a/scripts/ntpsweep/ntpsweep.1ntpsweepman
+++ b/scripts/ntpsweep/ntpsweep.1ntpsweepman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH ntpsweep 1ntpsweepman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_ja4FE/ag-mkaaFE)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-pka4rV/ag-CkaarV)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:27 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:25 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc b/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
index a522052..d933c83 100644
--- a/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
+++ b/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:30 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:29 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntpsweep/ntpsweep.html b/scripts/ntpsweep/ntpsweep.html
index 291f434..1fc5f54 100644
--- a/scripts/ntpsweep/ntpsweep.html
+++ b/scripts/ntpsweep/ntpsweep.html
@@ -30,7 +30,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the use of the NTP Project's <code>ntpsweep</code> program.
- <p>This document applies to version 4.2.7p482 of <code>ntpsweep</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpsweep</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -90,7 +90,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.7p482
+<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p2
USAGE: ntpsweep [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/scripts/ntpsweep/ntpsweep.man.in b/scripts/ntpsweep/ntpsweep.man.in
index 5695469..9ba9683 100644
--- a/scripts/ntpsweep/ntpsweep.man.in
+++ b/scripts/ntpsweep/ntpsweep.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH ntpsweep 1ntpsweepman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_ja4FE/ag-mkaaFE)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-pka4rV/ag-CkaarV)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:27 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:25 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntpsweep/ntpsweep.mdoc.in b/scripts/ntpsweep/ntpsweep.mdoc.in
index a522052..d933c83 100644
--- a/scripts/ntpsweep/ntpsweep.mdoc.in
+++ b/scripts/ntpsweep/ntpsweep.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:30 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:29 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntptrace/Makefile.in b/scripts/ntptrace/Makefile.in
index 825a390..8d7db40 100644
--- a/scripts/ntptrace/Makefile.in
+++ b/scripts/ntptrace/Makefile.in
@@ -41,8 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -53,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -70,6 +70,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -140,6 +142,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -174,7 +177,9 @@ 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@
@@ -313,6 +318,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/scripts/ntptrace/invoke-ntptrace.texi b/scripts/ntptrace/invoke-ntptrace.texi
index 3f7a53b..58548c1 100644
--- a/scripts/ntptrace/invoke-ntptrace.texi
+++ b/scripts/ntptrace/invoke-ntptrace.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:37 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:36 AM by AutoGen 5.18.5pre4
# From the definitions ntptrace-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -62,7 +62,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntptrace - Trace peers of an NTP server - Ver. 4.2.7p482
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p2
USAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/scripts/ntptrace/ntptrace-opts b/scripts/ntptrace/ntptrace-opts
index 36c8e1e..3012392 100644
--- a/scripts/ntptrace/ntptrace-opts
+++ b/scripts/ntptrace/ntptrace-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntptrace-opts)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:32 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:31 AM by AutoGen 5.18.5pre4
# From the definitions ntptrace-opts.def
# and the template file perlopt
@@ -40,7 +40,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntptrace - Trace peers of an NTP server - Ver. 4.2.7p482
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p2
USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/scripts/ntptrace/ntptrace.1ntptraceman b/scripts/ntptrace/ntptrace.1ntptraceman
index c5fc935..ff02de0 100644
--- a/scripts/ntptrace/ntptrace.1ntptraceman
+++ b/scripts/ntptrace/ntptrace.1ntptraceman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace 1ntptraceman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH ntptrace 1ntptraceman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-S1aqYF/ag-51ayXF)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-j_aqKW/ag-w_ayJW)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:34 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:33 AM by AutoGen 5.18.5pre4
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntptrace/ntptrace.1ntptracemdoc b/scripts/ntptrace/ntptrace.1ntptracemdoc
index f67e471..352b659 100644
--- a/scripts/ntptrace/ntptrace.1ntptracemdoc
+++ b/scripts/ntptrace/ntptrace.1ntptracemdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPTRACE 1ntptracemdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:39 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:38 AM by AutoGen 5.18.5pre4
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/ntptrace/ntptrace.html b/scripts/ntptrace/ntptrace.html
index 8d45462..86e1a9b 100644
--- a/scripts/ntptrace/ntptrace.html
+++ b/scripts/ntptrace/ntptrace.html
@@ -31,7 +31,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
<p>This document describes the use of the NTP Project's <code>ntptrace</code> program.
-This document applies to version 4.2.7p482 of <code>ntptrace</code>.
+This document applies to version 4.2.8p2 of <code>ntptrace</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -107,7 +107,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.7p482
+<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p2
USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/scripts/ntptrace/ntptrace.man.in b/scripts/ntptrace/ntptrace.man.in
index b0f531f..f48a071 100644
--- a/scripts/ntptrace/ntptrace.man.in
+++ b/scripts/ntptrace/ntptrace.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace @NTPTRACE_MS@ "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH ntptrace @NTPTRACE_MS@ "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-S1aqYF/ag-51ayXF)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-j_aqKW/ag-w_ayJW)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:34 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:33 AM by AutoGen 5.18.5pre4
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/ntptrace/ntptrace.mdoc.in b/scripts/ntptrace/ntptrace.mdoc.in
index c952d6d..c06e718 100644
--- a/scripts/ntptrace/ntptrace.mdoc.in
+++ b/scripts/ntptrace/ntptrace.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPTRACE @NTPTRACE_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:39 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:38 AM by AutoGen 5.18.5pre4
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/plot_summary-opts b/scripts/plot_summary-opts
index f574baf..3f03890 100644
--- a/scripts/plot_summary-opts
+++ b/scripts/plot_summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (plot_summary-opts)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:41 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:47 AM by AutoGen 5.18.5pre4
# From the definitions plot_summary-opts.def
# and the template file perlopt
@@ -46,7 +46,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-plot_summary - plot statistics generated by summary script - Ver. 4.2.7p482
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p2
USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Where the summary files are
diff --git a/scripts/plot_summary.1plot_summaryman b/scripts/plot_summary.1plot_summaryman
index c2394fa..03dc6c5 100644
--- a/scripts/plot_summary.1plot_summaryman
+++ b/scripts/plot_summary.1plot_summaryman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH plot_summary 1plot_summaryman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-L.aO0H/ag-X.aWZH)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-48aGzZ/ag-f9aOyZ)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:47 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:53 AM by AutoGen 5.18.5pre4
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/plot_summary.1plot_summarymdoc b/scripts/plot_summary.1plot_summarymdoc
index 583994a..4d7f492 100644
--- a/scripts/plot_summary.1plot_summarymdoc
+++ b/scripts/plot_summary.1plot_summarymdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:48 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:55 AM by AutoGen 5.18.5pre4
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/plot_summary.html b/scripts/plot_summary.html
index 8de508b..b2fbc66 100644
--- a/scripts/plot_summary.html
+++ b/scripts/plot_summary.html
@@ -31,7 +31,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<h2 class="unnumbered">Plot_summary User Manual</h2>
<p>This document describes the use of the NTP Project's <code>plot_summary</code> program.
-This document applies to version 4.2.7p482 of <code>plot_summary</code>.
+This document applies to version 4.2.8p2 of <code>plot_summary</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -89,7 +89,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.7p482
+<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p2
USAGE: plot_summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
--directory=str Where the summary files are
diff --git a/scripts/plot_summary.man.in b/scripts/plot_summary.man.in
index c2394fa..03dc6c5 100644
--- a/scripts/plot_summary.man.in
+++ b/scripts/plot_summary.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH plot_summary 1plot_summaryman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-L.aO0H/ag-X.aWZH)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-48aGzZ/ag-f9aOyZ)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:47 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:53 AM by AutoGen 5.18.5pre4
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/plot_summary.mdoc.in b/scripts/plot_summary.mdoc.in
index 583994a..4d7f492 100644
--- a/scripts/plot_summary.mdoc.in
+++ b/scripts/plot_summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:48 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:55 AM by AutoGen 5.18.5pre4
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/summary-opts b/scripts/summary-opts
index b8b5399..adb228d 100644
--- a/scripts/summary-opts
+++ b/scripts/summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (summary-opts)
#
-# It has been AutoGen-ed December 2, 2014 at 08:52:43 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:21:49 AM by AutoGen 5.18.5pre4
# From the definitions summary-opts.def
# and the template file perlopt
@@ -44,7 +44,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-summary - compute various stastics from NTP stat files - Ver. 4.2.7p482
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p2
USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Directory containing stat files
diff --git a/scripts/summary.1summaryman b/scripts/summary.1summaryman
index 2b10936..d1eeb48 100644
--- a/scripts/summary.1summaryman
+++ b/scripts/summary.1summaryman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH summary 1summaryman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-hqaqcI/ag-uqaybI)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-jpaiNZ/ag-wpaqMZ)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:52 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:58 AM by AutoGen 5.18.5pre4
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/summary.1summarymdoc b/scripts/summary.1summarymdoc
index 6ec7cc2..3c77a8c 100644
--- a/scripts/summary.1summarymdoc
+++ b/scripts/summary.1summarymdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:54 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:22:00 AM by AutoGen 5.18.5pre4
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/summary.html b/scripts/summary.html
index 31cc825..5326c6a 100644
--- a/scripts/summary.html
+++ b/scripts/summary.html
@@ -31,7 +31,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<h2 class="unnumbered">Summary User Manual</h2>
<p>This document describes the use of the NTP Project's <code>summary</code> program.
-This document applies to version 4.2.7p482 of <code>summary</code>.
+This document applies to version 4.2.8p2 of <code>summary</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -88,7 +88,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.7p482
+<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p2
USAGE: summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
--directory=str Directory containing stat files
diff --git a/scripts/summary.man.in b/scripts/summary.man.in
index 2b10936..d1eeb48 100644
--- a/scripts/summary.man.in
+++ b/scripts/summary.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH summary 1summaryman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-hqaqcI/ag-uqaybI)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-jpaiNZ/ag-wpaqMZ)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:52 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:58 AM by AutoGen 5.18.5pre4
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/scripts/summary.mdoc.in b/scripts/summary.mdoc.in
index 6ec7cc2..3c77a8c 100644
--- a/scripts/summary.mdoc.in
+++ b/scripts/summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:52:54 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:22:00 AM by AutoGen 5.18.5pre4
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/scripts/update-leap/Makefile.am b/scripts/update-leap/Makefile.am
new file mode 100644
index 0000000..1638102
--- /dev/null
+++ b/scripts/update-leap/Makefile.am
@@ -0,0 +1,97 @@
+NULL=
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS= $(UPDATE_LEAP_DB)
+sbin_SCRIPTS= $(UPDATE_LEAP_DS)
+libexec_SCRIPTS= $(UPDATE_LEAP_DL)
+noinst_SCRIPTS= $(UPDATE_LEAP_NI)
+EXTRA_SCRIPTS= update-leap
+
+man1_MANS=
+man8_MANS=
+if INSTALL_UPDATE_LEAP
+man_MANS= update-leap.$(UPDATE_LEAP_MS)
+else
+noinst_MANS= update-leap.$(UPDATE_LEAP_MS)
+endif
+
+EXTRA_DIST = \
+ invoke-update-leap.menu \
+ invoke-update-leap.texi \
+ update-leap \
+ update-leap-opts.def \
+ update-leap-opts \
+ update-leap.1update-leapman \
+ update-leap.1update-leapmdoc \
+ update-leap.man.in \
+ update-leap.mdoc.in \
+ update-leap.texi \
+ update-leap.html \
+ $(NULL)
+
+html_DATA = update-leap.html
+
+#CLEANFILES = update-leap.1
+DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS)
+
+noinst_DATA = \
+ invoke-update-leap.menu \
+ invoke-update-leap.texi \
+ update-leap.man.in \
+ update-leap.mdoc.in \
+ update-leap-opts \
+ $(NULL)
+
+$(srcdir)/update-leap: $(srcdir)/update-leap-opts
+ @: do-nothing action to avoid default SCCS get
+
+$(srcdir)/update-leap-opts: update-leap-opts.def $(std_def_list)
+ $(run_ag) update-leap-opts.def
+
+### Man
+
+$(srcdir)/update-leap.1update-leapman: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
+
+$(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapman > $(srcdir)/update-leap.man.in+
+ mv $(srcdir)/update-leap.man.in+ $(srcdir)/update-leap.man.in
+
+### Mdoc
+
+$(srcdir)/update-leap.1update-leapmdoc: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
+
+$(srcdir)/update-leap.mdoc.in: $(srcdir)/update-leap.1update-leapmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapmdoc > $(srcdir)/update-leap.mdoc.in+
+ mv $(srcdir)/update-leap.mdoc.in+ $(srcdir)/update-leap.mdoc.in
+
+### Manpage
+
+update-leap.$(UPDATE_LEAP_MS): $(srcdir)/update-leap.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=update-leap.$(UPDATE_LEAP_MS)+:$(srcdir)/update-leap.$(MANTAGFMT).in
+ mv update-leap.$(UPDATE_LEAP_MS)+ update-leap.$(UPDATE_LEAP_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-update-leap.menu: $(srcdir)/invoke-update-leap.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-update-leap.texi: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/update-leap.html: $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o update-leap.html update-leap.texi || true )
diff --git a/scripts/update-leap/Makefile.in b/scripts/update-leap/Makefile.in
new file mode 100644
index 0000000..3ac6ac6
--- /dev/null
+++ b/scripts/update-leap/Makefile.in
@@ -0,0 +1,887 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scripts/update-leap
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(noinst_SCRIPTS) \
+ $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBEVENT = @LDADD_LIBEVENT@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_LIBUTIL = @LDADD_LIBUTIL@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_NTPDSIM = @MAKE_NTPDSIM@
+MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS = $(UPDATE_LEAP_DB)
+sbin_SCRIPTS = $(UPDATE_LEAP_DS)
+libexec_SCRIPTS = $(UPDATE_LEAP_DL)
+noinst_SCRIPTS = $(UPDATE_LEAP_NI)
+EXTRA_SCRIPTS = update-leap
+man1_MANS =
+man8_MANS =
+@INSTALL_UPDATE_LEAP_TRUE@man_MANS = update-leap.$(UPDATE_LEAP_MS)
+@INSTALL_UPDATE_LEAP_FALSE@noinst_MANS = update-leap.$(UPDATE_LEAP_MS)
+EXTRA_DIST = \
+ invoke-update-leap.menu \
+ invoke-update-leap.texi \
+ update-leap \
+ update-leap-opts.def \
+ update-leap-opts \
+ update-leap.1update-leapman \
+ update-leap.1update-leapmdoc \
+ update-leap.man.in \
+ update-leap.mdoc.in \
+ update-leap.texi \
+ update-leap.html \
+ $(NULL)
+
+html_DATA = update-leap.html
+
+#CLEANFILES = update-leap.1
+DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS)
+noinst_DATA = \
+ invoke-update-leap.menu \
+ invoke-update-leap.texi \
+ update-leap.man.in \
+ update-leap.mdoc.in \
+ update-leap-opts \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/update-leap/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/update-leap/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-htmlDATA \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-htmlDATA uninstall-libexecSCRIPTS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinSCRIPTS
+
+
+$(srcdir)/update-leap: $(srcdir)/update-leap-opts
+ @: do-nothing action to avoid default SCCS get
+
+$(srcdir)/update-leap-opts: update-leap-opts.def $(std_def_list)
+ $(run_ag) update-leap-opts.def
+
+### Man
+
+$(srcdir)/update-leap.1update-leapman: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
+
+$(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapman > $(srcdir)/update-leap.man.in+
+ mv $(srcdir)/update-leap.man.in+ $(srcdir)/update-leap.man.in
+
+### Mdoc
+
+$(srcdir)/update-leap.1update-leapmdoc: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
+
+$(srcdir)/update-leap.mdoc.in: $(srcdir)/update-leap.1update-leapmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapmdoc > $(srcdir)/update-leap.mdoc.in+
+ mv $(srcdir)/update-leap.mdoc.in+ $(srcdir)/update-leap.mdoc.in
+
+### Manpage
+
+update-leap.$(UPDATE_LEAP_MS): $(srcdir)/update-leap.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=update-leap.$(UPDATE_LEAP_MS)+:$(srcdir)/update-leap.$(MANTAGFMT).in
+ mv update-leap.$(UPDATE_LEAP_MS)+ update-leap.$(UPDATE_LEAP_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-update-leap.menu: $(srcdir)/invoke-update-leap.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-update-leap.texi: $(srcdir)/update-leap-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/update-leap.html: $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o update-leap.html update-leap.texi || true )
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/scripts/update-leap/invoke-update-leap.menu b/scripts/update-leap/invoke-update-leap.menu
new file mode 100644
index 0000000..e27e349
--- /dev/null
+++ b/scripts/update-leap/invoke-update-leap.menu
@@ -0,0 +1 @@
+* update-leap Invocation:: Invoking update-leap
diff --git a/scripts/update-leap/invoke-update-leap.texi b/scripts/update-leap/invoke-update-leap.texi
new file mode 100644
index 0000000..8fc25db
--- /dev/null
+++ b/scripts/update-leap/invoke-update-leap.texi
@@ -0,0 +1,170 @@
+@node update-leap Invocation
+@section Invoking update-leap
+@pindex update-leap
+@cindex leap-seconds file manager/updater
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-update-leap.texi)
+#
+# It has been AutoGen-ed April 7, 2015 at 04:21:44 AM by AutoGen 5.18.5pre4
+# From the definitions update-leap-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+@code{update-leap}
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+
+Ordinarily, the file is found using the "leapfile" directive in
+@code{ntp.conf(5)}.
+However, an alternate location can be specified on the command line.
+
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+
+If the current file is acceptable, no download or restart occurs.
+
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{update-leap} program.
+
+@menu
+* update-leap usage:: update-leap help/usage (@option{--help})
+* update-leap source-url:: source-url option (-s)
+* update-leap ipv4:: ipv4 option (-4)
+* update-leap destination:: destination option (-d)
+* update-leap expiration:: expiration option (-e)
+* update-leap ntp-conf-file:: ntp-conf-file option (-f)
+* update-leap force-update:: force-update option (-F)
+* update-leap exit status:: exit status
+* update-leap Usage:: Usage
+* update-leap Authors:: Authors
+@end menu
+
+@node update-leap usage
+@subsection update-leap help/usage (@option{--help})
+@cindex update-leap help
+
+This is the automatically generated usage text for update-leap.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+/bin/bash: line 136: ./update-leap: Permission denied
+@end example
+@exampleindent 4
+
+@node update-leap source-url
+@subsection source-url option (-s)
+@cindex update-leap-source-url
+
+This is the ``the url of the master copy of the leapseconds file'' option.
+This option takes a string argument.
+Specify the URL of the master copy to download
+$LEAPSRC
+@node update-leap ipv4
+@subsection ipv4 option (-4)
+@cindex update-leap-ipv4
+
+This is the ``use only ipv4 addresses for dns name resolution'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+ipv6.
+@end itemize
+
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+@node update-leap destination
+@subsection destination option (-d)
+@cindex update-leap-destination
+
+This is the ``filename on the local system'' option.
+This option takes a string argument @file{float}.
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+@node update-leap expiration
+@subsection expiration option (-e)
+@cindex update-leap-expiration
+
+This is the ``refresh the leapfile this long before it expires'' option.
+This option takes a string argument.
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+@node update-leap ntp-conf-file
+@subsection ntp-conf-file option (-f)
+@cindex update-leap-ntp-conf-file
+
+This is the ``location of the ntp.conf file'' option.
+This option takes a string argument.
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+@node update-leap force-update
+@subsection force-update option (-F)
+@cindex update-leap-force-update
+
+This is the ``force update of the leapfile'' option.
+Force update even if current file is OK and not close to expiring.
+@node update-leap exit status
+@subsection update-leap exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
+@node update-leap Usage
+@subsection update-leap Usage
+@node update-leap Authors
+@subsection update-leap Authors
diff --git a/scripts/update-leap/update-leap b/scripts/update-leap/update-leap
new file mode 100644
index 0000000..2dab4ec
--- /dev/null
+++ b/scripts/update-leap/update-leap
@@ -0,0 +1,434 @@
+#!/bin/bash
+
+# Copyright (C) 2014 Timothe Litt litt at acm dot org
+
+# This script may be freely copied, used and modified providing that
+# this notice and the copyright statement are included in all copies
+# and derivative works. No warranty is offered, and use is entirely at
+# your own risk. Bugfixes and improvements would be appreciated by the
+# author.
+
+VERSION="1.003"
+
+# leap-seconds file manager/updater
+
+# Depends on:
+# wget sed, tr, shasum, logger
+
+# ########## Default configuration ##########
+#
+# Where to get the file
+LEAPSRC="ftp://time.nist.gov/pub/leap-seconds.list"
+
+# How many times to try to download new file
+MAXTRIES=6
+INTERVAL=10
+
+# Where to find ntp config file
+NTPCONF=/etc/ntp.conf
+
+# How long before expiration to get updated file
+PREFETCH="60 days"
+
+# How to restart NTP - older NTP: service ntpd? try-restart | condrestart
+# Recent NTP checks for new file daily, so there's nothing to do
+RESTART=
+
+# Where to put temporary copy before it's validated
+TMPFILE="/tmp/leap-seconds.$$.tmp"
+
+# Syslog facility
+LOGFAC=daemon
+# ###########################################
+
+# Places to look for commands. Allows for CRON having path to
+# old utilities on embedded systems
+
+PATHLIST="/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:"
+
+REQUIREDCMDS=" wget logger tr sed shasum"
+
+SELF="`basename $0`"
+
+function displayHelp {
+ cat <<EOF
+Usage: $SELF [options] [leapfile]
+
+Verifies and if necessary, updates leap-second definition file
+
+All arguments are optional: Default (or current value) shown:
+ -s Specify the URL of the master copy to download
+ $LEAPSRC
+ -4 Use only IPv4
+ -6 Use only IPv6
+ -p 4|6
+ Prefer IPv4 or IPv6 (as specified) addresses, but use either
+ -d Specify the filename on the local system
+ $LEAPFILE
+ -e Specify how long before expiration the file is to be refreshed
+ Units are required, e.g. "-e 60 days" Note that larger values
+ imply more frequent refreshes.
+ "$PREFETCH"
+ -f Specify location of ntp.conf (used to make sure leapfile directive is
+ present and to default leapfile)
+ $NTPCONF
+ -F Force update even if current file is OK and not close to expiring.
+ -c Command to restart NTP after installing a new file
+ <none> - ntpd checks file daily
+ -r Specify number of times to retry on get failure
+ $MAXTRIES
+ -i Specify number of minutes between retries
+ $INTERVAL
+ -l Use syslog for output (Implied if CRONJOB is set)
+ -L Don't use syslog for output
+ -P Specify the syslog facility for logging
+ $LOGFAC
+ -t Name of temporary file used in validation
+ $TMPFILE
+ -q Only report errors to stdout
+ -v Verbose output
+ -z Specify path for utilities
+ $PATHLIST
+ -Z Only use system path
+
+$SELF will validate the file currently on the local system
+
+Ordinarily, the file is found using the "leapfile" directive in $NTPCONF.
+However, an alternate location can be specified on the command line.
+
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+
+If the current file is acceptable, no download or restart occurs.
+
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+
+This script depends on$REQUIREDCMDS
+
+Version $VERSION
+EOF
+ return 0
+}
+
+# Default: Use syslog for logging if running under cron
+
+SYSLOG="$CRONJOB"
+
+if [ "$1" = "--help" ]; then
+ displayHelp
+ exit 0
+fi
+
+# Parse options
+
+while getopts 46p:P:s:e:f:Fc:r:i:lLt:hqvz:Z opt; do
+ case $opt in
+ 4)
+ PROTO="-4"
+ ;;
+ 6)
+ PROTO="-6"
+ ;;
+ p)
+ if [ "$OPTARG" = '4' -o "$OPTARG" = '6' ]; then
+ PREFER="--prefer-family=IPv$OPTARG"
+ else
+ echo "Invalid -p $OPTARG" >&2
+ exit 1;
+ fi
+ ;;
+ P)
+ LOGFAC="$OPTARG"
+ ;;
+ s)
+ LEAPSRC="$OPTARG"
+ ;;
+ e)
+ PREFETCH="$OPTARG"
+ ;;
+ f)
+ NTPCONF="$OPTARG"
+ ;;
+ F)
+ FORCE="Y"
+ ;;
+ c)
+ RESTART="$OPTARG"
+ ;;
+ r)
+ MAXTRIES="$OPTARG"
+ ;;
+ i)
+ INTERVAL="$OPTARG"
+ ;;
+ t)
+ TMPFILE="$OPTARG"
+ ;;
+ l)
+ SYSLOG="y"
+ ;;
+ L)
+ SYSLOG=
+ ;;
+ h)
+ displayHelp
+ exit 0
+ ;;
+ q)
+ QUIET="Y"
+ ;;
+ v)
+ VERBOSE="Y"
+ ;;
+ z)
+ PATHLIST="$OPTARG:"
+ ;;
+ Z)
+ PATHLIST=
+ ;;
+ *)
+ echo "$SELF -h for usage" >&2
+ exit 1
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
+export PATH="$PATHLIST$PATH"
+
+# Add to path to deal with embedded systems
+#
+for P in $REQUIREDCMDS ; do
+ if >/dev/null 2>&1 which "$P" ; then
+ continue
+ fi
+ [ "$P" = "logger" ] && continue
+ echo "FATAL: missing $P command, please install"
+ exit 1
+done
+
+# Handle logging
+
+if ! LOGGER="`2>/dev/null which logger`" ; then
+ LOGGER=
+fi
+
+function log {
+ # "priority" "message"
+ #
+ # Stdout unless syslog specified or logger isn't available
+ #
+ if [ -z "$SYSLOG" -o -z "$LOGGER" ]; then
+ if [ -n "$QUIET" -a \( "$1" = "info" -o "$1" = "notice" -o "$1" = "debug" \) ]; then
+ return 0
+ fi
+ echo "`echo \"$1\" | tr a-z A-Z`: $2"
+ return 0
+ fi
+
+ # Also log to stdout if cron job && notice or higher
+ local S
+ if [ -n "$CRONJOB" -a \( "$1" != "info" \) -a \( "$1" != "debug" \) ] || [ -n "$VERBOSE" ]; then
+ S="-s"
+ fi
+ $LOGGER $S -t "$SELF[$$]" -p "$LOGFAC.$1" "$2"
+}
+
+# Verify interval
+INTERVAL=$(( $INTERVAL *1 ))
+
+# Validate a leap-seconds file checksum
+#
+# File format: (full description in files)
+# # marks comments, except:
+# #$ number : the NTP date of the last update
+# #@ number : the NTP date that the file expires
+# Date (seconds since 1900) leaps : leaps is the # of seconds to add for times >= Date
+# Date lines have comments.
+# #h hex hex hex hex hex is the SHA-1 checksum of the data & dates, excluding whitespace w/o leading zeroes
+
+function verifySHA {
+
+ if [ ! -f "$1" ]; then
+ return 1
+ fi
+
+ # Remove comments, except those that are markers for last update, expires and hash
+
+ local RAW="`sed $1 -e'/^\\([0-9]\\|#[\$@h]\)/!d' -e'/^#[\$@h]/!s/#.*\$//g'`"
+
+ # Extract just the data, removing all whitespace
+
+ local DATA="`echo \"$RAW\" | sed -e'/^#h/d' -e's/^#[\$@]//g' | tr -d '[:space:]'`"
+
+ # Compute the SHA hash of the data, removing the marker and filename
+ # Computed in binary mode, which shouldn't matter since whitespace has been removed
+ # shasum comes in several flavors; a portable one is available in Perl (with Digest::SHA)
+
+ local DSHA="`echo -n \"$DATA\" | shasum | sed -e's/[? *].*$//'`"
+
+ # Extract the file's hash. Restore any leading zeroes in hash segments.
+
+ # The sed [] includes a tab (\t) and space; #h is followed by a tab and space
+ local FSHA="`echo \"$RAW\" | sed -e'/^#h/!d' -e's/^#h//' -e's/[ ] */ 0x/g'`"
+ FSHA=`printf '%08x%08x%08x%08x%08x' $FSHA`
+
+ if [ -n "$FSHA" -a \( "$FSHA" = "$DSHA" \) ]; then
+ if [ -n "$2" ]; then
+ log "info" "Checksum of $1 validated"
+ fi
+ else
+ log "error" "Checksum of $1 is invalid:"
+ [ -z "$FSHA" ] && FSHA="(no checksum record found in file)"
+ log "error" "EXPECTED: $FSHA"
+ log "error" "COMPUTED: $DSHA"
+ return 1
+ fi
+
+ # Check the expiration date, converting NTP epoch to Unix epoch used by date
+
+ EXPIRES="`echo \"$RAW\" | sed -e'/^#@/!d' -e's/^#@//' | tr -d '[:space:]'`"
+ EXPIRES="$(($EXPIRES - 2208988800 ))"
+
+ if [ $EXPIRES -lt `date -u +%s` ]; then
+ log "notice" "File expired on `date -u -d \"Jan 1, 1970 00:00:00 +0000 + $EXPIRES seconds\"`"
+ return 2
+ fi
+
+}
+
+# Verify ntp.conf
+
+if ! [ -f "$NTPCONF" ]; then
+ log "critical" "Missing ntp configuration $NTPCONF"
+ exit 1
+fi
+
+# Parse ntp.conf for leapfile directive
+
+LEAPFILE="`sed $NTPCONF -e'/^ *leapfile *.*$/!d' -e's/^ *leapfile *//'`"
+if [ -z "$LEAPFILE" ]; then
+ log "error" "$NTPCONF does not specify a leapfile"
+fi
+
+# Allow placing the file someplace else - testing
+
+if [ -n "$1" ]; then
+ if [ "$1" != "$LEAPFILE" ]; then
+ log "notice" "Requested install to $1, but $NTPCONF specifies $LEAPFILE"
+ fi
+ LEAPFILE="$1"
+fi
+
+# Verify the current file
+# If it is missing, doesn't validate or expired
+# Or is expiring soon
+# Download a new one
+
+if [ -n "$FORCE" ] || ! verifySHA $LEAPFILE "$VERBOSE" || [ $EXPIRES -lt `date -d "NOW + $PREFETCH" +%s` ] ; then
+ TRY=0
+ while true; do
+ TRY=$(( $TRY + 1 ))
+ if [ -n "$VERBOSE" ]; then
+ log "info" "Attempting download from $LEAPSRC, try $TRY.."
+ fi
+ if wget $PROTO $PREFER -o ${TMPFILE}.log $LEAPSRC -O $TMPFILE ; then
+ log "info" "Download of $LEAPSRC succeeded"
+ if [ -n "$VERBOSE" ]; then
+ cat ${TMPFILE}.log
+ fi
+
+ if ! verifySHA $TMPFILE "$VERBOSE" ; then
+ # There is no point in retrying, as the file on the server is almost
+ # certainly corrupt.
+
+ log "warning" "Downloaded file $TMPFILE rejected -- saved for diagnosis"
+ cat ${TMPFILE}.log
+ rm -f ${TMPFILE}.log
+ exit 1
+ fi
+ rm -f ${TMPFILE}.log
+
+ # Set correct permissions on temporary file
+
+ REFFILE="$LEAPFILE"
+ if [ ! -f $LEAPFILE ]; then
+ log "notice" "$LEAPFILE was missing, creating new copy - check permissions"
+ touch $LEAPFILE
+ # Can't copy permissions from old file, copy from NTPCONF instead
+ REFFILE="$NTPCONF"
+ fi
+ chmod --reference $REFFILE $TMPFILE
+ chown --reference $REFFILE $TMPFILE
+ ( which selinuxenabled && selinuxenabled && which chcon ) >/dev/null 2>&1
+ if [ $? == 0 ] ; then
+ chcon --reference $REFFILE $TMPFILE
+ fi
+
+ # Replace current file with validated new one
+
+ if mv -f $TMPFILE $LEAPFILE ; then
+ log "notice" "Installed new $LEAPFILE from $LEAPSRC"
+ else
+ log "error" "Install $TMPFILE => $LEAPFILE failed -- saved for diagnosis"
+ exit 1
+ fi
+
+ # Restart NTP (or whatever else is specified)
+
+ if [ -n "$RESTART" ]; then
+ if [ -n "$VERBOSE" ]; then
+ log "info" "Attempting restart action: $RESTART"
+ fi
+ R="$( 2>&1 $RESTART )"
+ if [ $? -eq 0 ]; then
+ log "notice" "Restart action succeeded"
+ if [ -n "$VERBOSE" -a -n "$R" ]; then
+ log "info" "$R"
+ fi
+ else
+ log "error" "Restart action failed"
+ if [ -n "$R" ]; then
+ log "error" "$R"
+ fi
+ exit 2
+ fi
+ fi
+ exit 0
+ fi
+
+ # Failed to download. See about trying again
+
+ rm -f $TMPFILE
+ if [ $TRY -ge $MAXTRIES ]; then
+ break;
+ fi
+ if [ -n "$VERBOSE" ]; then
+ cat ${TMPFILE}.log
+ log "info" "Waiting $INTERVAL minutes before retrying..."
+ fi
+ sleep $(( $INTERVAL * 60))
+ done
+
+ # Failed and out of retries
+
+ log "warning" "Download from $LEAPSRC failed after $TRY attempts"
+ if [ -f ${TMPFILE}.log ]; then
+ cat ${TMPFILE}.log
+ rm -f ${TMPFILE}.log $TMPFILE
+ fi
+ exit 1
+fi
+log "info" "Not time to replace $LEAPFILE"
+
+exit 0
+
+# EOF \ No newline at end of file
diff --git a/scripts/update-leap/update-leap-opts b/scripts/update-leap/update-leap-opts
new file mode 100644
index 0000000..69dba65
--- /dev/null
+++ b/scripts/update-leap/update-leap-opts
@@ -0,0 +1,72 @@
+# EDIT THIS FILE WITH CAUTION (update-leap-opts)
+#
+# It has been AutoGen-ed April 7, 2015 at 04:21:40 AM by AutoGen 5.18.5pre4
+# From the definitions update-leap-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'source-url' => '',
+ 'ipv4' => '',
+ 'destination' => '',
+ 'expiration' => '',
+ 'ntp-conf-file' => '',
+ 'force-update' => '',
+ 'dont-wait' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'source-url|s=s', 'ipv4|4', 'destination|d=f',
+ 'expiration|e=s', 'ntp-conf-file|f=s', 'force-update|F',
+ 'dont-wait',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+update-leap - leap-seconds file manager/updater - Ver. 4.2.8p2
+USAGE: update-leap [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ -s, --source-url=str The URL of the master copy of the leapseconds file
+ -4, --ipv4 Use only IPv4 addresses for DNS name resolution
+ -d, --destination=float Filename on the local system
+ -e, --expiration=str Refresh the leapfile this long before it expires
+ -f, --ntp-conf-file=str Location of the ntp.conf file
+ -F, --force-update Force update of the leapfile
+ --dont-wait Don't wait for keystroke between plots
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/update-leap/update-leap-opts.def b/scripts/update-leap/update-leap-opts.def
new file mode 100644
index 0000000..9e73916
--- /dev/null
+++ b/scripts/update-leap/update-leap-opts.def
@@ -0,0 +1,163 @@
+/* -*- Mode: Text -*- */
+autogen definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = 'update-leap';
+prog-title = 'leap-seconds file manager/updater';
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = source-url;
+ value = s;
+ arg-type = string;
+ descrip = 'The URL of the master copy of the leapseconds file';
+ doc = <<- _EndOfDoc_
+ Specify the URL of the master copy to download
+ $LEAPSRC
+ _EndOfDoc_;
+};
+flag = {
+ name = ipv4;
+ flags-cant = ipv6;
+ value = 4;
+ descrip = "Use only IPv4 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<- _EndOfDoc_
+ Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = destination;
+ value = d;
+ arg-type = string;
+ arg-name = float;
+ descrip = 'Filename on the local system';
+ doc = <<- _EndOfDoc_
+ The name to use to store the leapfile on the local system.
+ $LEAPFILE
+ _EndOfDoc_;
+};
+
+flag = {
+ name = expiration;
+ value = e;
+ arg-type = string;
+ descrip = 'Refresh the leapfile this long before it expires';
+ doc = <<- _EndOfDoc_
+ Specify how long before expiration the file is to be refreshed
+ Units are required, e.g. "-e 60 days" Note that larger values
+ imply more frequent refreshes.
+ "$PREFETCH"
+ _EndOfDoc_;
+};
+
+flag = {
+ name = ntp-conf-file;
+ value = f;
+ arg-type = string;
+ descrip = 'Location of the ntp.conf file';
+ doc = <<- _EndOfDoc_
+ Specify location of ntp.conf (used to make sure leapfile directive is
+ present and to default leapfile)
+ /etc/ntp.conf
+ _EndOfDoc_;
+};
+
+flag = {
+ name = force-update;
+ value = F;
+ descrip = 'Force update of the leapfile';
+ doc = <<- _EndOfDoc_
+ Force update even if current file is OK and not close to expiring.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = dont-wait;
+ descrip = "Don't wait for keystroke between plots";
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
+
+/* explain: Additional information whenever the usage routine is invoked */
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+.Nm
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+.Pp
+Ordinarily, the file is found using the "leapfile" directive in
+.Xr ntp.conf 5 .
+However, an alternate location can be specified on the command line.
+.Pp
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.Pp
+If the current file is acceptable, no download or restart occurs.
+.Pp
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+ _END_PROG_MDOC_DESCRIP;
+};
+
+
+doc-section = {
+ ds-type = 'USAGE';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_USAGE
+
+Usage stuff
+
+ _END_MDOC_USAGE;
+};
+
+doc-section = {
+ ds-type = 'AUTHORS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_AUTHORS
+.An "Timothe Litt"
+ _END_MDOC_AUTHORS;
+};
diff --git a/scripts/update-leap/update-leap.1update-leapman b/scripts/update-leap/update-leap.1update-leapman
new file mode 100644
index 0000000..a164347
--- /dev/null
+++ b/scripts/update-leap/update-leap.1update-leapman
@@ -0,0 +1,169 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH update-leap 1update-leapman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E0ayAX/ag-R0aGzX)
+.\"
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:40 AM by AutoGen 5.18.5pre4
+.\" From the definitions update-leap-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]update-leap\fP
+\- leap-seconds file manager/updater
+.SH SYNOPSIS
+\f\*[B-Font]update-leap\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]update-leap\fP
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+.sp \n(Ppu
+.ne 2
+
+Ordinarily, the file is found using the "leapfile" directive in
+\fCntp.conf\fR(5)\f[].
+However, an alternate location can be specified on the command line.
+.sp \n(Ppu
+.ne 2
+
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.sp \n(Ppu
+.ne 2
+
+If the current file is acceptable, no download or restart occurs.
+.sp \n(Ppu
+.ne 2
+
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-source\-url\f[]=\f\*[I-Font]string\f[]
+The URL of the master copy of the leapseconds file.
+.sp
+Specify the URL of the master copy to download
+$LEAPSRC
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Use only IPv4 addresses for DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+.TP
+.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]float\f[], \f\*[B-Font]\-\-destination\f[]=\f\*[I-Font]float\f[]
+Filename on the local system.
+.sp
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+.TP
+.NOP \f\*[B-Font]\-e\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-expiration\f[]=\f\*[I-Font]string\f[]
+Refresh the leapfile this long before it expires.
+.sp
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+.TP
+.NOP \f\*[B-Font]\-f\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-ntp\-conf\-file\f[]=\f\*[I-Font]string\f[]
+Location of the ntp.conf file.
+.sp
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+.TP
+.NOP \f\*[B-Font]\-F\f[], \f\*[B-Font]\-\-force\-update\f[]
+Force update of the leapfile.
+.sp
+Force update even if current file is OK and not close to expiring.
+.TP
+.NOP \f\*[B-Font]\-\-dont\-wait\f[]
+Don't wait for keystroke between plots.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH USAGE
+Usage stuff
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Timothe Litt"
+.br
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBupdate-leap\fP
+option definitions.
diff --git a/scripts/update-leap/update-leap.1update-leapmdoc b/scripts/update-leap/update-leap.1update-leapmdoc
new file mode 100644
index 0000000..9fb3a12
--- /dev/null
+++ b/scripts/update-leap/update-leap.1update-leapmdoc
@@ -0,0 +1,134 @@
+.Dd April 7 2015
+.Dt UPDATE_LEAP 1update-leapmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:46 AM by AutoGen 5.18.5pre4
+.\" From the definitions update-leap-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm update-leap
+.Nd leap-seconds file manager/updater
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+will validate the file currently on the local system
+and if necessary, updates leap\-second definition file.
+.Pp
+Ordinarily, the file is found using the "leapfile" directive in
+.Xr ntp.conf 5 .
+However, an alternate location can be specified on the command line.
+.Pp
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.Pp
+If the current file is acceptable, no download or restart occurs.
+.Pp
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron\-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl s Ar string , Fl \-source\-url Ns = Ns Ar string
+The URL of the master copy of the leapseconds file.
+.sp
+Specify the URL of the master copy to download
+$LEAPSRC
+.It Fl 4 , Fl \-ipv4
+Use only IPv4 addresses for DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = ipv6;
+ flags\-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<\- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = prefer;
+ flags\-cant = ipv4, ipv6;
+ value = p;
+ arg\-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<\- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+.It Fl d Ar float , Fl \-destination Ns = Ns Ar float
+Filename on the local system.
+.sp
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+.It Fl e Ar string , Fl \-expiration Ns = Ns Ar string
+Refresh the leapfile this long before it expires.
+.sp
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "\-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+.It Fl f Ar string , Fl \-ntp\-conf\-file Ns = Ns Ar string
+Location of the ntp.conf file.
+.sp
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+.It Fl F , Fl \-force\-update
+Force update of the leapfile.
+.sp
+Force update even if current file is OK and not close to expiring.
+.It Fl \-dont\-wait
+Don't wait for keystroke between plots.
+.sp
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh USAGE
+Usage stuff
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Timothe Litt"
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBupdate\-leap\fP
+option definitions.
diff --git a/scripts/update-leap/update-leap.html b/scripts/update-leap/update-leap.html
new file mode 100644
index 0000000..3a731ac
--- /dev/null
+++ b/scripts/update-leap/update-leap.html
@@ -0,0 +1,274 @@
+<html lang="en">
+<head>
+<title>update-leap User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="update-leap User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">update-leap User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-Description">update-leap Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+ <p>This document describes the use of the NTP Project's <code>update-leap</code> program.
+
+ <p>This document applies to version 4.2.8p2 of <code>update-leap</code>.
+
+<div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#update_002dleap-Description">update-leap Description</a>: Description
+<li><a accesskey="2" href="#update_002dleap-Invocation">update-leap Invocation</a>: Invoking update-leap
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="update_002dleap-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">0.1 Invoking update-leap</h3>
+
+<p><a name="index-update_002dleap-1"></a><a name="index-leap_002dseconds-file-manager_002fupdater-2"></a>
+
+ <p><code>update-leap</code>
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+
+ <p>Ordinarily, the file is found using the "leapfile" directive in
+<code>ntp.conf(5)</code>.
+However, an alternate location can be specified on the command line.
+
+ <p>If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+
+ <p>If the current file is acceptable, no download or restart occurs.
+
+ <p>-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>update-leap</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#update_002dleap-usage">update-leap usage</a>: update-leap help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#update_002dleap-source_002durl">update-leap source-url</a>: source-url option (-s)
+<li><a accesskey="3" href="#update_002dleap-ipv4">update-leap ipv4</a>: ipv4 option (-4)
+<li><a accesskey="4" href="#update_002dleap-destination">update-leap destination</a>: destination option (-d)
+<li><a accesskey="5" href="#update_002dleap-expiration">update-leap expiration</a>: expiration option (-e)
+<li><a accesskey="6" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>: ntp-conf-file option (-f)
+<li><a accesskey="7" href="#update_002dleap-force_002dupdate">update-leap force-update</a>: force-update option (-F)
+<li><a accesskey="8" href="#update_002dleap-exit-status">update-leap exit status</a>: exit status
+<li><a accesskey="9" href="#update_002dleap-Usage">update-leap Usage</a>: Usage
+<li><a href="#update_002dleap-Authors">update-leap Authors</a>: Authors
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="update_002dleap-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-source_002durl">update-leap source-url</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.1 update-leap help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-update_002dleap-help-3"></a>
+This is the automatically generated usage text for update-leap.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">/bin/bash: line 136: ./update-leap: Permission denied
+</pre>
+ <div class="node">
+<p><hr>
+<a name="update_002dleap-source_002durl"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-ipv4">update-leap ipv4</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-usage">update-leap usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.2 source-url option (-s)</h4>
+
+<p><a name="index-update_002dleap_002dsource_002durl-4"></a>
+This is the &ldquo;the url of the master copy of the leapseconds file&rdquo; option.
+This option takes a string argument.
+Specify the URL of the master copy to download
+$LEAPSRC
+<div class="node">
+<p><hr>
+<a name="update_002dleap-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-destination">update-leap destination</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-source_002durl">update-leap source-url</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.3 ipv4 option (-4)</h4>
+
+<p><a name="index-update_002dleap_002dipv4-5"></a>
+This is the &ldquo;use only ipv4 addresses for dns name resolution&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv6.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+;
+
+ <p>flag =
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = &lt;&lt;- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+;
+
+ <p>flag =
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = &lt;&lt;- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+<div class="node">
+<p><hr>
+<a name="update_002dleap-destination"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-expiration">update-leap expiration</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-ipv4">update-leap ipv4</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.4 destination option (-d)</h4>
+
+<p><a name="index-update_002dleap_002ddestination-6"></a>
+This is the &ldquo;filename on the local system&rdquo; option.
+This option takes a string argument <span class="file">float</span>.
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+<div class="node">
+<p><hr>
+<a name="update_002dleap-expiration"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-destination">update-leap destination</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.5 expiration option (-e)</h4>
+
+<p><a name="index-update_002dleap_002dexpiration-7"></a>
+This is the &ldquo;refresh the leapfile this long before it expires&rdquo; option.
+This option takes a string argument.
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+<div class="node">
+<p><hr>
+<a name="update_002dleap-ntp_002dconf_002dfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-expiration">update-leap expiration</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.6 ntp-conf-file option (-f)</h4>
+
+<p><a name="index-update_002dleap_002dntp_002dconf_002dfile-8"></a>
+This is the &ldquo;location of the ntp.conf file&rdquo; option.
+This option takes a string argument.
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+<div class="node">
+<p><hr>
+<a name="update_002dleap-force_002dupdate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-exit-status">update-leap exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.7 force-update option (-F)</h4>
+
+<p><a name="index-update_002dleap_002dforce_002dupdate-9"></a>
+This is the &ldquo;force update of the leapfile&rdquo; option.
+Force update even if current file is OK and not close to expiring.
+<div class="node">
+<p><hr>
+<a name="update_002dleap-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-Usage">update-leap Usage</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.8 update-leap exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+ <div class="node">
+<p><hr>
+<a name="update_002dleap-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-Authors">update-leap Authors</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-exit-status">update-leap exit status</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.9 update-leap Usage</h4>
+
+<div class="node">
+<p><hr>
+<a name="update_002dleap-Authors"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-Usage">update-leap Usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.10 update-leap Authors</h4>
+
+</body></html>
+
diff --git a/scripts/update-leap/update-leap.man.in b/scripts/update-leap/update-leap.man.in
new file mode 100644
index 0000000..a164347
--- /dev/null
+++ b/scripts/update-leap/update-leap.man.in
@@ -0,0 +1,169 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH update-leap 1update-leapman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E0ayAX/ag-R0aGzX)
+.\"
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:40 AM by AutoGen 5.18.5pre4
+.\" From the definitions update-leap-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]update-leap\fP
+\- leap-seconds file manager/updater
+.SH SYNOPSIS
+\f\*[B-Font]update-leap\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]update-leap\fP
+will validate the file currently on the local system
+and if necessary, updates leap-second definition file.
+.sp \n(Ppu
+.ne 2
+
+Ordinarily, the file is found using the "leapfile" directive in
+\fCntp.conf\fR(5)\f[].
+However, an alternate location can be specified on the command line.
+.sp \n(Ppu
+.ne 2
+
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.sp \n(Ppu
+.ne 2
+
+If the current file is acceptable, no download or restart occurs.
+.sp \n(Ppu
+.ne 2
+
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-source\-url\f[]=\f\*[I-Font]string\f[]
+The URL of the master copy of the leapseconds file.
+.sp
+Specify the URL of the master copy to download
+$LEAPSRC
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Use only IPv4 addresses for DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = ipv6;
+ flags-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = prefer;
+ flags-cant = ipv4, ipv6;
+ value = p;
+ arg-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+.TP
+.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]float\f[], \f\*[B-Font]\-\-destination\f[]=\f\*[I-Font]float\f[]
+Filename on the local system.
+.sp
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+.TP
+.NOP \f\*[B-Font]\-e\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-expiration\f[]=\f\*[I-Font]string\f[]
+Refresh the leapfile this long before it expires.
+.sp
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+.TP
+.NOP \f\*[B-Font]\-f\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-ntp\-conf\-file\f[]=\f\*[I-Font]string\f[]
+Location of the ntp.conf file.
+.sp
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+.TP
+.NOP \f\*[B-Font]\-F\f[], \f\*[B-Font]\-\-force\-update\f[]
+Force update of the leapfile.
+.sp
+Force update even if current file is OK and not close to expiring.
+.TP
+.NOP \f\*[B-Font]\-\-dont\-wait\f[]
+Don't wait for keystroke between plots.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH USAGE
+Usage stuff
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Timothe Litt"
+.br
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBupdate-leap\fP
+option definitions.
diff --git a/scripts/update-leap/update-leap.mdoc.in b/scripts/update-leap/update-leap.mdoc.in
new file mode 100644
index 0000000..9fb3a12
--- /dev/null
+++ b/scripts/update-leap/update-leap.mdoc.in
@@ -0,0 +1,134 @@
+.Dd April 7 2015
+.Dt UPDATE_LEAP 1update-leapmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed April 7, 2015 at 04:21:46 AM by AutoGen 5.18.5pre4
+.\" From the definitions update-leap-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm update-leap
+.Nd leap-seconds file manager/updater
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+will validate the file currently on the local system
+and if necessary, updates leap\-second definition file.
+.Pp
+Ordinarily, the file is found using the "leapfile" directive in
+.Xr ntp.conf 5 .
+However, an alternate location can be specified on the command line.
+.Pp
+If the file does not exist, is not valid, has expired, or is expiring soon,
+a new copy will be downloaded. If the new copy validates, it is installed and
+NTP is (optionally) restarted.
+.Pp
+If the current file is acceptable, no download or restart occurs.
+.Pp
+-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
+.PP
+This can be run as a cron job. As the file is rarely updated, and leap
+seconds are announced at least one month in advance (usually longer), it
+need not be run more frequently than about once every three weeks.
+.PP
+For cron\-friendly behavior, define CRONJOB=1 in the crontab.
+.PP
+This script depends on$REQUIREDCMDS
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl s Ar string , Fl \-source\-url Ns = Ns Ar string
+The URL of the master copy of the leapseconds file.
+.sp
+Specify the URL of the master copy to download
+$LEAPSRC
+.It Fl 4 , Fl \-ipv4
+Use only IPv4 addresses for DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+ Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = ipv6;
+ flags\-cant = ipv4, prefer;
+ value = 6;
+ descrip = "Use only IPv6 addresses for DNS name resolution";
+ doc = <<\- _EndOfDoc_
+ Force DNS resolution of following host names on the command line
+ to the IPv6 namespace.
+ _EndOfDoc_;
+};
+.sp
+flag = {
+ name = prefer;
+ flags\-cant = ipv4, ipv6;
+ value = p;
+ arg\-type = keyword;
+ keyword = 4, 6;
+ descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ doc = <<\- _EndOfDoc_
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+.It Fl d Ar float , Fl \-destination Ns = Ns Ar float
+Filename on the local system.
+.sp
+The name to use to store the leapfile on the local system.
+$LEAPFILE
+.It Fl e Ar string , Fl \-expiration Ns = Ns Ar string
+Refresh the leapfile this long before it expires.
+.sp
+Specify how long before expiration the file is to be refreshed
+Units are required, e.g. "\-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+.It Fl f Ar string , Fl \-ntp\-conf\-file Ns = Ns Ar string
+Location of the ntp.conf file.
+.sp
+Specify location of ntp.conf (used to make sure leapfile directive is
+present and to default leapfile)
+/etc/ntp.conf
+.It Fl F , Fl \-force\-update
+Force update of the leapfile.
+.sp
+Force update even if current file is OK and not close to expiring.
+.It Fl \-dont\-wait
+Don't wait for keystroke between plots.
+.sp
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh USAGE
+Usage stuff
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Timothe Litt"
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBupdate\-leap\fP
+option definitions.
diff --git a/scripts/update-leap/update-leap.texi b/scripts/update-leap/update-leap.texi
new file mode 100644
index 0000000..1a96ae0
--- /dev/null
+++ b/scripts/update-leap/update-leap.texi
@@ -0,0 +1,43 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename update-leap.info
+@settitle update-leap User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{update-leap},
+a program from
+the NTP Project,
+that is used to wait until @code{ntpd} has been able to
+synchronize and stabilize the time on the current host.
+@end ifinfo
+
+@direntry
+* update-leap: (update-leap). Check the leapfile and update it if needed.
+@end direntry
+
+@titlepage
+@title update-leap User's Manual
+@subtitle update-leap, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, update-leap Description, (dir), (dir)
+
+This document describes the use of the NTP Project's @code{update-leap} program.
+
+This document applies to version @value{VERSION} of @code{update-leap}.
+
+@shortcontents
+
+@menu
+* update-leap Description:: Description
+* update-leap Invocation:: Invoking update-leap
+@end menu
+
+@include invoke-update-leap.texi
diff --git a/sntp/COPYRIGHT b/sntp/COPYRIGHT
index 1775a64..9c1a0f8 100644
--- a/sntp/COPYRIGHT
+++ b/sntp/COPYRIGHT
@@ -4,16 +4,16 @@ This file is automatically generated from html/copyright.html
jpg "Clone me," says Dolly sheepishly.
- Last update: 9-Aug-2014 07:56 UTC
+ Last update: 17-Jan-2015 00:16 UTC
_________________________________________________________________
The following copyright notice applies to all files collectively
called the Network Time Protocol Version 4 Distribution. Unless
- specifically declared otherwise in an individual file, this notice
- applies as if the text was explicitly included in the file.
+ specifically declared otherwise in an individual file, this entire
+ notice applies as if the text was explicitly included in the file.
***********************************************************************
* *
-* Copyright (c) University of Delaware 1992-2014 *
+* Copyright (c) University of Delaware 1992-2015 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose with or without fee is hereby *
@@ -29,6 +29,38 @@ This file is automatically generated from html/copyright.html
* *
***********************************************************************
+ Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin
+ Burnicki is:
+***********************************************************************
+* *
+* Copyright (c) Network Time Foundation 2011-2015 *
+* *
+* All Rights Reserved *
+* *
+* Redistribution and use in source and binary forms, with or without *
+* modification, are permitted provided that the following conditions *
+* are met: *
+* 1. Redistributions of source code must retain the above copyright *
+* notice, this list of conditions and the following disclaimer. *
+* 2. Redistributions in binary form must reproduce the above *
+* copyright notice, this list of conditions and the following *
+* disclaimer in the documentation and/or other materials provided *
+* with the distribution. *
+* *
+* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS *
+* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
+* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE *
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
+* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR *
+* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
+* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
+* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
+* DAMAGE. *
+***********************************************************************
+
The following individuals contributed in part to the Network Time
Protocol Distribution Version 4 and are acknowledged as authors of
this work.
diff --git a/sntp/Makefile.am b/sntp/Makefile.am
index 81a137a..8694ed3 100644
--- a/sntp/Makefile.am
+++ b/sntp/Makefile.am
@@ -56,21 +56,22 @@ sbin_PROGRAMS = @SNTP_DS@
SUBDIRS = include scripts
DIST_SUBDIRS = include scripts
-if BUILD_SNTP
-noinst_LIBRARIES = libsntp.a
if BUILD_LIBEVENT
SUBDIRS += libevent
DIST_SUBDIRS += libevent
endif
-if GTEST_AVAILABLE
-SUBDIRS += tests
-endif
-endif
if NEED_LIBOPTS
SUBDIRS += libopts
endif
+if BUILD_SNTP
+noinst_LIBRARIES = libsntp.a
+if GTEST_AVAILABLE
+SUBDIRS += tests
+endif
+endif
+
DIST_SUBDIRS += libopts tests
libsntp_a_SOURCES = \
diff --git a/sntp/Makefile.in b/sntp/Makefile.in
index 72e1d48..fac19cc 100644
--- a/sntp/Makefile.in
+++ b/sntp/Makefile.in
@@ -42,26 +42,25 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = sntp$(EXEEXT)
-@BUILD_LIBEVENT_TRUE@@BUILD_SNTP_TRUE@am__append_1 = libevent
-@BUILD_LIBEVENT_TRUE@@BUILD_SNTP_TRUE@am__append_2 = libevent
-@BUILD_SNTP_TRUE@@GTEST_AVAILABLE_TRUE@am__append_3 = tests
-@NEED_LIBOPTS_TRUE@am__append_4 = libopts
+@BUILD_LIBEVENT_TRUE@am__append_1 = libevent
+@BUILD_LIBEVENT_TRUE@am__append_2 = libevent
+@NEED_LIBOPTS_TRUE@am__append_3 = libopts
+@BUILD_SNTP_TRUE@@GTEST_AVAILABLE_TRUE@am__append_4 = tests
DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(top_srcdir)/bincheck.mf \
$(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf \
$(top_srcdir)/configure $(top_srcdir)/depsver.mf \
- $(top_srcdir)/includes.mf install-sh \
- libevent/build-aux/compile libevent/build-aux/config.guess \
- libevent/build-aux/config.sub libevent/build-aux/depcomp \
- libevent/build-aux/install-sh libevent/build-aux/ltmain.sh \
- libevent/build-aux/missing libevent/build-aux/ylwrap
+ $(top_srcdir)/includes.mf compile config.guess config.sub \
+ depcomp install-sh libevent/build-aux/compile \
+ libevent/build-aux/config.guess libevent/build-aux/config.sub \
+ libevent/build-aux/depcomp libevent/build-aux/install-sh \
+ libevent/build-aux/ltmain.sh libevent/build-aux/missing \
+ libevent/build-aux/ylwrap ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -81,8 +80,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -277,6 +278,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
LDFLAGS_NTP = @LDFLAGS_NTP@
@@ -392,6 +394,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/sntp/aclocal.m4 b/sntp/aclocal.m4
index aff791b..5d30c42 100644
--- a/sntp/aclocal.m4
+++ b/sntp/aclocal.m4
@@ -1132,8 +1132,6 @@ AC_SUBST([am__untar])
m4_include([libopts/m4/libopts.m4])
m4_include([libopts/m4/stdnoreturn.m4])
-m4_include([libevent/m4/openldap-thread-check.m4])
-m4_include([libevent/m4/openldap.m4])
m4_include([m4/hms_search_lib.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
@@ -1159,5 +1157,7 @@ m4_include([m4/ntp_prog_cc.m4])
m4_include([m4/ntp_sntp.m4])
m4_include([m4/ntp_sysexits.m4])
m4_include([m4/ntp_ver_suffix.m4])
+m4_include([m4/openldap-thread-check.m4])
+m4_include([m4/openldap.m4])
m4_include([m4/os_cflags.m4])
m4_include([m4/snprintf.m4])
diff --git a/sntp/compile b/sntp/compile
new file mode 100755
index 0000000..1b1d232
--- /dev/null
+++ b/sntp/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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 2, 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/sntp/config.guess b/sntp/config.guess
new file mode 100755
index 0000000..b02565c
--- /dev/null
+++ b/sntp/config.guess
@@ -0,0 +1,1517 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+timestamp='2011-06-03'
+
+# This file 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/sntp/config.h.in b/sntp/config.h.in
index 122fee5..64279b9 100644
--- a/sntp/config.h.in
+++ b/sntp/config.h.in
@@ -835,6 +835,9 @@ typedef unsigned int uintptr_t;
/* What type to use for setsockopt */
#undef TYPEOF_IP_MULTICAST_LOOP
+/* OK to use snprintb()? */
+#undef USE_SNPRINTB
+
/* Can we use SIGPOLL for tty IO? */
#undef USE_TTY_SIGPOLL
diff --git a/sntp/config.sub b/sntp/config.sub
new file mode 100755
index 0000000..f9fcdc8
--- /dev/null
+++ b/sntp/config.sub
@@ -0,0 +1,1756 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+timestamp='2011-06-03'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | open8 \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/sntp/configure b/sntp/configure
index 0d6902b..76bdd28 100755
--- a/sntp/configure
+++ b/sntp/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for sntp 4.2.7p482.
+# Generated by GNU Autoconf 2.68 for sntp 4.2.8p2.
#
# Report bugs to <http://bugs.ntp.org./>.
#
@@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sntp'
PACKAGE_TARNAME='sntp'
-PACKAGE_VERSION='4.2.7p482'
-PACKAGE_STRING='sntp 4.2.7p482'
+PACKAGE_VERSION='4.2.8p2'
+PACKAGE_STRING='sntp 4.2.8p2'
PACKAGE_BUGREPORT='http://bugs.ntp.org./'
PACKAGE_URL='http://www.ntp.org./'
@@ -676,6 +676,7 @@ PTHREADS_TRUE
LIBISC_PTHREADS_NOTHREADS
PTHREAD_LIBS
HAVE_INLINE
+LDADD_LIBUTIL
ALLOCA
LIBM
EDITLINE_LIBS
@@ -685,6 +686,13 @@ SED
LDADD_LIBNTP
NTP_CROSSCOMPILE_FALSE
NTP_CROSSCOMPILE_TRUE
+INSTALL_UPDATE_LEAP_FALSE
+INSTALL_UPDATE_LEAP_TRUE
+UPDATE_LEAP_NI
+UPDATE_LEAP_MS
+UPDATE_LEAP_DS
+UPDATE_LEAP_DL
+UPDATE_LEAP_DB
TIMETRIM_NI
TIMETRIM_MS
TIMETRIM_DS
@@ -1456,7 +1464,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sntp 4.2.7p482 to adapt to many kinds of systems.
+\`configure' configures sntp 4.2.8p2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1526,7 +1534,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sntp 4.2.7p482:";;
+ short | recursive ) echo "Configuration of sntp 4.2.8p2:";;
esac
cat <<\_ACEOF
@@ -1669,7 +1677,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sntp configure 4.2.7p482
+sntp configure 4.2.8p2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2494,7 +2502,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sntp $as_me 4.2.7p482, which was
+It was created by sntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -3437,7 +3445,7 @@ fi
# Define the identity of the package.
PACKAGE='sntp'
- VERSION='4.2.7p482'
+ VERSION='4.2.8p2'
cat >>confdefs.h <<_ACEOF
@@ -5220,6 +5228,183 @@ if test "x$ac_cv_prog_cc_c89" != xno; then :
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
+
+
@@ -5953,6 +6138,7 @@ fi
+
CFLAGS_NTP=
CPPFLAGS_NTP=
LDADD_NTP=
@@ -6853,6 +7039,19 @@ fi
+ if test -z "$UPDATE_LEAP_NI" ; then
+ INSTALL_UPDATE_LEAP_TRUE=
+ INSTALL_UPDATE_LEAP_FALSE='#'
+else
+ INSTALL_UPDATE_LEAP_TRUE='#'
+ INSTALL_UPDATE_LEAP_FALSE=
+fi
+
+
+
+
+
+
# Expose a cross-compilation indicator to makefiles
@@ -8916,6 +9115,73 @@ fi
done
+# Bug 2713
+LDADD_LIBUTIL=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
+$as_echo_n "checking for library containing snprintb... " >&6; }
+if ${ac_cv_search_snprintb+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$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 snprintb ();
+int
+main ()
+{
+return snprintb ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' util; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_snprintb=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_snprintb+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_snprintb+:} false; then :
+
+else
+ ac_cv_search_snprintb=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
+$as_echo "$ac_cv_search_snprintb" >&6; }
+ac_res=$ac_cv_search_snprintb
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_snprintb" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
+ esac
+
+$as_echo "#define USE_SNPRINTB 1" >>confdefs.h
+
+fi
+
+
#
for ac_header in errno.h sys/socket.h sys/types.h time.h
do :
@@ -24350,6 +24616,13 @@ $as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
# end of AC_DEFUN of LIBOPTS_CHECK
+# From when we only used libevent for sntp:
+#AM_COND_IF(
+# [BUILD_SNTP],
+# [NTP_LIBEVENT_CHECK],
+# [NTP_LIBEVENT_CHECK_NOBUILD]
+#)
+
ntp_pkgconfig_min_version='0.15.0'
@@ -24485,13 +24758,11 @@ fi
- if test -z "$BUILD_SNTP_TRUE"; then :
-
-ntp_libevent_min_version=2.0.9
+ntp_libevent_min_version=2
ntp_libevent_tearoff=libevent
@@ -24601,95 +24872,6 @@ esac
- else
-
-
-ntp_libevent_min_version=2.0.9
-ntp_libevent_tearoff=libevent
-
-
-
-
-case "$ntp_use_local_libevent" in
- yes)
- ;;
- *) # If we have (a good enough) pkg-config, see if it can find libevent
- case "$PKG_CONFIG" in
- /*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
-$as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
- if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
- then
- 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;}
- 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.
- # While we could grab only the -L stuff, there *might* be
- # other flags there we want. Originally we just removed -levent
- # but then somebody decided to install -levent-2.0
- # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
- # So now we dance...
- LDADD_LIBEVENT=
- for i in `$PKG_CONFIG --libs libevent`
- do
- case "$i" in
- -levent*) ;;
- *) case "$LDADD_LIBEVENT" in
- '') LDADD_LIBEVENT="$i" ;;
- *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
- esac
- ;;
- esac
- done
- case "$LIBISC_PTHREADS_NOTHREADS" in
- pthreads)
- LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
- esac
- LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- ntp_use_local_libevent=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- ;;
- *)
- ntp_use_local_libevent=yes
- ;;
- esac
- ;;
-esac
-
-case "$ntp_use_local_libevent" in
- yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
-$as_echo "$as_me: Using libevent tearoff" >&6;}
- CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
- case "$LIBISC_PTHREADS_NOTHREADS" in
- pthreads)
- LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
- ;;
- *)
- LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
- esac
-esac
-
- if test "x$ntp_use_local_libevent" = "xyes"; then
- BUILD_LIBEVENT_TRUE=
- BUILD_LIBEVENT_FALSE='#'
-else
- BUILD_LIBEVENT_TRUE='#'
- BUILD_LIBEVENT_FALSE=
-fi
-
-
-
-
- fi
-
# Checks for libraries.
@@ -30023,6 +30205,10 @@ if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; th
as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -30051,10 +30237,6 @@ if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -30472,7 +30654,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sntp $as_me 4.2.7p482, which was
+This file was extended by sntp $as_me 4.2.8p2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -30539,7 +30721,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-sntp config.status 4.2.7p482
+sntp config.status 4.2.8p2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/sntp/configure.ac b/sntp/configure.ac
index e103468..172c6b1 100644
--- a/sntp/configure.ac
+++ b/sntp/configure.ac
@@ -97,11 +97,14 @@ esac
enable_nls=no
LIBOPTS_CHECK
-AM_COND_IF(
- [BUILD_SNTP],
- [NTP_LIBEVENT_CHECK],
- [NTP_LIBEVENT_CHECK_NOBUILD]
-)
+# From when we only used libevent for sntp:
+#AM_COND_IF(
+# [BUILD_SNTP],
+# [NTP_LIBEVENT_CHECK],
+# [NTP_LIBEVENT_CHECK_NOBUILD]
+#)
+
+NTP_LIBEVENT_CHECK([2])
# Checks for libraries.
diff --git a/sntp/crypto.c b/sntp/crypto.c
index aa8d91d..b178f8c 100644
--- a/sntp/crypto.c
+++ b/sntp/crypto.c
@@ -3,7 +3,7 @@
#include <ctype.h>
struct key *key_ptr;
-int key_cnt = 0;
+size_t key_cnt = 0;
int
make_mac(
@@ -51,7 +51,7 @@ auth_md5(
int authentic;
char digest[20];
- if (mac_size > sizeof(digest))
+ if (mac_size > (int)sizeof(digest))
return 0;
hash_len = make_mac(pkt_data, pkt_size, sizeof(digest), cmp_key,
digest);
diff --git a/sntp/depcomp b/sntp/depcomp
new file mode 100755
index 0000000..04701da
--- /dev/null
+++ b/sntp/depcomp
@@ -0,0 +1,530 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 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 2, 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> $depfile
+ echo >> $depfile
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> $depfile
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+ tmpdepfile="$stripped.u"
+ if test "$libtool" = yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+ stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+ sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mecanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ "$@" || exit $?
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/sntp/include/Makefile.in b/sntp/include/Makefile.in
index dd0a84b..31db061 100644
--- a/sntp/include/Makefile.in
+++ b/sntp/include/Makefile.in
@@ -40,8 +40,6 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -61,8 +59,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -133,6 +133,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
LDFLAGS_NTP = @LDFLAGS_NTP@
@@ -248,6 +249,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/sntp/include/copyright.def b/sntp/include/copyright.def
index 317ff6d..1cc7ad2 100644
--- a/sntp/include/copyright.def
+++ b/sntp/include/copyright.def
@@ -1,8 +1,8 @@
/* -*- Mode: Text -*- */
copyright = {
- date = "1970-2014";
- owner = "The University of Delaware";
+ date = "1992-2015";
+ owner = "The University of Delaware and Network Time Foundation";
eaddr = "http://bugs.ntp.org, bugs@ntp.org";
type = ntp;
};
diff --git a/sntp/include/ntp.lic b/sntp/include/ntp.lic
index 0e42503..69af392 100644
--- a/sntp/include/ntp.lic
+++ b/sntp/include/ntp.lic
@@ -9,7 +9,7 @@
<PFX>documentation for any purpose with or without fee is hereby granted,
<PFX>provided that the above copyright notice appears in all copies and that
<PFX>both the copyright notice and this permission notice appear in
-<PFX>supporting documentation, and that the name <owner> not be used in
+<PFX>supporting documentation, and that the name The University of Delaware not be used in
<PFX>advertising or publicity pertaining to distribution of the software
<PFX>without specific, written prior permission. <owner> makes no
<PFX>representations about the suitability this software for any purpose. It
diff --git a/sntp/include/version.def b/sntp/include/version.def
index 2097ac6..c315fe8 100644
--- a/sntp/include/version.def
+++ b/sntp/include/version.def
@@ -1 +1 @@
-version = '4.2.7p482';
+version = '4.2.8p2';
diff --git a/sntp/include/version.texi b/sntp/include/version.texi
index 539f825..d5ea0c0 100644
--- a/sntp/include/version.texi
+++ b/sntp/include/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 02 December 2014
-@set EDITION 4.2.7p482
-@set VERSION 4.2.7p482
+@set UPDATED 07 April 2015
+@set EDITION 4.2.8p2
+@set VERSION 4.2.8p2
diff --git a/sntp/invoke-sntp.texi b/sntp/invoke-sntp.texi
index a79bb59..bed49ec 100644
--- a/sntp/invoke-sntp.texi
+++ b/sntp/invoke-sntp.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-sntp.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:59:28 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:18:04 AM by AutoGen 5.18.5pre4
# From the definitions sntp-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -56,7 +56,8 @@ Otherwise, only the
is displayed.
Finally, the
@emph{stratum}
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
This section was generated by @strong{AutoGen},
using the @code{agtexi-cmd} template and the option descriptions for the @code{sntp} program.
@@ -100,7 +101,7 @@ with a status code of 0.
@exampleindent 0
@example
-sntp - standard Simple Network Time Protocol client program - Ver. 4.2.7p482
+sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p2
Usage: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
@@ -254,7 +255,8 @@ milliseconds.
This is the ``kod history filename'' option.
This option takes a file argument @file{file-name}.
Specifies the filename to be used for the persistent history of KoD
-responses received from servers.
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
@node sntp keyfile
@subsection keyfile option (-k)
@cindex sntp-keyfile
@@ -281,7 +283,9 @@ This is the ``adjustments less than @var{steplimit} msec will be slewed'' option
This option takes a number argument.
If the time adjustment is less than @file{steplimit} milliseconds,
slew the amount using @command{adjtime(2)}. Otherwise, step the
-correction using @command{settimeofday(2)}.
+correction using @command{settimeofday(2)}. The default value is 0,
+which means all adjustments will be stepped. This is a feature, as
+different situations demand different values.
@node sntp ntpversion
@subsection ntpversion option (-o)
@cindex sntp-ntpversion
diff --git a/sntp/libevent/ChangeLog b/sntp/libevent/ChangeLog
index 8bb76ca..1499637 100644
--- a/sntp/libevent/ChangeLog
+++ b/sntp/libevent/ChangeLog
@@ -1,23 +1,282 @@
-Changes in version 2.1.4-beta (?? Dec 2013)
+Changes in version 2.1.5-beta (5 January 2015)
- (As of 735d838b0a537ae04f1e6a2e9cbc5f3f45ebb541)
+ Security Fixes (evbuffers)
+ o Avoid integer overflow bugs in evbuffer_add() and related functions. See CVE-2014-6272 advisory for more information. (d49bc0e88b81a5812116074dc007f1db0ca1eecd)
+ New APIs (evconnlistener)
+ o Provide support for SO_REUSEPORT through LEV_OPT_REUSABLE_PORT (b625361 Maciej Soltysiak)
+
+ Bugfixes (core)
+ o Fix use-after-free error in EV_CLOSURE_EVENT callback (3cc0eac John Ohl)
+ o Fix race caused by event_active (3c7d6fc vjpai)
+
+ Bugfixes (evbuffer)
+ o Fix evbuffer_peek() with len==-1 and start_at non-NULL. (ba59923)
+ o Consistently check for failure from evbuffer_pullup() (60f8f72)
+ o Fix evbuffer_peek() with len==-1 and start_at non-NULL. (fb7e76a)
+
+ Bugfixes (windows, IOCP)
+ o be async: avoid double close() (f133b86 Azat Khuzhin)
+
+ Bugfixes (bufferevents)
+ o Fix issue #127, double free for filterevents that use BEV_OPT_CLOSE_ON_FREE (2c82aa0 John Ohl)
+ o make bufferevent_getwatermark api more robust (a21e510 ufo2243)
+ o [Bugfix] fix bufferevent setwatermark suspend_read (b34e4ac ufo2243)
+ o bufferevent_openssl: reset fd_is_set when setfd with -1 is called (3da84c2 Azat Khuzhin)
+ o Fix compilation for older OpenSSL versions. (5c7282f Joakim Soderberg)
+
+ New APIs (evhttp)
+ o Add evhttp_connection_set_family() to set addrinfo->family for DNS requests (12c29b0 Azat Khuzhin)
+ o Implement interface that provides the ability to have an outbound evhttp_connection free itself once all requests have completed (2b9ec4c,10fe4f John Ohl)
+
+ New APIs (core)
+ o Implement new/free for struct evutil_monotonic_timer and export monotonic time functions (f2645f8 Andrea Shepard)
+
+ Bugfixes (evdns)
+ o Load hosts file on Windows. (a0b247c Vilmos Nebehaj)
+ o Don't truncate hosts file path on Windows. (d0dc861 Vilmos Nebehaj)
+ o Fix a crash in evdns related to shutting down evdns (9f39c88,e8fe749)
+ o evdns: avoid read-after-free in evdns_request_timeout_callback() (61262a0 Azat Khuzhin)
+ o Correctly handle allocation failures in evdns_getaddrinfo (6a53d15)
+ o evdns: fix EVDNS_BASE_DISABLE_WHEN_INACTIVE in case retransmit/retry (74d0eee Azat Khuzhin)
+ o evdns: add retry/reissue tests for EVDNS_BASE_DISABLE_WHEN_INACTIVE (3ca9d43 Azat Khuzhin)
+ o evdns: fail ns after we are failing/retrasmitting request (97c750d Azat Khuzhin)
+
+ Bugfixes (evhttp)
+ o http: reset connection before installing retry timer (fix http retries handling) (bc79cc5 Azat Khuzhin)
+
+
+ Testing
+ o regress_dns: fix leaks in getaddrinfo_async{,_cancel_stress} tests (2fdc5f2 Azat Khuzhin)
+ o test: add family argument for http_connection_test_() (177b8a7 Azat Khuzhin)
+ o test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC (42aefeb Azat Khuzhin)
+ o test/http: add regress test for set family to AF_INET6 (3fbf3cc Azat Khuzhin)
+ o Update to a more recent tinytest_macros. (8da5a18)
+ o test/regress: add simplestsignal: to track reorder bugs separately (b897bef Azat Khuzhin)
+ o test/evbuffer_peek: add regress in case we have first buffer greater (e2d139d Azat Khuzhin)
+ o More evbuffer_peek() test cases (154006a)
+ o use correct tt macro for pointer compare (08c88ea)
+ o regress_buffer: fix 'memcmp' compare size (79800df Maks Naumov)
+ o Fix a use-after-free in unit tests. CID 752027 (3739057)
+ o Fix a dead-code warning in unit tests. CID 1193548 (c119f24)
+ o Use evutil_weakrand() in unit tests. (a677b72, 364c110)
+ o Use a more precise calculation for max in time-ratelim.c (ca5b5c7)
+ o Make a buffer larger in the tests to avoid a scary evbuffer_copyout_from() (fb57b8b)
+ o Fix several memory leaks in the unit tests. (89c1a3b)
+ o Add test for evhttp_connection_free_on_completion (b0e9924 John Ohl)
+ o Fix annoying heisenbug in test-time.c (cb73704)
+
+ Sample code
+ o Make http-server.c output into good html5 (6d72bdc)
+ o Use FindClose for handle from FindFirstFile in http-server.c (6466e88)
+ o https-client: add -retries argument, for connection retries (d9da844 Azat Khuzhin)
+
+ Bugfixes (build)
+ o Add missing headerfile for cmake (15d90cc Trond Norbye)
+ o ignore one more test binary (b6593aa Michael Richardson)
+ o ignore config.cache/test-driver files (c83f333 Mike Frysinger)
+ o add a --disable-samples configure flag (0c492b3 Mike Frysinger)
+ o Add a few files created by "make verify" to .gitignore. (1a8295a Pierre Phaneuf)
+ o updates in cmake build (27bd9fa Sergey Nikulov)
+ o Fix cmake error when the Module path has more than one entry. (befbd13 Acer Yang)
+ o Fix CMake shared library build (e69d910 Nobuaki Sukegawa)
+ o Fix warnings when compiling with clang 3.5 (f5b4765 John Ohl)
+ o Fix mixed declarations and code (forbidden by ISO C90) (8afbdbc Thomas Bernard)
+
+ Bugfixes (miscellaneous)
+ o tree.h: drop duplicated content of tree.h (6193187 Azat Khuzhin)
+ o evdns: disable probing with EVDNS_BASE_DISABLE_WHEN_INACTIVE (610410b,ad0493e,fea86a6,d83b337,5ca9e97 Azat Khuzhin)
+ o [Bugfix] fix grammer error (3a4d249 ufo2243)
+ o Change return type of evutil_load_windows_system_library_ to HMODULE (f691389)
+ o Fix a c90 warning (76643dd)
+ o Fix a typo in a doxygen comment. Reported by 亦得. (be1aeff)
+ o remove trailing comma from enum (b361b8a Jean-Philippe Ouellet)
+
+ Bugfixes (FreeBSD)
+ o Handle ENOTCAPABLE from FreeBSD - this is returned if an event in the changelist is for an FD that has been closed. (6fd7394 Adrian Chadd)
+
+
+
+Changes in version 2.1.4-alpha (21 Mar 2014)
+
+ Libevent 2.1.4-alpha adds a number of new miscellaneous APIs to make
+ Libevent more useful, including support for early close detection with
+ epoll via EPOLLRDHUP, triggering bufferevent callbacks, adding more
+ evhttp callbacks, and more. There are also numerous bugfixes, including
+ a number for finalize-related issues from 2.1.3-alpha; and an
+ alternative (non-primary!) cmake-based build mechanism.
+
+ New APIs (core)
+ o Added event_base_get_num_events() (0fa107d Mobai Zhang)
+ o New event_base_active_by_fd API (865a142 Greg Hazel, 5c9da9a, 87fa2b0)
+ o Add event_base_active_by_signal by analogy (4865943)
+ o Add access to max event count stats (5173bef, efbd3dc, 26230a2
+ Andrew Sweeney)
+ o Implemented EV_CLOSED event for epoll backend
+ (EPOLLRDHUP). (b1b69ac Diego Giagio, 53d2793, 43ffcf6, dfe1e52
+ Marcin Juszkiewicz, ff26633 Joakim Soderberg, 3908a5e)
+
+ New APIs (evutil_secure_rng)
+ o Add evutil_secure_rng_set_urandom_device_file (2bbb5d7)
+
+ New APIs (bufferevents)
+ o Add function to fetch underlying ratelimit cfg (4b3d5af Mark Ellzey)
+ o Pass and return const for bufferevent_get_token_bucket_cfg (1c77fbb
+ Mark Ellzey)
+ o Add watermark introspection (4ce242b Ondřej Kuzník)
+ o Add an option to trigger bufferevent I/O callbacks (61ee18b Ondřej Kuzník)
+ o Add an option to trigger bufferevent event callbacks (a7384c7
+ Ondřej Kuzník)
+ o Clarifications in response to merge req. comments (bd41947 Ondřej
+ Kuzník)
+ o Minor optimizations on bufferevent_trigger options (a3172a4)
+
+ New APIs (evhttp)
+ o Add evhttp_connection_get_server(). (a7f82a3 Maxime Henrion)
+ o add a http default content type option (5a5acd9 Nicolas Martyanoff)
+ o http: implement new evhttp_connection_get_addr() api. (0c7f040 Azat
+ Khuzhin)
+ o Add a variant of evhttp_send_reply_chunk() with a callback on
+ evhttp_write_buffer() (8d8decf Julien BLACHE)
+ o Allow registering callback for parsing HTTP headers (b0bd7fe Balint Reczey)
+ o Provide on request complete callback facility (b083ca0 Andrew Sweeney)
+ o evhttp_request_set_on_complete_cb to be more specific about what
+ the function actually does and usage (da86dda Andrew Sweeney)
+ o Update unit test to make sure that the callback happens after the
+ output data is written (b85f398 Andrew Sweeney)
+
+ Features (evdns)
+ o bug fix for issues #293 evdns_base_load_hosts doesn't remove
+ outdated addresses (954d2f9, f03d353, 45eba6f Kuldeep Gupta)
+
+ Features: (cmake build support)
+ o Initial CMake commit. (e415196 Joakim Soderberg)
+ o Add all tests and benchmarks to CMake project. (e9fc014 Joakim Soderberg)
+ o More work on adding tests to CMake project (99c1dc3 Joakim Soderberg)
+ o Generate a dummy evconfig-private.h so things build
+ properly. (ce14def Joakim Soderberg)
+ o Link libm on unix platforms. (58fcd42 Joakim Soderberg)
+ o Added some GCC specific options. (19222e5 Joakim Soderberg)
+ o Use evutil_closesocket instead. (dbf2b51 Joakim Soderberg)
+ o Add copyright and licensing files for CMake modules. (c259d53
+ Joakim Soderberg)
+ o Only include WIN32 getopt where it is used. (9bbce0b Joakim Soderberg)
+ o Fix bench_cascade program on Windows. (78da644 Joakim Soderberg)
+ o Don't segfault on no found event backend. (8f2af50 Joakim Soderberg)
+ o Only test the event backends available on the system. (7ea4159
+ Joakim Soderberg)
+ o Added a "make verify" target. (e053c4f Joakim Soderberg)
+ o Fix the make "verify" target on Windows. (67e5d74 Joakim Soderberg)
+ o Get rid of deprecation warnings for OpenSSL on OSX 10.7+ (69c3516
+ Joakim Söderberg)
+ o Fix kqueue support. (a831f2f Joakim Söderberg)
+ o Added a test for testing if kqueue works with pipes. (2799b35
+ Joakim Söderberg)
+ o Change the BSD license from 4 to 3-clause. (86df3ed Joakim Soderberg)
+ o Minimum required python version is 2.4. (968e97b Joakim Soderberg)
+ o Get rid of unknown pragma warnings. (0ef1d04 Joakim Soderberg)
+ o Add a "make verify_coverage" target generation coverage
+ info. (f2483f8 Joakim Soderberg)
+ o Fix the "make verify" target on NetBSD (4ac086a Joakim Soderberg)
+ o Only look for ZLib when it is used (if tests are
+ included). (f780593 Joakim Soderberg)
+ o Added EVENT__ENABLE_GCC_WARNINGS, turns all warnings into
+ errors. (dd413bd Joakim Soderberg)
+ o Add CMake config and install targets. (f3446ed Joakim Soderberg)
+ o Fix typo (4b754df Joakim Soderberg)
+ o Some work on making it possible to simply do add_subdirectory() on
+ the project. (49ab363 Joakim Soderberg)
+ o Set USE_DEBUG=1 on EVENT__ENABLE_VERBOSE_DEBUG (fd42e70 Joakim Soderberg)
+ o Fix so that old nmake project still builds. (24d6466 Joakim
+ Soderberg)
+ o Rename README to README.md and use markdown to format. (d2bc39a
+ Joakim Soderberg)
+ o Update README with CMake build instructions. (604b8cc Joakim Soderberg)
+ o Clean up the README some. (8d4cb35 JoakimSoderberg)
+ o Forgotten headers for old nmake project compatability. (8697b99
+ Joakim Soderberg)
+ o Change all uses of WIN32 to _WIN32 (4e14395 Joakim Söderberg)
+ o Fix include bug. (2024467 Joakim Söderberg)
+ o Check if we're on OSX before disabling deprecation in le-proxy
+ (8b40a5b Joakim Söderberg)
+ o Fix broken autotools build. (ae1bd82 Joakim Söderberg)
+ o Disclaimerize cmake a little in the README (d03b5bf)
+ o Fix CMake compile when OpenSSL is disabled. (e423d42 Joakim
+ Söderberg)
+ o CMake: Get rid of python not found warning when regress tests
+ turned off. (d38d798 Joakim Söderberg)
+ o Fix https-client compilation on Windows. (d7be788 Joakim Soderberg)
+ o Guard against EVENT_NOWIN32 being set during testing. (f1715b4
+ Joakim Soderberg)
+ o Check for OSX when checking for clang. (e212c54 Joakim Soderberg)
+ o Added a Travis-CI configuration file. (8c0f0a9 Joakim Soderberg)
+ o Added -Qunused-arguments for clang on macosx (ed99d92 Trond Norbye)
+ o Rename event_extras to event_extra (a0dd5df Trond Norbye)
+ o Add option to build shared library (4545fa9 Trond Norbye)
+ o Add -Qunused-arguments for clang on macos (b56611d Trond Norbye)
+ o Add cmake-related files to .gitignore (e061321 Trond Norbye)
+ o Export event_extra not event_extras. (2b41bcf Joakim Söderberg)
+
+ Bugfixes (core)
+ o If evsel->del() fails, don't leave the evmap in an inconsistent
+ state (9b5a527 Maxime Henrion)
+ o Move event_debug_note_teardown_ before mm_free. (69b5c64)
+ o Check CLOCK_MONOTONIC_* at runtime if needed. (911abf3)
+ o Fix reinit of fds with EV_WRITE but not EV_READ. (ebfd8a8 maksqwe)
+ o Tweaked callbacks to prevent race condition
+ (https://github.com/libevent/libevent/issues/104) (40830f1, 2ea15ed
+ John Ohl)
+ o Move assert(ev) to before we use ev in EV_CLOSURE_EVENT_FINALIZE
+ case (9805972)
+
+ Bugfixes (evhttp)
+ o Fix a double close() bug in evhttp when the underlying bufferevent uses
+ BEV_OPT_CLOSE_ON_FREE. (31db8a0 Maxime Henrion)
+ o Fix an unlikely but possible error case for http connections (f22049e)
+ o Avoid racy bufferevent activation (5eb1788 Nate Rosenblum)
+
+ Bugfixes on 2.0 (Windows)
+ o Use windows vsnprintf fixup logic on all windows environments (e826f19)
+ o libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer)
+ (b8f5980 Frank Denis)
+
+ Bugfixes (evutil_secure_rng)
+ o When we seed from /proc/sys/kernel/random/uuid, count it as success
+ (e35b540)
+ o We should return after arc4random_buf() (1ea1f26 Makoto Kato)
+ o Avoid other RNG initialization FS reads when urandom file is
+ specified (9695e9c)
+ o Really remove RNG seeds from the stack (f5ced88)
+ o Fix another arc4random_buf-related warning (e64a2b0)
+
+ Bugfixes (bufferevents)
+ o Initialize async bufferevent timeout CBs unconditionally (af9b2a7)
Bugfixes (evdns)
o Checking request nameserver for NULL, before using it. (5c710c0
Belobrov Andrey)
- o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (14971a8
- Azat Khuzhin)
+ o Fix SEGFAULT after evdns_base_resume if no nameservers
+ installed. (14971a8 Azat Khuzhin)
o Actually use the log facility for reporting evdns problems. (e1766a1)
- o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (f8d7df8 Azat Khuzhin)
+ o Fix SEGFAULT after evdns_base_resume if no nameservers
+ installed. (f8d7df8 Azat Khuzhin)
+ o fix for ServFail from RIPE Atlas release (62f596b Antony Antony)
- Bugfixes (compilatin)
+ Bugfixes (compilation)
o Fix test compilation with nmake: add the gdi.lib dependency (5ba8ab7)
o Whoops. It is gdi.lib, not gdi32.lib. (github issue #61) (8ab612e)
- o Don't use return since return type is void and build error occurs using clang (838161d Makoto Kato)
+ o Don't use return since return type is void and build error occurs
+ using clang (838161d Makoto Kato)
o Use void casts to suppress some "unchecked return value" warns (7080d55)
- o rpcgen: Generate regress.gen.[c,h] in build rather than src dir (243386c Ross Lagerwall)
- o Fix a compiler warning when checking for arc4random_buf linker breakage. (5cb3865)
+ o rpcgen: Generate regress.gen.[c,h] in build rather than src dir
+ (243386c Ross Lagerwall)
+ o Fix a compiler warning when checking for arc4random_buf linker
+ breakage. (5cb3865)
+ o Fix 'make distcheck' by adding regress.gen.[ch] to DISTCLEANFILES
+ (239d834)
+
+ o Fix a c90 warning (c207682)
+ o Fix consts in WIN32-Code/getopt*.[ch] (57abb35)
Bugfixes (locks, synchronization)
o Missed lock acquire/release in event_base_cancel_single_callback_()
@@ -30,7 +289,8 @@ Changes in version 2.1.4-beta (?? Dec 2013)
Testing
o Add tests for evdns_base_resume(). (1cd9ff5 Azat Khuzhin)
o Fix dns/leak_resume_send_err test. (7e876df Azat Khuzhin)
- o Add checks for evhttp_connection_get_server() in unit tests. (fbc323b Maxime Henrion)
+ o Add checks for evhttp_connection_get_server() in unit
+ tests. (fbc323b Maxime Henrion)
o Fix a (failure-only) null dereference in the unit tests (1104d0b)
o Fix a logic error in test_evbuffer_freeze (7765884)
o Add missing check to test_evbuffer_file_segment_add_cleanup_cb (eba4506)
@@ -38,15 +298,12 @@ Changes in version 2.1.4-beta (?? Dec 2013)
o DNS tests: add a missing check (f314900)
o Finalize tests: add a missing check (82b6956)
o test_evutil_rtrim: add another missing check. (e193c95)
- o regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset (611e28b Azat Khuzhin)
- o regress_http: add tests for evhttp_connection_get_addr() (4dd500c Azat Khuzhin)
-
- Bugfixes (core)
- o If evsel->del() fails, don't leave the evmap in an inconsistent state
- (9b5a527 Maxime Henrion)
- o Move event_debug_note_teardown_ before mm_free. (69b5c64)
- o Check CLOCK_MONOTONIC_* at runtime if needed. (911abf3)
- o Fix reinit of fds with EV_WRITE but not EV_READ. (ebfd8a8 maksqwe)
+ o regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset
+ (611e28b Azat Khuzhin)
+ o regress_http: add tests for evhttp_connection_get_addr() (4dd500c
+ Azat Khuzhin)
+ o Update to the latest version of tinytest (7a80476)
+ o Heap-allocate zlib data structure in regress_zlib tests (4947c18)
Performance tweaks (core)
o Avoid redundant syscall to make a nonblocking socket nonblocking
@@ -54,56 +311,42 @@ Changes in version 2.1.4-beta (?? Dec 2013)
o Avoid redundant syscall if making a socket cloexec twice (1f29b18)
o Avoid redundant invocations of init_extension_functions for IOCP (3b77d62)
- Bugfixes (evhttp)
- o Fix a double close() bug in evhttp when the underlying bufferevent uses
- BEV_OPT_CLOSE_ON_FREE. (31db8a0 Maxime Henrion)
- o Fix an unlikely but possible error case for http connections (f22049e)
- o Avoid racy bufferevent activation (5eb1788 Nate Rosenblum)
-
- Bugfixes on 2.0 (Windows)
- o Use windows vsnprintf fixup logic on all windows environments (e826f19)
- o libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer) (b8f5980 Frank Denis)
-
- Bugfixes (evutil_secure_rng)
- o When we seed from /proc/sys/kernel/random/uuid, count it as success (e35b540)
- o We should return after arc4random_buf() (1ea1f26 Makoto Kato)
- o Avoid other RNG initialization FS reads when urandom file is specified (9695e9c)
- o Really remove RNG seeds from the stack (f5ced88)
- o Fix another arc4random_buf-related warning (e64a2b0)
-
- New APIs (core)
- o Added event_base_get_num_events() (0fa107d Mobai Zhang)
- o Add function to fetch underlying ratelimit cfg (4b3d5af Mark Ellzey)
- o Pass and return const for bufferevent_get_token_bucket_cfg (1c77fbb Mark Ellzey)
-
- New APIs (evhttp)
- o Add evhttp_connection_get_server(). (a7f82a3 Maxime Henrion)
- o add a http default content type option (5a5acd9 Nicolas Martyanoff)
- o http: implement new evhttp_connection_get_addr() api. (0c7f040 Azat Khuzhin)
-
-
Documentation
o Document that arc4random is not a great cryptographic PRNG. (6e49696)
o Small doxygen tweaks (6e67b51)
o Try another doxygen tweak (ccf432b)
-
- New APIs (evutil_secure_rng)
- o Add evutil_secure_rng_set_urandom_device_file (2bbb5d7)
+ o Clarify event_base_loop exit conditions (031a803)
+ o Fix a typo (be7bf2c Ondřej Kuzník)
+ o Document deferred eventcb behaviour (13a9a02 Ondřej Kuzník)
+ o Typo fixes from Linus Nordberg (cec62cb, 8cd695b)
+ o Fix duplicate paragraph in evbuffer_ptr documentation (58408ee)
+
+ Code Improvements (coverity)
+ o Fix a pile of coverity warnings in the unit tests (867f401)
+ o Fix coverity warnings in benchmark tools. (ff7f739)
+ o Whoops; fix compilation in bench.c (544cf88)
+ o Remove spurious checks in evrpc.c error cases (coverity) (991b362)
+ o Fix a couple of compilation warnings in regress_http.c (860767e)
+ o Fix even more coverity warnings. (d240328)
+ o Stop checking for inet_aton; we don't use it. (f665d5c)
+ o Add an include to evrpc-internal to fix openbsd compilation warning
+ (5e161c6)
Cleanups
o Remove an unreachable return statement in minheap-internal.h (e639a9e)
+ o Refactor evmap_{io,signal}_active_() to tolerate bad inputs (974c60e)
+ o Fix needless bufferevent includes in evdns.c (254c04e)
+ o Fix a couple of "#ifdef WIN32" instances (88ecda3)
+ o Remove unneeded declaration in bufferevent-internal.h (4c8ebcd)
Sample code
- o sample/le-proxy: Fail more gracefully if opening listener fails (44b2491)
- o sample: drop uri_root from base_url in http-server. (6171e1c Azat Khuzhin)
-
-
-
-
-
-
-
-
+ o le-proxy: Fail more gracefully if opening listener fails (44b2491)
+ o http-server: drop uri_root from base_url in http-server. (6171e1c Azat Khuzhin)
+ o https-client: POST supported, args supported (c5887f7 Alexey Ozeritsky)
+ o https-client: code cleanup (29af65e Alexey Ozeritsky)
+ o https-client: Small tweaks to https-client.c (90786eb)
+ o https-client: Set hostname for SNI extension (by f69m) (d1976f8)
+ o https-client: add a cast to https-client.c (462e6b6)
@@ -377,6 +620,429 @@ INFRASTRUCTURE (Active-later events):
o Refactor event_persist_closure: raise and extract some common logic
(bec22b4)
o Remove the unused bits from EVLIST_ALL (9889a3d)
+||||||| merged common ancestors
+Changes in version 2.0.22-stable (?? Dec 2013)
+
+ (As of 3b77d62829c4393bda6f9105a5d3b73b48a64b71.)
+
+BUGFIXES (evhttp)
+ o fix #73 and fix http_connection_fail_test to catch it (crash fix) (b618204 Greg Hazel)
+ o Avoid racy bufferevent activation (5eb1788 Nate Rosenblum)
+
+BUGFIXES (compilation and portability)
+ o Fix compilation with WIN32_HAVE_CONDITION_VARIABLES enabled (7e45739)
+ o Fix missing AC_PROG_SED on older Autoconfs (9ab2b3f Tay Ray Chuan)
+ o Backport libevent to vanilla Autoconf 2.59 (as used in RHEL5) (74d4c44 Kevin Bowling)
+ o Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13 compat (817ea36)
+ o Rename configure.in to configure.ac to appease newer autoconfs (0c79787)
+ o Avoid using top_srcdir in TESTS: new automakes do not like this (a55514e)
+ o Use windows vsnprintf fixup logic on all windows environments (e826f19)
+ o Fix a compiler warning when checking for arc4random_buf linker breakage. (5cb3865)
+ o Fix another arc4random_buf-related warning (e64a2b0)
+
+BUGFIXES (resource leaks/lock errors on error)
+ o Avoid leaking fds on evconnlistener with no callback set (69db261)
+ o Avoid double-close on getsockname error in evutil_ersatz_socketpair (0a822a6)
+ o Fix a locking error in bufferevent_socket_get_dns_error. (0a5eb2e)
+ o libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer) (b8f5980 Frank Denis)
+
+BUGFIXES (miscellaneous)
+ o Avoid other RNG initialization FS reads when urandom file is specified (9695e9c, bb52471)
+ o Avoid redundant invocations of init_extension_functions for IOCP (3b77d62)
+
+BUFGIXES (evdns)
+ o Checking request nameserver for NULL, before using it. (5c710c0 Belobrov Andrey)
+ o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (f8d7df8 Azat Khuzhin)
+
+BUGFIXES (evutil_secure_random)
+ o When we seed from /proc/sys/kernel/random/uuid, count it as success (e35b540)
+ o Document that arc4random is not a great cryptographic PRNG. (6e49696)
+ o Add evutil_secure_rng_set_urandom_device_file (2bbb5d7)
+ o Really remove RNG seeds from the stack (f5ced88)
+
+
+DOCUMENTATION FIXES
+ o Fix a mistake in evbuffer_remove() arguments in example http server code (c322c20 Gyepi Sam)
+ o Fix a typo in a comment in buffer.h. Spotted by Alt_F4 (773b0a5)
+
+
+
+Changes in version 2.0.21-stable (18 Nov 2012)
+BUGFIXES:
+ o ssl: Don't discard SSL read event when timeout and read come close together (576b29f)
+ o ssl: Stop looping in "consider_reading" if reading is suspended. (f719b8a Joachim Bauch)
+ o ssl: No need to reserve space if reading is suspended. (1acf2eb Joachim Bauch)
+ o dns: Avoid a memory-leak on OOM in evdns. (73e85dd, f2bff75 George Danchev)
+ o build: Use python2 rather than python (0eb0109 Ross Lagerwall)
+ o build: Compile without warnings on mingw64 (94866c2)
+ o build: Fix compilation on mingw64 with -DUSE_DEBUG (62bd2c4)
+ o build: Make rpcgen_wrapper.sh work on systems without a "python2" binary (f3009e4)
+ o iocp: Close IOCP listener socket on free when LEV_OPT_CLOSE_ON_FREE is set (cb853ea Juan Pablo Fernandez)
+ o core: Avoid crash when event_pending() called with no event_base set on event (e3cccf3)
+ o misc: remove stray 'x' so print_err will compile when uncommented (ac35650 Patrick Pelletier)
+ o tests: Fix renegotiation test to work around openssl 1.0.1 bug (c2f3086)
+ o tests: Warn when openssl version in unit test mismatches compiled version. (ac009f9)
+
+
+Changes in version 2.0.20-stable (23 Aug 2012)
+BUGFIXES:
+ o core: Make event_pending() threadsafe. (be7a95c Simon Liu)
+ o win32: avoid crash when waiting forever on zero fds. (160e58b)
+ o evhttp: Fix a memory leak on error in evhttp_uriencode (11c8b31)
+ o evbuffer: Avoid possible needless call to writev. Found by coverity. (6a4ec5c)
+ o evdns: memset sockaddr_in before using it. Found by coverity. (a1a0e67)
+ o evhttp: Check more setsockopt return values when binding sockets. Found by coverity (a0912e3)
+ o evdns: Avoid segfault on weird timeout during name lookup. (dc32077 Greg Hazel)
+ o bufferevent_ssl: Correctly invoke callbacks when a SSL bufferevent reads some and then blocks. (606ac43)
+
+
+PORTABILITY FIXES:
+ o check for arc4random_buf at runtime, on OS X (bff5f94 Greg Hazel)
+ o Correctly check for arc4random_buf (fcec3e8 Sebastian Hahn)
+ o Add explicit AC_PROG_SED to configure.in so all autoconfs will expose $(SED) (ca80ea6)
+
+BUILD FIXES:
+ o Add GCC annotations so that the vsprintf functions get checked properly (117e327)
+ o Fix an unused variable warning on *BSD. (c0720c1)
+
+UNIT TEST FIXES:
+ o Fix a couple of memory leaks (found with Valgrind). (3b2529a Ross Lagerwall)
+ o Remove deadcode in http regression tests. Found by coverity. (5553346)
+ o Fix possible uninitialized read in dns regression tests. Found by coverity. (2259777)
+ o Set umask before calling mkstemp in unit tests. Found by coverity (f1ce15d)
+ o Fix various check-after-dereference issues in unit tests: found by coverity (4f3732d)
+ o Fix resource leaks in the unit tests; found by coverity (270f279)
+ o Add some missing null checks to unit tests; found by coverity (f021c3d)
+ o Avoid more crashes/bad calls in unit tests; found by coverity (3cde5bf)
+ o Remove unused variable; spotted by coverity (6355b2a)
+ o Add checks to various return values in unit tests. Found by coverity (b9e7329)
+ o Move assignment outside tt_assert in ssl unit tests. Appeases coverity. (a2006c0)
+
+
+
+Changes in version 2.0.19-stable (3 May 2012)
+BUGFIXES (CORE):
+ o Refactor event_persist_closure: raise and extract some common logic (bec22b4)
+ o If time has jumped so we'd reschedule a periodic event in the past, schedule it for the future instead (dfd808c)
+ o If a higher-priority event becomes active, don't continue running events of the current priority. (2bfda40)
+
+BUGFIXES (SSL):
+ o Fixed potential double-readcb execution with openssl bufferevents. (4e62cd1 Mark Ellzey)
+
+BUGFIXES (DNS):
+ o Cancel a probe request when the server is freed, and ignore cancelled probe callbacks (94d2336 Greg Hazel)
+ o Remove redundant DNS_ERR_CANCEL check, move comment (46b8060 Greg Hazel)
+ o When retransmitting a timed-out DNS request, pick a fresh nameserver. (3d9e52a)
+
+DOCUMENTATION FIXES:
+ o Fix a typo in the bufferevent documentation (98e9119)
+ o Add missing ) to changelog; spotted by rransom (4c7ee6b)
+ o Fix the website URL in the readme (f775521)
+
+COMPILATION FIXES:
+ o Fix a compilation error with MSVC 2005 due to use of mode_t (336dcae)
+ o Configure with gcc older than 2.95 (4a6fd43 Sebastian Hahn)
+ o Generate event-config.h with a single sed script (30b6f88 Zack Weinberg)
+
+FORWARD-COMPATIBILITY:
+ o Backport: provide EVENT_LOG_* names, and deprecate _EVENT_LOG_* (d1a03b2)
+
+TESTING/DEBUGGING SUPPORT:
+ o dns-example.c can now take a resolv.conf file on the commandline (6610fa5)
+ o Make some evdns.c debug logs more verbose (d873d67)
+ o Work-around a stupid gcov-breaking bug in OSX 10.6 (b3887cd)
+
+
+
+Changes in version 2.0.18-stable (22 Mar 2012)
+BUGFIXES (core):
+ o Make uses of open() close-on-exec safe by introducing an internal evutil_open_closeonexec. (d2b5f72 Ross Lagerwall, 03dce42)
+
+BUGFIXES (kqueue):
+ o Properly zero the kevent in kq_setup_kevent() (c2c7b39 Sebastian Hahn)
+
+BUILD FIXES:
+ o Added OPENSSL_LDFLAGS env variable which is appended to SSL checks. (9278196 Mark Ellzey)
+ o Changed OPENSSL_LDFLAGS to OPENSSL_LIBADD (2d67b63 Mark Ellzey)
+ o Don't do clang version detection when disabling some flags (083296b Sebastian Hahn)
+
+BUGFIXES (dns):
+ o Stop crashing in evdns when nameserver probes give a weird error (bec5068)
+
+
+Changes in version 2.0.17-stable (10 Feb 2012)
+
+BUGFIXES (core):
+ o Be absolutely sure to clear pncalls before leaving event_signal_closure (11f36a5)
+ o check for sysctl before we use it (358c745 Mike Frysinger)
+ o Remove bogus casts of socket to int before calling ev_callback (f032516)
+ o Make evconnlistener work around bug in older Linux when getting nmapped (ecfc720)
+ o Fix a list corruption bug when using event_reinit() with signals present (6e41cdc)
+ o Fix a fd leak in event_reinit() (3f18ad1)
+ o Do a memberwise comparison of threading function tables (c94a5f2 Nate R)
+ o Use C-style comments in C source files (for compatibility with compilers such as xlc on AIX). (d84d917 Greg Hewgill)
+ o Avoid crash when freeing event_iocp and using event_set_mem_functions (19715a6)
+ o In the kqueue backend, do not report EBADF as an EV_READ (5d7bfa1 Nicholas Marriott)
+
+BUGFIXES (evbuffer and bufferevents):
+ o Fix behavior of evbuffer_peek(buf,-1,NULL,NULL,0) (c986f23 Zack Weinberg)
+ o Loop on filtering SSL reads until we are blocked or exhausted. (5b4b812)
+
+BUGFIXES (evhttp):
+ o Force strict validation of HTTP version in response. (790f6b3 Catalin Patulea)
+
+BUGFIXES (evdns):
+ o evdns: fix a bug in circular-queue implementation (d6094b1)
+
+BUILD FIXES:
+ o Fix a silly compilation error with the sun compiler (1927776 Colin Watt)
+ o Suppress a gcc warning from ignoring fwrite return in http-sample.c (7206e8c)
+
+DOCUMENTATION FIXES:
+ o Slightly clarify evbuffer_peek documentation (7bbf6ca)
+ o Update copyright notices to 2012 (e49e289)
+
+NEW APIS:
+ o Backport evhttp_connection_get_bufferevent to Libevent 2.0 (da70fa7 Arno Bakker)
+
+TESTS AND TEST FIXES:
+ o Fix a race condition in the dns/bufferevent_connect_hostname test. (cba48c7)
+ o Add function to check referential integrity of an event_base (27737d5)
+ o Check event_base correctness at end of each unit test (3312b02)
+ o Workaround in the unit tests for an apparent epoll bug in Linux 3.2 (dab9187)
+ o Better workaround for Linux 3.2 edge-triggered epoll bug (9f9e259)
+
+Changes in version 2.0.16-stable (18 Nov 2011)
+BUGFIXES (core):
+ o More detailed message in case of libevent self-debugging failure. (9e6a4ef Leonid Evdokimov)
+ o epoll: close fd on alloc fail at initialization (1aee718 Jamie Iles)
+ o Fix compile warning from saying event2/*.h inside a comment (447b0ba)
+ o Warn when unable to construct base because of failing make_base_notifiable (4e797f3)
+ o Don't try to make notifiable event_base when no threading fns are configured (e787413)
+
+BUGFIXES (evbuffer):
+ o unit test for remove_buffer bug (90bd620 Greg Hazel)
+ o Fix an evbuffer crash in evbuffer_remove_buffer() (c37069c)
+
+BUGFIXES (bufferevent_openssl):
+ o Refactor amount-to-read calculations in buffervent_ssl consider_reading() (a186e73 Mark Ellzey)
+ o Move SSL rate-limit enforcement into bytes_to_read() (96c562f)
+ o Avoid spinning on OpenSSL reads (2aa036f Mark Ellzey)
+
+BUGFIXES (dns)
+ o Empty DNS reply with OK status is another way to say NODATA. (21a08d6 Leonid Evdokimov)
+
+TESTING:
+ o Tests for 94fba5b and f72e8f6 (d58c15e Leonid Evdokimov)
+ o Test for commit aff6ba1 (f7841bf Leonid Evdokimov)
+ o Style and comment tweaks for dns/leak* tests (5e42202)
+ o improve test to remove at least one buffer from src (7eb52eb Greg Hazel)
+
+DOCUMENTATION:
+ o Add note about evhttp_send_reply_end to its doxygen (724bfb5)
+ o Update copyright dates to 2011. (3c824bd)
+ o Fix typo in whatsnew-2.0.txt (674bc6a Mansour Moufid)
+ o Improve win32 behavior of dns-sample.c code (a3f320e Gisle Vanem)
+
+
+
+Changes in version 2.0.15-stable (12 Oct 2011)
+BUGFIXES (DNS):
+ o DNS: add ttl for negative answers using RFC 2308 idea. (f72e8f6 Leonid Evdokimov)
+ o Add DNS_ERR_NODATA error code to handle empty replies. (94fba5b Leonid Evdokimov)
+
+BUFGIXES (bufferevents and evbuffers):
+ o Make evbuffer callbacks get the right n_added value after evbuffer_add (1ef1f68 Alex)
+ o Prefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work with SSL. (0ba0af9)
+
+BUGFIXES (event loop):
+ o When a signal callback is activated to run multiple times, allow event_base_loopbreak to work even before they all have run. (4e8eb6a)
+
+DOCUMENTATION FIXES:
+ o Fix docstring in dns.h (2b6eae5 Leonid Evdokimov)
+ o refer to non-deprecated evdns functions in comments (ba5c27d Greg Hazel)
+
+BUILD AND TESTING FIXES:
+ o le-proxy and regress depend on openssl directly (9ae061a Sergey Avseyev)
+ o Use _SOURCES, not _sources, in sample/Makefile.am (7f82382)
+ o Fixed compiler warnings for unchecked read/write calls. (c3b62fd Mark Ellzey)
+ o Make write-checking fixes use tt_fail_perror (2b76847)
+ o Fix some "value never used" warnings with gcc 4.6.1 (39c0cf7)
+
+
+
+Changes in version 2.0.14-stable (31 Aug 2011)
+BUGFIXES (bufferevents and evbuffers):
+ o Propagate errors on the underlying bufferevent to the user. (4a34394 Joachim Bauch)
+ o Ignore OpenSSL deprecation warnings on OS X (5d1b255 Sebastian Hahn)
+ o Fix handling of group rate limits under 64 bytes of burst (6d5440e)
+ o Solaris sendfile: correctly detect amount of data sent (643922e Michael Herf)
+ o Make rate limiting work with common_timeout logic (5b18f13)
+ o clear read watermark on underlying bufferevent when creating filtering bev to fix potentially failing fragmented ssl handshakes (54f7e61 Joachim Bauch)
+
+BUGFIXES (IOCP):
+ o IOCP: don't launch reads or writes on an unconnected socket (495c227)
+ o Make IOCP rate-limiting group support stricter and less surprising. (a98da7b)
+ o Have test-ratelim.c support IOCP (0ff2c5a)
+ o Make overlapped reads result in evbuffer callbacks getting invoked (6acfbdd)
+ o Correctly terminate IO on an async bufferevent on bufferevent_free (e6af35d)
+
+BUGFIXES (other):
+ o Fix evsig_dealloc memory leak with debugging turned on. (9b724b2 Leonid Evdokimov)
+ o Fix request_finished memory leak with debugging turned on. (aff6ba1 Leonid Evdokimov)
+
+BUILD AND TESTING FIXES:
+ o Allow OS-neutral builds for platforms where some versions have arc4random_buf (b442302 Mitchell Livingston)
+ o Try to fix 'make distcheck' errors when building out-of-tree (04656ea Dave Hart)
+ o Clean up some problems identified by Coverity. (7c11e51 Harlan Stenn)
+
+
+Changes in version 2.0.13-stable (18 Jul 2011)
+BUGFIXES
+ o Avoid race-condition when initializing global locks (b683cae)
+ o Fix bug in SSL bufferevents backed by a bev with a write high-watermarks (e050703 Joachim Bauch)
+ o Speed up invoke_callbacks on evbuffers when there are no callbacks (f87f568 Mark Ellzey)
+ o Avoid a segfault when all methods are disabled or broken (27ce38b)
+ o Fix incorrect results from evbuffer_search_eol(EOL_LF) (4461f1a)
+ o Add some missing checks for mm_calloc failures (89d5e09)
+ o Replace an assertion for event_base_free(NULL) with a check-and-warn (09fe97d)
+ o Report kqueue ebadf, epipe, and eperm as EV_READ events (1fd34ab)
+ o Check if the `evhttp_new_object' function in `http.c' returns NULL. (446cc7a Mansour Moufid)
+ o Use the correct printf args when formatting size_t (3203f88)
+ o Complain if the caller tries to change threading cbs after setting them (cb6ecee)
+
+DOCUMENTATION FIXES AND IMPROVEMENTS
+ o Revise the event/evbuffer/bufferevent doxygen for clarity and accuracy (2888fac)
+ o Update Doxyfile to produce more useful output (aea0555)
+
+TEST FIXES
+ o Fix up test_evutil_snprintf (caf695a)
+ o Fix tinytest invocation from windows shell (57def34 Ed Day)
+
+BUILD FIXES
+ o Use AM_CPPFLAGS in sample/Makefile.am, not AM_CFLAGS (4a5c82d)
+ o Fix select.c compilation on systems with no NFDBITS (49d1136)
+ o Fix a few warnings on OpenBSD (8ee9f9c Nicholas Marriott)
+ o Don't break when building tests from git without python installed (b031adf)
+ o Don't install event_rpcgen.py when --disable-libevent-install is used (e23cda3 Harlan Stenn)
+ o Fix AIX build issue with TAILQ_FOREACH definition (e934096)
+
+
+Changes in version 2.0.12-stable (4 Jun 2011)
+BUGFIXES
+ o Fix a warn-and-fail bug in kqueue by providing kevent() room to report errors (28317a0)
+ o Fix an assert-inducing fencepost bug in the select backend (d90149d)
+ o Fix failing http assertion introducd in commit 0d6622e (0848814 Kevin Ko)
+ o Fix a bug that prevented us from configuring IPv6 nameservers. (74760f1)
+ o Prevent size_t overflow in evhttp_htmlescape. (06c51cd Mansour Moufid)
+ o Added several checks for under/overflow conditions in evhttp_handle_chunked_read (a279272 Mark Ellzey)
+ o Added overflow checks in evhttp_read_body and evhttp_get_body (84560fc Mark Ellzey)
+
+DOCUMENTATION:
+ o Add missing words to EVLOOP_NONBLOCK documentation (9556a7d)
+
+BUILD FIXES
+ o libssl depends on libcrypto, not the other way around. (274dd03 Peter Rosin)
+ o Libtool brings in the dependencies of libevent_openssl.la automatically (7b819f2 Peter Rosin)
+ o Use OPENSSL_LIBS in Makefile.am (292092e Sebastian Hahn)
+ o Move the win32 detection in configure.in (ceb03b9 Sebastian Hahn)
+ o Correctly detect openssl on windows (6619385 Sebastian Hahn)
+ o Fix a compile warning with zlib 1.2.4 and 1.2.5 (5786b91 Sebastian Hahn)
+ o Fix compilation with GCC 2, which had no __builtin_expect (09d39a1 Dave Hart)
+ o Fix new warnings from GCC 4.6 (06a714f)
+ o Link with -lshell32 and -ladvapi32 on Win32. (86090ee Peter Rosin)
+ o Make the tests build when OpenSSL is not available. (07c41be Peter Rosin)
+ o Bring in the compile script from automake, if needed. (f3c7a4c Peter Rosin)
+ o MSVC does not provide S_ISDIR, so provide it manually. (70be7d1 Peter Rosin)
+ o unistd.h and sys/time.h might not exist. (fe93022 Peter Rosin)
+ o Make sure TINYTEST_LOCAL is defined when building tinytest.c (8fa030c Peter Rosin)
+ o Fix winsock2.h #include issues with MSVC (3d768dc Peter Rosin)
+ o Use evutil_gettimeofday instead of relying on the system gettimeofday. (0de87fe Peter Rosin)
+ o Always use evutil_snprintf, even if OS provides it (d1b2d11 Sebastian Hahn)
+ o InitializeCriticalSectionAndSpinCount requires _WIN32_WINNT >= 0x0403. (816115a Peter Rosin)
+ o cygwin: make it possible to build DLLs (d54d3fc)
+
+
+
+Changes in version 2.0.11-stable (27 Apr 2011)
+ [Autogenerated from the Git log, sorted and cleaned by hand.]
+BUGFIXES:
+ o Fix evport handling of POLLHUP and POLLERR (b42ce4b)
+ o Fix compilation on Windows with NDEBUG (cb8059d)
+ o Check for POLLERR, POLLHUP and POLLNVAL for Solaris event ports (0144886 Trond Norbye)
+ o Detect and handle more allocation failures. (666b096 Jardel Weyrich)
+ o Use event_err() only if the failure is truly unrecoverable. (3f8d22a Jardel Weyrich)
+ o Handle resize failures in the select backend better. (83e805a)
+ o Correctly free selectop fields when select_resize fails in select_init (0c0ec0b)
+ o Make --enable-gcc-warnings a no-op if not using gcc (3267703)
+ o Fix a type error in our (unused) arc4random_stir() (f736198)
+ o Correctly detect and stop non-chunked http requests when the body is too long (63a715e)
+ o Have event_base_gettimeofday_cached() always return wall-clock time (a459ef7)
+ o Workaround for http crash bug 3078187 (5dc5662 Tomash Brechko)
+ o Fix incorrect assertions and possible use-after-free in evrpc_free() (4b8f02f Christophe Fillot)
+ o Reset outgoing http connection when read data in idle state. (272823f Tomash Brechko)
+ o Fix subtle recursion in evhttp_connection_cb_cleanup(). (218cf19 Tomash Brechko)
+ o Fix the case when failed evhttp_make_request() leaved request in the queue. (0d6622e Tomash Brechko)
+ o Fix a crash bug in evdns server circular list code (00e91b3)
+ o Handle calloc failure in evdns. (Found by Dave Hart) (364291e)
+ o Fix a memory leak on win32 socket->event map. (b4f89f0)
+ o Add a forgotten NULL check to evhttp_parse_headers (12311ff Sebastian Hahn)
+ o Fix possible NULL-deref in evdns_cancel_request (5208544 Sebastian Hahn)
+
+PORTABILITY:
+ o Fall back to sscanf if we have no other way to implement strtoll (453317b)
+ o Build correctly on platforms without sockaddr_storage (9184563)
+ o Try to build correctly on platforms with no IPv6 support (713c254)
+ o Build on systems without AI_PASSIVE (cb92113)
+ o Fix http unit test on non-windows platforms without getaddrinfo (6092f12)
+ o Do not check for gethostbyname_r versions if we have getaddrinfo (c1260b0)
+ o Include arpa/inet.h as needed on HPUX (10c834c Harlan Stenn)
+ o Include util-internal.h as needed to build on platforms with no sockaddr_storage (bbf5515 Harlan Stenn)
+ o Check for getservbyname even if not on win32. (af08a94 Harlan Stenn)
+ o Add -D_OSF_SOURCE to fix hpux builds (0b33479 Harlan Stenn)
+ o Check for allocation failures in apply_socktype_protocol_hack (637d17a)
+ o Fix the check for multicast or broadcast addresses in evutil_check_interfaces (1a21d7b)
+ o Avoid a free(NULL) if out-of-memory in evdns_getaddrinfo. Found by Dave Hart (3417f68)
+
+DEFENSIVE PROGRAMMING:
+ o Add compile-time check for AF_UNSPEC==PF_UNSPEC (3c8f4e7)
+
+BUGS IN TESTS:
+ o Fix test.sh output on solaris (b4f89b6 Dave Hart)
+ o Make test-eof fail with a timeout if we never get an eof. (05a2c22 Harlan Stenn)
+ o Use %s with printf in test.sh (039b9bd)
+ o Add an assert to appease clang's static analyzer (b0ff7eb Sebastian Hahn)
+ o Add a forgotten return value check in the unit tests (3819b62 Sebastian Hahn)
+ o Actually send NULL request in http_bad_request_test (b693c32 Sebastian Hahn)
+ o add some (void) casts for unused variables (65707d7 Sebastian Hahn)
+ o Refactor test_getaddrinfo_async_cancel_stress() (48c44a6 Sebastian Hahn)
+ o Be nice and "handle" error return values in sample code (4bac793 Sebastian Hahn)
+ o Check return value of evbuffer_add_cb in tests (93a1abb Sebastian Hahn)
+ o Remote some dead code from dns-example.c (744c745 Sebastian Hahn)
+ o Zero a struct sockaddr_in before using it (646f9fe Sebastian Hahn)
+
+BUILD FIXES:
+ o Fix warnings about AC_LANG_PROGRAM usage (f663112 Sebastian Hahn)
+ o Skip check for zlib if we have no zlib.h (a317c06 Harlan Stenn)
+ o Fix autoconf bracket issues; make check for getaddrinfo include netdb.h (833e5e9 Harlan Stenn)
+ o Correct an AM_CFLAGS to an AM_CPPFLAGS in test/Makefile.am (9c469db Dave Hart)
+ o Fix make distcheck & installation of libevent 1 headers (b5a1f9f Dave Hart)
+ o Fix compilation under LLVM/clang with --enable-gcc-warnings (ad9ff58 Sebastian Hahn)
+
+FEATURES:
+ o Make URI parser able to tolerate nonconformant URIs. (95060b5)
+
+DOCUMENTATION:
+ o Clarify event_set_mem_functions doc (926f816)
+ o Correct evhttp_del_accept_socket documentation on whether socket is closed (f665924)
+ o fix spelling mistake in whatsnew-2.0.txt (deb2f73)
+ o Fix sample/http-server ipv6 fixes (eb692be)
+ o Comment internal headers used in sample code. (4eb281c)
+ o Be explicit about how long event loops run in event.h documentation (f95bafb)
+ o Add comment to configure.in to explain gc-sections test logic (c621359)
+ o Fix a couple of memory leaks in samples/http-server.c. Found by Dave Hart. (2e9f665)
+
+
BUILD IMPROVEMENTS:
Libevent 2.1.2-alpha modernizes Libevent's use of autotools, and makes
diff --git a/sntp/libevent/Makefile.am b/sntp/libevent/Makefile.am
index 58f1f01..3053cc0 100644
--- a/sntp/libevent/Makefile.am
+++ b/sntp/libevent/Makefile.am
@@ -38,7 +38,7 @@ RELEASE = -release 2.1
#
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
# UNLESS YOU REALLY REALLY HAVE TO.
-VERSION_INFO = 3:0:0
+VERSION_INFO = 5:0:0
# History: RELEASE VERSION_INFO
# 2.0.1-alpha -- 2.0 1:0:0
@@ -67,6 +67,8 @@ VERSION_INFO = 3:0:0
# 2.1.1-alpha -- 2.1 1:0:0
# 2.1.2-alpha -- 2.1 1:0:0 (should have been 2:0:1)
# 2.1.3-alpha -- 2.1 3:0:0 (ABI changed slightly)
+# 2.1.4-alpha -- 2.1 4:0:0 (ABI changed slightly)
+# 2.1.5-beta -- 2.1 5:0:0 (ABI changed slightly)
# ABI version history for this package effectively restarts every time
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
diff --git a/sntp/libevent/Makefile.in b/sntp/libevent/Makefile.in
index 463ae8c..4caff8f 100644
--- a/sntp/libevent/Makefile.in
+++ b/sntp/libevent/Makefile.in
@@ -66,15 +66,14 @@ host_triplet = @host@
@PTHREADS_TRUE@am__append_2 = libevent_pthreads.pc
@OPENSSL_TRUE@am__append_3 = libevent_openssl.la
@OPENSSL_TRUE@am__append_4 = libevent_openssl.pc
-noinst_PROGRAMS = $(am__EXEEXT_3) $(am__EXEEXT_5)
+noinst_PROGRAMS = $(am__EXEEXT_4) $(am__EXEEXT_6)
EXTRA_PROGRAMS = $(am__EXEEXT_1)
-DIST_COMMON = README $(am__configure_deps) \
- $(am__dist_bin_SCRIPTS_DIST) $(am__include_HEADERS_DIST) \
- $(am__include_event2_HEADERS_DIST) $(am__noinst_HEADERS_DIST) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.h.in $(srcdir)/evconfig-private.h.in \
- $(srcdir)/include/include.am $(srcdir)/libevent.pc.in \
- $(srcdir)/libevent_openssl.pc.in \
+DIST_COMMON = $(am__configure_deps) $(am__dist_bin_SCRIPTS_DIST) \
+ $(am__include_HEADERS_DIST) $(am__include_event2_HEADERS_DIST) \
+ $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(srcdir)/evconfig-private.h.in $(srcdir)/include/include.am \
+ $(srcdir)/libevent.pc.in $(srcdir)/libevent_openssl.pc.in \
$(srcdir)/libevent_pthreads.pc.in $(srcdir)/sample/include.am \
$(srcdir)/test/include.am $(top_srcdir)/configure ChangeLog \
build-aux/compile build-aux/config.guess build-aux/config.sub \
@@ -86,33 +85,33 @@ DIST_COMMON = README $(am__configure_deps) \
@OPENSSL_TRUE@ sample/hostcheck.h \
@OPENSSL_TRUE@ sample/openssl_hostname_validation.h
-@BUILD_REGRESS_TRUE@am__append_8 = $(TESTPROGRAMS)
-@BUILD_REGRESS_TRUE@am__append_9 = test/regress
-@BUILD_REGRESS_TRUE@am__append_10 = test/regress.gen.c test/regress.gen.h
-@PTHREADS_TRUE@am__append_11 = libevent_pthreads.la
-@BUILD_WIN32_TRUE@am__append_12 = test/regress_iocp.c
-@OPENSSL_TRUE@am__append_13 = test/regress_ssl.c
-@OPENSSL_TRUE@am__append_14 = $(OPENSSL_INCS)
-@OPENSSL_TRUE@am__append_15 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
-@STRLCPY_IMPL_TRUE@am__append_16 = strlcpy.c
-@SELECT_BACKEND_TRUE@am__append_17 = select.c
-@POLL_BACKEND_TRUE@am__append_18 = poll.c
-@DEVPOLL_BACKEND_TRUE@am__append_19 = devpoll.c
-@KQUEUE_BACKEND_TRUE@am__append_20 = kqueue.c
-@EPOLL_BACKEND_TRUE@am__append_21 = epoll.c
-@EVPORT_BACKEND_TRUE@am__append_22 = evport.c
-@SIGNAL_SUPPORT_TRUE@am__append_23 = signal.c
-@INSTALL_LIBEVENT_FALSE@am__append_24 = $(EVENT1_HDRS)
+@BUILD_SAMPLES_TRUE@am__append_8 = $(SAMPLES)
+@BUILD_REGRESS_TRUE@am__append_9 = $(TESTPROGRAMS)
+@BUILD_REGRESS_TRUE@am__append_10 = test/regress
+@BUILD_REGRESS_TRUE@am__append_11 = test/regress.gen.c test/regress.gen.h
+@PTHREADS_TRUE@am__append_12 = libevent_pthreads.la
+@BUILD_WIN32_TRUE@am__append_13 = test/regress_iocp.c
+@OPENSSL_TRUE@am__append_14 = test/regress_ssl.c
+@OPENSSL_TRUE@am__append_15 = $(OPENSSL_INCS)
+@OPENSSL_TRUE@am__append_16 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
+@STRLCPY_IMPL_TRUE@am__append_17 = strlcpy.c
+@SELECT_BACKEND_TRUE@am__append_18 = select.c
+@POLL_BACKEND_TRUE@am__append_19 = poll.c
+@DEVPOLL_BACKEND_TRUE@am__append_20 = devpoll.c
+@KQUEUE_BACKEND_TRUE@am__append_21 = kqueue.c
+@EPOLL_BACKEND_TRUE@am__append_22 = epoll.c
+@EVPORT_BACKEND_TRUE@am__append_23 = evport.c
+@SIGNAL_SUPPORT_TRUE@am__append_24 = signal.c
+@INSTALL_LIBEVENT_FALSE@am__append_25 = $(EVENT1_HDRS)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_backport_259_ssizet.m4 \
+ $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/libevent_openssl.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_pkg_config.m4 \
- $(top_srcdir)/m4/openldap-thread-check.m4 \
- $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ntp_pkg_config.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -250,14 +249,15 @@ am__EXEEXT_3 = sample/dns-example$(EXEEXT) \
sample/event-read-fifo$(EXEEXT) sample/hello-world$(EXEEXT) \
sample/http-server$(EXEEXT) sample/signal-test$(EXEEXT) \
sample/time-test$(EXEEXT) $(am__EXEEXT_2)
-am__EXEEXT_4 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
+@BUILD_SAMPLES_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3)
+am__EXEEXT_5 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
test/bench_http$(EXEEXT) test/bench_httpclient$(EXEEXT) \
test/test-changelist$(EXEEXT) test/test-dumpevents$(EXEEXT) \
test/test-eof$(EXEEXT) test/test-closed$(EXEEXT) \
test/test-fdleak$(EXEEXT) test/test-init$(EXEEXT) \
test/test-ratelim$(EXEEXT) test/test-time$(EXEEXT) \
test/test-weof$(EXEEXT) test/regress$(EXEEXT)
-@BUILD_REGRESS_TRUE@am__EXEEXT_5 = $(am__EXEEXT_4)
+@BUILD_REGRESS_TRUE@am__EXEEXT_6 = $(am__EXEEXT_5)
PROGRAMS = $(noinst_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am_sample_dns_example_OBJECTS = sample/dns-example.$(OBJEXT)
@@ -343,7 +343,7 @@ am_test_regress_OBJECTS = test/test_regress-regress.$(OBJEXT) \
test/test_regress-tinytest.$(OBJEXT) $(am__objects_12) \
$(am__objects_13) $(am__objects_14) $(am__objects_15)
test_regress_OBJECTS = $(am_test_regress_OBJECTS)
-am__DEPENDENCIES_3 = $(am__append_11)
+am__DEPENDENCIES_3 = $(am__append_12)
@OPENSSL_TRUE@am__DEPENDENCIES_4 = libevent_openssl.la \
@OPENSSL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
test_regress_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la \
@@ -568,8 +568,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_11)
+PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_12)
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -584,6 +585,7 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -663,7 +665,7 @@ RELEASE = -release 2.1
#
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
# UNLESS YOU REALLY REALLY HAVE TO.
-VERSION_INFO = 3:0:0
+VERSION_INFO = 5:0:0
# History: RELEASE VERSION_INFO
# 2.0.1-alpha -- 2.0 1:0:0
@@ -692,6 +694,8 @@ VERSION_INFO = 3:0:0
# 2.1.1-alpha -- 2.1 1:0:0
# 2.1.2-alpha -- 2.1 1:0:0 (should have been 2:0:1)
# 2.1.3-alpha -- 2.1 3:0:0 (ABI changed slightly)
+# 2.1.4-alpha -- 2.1 4:0:0 (ABI changed slightly)
+# 2.1.5-beta -- 2.1 5:0:0 (ABI changed slightly)
# ABI version history for this package effectively restarts every time
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
@@ -744,12 +748,12 @@ noinst_HEADERS = $(am__append_5) $(am__append_7) test/regress.h \
iocp-internal.h ipv6-internal.h kqueue-internal.h \
log-internal.h minheap-internal.h mm-internal.h \
ratelim-internal.h ratelim-internal.h strlcpy-internal.h \
- time-internal.h util-internal.h $(am__append_24)
+ time-internal.h util-internal.h $(am__append_25)
CLEANFILES = test/rpcgen-attempted
DISTCLEANFILES = test/test-script.sh test/regress.gen.c \
test/regress.gen.h *~ libevent.pc \
./include/event2/event-config.h
-BUILT_SOURCES = $(am__append_10) include/event2/event-config.h
+BUILT_SOURCES = $(am__append_11) include/event2/event-config.h
include_event2dir = $(includedir)/event2
EVENT2_EXPORT = \
include/event2/buffer.h \
@@ -853,14 +857,14 @@ test_regress_SOURCES = test/regress.c test/regress.gen.c \
test/regress_minheap.c test/regress_rpc.c \
test/regress_testutils.c test/regress_testutils.h \
test/regress_util.c test/tinytest.c $(regress_thread_SOURCES) \
- $(regress_zlib_SOURCES) $(am__append_12) $(am__append_13)
+ $(regress_zlib_SOURCES) $(am__append_13) $(am__append_14)
@BUILD_WIN32_TRUE@regress_thread_SOURCES = test/regress_thread.c
@PTHREADS_TRUE@regress_thread_SOURCES = test/regress_thread.c
@ZLIB_REGRESS_TRUE@regress_zlib_SOURCES = test/regress_zlib.c
test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la \
- $(PTHREAD_LIBS) $(ZLIB_LIBS) $(am__append_15)
+ $(PTHREAD_LIBS) $(ZLIB_LIBS) $(am__append_16)
test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) \
- $(ZLIB_CFLAGS) -Itest $(am__append_14)
+ $(ZLIB_CFLAGS) -Itest $(am__append_15)
test_regress_LDFLAGS = $(PTHREAD_CFLAGS)
test_bench_SOURCES = test/bench.c
test_bench_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
@@ -872,17 +876,17 @@ test_bench_httpclient_SOURCES = test/bench_httpclient.c
test_bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la
@BUILD_WIN32_FALSE@SYS_LIBS =
@BUILD_WIN32_TRUE@SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
-@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_16) $(am__append_17) \
-@BUILD_WIN32_FALSE@ $(am__append_18) $(am__append_19) \
-@BUILD_WIN32_FALSE@ $(am__append_20) $(am__append_21) \
-@BUILD_WIN32_FALSE@ $(am__append_22) $(am__append_23)
+@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_17) $(am__append_18) \
+@BUILD_WIN32_FALSE@ $(am__append_19) $(am__append_20) \
+@BUILD_WIN32_FALSE@ $(am__append_21) $(am__append_22) \
+@BUILD_WIN32_FALSE@ $(am__append_23) $(am__append_24)
@BUILD_WIN32_TRUE@SYS_SRC = win32select.c evthread_win32.c \
@BUILD_WIN32_TRUE@ buffer_iocp.c event_iocp.c \
-@BUILD_WIN32_TRUE@ bufferevent_async.c $(am__append_16) \
-@BUILD_WIN32_TRUE@ $(am__append_17) $(am__append_18) \
-@BUILD_WIN32_TRUE@ $(am__append_19) $(am__append_20) \
-@BUILD_WIN32_TRUE@ $(am__append_21) $(am__append_22) \
-@BUILD_WIN32_TRUE@ $(am__append_23)
+@BUILD_WIN32_TRUE@ bufferevent_async.c $(am__append_17) \
+@BUILD_WIN32_TRUE@ $(am__append_18) $(am__append_19) \
+@BUILD_WIN32_TRUE@ $(am__append_20) $(am__append_21) \
+@BUILD_WIN32_TRUE@ $(am__append_22) $(am__append_23) \
+@BUILD_WIN32_TRUE@ $(am__append_24)
@BUILD_WIN32_FALSE@SYS_INCLUDES =
@BUILD_WIN32_TRUE@SYS_INCLUDES = -IWIN32-Code -IWIN32-Code/nmake
CORE_SRC = \
diff --git a/sntp/libevent/README b/sntp/libevent/README
deleted file mode 100644
index 2723a2c..0000000
--- a/sntp/libevent/README
+++ /dev/null
@@ -1,218 +0,0 @@
-0. BUILDING AND INSTALLATION (Briefly)
-
-$ ./configure
-$ make
-$ make verify # (optional)
-$ sudo make install
-
-1. BUILDING AND INSTALLATION (In Depth)
-
-To build libevent, type
-
-$ ./configure && make
-
- (If you got libevent from the git repository, you will
- first need to run the included "autogen.sh" script in order to
- generate the configure script.)
-
-You can run the regression tests by running
-
-$ make verify
-
-Install as root via
-
-# make install
-
-Before reporting any problems, please run the regression tests.
-
-To enable the low-level tracing build the library as:
-
- CFLAGS=-DUSE_DEBUG ./configure [...]
-
-Standard configure flags should work. In particular, see:
-
- --disable-shared Only build static libraries
- --prefix Install all files relative to this directory.
-
-
-The configure script also supports the following flags:
-
- --enable-gcc-warnings Enable extra compiler checking with GCC.
- --disable-malloc-replacement
- Don't let applications replace our memory
- management functions
- --disable-openssl Disable support for OpenSSL encryption.
- --disable-thread-support Don't support multithreaded environments.
-
-2. USEFUL LINKS:
-
-For the latest released version of Libevent, see the official website at
-http://libevent.org/ .
-
-There's a pretty good work-in-progress manual up at
- http://www.wangafu.net/~nickm/libevent-book/ .
-
-For the latest development versions of Libevent, access our Git repository
-via
- "git clone git://levent.git.sourceforge.net/gitroot/levent/libevent"
-
-You can browse the git repository online at
-http://levent.git.sourceforge.net/git/gitweb-index.cgi .
-
-To report bugs, request features, or submit patches to Libevent,
-use the Sourceforge trackers at
-https://sourceforge.net/tracker/?group_id=50884 .
-
-There's also a libevent-users mailing list for talking about Libevent
-use and development: http://archives.seul.org/libevent/users/
-
-3. ACKNOWLEDGMENTS
-
-The following people have helped with suggestions, ideas, code or
-fixing bugs:
-
- Samy Al Bahra
- Jacob Appelbaum
- Arno Bakker
- Weston Andros Adamson
- William Ahern
- Ivan Andropov
- Sergey Avseyev
- Avi Bab
- Joachim Bauch
- Gilad Benjamini
- Stas Bekman
- Denis Bilenko
- Julien Blache
- Kevin Bowling
- Tomash Brechko
- Kelly Brock
- Ralph Castain
- Adrian Chadd
- Lawnstein Chan
- Shuo Chen
- Ka-Hing Cheung
- Andrew Cox
- Paul Croome
- George Danchev
- Andrew Danforth
- Ed Day
- Christopher Davis
- Mike Davis
- Antony Dovgal
- Mihai Draghicioiu
- Alexander Drozdov
- Mark Ellzey
- Shie Erlich
- Leonid Evdokimov
- Juan Pablo Fernandez
- Christophe Fillot
- Mike Frysinger
- Remi Gacogne
- Artem Germanov
- Alexander von Gernler
- Artur Grabowski
- Diwaker Gupta
- Sebastian Hahn
- Dave Hart
- Greg Hazel
- Michael Herf
- Sebastian Hahn
- Savg He
- Mark Heily
- Michael Herf
- Greg Hewgill
- Andrew Hochhaus
- Aaron Hopkins
- Tani Hosokawa
- Jamie Iles
- Claudio Jeker
- Evan Jones
- George Kadianakis
- Phua Keat
- Azat Khuzhin
- Alexander Klauer
- Kevin Ko
- Brian Koehmstedt
- Marko Kreen
- Valery Kyholodov
- Ross Lagerwall
- Scott Lamb
- Christopher Layne
- Adam Langley
- Graham Leggett
- Philip Lewis
- Zhou Li
- David Libenzi
- Yan Lin
- Moshe Litvin
- Simon Liu
- Mitchell Livingston
- Hagne Mahre
- Lubomir Marinov
- Abilio Marques
- Abel Mathew
- Nick Mathewson
- James Mansion
- Nicholas Marriott
- Andrey Matveev
- Caitlin Mercer
- Dagobert Michelsen
- Andrea Montefusco
- Mansour Moufid
- Mina Naguib
- Felix Nawothnig
- Trond Norbye
- Linus Nordberg
- Richard Nyberg
- Jon Oberheide
- Phil Oleson
- Dave Pacheco
- Derrick Pallas
- Tassilo von Parseval
- Catalin Patulea
- Patrick Pelletier
- Simon Perreault
- Pierre Phaneuf
- Amarin Phaosawasdi
- Ryan Phillips
- Dimitre Piskyulev
- Pavel Plesov
- Jon Poland
- Roman Puls
- Nate R
- Robert Ransom
- Bert JW Regeer
- Peter Rosin
- Maseeb Abdul Qadir
- Wang Qin
- Alex S
- Hanna Schroeter
- Ralf Schmitt
- Mike Smellie
- Kevin Springborn
- Nir Soffer
- Harlan Stenn
- Steve Snyder
- Dug Song
- Dongsheng Song
- Hannes Sowa
- Ferenc Szalai
- Brodie Thiesfield
- Jason Toffaletti
- Gisle Vanem
- Bas Verhoeven
- Constantine Verutin
- Colin Watt
- Zack Weinberg
- Jardel Weyrich
- Jay R. Wren
- Zack Weinberg
- Alejo
- Alex
- Taral
- propanbutan
- mmadia
- yangacer
-
-If we have forgotten your name, please contact us.
diff --git a/sntp/libevent/WIN32-Code/nmake/event2/event-config.h b/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
index da55028..8cbf190 100644
--- a/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
+++ b/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
@@ -274,7 +274,7 @@
/* #undef EVENT__HAVE_WORKING_KQUEUE */
/* Numeric representation of the version */
-#define EVENT__NUMERIC_VERSION 0x02010301
+#define EVENT__NUMERIC_VERSION 0x02010500
/* Name of package */
#define EVENT__PACKAGE "libevent"
@@ -331,7 +331,7 @@
#define EVENT__TIME_WITH_SYS_TIME 1
/* Version number of package */
-#define EVENT__VERSION "2.1.3-alpha-dev"
+#define EVENT__VERSION "2.1.5-beta"
/* Define to appropriate substitue if compiler doesnt have __func__ */
#define EVENT____func__ __FUNCTION__
diff --git a/sntp/libevent/WIN32-Code/tree.h b/sntp/libevent/WIN32-Code/tree.h
index 585618d..2ccfbf2 100644
--- a/sntp/libevent/WIN32-Code/tree.h
+++ b/sntp/libevent/WIN32-Code/tree.h
@@ -675,680 +675,3 @@ name##_RB_MINMAX(struct name *head, int val) \
(x) = name##_RB_NEXT(x))
#endif /* _SYS_TREE_H_ */
-/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
-/*
- * Copyright 2002 Niels Provos <provos@citi.umich.edu>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SYS_TREE_H_
-#define _SYS_TREE_H_
-
-/*
- * This file defines data structures for different types of trees:
- * splay trees and red-black trees.
- *
- * A splay tree is a self-organizing data structure. Every operation
- * on the tree causes a splay to happen. The splay moves the requested
- * node to the root of the tree and partly rebalances it.
- *
- * This has the benefit that request locality causes faster lookups as
- * the requested nodes move to the top of the tree. On the other hand,
- * every lookup causes memory writes.
- *
- * The Balance Theorem bounds the total access time for m operations
- * and n inserts on an initially empty tree as O((m + n)lg n). The
- * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
- *
- * A red-black tree is a binary search tree with the node color as an
- * extra attribute. It fulfills a set of conditions:
- * - every search path from the root to a leaf consists of the
- * same number of black nodes,
- * - each red node (except for the root) has a black parent,
- * - each leaf node is black.
- *
- * Every operation on a red-black tree is bounded as O(lg n).
- * The maximum height of a red-black tree is 2lg (n+1).
- */
-
-#define SPLAY_HEAD(name, type) \
-struct name { \
- struct type *sph_root; /* root of the tree */ \
-}
-
-#define SPLAY_INITIALIZER(root) \
- { NULL }
-
-#define SPLAY_INIT(root) do { \
- (root)->sph_root = NULL; \
-} while (0)
-
-#define SPLAY_ENTRY(type) \
-struct { \
- struct type *spe_left; /* left element */ \
- struct type *spe_right; /* right element */ \
-}
-
-#define SPLAY_LEFT(elm, field) (elm)->field.spe_left
-#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right
-#define SPLAY_ROOT(head) (head)->sph_root
-#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL)
-
-/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
-#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
- (head)->sph_root = tmp; \
-} while (0)
-
-#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
- (head)->sph_root = tmp; \
-} while (0)
-
-#define SPLAY_LINKLEFT(head, tmp, field) do { \
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
- tmp = (head)->sph_root; \
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
-} while (0)
-
-#define SPLAY_LINKRIGHT(head, tmp, field) do { \
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
- tmp = (head)->sph_root; \
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
-} while (0)
-
-#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \
- SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
- SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
-} while (0)
-
-/* Generates prototypes and inline functions */
-
-#define SPLAY_PROTOTYPE(name, type, field, cmp) \
-void name##_SPLAY(struct name *, struct type *); \
-void name##_SPLAY_MINMAX(struct name *, int); \
-struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
-struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
- \
-/* Finds the node with the same key as elm */ \
-static __inline struct type * \
-name##_SPLAY_FIND(struct name *head, struct type *elm) \
-{ \
- if (SPLAY_EMPTY(head)) \
- return(NULL); \
- name##_SPLAY(head, elm); \
- if ((cmp)(elm, (head)->sph_root) == 0) \
- return (head->sph_root); \
- return (NULL); \
-} \
- \
-static __inline struct type * \
-name##_SPLAY_NEXT(struct name *head, struct type *elm) \
-{ \
- name##_SPLAY(head, elm); \
- if (SPLAY_RIGHT(elm, field) != NULL) { \
- elm = SPLAY_RIGHT(elm, field); \
- while (SPLAY_LEFT(elm, field) != NULL) { \
- elm = SPLAY_LEFT(elm, field); \
- } \
- } else \
- elm = NULL; \
- return (elm); \
-} \
- \
-static __inline struct type * \
-name##_SPLAY_MIN_MAX(struct name *head, int val) \
-{ \
- name##_SPLAY_MINMAX(head, val); \
- return (SPLAY_ROOT(head)); \
-}
-
-/* Main splay operation.
- * Moves node close to the key of elm to top
- */
-#define SPLAY_GENERATE(name, type, field, cmp) \
-struct type * \
-name##_SPLAY_INSERT(struct name *head, struct type *elm) \
-{ \
- if (SPLAY_EMPTY(head)) { \
- SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \
- } else { \
- int __comp; \
- name##_SPLAY(head, elm); \
- __comp = (cmp)(elm, (head)->sph_root); \
- if(__comp < 0) { \
- SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
- SPLAY_RIGHT(elm, field) = (head)->sph_root; \
- SPLAY_LEFT((head)->sph_root, field) = NULL; \
- } else if (__comp > 0) { \
- SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
- SPLAY_LEFT(elm, field) = (head)->sph_root; \
- SPLAY_RIGHT((head)->sph_root, field) = NULL; \
- } else \
- return ((head)->sph_root); \
- } \
- (head)->sph_root = (elm); \
- return (NULL); \
-} \
- \
-struct type * \
-name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
-{ \
- struct type *__tmp; \
- if (SPLAY_EMPTY(head)) \
- return (NULL); \
- name##_SPLAY(head, elm); \
- if ((cmp)(elm, (head)->sph_root) == 0) { \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
- } else { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
- name##_SPLAY(head, elm); \
- SPLAY_RIGHT((head)->sph_root, field) = __tmp; \
- } \
- return (elm); \
- } \
- return (NULL); \
-} \
- \
-void \
-name##_SPLAY(struct name *head, struct type *elm) \
-{ \
- struct type __node, *__left, *__right, *__tmp; \
- int __comp; \
-\
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
- __left = __right = &__node; \
-\
- while ((__comp = (cmp)(elm, (head)->sph_root))) { \
- if (__comp < 0) { \
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if ((cmp)(elm, __tmp) < 0){ \
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKLEFT(head, __right, field); \
- } else if (__comp > 0) { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if ((cmp)(elm, __tmp) > 0){ \
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKRIGHT(head, __left, field); \
- } \
- } \
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
-} \
- \
-/* Splay with either the minimum or the maximum element \
- * Used to find minimum or maximum element in tree. \
- */ \
-void name##_SPLAY_MINMAX(struct name *head, int __comp) \
-{ \
- struct type __node, *__left, *__right, *__tmp; \
-\
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
- __left = __right = &__node; \
-\
- while (1) { \
- if (__comp < 0) { \
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if (__comp < 0){ \
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKLEFT(head, __right, field); \
- } else if (__comp > 0) { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if (__comp > 0) { \
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKRIGHT(head, __left, field); \
- } \
- } \
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
-}
-
-#define SPLAY_NEGINF -1
-#define SPLAY_INF 1
-
-#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
-#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
-#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
-#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
-#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
- : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
-#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
- : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
-
-#define SPLAY_FOREACH(x, name, head) \
- for ((x) = SPLAY_MIN(name, head); \
- (x) != NULL; \
- (x) = SPLAY_NEXT(name, head, x))
-
-/* Macros that define a red-back tree */
-#define RB_HEAD(name, type) \
-struct name { \
- struct type *rbh_root; /* root of the tree */ \
-}
-
-#define RB_INITIALIZER(root) \
- { NULL }
-
-#define RB_INIT(root) do { \
- (root)->rbh_root = NULL; \
-} while (0)
-
-#define RB_BLACK 0
-#define RB_RED 1
-#define RB_ENTRY(type) \
-struct { \
- struct type *rbe_left; /* left element */ \
- struct type *rbe_right; /* right element */ \
- struct type *rbe_parent; /* parent element */ \
- int rbe_color; /* node color */ \
-}
-
-#define RB_LEFT(elm, field) (elm)->field.rbe_left
-#define RB_RIGHT(elm, field) (elm)->field.rbe_right
-#define RB_PARENT(elm, field) (elm)->field.rbe_parent
-#define RB_COLOR(elm, field) (elm)->field.rbe_color
-#define RB_ROOT(head) (head)->rbh_root
-#define RB_EMPTY(head) (RB_ROOT(head) == NULL)
-
-#define RB_SET(elm, parent, field) do { \
- RB_PARENT(elm, field) = parent; \
- RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \
- RB_COLOR(elm, field) = RB_RED; \
-} while (0)
-
-#define RB_SET_BLACKRED(black, red, field) do { \
- RB_COLOR(black, field) = RB_BLACK; \
- RB_COLOR(red, field) = RB_RED; \
-} while (0)
-
-#ifndef RB_AUGMENT
-#define RB_AUGMENT(x)
-#endif
-
-#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \
- (tmp) = RB_RIGHT(elm, field); \
- if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) { \
- RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \
- } \
- RB_AUGMENT(elm); \
- if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \
- if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
- RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
- else \
- RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
- } else \
- (head)->rbh_root = (tmp); \
- RB_LEFT(tmp, field) = (elm); \
- RB_PARENT(elm, field) = (tmp); \
- RB_AUGMENT(tmp); \
- if ((RB_PARENT(tmp, field))) \
- RB_AUGMENT(RB_PARENT(tmp, field)); \
-} while (0)
-
-#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \
- (tmp) = RB_LEFT(elm, field); \
- if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) { \
- RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \
- } \
- RB_AUGMENT(elm); \
- if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \
- if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
- RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
- else \
- RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
- } else \
- (head)->rbh_root = (tmp); \
- RB_RIGHT(tmp, field) = (elm); \
- RB_PARENT(elm, field) = (tmp); \
- RB_AUGMENT(tmp); \
- if ((RB_PARENT(tmp, field))) \
- RB_AUGMENT(RB_PARENT(tmp, field)); \
-} while (0)
-
-/* Generates prototypes and inline functions */
-#define RB_PROTOTYPE(name, type, field, cmp) \
-void name##_RB_INSERT_COLOR(struct name *, struct type *); \
-void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
-struct type *name##_RB_REMOVE(struct name *, struct type *); \
-struct type *name##_RB_INSERT(struct name *, struct type *); \
-struct type *name##_RB_FIND(struct name *, struct type *); \
-struct type *name##_RB_NEXT(struct type *); \
-struct type *name##_RB_MINMAX(struct name *, int); \
- \
-
-/* Main rb operation.
- * Moves node close to the key of elm to top
- */
-#define RB_GENERATE(name, type, field, cmp) \
-void \
-name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
-{ \
- struct type *parent, *gparent, *tmp; \
- while ((parent = RB_PARENT(elm, field)) && \
- RB_COLOR(parent, field) == RB_RED) { \
- gparent = RB_PARENT(parent, field); \
- if (parent == RB_LEFT(gparent, field)) { \
- tmp = RB_RIGHT(gparent, field); \
- if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
- RB_COLOR(tmp, field) = RB_BLACK; \
- RB_SET_BLACKRED(parent, gparent, field);\
- elm = gparent; \
- continue; \
- } \
- if (RB_RIGHT(parent, field) == elm) { \
- RB_ROTATE_LEFT(head, parent, tmp, field);\
- tmp = parent; \
- parent = elm; \
- elm = tmp; \
- } \
- RB_SET_BLACKRED(parent, gparent, field); \
- RB_ROTATE_RIGHT(head, gparent, tmp, field); \
- } else { \
- tmp = RB_LEFT(gparent, field); \
- if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
- RB_COLOR(tmp, field) = RB_BLACK; \
- RB_SET_BLACKRED(parent, gparent, field);\
- elm = gparent; \
- continue; \
- } \
- if (RB_LEFT(parent, field) == elm) { \
- RB_ROTATE_RIGHT(head, parent, tmp, field);\
- tmp = parent; \
- parent = elm; \
- elm = tmp; \
- } \
- RB_SET_BLACKRED(parent, gparent, field); \
- RB_ROTATE_LEFT(head, gparent, tmp, field); \
- } \
- } \
- RB_COLOR(head->rbh_root, field) = RB_BLACK; \
-} \
- \
-void \
-name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
-{ \
- struct type *tmp; \
- while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \
- elm != RB_ROOT(head)) { \
- if (RB_LEFT(parent, field) == elm) { \
- tmp = RB_RIGHT(parent, field); \
- if (RB_COLOR(tmp, field) == RB_RED) { \
- RB_SET_BLACKRED(tmp, parent, field); \
- RB_ROTATE_LEFT(head, parent, tmp, field);\
- tmp = RB_RIGHT(parent, field); \
- } \
- if ((RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
- (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
- RB_COLOR(tmp, field) = RB_RED; \
- elm = parent; \
- parent = RB_PARENT(elm, field); \
- } else { \
- if (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
- struct type *oleft; \
- if ((oleft = RB_LEFT(tmp, field)))\
- RB_COLOR(oleft, field) = RB_BLACK;\
- RB_COLOR(tmp, field) = RB_RED; \
- RB_ROTATE_RIGHT(head, tmp, oleft, field);\
- tmp = RB_RIGHT(parent, field); \
- } \
- RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
- RB_COLOR(parent, field) = RB_BLACK; \
- if (RB_RIGHT(tmp, field)) \
- RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
- RB_ROTATE_LEFT(head, parent, tmp, field);\
- elm = RB_ROOT(head); \
- break; \
- } \
- } else { \
- tmp = RB_LEFT(parent, field); \
- if (RB_COLOR(tmp, field) == RB_RED) { \
- RB_SET_BLACKRED(tmp, parent, field); \
- RB_ROTATE_RIGHT(head, parent, tmp, field);\
- tmp = RB_LEFT(parent, field); \
- } \
- if ((RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
- (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
- RB_COLOR(tmp, field) = RB_RED; \
- elm = parent; \
- parent = RB_PARENT(elm, field); \
- } else { \
- if (RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
- struct type *oright; \
- if ((oright = RB_RIGHT(tmp, field)))\
- RB_COLOR(oright, field) = RB_BLACK;\
- RB_COLOR(tmp, field) = RB_RED; \
- RB_ROTATE_LEFT(head, tmp, oright, field);\
- tmp = RB_LEFT(parent, field); \
- } \
- RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
- RB_COLOR(parent, field) = RB_BLACK; \
- if (RB_LEFT(tmp, field)) \
- RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
- RB_ROTATE_RIGHT(head, parent, tmp, field);\
- elm = RB_ROOT(head); \
- break; \
- } \
- } \
- } \
- if (elm) \
- RB_COLOR(elm, field) = RB_BLACK; \
-} \
- \
-struct type * \
-name##_RB_REMOVE(struct name *head, struct type *elm) \
-{ \
- struct type *child, *parent, *old = elm; \
- int color; \
- if (RB_LEFT(elm, field) == NULL) \
- child = RB_RIGHT(elm, field); \
- else if (RB_RIGHT(elm, field) == NULL) \
- child = RB_LEFT(elm, field); \
- else { \
- struct type *left; \
- elm = RB_RIGHT(elm, field); \
- while ((left = RB_LEFT(elm, field))) \
- elm = left; \
- child = RB_RIGHT(elm, field); \
- parent = RB_PARENT(elm, field); \
- color = RB_COLOR(elm, field); \
- if (child) \
- RB_PARENT(child, field) = parent; \
- if (parent) { \
- if (RB_LEFT(parent, field) == elm) \
- RB_LEFT(parent, field) = child; \
- else \
- RB_RIGHT(parent, field) = child; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = child; \
- if (RB_PARENT(elm, field) == old) \
- parent = elm; \
- (elm)->field = (old)->field; \
- if (RB_PARENT(old, field)) { \
- if (RB_LEFT(RB_PARENT(old, field), field) == old)\
- RB_LEFT(RB_PARENT(old, field), field) = elm;\
- else \
- RB_RIGHT(RB_PARENT(old, field), field) = elm;\
- RB_AUGMENT(RB_PARENT(old, field)); \
- } else \
- RB_ROOT(head) = elm; \
- RB_PARENT(RB_LEFT(old, field), field) = elm; \
- if (RB_RIGHT(old, field)) \
- RB_PARENT(RB_RIGHT(old, field), field) = elm; \
- if (parent) { \
- left = parent; \
- do { \
- RB_AUGMENT(left); \
- } while ((left = RB_PARENT(left, field))); \
- } \
- goto color; \
- } \
- parent = RB_PARENT(elm, field); \
- color = RB_COLOR(elm, field); \
- if (child) \
- RB_PARENT(child, field) = parent; \
- if (parent) { \
- if (RB_LEFT(parent, field) == elm) \
- RB_LEFT(parent, field) = child; \
- else \
- RB_RIGHT(parent, field) = child; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = child; \
-color: \
- if (color == RB_BLACK) \
- name##_RB_REMOVE_COLOR(head, parent, child); \
- return (old); \
-} \
- \
-/* Inserts a node into the RB tree */ \
-struct type * \
-name##_RB_INSERT(struct name *head, struct type *elm) \
-{ \
- struct type *tmp; \
- struct type *parent = NULL; \
- int comp = 0; \
- tmp = RB_ROOT(head); \
- while (tmp) { \
- parent = tmp; \
- comp = (cmp)(elm, parent); \
- if (comp < 0) \
- tmp = RB_LEFT(tmp, field); \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- RB_SET(elm, parent, field); \
- if (parent != NULL) { \
- if (comp < 0) \
- RB_LEFT(parent, field) = elm; \
- else \
- RB_RIGHT(parent, field) = elm; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = elm; \
- name##_RB_INSERT_COLOR(head, elm); \
- return (NULL); \
-} \
- \
-/* Finds the node with the same key as elm */ \
-struct type * \
-name##_RB_FIND(struct name *head, struct type *elm) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- int comp; \
- while (tmp) { \
- comp = cmp(elm, tmp); \
- if (comp < 0) \
- tmp = RB_LEFT(tmp, field); \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- return (NULL); \
-} \
- \
-struct type * \
-name##_RB_NEXT(struct type *elm) \
-{ \
- if (RB_RIGHT(elm, field)) { \
- elm = RB_RIGHT(elm, field); \
- while (RB_LEFT(elm, field)) \
- elm = RB_LEFT(elm, field); \
- } else { \
- if (RB_PARENT(elm, field) && \
- (elm == RB_LEFT(RB_PARENT(elm, field), field))) \
- elm = RB_PARENT(elm, field); \
- else { \
- while (RB_PARENT(elm, field) && \
- (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
- elm = RB_PARENT(elm, field); \
- elm = RB_PARENT(elm, field); \
- } \
- } \
- return (elm); \
-} \
- \
-struct type * \
-name##_RB_MINMAX(struct name *head, int val) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- struct type *parent = NULL; \
- while (tmp) { \
- parent = tmp; \
- if (val < 0) \
- tmp = RB_LEFT(tmp, field); \
- else \
- tmp = RB_RIGHT(tmp, field); \
- } \
- return (parent); \
-}
-
-#define RB_NEGINF -1
-#define RB_INF 1
-
-#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
-#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
-#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
-#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
-#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
-#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
-
-#define RB_FOREACH(x, name, head) \
- for ((x) = RB_MIN(name, head); \
- (x) != NULL; \
- (x) = name##_RB_NEXT(x))
-
-#endif /* _SYS_TREE_H_ */
diff --git a/sntp/libevent/aclocal.m4 b/sntp/libevent/aclocal.m4
index 3bba486..4c1c849 100644
--- a/sntp/libevent/aclocal.m4
+++ b/sntp/libevent/aclocal.m4
@@ -1131,6 +1131,7 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/ac_backport_259_ssizet.m4])
+m4_include([m4/acx_pthread.m4])
m4_include([m4/libevent_openssl.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
@@ -1138,5 +1139,3 @@ m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
m4_include([m4/ntp_pkg_config.m4])
-m4_include([m4/openldap-thread-check.m4])
-m4_include([m4/openldap.m4])
diff --git a/sntp/libevent/buffer.c b/sntp/libevent/buffer.c
index e603be8..a1a2b98 100644
--- a/sntp/libevent/buffer.c
+++ b/sntp/libevent/buffer.c
@@ -158,12 +158,20 @@ evbuffer_chain_new(size_t size)
struct evbuffer_chain *chain;
size_t to_alloc;
+ if (size > EVBUFFER_CHAIN_MAX - EVBUFFER_CHAIN_SIZE)
+ return (NULL);
+
size += EVBUFFER_CHAIN_SIZE;
/* get the next largest memory that can hold the buffer */
- to_alloc = MIN_BUFFER_SIZE;
- while (to_alloc < size)
- to_alloc <<= 1;
+ if (size < EVBUFFER_CHAIN_MAX / 2) {
+ to_alloc = MIN_BUFFER_SIZE;
+ while (to_alloc < size) {
+ to_alloc <<= 1;
+ }
+ } else {
+ to_alloc = size;
+ }
/* we get everything in one chunk */
if ((chain = mm_malloc(to_alloc)) == NULL)
@@ -1133,6 +1141,7 @@ evbuffer_drain(struct evbuffer *buf, size_t len)
}
buf->first = chain;
+ EVUTIL_ASSERT(chain && remaining <= chain->off);
chain->misalign += remaining;
chain->off -= remaining;
}
@@ -1181,6 +1190,10 @@ evbuffer_copyout_from(struct evbuffer *buf, const struct evbuffer_ptr *pos,
EVBUFFER_LOCK(buf);
if (pos) {
+ if (datlen > (size_t)(EV_SSIZE_MAX - pos->pos)) {
+ result = -1;
+ goto done;
+ }
chain = pos->internal_.chain;
pos_in_chain = pos->internal_.pos_in_chain;
if (datlen + pos->pos > buf->total_len)
@@ -1218,6 +1231,8 @@ evbuffer_copyout_from(struct evbuffer *buf, const struct evbuffer_ptr *pos,
if (datlen) {
EVUTIL_ASSERT(chain);
+ EVUTIL_ASSERT(datlen+pos_in_chain <= chain->off);
+
memcpy(data, chain->buffer + chain->misalign + pos_in_chain,
datlen);
}
@@ -1712,6 +1727,10 @@ evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen)
if (buf->freeze_end) {
goto done;
}
+ /* Prevent buf->total_len overflow */
+ if (datlen > EV_SIZE_MAX - buf->total_len) {
+ goto done;
+ }
chain = buf->last;
@@ -1725,7 +1744,10 @@ evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen)
}
if ((chain->flags & EVBUFFER_IMMUTABLE) == 0) {
- remain = (size_t)(chain->buffer_len - chain->misalign - chain->off);
+ /* Always true for mutable buffers */
+ EVUTIL_ASSERT(chain->misalign >= 0 &&
+ (ev_uint64_t)chain->misalign <= EVBUFFER_CHAIN_MAX);
+ remain = chain->buffer_len - (size_t)chain->misalign - chain->off;
if (remain >= datlen) {
/* there's enough space to hold all the data in the
* current last chain */
@@ -1796,6 +1818,9 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
if (buf->freeze_start) {
goto done;
}
+ if (datlen > EV_SIZE_MAX - buf->total_len) {
+ goto done;
+ }
chain = buf->first;
@@ -1808,6 +1833,10 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
/* we cannot touch immutable buffers */
if ((chain->flags & EVBUFFER_IMMUTABLE) == 0) {
+ /* Always true for mutable buffers */
+ EVUTIL_ASSERT(chain->misalign >= 0 &&
+ (ev_uint64_t)chain->misalign <= EVBUFFER_CHAIN_MAX);
+
/* If this chain is empty, we can treat it as
* 'empty at the beginning' rather than 'empty at the end' */
if (chain->off == 0)
@@ -1845,6 +1874,7 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
tmp->next = chain;
tmp->off = datlen;
+ EVUTIL_ASSERT(datlen <= tmp->buffer_len);
tmp->misalign = tmp->buffer_len - datlen;
memcpy(tmp->buffer + tmp->misalign, data, datlen);
@@ -1943,7 +1973,9 @@ evbuffer_expand_singlechain(struct evbuffer *buf, size_t datlen)
/* Would expanding this chunk be affordable and worthwhile? */
if (CHAIN_SPACE_LEN(chain) < chain->buffer_len / 8 ||
- chain->off > MAX_TO_COPY_IN_EXPAND) {
+ chain->off > MAX_TO_COPY_IN_EXPAND ||
+ (datlen < EVBUFFER_CHAIN_MAX &&
+ EVBUFFER_CHAIN_MAX - datlen >= chain->off)) {
/* It's not worth resizing this chain. Can the next one be
* used? */
if (chain->next && CHAIN_SPACE_LEN(chain->next) >= datlen) {
@@ -2071,6 +2103,8 @@ evbuffer_expand_fast_(struct evbuffer *buf, size_t datlen, int n)
rmv_all = 1;
avail = 0;
} else {
+ /* can't overflow, since only mutable chains have
+ * huge misaligns. */
avail = (size_t) CHAIN_SPACE_LEN(chain);
chain = chain->next;
}
@@ -2081,6 +2115,7 @@ evbuffer_expand_fast_(struct evbuffer *buf, size_t datlen, int n)
EVUTIL_ASSERT(chain->off == 0);
evbuffer_chain_free(chain);
}
+ EVUTIL_ASSERT(datlen >= avail);
tmp = evbuffer_chain_new(datlen - avail);
if (tmp == NULL) {
if (rmv_all) {
@@ -2210,6 +2245,7 @@ get_n_bytes_readable_on_socket(evutil_socket_t fd)
unsigned long lng = EVBUFFER_MAX_READ;
if (ioctlsocket(fd, FIONREAD, &lng) < 0)
return -1;
+ /* Can overflow, but mostly harmlessly. XXXX */
return (int)lng;
#elif defined(FIONREAD)
int n = EVBUFFER_MAX_READ;
@@ -2322,8 +2358,14 @@ evbuffer_read(struct evbuffer *buf, evutil_socket_t fd, int howmuch)
#ifdef USE_IOVEC_IMPL
remaining = n;
for (i=0; i < nvecs; ++i) {
- ev_ssize_t space = (ev_ssize_t) CHAIN_SPACE_LEN(*chainp);
- if (space < remaining) {
+ /* can't overflow, since only mutable chains have
+ * huge misaligns. */
+ size_t space = (size_t) CHAIN_SPACE_LEN(*chainp);
+ /* XXXX This is a kludge that can waste space in perverse
+ * situations. */
+ if (space > EVBUFFER_CHAIN_MAX)
+ space = EVBUFFER_CHAIN_MAX;
+ if ((ev_ssize_t)space < remaining) {
(*chainp)->off += space;
remaining -= (int)space;
} else {
@@ -2485,9 +2527,11 @@ evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd,
/* XXX(nickm) Don't disable this code until we know if
* the WSARecv code above works. */
void *p = evbuffer_pullup(buffer, howmuch);
+ EVUTIL_ASSERT(p || !howmuch);
n = send(fd, p, howmuch, 0);
#else
void *p = evbuffer_pullup(buffer, howmuch);
+ EVUTIL_ASSERT(p || !howmuch);
n = write(fd, p, howmuch);
#endif
#ifdef USE_SENDFILE
@@ -2538,6 +2582,8 @@ static int
evbuffer_ptr_subtract(struct evbuffer *buf, struct evbuffer_ptr *pos,
size_t howfar)
{
+ if (pos->pos < 0)
+ return -1;
if (howfar > (size_t)pos->pos)
return -1;
if (pos->internal_.chain && howfar <= pos->internal_.pos_in_chain) {
@@ -2571,12 +2617,17 @@ evbuffer_ptr_set(struct evbuffer *buf, struct evbuffer_ptr *pos,
case EVBUFFER_PTR_ADD:
/* this avoids iterating over all previous chains if
we just want to advance the position */
+ if (pos->pos < 0 || EV_SIZE_MAX - position < (size_t)pos->pos) {
+ EVBUFFER_UNLOCK(buf);
+ return -1;
+ }
chain = pos->internal_.chain;
pos->pos += position;
position = pos->internal_.pos_in_chain;
break;
}
+ EVUTIL_ASSERT(EV_SIZE_MAX - left >= position);
while (chain && position + left >= chain->off) {
left -= chain->off - position;
chain = chain->next;
@@ -2613,7 +2664,9 @@ evbuffer_ptr_memcmp(const struct evbuffer *buf, const struct evbuffer_ptr *pos,
ASSERT_EVBUFFER_LOCKED(buf);
- if (pos->pos + len > buf->total_len)
+ if (pos->pos < 0 ||
+ EV_SIZE_MAX - len < (size_t)pos->pos ||
+ pos->pos + len > buf->total_len)
return -1;
chain = pos->internal_.chain;
@@ -2740,7 +2793,10 @@ evbuffer_peek(struct evbuffer *buffer, ev_ssize_t len,
if (n_vec == 0 && len < 0) {
/* If no vectors are provided and they asked for "everything",
* pretend they asked for the actual available amount. */
- len = buffer->total_len - len_so_far;
+ len = buffer->total_len;
+ if (start_at) {
+ len -= start_at->pos;
+ }
}
while (chain) {
@@ -2804,6 +2860,9 @@ evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap)
if (sz < 0)
goto done;
+ if (INT_MAX >= EVBUFFER_CHAIN_MAX &&
+ (size_t)sz >= EVBUFFER_CHAIN_MAX)
+ goto done;
if ((size_t)sz < space) {
chain->off += sz;
buf->total_len += sz;
@@ -2913,6 +2972,11 @@ evbuffer_file_segment_new(
}
seg->length = length;
+ if (offset < 0 || length < 0 ||
+ ((ev_uint64_t)length > EVBUFFER_CHAIN_MAX) ||
+ (ev_uint64_t)offset > (ev_uint64_t)(EVBUFFER_CHAIN_MAX - length))
+ goto err;
+
#if defined(USE_SENDFILE)
if (!(flags & EVBUF_FS_DISABLE_SENDFILE)) {
seg->can_sendfile = 1;
@@ -3201,7 +3265,7 @@ evbuffer_add_file_segment(struct evbuffer *buf,
return 0;
err:
EVBUFFER_UNLOCK(buf);
- evbuffer_file_segment_free(seg);
+ evbuffer_file_segment_free(seg); /* Lowers the refcount */
return -1;
}
diff --git a/sntp/libevent/bufferevent.c b/sntp/libevent/bufferevent.c
index 588461a..d298d0b 100644
--- a/sntp/libevent/bufferevent.c
+++ b/sntp/libevent/bufferevent.c
@@ -599,7 +599,7 @@ bufferevent_setwatermark(struct bufferevent *bufev, short events,
bufev_private->read_watermarks_cb,
EVBUFFER_CB_ENABLED|EVBUFFER_CB_NODEFER);
- if (evbuffer_get_length(bufev->input) > highmark)
+ if (evbuffer_get_length(bufev->input) >= highmark)
bufferevent_wm_suspend_read(bufev);
else if (evbuffer_get_length(bufev->input) < highmark)
bufferevent_wm_unsuspend_read(bufev);
@@ -615,25 +615,30 @@ bufferevent_setwatermark(struct bufferevent *bufev, short events,
BEV_UNLOCK(bufev);
}
-void
+int
bufferevent_getwatermark(struct bufferevent *bufev, short events,
size_t *lowmark, size_t *highmark)
{
- BEV_LOCK(bufev);
if (events == EV_WRITE) {
+ BEV_LOCK(bufev);
if (lowmark)
*lowmark = bufev->wm_write.low;
if (highmark)
*highmark = bufev->wm_write.high;
+ BEV_UNLOCK(bufev);
+ return 0;
}
if (events == EV_READ) {
+ BEV_LOCK(bufev);
if (lowmark)
*lowmark = bufev->wm_read.low;
if (highmark)
*highmark = bufev->wm_read.high;
+ BEV_UNLOCK(bufev);
+ return 0;
}
- BEV_UNLOCK(bufev);
+ return -1;
}
int
diff --git a/sntp/libevent/bufferevent_async.c b/sntp/libevent/bufferevent_async.c
index 137ad24..6395e57 100644
--- a/sntp/libevent/bufferevent_async.c
+++ b/sntp/libevent/bufferevent_async.c
@@ -381,9 +381,10 @@ be_async_destruct(struct bufferevent *bev)
bev_async_del_write(bev_async);
fd = evbuffer_overlapped_get_fd_(bev->input);
- if (bev_p->options & BEV_OPT_CLOSE_ON_FREE) {
- /* XXXX possible double-close */
+ if (fd != (evutil_socket_t)INVALID_SOCKET &&
+ (bev_p->options & BEV_OPT_CLOSE_ON_FREE)) {
evutil_closesocket(fd);
+ evbuffer_overlapped_set_fd_(bev->input, INVALID_SOCKET);
}
}
@@ -564,9 +565,9 @@ bufferevent_async_new_(struct event_base *base,
event_overlapped_init_(&bev_a->read_overlapped, read_complete);
event_overlapped_init_(&bev_a->write_overlapped, write_complete);
+ bufferevent_init_generic_timeout_cbs_(bev);
+
bev_a->ok = fd >= 0;
- if (bev_a->ok)
- bufferevent_init_generic_timeout_cbs_(bev);
return bev;
err:
@@ -671,6 +672,7 @@ be_async_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
if (fd != (evutil_socket_t)INVALID_SOCKET &&
(bev_a->bev.options & BEV_OPT_CLOSE_ON_FREE)) {
closesocket(fd);
+ evbuffer_overlapped_set_fd_(bev->input, INVALID_SOCKET);
}
bev_a->ok = 0;
return 0;
diff --git a/sntp/libevent/bufferevent_filter.c b/sntp/libevent/bufferevent_filter.c
index af71ebe..4d9be43 100644
--- a/sntp/libevent/bufferevent_filter.c
+++ b/sntp/libevent/bufferevent_filter.c
@@ -425,26 +425,34 @@ be_filter_readcb(struct bufferevent *underlying, void *me_)
enum bufferevent_filter_result res;
enum bufferevent_flush_mode state;
struct bufferevent *bufev = downcast(bevf);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
int processed_any = 0;
- bufferevent_incref_and_lock_(bufev);
+ BEV_LOCK(bufev);
- if (bevf->got_eof)
- state = BEV_FINISHED;
- else
- state = BEV_NORMAL;
+ // It's possible our refcount is 0 at this point if another thread free'd our filterevent
+ EVUTIL_ASSERT(bufev_private->refcnt >= 0);
- /* XXXX use return value */
- res = be_filter_process_input(bevf, state, &processed_any);
- (void)res;
+ // If our refcount is > 0
+ if (bufev_private->refcnt > 0) {
- /* XXX This should be in process_input, not here. There are
- * other places that can call process-input, and they should
- * force readcb calls as needed. */
- if (processed_any)
- bufferevent_trigger_nolock_(bufev, EV_READ, 0);
+ if (bevf->got_eof)
+ state = BEV_FINISHED;
+ else
+ state = BEV_NORMAL;
- bufferevent_decref_and_unlock_(bufev);
+ /* XXXX use return value */
+ res = be_filter_process_input(bevf, state, &processed_any);
+ (void)res;
+
+ /* XXX This should be in process_input, not here. There are
+ * other places that can call process-input, and they should
+ * force readcb calls as needed. */
+ if (processed_any)
+ bufferevent_trigger_nolock_(bufev, EV_READ, 0);
+ }
+
+ BEV_UNLOCK(bufev);
}
/* Called when the underlying socket has drained enough that we can write to
@@ -454,11 +462,20 @@ be_filter_writecb(struct bufferevent *underlying, void *me_)
{
struct bufferevent_filtered *bevf = me_;
struct bufferevent *bev = downcast(bevf);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bev);
int processed_any = 0;
- bufferevent_incref_and_lock_(bev);
- be_filter_process_output(bevf, BEV_NORMAL, &processed_any);
- bufferevent_decref_and_unlock_(bev);
+ BEV_LOCK(bev);
+
+ // It's possible our refcount is 0 at this point if another thread free'd our filterevent
+ EVUTIL_ASSERT(bufev_private->refcnt >= 0);
+
+ // If our refcount is > 0
+ if (bufev_private->refcnt > 0) {
+ be_filter_process_output(bevf, BEV_NORMAL, &processed_any);
+ }
+
+ BEV_UNLOCK(bev);
}
/* Called when the underlying socket has given us an error */
@@ -467,11 +484,21 @@ be_filter_eventcb(struct bufferevent *underlying, short what, void *me_)
{
struct bufferevent_filtered *bevf = me_;
struct bufferevent *bev = downcast(bevf);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bev);
+
+ BEV_LOCK(bev);
+
+ // It's possible our refcount is 0 at this point if another thread free'd our filterevent
+ EVUTIL_ASSERT(bufev_private->refcnt >= 0);
+
+ // If our refcount is > 0
+ if (bufev_private->refcnt > 0) {
+
+ /* All we can really to is tell our own eventcb. */
+ bufferevent_run_eventcb_(bev, what, 0);
+ }
- bufferevent_incref_and_lock_(bev);
- /* All we can really to is tell our own eventcb. */
- bufferevent_run_eventcb_(bev, what, 0);
- bufferevent_decref_and_unlock_(bev);
+ BEV_UNLOCK(bev);
}
static int
diff --git a/sntp/libevent/bufferevent_openssl.c b/sntp/libevent/bufferevent_openssl.c
index 423b34f..b30f90f 100644
--- a/sntp/libevent/bufferevent_openssl.c
+++ b/sntp/libevent/bufferevent_openssl.c
@@ -1276,6 +1276,8 @@ be_openssl_ctrl(struct bufferevent *bev,
SSL_set_bio(bev_ssl->ssl, bio, bio);
bev_ssl->fd_is_set = 1;
}
+ if (data->fd == -1)
+ bev_ssl->fd_is_set = 0;
if (bev_ssl->state == BUFFEREVENT_SSL_OPEN)
return set_open_callbacks(bev_ssl, data->fd);
else {
diff --git a/sntp/libevent/bufferevent_pair.c b/sntp/libevent/bufferevent_pair.c
index 4340f23..8154e17 100644
--- a/sntp/libevent/bufferevent_pair.c
+++ b/sntp/libevent/bufferevent_pair.c
@@ -45,6 +45,8 @@
struct bufferevent_pair {
struct bufferevent_private bev;
struct bufferevent_pair *partner;
+ /* For ->destruct() lock checking */
+ struct bufferevent_pair *unlinked_partner;
};
@@ -265,11 +267,40 @@ be_pair_unlink(struct bufferevent *bev)
struct bufferevent_pair *bev_p = upcast(bev);
if (bev_p->partner) {
+ bev_p->unlinked_partner = bev_p->partner;
bev_p->partner->partner = NULL;
bev_p->partner = NULL;
}
}
+/* Free *shared* lock in the latest be (since we share it between two of them). */
+static void
+be_pair_destruct(struct bufferevent *bev)
+{
+ struct bufferevent_pair *bev_p = upcast(bev);
+
+ /* Transfer ownership of the lock into partner, otherwise we will use
+ * already free'd lock during freeing second bev, see next example:
+ *
+ * bev1->own_lock = 1
+ * bev2->own_lock = 0
+ * bev2->lock = bev1->lock
+ *
+ * bufferevent_free(bev1) # refcnt == 0 -> unlink
+ * bufferevent_free(bev2) # refcnt == 0 -> unlink
+ *
+ * event_base_free() -> finilizers -> EVTHREAD_FREE_LOCK(bev1->lock)
+ * -> BEV_LOCK(bev2->lock) <-- already freed
+ *
+ * Where bev1 == pair[0], bev2 == pair[1].
+ */
+ if (bev_p->unlinked_partner && bev_p->bev.own_lock) {
+ bev_p->unlinked_partner->bev.own_lock = 1;
+ bev_p->bev.own_lock = 0;
+ }
+ bev_p->unlinked_partner = NULL;
+}
+
static int
be_pair_flush(struct bufferevent *bev, short iotype,
enum bufferevent_flush_mode mode)
@@ -320,7 +351,7 @@ const struct bufferevent_ops bufferevent_ops_pair = {
be_pair_enable,
be_pair_disable,
be_pair_unlink,
- NULL, /* be_pair_destruct, */
+ be_pair_destruct,
bufferevent_generic_adj_timeouts_,
be_pair_flush,
NULL, /* ctrl */
diff --git a/sntp/libevent/config.h.in b/sntp/libevent/config.h.in
index 7446676..946b11a 100644
--- a/sntp/libevent/config.h.in
+++ b/sntp/libevent/config.h.in
@@ -24,9 +24,6 @@
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
-/* Define to 1 if you have the <cthreads.h> header file. */
-#undef HAVE_CTHREADS_H
-
/* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you
don't. */
#undef HAVE_DECL_CTL_KERN
@@ -109,9 +106,6 @@
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
-/* if you have GNU Pth */
-#undef HAVE_GNU_PTH
-
/* Define to 1 if you have the <ifaddrs.h> header file. */
#undef HAVE_IFADDRS_H
@@ -133,24 +127,9 @@
/* Define if the system has zlib */
#undef HAVE_LIBZ
-/* if you have LinuxThreads */
-#undef HAVE_LINUX_THREADS
-
-/* if you have SunOS LWP package */
-#undef HAVE_LWP
-
-/* Define to 1 if you have the <lwp/lwp.h> header file. */
-#undef HAVE_LWP_LWP_H
-
/* Define to 1 if you have the `mach_absolute_time' function. */
#undef HAVE_MACH_ABSOLUTE_TIME
-/* define if you have Mach Cthreads */
-#undef HAVE_MACH_CTHREADS
-
-/* Define to 1 if you have the <mach/cthreads.h> header file. */
-#undef HAVE_MACH_CTHREADS_H
-
/* Define to 1 if you have the <mach/mach_time.h> header file. */
#undef HAVE_MACH_MACH_TIME_H
@@ -175,15 +154,6 @@
/* Define to 1 if you have the <netinet/tcp.h> header file. */
#undef HAVE_NETINET_TCP_H
-/* if you have NT Event Log */
-#undef HAVE_NT_EVENT_LOG
-
-/* if you have NT Service Manager */
-#undef HAVE_NT_SERVICE_MANAGER
-
-/* if you have NT Threads */
-#undef HAVE_NT_THREADS
-
/* Define if the system has openssl */
#undef HAVE_OPENSSL
@@ -208,48 +178,15 @@
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
-/* define to pthreads API spec revision */
+/* Define if we have pthreads on this system */
#undef HAVE_PTHREADS
-/* define if you have pthread_detach function */
-#undef HAVE_PTHREAD_DETACH
-
-/* Define to 1 if you have the `pthread_getconcurrency' function. */
-#undef HAVE_PTHREAD_GETCONCURRENCY
-
-/* Define to 1 if you have the <pthread.h> header file. */
-#undef HAVE_PTHREAD_H
-
-/* Define to 1 if you have the `pthread_kill' function. */
-#undef HAVE_PTHREAD_KILL
-
-/* Define to 1 if you have the `pthread_kill_other_threads_np' function. */
-#undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP
-
-/* define if you have pthread_rwlock_destroy function */
-#undef HAVE_PTHREAD_RWLOCK_DESTROY
-
-/* Define to 1 if you have the `pthread_setconcurrency' function. */
-#undef HAVE_PTHREAD_SETCONCURRENCY
-
-/* Define to 1 if you have the `pthread_yield' function. */
-#undef HAVE_PTHREAD_YIELD
-
-/* Define to 1 if you have the <pth.h> header file. */
-#undef HAVE_PTH_H
-
/* Define to 1 if you have the `putenv' function. */
#undef HAVE_PUTENV
/* Define to 1 if the system has the type `sa_family_t'. */
#undef HAVE_SA_FAMILY_T
-/* Define to 1 if you have the <sched.h> header file. */
-#undef HAVE_SCHED_H
-
-/* Define to 1 if you have the `sched_yield' function. */
-#undef HAVE_SCHED_YIELD
-
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
@@ -337,9 +274,6 @@
/* Define to 1 if the system has the type `struct so_linger'. */
#undef HAVE_STRUCT_SO_LINGER
-/* Define to 1 if you have the <synch.h> header file. */
-#undef HAVE_SYNCH_H
-
/* Define to 1 if you have the `sysctl' function. */
#undef HAVE_SYSCTL
@@ -403,21 +337,6 @@
/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
#undef HAVE_TAILQFOREACH
-/* if you have Solaris LWP (thr) package */
-#undef HAVE_THR
-
-/* Define to 1 if you have the <thread.h> header file. */
-#undef HAVE_THREAD_H
-
-/* Define to 1 if you have the `thr_getconcurrency' function. */
-#undef HAVE_THR_GETCONCURRENCY
-
-/* Define to 1 if you have the `thr_setconcurrency' function. */
-#undef HAVE_THR_SETCONCURRENCY
-
-/* Define to 1 if you have the `thr_yield' function. */
-#undef HAVE_THR_YIELD
-
/* Define if timeradd is defined in <sys/time.h> */
#undef HAVE_TIMERADD
@@ -466,15 +385,9 @@
/* Define if kqueue works correctly with pipes */
#undef HAVE_WORKING_KQUEUE
-/* define if select implicitly yields */
-#undef HAVE_YIELDING_SELECT
-
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
-/* define to 1 if library is thread safe */
-#undef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
-
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
@@ -482,9 +395,6 @@
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
-/* define if you have (or want) no threads */
-#undef NO_THREADS
-
/* Numeric representation of the version */
#undef NUMERIC_VERSION
@@ -509,11 +419,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* enable thread safety */
-#undef REENTRANT
-
-/* define if sched_yield yields the entire process */
-#undef REPLACE_BROKEN_YIELD
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+#undef PTHREAD_CREATE_JOINABLE
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
@@ -542,12 +450,6 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
-/* enable thread safety */
-#undef THREADSAFE
-
-/* enable thread safety */
-#undef THREAD_SAFE
-
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
@@ -570,18 +472,6 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
-/* enable thread safety */
-#undef _REENTRANT
-
-/* enable thread safety */
-#undef _SGI_MP_SOURCE
-
-/* enable thread safety */
-#undef _THREADSAFE
-
-/* enable thread safety */
-#undef _THREAD_SAFE
-
/* Define to 500 only on HP-UX. */
#undef _XOPEN_SOURCE
diff --git a/sntp/libevent/configure b/sntp/libevent/configure
index 09d6eed..d2c0780 100755
--- a/sntp/libevent/configure
+++ b/sntp/libevent/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for libevent 2.1.3-alpha-dev.
+# Generated by GNU Autoconf 2.68 for libevent 2.1.5-beta.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libevent'
PACKAGE_TARNAME='libevent'
-PACKAGE_VERSION='2.1.3-alpha-dev'
-PACKAGE_STRING='libevent 2.1.3-alpha-dev'
+PACKAGE_VERSION='2.1.5-beta'
+PACKAGE_STRING='libevent 2.1.5-beta'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -619,6 +619,8 @@ PTHREADS_FALSE
PTHREADS_TRUE
PTHREAD_CFLAGS
PTHREAD_LIBS
+PTHREAD_CC
+acx_pthread_config
SIGNAL_SUPPORT_FALSE
SIGNAL_SUPPORT_TRUE
EVPORT_BACKEND_FALSE
@@ -655,6 +657,8 @@ ZLIB_REGRESS_TRUE
ZLIB_LIBS
BUILD_REGRESS_FALSE
BUILD_REGRESS_TRUE
+BUILD_SAMPLES_FALSE
+BUILD_SAMPLES_TRUE
LIBTOOL_DEPS
OTOOL64
OTOOL
@@ -778,6 +782,7 @@ enable_openssl
enable_debug_mode
enable_libevent_install
enable_libevent_regress
+enable_samples
enable_function_sections
enable_verbose_debug
enable_shared
@@ -788,8 +793,6 @@ with_gnu_ld
with_sysroot
enable_libtool_lock
enable_largefile
-with_threads
-with_yielding_select
'
ac_precious_vars='build_alias
host_alias
@@ -1342,7 +1345,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libevent 2.1.3-alpha-dev to adapt to many kinds of systems.
+\`configure' configures libevent 2.1.5-beta to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1412,7 +1415,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libevent 2.1.3-alpha-dev:";;
+ short | recursive ) echo "Configuration of libevent 2.1.5-beta:";;
esac
cat <<\_ACEOF
@@ -1437,6 +1440,8 @@ Optional Features:
--disable-libevent-regress, skip regress in make check
+ --disable-samples, skip building of sample programs
+
--enable-function-sections, make static library allow smaller binaries with --gc-sections
--enable-verbose-debug, verbose debug logging
@@ -1456,8 +1461,6 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot=DIR Search for dependent libraries within DIR
(or the compiler's sysroot if not specified).
- --with-threads with threads [auto]
- --with-yielding-select with yielding select [auto]
Some influential environment variables:
CC C compiler command
@@ -1535,7 +1538,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libevent configure 2.1.3-alpha-dev
+libevent configure 2.1.5-beta
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2235,7 +2238,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libevent $as_me 2.1.3-alpha-dev, which was
+It was created by libevent $as_me 2.1.5-beta, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2616,7 +2619,6 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
am__api_version='1.11'
# Find a good install program. We prefer a C program (faster),
@@ -3055,7 +3057,7 @@ fi
# Define the identity of the package.
PACKAGE='libevent'
- VERSION='2.1.3-alpha-dev'
+ VERSION='2.1.5-beta'
cat >>confdefs.h <<_ACEOF
@@ -3110,7 +3112,7 @@ AM_BACKSLASH='\'
ac_config_headers="$ac_config_headers config.h evconfig-private.h:evconfig-private.h.in"
-$as_echo "#define NUMERIC_VERSION 0x02010301" >>confdefs.h
+$as_echo "#define NUMERIC_VERSION 0x02010500" >>confdefs.h
if test "$prefix" = "NONE"; then
@@ -5004,6 +5006,13 @@ else
enable_libevent_regress=yes
fi
+# Check whether --enable-samples was given.
+if test "${enable_samples+set}" = set; then :
+ enableval=$enable_samples;
+else
+ enable_samples=yes
+fi
+
# Check whether --enable-function-sections was given.
if test "${enable_function_sections+set}" = set; then :
enableval=$enable_function_sections;
@@ -12071,6 +12080,14 @@ CC="$lt_save_CC"
+ if test "$enable_samples" = "yes"; then
+ BUILD_SAMPLES_TRUE=
+ BUILD_SAMPLES_FALSE='#'
+else
+ BUILD_SAMPLES_TRUE='#'
+ BUILD_SAMPLES_FALSE=
+fi
+
if test "$enable_libevent_regress" = "yes"; then
BUILD_REGRESS_TRUE=
BUILD_REGRESS_FALSE='#'
@@ -14825,58 +14842,127 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# OpenLDAP --with-threads
-
-# Check whether --with-threads was given.
-if test "${with_threads+set}" = set; then :
- withval=$with_threads;
- ol_arg=invalid
- for ol_val in auto nt posix mach pth lwp yes no manual ; do
- if test "$withval" = "$ol_val" ; then
- ol_arg="$ol_val"
- fi
- done
- if test "$ol_arg" = "invalid" ; then
- as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
- fi
- ol_with_threads="$ol_arg"
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-else
- ol_with_threads="auto"
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_join ();
+int
+main ()
+{
+return pthread_join ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ acx_pthread_ok=yes
fi
-# end --with-threads
-
-
-case "$ol_with_threads$host" in
- auto*-*-solaris2.[0-6])
- ol_with_threads=no
- ;;
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+ *solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
esac
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
-ol_aix_threads=no
-case "$host" in
-*-*-aix*) if test -z "$CC" ; then
- case "$ol_with_threads" in
- auto | yes | posix) ol_aix_threads=yes ;;
- esac
- fi
-;;
-esac
+ case $flag in
+ none)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+ ;;
-if test $ol_aix_threads = yes ; then
- if test -z "${CC}" ; then
- for ac_prog in cc_r xlc_r cc
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+ -*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
+if ${ac_cv_prog_acx_pthread_config+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
+ if test -n "$acx_pthread_config"; then
+ ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -14885,7 +14971,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_prog"
+ ac_cv_prog_acx_pthread_config="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -14893,4378 +14979,210 @@ done
done
IFS=$as_save_IFS
+ test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
fi
fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+acx_pthread_config=$ac_cv_prog_acx_pthread_config
+if test -n "$acx_pthread_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
+$as_echo "$acx_pthread_config" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
- test -n "$CC" && break
-done
-
-
- if test "$CC" = cc ; then
- if test $ol_with_threads != auto ; then
- as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
-$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
- fi
- ol_with_threads=no
- fi
- fi
-
- case ${CC} in cc_r | xlc_r)
- ol_with_threads=posix
- ol_cv_pthread_create=yes
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
- esac
-fi
-
-ol_link_threads=no
-# OpenLDAP --with-yielding_select
-
-# Check whether --with-yielding_select was given.
-if test "${with_yielding_select+set}" = set; then :
- withval=$with_yielding_select;
- ol_arg=invalid
- for ol_val in auto yes no manual ; do
- if test "$withval" = "$ol_val" ; then
- ol_arg="$ol_val"
- fi
- done
- if test "$ol_arg" = "invalid" ; then
- as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
- fi
- ol_with_yielding_select="$ol_arg"
-
-else
- ol_with_yielding_select="auto"
-fi
-# end --with-yielding_select
-
-
-case $ol_with_threads in auto | yes | nt)
-
-
- ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
-if test "x$ac_cv_func__beginthread" = xyes; then :
-
-fi
-
-
- if test $ac_cv_func__beginthread = yes ; then
-
-$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
-
- ol_cv_nt_threads=yes
- fi
-
-
- if test "$ol_cv_nt_threads" = yes ; then
- ol_link_threads=nt
- ol_with_threads=found
- ol_with_yielding_select=yes
-
-
-$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
-
- fi
-
- if test $ol_with_threads = nt ; then
- as_fn_error $? "could not locate NT Threads" "$LINENO" 5
- fi
- ;;
-esac
-
-case $ol_with_threads in auto | yes | posix)
-
- for ac_header in pthread.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_H 1
-_ACEOF
-
-fi
-
-done
-
-
- if test $ac_cv_header_pthread_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
-$as_echo_n "checking POSIX thread version... " >&6; }
-if ${ol_cv_pthread_version+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# include <pthread.h>
-
-int
-main ()
-{
-
- int i = PTHREAD_CREATE_JOINABLE;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_detach" >/dev/null 2>&1; then :
- ol_cv_pthread_version=10
-else
- ol_cv_pthread_version=8
-fi
-rm -f conftest*
-
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# include <pthread.h>
-# ifdef PTHREAD_CREATE_UNDETACHED
- draft7
-# endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "draft7" >/dev/null 2>&1; then :
- ol_cv_pthread_version=7
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
- ol_cv_pthread_version=6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# include <pthread.h>
-#ifdef PTHREAD_MUTEX_INITIALIZER
- draft5
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "draft5" >/dev/null 2>&1; then :
- ol_cv_pthread_version=5
-else
- ol_cv_pthread_version=4
-fi
-rm -f conftest*
-
-fi
-rm -f conftest*
-
-fi
-rm -f conftest*
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
-$as_echo "$ol_cv_pthread_version" >&6; }
-
-
- if test $ol_cv_pthread_version != 0 ; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREADS $ol_cv_pthread_version
-_ACEOF
-
- else
- as_fn_error $? "unknown pthread version" "$LINENO" 5
- fi
-
- # consider threads found
- ol_with_threads=found
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
-$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
-if ${ol_cv_header_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
- ol_cv_header_linux_threads=yes
-else
- ol_cv_header_linux_threads=no
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
-$as_echo "$ol_cv_header_linux_threads" >&6; }
- if test $ol_cv_header_linux_threads = yes; then
-
-$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
-
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
-$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
-if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-#ifdef _POSIX_THREAD_IS_GNU_PTH
- __gnu_pth__;
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
- ol_cv_header_gnu_pth_pthread_h=yes
-else
- ol_cv_header_gnu_pth_pthread_h=no
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
-$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
-
-
- if test $ol_cv_header_gnu_pth_pthread_h = no ; then
- for ac_header in sched.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
-if test "x$ac_cv_header_sched_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SCHED_H 1
-_ACEOF
-
-fi
-
-done
-
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
-$as_echo_n "checking for pthread_create in default libraries... " >&6; }
-if ${ol_cv_pthread_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_create=yes
-else
- ol_cv_pthread_create=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_create=yes
-else
- ol_cv_pthread_create=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
-$as_echo "$ol_cv_pthread_create" >&6; }
-
- if test $ol_cv_pthread_create != no ; then
- ol_link_threads=posix
- ol_link_pthreads=""
- fi
-
- # Pthread try link: -kthread (ol_cv_pthread_kthread)
-if test "$ol_link_threads" = no ; then
- # try -kthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
-$as_echo_n "checking for pthread link with -kthread... " >&6; }
-if ${ol_cv_pthread_kthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-kthread $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_kthread=yes
-else
- ol_cv_pthread_kthread=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_kthread=yes
-else
- ol_cv_pthread_kthread=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
-$as_echo "$ol_cv_pthread_kthread" >&6; }
-
- if test $ol_cv_pthread_kthread = yes ; then
- ol_link_pthreads="-kthread"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -pthread (ol_cv_pthread_pthread)
-if test "$ol_link_threads" = no ; then
- # try -pthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
-$as_echo_n "checking for pthread link with -pthread... " >&6; }
-if ${ol_cv_pthread_pthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-pthread $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_pthread=yes
-else
- ol_cv_pthread_pthread=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_pthread=yes
-else
- ol_cv_pthread_pthread=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
-$as_echo "$ol_cv_pthread_pthread" >&6; }
-
- if test $ol_cv_pthread_pthread = yes ; then
- ol_link_pthreads="-pthread"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
-if test "$ol_link_threads" = no ; then
- # try -pthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
-$as_echo_n "checking for pthread link with -pthreads... " >&6; }
-if ${ol_cv_pthread_pthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-pthreads $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_pthreads=yes
-else
- ol_cv_pthread_pthreads=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_pthreads=yes
-else
- ol_cv_pthread_pthreads=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
-$as_echo "$ol_cv_pthread_pthreads" >&6; }
-
- if test $ol_cv_pthread_pthreads = yes ; then
- ol_link_pthreads="-pthreads"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
-if test "$ol_link_threads" = no ; then
- # try -mthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
-$as_echo_n "checking for pthread link with -mthreads... " >&6; }
-if ${ol_cv_pthread_mthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-mthreads $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_mthreads=yes
-else
- ol_cv_pthread_mthreads=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_mthreads=yes
-else
- ol_cv_pthread_mthreads=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
-$as_echo "$ol_cv_pthread_mthreads" >&6; }
-
- if test $ol_cv_pthread_mthreads = yes ; then
- ol_link_pthreads="-mthreads"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -thread (ol_cv_pthread_thread)
-if test "$ol_link_threads" = no ; then
- # try -thread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
-$as_echo_n "checking for pthread link with -thread... " >&6; }
-if ${ol_cv_pthread_thread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-thread $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-/* pthread test headers */
#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
int
main ()
{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
+pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_thread=yes
-else
- ol_cv_pthread_thread=no
+ acx_pthread_ok=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_thread=yes
-else
- ol_cv_pthread_thread=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
-$as_echo "$ol_cv_pthread_thread" >&6; }
-
- if test $ol_cv_pthread_thread = yes ; then
- ol_link_pthreads="-thread"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
-if test "$ol_link_threads" = no ; then
- # try -lpthread -lmach -lexc -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
-$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
-if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
-else
- ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
-else
- ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
-$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
-
- if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
- ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
-if test "$ol_link_threads" = no ; then
- # try -lpthread -lmach -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
-if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthread -lmach -lexc $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthread_lmach_lexc=yes
-else
- ol_cv_pthread_lpthread_lmach_lexc=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthread_lmach_lexc=yes
-else
- ol_cv_pthread_lpthread_lmach_lexc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
-
- if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
- ol_link_pthreads="-lpthread -lmach -lexc"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
-if test "$ol_link_threads" = no ; then
- # try -lpthread -Wl,-woff,85
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
-$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
-if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthread -Wl,-woff,85 $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lib_lpthread_woff=yes
-else
- ol_cv_pthread_lib_lpthread_woff=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lib_lpthread_woff=yes
-else
- ol_cv_pthread_lib_lpthread_woff=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
-$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
-
- if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
- ol_link_pthreads="-lpthread -Wl,-woff,85"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
-if test "$ol_link_threads" = no ; then
- # try -lpthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
-$as_echo_n "checking for pthread link with -lpthread... " >&6; }
-if ${ol_cv_pthread_lpthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthread $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthread=yes
-else
- ol_cv_pthread_lpthread=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthread=yes
-else
- ol_cv_pthread_lpthread=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
-$as_echo "$ol_cv_pthread_lpthread" >&6; }
-
- if test $ol_cv_pthread_lpthread = yes ; then
- ol_link_pthreads="-lpthread"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
-if test "$ol_link_threads" = no ; then
- # try -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
-$as_echo_n "checking for pthread link with -lc_r... " >&6; }
-if ${ol_cv_pthread_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lc_r $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lc_r=yes
-else
- ol_cv_pthread_lc_r=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lc_r=yes
-else
- ol_cv_pthread_lc_r=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
-$as_echo "$ol_cv_pthread_lc_r" >&6; }
-
- if test $ol_cv_pthread_lc_r = yes ; then
- ol_link_pthreads="-lc_r"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -threads (ol_cv_pthread_threads)
-if test "$ol_link_threads" = no ; then
- # try -threads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
-$as_echo_n "checking for pthread link with -threads... " >&6; }
-if ${ol_cv_pthread_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-threads $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_threads=yes
-else
- ol_cv_pthread_threads=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_threads=yes
-else
- ol_cv_pthread_threads=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
-$as_echo "$ol_cv_pthread_threads" >&6; }
-
- if test $ol_cv_pthread_threads = yes ; then
- ol_link_pthreads="-threads"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
-if test "$ol_link_threads" = no ; then
- # try -lpthreads -lmach -lexc -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
-if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
-else
- ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
-else
- ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
-
- if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
- ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
-if test "$ol_link_threads" = no ; then
- # try -lpthreads -lmach -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
-if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthreads -lmach -lexc $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthreads_lmach_lexc=yes
-else
- ol_cv_pthread_lpthreads_lmach_lexc=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthreads_lmach_lexc=yes
-else
- ol_cv_pthread_lpthreads_lmach_lexc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
-
- if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
- ol_link_pthreads="-lpthreads -lmach -lexc"
- ol_link_threads=posix
- fi
-fi
-
- # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
-if test "$ol_link_threads" = no ; then
- # try -lpthreads -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
-if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthreads -lexc $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lpthreads_lexc=yes
-else
- ol_cv_pthread_lpthreads_lexc=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lpthreads_lexc=yes
-else
- ol_cv_pthread_lpthreads_lexc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
-
- if test $ol_cv_pthread_lpthreads_lexc = yes ; then
- ol_link_pthreads="-lpthreads -lexc"
- ol_link_threads=posix
- fi
-fi
-
-
- # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
-if test "$ol_link_threads" = no ; then
- # try -lpthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
-$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
-if ${ol_cv_pthread_lib_lpthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- # save the flags
- ol_LIBS="$LIBS"
- LIBS="-lpthreads $LIBS"
-
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-int
-main ()
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_pthread_lib_lpthreads=yes
-else
- ol_cv_pthread_lib_lpthreads=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_lib_lpthreads=yes
-else
- ol_cv_pthread_lib_lpthreads=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
- # restore the LIBS
- LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
-$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
-
- if test $ol_cv_pthread_lib_lpthreads = yes ; then
- ol_link_pthreads="-lpthreads"
- ol_link_threads=posix
- fi
-fi
-
-
- if test $ol_link_threads != no ; then
- LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
-
- save_CPPFLAGS="$CPPFLAGS"
- save_LIBS="$LIBS"
- LIBS="$LTHREAD_LIBS $LIBS"
-
- for ac_func in sched_yield pthread_yield thr_yield
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- if test $ac_cv_func_sched_yield = no &&
- test $ac_cv_func_pthread_yield = no &&
- test $ac_cv_func_thr_yield = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
-$as_echo_n "checking for sched_yield in -lrt... " >&6; }
-if ${ac_cv_lib_rt_sched_yield+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sched_yield ();
-int
-main ()
-{
-return sched_yield ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_rt_sched_yield=yes
-else
- ac_cv_lib_rt_sched_yield=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
-$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
-if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
- LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
-
-$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
-
- ac_cv_func_sched_yield=yes
-else
- ac_cv_func_sched_yield=no
-fi
-
- fi
- if test $ac_cv_func_sched_yield = no &&
- test $ac_cv_func_pthread_yield = no &&
- test "$ac_cv_func_thr_yield" = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
-$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
- fi
-
- for ac_func in pthread_kill
-do :
- ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
-if test "x$ac_cv_func_pthread_kill" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_KILL 1
-_ACEOF
-
-fi
-done
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
-$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
-if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <pthread.h>
-pthread_rwlock_t rwlock;
-
-int
-main ()
-{
-pthread_rwlock_destroy(&rwlock);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_func_pthread_rwlock_destroy=yes
-else
- ol_cv_func_pthread_rwlock_destroy=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
-$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
- if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
-
-$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
-
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
-$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
-if ${ol_cv_func_pthread_detach+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <pthread.h>
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-int
-main ()
-{
-pthread_detach(NULL);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_func_pthread_detach=yes
-else
- ol_cv_func_pthread_detach=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
-$as_echo "$ol_cv_func_pthread_detach" >&6; }
-
- if test $ol_cv_func_pthread_detach = no ; then
- as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
- fi
-
-
-$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
-
-
- for ac_func in \
- pthread_setconcurrency \
- pthread_getconcurrency \
- thr_setconcurrency \
- thr_getconcurrency \
-
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
- for ac_func in pthread_kill_other_threads_np
-do :
- ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
-if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
-_ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+ if test "x$acx_pthread_ok" = xyes; then
+ break;
+ fi
-fi
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
-$as_echo_n "checking for LinuxThreads implementation... " >&6; }
-if ${ol_cv_sys_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
-$as_echo "$ol_cv_sys_linux_threads" >&6; }
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
-$as_echo_n "checking for LinuxThreads consistency... " >&6; }
-if ${ol_cv_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test $ol_cv_header_linux_threads = yes &&
- test $ol_cv_sys_linux_threads = yes; then
- ol_cv_linux_threads=yes
- elif test $ol_cv_header_linux_threads = no &&
- test $ol_cv_sys_linux_threads = no; then
- ol_cv_linux_threads=no
- else
- ol_cv_linux_threads=error
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
-$as_echo "$ol_cv_linux_threads" >&6; }
-
-
- if test $ol_cv_linux_threads = error; then
- as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
-$as_echo_n "checking if pthread_create() works... " >&6; }
-if ${ol_cv_pthread_create_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
- ol_cv_pthread_create_works=yes
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
- void *p;
-{
- return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
-
- /* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED 1
-#endif
- pthread_t t;
- int status;
- int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
- /* Final pthreads */
- pthread_attr_t attr;
-
- status = pthread_attr_init(&attr);
- if( status ) return status;
-
-#if HAVE_PTHREADS < 7
- status = pthread_attr_setdetachstate(&attr, &detach);
- if( status < 0 ) status = errno;
-#else
- status = pthread_attr_setdetachstate(&attr, detach);
-#endif
- if( status ) return status;
- status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
- if( status < 0 ) status = errno;
-#endif
- if( status ) return status;
-#else
- /* Draft 4 pthreads */
- status = pthread_create( &t, pthread_attr_default, task, NULL );
- if( status ) return errno;
-
- /* give thread a chance to complete */
- /* it should remain joinable and hence detachable */
- sleep( 1 );
-
- status = pthread_detach( &t );
- if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
- pthread_kill_other_threads_np();
-#endif
-
- return 0;
-
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_create_works=yes
-else
- ol_cv_pthread_create_works=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
-$as_echo "$ol_cv_pthread_create_works" >&6; }
-
- if test $ol_cv_pthread_create_works = no ; then
- as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
- fi
-
- ol_replace_broken_yield=no
-
- if test $ol_replace_broken_yield = yes ; then
-
-$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
- fi
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- if test x$ol_with_yielding_select = xauto ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
-$as_echo_n "checking if select yields when using pthreads... " >&6; }
-if ${ol_cv_pthread_select_yields+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
- ol_cv_pthread_select_yields=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <unistd.h>
#include <pthread.h>
-#ifndef NULL
-#define NULL (void*) 0
-#endif
-
-static int fildes[2];
-
-static void *task(p)
- void *p;
-{
- int i;
- struct timeval tv;
-
- fd_set rfds;
-
- tv.tv_sec=10;
- tv.tv_usec=0;
-
- FD_ZERO(&rfds);
- FD_SET(fildes[0], &rfds);
-
- /* we're not interested in any fds */
- i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
-
- if(i < 0) {
- perror("select");
- exit(10);
- }
-
- exit(0); /* if we exit here, the select blocked the whole process */
-}
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
- pthread_t t;
-
- /* create a pipe to select */
- if(pipe(&fildes[0])) {
- perror("select");
- exit(1);
- }
-
-#ifdef HAVE_PTHREAD_SETCONCURRENCY
- (void) pthread_setconcurrency(2);
-#else
-#ifdef HAVE_THR_SETCONCURRENCY
- /* Set Solaris LWP concurrency to 2 */
- thr_setconcurrency(2);
-#endif
-#endif
-
-#if HAVE_PTHREADS < 6
- pthread_create(&t, pthread_attr_default, task, NULL);
-#else
- pthread_create(&t, NULL, task, NULL);
-#endif
-
- /* make sure task runs first */
-#ifdef HAVE_THR_YIELD
- thr_yield();
-#elif defined( HAVE_SCHED_YIELD )
- sched_yield();
-#elif defined( HAVE_PTHREAD_YIELD )
- pthread_yield();
-#endif
-
- exit(2);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ol_cv_pthread_select_yields=no
-else
- ol_cv_pthread_select_yields=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
-$as_echo "$ol_cv_pthread_select_yields" >&6; }
-
- if test $ol_cv_pthread_select_yields = cross ; then
- as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
- fi
-
- if test $ol_cv_pthread_select_yields = yes ; then
- ol_with_yielding_select=yes
- fi
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LIBS="$save_LIBS"
- else
- as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
- fi
- fi
-
- if test $ol_with_threads = posix ; then
- as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
- fi
- ;;
-esac
-
-case $ol_with_threads in auto | yes | mach)
-
- for ac_header in mach/cthreads.h cthreads.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
- if test $ac_cv_header_mach_cthreads_h = yes ; then
- ol_with_threads=found
-
- ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
-if test "x$ac_cv_func_cthread_fork" = xyes; then :
- ol_link_threads=yes
-fi
-
-
- if test $ol_link_threads = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
-$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
-if ${ol_cv_cthread_all_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- save_LIBS="$LIBS"
- LIBS="-all_load $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <mach/cthreads.h>
int
main ()
{
-
- cthread_fork((void *)0, (void *)0);
-
+int attr=$attr; return attr;
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_cthread_all_load=yes
-else
- ol_cv_cthread_all_load=no
+ attr_name=$attr; break
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LIBS="$save_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
-$as_echo "$ol_cv_cthread_all_load" >&6; }
-
- if test $ol_cv_cthread_all_load = yes ; then
- LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
- ol_link_threads=mach
- ol_with_threads=found
- fi
- fi
-
- elif test $ac_cv_header_cthreads_h = yes ; then
-
- ol_with_threads=found
-
- save_LIBS="$LIBS"
- LIBS="$LIBS -lthreads"
- ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
-if test "x$ac_cv_func_cthread_fork" = xyes; then :
- ol_link_threads=yes
-fi
-
- LIBS="$save_LIBS"
-
- if test $ol_link_threads = yes ; then
- LTHREAD_LIBS="-lthreads"
- ol_link_threads=mach
- ol_with_threads=found
- else
- as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
- fi
-
- elif test $ol_with_threads = mach ; then
- as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
- fi
-
- if test $ol_link_threads = mach ; then
-
-$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
-
- elif test $ol_with_threads = found ; then
- as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
- fi
- ;;
-esac
-
-case $ol_with_threads in auto | yes | pth)
-
- for ac_header in pth.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
-if test "x$ac_cv_header_pth_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTH_H 1
-_ACEOF
-
-fi
-
-done
-
-
- if test $ac_cv_header_pth_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
-$as_echo_n "checking for pth_version in -lpth... " >&6; }
-if ${ac_cv_lib_pth_pth_version+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpth $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pth_version ();
-int
-main ()
-{
-return pth_version ();
- ;
- return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pth_pth_version=yes
-else
- ac_cv_lib_pth_pth_version=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
-$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
-if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
- have_pth=yes
-else
- have_pth=no
-fi
-
-
- if test $have_pth = yes ; then
-$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
-
- LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
- ol_link_threads=pth
- ol_with_threads=found
-
- if test x$ol_with_yielding_select = xauto ; then
- ol_with_yielding_select=yes
- fi
- fi
- fi
- ;;
-esac
-
-case $ol_with_threads in auto | yes | lwp)
-
- for ac_header in thread.h synch.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ fi
-fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+ flag=no
+ case "${host_cpu}-${host_os}" in
+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
+$as_echo "${flag}" >&6; }
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
-done
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
- if test $ac_cv_header_thread_h = yes &&
- test $ac_cv_header_synch_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
-$as_echo_n "checking for thr_create in -lthread... " >&6; }
-if ${ac_cv_lib_thread_thr_create+:} false; then :
+ # More AIX lossage: must compile with xlc_r or cc_r
+ if test x"$GCC" != xyes; then
+ for ac_prog in xlc_r cc_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PTHREAD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lthread $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char thr_create ();
-int
-main ()
-{
-return thr_create ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_thread_thr_create=yes
-else
- ac_cv_lib_thread_thr_create=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
-$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
-if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
- have_thr=yes
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
else
- have_thr=no
-fi
-
-
- if test $have_thr = yes ; then
-
-$as_echo "#define HAVE_THR 1" >>confdefs.h
-
- LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
- ol_link_threads=thr
-
- if test x$ol_with_yielding_select = xauto ; then
- ol_with_yielding_select=yes
- fi
-
- for ac_func in \
- thr_setconcurrency \
- thr_getconcurrency \
-
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- fi
- fi
-
- for ac_header in lwp/lwp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
-if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LWP_LWP_H 1
-_ACEOF
-
-fi
-
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PTHREAD_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
+ done
+IFS=$as_save_IFS
- if test $ac_cv_header_lwp_lwp_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
-$as_echo_n "checking for lwp_create in -llwp... " >&6; }
-if ${ac_cv_lib_lwp_lwp_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-llwp $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char lwp_create ();
-int
-main ()
-{
-return lwp_create ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_lwp_lwp_create=yes
-else
- ac_cv_lib_lwp_lwp_create=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
-$as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
-if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
- have_lwp=yes
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
else
- have_lwp=no
-fi
-
-
- if test $have_lwp = yes ; then
-
-$as_echo "#define HAVE_LWP 1" >>confdefs.h
-
- LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
- ol_link_threads=lwp
-
- if test x$ol_with_yielding_select = xauto ; then
- ol_with_yielding_select=no
- fi
- fi
- fi
- ;;
-esac
-
-if test $ol_with_yielding_select = yes ; then
-
-$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
-
-fi
-
-if test $ol_with_threads = manual ; then
- ol_link_threads=yes
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
-$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
-
- for ac_header in pthread.h sched.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-done
-
- for ac_func in sched_yield pthread_yield
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-fi
+ test -n "$PTHREAD_CC" && break
done
+test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
-$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
-if ${ol_cv_header_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
- ol_cv_header_linux_threads=yes
-else
- ol_cv_header_linux_threads=no
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
-$as_echo "$ol_cv_header_linux_threads" >&6; }
- if test $ol_cv_header_linux_threads = yes; then
-
-$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
-
+ else
+ PTHREAD_CC=$CC
fi
-
-
- for ac_header in mach/cthreads.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
-if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MACH_CTHREADS_H 1
-_ACEOF
-
-fi
-
-done
-
- for ac_header in lwp/lwp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
-if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LWP_LWP_H 1
-_ACEOF
-
-fi
-
-done
-
- for ac_header in thread.h synch.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-fi
-
-if test $ol_link_threads != no && test $ol_link_threads != nt ; then
-
-$as_echo "#define REENTRANT 1" >>confdefs.h
-
-
-$as_echo "#define _REENTRANT 1" >>confdefs.h
-
-
-$as_echo "#define THREAD_SAFE 1" >>confdefs.h
-
-
-$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
-
-
-$as_echo "#define THREADSAFE 1" >>confdefs.h
-
-
-$as_echo "#define _THREADSAFE 1" >>confdefs.h
-
-
-$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
-$as_echo_n "checking for thread specific errno... " >&6; }
-if ${ol_cv_errno_thread_specific+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <errno.h>
-int
-main ()
-{
-errno = 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_errno_thread_specific=yes
else
- ol_cv_errno_thread_specific=no
+ PTHREAD_CC="$CC"
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
-$as_echo "$ol_cv_errno_thread_specific" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
-$as_echo_n "checking for thread specific h_errno... " >&6; }
-if ${ol_cv_h_errno_thread_specific+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <netdb.h>
-int
-main ()
-{
-h_errno = 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ol_cv_h_errno_thread_specific=yes
-else
- ol_cv_h_errno_thread_specific=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
-$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
- if test $ol_cv_errno_thread_specific != yes ||
- test $ol_cv_h_errno_thread_specific != yes ; then
- LIBS="$LTHREAD_LIBS $LIBS"
- LTHREAD_LIBS=""
- fi
-fi
-if test $ol_link_threads = no ; then
- if test $ol_with_threads = yes ; then
- as_fn_error $? "no suitable thread support" "$LINENO" 5
- fi
- if test $ol_with_threads = auto ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
-$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
- ol_with_threads=no
- fi
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
-$as_echo "#define NO_THREADS 1" >>confdefs.h
+$as_echo "#define HAVE_PTHREADS 1" >>confdefs.h
- LTHREAD_LIBS=""
- BUILD_THREAD=no
+ have_pthreads=yes
+ :
else
- BUILD_THREAD=yes
-fi
-
-if test $ol_link_threads != no ; then
-
-$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
+ acx_pthread_ok=no
fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-case "$ol_with_threads" in
- no)
- ol_pthread_ok=no
-
- ;;
- *)
- have_pthreads=yes
- PTHREAD_LIBS="$LTHREAD_LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- # The cast to long int works around a bug in the HP C Compiler
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
@@ -19273,10 +15191,8 @@ $as_echo_n "checking size of pthread_t... " >&6; }
if ${ac_cv_sizeof_pthread_t+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
- $ac_includes_default
- #include <pthread.h>
-
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "$ac_includes_default
+ #include <pthread.h>
"; then :
@@ -19302,20 +15218,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-
- ;;
-esac
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
fi
-
-
if test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"; then
PTHREADS_TRUE=
PTHREADS_FALSE='#'
@@ -19712,6 +15615,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${BUILD_SAMPLES_TRUE}" && test -z "${BUILD_SAMPLES_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_SAMPLES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${BUILD_REGRESS_TRUE}" && test -z "${BUILD_REGRESS_FALSE}"; then
as_fn_error $? "conditional \"BUILD_REGRESS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -20189,7 +16096,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libevent $as_me 2.1.3-alpha-dev, which was
+This file was extended by libevent $as_me 2.1.5-beta, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20255,7 +16162,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libevent config.status 2.1.3-alpha-dev
+libevent config.status 2.1.5-beta
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/sntp/libevent/configure.ac b/sntp/libevent/configure.ac
index c60c7ac..2cdc74f 100644
--- a/sntp/libevent/configure.ac
+++ b/sntp/libevent/configure.ac
@@ -5,18 +5,17 @@ dnl See LICENSE for copying information.
dnl
dnl Original version Dug Song <dugsong@monkey.org>
-AC_INIT(libevent,2.1.3-alpha-dev)
+AC_INIT(libevent,2.1.5-beta)
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR(event.c)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
-
AM_INIT_AUTOMAKE
dnl AM_SILENT_RULES req. automake 1.11. [no] defaults V=1
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_HEADERS(config.h evconfig-private.h:evconfig-private.h.in)
-AC_DEFINE(NUMERIC_VERSION, 0x02010301, [Numeric representation of the version])
+AC_DEFINE(NUMERIC_VERSION, 0x02010500, [Numeric representation of the version])
dnl Initialize prefix.
if test "$prefix" = "NONE"; then
@@ -113,6 +112,9 @@ AC_ARG_ENABLE([libevent-install],
AC_ARG_ENABLE([libevent-regress],
AS_HELP_STRING([--disable-libevent-regress, skip regress in make check]),
[], [enable_libevent_regress=yes])
+AC_ARG_ENABLE([samples],
+ AS_HELP_STRING([--disable-samples, skip building of sample programs]),
+ [], [enable_samples=yes])
AC_ARG_ENABLE([function-sections],
AS_HELP_STRING([--enable-function-sections, make static library allow smaller binaries with --gc-sections]),
[], [enable_function_sections=no])
@@ -129,6 +131,7 @@ dnl the command line with --enable-shared and --disable-shared.
dnl AC_DISABLE_SHARED
AC_SUBST(LIBTOOL_DEPS)
+AM_CONDITIONAL([BUILD_SAMPLES], [test "$enable_samples" = "yes"])
AM_CONDITIONAL([BUILD_REGRESS], [test "$enable_libevent_regress" = "yes"])
dnl Checks for libraries.
@@ -724,22 +727,16 @@ AC_TRY_COMPILE([],
# check if we can compile with pthreads
have_pthreads=no
if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then
- OL_THREAD_CHECK([
- have_pthreads=yes
- PTHREAD_LIBS="$LTHREAD_LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- AC_CHECK_SIZEOF(
- [pthread_t],
- [],
- [
- AC_INCLUDES_DEFAULT()
- #include <pthread.h>
- ]
- )
- ])
+ ACX_PTHREAD([
+ AC_DEFINE(HAVE_PTHREADS, 1,
+ [Define if we have pthreads on this system])
+ have_pthreads=yes])
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ AC_CHECK_SIZEOF(pthread_t, ,
+ [AC_INCLUDES_DEFAULT()
+ #include <pthread.h> ]
+ )
fi
-AC_SUBST([PTHREAD_LIBS])
-AC_SUBST([PTHREAD_CFLAGS])
AM_CONDITIONAL([PTHREADS], [test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"])
# check if we should compile locking into the library
diff --git a/sntp/libevent/evbuffer-internal.h b/sntp/libevent/evbuffer-internal.h
index fb67ec0..cf4bddc 100644
--- a/sntp/libevent/evbuffer-internal.h
+++ b/sntp/libevent/evbuffer-internal.h
@@ -155,6 +155,18 @@ struct evbuffer {
struct bufferevent *parent;
};
+#if EVENT__SIZEOF_OFF_T < EVENT__SIZEOF_SIZE_T
+typedef ev_ssize_t ev_misalign_t;
+#define EVBUFFER_CHAIN_MAX ((size_t)EV_SSIZE_MAX)
+#else
+typedef ev_off_t ev_misalign_t;
+#if EVENT__SIZEOF_OFF_T > EVENT__SIZEOF_SIZE_T
+#define EVBUFFER_CHAIN_MAX EV_SIZE_MAX
+#else
+#define EVBUFFER_CHAIN_MAX ((size_t)EV_SSIZE_MAX)
+#endif
+#endif
+
/** A single item in an evbuffer. */
struct evbuffer_chain {
/** points to next buffer in the chain */
@@ -165,7 +177,7 @@ struct evbuffer_chain {
/** unused space at the beginning of buffer or an offset into a
* file for sendfile buffers. */
- ev_off_t misalign;
+ ev_misalign_t misalign;
/** Offset into buffer + misalign at which to start writing.
* In other words, the total number of bytes actually stored
diff --git a/sntp/libevent/evdns.c b/sntp/libevent/evdns.c
index 59c3abe..60f4db5 100644
--- a/sntp/libevent/evdns.c
+++ b/sntp/libevent/evdns.c
@@ -541,6 +541,17 @@ nameserver_probe_failed(struct nameserver *const ns) {
}
}
+static void
+request_swap_ns(struct request *req, struct nameserver *ns) {
+ if (ns && req->ns != ns) {
+ EVUTIL_ASSERT(req->ns->requests_inflight > 0);
+ req->ns->requests_inflight--;
+ ns->requests_inflight++;
+
+ req->ns = ns;
+ }
+}
+
/* called when a nameserver has been deemed to have failed. For example, too */
/* many packets have timed out etc */
static void
@@ -595,7 +606,7 @@ nameserver_failed(struct nameserver *const ns, const char *msg) {
if (req->tx_count == 0 && req->ns == ns) {
/* still waiting to go out, can be moved */
/* to another server */
- req->ns = nameserver_pick(base);
+ request_swap_ns(req, nameserver_pick(base));
}
req = req->next;
} while (req != started_at);
@@ -659,6 +670,7 @@ request_finished(struct request *const req, struct request **head, int free_hand
req->ns->requests_inflight == 0 &&
req->base->disable_when_inactive) {
event_del(&req->ns->event);
+ evtimer_del(&req->ns->timeout_event);
}
if (!req->request_appended) {
@@ -707,7 +719,7 @@ request_reissue(struct request *req) {
/* the last nameserver should have been marked as failing */
/* by the caller of this function, therefore pick will try */
/* not to return it */
- req->ns = nameserver_pick(req->base);
+ request_swap_ns(req, nameserver_pick(req->base));
if (req->ns == last_ns) {
/* ... but pick did return it */
/* not a lot of point in trying again with the */
@@ -2158,29 +2170,30 @@ evdns_request_timeout_callback(evutil_socket_t fd, short events, void *arg) {
log(EVDNS_LOG_DEBUG, "Request %p timed out", arg);
EVDNS_LOCK(base);
- req->ns->timedout++;
- if (req->ns->timedout > req->base->global_max_nameserver_timeout) {
- req->ns->timedout = 0;
- nameserver_failed(req->ns, "request timed out.");
- }
-
if (req->tx_count >= req->base->global_max_retransmits) {
+ struct nameserver *ns = req->ns;
/* this request has failed */
log(EVDNS_LOG_DEBUG, "Giving up on request %p; tx_count==%d",
arg, req->tx_count);
reply_schedule_callback(req, 0, DNS_ERR_TIMEOUT, NULL);
+
request_finished(req, &REQ_HEAD(req->base, req->trans_id), 1);
+ nameserver_failed(ns, "request timed out.");
} else {
/* retransmit it */
- struct nameserver *new_ns;
log(EVDNS_LOG_DEBUG, "Retransmitting request %p; tx_count==%d",
arg, req->tx_count);
(void) evtimer_del(&req->timeout_event);
- new_ns = nameserver_pick(base);
- if (new_ns)
- req->ns = new_ns;
+ request_swap_ns(req, nameserver_pick(base));
evdns_request_transmit(req);
+
+ req->ns->timedout++;
+ if (req->ns->timedout > req->base->global_max_nameserver_timeout) {
+ req->ns->timedout = 0;
+ nameserver_failed(req->ns, "request timed out.");
+ }
}
+
EVDNS_UNLOCK(base);
}
@@ -2639,6 +2652,34 @@ evdns_base_nameserver_sockaddr_add(struct evdns_base *base,
return res;
}
+int
+evdns_base_get_nameserver_addr(struct evdns_base *base, int idx,
+ struct sockaddr *sa, ev_socklen_t len)
+{
+ int result = -1;
+ int i;
+ struct nameserver *server;
+ EVDNS_LOCK(base);
+ server = base->server_head;
+ for (i = 0; i < idx && server; ++i, server = server->next) {
+ if (server->next == base->server_head)
+ goto done;
+ }
+ if (! server)
+ goto done;
+
+ if (server->addrlen > len) {
+ result = (int) server->addrlen;
+ goto done;
+ }
+
+ memcpy(sa, &server->address, server->addrlen);
+ result = (int) server->addrlen;
+done:
+ EVDNS_UNLOCK(base);
+ return result;
+}
+
/* remove from the queue */
static void
evdns_request_remove(struct request *req, struct request **head)
@@ -3311,7 +3352,7 @@ strtoint(const char *const str)
/* Parse a number of seconds into a timeval; return -1 on error. */
static int
-strtotimeval(const char *const str, struct timeval *out)
+evdns_strtotimeval(const char *const str, struct timeval *out)
{
double d;
char *endptr;
@@ -3414,13 +3455,13 @@ evdns_base_set_option_impl(struct evdns_base *base,
base->global_search_state->ndots = ndots;
} else if (str_matches_option(option, "timeout:")) {
struct timeval tv;
- if (strtotimeval(val, &tv) == -1) return -1;
+ if (evdns_strtotimeval(val, &tv) == -1) return -1;
if (!(flags & DNS_OPTION_MISC)) return 0;
log(EVDNS_LOG_DEBUG, "Setting timeout to %s", val);
memcpy(&base->global_timeout, &tv, sizeof(struct timeval));
} else if (str_matches_option(option, "getaddrinfo-allow-skew:")) {
struct timeval tv;
- if (strtotimeval(val, &tv) == -1) return -1;
+ if (evdns_strtotimeval(val, &tv) == -1) return -1;
if (!(flags & DNS_OPTION_MISC)) return 0;
log(EVDNS_LOG_DEBUG, "Setting getaddrinfo-allow-skew to %s",
val);
@@ -3462,7 +3503,7 @@ evdns_base_set_option_impl(struct evdns_base *base,
base->global_outgoing_addrlen = len;
} else if (str_matches_option(option, "initial-probe-timeout:")) {
struct timeval tv;
- if (strtotimeval(val, &tv) == -1) return -1;
+ if (evdns_strtotimeval(val, &tv) == -1) return -1;
if (tv.tv_sec > 3600)
tv.tv_sec = 3600;
if (!(flags & DNS_OPTION_MISC)) return 0;
@@ -3555,8 +3596,8 @@ evdns_get_default_hosts_filename(void)
if (! SHGetSpecialFolderPathA(NULL, path, CSIDL_SYSTEM, 0))
return NULL;
- len_out = strlen(path)+strlen(hostfile);
- path_out = mm_malloc(len_out+1);
+ len_out = strlen(path)+strlen(hostfile)+1;
+ path_out = mm_malloc(len_out);
evutil_snprintf(path_out, len_out, "%s%s", path, hostfile);
return path_out;
#else
@@ -3826,17 +3867,18 @@ evdns_base_config_windows_nameservers(struct evdns_base *base)
if (base == NULL)
return -1;
EVDNS_LOCK(base);
+ fname = evdns_get_default_hosts_filename();
+ log(EVDNS_LOG_DEBUG, "Loading hosts entries from %s", fname);
+ evdns_base_load_hosts(base, fname);
+ if (fname)
+ mm_free(fname);
+
if (load_nameservers_with_getnetworkparams(base) == 0) {
EVDNS_UNLOCK(base);
return 0;
}
r = load_nameservers_from_registry(base);
- fname = evdns_get_default_hosts_filename();
- evdns_base_load_hosts(base, fname);
- if (fname)
- mm_free(fname);
-
EVDNS_UNLOCK(base);
return r;
}
@@ -3973,6 +4015,10 @@ evdns_nameserver_free(struct nameserver *server)
event_debug_unassign(&server->event);
if (server->state == 0)
(void) event_del(&server->timeout_event);
+ if (server->probe_request) {
+ evdns_cancel_request(server->base, server->probe_request);
+ server->probe_request = NULL;
+ }
event_debug_unassign(&server->timeout_event);
mm_free(server);
}
@@ -3988,6 +4034,15 @@ evdns_base_free_and_unlock(struct evdns_base *base, int fail_requests)
/* TODO(nickm) we might need to refcount here. */
+ for (server = base->server_head; server; server = server_next) {
+ server_next = server->next;
+ evdns_nameserver_free(server);
+ if (server_next == base->server_head)
+ break;
+ }
+ base->server_head = NULL;
+ base->global_good_nameservers = 0;
+
for (i = 0; i < base->n_req_heads; ++i) {
while (base->req_heads[i]) {
if (fail_requests)
@@ -4002,14 +4057,6 @@ evdns_base_free_and_unlock(struct evdns_base *base, int fail_requests)
}
base->global_requests_inflight = base->global_requests_waiting = 0;
- for (server = base->server_head; server; server = server_next) {
- server_next = server->next;
- evdns_nameserver_free(server);
- if (server_next == base->server_head)
- break;
- }
- base->server_head = NULL;
- base->global_good_nameservers = 0;
if (base->global_search_state) {
for (dom = base->global_search_state->head; dom; dom = dom_next) {
@@ -4663,7 +4710,7 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
data->ipv4_request.r = evdns_base_resolve_ipv4(dns_base,
nodename, 0, evdns_getaddrinfo_gotresolve,
&data->ipv4_request);
- if (want_cname)
+ if (want_cname && data->ipv4_request.r)
data->ipv4_request.r->current_req->put_cname_in_ptr =
&data->cname_result;
}
@@ -4674,7 +4721,7 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
data->ipv6_request.r = evdns_base_resolve_ipv6(dns_base,
nodename, 0, evdns_getaddrinfo_gotresolve,
&data->ipv6_request);
- if (want_cname)
+ if (want_cname && data->ipv6_request.r)
data->ipv6_request.r->current_req->put_cname_in_ptr =
&data->cname_result;
}
diff --git a/sntp/libevent/event.c b/sntp/libevent/event.c
index 01f0e14..af4a6e0 100644
--- a/sntp/libevent/event.c
+++ b/sntp/libevent/event.c
@@ -526,22 +526,24 @@ event_enable_debug_mode(void)
#endif
}
-#if 0
void
event_disable_debug_mode(void)
{
+#ifndef EVENT__DISABLE_DEBUG_MODE
struct event_debug_entry **ent, *victim;
EVLOCK_LOCK(event_debug_map_lock_, 0);
for (ent = HT_START(event_debug_map, &global_debug_map); ent; ) {
victim = *ent;
- ent = HT_NEXT_RMV(event_debug_map,&global_debug_map, ent);
+ ent = HT_NEXT_RMV(event_debug_map, &global_debug_map, ent);
mm_free(victim);
}
HT_CLEAR(event_debug_map, &global_debug_map);
EVLOCK_UNLOCK(event_debug_map_lock_ , 0);
-}
+
+ event_debug_mode_on_ = 0;
#endif
+}
struct event_base *
event_base_new_with_config(const struct event_config *cfg)
@@ -993,6 +995,21 @@ done:
return (res);
}
+/* Get the monotonic time for this event_base' timer */
+int
+event_gettime_monotonic(struct event_base *base, struct timeval *tv)
+{
+ int rv = -1;
+
+ if (base && tv) {
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ rv = evutil_gettime_monotonic_(&(base->monotonic_timer), tv);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ }
+
+ return rv;
+}
+
const char **
event_get_supported_methods(void)
{
@@ -1454,10 +1471,13 @@ done:
static inline void
event_persist_closure(struct event_base *base, struct event *ev)
{
-
- // Define our callback, we use this to store our callback before it's executed
void (*evcb_callback)(evutil_socket_t, short, void *);
+ // Other fields of *ev that must be stored before executing
+ evutil_socket_t evcb_fd;
+ short evcb_res;
+ void *evcb_arg;
+
/* reschedule the persistent event if we have a timeout. */
if (ev->ev_io_timeout.tv_sec || ev->ev_io_timeout.tv_usec) {
/* If there was a timeout, we want it to run at an interval of
@@ -1501,13 +1521,16 @@ event_persist_closure(struct event_base *base, struct event *ev)
}
// Save our callback before we release the lock
- evcb_callback = *ev->ev_callback;
+ evcb_callback = ev->ev_callback;
+ evcb_fd = ev->ev_fd;
+ evcb_res = ev->ev_res;
+ evcb_arg = ev->ev_arg;
// Release the lock
EVBASE_RELEASE_LOCK(base, th_base_lock);
// Execute the callback
- (evcb_callback)(ev->ev_fd, ev->ev_res, ev->ev_arg);
+ (evcb_callback)(evcb_fd, evcb_res, evcb_arg);
}
/*
@@ -1569,8 +1592,9 @@ event_process_active_single_queue(struct event_base *base,
event_persist_closure(base, ev);
break;
case EV_CLOSURE_EVENT: {
+ void (*evcb_callback)(evutil_socket_t, short, void *);
EVUTIL_ASSERT(ev != NULL);
- void (*evcb_callback)(evutil_socket_t, short, void *) = *ev->ev_callback;
+ evcb_callback = *ev->ev_callback;
EVBASE_RELEASE_LOCK(base, th_base_lock);
evcb_callback(ev->ev_fd, ev->ev_res, ev->ev_arg);
}
@@ -1583,14 +1607,16 @@ event_process_active_single_queue(struct event_base *base,
break;
case EV_CLOSURE_EVENT_FINALIZE:
case EV_CLOSURE_EVENT_FINALIZE_FREE: {
+ void (*evcb_evfinalize)(struct event *, void *);
+ int evcb_closure = evcb->evcb_closure;
EVUTIL_ASSERT(ev != NULL);
- void (*evcb_evfinalize)(struct event *, void *) = ev->ev_evcallback.evcb_cb_union.evcb_evfinalize;
base->current_event = NULL;
+ evcb_evfinalize = ev->ev_evcallback.evcb_cb_union.evcb_evfinalize;
EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_FINALIZING));
EVBASE_RELEASE_LOCK(base, th_base_lock);
evcb_evfinalize(ev, ev->ev_arg);
event_debug_note_teardown_(ev);
- if (evcb->evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE)
+ if (evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE)
mm_free(ev);
}
break;
@@ -3739,6 +3765,7 @@ event_free_debug_globals_locks(void)
if (event_debug_map_lock_ != NULL) {
EVTHREAD_FREE_LOCK(event_debug_map_lock_, 0);
event_debug_map_lock_ = NULL;
+ evthreadimpl_disable_lock_debugging_();
}
#endif /* EVENT__DISABLE_DEBUG_MODE */
#endif /* EVENT__DISABLE_THREAD_SUPPORT */
@@ -3774,6 +3801,7 @@ event_free_globals(void)
void
libevent_global_shutdown(void)
{
+ event_disable_debug_mode();
event_free_globals();
}
diff --git a/sntp/libevent/event_tagging.c b/sntp/libevent/event_tagging.c
index 7edd3da..64b100b 100644
--- a/sntp/libevent/event_tagging.c
+++ b/sntp/libevent/event_tagging.c
@@ -207,10 +207,19 @@ decode_tag_internal(ev_uint32_t *ptag, struct evbuffer *evbuf, int dodrain)
*/
data = evbuffer_pullup(
evbuf, len < sizeof(number) + 1 ? len : sizeof(number) + 1);
+ if (!data)
+ return (-1);
while (count++ < len) {
ev_uint8_t lower = *data++;
- number |= (lower & 0x7f) << shift;
+ if (shift >= 28) {
+ /* Make sure it fits into 32 bits */
+ if (shift > 28)
+ return (-1);
+ if ((lower & 0x7f) > 15)
+ return (-1);
+ }
+ number |= (lower & (unsigned)0x7f) << shift;
shift += 7;
if (!(lower & 0x80)) {
@@ -313,6 +322,8 @@ do { \
\
/* XXX(niels): faster? */ \
data = evbuffer_pullup(evbuf, offset + 1) + offset; \
+ if (!data) \
+ return (-1); \
\
nibbles = ((data[0] & 0xf0) >> 4) + 1; \
if (nibbles > maxnibbles || (nibbles >> 1) + 1 > len) \
@@ -320,6 +331,8 @@ do { \
len = (nibbles >> 1) + 1; \
\
data = evbuffer_pullup(evbuf, offset + len) + offset; \
+ if (!data) \
+ return (-1); \
\
while (nibbles > 0) { \
number <<= 4; \
diff --git a/sntp/libevent/evrpc-internal.h b/sntp/libevent/evrpc-internal.h
index e53d06e..9eb3763 100644
--- a/sntp/libevent/evrpc-internal.h
+++ b/sntp/libevent/evrpc-internal.h
@@ -27,6 +27,7 @@
#ifndef EVRPC_INTERNAL_H_INCLUDED_
#define EVRPC_INTERNAL_H_INCLUDED_
+#include "event2/http.h"
#include "http-internal.h"
struct evrpc;
diff --git a/sntp/libevent/evthread-internal.h b/sntp/libevent/evthread-internal.h
index 346b2bb..efdecf8 100644
--- a/sntp/libevent/evthread-internal.h
+++ b/sntp/libevent/evthread-internal.h
@@ -376,6 +376,13 @@ int evsig_global_setup_locks_(const int enable_locks);
int evutil_global_setup_locks_(const int enable_locks);
int evutil_secure_rng_global_setup_locks_(const int enable_locks);
+/** Return current evthread_lock_callbacks */
+struct evthread_lock_callbacks *evthread_get_lock_callbacks(void);
+/** Return current evthread_condition_callbacks */
+struct evthread_condition_callbacks *evthread_get_condition_callbacks(void);
+/** Disable locking for internal usage (like global shutdown) */
+void evthreadimpl_disable_lock_debugging_(void);
+
#endif
#ifdef __cplusplus
diff --git a/sntp/libevent/evthread.c b/sntp/libevent/evthread.c
index 4da5d24..02dab7a 100644
--- a/sntp/libevent/evthread.c
+++ b/sntp/libevent/evthread.c
@@ -69,12 +69,25 @@ evthread_set_id_callback(unsigned long (*id_fn)(void))
evthread_id_fn_ = id_fn;
}
+struct evthread_lock_callbacks *evthread_get_lock_callbacks()
+{
+ return evthread_lock_debugging_enabled_
+ ? &original_lock_fns_ : &evthread_lock_fns_;
+}
+struct evthread_condition_callbacks *evthread_get_condition_callbacks()
+{
+ return evthread_lock_debugging_enabled_
+ ? &original_cond_fns_ : &evthread_cond_fns_;
+}
+void evthreadimpl_disable_lock_debugging_(void)
+{
+ evthread_lock_debugging_enabled_ = 0;
+}
+
int
evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs)
{
- struct evthread_lock_callbacks *target =
- evthread_lock_debugging_enabled_
- ? &original_lock_fns_ : &evthread_lock_fns_;
+ struct evthread_lock_callbacks *target = evthread_get_lock_callbacks();
if (!cbs) {
if (target->alloc)
@@ -109,9 +122,7 @@ evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs)
int
evthread_set_condition_callbacks(const struct evthread_condition_callbacks *cbs)
{
- struct evthread_condition_callbacks *target =
- evthread_lock_debugging_enabled_
- ? &original_cond_fns_ : &evthread_cond_fns_;
+ struct evthread_condition_callbacks *target = evthread_get_condition_callbacks();
if (!cbs) {
if (target->alloc_condition)
diff --git a/sntp/libevent/evutil.c b/sntp/libevent/evutil.c
index c28cade..3d72e40 100644
--- a/sntp/libevent/evutil.c
+++ b/sntp/libevent/evutil.c
@@ -368,6 +368,20 @@ evutil_make_listen_socket_reuseable(evutil_socket_t sock)
}
int
+evutil_make_listen_socket_reuseable_port(evutil_socket_t sock)
+{
+#if defined __linux__ && defined(SO_REUSEPORT)
+ int one = 1;
+ /* REUSEPORT on Linux 3.9+ means, "Multiple servers (processes or
+ * threads) can bind to the same port if they each set the option. */
+ return setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, (void*) &one,
+ (ev_socklen_t)sizeof(one));
+#else
+ return 0;
+#endif
+}
+
+int
evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock)
{
#if defined(EVENT__HAVE_NETINET_TCP_H) && defined(TCP_DEFER_ACCEPT)
@@ -652,7 +666,7 @@ evutil_check_ifaddrs(void)
"GetAdaptersInfo", but that's deprecated; let's just try
GetAdaptersAddresses and fall back to connect+getsockname.
*/
- HANDLE lib = evutil_load_windows_system_library_(TEXT("ihplapi.dll"));
+ HMODULE lib = evutil_load_windows_system_library_(TEXT("ihplapi.dll"));
GetAdaptersAddresses_fn_t fn;
ULONG size, res;
IP_ADAPTER_ADDRESSES *addresses = NULL, *address;
@@ -1918,15 +1932,15 @@ evutil_inet_pton(int af, const char *src, void *dst)
return inet_pton(af, src, dst);
#else
if (af == AF_INET) {
- int a,b,c,d;
+ unsigned a,b,c,d;
char more;
struct in_addr *addr = dst;
- if (sscanf(src, "%d.%d.%d.%d%c", &a,&b,&c,&d,&more) != 4)
+ if (sscanf(src, "%u.%u.%u.%u%c", &a,&b,&c,&d,&more) != 4)
return 0;
- if (a < 0 || a > 255) return 0;
- if (b < 0 || b > 255) return 0;
- if (c < 0 || c > 255) return 0;
- if (d < 0 || d > 255) return 0;
+ if (a > 255) return 0;
+ if (b > 255) return 0;
+ if (c > 255) return 0;
+ if (d > 255) return 0;
addr->s_addr = htonl((a<<24) | (b<<16) | (c<<8) | d);
return 1;
#ifdef AF_INET6
@@ -1941,7 +1955,7 @@ evutil_inet_pton(int af, const char *src, void *dst)
else if (!dot)
eow = src+strlen(src);
else {
- int byte1,byte2,byte3,byte4;
+ unsigned byte1,byte2,byte3,byte4;
char more;
for (eow = dot-1; eow >= src && EVUTIL_ISDIGIT_(*eow); --eow)
;
@@ -1949,14 +1963,14 @@ evutil_inet_pton(int af, const char *src, void *dst)
/* We use "scanf" because some platform inet_aton()s are too lax
* about IPv4 addresses of the form "1.2.3" */
- if (sscanf(eow, "%d.%d.%d.%d%c",
+ if (sscanf(eow, "%u.%u.%u.%u%c",
&byte1,&byte2,&byte3,&byte4,&more) != 4)
return 0;
- if (byte1 > 255 || byte1 < 0 ||
- byte2 > 255 || byte2 < 0 ||
- byte3 > 255 || byte3 < 0 ||
- byte4 > 255 || byte4 < 0)
+ if (byte1 > 255 ||
+ byte2 > 255 ||
+ byte3 > 255 ||
+ byte4 > 255)
return 0;
words[6] = (byte1<<8) | byte2;
@@ -2453,7 +2467,7 @@ evutil_hex_char_to_int_(char c)
}
#ifdef _WIN32
-HANDLE
+HMODULE
evutil_load_windows_system_library_(const TCHAR *library_name)
{
TCHAR path[MAX_PATH];
diff --git a/sntp/libevent/evutil_time.c b/sntp/libevent/evutil_time.c
index e433043..8f53c66 100644
--- a/sntp/libevent/evutil_time.c
+++ b/sntp/libevent/evutil_time.c
@@ -54,6 +54,7 @@
#include "event2/util.h"
#include "util-internal.h"
#include "log-internal.h"
+#include "mm-internal.h"
#ifndef EVENT__HAVE_GETTIMEOFDAY
/* No gettimeofday; this must be windows. */
@@ -160,6 +161,55 @@ adjust_monotonic_time(struct evutil_monotonic_timer *base,
base->last_time = *tv;
}
+/*
+ Allocate a new struct evutil_monotonic_timer
+ */
+struct evutil_monotonic_timer *
+evutil_monotonic_timer_new(void)
+{
+ struct evutil_monotonic_timer *p = NULL;
+
+ p = mm_malloc(sizeof(*p));
+ if (!p) goto done;
+
+ memset(p, 0, sizeof(*p));
+
+ done:
+ return p;
+}
+
+/*
+ Free a struct evutil_monotonic_timer
+ */
+void
+evutil_monotonic_timer_free(struct evutil_monotonic_timer *timer)
+{
+ if (timer) {
+ mm_free(timer);
+ }
+}
+
+/*
+ Set up a struct evutil_monotonic_timer for initial use
+ */
+int
+evutil_configure_monotonic_time(struct evutil_monotonic_timer *timer,
+ int flags)
+{
+ return evutil_configure_monotonic_time_(timer, flags);
+}
+
+/*
+ Query the current monotonic time
+ */
+int
+evutil_gettime_monotonic(struct evutil_monotonic_timer *timer,
+ struct timeval *tp)
+{
+ return evutil_gettime_monotonic_(timer, tp);
+}
+
+
#if defined(HAVE_POSIX_MONOTONIC)
/* =====
The POSIX clock_gettime() interface provides a few ways to get at a
diff --git a/sntp/libevent/ht-internal.h b/sntp/libevent/ht-internal.h
index 8842f4c..50375bb 100644
--- a/sntp/libevent/ht-internal.h
+++ b/sntp/libevent/ht-internal.h
@@ -380,7 +380,6 @@ ht_string_hash_(const char *s)
{ \
if (head->hth_table) \
freefn(head->hth_table); \
- head->hth_table_length = 0; \
name##_HT_INIT(head); \
} \
/* Debugging helper: return false iff the representation of 'head' is \
diff --git a/sntp/libevent/http-internal.h b/sntp/libevent/http-internal.h
index 82dd402..a83160c 100644
--- a/sntp/libevent/http-internal.h
+++ b/sntp/libevent/http-internal.h
@@ -74,6 +74,7 @@ struct evhttp_connection {
#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */
#define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */
#define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */
+#define EVHTTP_CON_AUTOFREE 0x0008 /* set when we want to auto free the connection */
struct timeval timeout; /* timeout for events */
int retry_cnt; /* retry count */
@@ -99,6 +100,7 @@ struct evhttp_connection {
struct event_base *base;
struct evdns_base *dns_base;
+ int ai_family;
/* Saved conn_addr, to extract IP address from it.
*
diff --git a/sntp/libevent/http.c b/sntp/libevent/http.c
index 5147022..dd8c9cf 100644
--- a/sntp/libevent/http.c
+++ b/sntp/libevent/http.c
@@ -769,6 +769,7 @@ evhttp_connection_done(struct evhttp_connection *evcon)
{
struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
int con_outgoing = evcon->flags & EVHTTP_CON_OUTGOING;
+ int free_evcon = 0;
if (con_outgoing) {
/* idle or close the connection */
@@ -801,6 +802,12 @@ evhttp_connection_done(struct evhttp_connection *evcon)
* need to detect if the other side closes it.
*/
evhttp_connection_start_detectclose(evcon);
+ } else if ((evcon->flags & EVHTTP_CON_AUTOFREE)) {
+ /*
+ * If we have no more requests that need completion
+ * and we're not waiting for the connection to close
+ */
+ free_evcon = 1;
}
} else {
/*
@@ -819,6 +826,16 @@ evhttp_connection_done(struct evhttp_connection *evcon)
if (con_outgoing && ((req->flags & EVHTTP_USER_OWNED) == 0)) {
evhttp_request_free(req);
}
+
+ /* If this was the last request of an outgoing connection and we're
+ * not waiting to receive a connection close event and we want to
+ * automatically free the connection. We check to ensure our request
+ * list is empty one last time just in case our callback added a
+ * new request.
+ */
+ if (free_evcon && TAILQ_FIRST(&evcon->requests) == NULL) {
+ evhttp_connection_free(evcon);
+ }
}
/*
@@ -1175,6 +1192,11 @@ evhttp_connection_free(struct evhttp_connection *evcon)
}
void
+evhttp_connection_free_on_completion(struct evhttp_connection *evcon) {
+ evcon->flags |= EVHTTP_CON_AUTOFREE;
+}
+
+void
evhttp_connection_set_local_address(struct evhttp_connection *evcon,
const char *address)
{
@@ -1243,6 +1265,7 @@ evhttp_connection_reset_(struct evhttp_connection *evcon)
shutdown(evcon->fd, EVUTIL_SHUT_WR);
evutil_closesocket(evcon->fd);
+ bufferevent_setfd(evcon->bufev, -1);
evcon->fd = -1;
}
@@ -1285,6 +1308,7 @@ evhttp_connection_cb_cleanup(struct evhttp_connection *evcon)
{
struct evcon_requestq requests;
+ evhttp_connection_reset_(evcon);
if (evcon->retry_max < 0 || evcon->retry_cnt < evcon->retry_max) {
struct timeval tv_retry = evcon->initial_retry_timeout;
int i;
@@ -1306,7 +1330,6 @@ evhttp_connection_cb_cleanup(struct evhttp_connection *evcon)
evcon->retry_cnt++;
return;
}
- evhttp_connection_reset_(evcon);
/*
* User callback can do evhttp_make_request() on the same
@@ -1385,6 +1408,17 @@ evhttp_error_cb(struct bufferevent *bufev, short what, void *arg)
*/
EVUTIL_ASSERT(evcon->state == EVCON_IDLE);
evhttp_connection_reset_(evcon);
+
+ /*
+ * If we have no more requests that need completion
+ * and we want to auto-free the connection when all
+ * requests have been completed.
+ */
+ if (TAILQ_FIRST(&evcon->requests) == NULL
+ && (evcon->flags & EVHTTP_CON_OUTGOING)
+ && (evcon->flags & EVHTTP_CON_AUTOFREE)) {
+ evhttp_connection_free(evcon);
+ }
return;
}
@@ -2267,6 +2301,7 @@ evhttp_connection_base_bufferevent_new(struct event_base *base, struct evdns_bas
evhttp_deferred_read_cb, evcon);
evcon->dns_base = dnsbase;
+ evcon->ai_family = AF_UNSPEC;
return (evcon);
@@ -2294,6 +2329,12 @@ evhttp_connection_base_new(struct event_base *base, struct evdns_base *dnsbase,
return evhttp_connection_base_bufferevent_new(base, dnsbase, NULL, address, port);
}
+void evhttp_connection_set_family(struct evhttp_connection *evcon,
+ int family)
+{
+ evcon->ai_family = family;
+}
+
void
evhttp_connection_set_base(struct evhttp_connection *evcon,
struct event_base *base)
@@ -2419,7 +2460,7 @@ evhttp_connection_connect_(struct evhttp_connection *evcon)
evcon->state = EVCON_CONNECTING;
if (bufferevent_socket_connect_hostname(evcon->bufev, evcon->dns_base,
- AF_UNSPEC, evcon->address, evcon->port) < 0) {
+ evcon->ai_family, evcon->address, evcon->port) < 0) {
evcon->state = old_state;
event_sock_warn(evcon->fd, "%s: connection to \"%s\" failed",
__func__, evcon->address);
@@ -4289,6 +4330,8 @@ parse_port(const char *s, const char *eos)
portnum = (portnum * 10) + (*s - '0');
if (portnum < 0)
return -1;
+ if (portnum > 65535)
+ return -1;
++s;
}
return portnum;
diff --git a/sntp/libevent/include/event2/buffer.h b/sntp/libevent/include/event2/buffer.h
index 839d6e7..468588b 100644
--- a/sntp/libevent/include/event2/buffer.h
+++ b/sntp/libevent/include/event2/buffer.h
@@ -105,13 +105,8 @@ struct evbuffer
Used when repeatedly searching through a buffer. Calling any function
that modifies or re-packs the buffer contents may invalidate all
- evbuffer_ptrs for that buffer. Do not modify these values except with
- evbuffer_ptr_set.
-
- Used when repeatedly searching through a buffer. Calls to any function
- that modifies or re-packs the buffer contents may invalidate all
- evbuffer_ptrs for that buffer. Do not modify these values except with
- evbuffer_ptr_set.
+ evbuffer_ptrs for that buffer. Do not modify or contruct these values
+ except with evbuffer_ptr_set.
An evbuffer_ptr can represent any position from the start of a buffer up
to a position immediately after the end of a buffer.
@@ -787,7 +782,7 @@ enum evbuffer_ptr_how {
There are two ways to use this function: you can call
evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_SET)
to move 'pos' to a position 'N' bytes after the start of the buffer, or
- evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_SET)
+ evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_ADD)
to move 'pos' forward by 'N' bytes.
If evbuffer_ptr is not initialized, this function can only be called
diff --git a/sntp/libevent/include/event2/bufferevent.h b/sntp/libevent/include/event2/bufferevent.h
index 46203b0..fe8a74d 100644
--- a/sntp/libevent/include/event2/bufferevent.h
+++ b/sntp/libevent/include/event2/bufferevent.h
@@ -535,8 +535,9 @@ void bufferevent_setwatermark(struct bufferevent *bufev, short events,
size_t lowmark, size_t highmark);
/**
- Retrieves the watermarks for read or write events. Result is undefined if
- events contains both EV_READ and EV_WRITE.
+ Retrieves the watermarks for read or write events.
+ Returns non-zero if events contains not only EV_READ or EV_WRITE.
+ Returns zero if events equal EV_READ or EV_WRITE
@param bufev the bufferevent to be examined
@param events EV_READ or EV_WRITE
@@ -544,7 +545,7 @@ void bufferevent_setwatermark(struct bufferevent *bufev, short events,
@param highmark receives the high watermark if not NULL
*/
EVENT2_EXPORT_SYMBOL
-void bufferevent_getwatermark(struct bufferevent *bufev, short events,
+int bufferevent_getwatermark(struct bufferevent *bufev, short events,
size_t *lowmark, size_t *highmark);
/**
@@ -598,7 +599,7 @@ enum bufferevent_trigger_options {
BEV_TRIG_IGNORE_WATERMARKS = (1<<16),
/** defer even if the callbacks are not */
- BEV_TRIG_DEFER_CALLBACKS = BEV_OPT_DEFER_CALLBACKS,
+ BEV_TRIG_DEFER_CALLBACKS = BEV_OPT_DEFER_CALLBACKS
/* (Note: for internal reasons, these need to be disjoint from
* bufferevent_options, except when they mean the same thing. */
diff --git a/sntp/libevent/include/event2/dns.h b/sntp/libevent/include/event2/dns.h
index a00c83e..17cd86a 100644
--- a/sntp/libevent/include/event2/dns.h
+++ b/sntp/libevent/include/event2/dns.h
@@ -453,7 +453,7 @@ int evdns_base_set_option(struct evdns_base *base, const char *option, const cha
@param base the evdns_base to which to apply this operation
@param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC|
- DNS_OPTIONS_HOSTSFILE|DNS_OPTIONS_ALL
+ DNS_OPTION_HOSTSFILE|DNS_OPTIONS_ALL
@param filename the path to the resolv.conf file
@return 0 if successful, or various positive error codes if an error
occurred (see above)
@@ -694,6 +694,22 @@ struct evdns_getaddrinfo_request *evdns_getaddrinfo(
EVENT2_EXPORT_SYMBOL
void evdns_getaddrinfo_cancel(struct evdns_getaddrinfo_request *req);
+/**
+ Retrieve the address of the 'idx'th configured nameserver.
+
+ @param base The evdns_base to examine.
+ @param idx The index of the nameserver to get the address of.
+ @param sa A location to receive the server's address.
+ @param len The number of bytes available at sa.
+
+ @return the number of bytes written into sa on success. On failure, returns
+ -1 if idx is greater than the number of configured nameservers, or a
+ value greater than 'len' if len was not high enough.
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_base_get_nameserver_addr(struct evdns_base *base, int idx,
+ struct sockaddr *sa, ev_socklen_t len);
+
#ifdef __cplusplus
}
#endif
diff --git a/sntp/libevent/include/event2/event.h b/sntp/libevent/include/event2/event.h
index 6e2b884..570031f 100644
--- a/sntp/libevent/include/event2/event.h
+++ b/sntp/libevent/include/event2/event.h
@@ -396,6 +396,12 @@ const char *event_base_get_method(const struct event_base *);
EVENT2_EXPORT_SYMBOL
const char **event_get_supported_methods(void);
+/** Query the current monotonic time from a the timer for a struct
+ * event_base.
+ */
+EVENT2_EXPORT_SYMBOL
+int event_gettime_monotonic(struct event_base *base, struct timeval *tp);
+
/**
@name event type flag
@@ -771,6 +777,10 @@ void event_set_fatal_callback(event_fatal_cb cb);
EVENT2_EXPORT_SYMBOL
void event_enable_debug_logging(ev_uint32_t which);
+EVENT2_EXPORT_SYMBOL
+void
+event_disable_debug_mode(void);
+
/**
Associate a different event base with an event.
diff --git a/sntp/libevent/include/event2/http.h b/sntp/libevent/include/event2/http.h
index 81f44b8..4284d5f 100644
--- a/sntp/libevent/include/event2/http.h
+++ b/sntp/libevent/include/event2/http.h
@@ -630,6 +630,12 @@ struct evhttp_connection *evhttp_connection_base_new(
struct event_base *base, struct evdns_base *dnsbase,
const char *address, unsigned short port);
+/**
+ * Set family hint for DNS requests.
+ */
+void evhttp_connection_set_family(struct evhttp_connection *evcon,
+ int family);
+
/** Takes ownership of the request object
*
* Can be used in a request callback to keep onto the request until
@@ -669,6 +675,14 @@ void evhttp_connection_set_max_body_size(struct evhttp_connection* evcon,
EVENT2_EXPORT_SYMBOL
void evhttp_connection_free(struct evhttp_connection *evcon);
+/** Disowns a given connection object
+ *
+ * Can be used to tell libevent to free the connection object after
+ * the last request has completed or failed.
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_free_on_completion(struct evhttp_connection *evcon);
+
/** sets the ip address from which http connections are made */
EVENT2_EXPORT_SYMBOL
void evhttp_connection_set_local_address(struct evhttp_connection *evcon,
diff --git a/sntp/libevent/include/event2/listener.h b/sntp/libevent/include/event2/listener.h
index 8c77803..84b4da0 100644
--- a/sntp/libevent/include/event2/listener.h
+++ b/sntp/libevent/include/event2/listener.h
@@ -88,6 +88,15 @@ typedef void (*evconnlistener_errorcb)(struct evconnlistener *, void *);
* to use the option before it is actually bound.
*/
#define LEV_OPT_DEFERRED_ACCEPT (1u<<6)
+/** Flag: Indicates that we ask to allow multiple servers (processes or
+ * threads) to bind to the same port if they each set the option.
+ *
+ * SO_REUSEPORT is what most people would expect SO_REUSEADDR to be, however
+ * SO_REUSEPORT does not imply SO_REUSEADDR.
+ *
+ * This is only available on Linux and kernel 3.9+
+ */
+#define LEV_OPT_REUSEABLE_PORT (1u<<7)
/**
Allocate a new evconnlistener object to listen for incoming TCP connections
diff --git a/sntp/libevent/include/event2/util.h b/sntp/libevent/include/event2/util.h
index 14c6a25..b152a4b 100644
--- a/sntp/libevent/include/event2/util.h
+++ b/sntp/libevent/include/event2/util.h
@@ -292,6 +292,62 @@ extern "C" {
#define evutil_socket_t int
#endif
+/**
+ * Structure to hold information about a monotonic timer
+ *
+ * Use this with evutil_configure_monotonic_time() and
+ * evutil_gettime_monotonic().
+ *
+ * This is an opaque structure; you can allocate one using
+ * evutil_monotonic_timer_new().
+ *
+ * @see evutil_monotonic_timer_new(), evutil_monotonic_timer_free(),
+ * evutil_configure_monotonic_time(), evutil_gettime_monotonic()
+ */
+struct evutil_monotonic_timer
+#ifdef EVENT_IN_DOXYGEN_
+{/*Empty body so that doxygen will generate documentation here.*/}
+#endif
+;
+
+#define EV_MONOT_PRECISE 1
+#define EV_MONOT_FALLBACK 2
+
+/** Allocate a new struct evutil_monotonic_timer for use with the
+ * evutil_configure_monotonic_time() and evutil_gettime_monotonic()
+ * functions. You must configure the timer with
+ * evutil_configure_monotonic_time() before using it.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evutil_monotonic_timer * evutil_monotonic_timer_new(void);
+
+/** Free a struct evutil_monotonic_timer that was allocated using
+ * evutil_monotonic_timer_new().
+ */
+EVENT2_EXPORT_SYMBOL
+void evutil_monotonic_timer_free(struct evutil_monotonic_timer *timer);
+
+/** Set up a struct evutil_monotonic_timer; flags can include
+ * EV_MONOT_PRECISE and EV_MONOT_FALLBACK.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_configure_monotonic_time(struct evutil_monotonic_timer *timer,
+ int flags);
+
+/** Query the current monotonic time from a struct evutil_monotonic_timer
+ * previously configured with evutil_configure_monotonic_time(). Monotonic
+ * time is guaranteed never to run in reverse, but is not necessarily epoch-
+ * based, or relative to any other definite point. Use it to make reliable
+ * measurements of elapsed time between events even when the system time
+ * may be changed.
+ *
+ * It is not safe to use this funtion on the same timer from multiple
+ * threads.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_gettime_monotonic(struct evutil_monotonic_timer *timer,
+ struct timeval *tp);
+
/** Create two new sockets that are connected to each other.
On Unix, this simply calls socketpair(). On Windows, it uses the
@@ -327,6 +383,19 @@ int evutil_make_socket_nonblocking(evutil_socket_t sock);
EVENT2_EXPORT_SYMBOL
int evutil_make_listen_socket_reuseable(evutil_socket_t sock);
+/** Do platform-specific operations to make a listener port reusable.
+
+ Specifically, we want to make sure that multiple programs which also
+ set the same socket option will be able to bind, listen at the same time.
+
+ This is a feature available only to Linux 3.9+
+
+ @param sock The socket to make reusable
+ @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_make_listen_socket_reuseable_port(evutil_socket_t sock);
+
/** Do platform-specific operations as needed to close a socket upon a
successful execution of one of the exec*() functions.
diff --git a/sntp/libevent/kqueue.c b/sntp/libevent/kqueue.c
index 3933467..a6578df 100644
--- a/sntp/libevent/kqueue.c
+++ b/sntp/libevent/kqueue.c
@@ -332,6 +332,23 @@ kq_dispatch(struct event_base *base, struct timeval *tv)
* on FreeBSD. */
case EINVAL:
continue;
+#if defined(__FreeBSD__) && defined(ENOTCAPABLE)
+ /*
+ * This currently occurs if an FD is closed
+ * before the EV_DELETE makes it out via kevent().
+ * The FreeBSD capabilities code sees the blank
+ * capability set and rejects the request to
+ * modify an event.
+ *
+ * To be strictly correct - when an FD is closed,
+ * all the registered events are also removed.
+ * Queuing EV_DELETE to a closed FD is wrong.
+ * The event(s) should just be deleted from
+ * the pending changelist.
+ */
+ case ENOTCAPABLE:
+ continue;
+#endif
/* Can occur on a delete if the fd is closed. */
case EBADF:
diff --git a/sntp/libevent/listener.c b/sntp/libevent/listener.c
index 3272c40..172d292 100644
--- a/sntp/libevent/listener.c
+++ b/sntp/libevent/listener.c
@@ -235,6 +235,11 @@ evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb,
goto err;
}
+ if (flags & LEV_OPT_REUSEABLE_PORT) {
+ if (evutil_make_listen_socket_reuseable_port(fd) < 0)
+ goto err;
+ }
+
if (flags & LEV_OPT_DEFERRED_ACCEPT) {
if (evutil_make_tcp_listen_socket_deferred(fd) < 0)
goto err;
diff --git a/sntp/libevent/m4/acx_pthread.m4 b/sntp/libevent/m4/acx_pthread.m4
new file mode 100644
index 0000000..d2b1169
--- /dev/null
+++ b/sntp/libevent/m4/acx_pthread.m4
@@ -0,0 +1,279 @@
+##### http://autoconf-archive.cryp.to/acx_pthread.html
+#
+# SYNOPSIS
+#
+# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads.
+# It sets the PTHREAD_LIBS output variable to the threads library and
+# linker flags, and the PTHREAD_CFLAGS output variable to any special
+# C compiler flags that are needed. (The user can also force certain
+# compiler flags/libs to be tested by setting these environment
+# variables.)
+#
+# Also sets PTHREAD_CC to any special C compiler that is needed for
+# multi-threaded programs (defaults to the value of CC otherwise).
+# (This is necessary on AIX to use the special cc_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these
+# flags, but also link it with them as well. e.g. you should link
+# with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
+# $LIBS
+#
+# If you are only building threads programs, you may wish to use
+# these variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
+# constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
+# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads
+# library is found, and ACTION-IF-NOT-FOUND is a list of commands to
+# run it if it is not found. If ACTION-IF-FOUND is not specified, the
+# default action will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or
+# if you have any other suggestions or comments. This macro was based
+# on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/)
+# (with help from M. Frigo), as well as ac_pthread and hb_pthread
+# macros posted by Alejandro Forero Cuervo to the autoconf macro
+# repository. We are also grateful for the helpful feedback of
+# numerous users.
+#
+# LAST MODIFICATION
+#
+# 2007-07-29
+#
+# COPYLEFT
+#
+# Copyright (c) 2007 Steven G. Johnson <stevenj@alum.mit.edu>
+#
+# This program is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright
+# owner gives unlimited permission to copy, distribute and modify the
+# configure scripts that are the output of Autoconf when processing
+# the Macro. You need not follow the terms of the GNU General Public
+# License when using or distributing such scripts, even though
+# portions of the text of the Macro appear in them. The GNU General
+# Public License (GPL) does govern all other use of the material that
+# constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the
+# Autoconf Macro released by the Autoconf Macro Archive. When you
+# make and distribute a modified version of the Autoconf Macro, you
+# may extend this special exception to the GPL to apply to your
+# modified version as well.
+
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+ AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+ *solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+ case $flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $flag])
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ AC_MSG_CHECKING([for the pthreads library -l$flag])
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+ [acx_pthread_ok=yes])
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test "x$acx_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_MSG_CHECKING([for joinable pthread attribute])
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
+ [attr_name=$attr; break])
+ done
+ AC_MSG_RESULT($attr_name)
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ fi
+
+ AC_MSG_CHECKING([if more special flags are required for pthreads])
+ flag=no
+ case "${host_cpu}-${host_os}" in
+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ esac
+ AC_MSG_RESULT(${flag})
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # More AIX lossage: must compile with xlc_r or cc_r
+ if test x"$GCC" != xyes; then
+ AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
+ else
+ PTHREAD_CC=$CC
+ fi
+else
+ PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+ :
+else
+ acx_pthread_ok=no
+ $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
diff --git a/sntp/libevent/sample/http-server.c b/sntp/libevent/sample/http-server.c
index 1cb89bc..cbb9c91 100644
--- a/sntp/libevent/sample/http-server.c
+++ b/sntp/libevent/sample/http-server.c
@@ -246,7 +246,10 @@ send_document_cb(struct evhttp_request *req, void *arg)
goto err;
#endif
- evbuffer_add_printf(evb, "<html>\n <head>\n"
+ evbuffer_add_printf(evb,
+ "<!DOCTYPE html>\n"
+ "<html>\n <head>\n"
+ " <meta charset='utf-8'>\n"
" <title>%s</title>\n"
" <base href='%s%s'>\n"
" </head>\n"
@@ -274,7 +277,7 @@ send_document_cb(struct evhttp_request *req, void *arg)
#endif
evbuffer_add_printf(evb, "</ul></body></html>\n");
#ifdef _WIN32
- CloseHandle(d);
+ FindClose(d);
#else
closedir(d);
#endif
diff --git a/sntp/libevent/sample/https-client.c b/sntp/libevent/sample/https-client.c
index e13ac4b..fbd5de8 100644
--- a/sntp/libevent/sample/https-client.c
+++ b/sntp/libevent/sample/https-client.c
@@ -96,7 +96,7 @@ static void
syntax(void)
{
fputs("Syntax:\n", stderr);
- fputs(" https-client -url <https-url> [-data data-file.bin] [-ignore-cert]\n", stderr);
+ fputs(" https-client -url <https-url> [-data data-file.bin] [-ignore-cert] [-retries num]\n", stderr);
fputs("Example:\n", stderr);
fputs(" https-client -url https://ip.appspot.com/\n", stderr);
@@ -195,6 +195,7 @@ main(int argc, char **argv)
const char *scheme, *host, *path, *query;
char uri[256];
int port;
+ int retries = 0;
SSL_CTX *ssl_ctx;
SSL *ssl;
@@ -221,6 +222,12 @@ main(int argc, char **argv)
} else {
syntax();
}
+ } else if (!strcmp("-retries", argv[i])) {
+ if (i < argc - 1) {
+ retries = atoi(argv[i + 1]);
+ } else {
+ syntax();
+ }
} else if (!strcmp("-help", argv[i])) {
syntax();
}
@@ -346,8 +353,10 @@ main(int argc, char **argv)
die_openssl("SSL_new()");
}
+ #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
// Set hostname for SNI extension
SSL_set_tlsext_host_name(ssl, host);
+ #endif
if (strcasecmp(scheme, "http") == 0) {
bev = bufferevent_socket_new(base, -1, BEV_OPT_CLOSE_ON_FREE);
@@ -373,6 +382,10 @@ main(int argc, char **argv)
return 1;
}
+ if (retries > 0) {
+ evhttp_connection_set_retries(evcon, retries);
+ }
+
// Fire off the request
req = evhttp_request_new(http_request_done, bev);
if (req == NULL) {
@@ -402,7 +415,7 @@ main(int argc, char **argv)
evbuffer_add(output_buffer, buf, s);
bytes += s;
}
- evutil_snprintf(buf, sizeof(buf)-1, "%lu", bytes);
+ evutil_snprintf(buf, sizeof(buf)-1, "%lu", (unsigned long)bytes);
evhttp_add_header(output_headers, "Content-Length", buf);
fclose(f);
}
diff --git a/sntp/libevent/sample/include.am b/sntp/libevent/sample/include.am
index 81980ac..75f87c7 100644
--- a/sntp/libevent/sample/include.am
+++ b/sntp/libevent/sample/include.am
@@ -30,7 +30,9 @@ noinst_HEADERS += \
sample/openssl_hostname_validation.h
endif
+if BUILD_SAMPLES
noinst_PROGRAMS += $(SAMPLES)
+endif
$(SAMPLES) : libevent.la
diff --git a/sntp/libevent/test/include.am b/sntp/libevent/test/include.am
index ca36da4..4cd49ef 100644
--- a/sntp/libevent/test/include.am
+++ b/sntp/libevent/test/include.am
@@ -49,7 +49,8 @@ TESTS = test/test-script.sh
test/test-script.sh: test/test.sh
cp $(top_srcdir)/test/test.sh $@
-DISTCLEANFILES += test/test-script.sh test/regress.gen.c test/regress.gen.h
+DISTCLEANFILES += test/test-script.sh
+DISTCLEANFILES += test/regress.gen.c test/regress.gen.h
if BUILD_REGRESS
BUILT_SOURCES += test/regress.gen.c test/regress.gen.h
diff --git a/sntp/libevent/test/regress.c b/sntp/libevent/test/regress.c
index 4d17b67..399ba2f 100644
--- a/sntp/libevent/test/regress.c
+++ b/sntp/libevent/test/regress.c
@@ -944,17 +944,18 @@ signal_cb(evutil_socket_t fd, short event, void *arg)
}
static void
-test_simplesignal(void)
+test_simplesignal_impl(int find_reorder)
{
struct event ev;
struct itimerval itv;
- setup_test("Simple signal: ");
evsignal_set(&ev, SIGALRM, signal_cb, &ev);
evsignal_add(&ev, NULL);
/* find bugs in which operations are re-ordered */
- evsignal_del(&ev);
- evsignal_add(&ev, NULL);
+ if (find_reorder) {
+ evsignal_del(&ev);
+ evsignal_add(&ev, NULL);
+ }
memset(&itv, 0, sizeof(itv));
itv.it_value.tv_sec = 0;
@@ -971,6 +972,20 @@ test_simplesignal(void)
}
static void
+test_simplestsignal(void)
+{
+ setup_test("Simplest one signal: ");
+ test_simplesignal_impl(0);
+}
+
+static void
+test_simplesignal(void)
+{
+ setup_test("Simple signal: ");
+ test_simplesignal_impl(1);
+}
+
+static void
test_multiplesignal(void)
{
struct event ev_one, ev_two;
@@ -1658,7 +1673,7 @@ static void
test_active_later(void *ptr)
{
struct basic_test_data *data = ptr;
- struct event *ev1, *ev2;
+ struct event *ev1 = NULL, *ev2 = NULL;
struct event ev3, ev4;
struct timeval qsec = {0, 100000};
ev1 = event_new(data->base, data->pair[0], EV_READ|EV_PERSIST, read_and_drain_cb, NULL);
@@ -1693,10 +1708,15 @@ test_active_later(void *ptr)
* it. */
event_active_later_(&ev3, EV_READ);
event_base_assert_ok_(data->base);
+
+end:
+ if (ev1)
+ event_free(ev1);
+ if (ev2)
+ event_free(ev2);
+
event_base_free(data->base);
data->base = NULL;
-end:
- ;
}
@@ -2281,7 +2301,7 @@ evtag_fuzz(void *ptr)
for (j = 0; j < 100; j++) {
for (i = 0; i < (int)sizeof(buffer); i++)
- buffer[i] = rand();
+ buffer[i] = test_weakrand();
evbuffer_drain(tmp, -1);
evbuffer_add(tmp, buffer, sizeof(buffer));
@@ -3294,6 +3314,7 @@ struct testcase_t evtag_testcases[] = {
struct testcase_t signal_testcases[] = {
#ifndef _WIN32
+ LEGACY(simplestsignal, TT_ISOLATED),
LEGACY(simplesignal, TT_ISOLATED),
LEGACY(multiplesignal, TT_ISOLATED),
LEGACY(immediatesignal, TT_ISOLATED),
diff --git a/sntp/libevent/test/regress.h b/sntp/libevent/test/regress.h
index a9892b0..bbfefe6 100644
--- a/sntp/libevent/test/regress.h
+++ b/sntp/libevent/test/regress.h
@@ -53,6 +53,10 @@ extern struct testcase_t listener_testcases[];
extern struct testcase_t listener_iocp_testcases[];
extern struct testcase_t thread_testcases[];
+extern struct evutil_weakrand_state test_weakrand_state;
+
+#define test_weakrand() (evutil_weakrand_(&test_weakrand_state))
+
void regress_threads(void *);
void test_bufferevent_zlib(void *);
@@ -114,7 +118,7 @@ int test_ai_eq_(const struct evutil_addrinfo *ai, const char *sockaddr_port,
} while (0)
#define test_timeval_diff_leq(tv1, tv2, diff, tolerance) \
- tt_int_op(abs(timeval_msec_diff((tv1), (tv2)) - diff), <=, tolerance)
+ tt_int_op(labs(timeval_msec_diff((tv1), (tv2)) - diff), <=, tolerance)
#define test_timeval_diff_eq(tv1, tv2, diff) \
test_timeval_diff_leq((tv1), (tv2), (diff), 50)
diff --git a/sntp/libevent/test/regress_buffer.c b/sntp/libevent/test/regress_buffer.c
index ccb1487..4d6a5de 100644
--- a/sntp/libevent/test/regress_buffer.c
+++ b/sntp/libevent/test/regress_buffer.c
@@ -246,7 +246,7 @@ test_evbuffer(void *ptr)
if (memcmp(evbuffer_pullup(
evb, -1), buffer, sizeof(buffer) / 2) != 0 ||
memcmp(evbuffer_pullup(
- evb_two, -1), buffer, sizeof(buffer) != 0))
+ evb_two, -1), buffer, sizeof(buffer)) != 0)
tt_abort_msg("Pullup did not preserve content");
evbuffer_validate(evb);
@@ -863,6 +863,10 @@ test_evbuffer_add_file(void *ptr)
evutil_closesocket(pair[0]);
if (pair[1] >= 0)
evutil_closesocket(pair[1]);
+ if (wev)
+ event_free(wev);
+ if (rev)
+ event_free(rev);
if (tmpfilename) {
unlink(tmpfilename);
free(tmpfilename);
@@ -1534,9 +1538,9 @@ test_evbuffer_callbacks(void *ptr)
tt_assert(!evbuffer_remove_cb(buf, log_change_callback, buf_out2));
evbuffer_validate(buf);
- tt_str_op(evbuffer_pullup(buf_out1, -1), ==,
+ tt_str_op((const char *) evbuffer_pullup(buf_out1, -1), ==,
"0->36; 36->26; 26->31; 31->38; ");
- tt_str_op(evbuffer_pullup(buf_out2, -1), ==,
+ tt_str_op((const char *) evbuffer_pullup(buf_out2, -1), ==,
"0->36; 31->38; 38->0; 0->1; ");
evbuffer_drain(buf_out1, evbuffer_get_length(buf_out1));
evbuffer_drain(buf_out2, evbuffer_get_length(buf_out2));
@@ -1552,7 +1556,7 @@ test_evbuffer_callbacks(void *ptr)
tt_uint_op(evbuffer_get_length(buf_out2), ==, 0);
evbuffer_setcb(buf, NULL, NULL);
evbuffer_add_printf(buf, "This will not.");
- tt_str_op(evbuffer_pullup(buf, -1), ==, "This will not.");
+ tt_str_op((const char *) evbuffer_pullup(buf, -1), ==, "This will not.");
evbuffer_validate(buf);
evbuffer_drain(buf, evbuffer_get_length(buf));
evbuffer_validate(buf);
@@ -1660,7 +1664,7 @@ test_evbuffer_add_reference(void *ptr)
evbuffer_add(buf1, "You shake and shake the ", 24);
evbuffer_add_reference(buf1, "ketchup bottle", 14, ref_done_cb,
(void*)3333);
- evbuffer_add(buf1, ". Nothing comes and then a lot'll.", 42);
+ evbuffer_add(buf1, ". Nothing comes and then a lot'll.", 35);
evbuffer_free(buf1);
buf1 = NULL;
tt_int_op(ref_done_cb_called_count, ==, 3);
@@ -1840,6 +1844,42 @@ end:
}
static void
+test_evbuffer_peek_first_gt(void *info)
+{
+ struct evbuffer *buf = NULL, *tmp_buf = NULL;
+ struct evbuffer_ptr ptr;
+ struct evbuffer_iovec v[2];
+
+ buf = evbuffer_new();
+ tmp_buf = evbuffer_new();
+ evbuffer_add_printf(tmp_buf, "Contents of chunk 100\n");
+ evbuffer_add_buffer(buf, tmp_buf);
+ evbuffer_add_printf(tmp_buf, "Contents of chunk 1\n");
+ evbuffer_add_buffer(buf, tmp_buf);
+
+ evbuffer_ptr_set(buf, &ptr, 0, EVBUFFER_PTR_SET);
+
+ /** The only case that matters*/
+ tt_int_op(evbuffer_peek(buf, -1, &ptr, NULL, 0), ==, 2);
+ /** Just in case */
+ tt_int_op(evbuffer_peek(buf, -1, &ptr, v, 2), ==, 2);
+
+ evbuffer_ptr_set(buf, &ptr, 20, EVBUFFER_PTR_ADD);
+ tt_int_op(evbuffer_peek(buf, -1, &ptr, NULL, 0), ==, 2);
+ tt_int_op(evbuffer_peek(buf, -1, &ptr, v, 2), ==, 2);
+ tt_int_op(evbuffer_peek(buf, 2, &ptr, NULL, 0), ==, 1);
+ tt_int_op(evbuffer_peek(buf, 2, &ptr, v, 2), ==, 1);
+ tt_int_op(evbuffer_peek(buf, 3, &ptr, NULL, 0), ==, 2);
+ tt_int_op(evbuffer_peek(buf, 3, &ptr, v, 2), ==, 2);
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+ if (tmp_buf)
+ evbuffer_free(tmp_buf);
+}
+
+static void
test_evbuffer_peek(void *info)
{
struct evbuffer *buf = NULL, *tmp_buf = NULL;
@@ -2096,7 +2136,7 @@ test_evbuffer_copyout(void *dummy)
"When the rich Allobrogenses never kept amanuenses, "
"And our only plots were piled in lakes at Berne.";
/* -- Kipling, "In The Neolithic Age" */
- char tmp[256];
+ char tmp[1024];
struct evbuffer_ptr ptr;
struct evbuffer *buf;
@@ -2206,6 +2246,7 @@ struct testcase_t evbuffer_testcases[] = {
{ "multicast_drain", test_evbuffer_multicast_drain, 0, NULL, NULL },
{ "prepend", test_evbuffer_prepend, TT_FORK, NULL, NULL },
{ "peek", test_evbuffer_peek, 0, NULL, NULL },
+ { "peek_first_gt", test_evbuffer_peek_first_gt, 0, NULL, NULL },
{ "freeze_start", test_evbuffer_freeze, 0, &nil_setup, (void*)"start" },
{ "freeze_end", test_evbuffer_freeze, 0, &nil_setup, (void*)"end" },
{ "add_iovec", test_evbuffer_add_iovec, 0, NULL, NULL},
diff --git a/sntp/libevent/test/regress_bufferevent.c b/sntp/libevent/test/regress_bufferevent.c
index 4ec2dcc..a1998ba 100644
--- a/sntp/libevent/test/regress_bufferevent.c
+++ b/sntp/libevent/test/regress_bufferevent.c
@@ -75,6 +75,7 @@
#include "event2/util.h"
#include "bufferevent-internal.h"
+#include "evthread-internal.h"
#include "util-internal.h"
#ifdef _WIN32
#include "iocp-internal.h"
@@ -173,9 +174,9 @@ test_bufferevent_impl(int use_pair)
event_dispatch();
- bufferevent_free(bev1);
- tt_ptr_op(bufferevent_pair_get_partner(bev2), ==, NULL);
bufferevent_free(bev2);
+ tt_ptr_op(bufferevent_pair_get_partner(bev1), ==, NULL);
+ bufferevent_free(bev1);
if (test_ok != 2)
test_ok = 0;
@@ -195,6 +196,143 @@ test_bufferevent_pair(void)
test_bufferevent_impl(1);
}
+#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED)
+/**
+ * Trace lock/unlock/alloc/free for locks.
+ * (More heavier then evthread_debug*)
+ */
+typedef struct
+{
+ void *lock;
+ enum {
+ ALLOC, FREE,
+ } status;
+ size_t locked /** allow recursive locking */;
+} lock_wrapper;
+struct lock_unlock_base
+{
+ /* Original callbacks */
+ struct evthread_lock_callbacks cbs;
+ /* Map of locks */
+ lock_wrapper *locks;
+ size_t nr_locks;
+} lu_base = {
+ .locks = NULL,
+};
+
+static lock_wrapper *lu_find(void *lock_)
+{
+ size_t i;
+ for (i = 0; i < lu_base.nr_locks; ++i) {
+ lock_wrapper *lock = &lu_base.locks[i];
+ if (lock->lock == lock_)
+ return lock;
+ }
+ return NULL;
+}
+
+static void *trace_lock_alloc(unsigned locktype)
+{
+ ++lu_base.nr_locks;
+ lu_base.locks = realloc(lu_base.locks,
+ sizeof(lock_wrapper) * lu_base.nr_locks);
+ void *lock = lu_base.cbs.alloc(locktype);
+ lu_base.locks[lu_base.nr_locks - 1] = (lock_wrapper){ lock, ALLOC, 0 };
+ return lock;
+}
+static void trace_lock_free(void *lock_, unsigned locktype)
+{
+ lock_wrapper *lock = lu_find(lock_);
+ if (!lock || lock->status == FREE || lock->locked) {
+ __asm__("int3");
+ TT_FAIL(("lock: free error"));
+ } else {
+ lock->status = FREE;
+ lu_base.cbs.free(lock_, locktype);
+ }
+}
+static int trace_lock_lock(unsigned mode, void *lock_)
+{
+ lock_wrapper *lock = lu_find(lock_);
+ if (!lock || lock->status == FREE) {
+ TT_FAIL(("lock: lock error"));
+ return -1;
+ } else {
+ ++lock->locked;
+ return lu_base.cbs.lock(mode, lock_);
+ }
+}
+static int trace_lock_unlock(unsigned mode, void *lock_)
+{
+ lock_wrapper *lock = lu_find(lock_);
+ if (!lock || lock->status == FREE || !lock->locked) {
+ TT_FAIL(("lock: unlock error"));
+ return -1;
+ } else {
+ --lock->locked;
+ return lu_base.cbs.unlock(mode, lock_);
+ }
+}
+static void lock_unlock_free_thread_cbs()
+{
+ event_base_free(NULL);
+
+ /** drop immutable flag */
+ evthread_set_lock_callbacks(NULL);
+ /** avoid calling of event_global_setup_locks_() for new cbs */
+ libevent_global_shutdown();
+ /** drop immutable flag for non-debug ops (since called after shutdown) */
+ evthread_set_lock_callbacks(NULL);
+}
+
+static int use_lock_unlock_profiler(void)
+{
+ struct evthread_lock_callbacks cbs = {
+ EVTHREAD_LOCK_API_VERSION,
+ EVTHREAD_LOCKTYPE_RECURSIVE,
+ trace_lock_alloc,
+ trace_lock_free,
+ trace_lock_lock,
+ trace_lock_unlock,
+ };
+ memcpy(&lu_base.cbs, evthread_get_lock_callbacks(),
+ sizeof(lu_base.cbs));
+ {
+ lock_unlock_free_thread_cbs();
+
+ evthread_set_lock_callbacks(&cbs);
+ /** re-create debug locks correctly */
+ evthread_enable_lock_debugging();
+
+ event_init();
+ }
+ return 0;
+}
+static void free_lock_unlock_profiler(struct basic_test_data *data)
+{
+ lock_unlock_free_thread_cbs();
+ free(lu_base.locks);
+ data->base = NULL;
+}
+
+static void test_bufferevent_pair_release_lock(void *arg)
+{
+ struct basic_test_data *data = arg;
+ use_lock_unlock_profiler();
+ {
+ struct bufferevent *pair[2];
+ if (!bufferevent_pair_new(NULL, BEV_OPT_THREADSAFE, pair)) {
+ bufferevent_free(pair[0]);
+ bufferevent_free(pair[1]);
+ } else
+ tt_abort_perror("bufferevent_pair_new");
+ }
+ free_lock_unlock_profiler(data);
+end:
+ ;
+}
+#endif
+
/*
* test watermarks and bufferevent
*/
@@ -287,6 +425,11 @@ test_bufferevent_watermarks_impl(int use_pair)
tt_int_op(low, ==, 100);
tt_int_op(high, ==, 2000);
+ {
+ int r = bufferevent_getwatermark(bev1, EV_WRITE | EV_READ, &low, &high);
+ tt_int_op(r, !=, 0);
+ }
+
bufferevent_write(bev1, buffer, sizeof(buffer));
event_dispatch();
@@ -944,6 +1087,11 @@ struct testcase_t bufferevent_testcases[] = {
LEGACY(bufferevent, TT_ISOLATED),
LEGACY(bufferevent_pair, TT_ISOLATED),
+#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED)
+ { "bufferevent_pair_release_lock", test_bufferevent_pair_release_lock,
+ TT_FORK|TT_ISOLATED|TT_NEED_THREADS|TT_NEED_BASE|TT_LEGACY,
+ &basic_setup, NULL },
+#endif
LEGACY(bufferevent_watermarks, TT_ISOLATED),
LEGACY(bufferevent_pair_watermarks, TT_ISOLATED),
LEGACY(bufferevent_filters, TT_ISOLATED),
diff --git a/sntp/libevent/test/regress_dns.c b/sntp/libevent/test/regress_dns.c
index 338c4ee..6d6b484 100644
--- a/sntp/libevent/test/regress_dns.c
+++ b/sntp/libevent/test/regress_dns.c
@@ -406,6 +406,22 @@ dns_server(void)
* the only nameserver. */
evdns_base_nameserver_sockaddr_add(base, (struct sockaddr*)&ss, slen, 0);
tt_int_op(evdns_base_count_nameservers(base), ==, 1);
+ {
+ struct sockaddr_storage ss2;
+ int slen2;
+
+ memset(&ss2, 0, sizeof(ss2));
+
+ slen2 = evdns_base_get_nameserver_addr(base, 0, (struct sockaddr *)&ss2, 3);
+ tt_int_op(slen2, ==, slen);
+ tt_int_op(ss2.ss_family, ==, 0);
+ slen2 = evdns_base_get_nameserver_addr(base, 0, (struct sockaddr *)&ss2, sizeof(ss2));
+ tt_int_op(slen2, ==, slen);
+ tt_mem_op(&ss2, ==, &ss, slen);
+
+ slen2 = evdns_base_get_nameserver_addr(base, 1, (struct sockaddr *)&ss2, sizeof(ss2));
+ tt_int_op(-1, ==, slen2);
+ }
/* Send some queries. */
evdns_base_resolve_ipv4(base, "zz.example.com", DNS_QUERY_NO_SEARCH,
@@ -443,6 +459,7 @@ end:
static int n_replies_left;
static struct event_base *exit_base;
+static struct evdns_server_port *exit_port;
struct generic_dns_callback_result {
int result;
@@ -483,8 +500,14 @@ generic_dns_callback(int result, char type, int count, int ttl, void *addresses,
res->addrs = res->addrs_buf;
}
- if (--n_replies_left == 0)
- event_base_loopexit(exit_base, NULL);
+ --n_replies_left;
+ if (n_replies_left == 0) {
+ if (exit_port) {
+ evdns_close_server_port(exit_port);
+ exit_port = NULL;
+ } else
+ event_base_loopexit(exit_base, NULL);
+ }
}
static struct regress_dns_server_table search_table[] = {
@@ -664,7 +687,7 @@ end:
}
static void
-dns_retry_test(void *arg)
+dns_retry_test_impl(void *arg, int flags)
{
struct basic_test_data *data = arg;
struct event_base *base = data->base;
@@ -681,7 +704,7 @@ dns_retry_test(void *arg)
tt_assert(port);
evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
- dns = evdns_base_new(base, 0);
+ dns = evdns_base_new(base, flags);
tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
tt_assert(! evdns_base_set_option(dns, "timeout", "0.2"));
tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "10"));
@@ -736,6 +759,16 @@ end:
if (port)
evdns_close_server_port(port);
}
+static void
+dns_retry_test(void *arg)
+{
+ dns_retry_test_impl(arg, 0);
+}
+static void
+dns_retry_disable_when_inactive_test(void *arg)
+{
+ dns_retry_test_impl(arg, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+}
static struct regress_dns_server_table internal_error_table[] = {
/* Error 4 (NOTIMPL) makes us reissue the request to another server
@@ -753,7 +786,7 @@ static struct regress_dns_server_table reissue_table[] = {
};
static void
-dns_reissue_test(void *arg)
+dns_reissue_test_impl(void *arg, int flags)
{
struct basic_test_data *data = arg;
struct event_base *base = data->base;
@@ -772,7 +805,7 @@ dns_reissue_test(void *arg)
evutil_snprintf(buf1, sizeof(buf1), "127.0.0.1:%d", (int)portnum1);
evutil_snprintf(buf2, sizeof(buf2), "127.0.0.1:%d", (int)portnum2);
- dns = evdns_base_new(base, 0);
+ dns = evdns_base_new(base, flags);
tt_assert(!evdns_base_nameserver_ip_add(dns, buf1));
tt_assert(! evdns_base_set_option(dns, "timeout:", "0.3"));
tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "2"));
@@ -805,6 +838,16 @@ end:
if (port2)
evdns_close_server_port(port2);
}
+static void
+dns_reissue_test(void *arg)
+{
+ dns_reissue_test_impl(arg, 0);
+}
+static void
+dns_reissue_disable_when_inactive_test(void *arg)
+{
+ dns_reissue_test_impl(arg, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+}
#if 0
static void
@@ -819,21 +862,29 @@ dumb_bytes_fn(char *p, size_t n)
#endif
static void
-dns_inflight_test(void *arg)
+dns_inflight_test_impl(void *arg, int flags)
{
struct basic_test_data *data = arg;
struct event_base *base = data->base;
struct evdns_base *dns = NULL;
+ struct evdns_server_port *dns_port = NULL;
ev_uint16_t portnum = 0;
char buf[64];
+ int disable_when_inactive = flags & EVDNS_BASE_DISABLE_WHEN_INACTIVE;
struct generic_dns_callback_result r[20];
int i;
- tt_assert(regress_dnsserver(base, &portnum, reissue_table));
+ dns_port = regress_get_dnsserver(base, &portnum, NULL,
+ regress_dns_server_cb, reissue_table);
+ tt_assert(dns_port);
+ if (disable_when_inactive) {
+ exit_port = dns_port;
+ }
+
evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
- dns = evdns_base_new(base, 0);
+ dns = evdns_base_new(base, flags);
tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
tt_assert(! evdns_base_set_option(dns, "max-inflight:", "3"));
tt_assert(! evdns_base_set_option(dns, "randomize-case:", "0"));
@@ -855,7 +906,65 @@ dns_inflight_test(void *arg)
end:
if (dns)
evdns_base_free(dns, 0);
+ if (exit_port) {
+ evdns_close_server_port(exit_port);
+ exit_port = NULL;
+ } else if (! disable_when_inactive) {
+ evdns_close_server_port(dns_port);
+ }
+}
+
+static void
+dns_inflight_test(void *arg)
+{
+ dns_inflight_test_impl(arg, 0);
+}
+
+static void
+dns_disable_when_inactive_test(void *arg)
+{
+ dns_inflight_test_impl(arg, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+}
+
+static void
+dns_disable_when_inactive_no_ns_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base, *inactive_base;
+ struct evdns_base *dns = NULL;
+ ev_uint16_t portnum = 0;
+ char buf[64];
+ struct generic_dns_callback_result r;
+
+ inactive_base = event_base_new();
+ tt_assert(inactive_base);
+
+ /** Create dns server with inactive base, to avoid replying to clients */
+ tt_assert(regress_dnsserver(inactive_base, &portnum, search_table));
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
+
+ dns = evdns_base_new(base, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
+ tt_assert(! evdns_base_set_option(dns, "timeout:", "0.1"));
+
+ evdns_base_resolve_ipv4(dns, "foof.example.com", 0, generic_dns_callback, &r);
+ n_replies_left = 1;
+ exit_base = base;
+
+ event_base_dispatch(base);
+
+ tt_int_op(n_replies_left, ==, 0);
+
+ tt_int_op(r.result, ==, DNS_ERR_TIMEOUT);
+ tt_int_op(r.count, ==, 0);
+ tt_ptr_op(r.addrs, ==, NULL);
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
regress_clean_dnsserver();
+ if (inactive_base)
+ event_base_free(inactive_base);
}
/* === Test for bufferevent_socket_connect_hostname */
@@ -1563,7 +1672,8 @@ test_getaddrinfo_async(void *arg)
end:
if (local_outcome.ai)
evutil_freeaddrinfo(local_outcome.ai);
- for (i=0;i<10;++i) {
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+ for (i=0;i<(int)ARRAY_SIZE(a_out);++i) {
if (a_out[i].ai)
evutil_freeaddrinfo(a_out[i].ai);
}
@@ -1694,9 +1804,15 @@ testleak_setup(const struct testcase_t *testcase)
struct testleak_env_t *env;
allocated_chunks = 0;
+
+ /* Reset allocation counter, to start allocations from the very beginning.
+ * (this will avoid false-positive negative numbers for allocated_chunks)
+ */
+ libevent_global_shutdown();
+
event_set_mem_functions(cnt_malloc, cnt_realloc, cnt_free);
- if (!libevent_tests_running_in_debug_mode)
- event_enable_debug_mode();
+
+ event_enable_debug_mode();
/* not mm_calloc: we don't want to mess with the count. */
env = calloc(1, sizeof(struct testleak_env_t));
@@ -1717,8 +1833,8 @@ testleak_cleanup(const struct testcase_t *testcase, void *env_)
#ifdef EVENT__DISABLE_DEBUG_MODE
tt_int_op(allocated_chunks, ==, 0);
#else
- /* FIXME: that's `1' because of event_debug_map_HT_GROW */
- tt_int_op(allocated_chunks, ==, 1);
+ libevent_global_shutdown();
+ tt_int_op(allocated_chunks, ==, 0);
#endif
ok = 1;
end:
@@ -1791,6 +1907,7 @@ dbg_leak_resume(void *env_, int cancel, int send_err_shutdown)
end:
evdns_base_free(env->dns_base, send_err_shutdown);
env->dns_base = 0;
+
event_base_free(env->base);
env->base = 0;
}
@@ -1875,6 +1992,8 @@ end:
evdns_base_free(dns_base, 1);
if (server)
evdns_close_server_port(server);
+ if (base)
+ event_base_free(base);
if (fd >= 0)
evutil_closesocket(fd);
}
@@ -1894,10 +2013,18 @@ struct testcase_t dns_testcases[] = {
{ "search_cancel", dns_search_cancel_test,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "retry", dns_retry_test, TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+ { "retry_disable_when_inactive", dns_retry_disable_when_inactive_test,
+ TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
{ "reissue", dns_reissue_test, TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+ { "reissue_disable_when_inactive", dns_reissue_disable_when_inactive_test,
+ TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
{ "inflight", dns_inflight_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "bufferevent_connect_hostname", test_bufferevent_connect_hostname,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "disable_when_inactive", dns_disable_when_inactive_test,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "disable_when_inactive_no_ns", dns_disable_when_inactive_no_ns_test,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "getaddrinfo_async", test_getaddrinfo_async,
TT_FORK|TT_NEED_BASE, &basic_setup, (char*)"" },
diff --git a/sntp/libevent/test/regress_finalize.c b/sntp/libevent/test/regress_finalize.c
index 61a6313..552210f 100644
--- a/sntp/libevent/test/regress_finalize.c
+++ b/sntp/libevent/test/regress_finalize.c
@@ -25,6 +25,7 @@
*/
#include "event2/event-config.h"
+#include "evconfig-private.h"
#include "tinytest.h"
#include "tinytest_macros.h"
#include <stdlib.h>
diff --git a/sntp/libevent/test/regress_http.c b/sntp/libevent/test/regress_http.c
index ca7d515..35f6dd7 100644
--- a/sntp/libevent/test/regress_http.c
+++ b/sntp/libevent/test/regress_http.c
@@ -105,8 +105,12 @@ http_bind(struct evhttp *myhttp, ev_uint16_t *pport, int ipv6)
else
sock = evhttp_bind_socket_with_handle(myhttp, "127.0.0.1", *pport);
- if (sock == NULL)
- event_errx(1, "Could not start web server");
+ if (sock == NULL) {
+ if (ipv6)
+ return -1;
+ else
+ event_errx(1, "Could not start web server");
+ }
port = regress_get_socket_port(evhttp_bound_socket_get_fd(sock));
if (port < 0)
@@ -395,7 +399,7 @@ http_basic_test(void *arg)
{
struct basic_test_data *data = arg;
struct timeval tv;
- struct bufferevent *bev;
+ struct bufferevent *bev = NULL;
evutil_socket_t fd;
const char *http_request;
ev_uint16_t port = 0, port2 = 0;
@@ -480,7 +484,8 @@ http_basic_test(void *arg)
evhttp_free(http);
end:
- ;
+ if (bev)
+ bufferevent_free(bev);
}
@@ -714,6 +719,7 @@ http_delete_test(void *arg)
http = http_setup(&port, data->base, 0);
+ tt_assert(http);
fd = http_connect("127.0.0.1", port);
tt_int_op(fd, >=, 0);
@@ -734,6 +740,7 @@ http_delete_test(void *arg)
bufferevent_free(bev);
evutil_closesocket(fd);
+ fd = -1;
evhttp_free(http);
@@ -953,7 +960,8 @@ static void http_request_done(struct evhttp_request *, void *);
static void http_request_empty_done(struct evhttp_request *, void *);
static void
-http_connection_test_(struct basic_test_data *data, int persistent, const char *address, struct evdns_base *dnsbase, int ipv6)
+http_connection_test_(struct basic_test_data *data, int persistent,
+ const char *address, struct evdns_base *dnsbase, int ipv6, int family)
{
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
@@ -962,9 +970,14 @@ http_connection_test_(struct basic_test_data *data, int persistent, const char *
test_ok = 0;
http = http_setup(&port, data->base, ipv6);
+ if (!http && ipv6) {
+ tt_skip();
+ }
+ tt_assert(http);
evcon = evhttp_connection_base_new(data->base, dnsbase, address, port);
tt_assert(evcon);
+ evhttp_connection_set_family(evcon, family);
tt_assert(evhttp_connection_get_base(evcon) == data->base);
@@ -1038,12 +1051,12 @@ http_connection_test_(struct basic_test_data *data, int persistent, const char *
static void
http_connection_test(void *arg)
{
- http_connection_test_(arg, 0, "127.0.0.1", NULL, 0);
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC);
}
static void
http_persist_connection_test(void *arg)
{
- http_connection_test_(arg, 1, "127.0.0.1", NULL, 0);
+ http_connection_test_(arg, 1, "127.0.0.1", NULL, 0, AF_UNSPEC);
}
static struct regress_dns_server_table search_table[] = {
@@ -1147,6 +1160,63 @@ http_connection_async_test(void *arg)
}
static void
+http_autofree_connection_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req[2] = { NULL };
+
+ test_ok = 0;
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule two request to the HTTP
+ * server using our make request method.
+ */
+ req[0] = evhttp_request_new(http_request_empty_done, data->base);
+ req[1] = evhttp_request_new(http_request_empty_done, data->base);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req[0]), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req[0]), "Connection", "close");
+ evhttp_add_header(evhttp_request_get_output_headers(req[0]), "Empty", "itis");
+ evhttp_add_header(evhttp_request_get_output_headers(req[1]), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req[1]), "Connection", "close");
+ evhttp_add_header(evhttp_request_get_output_headers(req[1]), "Empty", "itis");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req[0], EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("couldn't make request");
+ }
+ if (evhttp_make_request(evcon, req[1], EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("couldn't make request");
+ }
+
+ /*
+ * Tell libevent to free the connection when the request completes
+ * We then set the evcon pointer to NULL since we don't want to free it
+ * when this function ends.
+ */
+ evhttp_connection_free_on_completion(evcon);
+ evcon = NULL;
+
+ event_base_dispatch(data->base);
+
+ /* at this point, the http server should have no connection */
+ tt_assert(TAILQ_FIRST(&http->connections) == NULL);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
http_request_never_call(struct evhttp_request *req, void *arg)
{
fprintf(stdout, "FAILED\n");
@@ -2743,6 +2813,7 @@ http_incomplete_test_(struct basic_test_data *data, int use_timeout)
bufferevent_free(bev);
if (use_timeout) {
evutil_closesocket(fd);
+ fd = -1;
}
evhttp_free(http);
@@ -3748,7 +3819,7 @@ static struct regress_dns_server_table ipv6_search_table[] = {
};
static void
-http_ipv6_for_domain_test(void *arg)
+http_ipv6_for_domain_test_impl(void *arg, int family)
{
struct basic_test_data *data = arg;
struct evdns_base *dns_base = NULL;
@@ -3765,13 +3836,19 @@ http_ipv6_for_domain_test(void *arg)
evutil_snprintf(address, sizeof(address), "127.0.0.1:%d", portnum);
evdns_base_nameserver_ip_add(dns_base, address);
- http_connection_test_(arg, 0 /* not persistent */, "localhost", dns_base, 1 /* ipv6 */);
+ http_connection_test_(arg, 0 /* not persistent */, "localhost", dns_base,
+ 1 /* ipv6 */, family);
end:
if (dns_base)
evdns_base_free(dns_base, 0);
regress_clean_dnsserver();
}
+static void
+http_ipv6_for_domain_test(void *arg)
+{
+ http_ipv6_for_domain_test_impl(arg, AF_UNSPEC);
+}
static void
http_request_get_addr_on_close(struct evhttp_connection *evcon, void *arg)
@@ -3836,6 +3913,22 @@ http_get_addr_test(void *arg)
evhttp_free(http);
}
+static void
+http_set_family_test(void *arg)
+{
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC);
+}
+static void
+http_set_family_ipv4_test(void *arg)
+{
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_INET);
+}
+static void
+http_set_family_ipv6_test(void *arg)
+{
+ http_ipv6_for_domain_test_impl(arg, AF_INET6);
+}
+
#define HTTP_LEGACY(name) \
{ #name, run_legacy_test_fn, TT_ISOLATED|TT_LEGACY, &legacy_setup, \
http_##name##_test }
@@ -3861,6 +3954,7 @@ struct testcase_t http_testcases[] = {
HTTP(failure),
HTTP(connection),
HTTP(persist_connection),
+ HTTP(autofree_connection),
HTTP(connection_async),
HTTP(close_detection),
HTTP(close_detection_delay),
@@ -3888,6 +3982,10 @@ struct testcase_t http_testcases[] = {
HTTP(ipv6_for_domain),
HTTP(get_addr),
+ HTTP(set_family),
+ HTTP(set_family_ipv4),
+ HTTP(set_family_ipv6),
+
END_OF_TESTCASES
};
diff --git a/sntp/libevent/test/regress_main.c b/sntp/libevent/test/regress_main.c
index 58cbe5f..3198ced 100644
--- a/sntp/libevent/test/regress_main.c
+++ b/sntp/libevent/test/regress_main.c
@@ -90,6 +90,8 @@
#include "../iocp-internal.h"
#include "../event-internal.h"
+struct evutil_weakrand_state test_weakrand_state;
+
long
timeval_msec_diff(const struct timeval *start, const struct timeval *end)
{
@@ -452,6 +454,8 @@ main(int argc, const char **argv)
tinytest_set_aliases(testaliases);
+ evutil_weakrand_seed_(&test_weakrand_state, 0);
+
if (tinytest_main(argc,argv,testgroups))
return 1;
diff --git a/sntp/libevent/test/regress_minheap.c b/sntp/libevent/test/regress_minheap.c
index a1f554e..05db32e 100644
--- a/sntp/libevent/test/regress_minheap.c
+++ b/sntp/libevent/test/regress_minheap.c
@@ -30,12 +30,13 @@
#include "tinytest.h"
#include "tinytest_macros.h"
+#include "regress.h"
static void
set_random_timeout(struct event *ev)
{
- ev->ev_timeout.tv_sec = rand();
- ev->ev_timeout.tv_usec = rand() & 0xfffff;
+ ev->ev_timeout.tv_sec = test_weakrand();
+ ev->ev_timeout.tv_usec = test_weakrand() & 0xfffff;
ev->ev_timeout_pos.min_heap_idx = -1;
}
diff --git a/sntp/libevent/test/regress_ssl.c b/sntp/libevent/test/regress_ssl.c
index c211341..bf9b46b 100644
--- a/sntp/libevent/test/regress_ssl.c
+++ b/sntp/libevent/test/regress_ssl.c
@@ -194,6 +194,7 @@ respond_to_number(struct bufferevent *bev, void *ctx)
n = atoi(line);
if (n <= 0)
TT_FAIL(("Bad number: %s", line));
+ free(line);
TT_BLATHER(("The number was %d", n));
if (n == 1001) {
++test_is_done;
diff --git a/sntp/libevent/test/regress_thread.c b/sntp/libevent/test/regress_thread.c
index 612bf1d..c42668e 100644
--- a/sntp/libevent/test/regress_thread.c
+++ b/sntp/libevent/test/regress_thread.c
@@ -361,7 +361,7 @@ thread_conditions_simple(void *arg)
&tv_signal);
diff2 = timeval_msec_diff(&actual_delay,
&tv_broadcast);
- if (abs(diff1) < abs(diff2)) {
+ if (labs(diff1) < labs(diff2)) {
TT_BLATHER(("%d looks like a signal\n", i));
target_delay = &tv_signal;
++n_signal;
@@ -382,7 +382,8 @@ thread_conditions_simple(void *arg)
tt_int_op(n_signal, ==, 1);
end:
- ;
+ EVTHREAD_FREE_LOCK(cond.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ EVTHREAD_FREE_COND(cond.cond);
}
#define CB_COUNT 128
diff --git a/sntp/libevent/test/regress_util.c b/sntp/libevent/test/regress_util.c
index d64d002..60f085b 100644
--- a/sntp/libevent/test/regress_util.c
+++ b/sntp/libevent/test/regress_util.c
@@ -179,10 +179,10 @@ regress_ipv6_parse(void *ptr)
for (j = 0; j < 4; ++j) {
/* Can't use s6_addr32 here; some don't have it. */
ev_uint32_t u =
- (in6.s6_addr[j*4 ] << 24) |
- (in6.s6_addr[j*4+1] << 16) |
- (in6.s6_addr[j*4+2] << 8) |
- (in6.s6_addr[j*4+3]);
+ ((ev_uint32_t)in6.s6_addr[j*4 ] << 24) |
+ ((ev_uint32_t)in6.s6_addr[j*4+1] << 16) |
+ ((ev_uint32_t)in6.s6_addr[j*4+2] << 8) |
+ ((ev_uint32_t)in6.s6_addr[j*4+3]);
if (u != ent->res[j]) {
TT_FAIL(("%s did not parse as expected.", ent->addr));
continue;
@@ -726,46 +726,48 @@ test_evutil_integers(void *arg)
tt_assert(u64 > 0);
tt_assert(i64 > 0);
u64++;
- i64++;
+/* i64++; */
tt_assert(u64 == 0);
- tt_assert(i64 == EV_INT64_MIN);
- tt_assert(i64 < 0);
+/* tt_assert(i64 == EV_INT64_MIN); */
+/* tt_assert(i64 < 0); */
u32 = EV_UINT32_MAX;
i32 = EV_INT32_MAX;
tt_assert(u32 > 0);
tt_assert(i32 > 0);
u32++;
- i32++;
+/* i32++; */
tt_assert(u32 == 0);
- tt_assert(i32 == EV_INT32_MIN);
- tt_assert(i32 < 0);
+/* tt_assert(i32 == EV_INT32_MIN); */
+/* tt_assert(i32 < 0); */
u16 = EV_UINT16_MAX;
i16 = EV_INT16_MAX;
tt_assert(u16 > 0);
tt_assert(i16 > 0);
u16++;
- i16++;
+/* i16++; */
tt_assert(u16 == 0);
- tt_assert(i16 == EV_INT16_MIN);
- tt_assert(i16 < 0);
+/* tt_assert(i16 == EV_INT16_MIN); */
+/* tt_assert(i16 < 0); */
u8 = EV_UINT8_MAX;
i8 = EV_INT8_MAX;
tt_assert(u8 > 0);
tt_assert(i8 > 0);
u8++;
- i8++;
+/* i8++;*/
tt_assert(u8 == 0);
- tt_assert(i8 == EV_INT8_MIN);
- tt_assert(i8 < 0);
+/* tt_assert(i8 == EV_INT8_MIN); */
+/* tt_assert(i8 < 0); */
+/*
ssize = EV_SSIZE_MAX;
tt_assert(ssize > 0);
ssize++;
tt_assert(ssize < 0);
tt_assert(ssize == EV_SSIZE_MIN);
+*/
ptr = &ssize;
iptr = (ev_intptr_t)ptr;
@@ -1119,7 +1121,7 @@ end:
static void
test_evutil_loadsyslib(void *arg)
{
- HANDLE h=NULL;
+ HMODULE h=NULL;
h = evutil_load_windows_system_library_(TEXT("kernel32.dll"));
tt_assert(h);
diff --git a/sntp/libevent/test/regress_zlib.c b/sntp/libevent/test/regress_zlib.c
index 9339397..8406676 100644
--- a/sntp/libevent/test/regress_zlib.c
+++ b/sntp/libevent/test/regress_zlib.c
@@ -56,6 +56,7 @@
#include "event2/bufferevent.h"
#include "regress.h"
+#include "mm-internal.h"
/* zlib 1.2.4 and 1.2.5 do some "clever" things with macros. Instead of
saying "(defined(FOO) ? FOO : 0)" they like to say "FOO-0", on the theory
@@ -95,6 +96,7 @@ zlib_deflate_free(void *ctx)
z_streamp p = ctx;
assert(deflateEnd(p) == Z_OK);
+ mm_free(p);
}
static void
@@ -103,6 +105,7 @@ zlib_inflate_free(void *ctx)
z_streamp p = ctx;
assert(inflateEnd(p) == Z_OK);
+ mm_free(p);
}
static int
@@ -275,7 +278,7 @@ test_bufferevent_zlib(void *arg)
{
struct bufferevent *bev1=NULL, *bev2=NULL;
char buffer[8333];
- z_stream z_input, z_output;
+ z_stream *z_input, *z_output;
int i, r;
evutil_socket_t pair[2] = {-1, -1};
(void)arg;
@@ -293,18 +296,18 @@ test_bufferevent_zlib(void *arg)
bev1 = bufferevent_socket_new(NULL, pair[0], 0);
bev2 = bufferevent_socket_new(NULL, pair[1], 0);
- memset(&z_output, 0, sizeof(z_output));
- r = deflateInit(&z_output, Z_DEFAULT_COMPRESSION);
+ z_output = mm_calloc(sizeof(*z_output), 1);
+ r = deflateInit(z_output, Z_DEFAULT_COMPRESSION);
tt_int_op(r, ==, Z_OK);
- memset(&z_input, 0, sizeof(z_input));
- r = inflateInit(&z_input);
+ z_input = mm_calloc(sizeof(*z_input), 1);
+ r = inflateInit(z_input);
tt_int_op(r, ==, Z_OK);
/* initialize filters */
bev1 = bufferevent_filter_new(bev1, NULL, zlib_output_filter,
- BEV_OPT_CLOSE_ON_FREE, zlib_deflate_free, &z_output);
+ BEV_OPT_CLOSE_ON_FREE, zlib_deflate_free, z_output);
bev2 = bufferevent_filter_new(bev2, zlib_input_filter,
- NULL, BEV_OPT_CLOSE_ON_FREE, zlib_inflate_free, &z_input);
+ NULL, BEV_OPT_CLOSE_ON_FREE, zlib_inflate_free, z_input);
bufferevent_setcb(bev1, readcb, writecb, errorcb, NULL);
bufferevent_setcb(bev2, readcb, writecb, errorcb, NULL);
diff --git a/sntp/libevent/test/test-fdleak.c b/sntp/libevent/test/test-fdleak.c
index ee2432b..4c4eba2 100644
--- a/sntp/libevent/test/test-fdleak.c
+++ b/sntp/libevent/test/test-fdleak.c
@@ -57,7 +57,7 @@
#endif
/* Provide storage for the address, both for the server & the clients */
-static struct sockaddr_in sin;
+static struct sockaddr_in saddr;
/* Number of sucessful requests so far */
static int num_requests;
@@ -131,7 +131,7 @@ start_loop(void)
listener = evconnlistener_new_bind(base, listener_accept_cb, NULL,
LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE,
- -1, (struct sockaddr *)&sin, sizeof(sin));
+ -1, (struct sockaddr *)&saddr, sizeof(saddr));
if (listener == NULL) {
my_perror("Could not create listener!");
exit(1);
@@ -145,8 +145,8 @@ start_loop(void)
my_perror("getsockname()");
exit(1);
}
- memcpy(&sin, &ss, sizeof(sin));
- if (sin.sin_family != AF_INET) {
+ memcpy(&saddr, &ss, sizeof(saddr));
+ if (saddr.sin_family != AF_INET) {
puts("AF mismatch from getsockname().");
exit(1);
}
@@ -208,8 +208,8 @@ start_client(struct event_base *base)
BEV_OPT_CLOSE_ON_FREE);
bufferevent_setcb(bev, client_read_cb, NULL, client_event_cb, NULL);
- if (bufferevent_socket_connect(bev, (struct sockaddr *)&sin,
- sizeof(sin)) < 0) {
+ if (bufferevent_socket_connect(bev, (struct sockaddr *)&saddr,
+ sizeof(saddr)) < 0) {
my_perror("Could not connect!");
bufferevent_free(bev);
exit(2);
@@ -236,10 +236,10 @@ main(int argc, char **argv)
#endif
/* Set up an address, used by both client & server. */
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = htonl(0x7f000001);
- sin.sin_port = 0; /* Tell the implementation to pick a port. */
+ memset(&saddr, 0, sizeof(saddr));
+ saddr.sin_family = AF_INET;
+ saddr.sin_addr.s_addr = htonl(0x7f000001);
+ saddr.sin_port = 0; /* Tell the implementation to pick a port. */
start_loop();
diff --git a/sntp/libevent/test/test-ratelim.c b/sntp/libevent/test/test-ratelim.c
index 27649b8..17babfd 100644
--- a/sntp/libevent/test/test-ratelim.c
+++ b/sntp/libevent/test/test-ratelim.c
@@ -50,6 +50,7 @@
#include "event2/listener.h"
#include "event2/thread.h"
+static struct evutil_weakrand_state weakrand_state;
static int cfg_verbose = 0;
static int cfg_help = 0;
@@ -113,11 +114,7 @@ loud_writecb(struct bufferevent *bev, void *ctx)
struct client_state *cs = ctx;
struct evbuffer *output = bufferevent_get_output(bev);
char buf[1024];
-#ifdef _WIN32
- int r = rand() % 256;
-#else
- int r = random() % 256;
-#endif
+ int r = evutil_weakrand_(&weakrand_state);
memset(buf, r, sizeof(buf));
while (evbuffer_get_length(output) < 8192) {
evbuffer_add(output, buf, sizeof(buf));
@@ -223,7 +220,7 @@ check_bucket_levels_cb(evutil_socket_t fd, short events, void *arg)
#undef B
total_n_bev_checks++;
- if (total_n_bev_checks >= .8 * (cfg_duration / cfg_tick_msec) * cfg_n_connections) {
+ if (total_n_bev_checks >= .8 * ((double)cfg_duration / cfg_tick_msec) * cfg_n_connections) {
event_free(event_base_get_running_event(bufferevent_get_base(bev)));
}
}
@@ -553,6 +550,8 @@ main(int argc, char **argv)
(void) WSAStartup(wVersionRequested, &wsaData);
#endif
+ evutil_weakrand_seed_(&weakrand_state, 0);
+
#ifndef _WIN32
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
return 1;
diff --git a/sntp/libevent/test/test-time.c b/sntp/libevent/test/test-time.c
index dcd6639..bcc7086 100644
--- a/sntp/libevent/test/test-time.c
+++ b/sntp/libevent/test/test-time.c
@@ -41,6 +41,7 @@
#include "event2/event.h"
#include "event2/event_compat.h"
#include "event2/event_struct.h"
+#include "util-internal.h"
int called = 0;
@@ -48,14 +49,12 @@ int called = 0;
struct event *ev[NEVENT];
+struct evutil_weakrand_state weakrand_state;
+
static int
rand_int(int n)
{
-#ifdef _WIN32
- return (int)(rand() % n);
-#else
- return (int)(random() % n);
-#endif
+ return evutil_weakrand_(&weakrand_state) % n;
}
static void
@@ -71,7 +70,7 @@ time_cb(evutil_socket_t fd, short event, void *arg)
j = rand_int(NEVENT);
tv.tv_sec = 0;
tv.tv_usec = rand_int(50000);
- if (tv.tv_usec % 2)
+ if (tv.tv_usec % 2 || called < NEVENT)
evtimer_add(ev[j], &tv);
else
evtimer_del(ev[j]);
@@ -93,6 +92,8 @@ main(int argc, char **argv)
(void) WSAStartup(wVersionRequested, &wsaData);
#endif
+ evutil_weakrand_seed_(&weakrand_state, 0);
+
/* Initalize the event library */
event_init();
@@ -108,6 +109,8 @@ main(int argc, char **argv)
event_dispatch();
+
+ printf("%d, %d\n", called, NEVENT);
return (called < NEVENT);
}
diff --git a/sntp/libevent/test/tinytest.c b/sntp/libevent/test/tinytest.c
index 36b3a62..3a8e331 100644
--- a/sntp/libevent/test/tinytest.c
+++ b/sntp/libevent/test/tinytest.c
@@ -31,6 +31,8 @@
#include <string.h>
#include <assert.h>
+#ifndef NO_FORKING
+
#ifdef _WIN32
#include <windows.h>
#else
@@ -48,6 +50,8 @@
#endif
#endif
+#endif /* !NO_FORKING */
+
#ifndef __GNUC__
#define __attribute__(x)
#endif
@@ -111,6 +115,8 @@ testcase_run_bare_(const struct testcase_t *testcase)
#define MAGIC_EXITCODE 42
+#ifndef NO_FORKING
+
static enum outcome
testcase_run_forked_(const struct testgroup_t *group,
const struct testcase_t *testcase)
@@ -211,6 +217,8 @@ testcase_run_forked_(const struct testgroup_t *group,
#endif
}
+#endif /* !NO_FORKING */
+
int
testcase_run_one(const struct testgroup_t *group,
const struct testcase_t *testcase)
@@ -234,9 +242,13 @@ testcase_run_one(const struct testgroup_t *group,
cur_test_name = testcase->name;
}
+#ifndef NO_FORKING
if ((testcase->flags & TT_FORK) && !(opt_forked||opt_nofork)) {
outcome = testcase_run_forked_(group, testcase);
} else {
+#else
+ {
+#endif
outcome = testcase_run_bare_(testcase);
}
@@ -411,7 +423,9 @@ tinytest_main(int c, const char **v, struct testgroup_t *groups)
if (!n)
tinytest_set_flag_(groups, "..", 1, TT_ENABLED_);
+#ifdef _IONBF
setvbuf(stdout, NULL, _IONBF, 0);
+#endif
++in_tinytest_main;
for (i=0; groups[i].prefix; ++i)
@@ -458,3 +472,22 @@ tinytest_set_test_skipped_(void)
cur_test_outcome = SKIP;
}
+char *
+tinytest_format_hex_(const void *val_, unsigned long len)
+{
+ const unsigned char *val = val_;
+ char *result, *cp;
+ size_t i;
+
+ if (!val)
+ return strdup("null");
+ if (!(result = malloc(len*2+1)))
+ return strdup("<allocation failure>");
+ cp = result;
+ for (i=0;i<len;++i) {
+ *cp++ = "0123456789ABCDEF"[val[i] >> 4];
+ *cp++ = "0123456789ABCDEF"[val[i] & 0x0f];
+ }
+ *cp = 0;
+ return result;
+}
diff --git a/sntp/libevent/test/tinytest.h b/sntp/libevent/test/tinytest.h
index dff440e..ed07b26 100644
--- a/sntp/libevent/test/tinytest.h
+++ b/sntp/libevent/test/tinytest.h
@@ -81,6 +81,8 @@ int tinytest_get_verbosity_(void);
/** Implementation: Set a flag on tests matching a name; returns number
* of tests that matched. */
int tinytest_set_flag_(struct testgroup_t *, const char *, int set, unsigned long);
+/** Implementation: Put a chunk of memory into hex. */
+char *tinytest_format_hex_(const void *, unsigned long);
/** Set all tests in 'groups' matching the name 'named' to be skipped. */
#define tinytest_skip(groups, named) \
diff --git a/sntp/libevent/test/tinytest_macros.h b/sntp/libevent/test/tinytest_macros.h
index 9ff69b1..c3728d1 100644
--- a/sntp/libevent/test/tinytest_macros.h
+++ b/sntp/libevent/test/tinytest_macros.h
@@ -113,8 +113,8 @@
#define tt_assert_test_fmt_type(a,b,str_test,type,test,printf_type,printf_fmt, \
setup_block,cleanup_block,die_on_fail) \
TT_STMT_BEGIN \
- type val1_ = (type)(a); \
- type val2_ = (type)(b); \
+ type val1_ = (a); \
+ type val2_ = (b); \
int tt_status_ = (test); \
if (!tt_status_ || tinytest_get_verbosity_()>1) { \
printf_type print_; \
@@ -144,6 +144,10 @@
tt_assert_test_fmt_type(a,b,str_test,type,test,type,fmt, \
{print_=value_;},{},die_on_fail)
+#define tt_assert_test_type_opt(a,b,str_test,type,test,fmt,die_on_fail) \
+ tt_assert_test_fmt_type(a,b,str_test,type,test,type,fmt, \
+ {print_=value_?value_:"<NULL>";},{},die_on_fail)
+
/* Helper: assert that a op b, when cast to type. Format the values with
* printf format fmt on failure. */
#define tt_assert_op_type(a,op,b,type,fmt) \
@@ -159,12 +163,23 @@
(val1_ op val2_),"%lu",TT_EXIT_TEST_FUNCTION)
#define tt_ptr_op(a,op,b) \
- tt_assert_test_type(a,b,#a" "#op" "#b,void*, \
+ tt_assert_test_type(a,b,#a" "#op" "#b,const void*, \
(val1_ op val2_),"%p",TT_EXIT_TEST_FUNCTION)
#define tt_str_op(a,op,b) \
- tt_assert_test_type(a,b,#a" "#op" "#b,const char *, \
- (strcmp(val1_,val2_) op 0),"<%s>",TT_EXIT_TEST_FUNCTION)
+ tt_assert_test_type_opt(a,b,#a" "#op" "#b,const char *, \
+ (val1_ && val2_ && strcmp(val1_,val2_) op 0),"<%s>", \
+ TT_EXIT_TEST_FUNCTION)
+
+#define tt_mem_op(expr1, op, expr2, len) \
+ tt_assert_test_fmt_type(expr1,expr2,#expr1" "#op" "#expr2, \
+ const void *, \
+ (val1_ && val2_ && memcmp(val1_, val2_, len) op 0), \
+ char *, "%s", \
+ { print_ = tinytest_format_hex_(value_, (len)); }, \
+ { if (print_) free(print_); }, \
+ TT_EXIT_TEST_FUNCTION \
+ );
#define tt_want_int_op(a,op,b) \
tt_assert_test_type(a,b,#a" "#op" "#b,long,(val1_ op val2_),"%ld",(void)0)
@@ -174,7 +189,7 @@
(val1_ op val2_),"%lu",(void)0)
#define tt_want_ptr_op(a,op,b) \
- tt_assert_test_type(a,b,#a" "#op" "#b,void*, \
+ tt_assert_test_type(a,b,#a" "#op" "#b,const void*, \
(val1_ op val2_),"%p",(void)0)
#define tt_want_str_op(a,op,b) \
diff --git a/sntp/libevent/time-internal.h b/sntp/libevent/time-internal.h
index daf20f4..2c584fa 100644
--- a/sntp/libevent/time-internal.h
+++ b/sntp/libevent/time-internal.h
@@ -86,9 +86,6 @@ struct evutil_monotonic_timer {
struct timeval last_time;
};
-#define EV_MONOT_PRECISE 1
-#define EV_MONOT_FALLBACK 2
-
int evutil_configure_monotonic_time_(struct evutil_monotonic_timer *mt,
int flags);
int evutil_gettime_monotonic_(struct evutil_monotonic_timer *mt, struct timeval *tv);
diff --git a/sntp/libevent/util-internal.h b/sntp/libevent/util-internal.h
index 5866dbc..4fdedea 100644
--- a/sntp/libevent/util-internal.h
+++ b/sntp/libevent/util-internal.h
@@ -392,7 +392,7 @@ void evutil_free_secure_rng_globals_(void);
void evutil_free_globals_(void);
#ifdef _WIN32
-HANDLE evutil_load_windows_system_library_(const TCHAR *library_name);
+HMODULE evutil_load_windows_system_library_(const TCHAR *library_name);
#endif
#ifndef EV_SIZE_FMT
diff --git a/sntp/libevent/whatsnew-2.1.txt b/sntp/libevent/whatsnew-2.1.txt
index c0ee7cf..0be54ae 100644
--- a/sntp/libevent/whatsnew-2.1.txt
+++ b/sntp/libevent/whatsnew-2.1.txt
@@ -41,7 +41,7 @@
We don't try to do binary compatibility except within stable release
series, so binaries linked against any version of Libevent 2.0 will
- probably need to be recompiled against Libevent 2.1.3-alpha if you
+ probably need to be recompiled against Libevent 2.1.4-alpha if you
want to use it. It is probable that we'll break binary compatibility
again before Libevent 2.1 is stable.
@@ -63,6 +63,9 @@
surrounded with appropriate #ifdef lines to keep your IDE from getting
upset.
+ There is now an alternative cmake-based build process; cmake users
+ should see the relevant sections in the README.
+
1.2. New functions for events and the event loop
@@ -146,6 +149,19 @@
that's a no-op in past versions of Libevent, and we don't want to
break compatibility.)
+ You can use the new event_base_get_num_events() function to find the
+ number of events active or pending on an event_base. To find the
+ largest number of events that there have been since the last call, use
+ event_base_get_max_events().
+
+ You can now activate all the events waiting for a given fd or signal
+ using the event_base_active_by_fd() and event_base_active_by_signal()
+ APIs.
+
+ On backends that support it (currently epoll), there is now an
+ EV_CLOSED flag that programs can use to detect when a socket has
+ closed without having to read all the bytes until receiving an EOF.
+
1.3. Event finalization
[NOTE: This is an experimental feature in Libevent 2.1.3-alpha. Though
@@ -325,6 +341,13 @@
You can find the priority at which a bufferevent runs with
bufferevent_get_priority().
+ The function bufferevent_get_token_bucket_cfg() can retrieve the
+ rate-limit settings for a bufferevent; bufferevent_getwatermark() can
+ return a bufferevent's current watermark settings.
+
+ You can manually trigger a bufferevent's callbacks via
+ bufferevent_trigger() and bufferevent_trigger_event().
+
1.7. New functions and features: evdns
The previous evdns interface used an "open a test UDP socket" trick in
@@ -340,6 +363,9 @@
flag, which tells the evdns_base that it should not prevent Libevent from
exiting while it has no DNS requests in progress.
+ There is a new evdns_base_clear_host_addresses() function to remove
+ all the /etc/hosts addresses registered with an evdns instance.
+
1.8. New functions and features: evconnlistener
Libevent 2.1 adds the following evconnlistener flags:
@@ -392,6 +418,31 @@
and actually reports the error code and lets you figure out which request
failed.
+ You can navigate from an evhttp_connection back to its evhttp with the
+ new evhttp_connection_get_server() function.
+
+ You can override the default HTTP Content-Type with the new
+ evhttp_set_default_content_type() function
+
+ There's a new evhttp_connection_get_addr() API to return the peer
+ address of an evhttp_connection.
+
+ The new evhttp_send_reply_chunk_with_cb() is a variant of
+ evhttp_send_reply_chunk() with a callback to be invoked when the
+ chunk is sent.
+
+ The evhttp_request_set_header_cb() facility adds a callback to be
+ invoked while parsing headers.
+
+ The evhttp_request_set_on_complete_cb() facility adds a callback to be
+ invoked on request completion.
+
+1.10. New functions and features: evutil
+
+ There's a function "evutil_secure_rng_set_urandom_device_file()" that
+ you can use to override the default file that Libevent uses to seed
+ its (sort-of) secure RNG.
+
2. Cross-platform performance improvements
2.1. Better data structures
diff --git a/sntp/libopts/Makefile.in b/sntp/libopts/Makefile.in
index 111bc0f..feb2e0f 100644
--- a/sntp/libopts/Makefile.in
+++ b/sntp/libopts/Makefile.in
@@ -39,8 +39,6 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -60,8 +58,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -187,6 +187,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
LDFLAGS_NTP = @LDFLAGS_NTP@
@@ -302,6 +303,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/sntp/libopts/autoopts.h b/sntp/libopts/autoopts.h
index ac0a199..6987958 100644
--- a/sntp/libopts/autoopts.h
+++ b/sntp/libopts/autoopts.h
@@ -258,7 +258,7 @@ typedef struct {
#define AGALOC(c, w) ao_malloc((size_t)c)
#define AGREALOC(p, c, w) ao_realloc((void*)p, (size_t)c)
-#define AGFREE(_p) free((void *)_p)
+#define AGFREE(p) free((void *)(intptr_t)p)
#define AGDUPSTR(p, s, w) (p = ao_strdup(s))
static void *
@@ -452,7 +452,7 @@ typedef enum { AOFLAG_TABLE } ao_flags_t;
#undef _aof_
static char const zNil[] = "";
-static arg_types_t argTypes = { NULL };
+static arg_types_t argTypes = { 0 };
static char line_fmt_buf[32];
static bool displayEnum = false;
static char const pkgdatadir_default[] = PKGDATADIR;
diff --git a/sntp/libopts/autoopts/options.h b/sntp/libopts/autoopts/options.h
index 0d6f2c3..32397eb 100644
--- a/sntp/libopts/autoopts/options.h
+++ b/sntp/libopts/autoopts/options.h
@@ -600,9 +600,17 @@ struct options {
char * pzCurOpt; ///< current option text
/// Public, the full path of the program
+#if AUTOOPTS_INTERNAL
+ char const * pzProgPath;
+#else
char const * const pzProgPath;
+#endif
/// Public, the name of the executable, without any path
+#if AUTOOPTS_INTERNAL
+ char const * pzProgName;
+#else
char const * const pzProgName;
+#endif
/// Public, the upper-cased, shell variable syntax-ed program name
char const * const pzPROGNAME;
/// the name of the "rc file" (configuration file)
@@ -1222,7 +1230,7 @@ extern void optionResetOpt(tOptions*, tOptDesc*);
extern void optionSetMembers(tOptions*, tOptDesc*, char const * const *, unsigned int);
-extern void optionShowRange(tOptions*, tOptDesc*, void *, int);
+extern void optionShowRange(tOptions*, tOptDesc*, const void *, int);
extern void optionStackArg(tOptions*, tOptDesc*);
diff --git a/sntp/libopts/configfile.c b/sntp/libopts/configfile.c
index d4bc4fe..0409446 100644
--- a/sntp/libopts/configfile.c
+++ b/sntp/libopts/configfile.c
@@ -184,7 +184,7 @@ optionFindValue(const tOptDesc * odesc, char const * name, char const * val)
else do {
tArgList* argl = odesc->optCookie;
int argct = argl->useCt;
- void ** poptv = (void**)(argl->apzArgs);
+ void ** poptv = (void**)(intptr_t)(argl->apzArgs);
if (argct == 0) {
errno = ENOENT;
@@ -266,7 +266,7 @@ optionFindNextValue(const tOptDesc * odesc, const tOptionValue * pPrevVal,
else do {
tArgList* argl = odesc->optCookie;
int ct = argl->useCt;
- void** poptv = (void**)argl->apzArgs;
+ void** poptv = (void**)(intptr_t)argl->apzArgs;
while (--ct >= 0) {
tOptionValue* pOV = *(poptv++);
@@ -326,7 +326,7 @@ optionGetValue(tOptionValue const * oov, char const * vname)
if (arg_list->useCt > 0) {
int ct = arg_list->useCt;
- void ** ovlist = (void**)(arg_list->apzArgs);
+ void ** ovlist = (void**)(intptr_t)(arg_list->apzArgs);
if (vname == NULL) {
res = (tOptionValue*)*ovlist;
@@ -385,7 +385,7 @@ optionNextValue(tOptionValue const * ov_list,tOptionValue const * oov )
arg_list = ov_list->v.nestVal;
{
int ct = arg_list->useCt;
- void ** o_list = (void**)(arg_list->apzArgs);
+ void ** o_list = (void**)(intptr_t)(arg_list->apzArgs);
while (ct-- > 0) {
tOptionValue * nov = *(o_list++);
@@ -931,7 +931,7 @@ handle_struct(tOptions * opts, tOptState * ost, char * txt, int dir)
switch (*txt) {
case ' ':
case '\t':
- txt = (void *)parse_attrs(
+ txt = (void *)(intptr_t)parse_attrs(
opts, SPN_WHITESPACE_CHARS(txt), &mode, &valu);
if (txt == NULL)
return txt;
@@ -1138,7 +1138,7 @@ optionFileLoad(tOptions * opts, char const * prog)
*/
{
char const ** pp =
- (char const **)(void *)&(opts->pzProgName);
+ (char const **)(void *)(intptr_t)&(opts->pzProgName);
*pp = prog;
}
diff --git a/sntp/libopts/enum.c b/sntp/libopts/enum.c
index 299ffb1..e759e8c 100644
--- a/sntp/libopts/enum.c
+++ b/sntp/libopts/enum.c
@@ -189,11 +189,11 @@ find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
* The result gets stashed in a char* pointer.
*/
uintptr_t res = name_ct;
- size_t len = strlen((char*)name);
+ size_t len = strlen((const char*)name);
uintptr_t idx;
if (IS_DEC_DIGIT_CHAR(*name)) {
- char * pz = (char *)(void *)name;
+ char * pz = (char *)(void *)(intptr_t)name;
unsigned long val = strtoul(pz, &pz, 0);
if ((*pz == NUL) && (val < name_ct))
return (uintptr_t)val;
@@ -215,7 +215,7 @@ find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
* Multiple partial matches means we have an ambiguous match.
*/
for (idx = 0; idx < name_ct; idx++) {
- if (strncmp((char*)paz_names[idx], (char*)name, len) == 0) {
+ if (strncmp((char*)(intptr_t)paz_names[idx], (char*)(intptr_t)name, len) == 0) {
if (paz_names[idx][len] == NUL)
return idx; /* full match */
@@ -521,7 +521,7 @@ optionMemberList(tOptDesc * od)
uintptr_t sv = od->optArg.argIntptr;
char * res;
(*(od->pOptProc))(OPTPROC_RETURN_VALNAME, od);
- res = (void *)od->optArg.argString;
+ res = (void *)(intptr_t)od->optArg.argString;
od->optArg.argIntptr = sv;
return res;
}
diff --git a/sntp/libopts/file.c b/sntp/libopts/file.c
index ec740c5..d5fdb4a 100644
--- a/sntp/libopts/file.c
+++ b/sntp/libopts/file.c
@@ -107,7 +107,7 @@ open_file_fd(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode)
/* NOTREACHED */
if ((pOD->fOptState & OPTST_ALLOC_ARG) != 0)
- pOD->optCookie = (void *)pOD->optArg.argString;
+ pOD->optCookie = (void *)(intptr_t)pOD->optArg.argString;
else
AGDUPSTR(pOD->optCookie, pOD->optArg.argString, "file name");
@@ -131,7 +131,7 @@ fopen_file_fp(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode)
/* NOTREACHED */
if ((pOD->fOptState & OPTST_ALLOC_ARG) != 0)
- pOD->optCookie = (void *)pOD->optArg.argString;
+ pOD->optCookie = (void *)(intptr_t)pOD->optArg.argString;
else
AGDUPSTR(pOD->optCookie, pOD->optArg.argString, "file name");
diff --git a/sntp/libopts/find.c b/sntp/libopts/find.c
index 1ec02e5..8d47896 100644
--- a/sntp/libopts/find.c
+++ b/sntp/libopts/find.c
@@ -80,7 +80,7 @@ parse_opt(char const ** nm_pp, char ** arg_pp, char * buf, size_t bufsz)
buf[res] = NUL;
*nm_pp = buf;
- *arg_pp = (char *)p;
+ *arg_pp = (char *)(intptr_t)p;
return res;
default:
@@ -711,7 +711,7 @@ find_opt(tOptions * opts, tOptState * o_st)
* strip off the "const" quality of the "default_opt" field.
*/
while (*(++pz) == '-') ;
- def_opt = (void *)&(opts->specOptIdx.default_opt);
+ def_opt = (void *)(intptr_t)&(opts->specOptIdx.default_opt);
def = *def_opt;
*def_opt = NO_EQUIVALENT;
res = opt_find_long(opts, pz, o_st);
diff --git a/sntp/libopts/init.c b/sntp/libopts/init.c
index e038ed7..9374528 100644
--- a/sntp/libopts/init.c
+++ b/sntp/libopts/init.c
@@ -101,20 +101,17 @@ validate_struct(tOptions * opts, char const * pname)
*/
if (opts->pzProgName == NULL) {
char const * pz = strrchr(pname, DIRCH);
- char const ** pp =
- (char const **)(void **)&(opts->pzProgName);
if (pz != NULL)
- *pp = pz+1;
+ opts->pzProgName = pz+1;
else
- *pp = pname;
+ opts->pzProgName = pname;
- pz = pathfind(getenv("PATH"), (char *)pname, "rx");
+ pz = pathfind(getenv("PATH"), (char *)(intptr_t)pname, "rx");
if (pz != NULL)
- pname = (void *)pz;
+ pname = (void *)(intptr_t)pz;
- pp = (char const **)(void **)&(opts->pzProgPath);
- *pp = pname;
+ opts->pzProgPath = pname;
/*
* when comparing long names, these are equivalent
diff --git a/sntp/libopts/load.c b/sntp/libopts/load.c
index 5c29d96..0654492 100644
--- a/sntp/libopts/load.c
+++ b/sntp/libopts/load.c
@@ -225,7 +225,7 @@ add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path)
if (strchr(prg_path, DIRCH) != NULL)
path = prg_path;
else {
- path = pathfind(getenv("PATH"), (char*)prg_path, "rx");
+ path = pathfind(getenv("PATH"), (char*)(intptr_t)prg_path, "rx");
if (path == NULL)
return false;
diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4
index 4a4ca18..352098b 100644
--- a/sntp/libopts/m4/libopts.m4
+++ b/sntp/libopts/m4/libopts.m4
@@ -216,7 +216,7 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
LIBREGEX_LIBS=""
AC_MSG_CHECKING([whether libregex functions properly])
AC_CACHE_VAL([libopts_cv_with_libregex],[
- AC_RUN_IFELSE([@%:@include <stdio.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
@%:@include <stdlib.h>
@%:@include <sys/types.h>
@%:@include REGEX_HEADER
@@ -235,7 +235,7 @@ int main() {
fputs( "error: regex -->.<-- did not match\n", stderr );
return 1;
}
- return 0; }],
+ return 0; }])],
[libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
[libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
@@ -260,12 +260,12 @@ libopts_cv_with_libregex=no
AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
AC_MSG_CHECKING([whether pathfind(3) works])
AC_CACHE_VAL([libopts_cv_run_pathfind],[
- AC_RUN_IFELSE([@%:@include <string.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <string.h>
@%:@include <stdlib.h>
int main (int argc, char** argv) {
char* pz = pathfind( getenv( "PATH" ), "sh", "x" );
return (pz == 0) ? 1 : 0;
-}],
+}])],
[libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
@@ -303,7 +303,7 @@ echo ${dzero}`
AC_DEFUN([LIBOPTS_RUN_REALPATH],[
AC_MSG_CHECKING([whether we have a functional realpath(3C)])
AC_CACHE_VAL([libopts_cv_run_realpath],[
- AC_RUN_IFELSE([@%:@include <limits.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <limits.h>
@%:@include <stdlib.h>
int main (int argc, char** argv) {
@%:@ifndef PATH_MAX
@@ -313,7 +313,7 @@ choke me!!
@%:@endif
char *pz = realpath(argv@<:@0@:>@, zPath);
return (pz == zPath) ? 0 : 1;
-}],
+}])],
[libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
@@ -330,7 +330,7 @@ choke me!!
AC_DEFUN([LIBOPTS_RUN_STRFTIME],[
AC_MSG_CHECKING([whether strftime() works])
AC_CACHE_VAL([libopts_cv_run_strftime],[
- AC_RUN_IFELSE([@%:@include <time.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <time.h>
@%:@include <string.h>
char t_buf@<:@ 64 @:>@;
int main() {
@@ -346,7 +346,7 @@ int main() {
tm.tm_yday = 239; /* days since January 1 @<:@0, 365@:>@ */
tm.tm_isdst = 1; /* flag for daylight savings time */
strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
- return (strcmp( t_buf, z ) != 0); }],
+ return (strcmp( t_buf, z ) != 0); }])],
[libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
@@ -363,10 +363,10 @@ int main() {
AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
AC_MSG_CHECKING([whether fopen accepts "b" mode])
AC_CACHE_VAL([libopts_cv_run_fopen_binary],[
- AC_RUN_IFELSE([@%:@include <stdio.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
int main (int argc, char** argv) {
FILE* fp = fopen("conftest.@S|@ac_ext", "rb");
-return (fp == NULL) ? 1 : fclose(fp); }],
+return (fp == NULL) ? 1 : fclose(fp); }])],
[libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
@@ -386,10 +386,10 @@ return (fp == NULL) ? 1 : fclose(fp); }],
AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
AC_MSG_CHECKING([whether fopen accepts "t" mode])
AC_CACHE_VAL([libopts_cv_run_fopen_text],[
- AC_RUN_IFELSE([@%:@include <stdio.h>
+ AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
int main (int argc, char** argv) {
FILE* fp = fopen("conftest.@S|@ac_ext", "rt");
-return (fp == NULL) ? 1 : fclose(fp); }],
+return (fp == NULL) ? 1 : fclose(fp); }])],
[libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
diff --git a/sntp/libopts/makeshell.c b/sntp/libopts/makeshell.c
index a0bfcac..baef8fc 100644
--- a/sntp/libopts/makeshell.c
+++ b/sntp/libopts/makeshell.c
@@ -396,13 +396,13 @@ emit_usage(tOptions * opts)
/* Copy the program name into the time/name buffer */
for (;;) {
- if ((*pzPN++ = (char)tolower(*pz++)) == NUL)
+ if ((*pzPN++ = (char)tolower((unsigned char)*pz++)) == NUL)
break;
}
- pp = (char **)(void *)&(opts->pzProgPath);
+ pp = (char **)(void *)(intptr_t)&(opts->pzProgPath);
*pp = tm_nm_buf;
- pp = (char **)(void *)&(opts->pzProgName);
+ pp = (char **)(void *)(intptr_t)&(opts->pzProgName);
*pp = tm_nm_buf;
}
@@ -653,7 +653,7 @@ emit_match_expr(char const * name, tOptDesc * cod, tOptions * opts)
* They must not be the same. They cannot be, because it would
* not compile correctly if they were.
*/
- while (toupper(od->pz_Name[match_ct]) == toupper(name[match_ct]))
+ while (toupper((unsigned char)od->pz_Name[match_ct]) == toupper((unsigned char)name[match_ct]))
match_ct++;
if (match_ct > min_match_ct)
@@ -666,8 +666,8 @@ emit_match_expr(char const * name, tOptDesc * cod, tOptions * opts)
continue;
match_ct = 0;
- while ( toupper(od->pz_DisableName[match_ct])
- == toupper(name[match_ct]))
+ while ( toupper((unsigned char)od->pz_DisableName[match_ct])
+ == toupper((unsigned char)name[match_ct]))
match_ct++;
if (match_ct > min_match_ct)
min_match_ct = match_ct;
@@ -901,11 +901,11 @@ genshelloptUsage(tOptions * opts, int exit_cd)
*/
{
char * pz;
- char ** pp = (char **)(void *)&(optionParseShellOptions->pzProgName);
+ char ** pp = (char **)(void *)(intptr_t)&(optionParseShellOptions->pzProgName);
AGDUPSTR(pz, optionParseShellOptions->pzPROGNAME, "prog name");
*pp = pz;
while (*pz != NUL) {
- *pz = (char)tolower(*pz);
+ *pz = (char)tolower((unsigned char)*pz);
pz++;
}
}
diff --git a/sntp/libopts/nested.c b/sntp/libopts/nested.c
index 0ec8f08..96e4553 100644
--- a/sntp/libopts/nested.c
+++ b/sntp/libopts/nested.c
@@ -645,7 +645,7 @@ unload_arg_list(tArgList * arg_list)
char const ** pnew_val = arg_list->apzArgs;
while (ct-- > 0) {
- tOptionValue* new_val = (tOptionValue*)(void*)*(pnew_val++);
+ tOptionValue* new_val = (tOptionValue*)(void*)(intptr_t)*(pnew_val++);
if (new_val->valType == OPARG_TYPE_HIERARCHY)
unload_arg_list(new_val->v.nestVal);
AGFREE(new_val);
@@ -675,7 +675,7 @@ optionUnloadNested(tOptionValue const * opt_val)
unload_arg_list(opt_val->v.nestVal);
- AGFREE((void*)opt_val);
+ AGFREE((void*)(intptr_t)opt_val);
}
/**
@@ -694,8 +694,8 @@ sort_list(tArgList * arg_list)
*/
for (ix = 0; ++ix < lm;) {
int iy = ix-1;
- tOptionValue * new_v = C(tOptionValue *, arg_list->apzArgs[ix]);
- tOptionValue * old_v = C(tOptionValue *, arg_list->apzArgs[iy]);
+ tOptionValue * new_v = C(tOptionValue *, (intptr_t)arg_list->apzArgs[ix]);
+ tOptionValue * old_v = C(tOptionValue *, (intptr_t)arg_list->apzArgs[iy]);
/*
* For as long as the new entry precedes the "old" entry,
@@ -704,7 +704,7 @@ sort_list(tArgList * arg_list)
*/
while (strcmp(old_v->pzName, new_v->pzName) > 0) {
arg_list->apzArgs[iy+1] = (void*)old_v;
- old_v = (tOptionValue*)(void*)(arg_list->apzArgs[--iy]);
+ old_v = (tOptionValue*)(void*)(intptr_t)(arg_list->apzArgs[--iy]);
if (iy < 0)
break;
}
@@ -837,7 +837,7 @@ optionNestedVal(tOptions * opts, tOptDesc * od)
av = arg_list->apzArgs;
while (--ct >= 0) {
- void * p = (void *)*(av++);
+ void * p = (void *)(intptr_t)*(av++);
optionUnloadNested((tOptionValue const *)p);
}
@@ -872,7 +872,7 @@ get_special_char(char const ** ppz, int * ct)
base = 16;
pz++;
}
- retch = (int)strtoul(pz, (char **)&pz, base);
+ retch = (int)strtoul(pz, (char **)(intptr_t)&pz, base);
if (*pz != ';')
return '&';
base = (int)(++pz - *ppz);
diff --git a/sntp/libopts/numeric.c b/sntp/libopts/numeric.c
index 9baba65..471cb93 100644
--- a/sntp/libopts/numeric.c
+++ b/sntp/libopts/numeric.c
@@ -42,7 +42,7 @@
* Show information about a numeric option with range constraints.
=*/
void
-optionShowRange(tOptions * pOpts, tOptDesc * pOD, void * rng_table, int rng_ct)
+optionShowRange(tOptions * pOpts, tOptDesc * pOD, const void * rng_table, int rng_ct)
{
const struct {long const rmin, rmax;} * rng = rng_table;
diff --git a/sntp/libopts/parse-duration.c b/sntp/libopts/parse-duration.c
index ff3fe42..2536a06 100644
--- a/sntp/libopts/parse-duration.c
+++ b/sntp/libopts/parse-duration.c
@@ -60,14 +60,14 @@ typedef enum {
static unsigned long
str_const_to_ul (cch_t * str, cch_t ** ppz, int base)
{
- return strtoul (str, (char **)ppz, base);
+ return strtoul (str, (char **)(intptr_t)ppz, base);
}
/* Wrapper around strtol that does not require a cast. */
static long
str_const_to_l (cch_t * str, cch_t ** ppz, int base)
{
- return strtol (str, (char **)ppz, base);
+ return strtol (str, (char **)(intptr_t)ppz, base);
}
/* Returns BASE + VAL * SCALE, interpreting BASE = BAD_TIME
diff --git a/sntp/libopts/pgusage.c b/sntp/libopts/pgusage.c
index 80a89a7..a385b4d 100644
--- a/sntp/libopts/pgusage.c
+++ b/sntp/libopts/pgusage.c
@@ -88,7 +88,7 @@ mk_pager_cmd(char const * fname)
bfsz = strlen(fname) + strlen(pager) + PAGE_USAGE_FMT_LEN;
res = AGALOC(bfsz, "more cmd");
snprintf(res, bfsz, PAGE_USAGE_FMT, pager, fname);
- AGFREE((void*)fname);
+ AGFREE((void*)(intptr_t)fname);
return res;
}
}
diff --git a/sntp/libopts/reset.c b/sntp/libopts/reset.c
index df81cd7..1e959a1 100644
--- a/sntp/libopts/reset.c
+++ b/sntp/libopts/reset.c
@@ -113,7 +113,7 @@ optionResetOpt(tOptions * pOpts, tOptDesc * pOD)
assert(0 == 1);
}
} else {
- succ = opt_find_long(pOpts, (char *)pzArg, &opt_state);
+ succ = opt_find_long(pOpts, (char *)(intptr_t)pzArg, &opt_state);
if (! SUCCESSFUL(succ)) {
fprintf(stderr, zIllOptStr, pOpts->pzProgPath, pzArg);
pOpts->pUsageProc(pOpts, EXIT_FAILURE);
diff --git a/sntp/libopts/save.c b/sntp/libopts/save.c
index 19c4c5b..dd51d60 100644
--- a/sntp/libopts/save.c
+++ b/sntp/libopts/save.c
@@ -183,7 +183,7 @@ find_file_name(tOptions * opts, int * p_free_name)
fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNoStat, errno, strerror(errno), pzDir);
if (free_dir_name)
- AGFREE((void*)pzDir);
+ AGFREE(pzDir);
return NULL;
}
@@ -223,7 +223,7 @@ find_file_name(tOptions * opts, int * p_free_name)
sprintf(pzPath, "%s/%s", pzDir, opts->pzRcName);
#endif
if (free_dir_name)
- AGFREE((void*)pzDir);
+ AGFREE(pzDir);
pzDir = pzPath;
free_dir_name = 1;
}
@@ -237,7 +237,7 @@ find_file_name(tOptions * opts, int * p_free_name)
fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNoStat, errno, strerror(errno),
pzDir);
- AGFREE((void*)pzDir);
+ AGFREE(pzDir);
return NULL;
}
@@ -255,7 +255,7 @@ find_file_name(tOptions * opts, int * p_free_name)
if (! S_ISREG(stBuf.st_mode)) {
fprintf(stderr, zsave_warn, opts->pzProgName, pzDir);
if (free_dir_name)
- AGFREE((void*)pzDir);
+ AGFREE(pzDir);
return NULL;
}
@@ -377,7 +377,7 @@ prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
/*
* set membership strings get allocated
*/
- AGFREE((void*)pOD->optArg.argString);
+ AGFREE(pOD->optArg.argString);
}
}
@@ -453,7 +453,7 @@ prt_val_list(FILE * fp, char const * name, tArgList * al)
if (al == NULL)
return;
opt_ct = al->useCt;
- opt_list = (void **)al->apzArgs;
+ opt_list = (void **)(intptr_t)al->apzArgs;
if (opt_ct <= 0) {
fprintf(fp, OPEN_CLOSE_FMT, name);
@@ -488,7 +488,7 @@ prt_nested(FILE * fp, tOptDesc * p)
return;
opt_ct = al->useCt;
- opt_list = (void **)al->apzArgs;
+ opt_list = (void **)(intptr_t)al->apzArgs;
if (opt_ct <= 0)
return;
@@ -534,12 +534,12 @@ open_sv_file(tOptions * opts)
fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNoCreat, errno, strerror(errno), pzFName);
if (free_name)
- AGFREE((void*) pzFName );
+ AGFREE(pzFName);
return fp;
}
if (free_name)
- AGFREE((void*)pzFName);
+ AGFREE(pzFName);
}
fputs("# ", fp);
@@ -629,7 +629,7 @@ prt_enum_arg(FILE * fp, tOptDesc * od)
* bit flag values back into a string suitable for printing.
*/
(*(od->pOptProc))(OPTPROC_RETURN_VALNAME, od);
- prt_entry(fp, od, (void*)(od->optArg.argString));
+ prt_entry(fp, od, (void*)(intptr_t)(od->optArg.argString));
od->optArg.argEnum = val;
}
diff --git a/sntp/libopts/tokenize.c b/sntp/libopts/tokenize.c
index 34abf83..a0db4cb 100644
--- a/sntp/libopts/tokenize.c
+++ b/sntp/libopts/tokenize.c
@@ -57,7 +57,7 @@ copy_cooked(ch_t** ppDest, char const ** ppSrc)
case NUL: *ppSrc = NULL; return;
case '"': goto done;
case '\\':
- pSrc += ao_string_cook_escape_char((char*)pSrc, (char*)&ch, 0x7F);
+ pSrc += ao_string_cook_escape_char((char*)(intptr_t)pSrc, (char*)(intptr_t)&ch, 0x7F);
if (ch == 0x7F)
break;
/* FALLTHROUGH */
diff --git a/sntp/libopts/usage.c b/sntp/libopts/usage.c
index 206235d..bb33b35 100644
--- a/sntp/libopts/usage.c
+++ b/sntp/libopts/usage.c
@@ -435,7 +435,7 @@ print_one_paragraph(char const * text, bool plain, FILE * fp)
else {
char const * t = optionQuoteString(text, LINE_SPLICE);
fprintf(fp, PUTS_FMT, t);
- AGFREE((void *)t);
+ AGFREE(t);
}
}
@@ -546,7 +546,7 @@ optionPrintParagraphs(char const * text, bool plain, FILE * fp)
buf = scan;
}
}
- AGFREE((void *)text);
+ AGFREE(text);
}
/*=export_func optionUsage
diff --git a/sntp/loc/darwin b/sntp/loc/darwin
index c902860..37d2dca 100644
--- a/sntp/loc/darwin
+++ b/sntp/loc/darwin
@@ -12,3 +12,4 @@ ntpsweep,noinst,8
ntptime,sbin,8
ntptrace,sbin,8
sntp,bin,8
+update-leap,sbin,8
diff --git a/sntp/loc/debian b/sntp/loc/debian
index 7bc895a..1242fdf 100644
--- a/sntp/loc/debian
+++ b/sntp/loc/debian
@@ -15,3 +15,4 @@ ntptrace,bin,1
sntp,bin,1
tickadj,sbin,8
timetrim,sbin,8
+update-leap,sbin,8
diff --git a/sntp/loc/freebsd b/sntp/loc/freebsd
index 7759e31..587f998 100644
--- a/sntp/loc/freebsd
+++ b/sntp/loc/freebsd
@@ -12,3 +12,4 @@ ntptime,sbin,8
ntpsweep,noinst,8
ntptrace,sbin,8
sntp,sbin,8
+update-leap,sbin,8
diff --git a/sntp/loc/legacy b/sntp/loc/legacy
index 46c63a2..5412971 100644
--- a/sntp/loc/legacy
+++ b/sntp/loc/legacy
@@ -15,3 +15,4 @@ ntptrace,bin,1
sntp,bin,1
tickadj,bin,1
timetrim,bin,1
+update-leap,bin,1
diff --git a/sntp/loc/netbsd b/sntp/loc/netbsd
index e84f789..200de2b 100644
--- a/sntp/loc/netbsd
+++ b/sntp/loc/netbsd
@@ -11,4 +11,5 @@ ntpsnmpd,sbin,8
ntpsweep,noinst,8
ntptime,sbin,8
ntptrace,sbin,8
-sntp,bin,1
+sntp,sbin,1
+update-leap,sbin,8
diff --git a/sntp/loc/solaris b/sntp/loc/solaris
index eca1438..a9b3853 100644
--- a/sntp/loc/solaris
+++ b/sntp/loc/solaris
@@ -14,3 +14,4 @@ ntptime,sbin,1m
ntptrace,sbin,1m
sntp,sbin,1m
tickadj,sbin,1m
+update-leap,sbin,1m
diff --git a/sntp/ltmain.sh b/sntp/ltmain.sh
new file mode 100755
index 0000000..3061e3c
--- /dev/null
+++ b/sntp/ltmain.sh
@@ -0,0 +1,9636 @@
+
+# libtool (GNU libtool) 2.4
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool 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 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --no-quiet, --no-silent
+# print informational messages (default)
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print more informational messages than default
+# --no-verbose don't print the extra informational messages
+# --version print version information
+# -h, --help, --help-all print short, long, or detailed help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE. When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.4
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4
+TIMESTAMP=""
+package_revision=1.3293
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+ s@/\./@/@g
+ t dotsl
+ s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+# value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test "$func_normal_abspath_tpath" = / ; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result" ; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+# value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=${func_dirname_result}
+ if test "x$func_relative_path_tlibdir" = x ; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test "x$func_stripname_result" != x ; then
+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+ fi
+
+ # Normalisation. If bindir is libdir, return empty string,
+ # else relative path ending with a slash; either way, target
+ # file name can be directly appended.
+ if test ! -z "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result/"
+ func_relative_path_result=$func_stripname_result
+ fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "$1" | $SED \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $opt_debug
+
+ $SED -n '/(C)/!b go
+ :more
+ /\./!{
+ N
+ s/\n# / /
+ b more
+ }
+ :go
+ /^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ echo
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ :print
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
+ ret=$?
+ if test -z "$1"; then
+ exit $ret
+ fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $opt_debug
+
+ func_error "missing argument for $1."
+ exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^--[^=]*=//'
+
+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+ func_quote_for_eval "${2}"
+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly. This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+ # this just eases exit handling
+ while test $# -gt 0; do
+ opt="$1"
+ shift
+ case $opt in
+ --debug|-x) opt_debug='set -x'
+ func_echo "enabling shell trace mode"
+ $opt_debug
+ ;;
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+ --config)
+ opt_config=:
+func_config
+ ;;
+ --dlopen|-dlopen)
+ optarg="$1"
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+ shift
+ ;;
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=:
+ ;;
+ --features)
+ opt_features=:
+func_features
+ ;;
+ --finish)
+ opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ --help)
+ opt_help=:
+ ;;
+ --help-all)
+ opt_help_all=:
+opt_help=': help-all'
+ ;;
+ --mode)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_mode="$optarg"
+case $optarg in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+esac
+ shift
+ ;;
+ --no-silent|--no-quiet)
+ opt_silent=false
+func_append preserve_args " $opt"
+ ;;
+ --no-verbose)
+ opt_verbose=false
+func_append preserve_args " $opt"
+ ;;
+ --silent|--quiet)
+ opt_silent=:
+func_append preserve_args " $opt"
+ opt_verbose=false
+ ;;
+ --verbose|-v)
+ opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+ ;;
+ --tag)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+ --version) func_version ;;
+
+ # Separate optargs to long options:
+ --*=*)
+ func_split_long_opt "$opt"
+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-n*|-v*)
+ func_split_short_opt "$opt"
+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # Validate options:
+
+ # save first non-option argument
+ if test "$#" -gt 0; then
+ nonopt="$opt"
+ shift
+ fi
+
+ # preserve --debug
+ test "$opt_debug" = : || func_append preserve_args " --debug"
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$opt_mode' for more information."
+ }
+
+
+ # Bail if the options were screwed
+ $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case "$lt_sysroot:$1" in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result="=$func_stripname_result"
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $opt_debug
+ func_convert_core_file_wine_to_w32_result="$1"
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $opt_debug
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=""
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $opt_debug
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $opt_debug
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $opt_debug
+ if test -z "$2" && test -n "$1" ; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " \`$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result="$1"
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $opt_debug
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " \`$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result="$3"
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $opt_debug
+ case $4 in
+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $opt_debug
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $opt_debug
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $opt_debug
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $opt_debug
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_append_quoted lastarg "$arg"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try \`$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test "$opt_help" = :; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ sed '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "\`$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument \`$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=""
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname" ; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename="$func_basename_result"
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename" ; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $opt_debug
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $opt_debug
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive which possess that section. Heuristic: eliminate
+ # all those which have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $opt_debug
+ if func_cygming_gnu_implib_p "$1" ; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1" ; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=""
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ if test "$lock_old_archive_extraction" = yes; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test "$lock_old_archive_extraction" = yes; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (strcmp (argv[i], debug_opt) == 0)
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
+
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $opt_debug
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir="$arg"
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps ; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test "$prefer_static_libs" = yes ||
+ test "$prefer_static_libs,$installed" = "built,no"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$lt_sysroot$libdir"
+ absdir="$lt_sysroot$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ case "$host" in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ echo
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$opt_mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|qnx|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ func_append libobjs " $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$opt_mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test "$want_nocaseglob" = yes; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_apped perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd1 in $cmds; do
+ IFS="$save_ifs"
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test "$try_normal_branch" = yes \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=${output_objdir}/${output_la}.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " ${wl}-bind_at_load"
+ func_append finalize_command " ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ func_append oldobjs " $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test "x$bindir" != x ;
+ then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=yes ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ odir="$objdir"
+ else
+ odir="$dir/$objdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$opt_mode" = uninstall && odir="$dir"
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test "$opt_mode" = clean; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case "$opt_mode" in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$opt_mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ func_append rmfiles " $odir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$opt_mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/sntp/m4/ax_c99_struct_init.m4 b/sntp/m4/ax_c99_struct_init.m4
new file mode 100644
index 0000000..44a2db3
--- /dev/null
+++ b/sntp/m4/ax_c99_struct_init.m4
@@ -0,0 +1,59 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_c99_struct_init.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_C99_STRUCT_INIT
+#
+# DESCRIPTION
+#
+# This macro defines MISSING_C99_STRUCT_INIT if the C compiler does not
+# supports the C99 tagged structure initialization.
+#
+# Given: struct foo_s {int i1; int i2; int i3;};
+# one can write:
+# #if !define(MISSING_C99_STRUCT_INIT)
+# # define FOO_INIT(a, b, c) { .i1 = a, .i2 = b, .i3 = c }
+# #else
+# # define FOO_INIT(a, b, c) { a, b, c }
+#
+# static struct foo_s foo[] = {
+# FOO_INIT(1, 1, 1),
+# FOO_INIT(2, 2, 2),
+# FOO_INIT(0, 0, 0)
+# };
+#
+# LICENSE
+#
+# Copyright (c) 2015 Network Time Foundation
+#
+# Author: Harlan Stenn <stenn@nwtime.org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([AX_C99_STRUCT_INIT], [
+ AC_MSG_CHECKING([whether the compiler supports C99 structure initialization])
+ AC_REQUIRE([AC_PROG_CC_C99])
+
+ AC_LANG_PUSH([C])
+
+ dnl AC_LINK_IFELSE?
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+ struct foo_s {int i1; int i2;};
+ int main() { struct foo_s foo[] = { { .i1 = 1, .i2 = 1 }, { .i1 = 2, .i2 = 2 }, { .i1 = 0, .i2 = 0 } }; }
+ ]])],
+ AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
+ AC_DEFINE([MISSING_C99_STRUCT_INIT], [1],
+ [Define to 1 if the compiler does not support C99's structure initialization.]),
+ )
+
+ AC_LANG_POP([C])
+ ]);
diff --git a/sntp/m4/hms_search_lib.m4 b/sntp/m4/hms_search_lib.m4
index e6dd601..d09ea3b 100644
--- a/sntp/m4/hms_search_lib.m4
+++ b/sntp/m4/hms_search_lib.m4
@@ -25,6 +25,6 @@ AC_DEFUN([HMS_SEARCH_LIBS],
no) ;;
*) $1[]="$ac_cv_search_$2[] $[]$1" ;;
esac
- [$4]],
- [$5],
+ $4],
+ $5,
[$6])])
diff --git a/sntp/m4/ntp_compiler.m4 b/sntp/m4/ntp_compiler.m4
index 2b41866..e4c515f 100644
--- a/sntp/m4/ntp_compiler.m4
+++ b/sntp/m4/ntp_compiler.m4
@@ -2,6 +2,7 @@ dnl ######################################################################
dnl Common m4sh code for compiler stuff
AC_DEFUN([NTP_COMPILER], [
AC_REQUIRE([AC_PROG_CC_C89])
+AC_REQUIRE([AC_PROG_CC_C99])
CFLAGS_NTP=
CPPFLAGS_NTP=
diff --git a/sntp/m4/ntp_crypto_rand.m4 b/sntp/m4/ntp_crypto_rand.m4
new file mode 100644
index 0000000..c529f3a
--- /dev/null
+++ b/sntp/m4/ntp_crypto_rand.m4
@@ -0,0 +1,53 @@
+# SYNOPSIS -*- Autoconf -*-
+#
+# NTP_CRYPTO_RAND
+#
+# DESCRIPTION
+#
+# AUTHOR
+#
+# Harlan Stenn
+#
+# LICENSE
+#
+# This file is Copyright (c) 2014 Network Time Foundation
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice,
+# author attribution and this notice are preserved. This file is offered
+# as-is, without any warranty.
+
+AC_DEFUN([NTP_CRYPTO_RAND], [
+
+dnl check for --disable-openssl-random
+dnl if that's not specified:
+dnl - Look for RAND_poll and RAND_bytes
+dnl - if they exist, define USE_OPENSSL_CRYPTO_RAND
+
+AC_MSG_CHECKING([if we want to use OpenSSL's crypto random (if available)])
+AC_ARG_ENABLE(
+ [openssl-random],
+ [AS_HELP_STRING(
+ [--enable-openssl-random],
+ [Use OpenSSL's crypto random number functions, if available (default is yes)]
+ )],
+ [ntp_use_openssl_random=$enableval],
+ [ntp_use_openssl_random=yes]
+)
+AC_MSG_RESULT([$ntp_use_openssl_random])
+
+# The following might need extra libraries
+NTPO_SAVED_LIBS="$LIBS"
+LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+dnl AC_MSG_NOTICE([LIBS is <$LIBS>])
+AC_CHECK_FUNCS([RAND_bytes RAND_poll])
+LIBS="$NTPO_SAVED_LIBS"
+case "$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
+ yesyesyes)
+ AC_DEFINE([USE_OPENSSL_CRYPTO_RAND], [1], [Use OpenSSL's crypto random functions])
+ ;;
+ *) ntp_use_openssl_random=no ;;
+esac
+
+]) dnl NTP_CRYPTO_RAND
+
diff --git a/sntp/m4/ntp_libevent.m4 b/sntp/m4/ntp_libevent.m4
index 5f81ae9..54174f0 100644
--- a/sntp/m4/ntp_libevent.m4
+++ b/sntp/m4/ntp_libevent.m4
@@ -1,4 +1,25 @@
-dnl NTP_ENABLE_LOCAL_LIBEVENT -*- Autoconf -*-
+# SYNOPSIS -*- Autoconf -*-
+#
+# NTP_ENABLE_LOCAL_LIBEVENT
+# NTP_LIBEVENT_CHECK([MINVERSION [, DIR]])
+# NTP_LIBEVENT_CHECK_NOBUILD([MINVERSION [, DIR]])
+#
+# DESCRIPTION
+#
+# AUTHOR
+#
+# Harlan Stenn
+#
+# LICENSE
+#
+# This file is Copyright (c) 2014 Network Time Foundation
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice,
+# author attribution and this notice are preserved. This file is offered
+# as-is, without any warranty.
+
+dnl NTP_ENABLE_LOCAL_LIBEVENT
dnl
dnl Provide only the --enable-local-libevent command-line option.
dnl
@@ -29,7 +50,7 @@ dnl If NOBUILD is provided as the 3rd argument, do all of the above,
dnl but DO NOT invoke DIR/configure if we are going to use our bundled
dnl version. This may be the case for nested packages.
dnl
-dnl provide --enable-local-libevent .
+dnl provides: --enable-local-libevent
dnl
dnl Examples:
dnl
diff --git a/sntp/m4/ntp_libntp.m4 b/sntp/m4/ntp_libntp.m4
index 13a621d..3aa3dff 100644
--- a/sntp/m4/ntp_libntp.m4
+++ b/sntp/m4/ntp_libntp.m4
@@ -78,6 +78,12 @@ esac
AC_CHECK_FUNCS([getclock stime timegm strlcpy strlcat])
+# Bug 2713
+LDADD_LIBUTIL=
+AC_SUBST([LDADD_LIBUTIL])
+HMS_SEARCH_LIBS([LDADD_LIBUTIL], [snprintb], [util],
+ [AC_DEFINE([USE_SNPRINTB], 1, [OK to use snprintb()?])])
+
dnl HP-UX 11.31 on HPPA has a net/if.h that can't be compiled with gcc4
dnl due to an incomplete type (a union) mpinfou used in an array. gcc3
dnl compiles it without complaint. The mpinfou union is defined later
@@ -872,13 +878,13 @@ AC_CACHE_CHECK(
[for SIGIO],
[ntp_cv_hdr_def_sigio],
[AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <signal.h>
#ifndef SIGIO
# error
#endif
- ],
+ ])],
[ntp_cv_hdr_def_sigio=yes],
[ntp_cv_hdr_def_sigio=no]
)]
@@ -941,13 +947,13 @@ AC_CACHE_CHECK(
[for SIGPOLL],
[ntp_cv_hdr_def_sigpoll],
[AC_PREPROC_IFELSE(
- [
+ [AC_LANG_SOURCE([
#include <signal.h>
#ifndef SIGPOLL
# error
#endif
- ],
+ ])],
[ntp_cv_hdr_def_sigpoll=yes],
[ntp_cv_hdr_def_sigpoll=no]
)]
diff --git a/sntp/m4/ntp_locinfo.m4 b/sntp/m4/ntp_locinfo.m4
index f045ac2..6701ba0 100644
--- a/sntp/m4/ntp_locinfo.m4
+++ b/sntp/m4/ntp_locinfo.m4
@@ -124,6 +124,12 @@ AC_SUBST([TIMETRIM_DL])
AC_SUBST([TIMETRIM_DS])
AC_SUBST([TIMETRIM_MS])
AC_SUBST([TIMETRIM_NI])
+AC_SUBST([UPDATE_LEAP_DB])
+AC_SUBST([UPDATE_LEAP_DL])
+AC_SUBST([UPDATE_LEAP_DS])
+AC_SUBST([UPDATE_LEAP_MS])
+AC_SUBST([UPDATE_LEAP_NI])
+AM_CONDITIONAL([INSTALL_UPDATE_LEAP], [test -z "$UPDATE_LEAP_NI" ])
])dnl
dnl ======================================================================
diff --git a/sntp/libevent/m4/openldap-thread-check.m4 b/sntp/m4/openldap-thread-check.m4
index 33f9199..33f9199 100644
--- a/sntp/libevent/m4/openldap-thread-check.m4
+++ b/sntp/m4/openldap-thread-check.m4
diff --git a/sntp/libevent/m4/openldap.m4 b/sntp/m4/openldap.m4
index 49ffb87..49ffb87 100644
--- a/sntp/libevent/m4/openldap.m4
+++ b/sntp/m4/openldap.m4
diff --git a/sntp/m4/version.m4 b/sntp/m4/version.m4
index cfbb398..945d9cb 100644
--- a/sntp/m4/version.m4
+++ b/sntp/m4/version.m4
@@ -1 +1 @@
-m4_define([VERSION_NUMBER],[4.2.7p482])
+m4_define([VERSION_NUMBER],[4.2.8p2])
diff --git a/sntp/main.c b/sntp/main.c
index d607108..20e27f0 100644
--- a/sntp/main.c
+++ b/sntp/main.c
@@ -659,7 +659,7 @@ xmt(
sockaddr_u * dst = &spkt->addr;
struct timeval tv_xmt;
struct pkt x_pkt;
- int pkt_len;
+ size_t pkt_len;
int sent;
if (0 != gettimeofday(&tv_xmt, NULL)) {
@@ -1161,6 +1161,7 @@ handle_pkt(
int stratum;
char * ref;
char * ts_str;
+ char * leaptxt;
double offset;
double precision;
double synch_distance;
@@ -1248,7 +1249,7 @@ handle_pkt(
if (synch_distance > 0.) {
cnt = snprintf(disptxt, sizeof(disptxt),
" +/- %f", synch_distance);
- if (cnt >= sizeof(disptxt))
+ if ((size_t)cnt >= sizeof(disptxt))
snprintf(disptxt, sizeof(disptxt),
"ERROR %d >= %d", cnt,
(int)sizeof(disptxt));
@@ -1256,9 +1257,28 @@ handle_pkt(
disptxt[0] = '\0';
}
- msyslog(LOG_INFO, "%s %+.*f%s %s s%d%s", ts_str,
+ switch (PKT_LEAP(rpkt->li_vn_mode)) {
+ case LEAP_NOWARNING:
+ leaptxt = "no-leap";
+ break;
+ case LEAP_ADDSECOND:
+ leaptxt = "add-leap";
+ break;
+ case LEAP_DELSECOND:
+ leaptxt = "del-leap";
+ break;
+ case LEAP_NOTINSYNC:
+ leaptxt = "unsync";
+ break;
+ default:
+ leaptxt = "LEAP-ERROR";
+ break;
+ }
+
+ msyslog(LOG_INFO, "%s %+.*f%s %s s%d %s%s", ts_str,
digits, offset, disptxt,
hostnameaddr(hostname, host), stratum,
+ leaptxt,
(time_adjusted)
? " [excess]"
: "");
@@ -1392,7 +1412,7 @@ set_li_vn_mode (
leap = 3;
}
- if (version < 0 || version > 7) {
+ if ((unsigned char)version > 7) {
msyslog(LOG_DEBUG, "set_li_vn_mode: version < 0 or > 7, using 4");
version = 4;
}
@@ -1545,7 +1565,7 @@ gettimeofday_cached(
diff = sub_tval(systemt, latest);
if (debug > 1)
printf("system minus cached %+ld.%06ld\n",
- (long)diff.tv_sec, diff.tv_usec);
+ (long)diff.tv_sec, (long)diff.tv_usec);
if (0 != cgt_rc || labs((long)diff.tv_sec) < 3600) {
/*
* Either use_monotonic == 0, or this libevent
@@ -1557,13 +1577,14 @@ gettimeofday_cached(
diff = sub_tval(latest, mono);
if (debug > 1)
printf("cached minus monotonic %+ld.%06ld\n",
- (long)diff.tv_sec, diff.tv_usec);
+ (long)diff.tv_sec, (long)diff.tv_usec);
if (labs((long)diff.tv_sec) < 3600) {
/* older libevent2 using monotonic */
offset = sub_tval(systemt, mono);
TRACE(1, ("%s: Offsetting libevent CLOCK_MONOTONIC times by %+ld.%06ld\n",
"gettimeofday_cached",
- (long)offset.tv_sec, offset.tv_usec));
+ (long)offset.tv_sec,
+ (long)offset.tv_usec));
}
}
offset_ready = TRUE;
diff --git a/sntp/missing b/sntp/missing
new file mode 100755
index 0000000..894e786
--- /dev/null
+++ b/sntp/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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 2, 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/sntp/networking.c b/sntp/networking.c
index 75c2f71..bef7352 100644
--- a/sntp/networking.c
+++ b/sntp/networking.c
@@ -80,7 +80,7 @@ skip_efields(
while ((tail - head) > 6) {
nlen = ntohl(*head++) & 0xffff;
nlen = (nlen + 3) >> 2;
- if (nlen > (tail - head) || nlen < 4)
+ if (nlen > (u_int)(tail - head) || nlen < 4)
return NULL; /* Blooper! Inconsistent! */
head += nlen;
}
@@ -129,8 +129,7 @@ process_pkt (
* extension field is present, so we subtract the length of the
* field and go around again.
*/
- if (pkt_len < LEN_PKT_NOMAC || (pkt_len & 3) != 0) {
-unusable:
+ if (pkt_len < (int)LEN_PKT_NOMAC || (pkt_len & 3) != 0) {
msyslog(LOG_ERR,
"%s: Incredible packet length: %d. Discarding.",
func_name, pkt_len);
@@ -139,8 +138,12 @@ unusable:
/* Note: pkt_len must be a multiple of 4 at this point! */
packet_end = (u_int32*)((char*)rpkt + pkt_len);
exten_end = skip_efields(rpkt->exten, packet_end);
- if (NULL == exten_end)
- goto unusable;
+ if (NULL == exten_end) {
+ msyslog(LOG_ERR,
+ "%s: Missing extension field. Discarding.",
+ func_name);
+ return PACKET_UNUSEABLE;
+ }
/* get size of MAC in cells; can be zero */
exten_len = (u_int)(packet_end - exten_end);
@@ -156,7 +159,10 @@ unusable:
break;
case 3: /* key ID + 3DES MAC -- unsupported! */
- goto unusable;
+ msyslog(LOG_ERR,
+ "%s: Key ID + 3DES MAC is unsupported. Discarding.",
+ func_name);
+ return PACKET_UNUSEABLE;
case 5: /* key ID + MD5 MAC */
case 6: /* key ID + SHA MAC */
@@ -190,7 +196,10 @@ unusable:
break;
default:
- goto unusable;
+ msyslog(LOG_ERR,
+ "%s: Unexpected extension length: %d. Discarding.",
+ func_name, exten_len);
+ return PACKET_UNUSEABLE;
}
switch (is_authentic) {
diff --git a/sntp/scm-rev b/sntp/scm-rev
index 794bc25..201b90e 100644
--- a/sntp/scm-rev
+++ b/sntp/scm-rev
@@ -1 +1 @@
-1.2483
+1.3265
diff --git a/sntp/scripts/Makefile.in b/sntp/scripts/Makefile.in
index 6dccb2d..73025d0 100644
--- a/sntp/scripts/Makefile.in
+++ b/sntp/scripts/Makefile.in
@@ -38,8 +38,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -59,8 +57,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -130,6 +130,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
LDFLAGS_NTP = @LDFLAGS_NTP@
@@ -245,6 +246,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/sntp/scripts/cvo.sh b/sntp/scripts/cvo.sh
index a8d00ef..ecd8092 100755
--- a/sntp/scripts/cvo.sh
+++ b/sntp/scripts/cvo.sh
@@ -45,7 +45,13 @@ case "$#" in
set `cat /etc/redhat-release`
case "$1" in
CentOS)
- CVO_OS=centos$3
+ case "$2" in
+ Linux)
+ CVO_OS=centos$4
+ ;;
+ *) CVO_OS=centos$3
+ ;;
+ esac
;;
Fedora)
CVO_OS=fedora$3
diff --git a/sntp/sntp-opts.c b/sntp/sntp-opts.c
index 11859b6..ce28d65 100644
--- a/sntp/sntp-opts.c
+++ b/sntp/sntp-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed December 2, 2014 at 08:49:12 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:17:23 AM by AutoGen 5.18.5pre4
* From the definitions sntp-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The sntp program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -51,7 +51,7 @@ extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright (sntp_opt_strs+0)
-#define zLicenseDescrip (sntp_opt_strs+314)
+#define zLicenseDescrip (sntp_opt_strs+340)
/*
* global included definitions
@@ -69,111 +69,112 @@ extern FILE * option_usage_fp;
/**
* static const strings for sntp options
*/
-static char const sntp_opt_strs[2499] =
-/* 0 */ "sntp 4.2.7p482\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const sntp_opt_strs[2549] =
+/* 0 */ "sntp 4.2.8p2\n"
+ "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
" <http://ntp.org/license>\n"
" <http://opensource.org/licenses/ntp-license.php>\n\0"
-/* 314 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 340 */ "Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose with or without fee is hereby granted,\n"
"provided that the above copyright notice appears in all copies and that\n"
"both the copyright notice and this permission notice appear in supporting\n"
"documentation, and that the name The University of Delaware not be used in\n"
"advertising or publicity pertaining to distribution of the software without\n"
- "specific, written prior permission. The University of Delaware makes no\n"
- "representations about the suitability this software for any purpose. It is\n"
- "provided \"as is\" without express or implied warranty.\n\0"
-/* 954 */ "Force IPv4 DNS name resolution\0"
-/* 985 */ "IPV4\0"
-/* 990 */ "ipv4\0"
-/* 995 */ "Force IPv6 DNS name resolution\0"
-/* 1026 */ "IPV6\0"
-/* 1031 */ "ipv6\0"
-/* 1036 */ "Enable authentication with the key auth-keynumber\0"
-/* 1086 */ "AUTHENTICATION\0"
-/* 1101 */ "authentication\0"
-/* 1116 */ "Listen to the address specified for broadcast time sync\0"
-/* 1172 */ "BROADCAST\0"
-/* 1182 */ "broadcast\0"
-/* 1192 */ "Concurrently query all IPs returned for host-name\0"
-/* 1242 */ "CONCURRENT\0"
-/* 1253 */ "concurrent\0"
-/* 1264 */ "Increase debug verbosity level\0"
-/* 1295 */ "DEBUG_LEVEL\0"
-/* 1307 */ "debug-level\0"
-/* 1319 */ "Set the debug verbosity level\0"
-/* 1349 */ "SET_DEBUG_LEVEL\0"
-/* 1365 */ "set-debug-level\0"
-/* 1381 */ "The gap (in milliseconds) between time requests\0"
-/* 1429 */ "GAP\0"
-/* 1433 */ "gap\0"
-/* 1437 */ "KoD history filename\0"
-/* 1458 */ "KOD\0"
-/* 1462 */ "kod\0"
-/* 1466 */ "/var/db/ntp-kod\0"
-/* 1482 */ "Look in this file for the key specified with -a\0"
-/* 1530 */ "KEYFILE\0"
-/* 1538 */ "keyfile\0"
-/* 1546 */ "Log to specified logfile\0"
-/* 1571 */ "LOGFILE\0"
-/* 1579 */ "logfile\0"
-/* 1587 */ "Adjustments less than steplimit msec will be slewed\0"
-/* 1639 */ "STEPLIMIT\0"
-/* 1649 */ "steplimit\0"
-/* 1659 */ "Send int as our NTP protocol version\0"
-/* 1696 */ "NTPVERSION\0"
-/* 1707 */ "ntpversion\0"
-/* 1718 */ "Use the NTP Reserved Port (port 123)\0"
-/* 1755 */ "USERESERVEDPORT\0"
-/* 1771 */ "usereservedport\0"
-/* 1787 */ "OK to 'step' the time with settimeofday(2)\0"
-/* 1830 */ "STEP\0"
-/* 1835 */ "step\0"
-/* 1840 */ "OK to 'slew' the time with adjtime(2)\0"
-/* 1878 */ "SLEW\0"
-/* 1883 */ "slew\0"
-/* 1888 */ "The number of seconds to wait for responses\0"
-/* 1932 */ "TIMEOUT\0"
-/* 1940 */ "timeout\0"
-/* 1948 */ "Wait for pending replies (if not setting the time)\0"
-/* 1999 */ "WAIT\0"
-/* 2004 */ "no-wait\0"
-/* 2012 */ "no\0"
-/* 2015 */ "display extended usage information and exit\0"
-/* 2059 */ "help\0"
-/* 2064 */ "extended usage information passed thru pager\0"
-/* 2109 */ "more-help\0"
-/* 2119 */ "output version information and exit\0"
-/* 2155 */ "version\0"
-/* 2163 */ "save the option state to a config file\0"
-/* 2202 */ "save-opts\0"
-/* 2212 */ "load options from a config file\0"
-/* 2244 */ "LOAD_OPTS\0"
-/* 2254 */ "no-load-opts\0"
-/* 2267 */ "SNTP\0"
-/* 2272 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.7p482\n"
+ "specific, written prior permission. The University of Delaware and Network\n"
+ "Time Foundation makes no representations about the suitability this\n"
+ "software for any purpose. It is provided \"as is\" without express or\n"
+ "implied warranty.\n\0"
+/* 1008 */ "Force IPv4 DNS name resolution\0"
+/* 1039 */ "IPV4\0"
+/* 1044 */ "ipv4\0"
+/* 1049 */ "Force IPv6 DNS name resolution\0"
+/* 1080 */ "IPV6\0"
+/* 1085 */ "ipv6\0"
+/* 1090 */ "Enable authentication with the key auth-keynumber\0"
+/* 1140 */ "AUTHENTICATION\0"
+/* 1155 */ "authentication\0"
+/* 1170 */ "Listen to the address specified for broadcast time sync\0"
+/* 1226 */ "BROADCAST\0"
+/* 1236 */ "broadcast\0"
+/* 1246 */ "Concurrently query all IPs returned for host-name\0"
+/* 1296 */ "CONCURRENT\0"
+/* 1307 */ "concurrent\0"
+/* 1318 */ "Increase debug verbosity level\0"
+/* 1349 */ "DEBUG_LEVEL\0"
+/* 1361 */ "debug-level\0"
+/* 1373 */ "Set the debug verbosity level\0"
+/* 1403 */ "SET_DEBUG_LEVEL\0"
+/* 1419 */ "set-debug-level\0"
+/* 1435 */ "The gap (in milliseconds) between time requests\0"
+/* 1483 */ "GAP\0"
+/* 1487 */ "gap\0"
+/* 1491 */ "KoD history filename\0"
+/* 1512 */ "KOD\0"
+/* 1516 */ "kod\0"
+/* 1520 */ "/var/db/ntp-kod\0"
+/* 1536 */ "Look in this file for the key specified with -a\0"
+/* 1584 */ "KEYFILE\0"
+/* 1592 */ "keyfile\0"
+/* 1600 */ "Log to specified logfile\0"
+/* 1625 */ "LOGFILE\0"
+/* 1633 */ "logfile\0"
+/* 1641 */ "Adjustments less than steplimit msec will be slewed\0"
+/* 1693 */ "STEPLIMIT\0"
+/* 1703 */ "steplimit\0"
+/* 1713 */ "Send int as our NTP protocol version\0"
+/* 1750 */ "NTPVERSION\0"
+/* 1761 */ "ntpversion\0"
+/* 1772 */ "Use the NTP Reserved Port (port 123)\0"
+/* 1809 */ "USERESERVEDPORT\0"
+/* 1825 */ "usereservedport\0"
+/* 1841 */ "OK to 'step' the time with settimeofday(2)\0"
+/* 1884 */ "STEP\0"
+/* 1889 */ "step\0"
+/* 1894 */ "OK to 'slew' the time with adjtime(2)\0"
+/* 1932 */ "SLEW\0"
+/* 1937 */ "slew\0"
+/* 1942 */ "The number of seconds to wait for responses\0"
+/* 1986 */ "TIMEOUT\0"
+/* 1994 */ "timeout\0"
+/* 2002 */ "Wait for pending replies (if not setting the time)\0"
+/* 2053 */ "WAIT\0"
+/* 2058 */ "no-wait\0"
+/* 2066 */ "no\0"
+/* 2069 */ "display extended usage information and exit\0"
+/* 2113 */ "help\0"
+/* 2118 */ "extended usage information passed thru pager\0"
+/* 2163 */ "more-help\0"
+/* 2173 */ "output version information and exit\0"
+/* 2209 */ "version\0"
+/* 2217 */ "save the option state to a config file\0"
+/* 2256 */ "save-opts\0"
+/* 2266 */ "load options from a config file\0"
+/* 2298 */ "LOAD_OPTS\0"
+/* 2308 */ "no-load-opts\0"
+/* 2321 */ "SNTP\0"
+/* 2326 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ hostname-or-IP ...]\n\0"
-/* 2433 */ "$HOME\0"
-/* 2439 */ ".\0"
-/* 2441 */ ".ntprc\0"
-/* 2448 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2482 */ "\n\0"
-/* 2484 */ "sntp 4.2.7p482";
+/* 2485 */ "$HOME\0"
+/* 2491 */ ".\0"
+/* 2493 */ ".ntprc\0"
+/* 2500 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 2534 */ "\n\0"
+/* 2536 */ "sntp 4.2.8p2";
/**
* ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv4 option */
-#define IPV4_DESC (sntp_opt_strs+954)
+#define IPV4_DESC (sntp_opt_strs+1008)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (sntp_opt_strs+985)
+#define IPV4_NAME (sntp_opt_strs+1039)
/** Name string for the ipv4 option */
-#define IPV4_name (sntp_opt_strs+990)
+#define IPV4_name (sntp_opt_strs+1044)
/** Other options that appear in conjunction with the ipv4 option */
static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
@@ -185,11 +186,11 @@ static int const aIpv4CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (sntp_opt_strs+995)
+#define IPV6_DESC (sntp_opt_strs+1049)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (sntp_opt_strs+1026)
+#define IPV6_NAME (sntp_opt_strs+1080)
/** Name string for the ipv6 option */
-#define IPV6_name (sntp_opt_strs+1031)
+#define IPV6_name (sntp_opt_strs+1085)
/** Other options that appear in conjunction with the ipv6 option */
static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
@@ -200,11 +201,11 @@ static int const aIpv6CantList[] = {
* authentication option description:
*/
/** Descriptive text for the authentication option */
-#define AUTHENTICATION_DESC (sntp_opt_strs+1036)
+#define AUTHENTICATION_DESC (sntp_opt_strs+1090)
/** Upper-cased name for the authentication option */
-#define AUTHENTICATION_NAME (sntp_opt_strs+1086)
+#define AUTHENTICATION_NAME (sntp_opt_strs+1140)
/** Name string for the authentication option */
-#define AUTHENTICATION_name (sntp_opt_strs+1101)
+#define AUTHENTICATION_name (sntp_opt_strs+1155)
/** Compiled in flag settings for the authentication option */
#define AUTHENTICATION_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -213,11 +214,11 @@ static int const aIpv6CantList[] = {
* broadcast option description:
*/
/** Descriptive text for the broadcast option */
-#define BROADCAST_DESC (sntp_opt_strs+1116)
+#define BROADCAST_DESC (sntp_opt_strs+1170)
/** Upper-cased name for the broadcast option */
-#define BROADCAST_NAME (sntp_opt_strs+1172)
+#define BROADCAST_NAME (sntp_opt_strs+1226)
/** Name string for the broadcast option */
-#define BROADCAST_name (sntp_opt_strs+1182)
+#define BROADCAST_name (sntp_opt_strs+1236)
/** Compiled in flag settings for the broadcast option */
#define BROADCAST_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -226,11 +227,11 @@ static int const aIpv6CantList[] = {
* concurrent option description:
*/
/** Descriptive text for the concurrent option */
-#define CONCURRENT_DESC (sntp_opt_strs+1192)
+#define CONCURRENT_DESC (sntp_opt_strs+1246)
/** Upper-cased name for the concurrent option */
-#define CONCURRENT_NAME (sntp_opt_strs+1242)
+#define CONCURRENT_NAME (sntp_opt_strs+1296)
/** Name string for the concurrent option */
-#define CONCURRENT_name (sntp_opt_strs+1253)
+#define CONCURRENT_name (sntp_opt_strs+1307)
/** Compiled in flag settings for the concurrent option */
#define CONCURRENT_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -239,11 +240,11 @@ static int const aIpv6CantList[] = {
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (sntp_opt_strs+1264)
+#define DEBUG_LEVEL_DESC (sntp_opt_strs+1318)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (sntp_opt_strs+1295)
+#define DEBUG_LEVEL_NAME (sntp_opt_strs+1349)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (sntp_opt_strs+1307)
+#define DEBUG_LEVEL_name (sntp_opt_strs+1361)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
@@ -251,11 +252,11 @@ static int const aIpv6CantList[] = {
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (sntp_opt_strs+1319)
+#define SET_DEBUG_LEVEL_DESC (sntp_opt_strs+1373)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (sntp_opt_strs+1349)
+#define SET_DEBUG_LEVEL_NAME (sntp_opt_strs+1403)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (sntp_opt_strs+1365)
+#define SET_DEBUG_LEVEL_name (sntp_opt_strs+1419)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -264,11 +265,11 @@ static int const aIpv6CantList[] = {
* gap option description:
*/
/** Descriptive text for the gap option */
-#define GAP_DESC (sntp_opt_strs+1381)
+#define GAP_DESC (sntp_opt_strs+1435)
/** Upper-cased name for the gap option */
-#define GAP_NAME (sntp_opt_strs+1429)
+#define GAP_NAME (sntp_opt_strs+1483)
/** Name string for the gap option */
-#define GAP_name (sntp_opt_strs+1433)
+#define GAP_name (sntp_opt_strs+1487)
/** The compiled in default value for the gap option argument */
#define GAP_DFT_ARG ((char const*)50)
/** Compiled in flag settings for the gap option */
@@ -279,13 +280,13 @@ static int const aIpv6CantList[] = {
* kod option description:
*/
/** Descriptive text for the kod option */
-#define KOD_DESC (sntp_opt_strs+1437)
+#define KOD_DESC (sntp_opt_strs+1491)
/** Upper-cased name for the kod option */
-#define KOD_NAME (sntp_opt_strs+1458)
+#define KOD_NAME (sntp_opt_strs+1512)
/** Name string for the kod option */
-#define KOD_name (sntp_opt_strs+1462)
+#define KOD_name (sntp_opt_strs+1516)
/** The compiled in default value for the kod option argument */
-#define KOD_DFT_ARG (sntp_opt_strs+1466)
+#define KOD_DFT_ARG (sntp_opt_strs+1520)
/** Compiled in flag settings for the kod option */
#define KOD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
@@ -294,11 +295,11 @@ static int const aIpv6CantList[] = {
* keyfile option description:
*/
/** Descriptive text for the keyfile option */
-#define KEYFILE_DESC (sntp_opt_strs+1482)
+#define KEYFILE_DESC (sntp_opt_strs+1536)
/** Upper-cased name for the keyfile option */
-#define KEYFILE_NAME (sntp_opt_strs+1530)
+#define KEYFILE_NAME (sntp_opt_strs+1584)
/** Name string for the keyfile option */
-#define KEYFILE_name (sntp_opt_strs+1538)
+#define KEYFILE_name (sntp_opt_strs+1592)
/** Compiled in flag settings for the keyfile option */
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
@@ -307,11 +308,11 @@ static int const aIpv6CantList[] = {
* logfile option description:
*/
/** Descriptive text for the logfile option */
-#define LOGFILE_DESC (sntp_opt_strs+1546)
+#define LOGFILE_DESC (sntp_opt_strs+1600)
/** Upper-cased name for the logfile option */
-#define LOGFILE_NAME (sntp_opt_strs+1571)
+#define LOGFILE_NAME (sntp_opt_strs+1625)
/** Name string for the logfile option */
-#define LOGFILE_name (sntp_opt_strs+1579)
+#define LOGFILE_name (sntp_opt_strs+1633)
/** Compiled in flag settings for the logfile option */
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
@@ -320,11 +321,11 @@ static int const aIpv6CantList[] = {
* steplimit option description:
*/
/** Descriptive text for the steplimit option */
-#define STEPLIMIT_DESC (sntp_opt_strs+1587)
+#define STEPLIMIT_DESC (sntp_opt_strs+1641)
/** Upper-cased name for the steplimit option */
-#define STEPLIMIT_NAME (sntp_opt_strs+1639)
+#define STEPLIMIT_NAME (sntp_opt_strs+1693)
/** Name string for the steplimit option */
-#define STEPLIMIT_name (sntp_opt_strs+1649)
+#define STEPLIMIT_name (sntp_opt_strs+1703)
/** Compiled in flag settings for the steplimit option */
#define STEPLIMIT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -333,11 +334,11 @@ static int const aIpv6CantList[] = {
* ntpversion option description:
*/
/** Descriptive text for the ntpversion option */
-#define NTPVERSION_DESC (sntp_opt_strs+1659)
+#define NTPVERSION_DESC (sntp_opt_strs+1713)
/** Upper-cased name for the ntpversion option */
-#define NTPVERSION_NAME (sntp_opt_strs+1696)
+#define NTPVERSION_NAME (sntp_opt_strs+1750)
/** Name string for the ntpversion option */
-#define NTPVERSION_name (sntp_opt_strs+1707)
+#define NTPVERSION_name (sntp_opt_strs+1761)
/** The compiled in default value for the ntpversion option argument */
#define NTPVERSION_DFT_ARG ((char const*)4)
/** Compiled in flag settings for the ntpversion option */
@@ -348,11 +349,11 @@ static int const aIpv6CantList[] = {
* usereservedport option description:
*/
/** Descriptive text for the usereservedport option */
-#define USERESERVEDPORT_DESC (sntp_opt_strs+1718)
+#define USERESERVEDPORT_DESC (sntp_opt_strs+1772)
/** Upper-cased name for the usereservedport option */
-#define USERESERVEDPORT_NAME (sntp_opt_strs+1755)
+#define USERESERVEDPORT_NAME (sntp_opt_strs+1809)
/** Name string for the usereservedport option */
-#define USERESERVEDPORT_name (sntp_opt_strs+1771)
+#define USERESERVEDPORT_name (sntp_opt_strs+1825)
/** Compiled in flag settings for the usereservedport option */
#define USERESERVEDPORT_FLAGS (OPTST_DISABLED)
@@ -360,11 +361,11 @@ static int const aIpv6CantList[] = {
* step option description:
*/
/** Descriptive text for the step option */
-#define STEP_DESC (sntp_opt_strs+1787)
+#define STEP_DESC (sntp_opt_strs+1841)
/** Upper-cased name for the step option */
-#define STEP_NAME (sntp_opt_strs+1830)
+#define STEP_NAME (sntp_opt_strs+1884)
/** Name string for the step option */
-#define STEP_name (sntp_opt_strs+1835)
+#define STEP_name (sntp_opt_strs+1889)
/** Compiled in flag settings for the step option */
#define STEP_FLAGS (OPTST_DISABLED)
@@ -372,11 +373,11 @@ static int const aIpv6CantList[] = {
* slew option description:
*/
/** Descriptive text for the slew option */
-#define SLEW_DESC (sntp_opt_strs+1840)
+#define SLEW_DESC (sntp_opt_strs+1894)
/** Upper-cased name for the slew option */
-#define SLEW_NAME (sntp_opt_strs+1878)
+#define SLEW_NAME (sntp_opt_strs+1932)
/** Name string for the slew option */
-#define SLEW_name (sntp_opt_strs+1883)
+#define SLEW_name (sntp_opt_strs+1937)
/** Compiled in flag settings for the slew option */
#define SLEW_FLAGS (OPTST_DISABLED)
@@ -384,11 +385,11 @@ static int const aIpv6CantList[] = {
* timeout option description:
*/
/** Descriptive text for the timeout option */
-#define TIMEOUT_DESC (sntp_opt_strs+1888)
+#define TIMEOUT_DESC (sntp_opt_strs+1942)
/** Upper-cased name for the timeout option */
-#define TIMEOUT_NAME (sntp_opt_strs+1932)
+#define TIMEOUT_NAME (sntp_opt_strs+1986)
/** Name string for the timeout option */
-#define TIMEOUT_name (sntp_opt_strs+1940)
+#define TIMEOUT_name (sntp_opt_strs+1994)
/** The compiled in default value for the timeout option argument */
#define TIMEOUT_DFT_ARG ((char const*)5)
/** Compiled in flag settings for the timeout option */
@@ -399,13 +400,13 @@ static int const aIpv6CantList[] = {
* wait option description:
*/
/** Descriptive text for the wait option */
-#define WAIT_DESC (sntp_opt_strs+1948)
+#define WAIT_DESC (sntp_opt_strs+2002)
/** Upper-cased name for the wait option */
-#define WAIT_NAME (sntp_opt_strs+1999)
+#define WAIT_NAME (sntp_opt_strs+2053)
/** disablement name for the wait option */
-#define NOT_WAIT_name (sntp_opt_strs+2004)
+#define NOT_WAIT_name (sntp_opt_strs+2058)
/** disablement prefix for the wait option */
-#define NOT_WAIT_PFX (sntp_opt_strs+2012)
+#define NOT_WAIT_PFX (sntp_opt_strs+2066)
/** Name string for the wait option */
#define WAIT_name (NOT_WAIT_name + 3)
/** Compiled in flag settings for the wait option */
@@ -414,11 +415,11 @@ static int const aIpv6CantList[] = {
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (sntp_opt_strs+2015)
-#define HELP_name (sntp_opt_strs+2059)
+#define HELP_DESC (sntp_opt_strs+2069)
+#define HELP_name (sntp_opt_strs+2113)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (sntp_opt_strs+2064)
-#define MORE_HELP_name (sntp_opt_strs+2109)
+#define MORE_HELP_DESC (sntp_opt_strs+2118)
+#define MORE_HELP_name (sntp_opt_strs+2163)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -431,14 +432,14 @@ static int const aIpv6CantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (sntp_opt_strs+2119)
-#define VER_name (sntp_opt_strs+2155)
-#define SAVE_OPTS_DESC (sntp_opt_strs+2163)
-#define SAVE_OPTS_name (sntp_opt_strs+2202)
-#define LOAD_OPTS_DESC (sntp_opt_strs+2212)
-#define LOAD_OPTS_NAME (sntp_opt_strs+2244)
-#define NO_LOAD_OPTS_name (sntp_opt_strs+2254)
-#define LOAD_OPTS_pfx (sntp_opt_strs+2012)
+#define VER_DESC (sntp_opt_strs+2173)
+#define VER_name (sntp_opt_strs+2209)
+#define SAVE_OPTS_DESC (sntp_opt_strs+2217)
+#define SAVE_OPTS_name (sntp_opt_strs+2256)
+#define LOAD_OPTS_DESC (sntp_opt_strs+2266)
+#define LOAD_OPTS_NAME (sntp_opt_strs+2298)
+#define NO_LOAD_OPTS_name (sntp_opt_strs+2308)
+#define LOAD_OPTS_pfx (sntp_opt_strs+2066)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -744,24 +745,24 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of sntp. */
-#define zPROGNAME (sntp_opt_strs+2267)
+#define zPROGNAME (sntp_opt_strs+2321)
/** Reference to the title line for sntp usage. */
-#define zUsageTitle (sntp_opt_strs+2272)
+#define zUsageTitle (sntp_opt_strs+2326)
/** sntp configuration file name. */
-#define zRcName (sntp_opt_strs+2441)
+#define zRcName (sntp_opt_strs+2493)
/** Directories to search for sntp config files. */
static char const * const apzHomeList[3] = {
- sntp_opt_strs+2433,
- sntp_opt_strs+2439,
+ sntp_opt_strs+2485,
+ sntp_opt_strs+2491,
NULL };
/** The sntp program bug email address. */
-#define zBugsAddr (sntp_opt_strs+2448)
+#define zBugsAddr (sntp_opt_strs+2500)
/** Clarification/explanation of what sntp does. */
-#define zExplain (sntp_opt_strs+2482)
+#define zExplain (sntp_opt_strs+2534)
/** Extra detail explaining what sntp does. */
#define zDetail (NULL)
/** The full version string for sntp. */
-#define zFullVersion (sntp_opt_strs+2484)
+#define zFullVersion (sntp_opt_strs+2536)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -825,7 +826,8 @@ OPT_VALUE_SET_DEBUG_LEVEL++;
/**
* Code to handle the kod option.
* Specifies the filename to be used for the persistent history of KoD
- * responses received from servers.
+ * responses received from servers. If the file does not exist, a
+ * warning message will be displayed. The file will not be created.
* @param[in] pOptions the sntp options data structure
* @param[in,out] pOptDesc the option descriptor for this option.
*/
@@ -903,7 +905,9 @@ doOptLogfile(tOptions* pOptions, tOptDesc* pOptDesc)
* Code to handle the steplimit option.
* If the time adjustment is less than @file{steplimit} milliseconds,
* slew the amount using @command{adjtime(2)}. Otherwise, step the
- * correction using @command{settimeofday(2)}.
+ * correction using @command{settimeofday(2)}. The default value is 0,
+ * which means all adjustments will be stepped. This is a feature, as
+ * different situations demand different values.
* @param[in] pOptions the sntp options data structure
* @param[in,out] pOptDesc the option descriptor for this option.
*/
@@ -1169,8 +1173,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via sntpOptions.pzCopyright */
- puts(_("sntp 4.2.7p482\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("sntp 4.2.8p2\n\
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1184,9 +1188,10 @@ provided that the above copyright notice appears in all copies and that\n\
both the copyright notice and this permission notice appear in supporting\n\
documentation, and that the name The University of Delaware not be used in\n\
advertising or publicity pertaining to distribution of the software without\n\
-specific, written prior permission. The University of Delaware makes no\n\
-representations about the suitability this software for any purpose. It is\n\
-provided \"as is\" without express or implied warranty.\n"));
+specific, written prior permission. The University of Delaware and Network\n\
+Time Foundation makes no representations about the suitability this\n\
+software for any purpose. It is provided \"as is\" without express or\n\
+implied warranty.\n"));
/* referenced via sntpOptions.pOptDesc->pzText */
puts(_("Force IPv4 DNS name resolution"));
@@ -1258,7 +1263,7 @@ provided \"as is\" without express or 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.7p482\n\
+ puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ hostname-or-IP ...]\n"));
@@ -1266,7 +1271,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via sntpOptions.pzFullVersion */
- puts(_("sntp 4.2.7p482"));
+ puts(_("sntp 4.2.8p2"));
/* referenced via sntpOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/sntp/sntp-opts.def b/sntp/sntp-opts.def
index 86e17c9..fcfeaaf 100644
--- a/sntp/sntp-opts.def
+++ b/sntp/sntp-opts.def
@@ -117,7 +117,8 @@ flag = {
descrip = "KoD history filename";
doc = <<- _EndOfDoc_
Specifies the filename to be used for the persistent history of KoD
- responses received from servers.
+ responses received from servers. If the file does not exist, a
+ warning message will be displayed. The file will not be created.
_EndOfDoc_;
};
@@ -156,7 +157,9 @@ flag = {
doc = <<- _EndOfDoc_
If the time adjustment is less than @file{steplimit} milliseconds,
slew the amount using @command{adjtime(2)}. Otherwise, step the
- correction using @command{settimeofday(2)}.
+ correction using @command{settimeofday(2)}. The default value is 0,
+ which means all adjustments will be stepped. This is a feature, as
+ different situations demand different values.
_EndOfDoc_;
};
@@ -278,7 +281,8 @@ Otherwise, only the
is displayed.
Finally, the
.Em stratum
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
_END_PROG_MDOC_DESCRIP;
};
@@ -291,14 +295,27 @@ doc-section = {
is the simplest use of this program
and can be run as an unprivileged command
to check the current time and error in the local clock.
-.It Li "sntp -a ntpserver.somewhere"
+.It Li "sntp -Ss -M 128 ntpserver.somewhere"
With suitable privilege,
run as a command
or from a
.Xr cron 8
job,
-.Ic "sntp -a"
-will reset the local clock from a synchronized specified server,
+.Ic "sntp -Ss -M 128 ntpserver.somewhere"
+will request the time from the server,
+and if that server reports that it is synchronized
+then if the offset adjustment is less than 128 milliseconds
+the correction will be slewed,
+and if the correction is more than 128 milliseconds
+the correction will be stepped.
+.It Li "sntp -S ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp -S ntpserver.somewhere"
+will set (step) the local clock from a synchronized specified server,
like the (deprecated)
.Xr ntpdate 1ntpdatemdoc ,
or
diff --git a/sntp/sntp-opts.h b/sntp/sntp-opts.h
index 6c843d9..8f1a5df 100644
--- a/sntp/sntp-opts.h
+++ b/sntp/sntp-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed December 2, 2014 at 08:49:11 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:17:22 AM by AutoGen 5.18.5pre4
* From the definitions sntp-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The sntp program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -91,9 +91,9 @@ typedef enum {
/** count of all options for sntp */
#define OPTION_CT 23
/** sntp version */
-#define SNTP_VERSION "4.2.7p482"
+#define SNTP_VERSION "4.2.8p2"
/** Full sntp version text */
-#define SNTP_FULL_VERSION "sntp 4.2.7p482"
+#define SNTP_FULL_VERSION "sntp 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/sntp/sntp.1sntpman b/sntp/sntp.1sntpman
index 15b4dff..1b636e9 100644
--- a/sntp/sntp.1sntpman
+++ b/sntp/sntp.1sntpman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp 1sntpman "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH sntp 1sntpman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-GgaaeT/ag-5ga4cT)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E6aqmA/ag-76ailA)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:59:25 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:18:00 AM by AutoGen 5.18.5pre4
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -72,7 +72,8 @@ Otherwise, only the
is displayed.
Finally, the
\fIstratum\f[]
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
@@ -156,7 +157,8 @@ for this option is:
/var/db/ntp-kod
.sp
Specifies the filename to be used for the persistent history of KoD
-responses received from servers.
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]file\-name\f[]
Look in this file for the key specified with \fB-a\fP.
@@ -187,7 +189,9 @@ greater than or equal to 0
.sp
If the time adjustment is less than \fIsteplimit\fP milliseconds,
slew the amount using \fBadjtime(2)\fP. Otherwise, step the
-correction using \fBsettimeofday(2)\fP.
+correction using \fBsettimeofday(2)\fP. The default value is 0,
+which means all adjustments will be stepped. This is a feature, as
+different situations demand different values.
.TP
.NOP \f\*[B-Font]\-o\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-ntpversion\f[]=\f\*[I-Font]number\f[]
Send \fBint\fP as our NTP protocol version.
@@ -288,14 +292,28 @@ is the simplest use of this program
and can be run as an unprivileged command
to check the current time and error in the local clock.
.TP 7
-.NOP \f[C]sntp \-a ntpserver.somewhere\f[]
+.NOP \f[C]sntp \-Ss \-M 128 ntpserver.somewhere\f[]
With suitable privilege,
run as a command
or from a
\fCcron\fR(8)\f[]
job,
-\f\*[B-Font]sntp \-a\f[]
-will reset the local clock from a synchronized specified server,
+\f\*[B-Font]sntp \-Ss \-M 128 ntpserver.somewhere\f[]
+will request the time from the server,
+and if that server reports that it is synchronized
+then if the offset adjustment is less than 128 milliseconds
+the correction will be slewed,
+and if the correction is more than 128 milliseconds
+the correction will be stepped.
+.TP 7
+.NOP \f[C]sntp \-S ntpserver.somewhere\f[]
+With suitable privilege,
+run as a command
+or from a
+\fCcron\fR(8)\f[]
+job,
+\f\*[B-Font]sntp \-S ntpserver.somewhere\f[]
+will set (step) the local clock from a synchronized specified server,
like the (deprecated)
\fCntpdate\fR(1ntpdatemdoc)\f[],
or
@@ -330,7 +348,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Dave Hart"
.br
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/sntp/sntp.1sntpmdoc b/sntp/sntp.1sntpmdoc
index f60f61f..5a84a80 100644
--- a/sntp/sntp.1sntpmdoc
+++ b/sntp/sntp.1sntpmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt SNTP 1sntpmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:59:31 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:18:06 AM by AutoGen 5.18.5pre4
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -57,7 +57,8 @@ Otherwise, only the
is displayed.
Finally, the
.Em stratum
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
.Sh "OPTIONS"
.Bl -tag
.It Fl 4 , Fl \-ipv4
@@ -133,7 +134,8 @@ for this option is:
/var/db/ntp\-kod
.sp
Specifies the filename to be used for the persistent history of KoD
-responses received from servers.
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
.It Fl k Ar file\-name , Fl \-keyfile Ns = Ns Ar file\-name
Look in this file for the key specified with \fB\-a\fP.
.sp
@@ -161,7 +163,9 @@ greater than or equal to 0
.sp
If the time adjustment is less than \fIsteplimit\fP milliseconds,
slew the amount using \fBadjtime(2)\fP. Otherwise, step the
-correction using \fBsettimeofday(2)\fP.
+correction using \fBsettimeofday(2)\fP. The default value is 0,
+which means all adjustments will be stepped. This is a feature, as
+different situations demand different values.
.It Fl o Ar number , Fl \-ntpversion Ns = Ns Ar number
Send \fBint\fP as our NTP protocol version.
This option takes an integer number as its argument.
@@ -250,14 +254,27 @@ is searched for within those directories.
is the simplest use of this program
and can be run as an unprivileged command
to check the current time and error in the local clock.
-.It Li "sntp \-a ntpserver.somewhere"
+.It Li "sntp \-Ss \-M 128 ntpserver.somewhere"
With suitable privilege,
run as a command
or from a
.Xr cron 8
job,
-.Ic "sntp \-a"
-will reset the local clock from a synchronized specified server,
+.Ic "sntp \-Ss \-M 128 ntpserver.somewhere"
+will request the time from the server,
+and if that server reports that it is synchronized
+then if the offset adjustment is less than 128 milliseconds
+the correction will be slewed,
+and if the correction is more than 128 milliseconds
+the correction will be stepped.
+.It Li "sntp \-S ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp \-S ntpserver.somewhere"
+will set (step) the local clock from a synchronized specified server,
like the (deprecated)
.Xr ntpdate 1ntpdatemdoc ,
or
@@ -286,7 +303,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.An "Harlan Stenn"
.An "Dave Hart"
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/sntp/sntp.html b/sntp/sntp.html
index 1606920..5b41a7f 100644
--- a/sntp/sntp.html
+++ b/sntp/sntp.html
@@ -36,7 +36,7 @@ display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
- <p>This document applies to version 4.2.7p482 of <code>sntp</code>.
+ <p>This document applies to version 4.2.8p2 of <code>sntp</code>.
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
@@ -127,7 +127,8 @@ Otherwise, only the
is displayed.
Finally, the
<em>stratum</em>
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
<p>This section was generated by <strong>AutoGen</strong>,
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>sntp</code> program.
@@ -175,7 +176,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.7p482
+<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p2
Usage: sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
@@ -368,7 +369,8 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
This is the &ldquo;kod history filename&rdquo; option.
This option takes a file argument <span class="file">file-name</span>.
Specifies the filename to be used for the persistent history of KoD
-responses received from servers.
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
<div class="node">
<p><hr>
<a name="sntp-keyfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
@@ -416,7 +418,9 @@ This is the &ldquo;adjustments less than <var>steplimit</var> msec will be slewe
This option takes a number argument.
If the time adjustment is less than <span class="file">steplimit</span> milliseconds,
slew the amount using <span class="command">adjtime(2)</span>. Otherwise, step the
-correction using <span class="command">settimeofday(2)</span>.
+correction using <span class="command">settimeofday(2)</span>. The default value is 0,
+which means all adjustments will be stepped. This is a feature, as
+different situations demand different values.
<div class="node">
<p><hr>
<a name="sntp-ntpversion"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-usereservedport">sntp usereservedport</a>,
diff --git a/sntp/sntp.man.in b/sntp/sntp.man.in
index 5d54a30..a1a3e07 100644
--- a/sntp/sntp.man.in
+++ b/sntp/sntp.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp @SNTP_MS@ "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH sntp @SNTP_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-GgaaeT/ag-5ga4cT)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-E6aqmA/ag-76ailA)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:59:25 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:18:00 AM by AutoGen 5.18.5pre4
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -72,7 +72,8 @@ Otherwise, only the
is displayed.
Finally, the
\fIstratum\f[]
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
@@ -156,7 +157,8 @@ for this option is:
/var/db/ntp-kod
.sp
Specifies the filename to be used for the persistent history of KoD
-responses received from servers.
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]file\-name\f[]
Look in this file for the key specified with \fB-a\fP.
@@ -187,7 +189,9 @@ greater than or equal to 0
.sp
If the time adjustment is less than \fIsteplimit\fP milliseconds,
slew the amount using \fBadjtime(2)\fP. Otherwise, step the
-correction using \fBsettimeofday(2)\fP.
+correction using \fBsettimeofday(2)\fP. The default value is 0,
+which means all adjustments will be stepped. This is a feature, as
+different situations demand different values.
.TP
.NOP \f\*[B-Font]\-o\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-ntpversion\f[]=\f\*[I-Font]number\f[]
Send \fBint\fP as our NTP protocol version.
@@ -288,14 +292,28 @@ is the simplest use of this program
and can be run as an unprivileged command
to check the current time and error in the local clock.
.TP 7
-.NOP \f[C]sntp \-a ntpserver.somewhere\f[]
+.NOP \f[C]sntp \-Ss \-M 128 ntpserver.somewhere\f[]
With suitable privilege,
run as a command
or from a
\fCcron\fR(8)\f[]
job,
-\f\*[B-Font]sntp \-a\f[]
-will reset the local clock from a synchronized specified server,
+\f\*[B-Font]sntp \-Ss \-M 128 ntpserver.somewhere\f[]
+will request the time from the server,
+and if that server reports that it is synchronized
+then if the offset adjustment is less than 128 milliseconds
+the correction will be slewed,
+and if the correction is more than 128 milliseconds
+the correction will be stepped.
+.TP 7
+.NOP \f[C]sntp \-S ntpserver.somewhere\f[]
+With suitable privilege,
+run as a command
+or from a
+\fCcron\fR(8)\f[]
+job,
+\f\*[B-Font]sntp \-S ntpserver.somewhere\f[]
+will set (step) the local clock from a synchronized specified server,
like the (deprecated)
\fCntpdate\fR(@NTPDATE_MS@)\f[],
or
@@ -330,7 +348,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Dave Hart"
.br
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/sntp/sntp.mdoc.in b/sntp/sntp.mdoc.in
index 13c768f..31a4268 100644
--- a/sntp/sntp.mdoc.in
+++ b/sntp/sntp.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt SNTP @SNTP_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:59:31 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:18:06 AM by AutoGen 5.18.5pre4
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -57,7 +57,8 @@ Otherwise, only the
is displayed.
Finally, the
.Em stratum
-of the host is reported.
+of the host is reported
+and the leap indicator is decoded and displayed.
.Sh "OPTIONS"
.Bl -tag
.It Fl 4 , Fl \-ipv4
@@ -133,7 +134,8 @@ for this option is:
/var/db/ntp\-kod
.sp
Specifies the filename to be used for the persistent history of KoD
-responses received from servers.
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
.It Fl k Ar file\-name , Fl \-keyfile Ns = Ns Ar file\-name
Look in this file for the key specified with \fB\-a\fP.
.sp
@@ -161,7 +163,9 @@ greater than or equal to 0
.sp
If the time adjustment is less than \fIsteplimit\fP milliseconds,
slew the amount using \fBadjtime(2)\fP. Otherwise, step the
-correction using \fBsettimeofday(2)\fP.
+correction using \fBsettimeofday(2)\fP. The default value is 0,
+which means all adjustments will be stepped. This is a feature, as
+different situations demand different values.
.It Fl o Ar number , Fl \-ntpversion Ns = Ns Ar number
Send \fBint\fP as our NTP protocol version.
This option takes an integer number as its argument.
@@ -250,14 +254,27 @@ is searched for within those directories.
is the simplest use of this program
and can be run as an unprivileged command
to check the current time and error in the local clock.
-.It Li "sntp \-a ntpserver.somewhere"
+.It Li "sntp \-Ss \-M 128 ntpserver.somewhere"
With suitable privilege,
run as a command
or from a
.Xr cron 8
job,
-.Ic "sntp \-a"
-will reset the local clock from a synchronized specified server,
+.Ic "sntp \-Ss \-M 128 ntpserver.somewhere"
+will request the time from the server,
+and if that server reports that it is synchronized
+then if the offset adjustment is less than 128 milliseconds
+the correction will be slewed,
+and if the correction is more than 128 milliseconds
+the correction will be stepped.
+.It Li "sntp \-S ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp \-S ntpserver.somewhere"
+will set (step) the local clock from a synchronized specified server,
like the (deprecated)
.Xr ntpdate @NTPDATE_MS@ ,
or
@@ -286,7 +303,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.An "Harlan Stenn"
.An "Dave Hart"
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/sntp/tests/Makefile.in b/sntp/tests/Makefile.in
index c123282..194af0f 100644
--- a/sntp/tests/Makefile.in
+++ b/sntp/tests/Makefile.in
@@ -44,8 +44,6 @@ subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/libevent/m4/openldap.m4 \
$(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -65,8 +63,10 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
$(top_srcdir)/m4/ntp_sysexits.m4 \
$(top_srcdir)/m4/ntp_ver_suffix.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
- $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/os_cflags.m4 \
+ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/version.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -179,6 +179,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
LDFLAGS_NTP = @LDFLAGS_NTP@
@@ -294,6 +295,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 93868a2..0b88e40 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -42,8 +42,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -54,6 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -71,6 +71,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -151,6 +153,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -185,7 +188,9 @@ 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@
@@ -324,6 +329,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/tests/libntp/Makefile.in b/tests/libntp/Makefile.in
index ff397f0..233c3ef 100644
--- a/tests/libntp/Makefile.in
+++ b/tests/libntp/Makefile.in
@@ -44,8 +44,7 @@ subdir = tests/libntp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -56,6 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -73,6 +73,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -165,6 +167,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -199,7 +202,9 @@ 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@
@@ -338,6 +343,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/tests/ntpd/Makefile.in b/tests/ntpd/Makefile.in
index 2235fc5..bb51457 100644
--- a/tests/ntpd/Makefile.in
+++ b/tests/ntpd/Makefile.in
@@ -44,8 +44,7 @@ subdir = tests/ntpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -56,6 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -73,6 +73,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -168,6 +170,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -202,7 +205,9 @@ 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@
@@ -341,6 +346,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/util/Makefile.am b/util/Makefile.am
index 4265e0b..8a47a3c 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -19,6 +19,7 @@ AM_LDFLAGS = $(LDFLAGS_NTP)
LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
tg2_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a
+ntp_keygen_LDADD += $(LDADD_LIBEVENT)
ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM)
ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
@@ -111,7 +112,7 @@ $(srcdir)/ntp-keygen.html: $(srcdir)/ntp-keygen.texi $(top_srcdir)/sntp/include/
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp-keygen.html ntp-keygen.texi || true )
-jitter_SOURCES= jitter.c jitter.h
+jitter_SOURCES= jitter.c
jitter_LDADD=
kern.o: kern.c
diff --git a/util/Makefile.in b/util/Makefile.in
index 06293ac..f4fc712 100644
--- a/util/Makefile.in
+++ b/util/Makefile.in
@@ -47,13 +47,12 @@ EXTRA_PROGRAMS = audio-pcm$(EXEEXT) byteorder$(EXEEXT) hist$(EXEEXT) \
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf \
$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
- $(top_srcdir)/sntp/check-libntp.mf
+ $(top_srcdir)/sntp/check-libntp.mf ansi2knr.1 ansi2knr.c
subdir = util
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -64,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.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 \
@@ -81,6 +81,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -130,7 +132,8 @@ am_ntp_keygen_OBJECTS = ntp-keygen.$(OBJEXT) ntp-keygen-opts.$(OBJEXT)
ntp_keygen_OBJECTS = $(am_ntp_keygen_OBJECTS)
ntp_keygen_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) \
../libntp/libntp.a $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
ntptime_SOURCES = ntptime.c
ntptime_OBJECTS = ntptime.$(OBJEXT)
ntptime_LDADD = $(LDADD)
@@ -258,6 +261,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -292,7 +296,9 @@ 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@
@@ -431,6 +437,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
@@ -501,7 +512,8 @@ AM_LDFLAGS = $(LDFLAGS_NTP)
LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
tg2_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
- $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM)
+ $(LDADD_LIBEVENT) $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) \
+ $(LIBM)
ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
tickadj_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDADD_NLIST)
EXTRA_DIST = \
@@ -548,7 +560,7 @@ std_def_list = \
$(top_srcdir)/sntp/include/version.def \
$(NULL)
-jitter_SOURCES = jitter.c jitter.h
+jitter_SOURCES = jitter.c
jitter_LDADD =
NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
-I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
diff --git a/util/ansi2knr.1 b/util/ansi2knr.1
new file mode 100644
index 0000000..f9ee5a6
--- /dev/null
+++ b/util/ansi2knr.1
@@ -0,0 +1,36 @@
+.TH ANSI2KNR 1 "19 Jan 1996"
+.SH NAME
+ansi2knr \- convert ANSI C to Kernighan & Ritchie C
+.SH SYNOPSIS
+.I ansi2knr
+[--varargs] input_file [output_file]
+.SH DESCRIPTION
+If no output_file is supplied, output goes to stdout.
+.br
+There are no error messages.
+.sp
+.I ansi2knr
+recognizes function definitions by seeing a non-keyword identifier at the left
+margin, followed by a left parenthesis, with a right parenthesis as the last
+character on the line, and with a left brace as the first token on the
+following line (ignoring possible intervening comments). It will recognize a
+multi-line header provided that no intervening line ends with a left or right
+brace or a semicolon. These algorithms ignore whitespace and comments, except
+that the function name must be the first thing on the line.
+.sp
+The following constructs will confuse it:
+.br
+ - Any other construct that starts at the left margin and follows the
+above syntax (such as a macro or function call).
+.br
+ - Some macros that tinker with the syntax of the function header.
+.sp
+The --varargs switch is obsolete, and is recognized only for
+backwards compatibility. The present version of
+.I ansi2knr
+will always attempt to convert a ... argument to va_alist and va_dcl.
+.SH AUTHOR
+L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
+continues to maintain the current version; most of the code in the current
+version is his work. ansi2knr also includes contributions by Francois
+Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
diff --git a/util/ansi2knr.c b/util/ansi2knr.c
new file mode 100644
index 0000000..a042674
--- /dev/null
+++ b/util/ansi2knr.c
@@ -0,0 +1,739 @@
+/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
+
+/*$Id: ansi2knr.c,v 1.3 2000/04/13 03:41:48 lpd Exp $*/
+/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
+
+/*
+ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY. No author or distributor accepts responsibility to anyone for the
+consequences of using it or for whether it serves any particular purpose or
+works at all, unless he says so in writing. Refer to the GNU General Public
+License (the "GPL") for full details.
+
+Everyone is granted permission to copy, modify and redistribute ansi2knr,
+but only under the conditions described in the GPL. A copy of this license
+is supposed to have been given to you along with ansi2knr so you can know
+your rights and responsibilities. It should be in a file named COPYLEFT,
+or, if there is no file named COPYLEFT, a file named COPYING. Among other
+things, the copyright notice and this notice must be preserved on all
+copies.
+
+We explicitly state here what we believe is already implied by the GPL: if
+the ansi2knr program is distributed as a separate set of sources and a
+separate executable file which are aggregated on a storage medium together
+with another program, this in itself does not bring the other program under
+the GPL, nor does the mere fact that such a program or the procedures for
+constructing it invoke the ansi2knr executable bring any other part of the
+program under the GPL.
+*/
+
+/*
+ * Usage:
+ ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
+ * --filename provides the file name for the #line directive in the output,
+ * overriding input_file (if present).
+ * If no input_file is supplied, input is read from stdin.
+ * If no output_file is supplied, output goes to stdout.
+ * There are no error messages.
+ *
+ * ansi2knr recognizes function definitions by seeing a non-keyword
+ * identifier at the left margin, followed by a left parenthesis, with a
+ * right parenthesis as the last character on the line, and with a left
+ * brace as the first token on the following line (ignoring possible
+ * intervening comments and/or preprocessor directives), except that a line
+ * consisting of only
+ * identifier1(identifier2)
+ * will not be considered a function definition unless identifier2 is
+ * the word "void", and a line consisting of
+ * identifier1(identifier2, <<arbitrary>>)
+ * will not be considered a function definition.
+ * ansi2knr will recognize a multi-line header provided that no intervening
+ * line ends with a left or right brace or a semicolon. These algorithms
+ * ignore whitespace, comments, and preprocessor directives, except that
+ * the function name must be the first thing on the line. The following
+ * constructs will confuse it:
+ * - Any other construct that starts at the left margin and
+ * follows the above syntax (such as a macro or function call).
+ * - Some macros that tinker with the syntax of function headers.
+ */
+
+/*
+ * The original and principal author of ansi2knr is L. Peter Deutsch
+ * <ghost@aladdin.com>. Other authors are noted in the change history
+ * that follows (in reverse chronological order):
+
+ lpd 2000-04-12 backs out Eggert's changes because of bugs:
+ - concatlits didn't declare the type of its bufend argument;
+ - concatlits didn't recognize when it was inside a comment;
+ - scanstring could scan backward past the beginning of the string; when
+ - the check for \ + newline in scanstring was unnecessary.
+
+ 2000-03-05 Paul Eggert <eggert@twinsun.com>
+
+ Add support for concatenated string literals.
+ * ansi2knr.c (concatlits): New decl.
+ (main): Invoke concatlits to concatenate string literals.
+ (scanstring): Handle backslash-newline correctly. Work with
+ character constants. Fix bug when scanning backwards through
+ backslash-quote. Check for unterminated strings.
+ (convert1): Parse character constants, too.
+ (appendline, concatlits): New functions.
+ * ansi2knr.1: Document this.
+
+ lpd 1999-08-17 added code to allow preprocessor directives
+ wherever comments are allowed
+ lpd 1999-04-12 added minor fixes from Pavel Roskin
+ <pavel_roskin@geocities.com> for clean compilation with
+ gcc -W -Wall
+ lpd 1999-03-22 added hack to recognize lines consisting of
+ identifier1(identifier2, xxx) as *not* being procedures
+ lpd 1999-02-03 made indentation of preprocessor commands consistent
+ lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
+ endless loop; quoted strings within an argument list
+ confused the parser
+ lpd 1999-01-24 added a check for write errors on the output,
+ suggested by Jim Meyering <meyering@ascend.com>
+ lpd 1998-11-09 added further hack to recognize identifier(void)
+ as being a procedure
+ lpd 1998-10-23 added hack to recognize lines consisting of
+ identifier1(identifier2) as *not* being procedures
+ lpd 1997-12-08 made input_file optional; only closes input and/or
+ output file if not stdin or stdout respectively; prints
+ usage message on stderr rather than stdout; adds
+ --filename switch (changes suggested by
+ <ceder@lysator.liu.se>)
+ lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
+ compilers that don't understand void, as suggested by
+ Tom Lane
+ lpd 1996-01-15 changed to require that the first non-comment token
+ on the line following a function header be a left brace,
+ to reduce sensitivity to macros, as suggested by Tom Lane
+ <tgl@sss.pgh.pa.us>
+ lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
+ undefined preprocessor symbols as 0; changed all #ifdefs
+ for configuration symbols to #ifs
+ lpd 1995-04-05 changed copyright notice to make it clear that
+ including ansi2knr in a program does not bring the entire
+ program under the GPL
+ lpd 1994-12-18 added conditionals for systems where ctype macros
+ don't handle 8-bit characters properly, suggested by
+ Francois Pinard <pinard@iro.umontreal.ca>;
+ removed --varargs switch (this is now the default)
+ lpd 1994-10-10 removed CONFIG_BROKETS conditional
+ lpd 1994-07-16 added some conditionals to help GNU `configure',
+ suggested by Francois Pinard <pinard@iro.umontreal.ca>;
+ properly erase prototype args in function parameters,
+ contributed by Jim Avera <jima@netcom.com>;
+ correct error in writeblanks (it shouldn't erase EOLs)
+ lpd 1989-xx-xx original version
+ */
+
+/* Most of the conditionals here are to make ansi2knr work with */
+/* or without the GNU configure machinery. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <ctype.h>
+
+#if HAVE_CONFIG_H
+
+/*
+ For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
+ This will define HAVE_CONFIG_H and so, activate the following lines.
+ */
+
+# if STDC_HEADERS || HAVE_STRING_H
+# include <string.h>
+# else
+# include <strings.h>
+# endif
+
+#else /* not HAVE_CONFIG_H */
+
+/* Otherwise do it the hard way */
+
+# ifdef BSD
+# include <strings.h>
+# else
+# ifdef VMS
+ extern int strlen(), strncmp();
+# else
+# include <string.h>
+# endif
+# endif
+
+#endif /* not HAVE_CONFIG_H */
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#else
+/*
+ malloc and free should be declared in stdlib.h,
+ but if you've got a K&R compiler, they probably aren't.
+ */
+# ifdef MSDOS
+# include <malloc.h>
+# else
+# ifdef VMS
+ extern char *malloc();
+ extern void free();
+# else
+ extern char *malloc();
+ extern int free();
+# endif
+# endif
+
+#endif
+
+/* Define NULL (for *very* old compilers). */
+#ifndef NULL
+# define NULL (0)
+#endif
+
+/*
+ * The ctype macros don't always handle 8-bit characters correctly.
+ * Compensate for this here.
+ */
+#ifdef isascii
+# undef HAVE_ISASCII /* just in case */
+# define HAVE_ISASCII 1
+#else
+#endif
+#if STDC_HEADERS || !HAVE_ISASCII
+# define is_ascii(c) 1
+#else
+# define is_ascii(c) isascii(c)
+#endif
+
+#define is_space(c) (is_ascii(c) && isspace(c))
+#define is_alpha(c) (is_ascii(c) && isalpha(c))
+#define is_alnum(c) (is_ascii(c) && isalnum(c))
+
+/* Scanning macros */
+#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
+#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
+
+/* Forward references */
+char *ppdirforward();
+char *ppdirbackward();
+char *skipspace();
+char *scanstring();
+int writeblanks();
+int test1();
+int convert1();
+
+/* The main program */
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
+{ FILE *in = stdin;
+ FILE *out = stdout;
+ char *filename = 0;
+ char *program_name = argv[0];
+ char *output_name = 0;
+#define bufsize 5000 /* arbitrary size */
+ char *buf;
+ char *line;
+ char *more;
+ char *usage =
+ "Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
+ /*
+ * In previous versions, ansi2knr recognized a --varargs switch.
+ * If this switch was supplied, ansi2knr would attempt to convert
+ * a ... argument to va_alist and va_dcl; if this switch was not
+ * supplied, ansi2knr would simply drop any such arguments.
+ * Now, ansi2knr always does this conversion, and we only
+ * check for this switch for backward compatibility.
+ */
+ int convert_varargs = 1;
+ int output_error;
+
+ while ( argc > 1 && argv[1][0] == '-' ) {
+ if ( !strcmp(argv[1], "--varargs") ) {
+ convert_varargs = 1;
+ argc--;
+ argv++;
+ continue;
+ }
+ if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
+ filename = argv[2];
+ argc -= 2;
+ argv += 2;
+ continue;
+ }
+ fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
+ argv[1]);
+ fprintf(stderr, usage);
+ exit(1);
+ }
+ switch ( argc )
+ {
+ default:
+ fprintf(stderr, usage);
+ exit(0);
+ case 3:
+ output_name = argv[2];
+ out = fopen(output_name, "w");
+ if ( out == NULL ) {
+ fprintf(stderr, "%s: Cannot open output file %s\n",
+ program_name, output_name);
+ exit(1);
+ }
+ /* falls through */
+ case 2:
+ in = fopen(argv[1], "r");
+ if ( in == NULL ) {
+ fprintf(stderr, "%s: Cannot open input file %s\n",
+ program_name, argv[1]);
+ exit(1);
+ }
+ if ( filename == 0 )
+ filename = argv[1];
+ /* falls through */
+ case 1:
+ break;
+ }
+ if ( filename )
+ fprintf(out, "#line 1 \"%s\"\n", filename);
+ buf = malloc(bufsize);
+ if ( buf == NULL )
+ {
+ fprintf(stderr, "Unable to allocate read buffer!\n");
+ exit(1);
+ }
+ line = buf;
+ while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
+ {
+test: line += strlen(line);
+ switch ( test1(buf) )
+ {
+ case 2: /* a function header */
+ convert1(buf, out, 1, convert_varargs);
+ break;
+ case 1: /* a function */
+ /* Check for a { at the start of the next line. */
+ more = ++line;
+f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
+ goto wl;
+ if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
+ goto wl;
+ switch ( *skipspace(ppdirforward(more), 1) )
+ {
+ case '{':
+ /* Definitely a function header. */
+ convert1(buf, out, 0, convert_varargs);
+ fputs(more, out);
+ break;
+ case 0:
+ /* The next line was blank or a comment: */
+ /* keep scanning for a non-comment. */
+ line += strlen(line);
+ goto f;
+ default:
+ /* buf isn't a function header, but */
+ /* more might be. */
+ fputs(buf, out);
+ strcpy(buf, more);
+ line = buf;
+ goto test;
+ }
+ break;
+ case -1: /* maybe the start of a function */
+ if ( line != buf + (bufsize - 1) ) /* overflow check */
+ continue;
+ /* falls through */
+ default: /* not a function */
+wl: fputs(buf, out);
+ break;
+ }
+ line = buf;
+ }
+ if ( line != buf )
+ fputs(buf, out);
+ free(buf);
+ if ( output_name ) {
+ output_error = ferror(out);
+ output_error |= fclose(out);
+ } else { /* out == stdout */
+ fflush(out);
+ output_error = ferror(out);
+ }
+ if ( output_error ) {
+ fprintf(stderr, "%s: error writing to %s\n", program_name,
+ (output_name ? output_name : "stdout"));
+ exit(1);
+ }
+ if ( in != stdin )
+ fclose(in);
+ return 0;
+}
+
+/*
+ * Skip forward or backward over one or more preprocessor directives.
+ */
+char *
+ppdirforward(p)
+ char *p;
+{
+ for (; *p == '#'; ++p) {
+ for (; *p != '\r' && *p != '\n'; ++p)
+ if (*p == 0)
+ return p;
+ if (*p == '\r' && p[1] == '\n')
+ ++p;
+ }
+ return p;
+}
+char *
+ppdirbackward(p, limit)
+ char *p;
+ char *limit;
+{
+ char *np = p;
+
+ for (;; p = --np) {
+ if (*np == '\n' && np[-1] == '\r')
+ --np;
+ for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
+ if (np[-1] == 0)
+ return np;
+ if (*np != '#')
+ return p;
+ }
+}
+
+/*
+ * Skip over whitespace, comments, and preprocessor directives,
+ * in either direction.
+ */
+char *
+skipspace(p, dir)
+ char *p;
+ int dir; /* 1 for forward, -1 for backward */
+{
+ for ( ; ; ) {
+ while ( is_space(*p) )
+ p += dir;
+ if ( !(*p == '/' && p[dir] == '*') )
+ break;
+ p += dir; p += dir;
+ while ( !(*p == '*' && p[dir] == '/') ) {
+ if ( *p == 0 )
+ return p; /* multi-line comment?? */
+ p += dir;
+ }
+ p += dir; p += dir;
+ }
+ return p;
+}
+
+/* Scan over a quoted string, in either direction. */
+char *
+scanstring(p, dir)
+ char *p;
+ int dir;
+{
+ for (p += dir; ; p += dir)
+ if (*p == '"' && p[-dir] != '\\')
+ return p + dir;
+}
+
+/*
+ * Write blanks over part of a string.
+ * Don't overwrite end-of-line characters.
+ */
+int
+writeblanks(start, end)
+ char *start;
+ char *end;
+{ char *p;
+ for ( p = start; p < end; p++ )
+ if ( *p != '\r' && *p != '\n' )
+ *p = ' ';
+ return 0;
+}
+
+/*
+ * Test whether the string in buf is a function definition.
+ * The string may contain and/or end with a newline.
+ * Return as follows:
+ * 0 - definitely not a function definition;
+ * 1 - definitely a function definition;
+ * 2 - definitely a function prototype (NOT USED);
+ * -1 - may be the beginning of a function definition,
+ * append another line and look again.
+ * The reason we don't attempt to convert function prototypes is that
+ * Ghostscript's declaration-generating macros look too much like
+ * prototypes, and confuse the algorithms.
+ */
+int
+test1(buf)
+ char *buf;
+{ char *p = buf;
+ char *bend;
+ char *endfn;
+ int contin;
+
+ if ( !isidfirstchar(*p) )
+ return 0; /* no name at left margin */
+ bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
+ switch ( *bend )
+ {
+ case ';': contin = 0 /*2*/; break;
+ case ')': contin = 1; break;
+ case '{': return 0; /* not a function */
+ case '}': return 0; /* not a function */
+ default: contin = -1;
+ }
+ while ( isidchar(*p) )
+ p++;
+ endfn = p;
+ p = skipspace(p, 1);
+ if ( *p++ != '(' )
+ return 0; /* not a function */
+ p = skipspace(p, 1);
+ if ( *p == ')' )
+ return 0; /* no parameters */
+ /* Check that the apparent function name isn't a keyword. */
+ /* We only need to check for keywords that could be followed */
+ /* by a left parenthesis (which, unfortunately, is most of them). */
+ { static char *words[] =
+ { "asm", "auto", "case", "char", "const", "double",
+ "extern", "float", "for", "if", "int", "long",
+ "register", "return", "short", "signed", "sizeof",
+ "static", "switch", "typedef", "unsigned",
+ "void", "volatile", "while", 0
+ };
+ char **key = words;
+ char *kp;
+ unsigned len = endfn - buf;
+
+ while ( (kp = *key) != 0 )
+ { if ( strlen(kp) == len && !strncmp(kp, buf, len) )
+ return 0; /* name is a keyword */
+ key++;
+ }
+ }
+ {
+ char *id = p;
+ int len;
+ /*
+ * Check for identifier1(identifier2) and not
+ * identifier1(void), or identifier1(identifier2, xxxx).
+ */
+
+ while ( isidchar(*p) )
+ p++;
+ len = p - id;
+ p = skipspace(p, 1);
+ if (*p == ',' ||
+ (*p == ')' && (len != 4 || strncmp(id, "void", 4)))
+ )
+ return 0; /* not a function */
+ }
+ /*
+ * If the last significant character was a ), we need to count
+ * parentheses, because it might be part of a formal parameter
+ * that is a procedure.
+ */
+ if (contin > 0) {
+ int level = 0;
+
+ for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
+ level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
+ if (level > 0)
+ contin = -1;
+ }
+ return contin;
+}
+
+/* Convert a recognized function definition or header to K&R syntax. */
+int
+convert1(buf, out, header, convert_varargs)
+ char *buf;
+ FILE *out;
+ int header; /* Boolean */
+ int convert_varargs; /* Boolean */
+{ char *endfn;
+ char *p;
+ /*
+ * The breaks table contains pointers to the beginning and end
+ * of each argument.
+ */
+ char **breaks;
+ unsigned num_breaks = 2; /* for testing */
+ char **btop;
+ char **bp;
+ char **ap;
+ char *vararg = 0;
+
+ /* Pre-ANSI implementations don't agree on whether strchr */
+ /* is called strchr or index, so we open-code it here. */
+ for ( endfn = buf; *(endfn++) != '('; )
+ ;
+top: p = endfn;
+ breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
+ if ( breaks == NULL )
+ { /* Couldn't allocate break table, give up */
+ fprintf(stderr, "Unable to allocate break table!\n");
+ fputs(buf, out);
+ return -1;
+ }
+ btop = breaks + num_breaks * 2 - 2;
+ bp = breaks;
+ /* Parse the argument list */
+ do
+ { int level = 0;
+ char *lp = NULL;
+ char *rp = NULL;
+ char *end = NULL;
+
+ if ( bp >= btop )
+ { /* Filled up break table. */
+ /* Allocate a bigger one and start over. */
+ free((char *)breaks);
+ num_breaks <<= 1;
+ goto top;
+ }
+ *bp++ = p;
+ /* Find the end of the argument */
+ for ( ; end == NULL; p++ )
+ { switch(*p)
+ {
+ case ',':
+ if ( !level ) end = p;
+ break;
+ case '(':
+ if ( !level ) lp = p;
+ level++;
+ break;
+ case ')':
+ if ( --level < 0 ) end = p;
+ else rp = p;
+ break;
+ case '/':
+ if (p[1] == '*')
+ p = skipspace(p, 1) - 1;
+ break;
+ case '"':
+ p = scanstring(p, 1) - 1;
+ break;
+ default:
+ ;
+ }
+ }
+ /* Erase any embedded prototype parameters. */
+ if ( lp && rp )
+ writeblanks(lp + 1, rp);
+ p--; /* back up over terminator */
+ /* Find the name being declared. */
+ /* This is complicated because of procedure and */
+ /* array modifiers. */
+ for ( ; ; )
+ { p = skipspace(p - 1, -1);
+ switch ( *p )
+ {
+ case ']': /* skip array dimension(s) */
+ case ')': /* skip procedure args OR name */
+ { int level = 1;
+ while ( level )
+ switch ( *--p )
+ {
+ case ']': case ')':
+ level++;
+ break;
+ case '[': case '(':
+ level--;
+ break;
+ case '/':
+ if (p > buf && p[-1] == '*')
+ p = skipspace(p, -1) + 1;
+ break;
+ case '"':
+ p = scanstring(p, -1) + 1;
+ break;
+ default: ;
+ }
+ }
+ if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
+ { /* We found the name being declared */
+ while ( !isidfirstchar(*p) )
+ p = skipspace(p, 1) + 1;
+ goto found;
+ }
+ break;
+ default:
+ goto found;
+ }
+ }
+found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
+ { if ( convert_varargs )
+ { *bp++ = "va_alist";
+ vararg = p-2;
+ }
+ else
+ { p++;
+ if ( bp == breaks + 1 ) /* sole argument */
+ writeblanks(breaks[0], p);
+ else
+ writeblanks(bp[-1] - 1, p);
+ bp--;
+ }
+ }
+ else
+ { while ( isidchar(*p) ) p--;
+ *bp++ = p+1;
+ }
+ p = end;
+ }
+ while ( *p++ == ',' );
+ *bp = p;
+ /* Make a special check for 'void' arglist */
+ if ( bp == breaks+2 )
+ { p = skipspace(breaks[0], 1);
+ if ( !strncmp(p, "void", 4) )
+ { p = skipspace(p+4, 1);
+ if ( p == breaks[2] - 1 )
+ { bp = breaks; /* yup, pretend arglist is empty */
+ writeblanks(breaks[0], p + 1);
+ }
+ }
+ }
+ /* Put out the function name and left parenthesis. */
+ p = buf;
+ while ( p != endfn ) putc(*p, out), p++;
+ /* Put out the declaration. */
+ if ( header )
+ { fputs(");", out);
+ for ( p = breaks[0]; *p; p++ )
+ if ( *p == '\r' || *p == '\n' )
+ putc(*p, out);
+ }
+ else
+ { for ( ap = breaks+1; ap < bp; ap += 2 )
+ { p = *ap;
+ while ( isidchar(*p) )
+ putc(*p, out), p++;
+ if ( ap < bp - 1 )
+ fputs(", ", out);
+ }
+ fputs(") ", out);
+ /* Put out the argument declarations */
+ for ( ap = breaks+2; ap <= bp; ap += 2 )
+ (*ap)[-1] = ';';
+ if ( vararg != 0 )
+ { *vararg = 0;
+ fputs(breaks[0], out); /* any prior args */
+ fputs("va_dcl", out); /* the final arg */
+ fputs(bp[0], out);
+ }
+ else
+ fputs(breaks[0], out);
+ }
+ free((char *)breaks);
+ return 0;
+}
diff --git a/util/invoke-ntp-keygen.texi b/util/invoke-ntp-keygen.texi
index 99266fa..0412485 100644
--- a/util/invoke-ntp-keygen.texi
+++ b/util/invoke-ntp-keygen.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-keygen.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:58:48 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:27:46 AM by AutoGen 5.18.5pre4
# From the definitions ntp-keygen-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -886,7 +886,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p482
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p2
Usage: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
diff --git a/util/jitter.c b/util/jitter.c
index 62a84ad..c0050fc 100644
--- a/util/jitter.c
+++ b/util/jitter.c
@@ -14,10 +14,9 @@
#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
-#include "jitter.h"
+#include "ntp_fp.h"
#define NBUF 800002
-#define FRAC 4294967296. /* a bbbbillion */
#define JAN_1970 2208988800UL /* Unix base epoch */
#define CLOCK_GETTIME /* Solaris hires clock */
diff --git a/util/jitter.h b/util/jitter.h
deleted file mode 100644
index 8c774b0..0000000
--- a/util/jitter.h
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * ntp_types.h - defines how int32 and u_int32 are treated.
- * For 64 bit systems like the DEC Alpha, they have to be defined
- * as int and u_int.
- * For 32 bit systems, define them as long and u_long
- */
-#define SIZEOF_INT 4
-
-/*
- * VMS DECC (v4.1), {u_char,u_short,u_long} are only in SOCKET.H,
- * and u_int isn't defined anywhere
- */
-#if defined(VMS)
-#include <socket.h>
-typedef unsigned int u_int;
-/*
- * Note: VMS DECC has long == int (even on __alpha),
- * so the distinction below doesn't matter
- */
-#endif /* VMS */
-
-#if (SIZEOF_INT == 4)
-# ifndef int32
-# define int32 int
-# endif
-# ifndef u_int32
-# define u_int32 unsigned int
-# endif
-#else /* not sizeof(int) == 4 */
-# if (SIZEOF_LONG == 4)
-# else /* not sizeof(long) == 4 */
-# ifndef int32
-# define int32 long
-# endif
-# ifndef u_int32
-# define u_int32 unsigned long
-# endif
-# endif /* not sizeof(long) == 4 */
-# include "Bletch: what's 32 bits on this machine?"
-#endif /* not sizeof(int) == 4 */
-
-typedef unsigned short associd_t; /* association ID */
-typedef u_int32 keyid_t; /* cryptographic key ID */
-typedef u_int32 tstamp_t; /* NTP seconds timestamp */
-
-/*
- * NTP uses two fixed point formats. The first (l_fp) is the "long"
- * format and is 64 bits long with the decimal between bits 31 and 32.
- * This is used for time stamps in the NTP packet header (in network
- * byte order) and for internal computations of offsets (in local host
- * byte order). We use the same structure for both signed and unsigned
- * values, which is a big hack but saves rewriting all the operators
- * twice. Just to confuse this, we also sometimes just carry the
- * fractional part in calculations, in both signed and unsigned forms.
- * Anyway, an l_fp looks like:
- *
- * 0 1 2 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Integral Part |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Fractional Part |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *
- */
-typedef struct {
- union {
- u_int32 Xl_ui;
- int32 Xl_i;
- } Ul_i;
- union {
- u_int32 Xl_uf;
- int32 Xl_f;
- } Ul_f;
-} l_fp;
-
-#define l_ui Ul_i.Xl_ui /* unsigned integral part */
-#define l_i Ul_i.Xl_i /* signed integral part */
-#define l_uf Ul_f.Xl_uf /* unsigned fractional part */
-#define l_f Ul_f.Xl_f /* signed fractional part */
-
-/*
- * Fractional precision (of an l_fp) is actually the number of
- * bits in a long.
- */
-#define FRACTION_PREC (32)
-
-
-/*
- * The second fixed point format is 32 bits, with the decimal between
- * bits 15 and 16. There is a signed version (s_fp) and an unsigned
- * version (u_fp). This is used to represent synchronizing distance
- * and synchronizing dispersion in the NTP packet header (again, in
- * network byte order) and internally to hold both distance and
- * dispersion values (in local byte order). In network byte order
- * it looks like:
- *
- * 0 1 2 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Integer Part | Fraction Part |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *
- */
-typedef int32 s_fp;
-typedef u_int32 u_fp;
-
-/*
- * A unit second in fp format. Actually 2**(half_the_bits_in_a_long)
- */
-#define FP_SECOND (0x10000)
-
-/*
- * Byte order conversions
- */
-#define HTONS_FP(x) (htonl(x))
-#define HTONL_FP(h, n) do { (n)->l_ui = htonl((h)->l_ui); \
- (n)->l_uf = htonl((h)->l_uf); } while (0)
-#define NTOHS_FP(x) (ntohl(x))
-#define NTOHL_FP(n, h) do { (h)->l_ui = ntohl((n)->l_ui); \
- (h)->l_uf = ntohl((n)->l_uf); } while (0)
-#define NTOHL_MFP(ni, nf, hi, hf) \
- do { (hi) = ntohl(ni); (hf) = ntohl(nf); } while (0)
-#define HTONL_MFP(hi, hf, ni, nf) \
- do { (ni) = ntohl(hi); (nf) = ntohl(hf); } while (0)
-
-/* funny ones. Converts ts fractions to net order ts */
-#define HTONL_UF(uf, nts) \
- do { (nts)->l_ui = 0; (nts)->l_uf = htonl(uf); } while (0)
-#define HTONL_F(f, nts) do { (nts)->l_uf = htonl(f); \
- if ((f) & 0x80000000) \
- (nts)->l_i = -1; \
- else \
- (nts)->l_i = 0; \
- } while (0)
-
-/*
- * Conversions between the two fixed point types
- */
-#define MFPTOFP(x_i, x_f) (((x_i) >= 0x00010000) ? 0x7fffffff : \
- (((x_i) <= -0x00010000) ? 0x80000000 : \
- (((x_i)<<16) | (((x_f)>>16)&0xffff))))
-#define LFPTOFP(v) MFPTOFP((v)->l_i, (v)->l_f)
-
-#define UFPTOLFP(x, v) ((v)->l_ui = (u_fp)(x)>>16, (v)->l_uf = (x)<<16)
-#define FPTOLFP(x, v) (UFPTOLFP((x), (v)), (x) < 0 ? (v)->l_ui -= 0x10000 : 0)
-
-#define MAXLFP(v) ((v)->l_ui = 0x7fffffff, (v)->l_uf = 0xffffffff)
-#define MINLFP(v) ((v)->l_ui = 0x80000000, (v)->l_uf = 0)
-
-/*
- * Primitive operations on long fixed point values. If these are
- * reminiscent of assembler op codes it's only because some may
- * be replaced by inline assembler for particular machines someday.
- * These are the (kind of inefficient) run-anywhere versions.
- */
-#define M_NEG(v_i, v_f) /* v = -v */ \
- do { \
- if ((v_f) == 0) \
- (v_i) = -((s_fp)(v_i)); \
- else { \
- (v_f) = -((s_fp)(v_f)); \
- (v_i) = ~(v_i); \
- } \
- } while(0)
-
-#define M_NEGM(r_i, r_f, a_i, a_f) /* r = -a */ \
- do { \
- if ((a_f) == 0) { \
- (r_f) = 0; \
- (r_i) = -(a_i); \
- } else { \
- (r_f) = -(a_f); \
- (r_i) = ~(a_i); \
- } \
- } while(0)
-
-#define M_ADD(r_i, r_f, a_i, a_f) /* r += a */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- lo_tmp = ((r_f) & 0xffff) + ((a_f) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) + (((a_f) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_i) += (a_i); \
- if (hi_tmp & 0x10000) \
- (r_i)++; \
- } while (0)
-
-#define M_ADD3(r_ovr, r_i, r_f, a_ovr, a_i, a_f) /* r += a, three word */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- lo_tmp = ((r_f) & 0xffff) + ((a_f) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) + (((a_f) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- lo_tmp = ((r_i) & 0xffff) + ((a_i) & 0xffff); \
- if (hi_tmp & 0x10000) \
- lo_tmp++; \
- hi_tmp = (((r_i) >> 16) & 0xffff) + (((a_i) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_i) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_ovr) += (a_ovr); \
- if (hi_tmp & 0x10000) \
- (r_ovr)++; \
- } while (0)
-
-#define M_SUB(r_i, r_f, a_i, a_f) /* r -= a */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- if ((a_f) == 0) { \
- (r_i) -= (a_i); \
- } else { \
- lo_tmp = ((r_f) & 0xffff) + ((-((s_fp)(a_f))) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) \
- + (((-((s_fp)(a_f))) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_i) += ~(a_i); \
- if (hi_tmp & 0x10000) \
- (r_i)++; \
- } \
- } while (0)
-
-#define M_RSHIFTU(v_i, v_f) /* v >>= 1, v is unsigned */ \
- do { \
- (v_f) = (u_int32)(v_f) >> 1; \
- if ((v_i) & 01) \
- (v_f) |= 0x80000000; \
- (v_i) = (u_int32)(v_i) >> 1; \
- } while (0)
-
-#define M_RSHIFT(v_i, v_f) /* v >>= 1, v is signed */ \
- do { \
- (v_f) = (u_int32)(v_f) >> 1; \
- if ((v_i) & 01) \
- (v_f) |= 0x80000000; \
- if ((v_i) & 0x80000000) \
- (v_i) = ((v_i) >> 1) | 0x80000000; \
- else \
- (v_i) = (v_i) >> 1; \
- } while (0)
-
-#define M_LSHIFT(v_i, v_f) /* v <<= 1 */ \
- do { \
- (v_i) <<= 1; \
- if ((v_f) & 0x80000000) \
- (v_i) |= 0x1; \
- (v_f) <<= 1; \
- } while (0)
-
-#define M_LSHIFT3(v_ovr, v_i, v_f) /* v <<= 1, with overflow */ \
- do { \
- (v_ovr) <<= 1; \
- if ((v_i) & 0x80000000) \
- (v_ovr) |= 0x1; \
- (v_i) <<= 1; \
- if ((v_f) & 0x80000000) \
- (v_i) |= 0x1; \
- (v_f) <<= 1; \
- } while (0)
-
-#define M_ADDUF(r_i, r_f, uf) /* r += uf, uf is u_int32 fraction */ \
- M_ADD((r_i), (r_f), 0, (uf)) /* let optimizer worry about it */
-
-#define M_SUBUF(r_i, r_f, uf) /* r -= uf, uf is u_int32 fraction */ \
- M_SUB((r_i), (r_f), 0, (uf)) /* let optimizer worry about it */
-
-#define M_ADDF(r_i, r_f, f) /* r += f, f is a int32 fraction */ \
- do { \
- if ((f) > 0) \
- M_ADD((r_i), (r_f), 0, (f)); \
- else if ((f) < 0) \
- M_ADD((r_i), (r_f), (-1), (f));\
- } while(0)
-
-#define M_ISNEG(v_i, v_f) /* v < 0 */ \
- (((v_i) & 0x80000000) != 0)
-
-#define M_ISHIS(a_i, a_f, b_i, b_f) /* a >= b unsigned */ \
- (((u_int32)(a_i)) > ((u_int32)(b_i)) || \
- ((a_i) == (b_i) && ((u_int32)(a_f)) >= ((u_int32)(b_f))))
-
-#define M_ISGEQ(a_i, a_f, b_i, b_f) /* a >= b signed */ \
- (((int32)(a_i)) > ((int32)(b_i)) || \
- ((a_i) == (b_i) && ((u_int32)(a_f)) >= ((u_int32)(b_f))))
-
-#define M_ISEQU(a_i, a_f, b_i, b_f) /* a == b unsigned */ \
- ((a_i) == (b_i) && (a_f) == (b_f))
-
-/*
- * Operations on the long fp format
- */
-#define L_ADD(r, a) M_ADD((r)->l_ui, (r)->l_uf, (a)->l_ui, (a)->l_uf)
-#define L_SUB(r, a) M_SUB((r)->l_ui, (r)->l_uf, (a)->l_ui, (a)->l_uf)
-#define L_NEG(v) M_NEG((v)->l_ui, (v)->l_uf)
-#define L_ADDUF(r, uf) M_ADDUF((r)->l_ui, (r)->l_uf, (uf))
-#define L_SUBUF(r, uf) M_SUBUF((r)->l_ui, (r)->l_uf, (uf))
-#define L_ADDF(r, f) M_ADDF((r)->l_ui, (r)->l_uf, (f))
-#define L_RSHIFT(v) M_RSHIFT((v)->l_i, (v)->l_uf)
-#define L_RSHIFTU(v) M_RSHIFT((v)->l_ui, (v)->l_uf)
-#define L_LSHIFT(v) M_LSHIFT((v)->l_ui, (v)->l_uf)
-#define L_CLR(v) ((v)->l_ui = (v)->l_uf = 0)
-
-#define L_ISNEG(v) (((v)->l_ui & 0x80000000) != 0)
-#define L_ISZERO(v) ((v)->l_ui == 0 && (v)->l_uf == 0)
-#define L_ISHIS(a, b) ((a)->l_ui > (b)->l_ui || \
- ((a)->l_ui == (b)->l_ui && (a)->l_uf >= (b)->l_uf))
-#define L_ISGEQ(a, b) ((a)->l_i > (b)->l_i || \
- ((a)->l_i == (b)->l_i && (a)->l_uf >= (b)->l_uf))
-#define L_ISEQU(a, b) M_ISEQU((a)->l_ui, (a)->l_uf, (b)->l_ui, (b)->l_uf)
-
-/*
- * s_fp/double and u_fp/double conversions
- */
-#define FRIC 65536. /* 2^16 as a double */
-#define DTOFP(r) ((s_fp)((r) * FRIC))
-#define DTOUFP(r) ((u_fp)((r) * FRIC))
-#define FPTOD(r) ((double)(r) / FRIC)
-
-/*
- * l_fp/double conversions
- */
-#define FRAC 4294967296. /* 2^32 as a double */
-#define M_DTOLFP(d, r_i, r_uf) /* double to l_fp */ \
- do { \
- register double d_tmp; \
- \
- d_tmp = (d); \
- if (d_tmp < 0) { \
- d_tmp = -d_tmp; \
- (r_i) = (int32)(d_tmp); \
- (r_uf) = (u_int32)(((d_tmp) - (double)(r_i)) * FRAC); \
- M_NEG((r_i), (r_uf)); \
- } else { \
- (r_i) = (int32)(d_tmp); \
- (r_uf) = (u_int32)(((d_tmp) - (double)(r_i)) * FRAC); \
- } \
- } while (0)
-#define M_LFPTOD(r_i, r_uf, d) /* l_fp to double */ \
- do { \
- register l_fp l_tmp; \
- \
- l_tmp.l_i = (r_i); \
- l_tmp.l_f = (r_uf); \
- if (l_tmp.l_i < 0) { \
- M_NEG(l_tmp.l_i, l_tmp.l_uf); \
- (d) = -((double)l_tmp.l_i + ((double)l_tmp.l_uf) / FRAC); \
- } else { \
- (d) = (double)l_tmp.l_i + ((double)l_tmp.l_uf) / FRAC; \
- } \
- } while (0)
-#define DTOLFP(d, v) M_DTOLFP((d), (v)->l_ui, (v)->l_uf)
-#define LFPTOD(v, d) M_LFPTOD((v)->l_ui, (v)->l_uf, (d))
-
-/*
- * Prototypes
- */
-#if 0
-extern char * dofptoa (u_fp, int, short, int);
-extern char * dolfptoa (u_long, u_long, int, short, int);
-#endif
-
-extern int atolfp (const char *, l_fp *);
-extern int buftvtots (const char *, l_fp *);
-extern char * fptoa (s_fp, short);
-extern char * fptoms (s_fp, short);
-extern int hextolfp (const char *, l_fp *);
-extern void gpstolfp (int, int, unsigned long, l_fp *);
-extern int mstolfp (const char *, l_fp *);
-extern char * prettydate (l_fp *);
-extern char * gmprettydate (l_fp *);
-extern char * uglydate (l_fp *);
-extern void mfp_mul (int32 *, u_int32 *, int32, u_int32, int32, u_int32);
-
-extern void get_systime (l_fp *);
-extern int step_systime (double);
-extern int adj_systime (double);
-
-#define lfptoa(_fpv, _ndec) mfptoa((_fpv)->l_ui, (_fpv)->l_uf, (_ndec))
-#define lfptoms(_fpv, _ndec) mfptoms((_fpv)->l_ui, (_fpv)->l_uf, (_ndec))
-
-#define ufptoa(_fpv, _ndec) dofptoa((_fpv), 0, (_ndec), 0)
-#define ufptoms(_fpv, _ndec) dofptoa((_fpv), 0, (_ndec), 1)
-#define ulfptoa(_fpv, _ndec) dolfptoa((_fpv)->l_ui, (_fpv)->l_uf, 0, (_ndec), 0)
-#define ulfptoms(_fpv, _ndec) dolfptoa((_fpv)->l_ui, (_fpv)->l_uf, 0, (_ndec), 1)
-#define umfptoa(_fpi, _fpf, _ndec) dolfptoa((_fpi), (_fpf), 0, (_ndec), 0)
diff --git a/util/ntp-keygen-opts.c b/util/ntp-keygen-opts.c
index 718588f..8521861 100644
--- a/util/ntp-keygen-opts.c
+++ b/util/ntp-keygen-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed December 2, 2014 at 08:58:32 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:27:30 AM by AutoGen 5.18.5pre4
* From the definitions ntp-keygen-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntp-keygen program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -51,7 +51,7 @@ extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright (ntp_keygen_opt_strs+0)
-#define zLicenseDescrip (ntp_keygen_opt_strs+326)
+#define zLicenseDescrip (ntp_keygen_opt_strs+352)
/*
* global included definitions
@@ -71,117 +71,118 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntp-keygen options
*/
-static char const ntp_keygen_opt_strs[2369] =
-/* 0 */ "ntp-keygen (ntp) 4.2.7p482\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const ntp_keygen_opt_strs[2419] =
+/* 0 */ "ntp-keygen (ntp) 4.2.8p2\n"
+ "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
" <http://ntp.org/license>\n"
" <http://opensource.org/licenses/ntp-license.php>\n\0"
-/* 326 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 352 */ "Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose with or without fee is hereby granted,\n"
"provided that the above copyright notice appears in all copies and that\n"
"both the copyright notice and this permission notice appear in supporting\n"
"documentation, and that the name The University of Delaware not be used in\n"
"advertising or publicity pertaining to distribution of the software without\n"
- "specific, written prior permission. The University of Delaware makes no\n"
- "representations about the suitability this software for any purpose. It is\n"
- "provided \"as is\" without express or implied warranty.\n\0"
-/* 966 */ "identity modulus bits\0"
-/* 988 */ "IMBITS\0"
-/* 995 */ "imbits\0"
-/* 1002 */ "certificate scheme\0"
-/* 1021 */ "CERTIFICATE\0"
-/* 1033 */ "certificate\0"
-/* 1045 */ "privatekey cipher\0"
-/* 1063 */ "CIPHER\0"
-/* 1070 */ "cipher\0"
-/* 1077 */ "Increase debug verbosity level\0"
-/* 1108 */ "DEBUG_LEVEL\0"
-/* 1120 */ "debug-level\0"
-/* 1132 */ "Set the debug verbosity level\0"
-/* 1162 */ "SET_DEBUG_LEVEL\0"
-/* 1178 */ "set-debug-level\0"
-/* 1194 */ "Write IFF or GQ identity keys\0"
-/* 1224 */ "ID_KEY\0"
-/* 1231 */ "id-key\0"
-/* 1238 */ "Generate GQ parameters and keys\0"
-/* 1270 */ "GQ_PARAMS\0"
-/* 1280 */ "gq-params\0"
-/* 1290 */ "generate RSA host key\0"
-/* 1312 */ "HOST_KEY\0"
-/* 1321 */ "host-key\0"
-/* 1330 */ "generate IFF parameters\0"
-/* 1354 */ "IFFKEY\0"
-/* 1361 */ "iffkey\0"
-/* 1368 */ "set Autokey group name\0"
-/* 1391 */ "IDENT\0"
-/* 1397 */ "ident\0"
-/* 1403 */ "set certificate lifetime\0"
-/* 1428 */ "LIFETIME\0"
-/* 1437 */ "lifetime\0"
-/* 1446 */ "generate MD5 keys\0"
-/* 1464 */ "MD5KEY\0"
-/* 1471 */ "md5key\0"
-/* 1478 */ "modulus\0"
-/* 1486 */ "MODULUS\0"
-/* 1494 */ "generate PC private certificate\0"
-/* 1526 */ "PVT_CERT\0"
-/* 1535 */ "pvt-cert\0"
-/* 1544 */ "local private password\0"
-/* 1567 */ "PASSWORD\0"
-/* 1576 */ "password\0"
-/* 1585 */ "export IFF or GQ group keys with password\0"
-/* 1627 */ "EXPORT_PASSWD\0"
-/* 1641 */ "export-passwd\0"
-/* 1655 */ "generate sign key (RSA or DSA)\0"
-/* 1686 */ "SIGN_KEY\0"
-/* 1695 */ "sign-key\0"
-/* 1704 */ "set host and optionally group name\0"
-/* 1739 */ "SUBJECT_NAME\0"
-/* 1752 */ "subject-name\0"
-/* 1765 */ "trusted certificate (TC scheme)\0"
-/* 1797 */ "TRUSTED_CERT\0"
-/* 1810 */ "trusted-cert\0"
-/* 1823 */ "generate <num> MV parameters\0"
-/* 1852 */ "MV_PARAMS\0"
-/* 1862 */ "mv-params\0"
-/* 1872 */ "update <num> MV keys\0"
-/* 1893 */ "MV_KEYS\0"
-/* 1901 */ "mv-keys\0"
-/* 1909 */ "display extended usage information and exit\0"
-/* 1953 */ "help\0"
-/* 1958 */ "extended usage information passed thru pager\0"
-/* 2003 */ "more-help\0"
-/* 2013 */ "output version information and exit\0"
-/* 2049 */ "version\0"
-/* 2057 */ "save the option state to a config file\0"
-/* 2096 */ "save-opts\0"
-/* 2106 */ "load options from a config file\0"
-/* 2138 */ "LOAD_OPTS\0"
-/* 2148 */ "no-load-opts\0"
-/* 2161 */ "no\0"
-/* 2164 */ "NTP_KEYGEN\0"
-/* 2175 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p482\n"
+ "specific, written prior permission. The University of Delaware and Network\n"
+ "Time Foundation makes no representations about the suitability this\n"
+ "software for any purpose. It is provided \"as is\" without express or\n"
+ "implied warranty.\n\0"
+/* 1020 */ "identity modulus bits\0"
+/* 1042 */ "IMBITS\0"
+/* 1049 */ "imbits\0"
+/* 1056 */ "certificate scheme\0"
+/* 1075 */ "CERTIFICATE\0"
+/* 1087 */ "certificate\0"
+/* 1099 */ "privatekey cipher\0"
+/* 1117 */ "CIPHER\0"
+/* 1124 */ "cipher\0"
+/* 1131 */ "Increase debug verbosity level\0"
+/* 1162 */ "DEBUG_LEVEL\0"
+/* 1174 */ "debug-level\0"
+/* 1186 */ "Set the debug verbosity level\0"
+/* 1216 */ "SET_DEBUG_LEVEL\0"
+/* 1232 */ "set-debug-level\0"
+/* 1248 */ "Write IFF or GQ identity keys\0"
+/* 1278 */ "ID_KEY\0"
+/* 1285 */ "id-key\0"
+/* 1292 */ "Generate GQ parameters and keys\0"
+/* 1324 */ "GQ_PARAMS\0"
+/* 1334 */ "gq-params\0"
+/* 1344 */ "generate RSA host key\0"
+/* 1366 */ "HOST_KEY\0"
+/* 1375 */ "host-key\0"
+/* 1384 */ "generate IFF parameters\0"
+/* 1408 */ "IFFKEY\0"
+/* 1415 */ "iffkey\0"
+/* 1422 */ "set Autokey group name\0"
+/* 1445 */ "IDENT\0"
+/* 1451 */ "ident\0"
+/* 1457 */ "set certificate lifetime\0"
+/* 1482 */ "LIFETIME\0"
+/* 1491 */ "lifetime\0"
+/* 1500 */ "generate MD5 keys\0"
+/* 1518 */ "MD5KEY\0"
+/* 1525 */ "md5key\0"
+/* 1532 */ "modulus\0"
+/* 1540 */ "MODULUS\0"
+/* 1548 */ "generate PC private certificate\0"
+/* 1580 */ "PVT_CERT\0"
+/* 1589 */ "pvt-cert\0"
+/* 1598 */ "local private password\0"
+/* 1621 */ "PASSWORD\0"
+/* 1630 */ "password\0"
+/* 1639 */ "export IFF or GQ group keys with password\0"
+/* 1681 */ "EXPORT_PASSWD\0"
+/* 1695 */ "export-passwd\0"
+/* 1709 */ "generate sign key (RSA or DSA)\0"
+/* 1740 */ "SIGN_KEY\0"
+/* 1749 */ "sign-key\0"
+/* 1758 */ "set host and optionally group name\0"
+/* 1793 */ "SUBJECT_NAME\0"
+/* 1806 */ "subject-name\0"
+/* 1819 */ "trusted certificate (TC scheme)\0"
+/* 1851 */ "TRUSTED_CERT\0"
+/* 1864 */ "trusted-cert\0"
+/* 1877 */ "generate <num> MV parameters\0"
+/* 1906 */ "MV_PARAMS\0"
+/* 1916 */ "mv-params\0"
+/* 1926 */ "update <num> MV keys\0"
+/* 1947 */ "MV_KEYS\0"
+/* 1955 */ "mv-keys\0"
+/* 1963 */ "display extended usage information and exit\0"
+/* 2007 */ "help\0"
+/* 2012 */ "extended usage information passed thru pager\0"
+/* 2057 */ "more-help\0"
+/* 2067 */ "output version information and exit\0"
+/* 2103 */ "version\0"
+/* 2111 */ "save the option state to a config file\0"
+/* 2150 */ "save-opts\0"
+/* 2160 */ "load options from a config file\0"
+/* 2192 */ "LOAD_OPTS\0"
+/* 2202 */ "no-load-opts\0"
+/* 2215 */ "no\0"
+/* 2218 */ "NTP_KEYGEN\0"
+/* 2229 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
-/* 2291 */ "$HOME\0"
-/* 2297 */ ".\0"
-/* 2299 */ ".ntprc\0"
-/* 2306 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2340 */ "\n\0"
-/* 2342 */ "ntp-keygen (ntp) 4.2.7p482";
+/* 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.8p2";
/**
* imbits option description:
*/
#ifdef AUTOKEY
/** Descriptive text for the imbits option */
-#define IMBITS_DESC (ntp_keygen_opt_strs+966)
+#define IMBITS_DESC (ntp_keygen_opt_strs+1020)
/** Upper-cased name for the imbits option */
-#define IMBITS_NAME (ntp_keygen_opt_strs+988)
+#define IMBITS_NAME (ntp_keygen_opt_strs+1042)
/** Name string for the imbits option */
-#define IMBITS_name (ntp_keygen_opt_strs+995)
+#define IMBITS_name (ntp_keygen_opt_strs+1049)
/** Compiled in flag settings for the imbits option */
#define IMBITS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -198,11 +199,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the certificate option */
-#define CERTIFICATE_DESC (ntp_keygen_opt_strs+1002)
+#define CERTIFICATE_DESC (ntp_keygen_opt_strs+1056)
/** Upper-cased name for the certificate option */
-#define CERTIFICATE_NAME (ntp_keygen_opt_strs+1021)
+#define CERTIFICATE_NAME (ntp_keygen_opt_strs+1075)
/** Name string for the certificate option */
-#define CERTIFICATE_name (ntp_keygen_opt_strs+1033)
+#define CERTIFICATE_name (ntp_keygen_opt_strs+1087)
/** Compiled in flag settings for the certificate option */
#define CERTIFICATE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -219,11 +220,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the cipher option */
-#define CIPHER_DESC (ntp_keygen_opt_strs+1045)
+#define CIPHER_DESC (ntp_keygen_opt_strs+1099)
/** Upper-cased name for the cipher option */
-#define CIPHER_NAME (ntp_keygen_opt_strs+1063)
+#define CIPHER_NAME (ntp_keygen_opt_strs+1117)
/** Name string for the cipher option */
-#define CIPHER_name (ntp_keygen_opt_strs+1070)
+#define CIPHER_name (ntp_keygen_opt_strs+1124)
/** Compiled in flag settings for the cipher option */
#define CIPHER_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -239,11 +240,11 @@ static char const ntp_keygen_opt_strs[2369] =
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1077)
+#define DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1131)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1108)
+#define DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1162)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntp_keygen_opt_strs+1120)
+#define DEBUG_LEVEL_name (ntp_keygen_opt_strs+1174)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
@@ -251,11 +252,11 @@ static char const ntp_keygen_opt_strs[2369] =
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1132)
+#define SET_DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1186)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1162)
+#define SET_DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1216)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntp_keygen_opt_strs+1178)
+#define SET_DEBUG_LEVEL_name (ntp_keygen_opt_strs+1232)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -265,11 +266,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the id-key option */
-#define ID_KEY_DESC (ntp_keygen_opt_strs+1194)
+#define ID_KEY_DESC (ntp_keygen_opt_strs+1248)
/** Upper-cased name for the id-key option */
-#define ID_KEY_NAME (ntp_keygen_opt_strs+1224)
+#define ID_KEY_NAME (ntp_keygen_opt_strs+1278)
/** Name string for the id-key option */
-#define ID_KEY_name (ntp_keygen_opt_strs+1231)
+#define ID_KEY_name (ntp_keygen_opt_strs+1285)
/** Compiled in flag settings for the id-key option */
#define ID_KEY_FLAGS (OPTST_DISABLED)
@@ -285,11 +286,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the gq-params option */
-#define GQ_PARAMS_DESC (ntp_keygen_opt_strs+1238)
+#define GQ_PARAMS_DESC (ntp_keygen_opt_strs+1292)
/** Upper-cased name for the gq-params option */
-#define GQ_PARAMS_NAME (ntp_keygen_opt_strs+1270)
+#define GQ_PARAMS_NAME (ntp_keygen_opt_strs+1324)
/** Name string for the gq-params option */
-#define GQ_PARAMS_name (ntp_keygen_opt_strs+1280)
+#define GQ_PARAMS_name (ntp_keygen_opt_strs+1334)
/** Compiled in flag settings for the gq-params option */
#define GQ_PARAMS_FLAGS (OPTST_DISABLED)
@@ -305,11 +306,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the host-key option */
-#define HOST_KEY_DESC (ntp_keygen_opt_strs+1290)
+#define HOST_KEY_DESC (ntp_keygen_opt_strs+1344)
/** Upper-cased name for the host-key option */
-#define HOST_KEY_NAME (ntp_keygen_opt_strs+1312)
+#define HOST_KEY_NAME (ntp_keygen_opt_strs+1366)
/** Name string for the host-key option */
-#define HOST_KEY_name (ntp_keygen_opt_strs+1321)
+#define HOST_KEY_name (ntp_keygen_opt_strs+1375)
/** Compiled in flag settings for the host-key option */
#define HOST_KEY_FLAGS (OPTST_DISABLED)
@@ -325,11 +326,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the iffkey option */
-#define IFFKEY_DESC (ntp_keygen_opt_strs+1330)
+#define IFFKEY_DESC (ntp_keygen_opt_strs+1384)
/** Upper-cased name for the iffkey option */
-#define IFFKEY_NAME (ntp_keygen_opt_strs+1354)
+#define IFFKEY_NAME (ntp_keygen_opt_strs+1408)
/** Name string for the iffkey option */
-#define IFFKEY_name (ntp_keygen_opt_strs+1361)
+#define IFFKEY_name (ntp_keygen_opt_strs+1415)
/** Compiled in flag settings for the iffkey option */
#define IFFKEY_FLAGS (OPTST_DISABLED)
@@ -345,11 +346,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the ident option */
-#define IDENT_DESC (ntp_keygen_opt_strs+1368)
+#define IDENT_DESC (ntp_keygen_opt_strs+1422)
/** Upper-cased name for the ident option */
-#define IDENT_NAME (ntp_keygen_opt_strs+1391)
+#define IDENT_NAME (ntp_keygen_opt_strs+1445)
/** Name string for the ident option */
-#define IDENT_name (ntp_keygen_opt_strs+1397)
+#define IDENT_name (ntp_keygen_opt_strs+1451)
/** Compiled in flag settings for the ident option */
#define IDENT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -366,11 +367,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the lifetime option */
-#define LIFETIME_DESC (ntp_keygen_opt_strs+1403)
+#define LIFETIME_DESC (ntp_keygen_opt_strs+1457)
/** Upper-cased name for the lifetime option */
-#define LIFETIME_NAME (ntp_keygen_opt_strs+1428)
+#define LIFETIME_NAME (ntp_keygen_opt_strs+1482)
/** Name string for the lifetime option */
-#define LIFETIME_name (ntp_keygen_opt_strs+1437)
+#define LIFETIME_name (ntp_keygen_opt_strs+1491)
/** Compiled in flag settings for the lifetime option */
#define LIFETIME_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -386,11 +387,11 @@ static char const ntp_keygen_opt_strs[2369] =
* md5key option description:
*/
/** Descriptive text for the md5key option */
-#define MD5KEY_DESC (ntp_keygen_opt_strs+1446)
+#define MD5KEY_DESC (ntp_keygen_opt_strs+1500)
/** Upper-cased name for the md5key option */
-#define MD5KEY_NAME (ntp_keygen_opt_strs+1464)
+#define MD5KEY_NAME (ntp_keygen_opt_strs+1518)
/** Name string for the md5key option */
-#define MD5KEY_name (ntp_keygen_opt_strs+1471)
+#define MD5KEY_name (ntp_keygen_opt_strs+1525)
/** Compiled in flag settings for the md5key option */
#define MD5KEY_FLAGS (OPTST_DISABLED)
@@ -399,11 +400,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the modulus option */
-#define MODULUS_DESC (ntp_keygen_opt_strs+1478)
+#define MODULUS_DESC (ntp_keygen_opt_strs+1532)
/** Upper-cased name for the modulus option */
-#define MODULUS_NAME (ntp_keygen_opt_strs+1486)
+#define MODULUS_NAME (ntp_keygen_opt_strs+1540)
/** Name string for the modulus option */
-#define MODULUS_name (ntp_keygen_opt_strs+1478)
+#define MODULUS_name (ntp_keygen_opt_strs+1532)
/** Compiled in flag settings for the modulus option */
#define MODULUS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -420,11 +421,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the pvt-cert option */
-#define PVT_CERT_DESC (ntp_keygen_opt_strs+1494)
+#define PVT_CERT_DESC (ntp_keygen_opt_strs+1548)
/** Upper-cased name for the pvt-cert option */
-#define PVT_CERT_NAME (ntp_keygen_opt_strs+1526)
+#define PVT_CERT_NAME (ntp_keygen_opt_strs+1580)
/** Name string for the pvt-cert option */
-#define PVT_CERT_name (ntp_keygen_opt_strs+1535)
+#define PVT_CERT_name (ntp_keygen_opt_strs+1589)
/** Compiled in flag settings for the pvt-cert option */
#define PVT_CERT_FLAGS (OPTST_DISABLED)
@@ -440,11 +441,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the password option */
-#define PASSWORD_DESC (ntp_keygen_opt_strs+1544)
+#define PASSWORD_DESC (ntp_keygen_opt_strs+1598)
/** Upper-cased name for the password option */
-#define PASSWORD_NAME (ntp_keygen_opt_strs+1567)
+#define PASSWORD_NAME (ntp_keygen_opt_strs+1621)
/** Name string for the password option */
-#define PASSWORD_name (ntp_keygen_opt_strs+1576)
+#define PASSWORD_name (ntp_keygen_opt_strs+1630)
/** Compiled in flag settings for the password option */
#define PASSWORD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -461,11 +462,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the export-passwd option */
-#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1585)
+#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1639)
/** Upper-cased name for the export-passwd option */
-#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1627)
+#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1681)
/** Name string for the export-passwd option */
-#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1641)
+#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1695)
/** Compiled in flag settings for the export-passwd option */
#define EXPORT_PASSWD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -482,11 +483,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the sign-key option */
-#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1655)
+#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1709)
/** Upper-cased name for the sign-key option */
-#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1686)
+#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1740)
/** Name string for the sign-key option */
-#define SIGN_KEY_name (ntp_keygen_opt_strs+1695)
+#define SIGN_KEY_name (ntp_keygen_opt_strs+1749)
/** Compiled in flag settings for the sign-key option */
#define SIGN_KEY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -503,11 +504,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the subject-name option */
-#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1704)
+#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1758)
/** Upper-cased name for the subject-name option */
-#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1739)
+#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1793)
/** Name string for the subject-name option */
-#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1752)
+#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1806)
/** Compiled in flag settings for the subject-name option */
#define SUBJECT_NAME_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -524,11 +525,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the trusted-cert option */
-#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1765)
+#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1819)
/** Upper-cased name for the trusted-cert option */
-#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1797)
+#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1851)
/** Name string for the trusted-cert option */
-#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1810)
+#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1864)
/** Compiled in flag settings for the trusted-cert option */
#define TRUSTED_CERT_FLAGS (OPTST_DISABLED)
@@ -544,11 +545,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the mv-params option */
-#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1823)
+#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1877)
/** Upper-cased name for the mv-params option */
-#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1852)
+#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1906)
/** Name string for the mv-params option */
-#define MV_PARAMS_name (ntp_keygen_opt_strs+1862)
+#define MV_PARAMS_name (ntp_keygen_opt_strs+1916)
/** Compiled in flag settings for the mv-params option */
#define MV_PARAMS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -565,11 +566,11 @@ static char const ntp_keygen_opt_strs[2369] =
*/
#ifdef AUTOKEY
/** Descriptive text for the mv-keys option */
-#define MV_KEYS_DESC (ntp_keygen_opt_strs+1872)
+#define MV_KEYS_DESC (ntp_keygen_opt_strs+1926)
/** Upper-cased name for the mv-keys option */
-#define MV_KEYS_NAME (ntp_keygen_opt_strs+1893)
+#define MV_KEYS_NAME (ntp_keygen_opt_strs+1947)
/** Name string for the mv-keys option */
-#define MV_KEYS_name (ntp_keygen_opt_strs+1901)
+#define MV_KEYS_name (ntp_keygen_opt_strs+1955)
/** Compiled in flag settings for the mv-keys option */
#define MV_KEYS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -584,11 +585,11 @@ static char const ntp_keygen_opt_strs[2369] =
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntp_keygen_opt_strs+1909)
-#define HELP_name (ntp_keygen_opt_strs+1953)
+#define HELP_DESC (ntp_keygen_opt_strs+1963)
+#define HELP_name (ntp_keygen_opt_strs+2007)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntp_keygen_opt_strs+1958)
-#define MORE_HELP_name (ntp_keygen_opt_strs+2003)
+#define MORE_HELP_DESC (ntp_keygen_opt_strs+2012)
+#define MORE_HELP_name (ntp_keygen_opt_strs+2057)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -601,14 +602,14 @@ static char const ntp_keygen_opt_strs[2369] =
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntp_keygen_opt_strs+2013)
-#define VER_name (ntp_keygen_opt_strs+2049)
-#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2057)
-#define SAVE_OPTS_name (ntp_keygen_opt_strs+2096)
-#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2106)
-#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2138)
-#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2148)
-#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2161)
+#define VER_DESC (ntp_keygen_opt_strs+2067)
+#define VER_name (ntp_keygen_opt_strs+2103)
+#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2111)
+#define SAVE_OPTS_name (ntp_keygen_opt_strs+2150)
+#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2160)
+#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2192)
+#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2202)
+#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2215)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -959,24 +960,24 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntp-keygen. */
-#define zPROGNAME (ntp_keygen_opt_strs+2164)
+#define zPROGNAME (ntp_keygen_opt_strs+2218)
/** Reference to the title line for ntp-keygen usage. */
-#define zUsageTitle (ntp_keygen_opt_strs+2175)
+#define zUsageTitle (ntp_keygen_opt_strs+2229)
/** ntp-keygen configuration file name. */
-#define zRcName (ntp_keygen_opt_strs+2299)
+#define zRcName (ntp_keygen_opt_strs+2351)
/** Directories to search for ntp-keygen config files. */
static char const * const apzHomeList[3] = {
- ntp_keygen_opt_strs+2291,
- ntp_keygen_opt_strs+2297,
+ ntp_keygen_opt_strs+2343,
+ ntp_keygen_opt_strs+2349,
NULL };
/** The ntp-keygen program bug email address. */
-#define zBugsAddr (ntp_keygen_opt_strs+2306)
+#define zBugsAddr (ntp_keygen_opt_strs+2358)
/** Clarification/explanation of what ntp-keygen does. */
-#define zExplain (ntp_keygen_opt_strs+2340)
+#define zExplain (ntp_keygen_opt_strs+2392)
/** Extra detail explaining what ntp-keygen does. */
#define zDetail (NULL)
/** The full version string for ntp-keygen. */
-#define zFullVersion (ntp_keygen_opt_strs+2342)
+#define zFullVersion (ntp_keygen_opt_strs+2394)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -1308,8 +1309,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntp_keygenOptions.pzCopyright */
- puts(_("ntp-keygen (ntp) 4.2.7p482\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("ntp-keygen (ntp) 4.2.8p2\n\
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1323,9 +1324,10 @@ provided that the above copyright notice appears in all copies and that\n\
both the copyright notice and this permission notice appear in supporting\n\
documentation, and that the name The University of Delaware not be used in\n\
advertising or publicity pertaining to distribution of the software without\n\
-specific, written prior permission. The University of Delaware makes no\n\
-representations about the suitability this software for any purpose. It is\n\
-provided \"as is\" without express or implied warranty.\n"));
+specific, written prior permission. The University of Delaware and Network\n\
+Time Foundation makes no representations about the suitability this\n\
+software for any purpose. It is provided \"as is\" without express or\n\
+implied warranty.\n"));
/* referenced via ntp_keygenOptions.pOptDesc->pzText */
puts(_("identity modulus bits"));
@@ -1406,14 +1408,14 @@ provided \"as is\" without express or 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.7p482\n\
+ puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntp_keygenOptions.pzExplain */
puts(_("\n"));
/* referenced via ntp_keygenOptions.pzFullVersion */
- puts(_("ntp-keygen (ntp) 4.2.7p482"));
+ puts(_("ntp-keygen (ntp) 4.2.8p2"));
/* referenced via ntp_keygenOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/util/ntp-keygen-opts.h b/util/ntp-keygen-opts.h
index 48a9998..54f1ac4 100644
--- a/util/ntp-keygen-opts.h
+++ b/util/ntp-keygen-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed December 2, 2014 at 08:58:31 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:27:29 AM by AutoGen 5.18.5pre4
* From the definitions ntp-keygen-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntp-keygen program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -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.7p482"
+#define NTP_KEYGEN_VERSION "4.2.8p2"
/** Full ntp-keygen version text */
-#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.7p482"
+#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/util/ntp-keygen.1ntp-keygenman b/util/ntp-keygen.1ntp-keygenman
index 28dc6ad..b600ed4 100644
--- a/util/ntp-keygen.1ntp-keygenman
+++ b/util/ntp-keygen.1ntp-keygenman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen 1ntp-keygenman "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH ntp-keygen 1ntp-keygenman "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-znaynR/ag-LnaqmR)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Kfaqzc/ag-Wfaiyc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:44 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1195,9 +1195,9 @@ libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
It can take quite a while to generate some cryptographic values,
diff --git a/util/ntp-keygen.1ntp-keygenmdoc b/util/ntp-keygen.1ntp-keygenmdoc
index 9b3dabb..ad8a96d 100644
--- a/util/ntp-keygen.1ntp-keygenmdoc
+++ b/util/ntp-keygen.1ntp-keygenmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:51 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:49 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1051,9 +1051,9 @@ libopts had an internal operational error. Please report
it to autogen\-users@lists.sourceforge.net. Thank you.
.El
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
It can take quite a while to generate some cryptographic values,
diff --git a/util/ntp-keygen.c b/util/ntp-keygen.c
index d55a357..494bedb 100644
--- a/util/ntp-keygen.c
+++ b/util/ntp-keygen.c
@@ -108,6 +108,7 @@
#endif /* OPENSSL */
#include <ssl_applink.c>
+#define _UC(str) ((char *)(intptr_t)(str))
/*
* Cryptodefines
*/
@@ -131,19 +132,19 @@
* Prototypes
*/
FILE *fheader (const char *, const char *, const char *);
-int gen_md5 (char *);
+int gen_md5 (const char *);
void followlink (char *, size_t);
#ifdef AUTOKEY
-EVP_PKEY *gen_rsa (char *);
-EVP_PKEY *gen_dsa (char *);
-EVP_PKEY *gen_iffkey (char *);
-EVP_PKEY *gen_gqkey (char *);
-EVP_PKEY *gen_mvkey (char *, EVP_PKEY **);
+EVP_PKEY *gen_rsa (const char *);
+EVP_PKEY *gen_dsa (const char *);
+EVP_PKEY *gen_iffkey (const char *);
+EVP_PKEY *gen_gqkey (const char *);
+EVP_PKEY *gen_mvkey (const char *, EVP_PKEY **);
void gen_mvserv (char *, EVP_PKEY **);
-int x509 (EVP_PKEY *, const EVP_MD *, char *, char *,
+int x509 (EVP_PKEY *, const EVP_MD *, char *, const char *,
char *);
void cb (int, int, void *);
-EVP_PKEY *genkey (char *, char *);
+EVP_PKEY *genkey (const char *, const char *);
EVP_PKEY *readkey (char *, char *, u_int *, EVP_PKEY **);
void writekey (char *, char *, u_int *, EVP_PKEY **);
u_long asn2ntp (ASN1_TIME *);
@@ -311,7 +312,7 @@ main(
char pathbuf[MAXFILENAME + 1];
const char *scheme = NULL; /* digest/signature scheme */
const char *ciphername = NULL; /* to encrypt priv. key */
- char *exten = NULL; /* private extension */
+ const char *exten = NULL; /* private extension */
char *grpkey = NULL; /* identity extension */
int nid; /* X509 digest/signature scheme */
FILE *fstr = NULL; /* file handle */
@@ -336,6 +337,8 @@ main(
ssl_check_version();
#endif /* OPENSSL */
+ ntp_crypto_srandom();
+
/*
* Process options, initialize host name and timestamp.
* gethostname() won't null-terminate if hostname is exactly the
@@ -348,7 +351,6 @@ main(
passwd1 = hostbuf;
passwd2 = NULL;
GETTIMEOFDAY(&tv, NULL);
- ntp_srandom((u_long)(tv.tv_sec + tv.tv_usec));
epoch = tv.tv_sec;
fstamp = (u_int)(epoch + JAN_1970);
@@ -810,7 +812,7 @@ main(
*/
int
gen_md5(
- char *id /* file name id */
+ const char *id /* file name id */
)
{
u_char md5key[MD5SIZE + 1]; /* MD5 key */
@@ -825,17 +827,24 @@ gen_md5(
str = fheader("MD5key", id, groupname);
for (i = 1; i <= MD5KEYS; i++) {
for (j = 0; j < MD5SIZE; j++) {
- int temp;
+ u_char temp;
while (1) {
- temp = ntp_random() & 0xff;
+ int rc;
+
+ rc = ntp_crypto_random_buf(
+ &temp, sizeof(temp));
+ if (-1 == rc) {
+ fprintf(stderr, "ntp_crypto_random_buf() failed.\n");
+ exit (-1);
+ }
if (temp == '#')
continue;
if (temp > 0x20 && temp < 0x7f)
break;
}
- md5key[j] = (u_char)temp;
+ md5key[j] = temp;
}
md5key[j] = '\0';
fprintf(str, "%2d MD5 %s # MD5 key\n", i,
@@ -950,7 +959,7 @@ readkey(
*/
EVP_PKEY * /* public/private key pair */
gen_rsa(
- char *id /* file name id */
+ const char *id /* file name id */
)
{
EVP_PKEY *pkey; /* private key */
@@ -958,7 +967,7 @@ gen_rsa(
FILE *str;
fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus);
- rsa = RSA_generate_key(modulus, 3, cb, "RSA");
+ rsa = RSA_generate_key(modulus, 65537, cb, _UC("RSA"));
fprintf(stderr, "\n");
if (rsa == NULL) {
fprintf(stderr, "RSA generate keys fails\n%s\n",
@@ -1003,7 +1012,7 @@ gen_rsa(
*/
EVP_PKEY * /* public/private key pair */
gen_dsa(
- char *id /* file name id */
+ const char *id /* file name id */
)
{
EVP_PKEY *pkey; /* private key */
@@ -1018,7 +1027,7 @@ gen_dsa(
"Generating DSA parameters (%d bits)...\n", modulus);
RAND_bytes(seed, sizeof(seed));
dsa = DSA_generate_parameters(modulus, seed, sizeof(seed), NULL,
- NULL, cb, "DSA");
+ NULL, cb, _UC("DSA"));
fprintf(stderr, "\n");
if (dsa == NULL) {
fprintf(stderr, "DSA generate parameters fails\n%s\n",
@@ -1105,7 +1114,7 @@ gen_dsa(
*/
EVP_PKEY * /* DSA cuckoo nest */
gen_iffkey(
- char *id /* file name id */
+ const char *id /* file name id */
)
{
EVP_PKEY *pkey; /* private key */
@@ -1123,7 +1132,7 @@ gen_iffkey(
modulus2);
RAND_bytes(seed, sizeof(seed));
dsa = DSA_generate_parameters(modulus2, seed, sizeof(seed), NULL,
- NULL, cb, "IFF");
+ NULL, cb, _UC("IFF"));
fprintf(stderr, "\n");
if (dsa == NULL) {
fprintf(stderr, "DSA generate parameters fails\n%s\n",
@@ -1283,7 +1292,7 @@ gen_iffkey(
*/
EVP_PKEY * /* RSA cuckoo nest */
gen_gqkey(
- char *id /* file name id */
+ const char *id /* file name id */
)
{
EVP_PKEY *pkey; /* private key */
@@ -1299,7 +1308,7 @@ gen_gqkey(
fprintf(stderr,
"Generating GQ parameters (%d bits)...\n",
modulus2);
- rsa = RSA_generate_key(modulus2, 3, cb, "GQ");
+ rsa = RSA_generate_key(modulus2, 65537, cb, _UC("GQ"));
fprintf(stderr, "\n");
if (rsa == NULL) {
fprintf(stderr, "RSA generate keys fails\n%s\n",
@@ -1492,7 +1501,7 @@ gen_gqkey(
*/
EVP_PKEY * /* DSA cuckoo nest */
gen_mvkey(
- char *id, /* file name id */
+ const char *id, /* file name id */
EVP_PKEY **evpars /* parameter list pointer */
)
{
@@ -1917,7 +1926,7 @@ x509 (
EVP_PKEY *pkey, /* signing key */
const EVP_MD *md, /* signature/digest scheme */
char *gqpub, /* identity extension (hex string) */
- char *exten, /* private cert extension */
+ const char *exten, /* private cert extension */
char *name /* subject/issuer name */
)
{
@@ -1971,7 +1980,7 @@ x509 (
fprintf(stderr, "%s: %s\n", LN_basic_constraints,
BASIC_CONSTRAINTS);
ex = X509V3_EXT_conf_nid(NULL, NULL, NID_basic_constraints,
- BASIC_CONSTRAINTS);
+ _UC(BASIC_CONSTRAINTS));
if (!X509_add_ext(cert, ex, -1)) {
fprintf(stderr, "Add extension field fails\n%s\n",
ERR_error_string(ERR_get_error(), NULL));
@@ -1984,7 +1993,7 @@ x509 (
* be used for.
*/
fprintf(stderr, "%s: %s\n", LN_key_usage, KEY_USAGE);
- ex = X509V3_EXT_conf_nid(NULL, NULL, NID_key_usage, KEY_USAGE);
+ ex = X509V3_EXT_conf_nid(NULL, NULL, NID_key_usage, _UC(KEY_USAGE));
if (!X509_add_ext(cert, ex, -1)) {
fprintf(stderr, "Add extension field fails\n%s\n",
ERR_error_string(ERR_get_error(), NULL));
@@ -2019,7 +2028,7 @@ x509 (
if (exten != NULL) {
fprintf(stderr, "%s: %s\n", LN_ext_key_usage, exten);
ex = X509V3_EXT_conf_nid(NULL, NULL,
- NID_ext_key_usage, exten);
+ NID_ext_key_usage, _UC(exten));
if (!X509_add_ext(cert, ex, -1)) {
fprintf(stderr,
"Add extension field fails\n%s\n",
@@ -2130,8 +2139,8 @@ cb (
*/
EVP_PKEY * /* public/private key pair */
genkey(
- char *type, /* key type (RSA or DSA) */
- char *id /* file name id */
+ const char *type, /* key type (RSA or DSA) */
+ const char *id /* file name id */
)
{
if (type == NULL)
@@ -2161,15 +2170,29 @@ fheader (
FILE *str; /* file handle */
char linkname[MAXFILENAME]; /* link name */
int temp;
-
+#ifdef HAVE_UMASK
+ mode_t orig_umask;
+#endif
+
snprintf(filename, sizeof(filename), "ntpkey_%s_%s.%u", file,
owner, fstamp);
- if ((str = fopen(filename, "w")) == NULL) {
+#ifdef HAVE_UMASK
+ orig_umask = umask( S_IWGRP | S_IRWXO );
+ str = fopen(filename, "w");
+ (void) umask(orig_umask);
+#else
+ str = fopen(filename, "w");
+#endif
+ if (str == NULL) {
perror("Write");
exit (-1);
}
- snprintf(linkname, sizeof(linkname), "ntpkey_%s_%s", ulink,
- hostname);
+ if (strcmp(ulink, "md5") == 0) {
+ strcpy(linkname,"ntp.keys");
+ } else {
+ snprintf(linkname, sizeof(linkname), "ntpkey_%s_%s", ulink,
+ hostname);
+ }
(void)remove(linkname); /* The symlink() line below matters */
temp = symlink(filename, linkname);
if (temp < 0)
diff --git a/util/ntp-keygen.html b/util/ntp-keygen.html
index b5315d2..1aad39b 100644
--- a/util/ntp-keygen.html
+++ b/util/ntp-keygen.html
@@ -70,7 +70,7 @@ All other files are in PEM-encoded
printable ASCII format so they can be embedded as MIME attachments in
mail to other sites.
- <p>This document applies to version 4.2.7p482 of <code>ntp-keygen</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp-keygen</code>.
<div class="node">
<p><hr>
@@ -1085,7 +1085,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p481
+<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p2-RC3
Usage: ntp-keygen [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
diff --git a/util/ntp-keygen.man.in b/util/ntp-keygen.man.in
index 69fcfaa..b47691b 100644
--- a/util/ntp-keygen.man.in
+++ b/util/ntp-keygen.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen @NTP_KEYGEN_MS@ "02 Dec 2014" "ntp (4.2.7p482)" "User Commands"
+.TH ntp-keygen @NTP_KEYGEN_MS@ "07 Apr 2015" "ntp (4.2.8p2)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-znaynR/ag-LnaqmR)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Kfaqzc/ag-Wfaiyc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:44 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1195,9 +1195,9 @@ libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
It can take quite a while to generate some cryptographic values,
diff --git a/util/ntp-keygen.mdoc.in b/util/ntp-keygen.mdoc.in
index 80c6009..540ff4f 100644
--- a/util/ntp-keygen.mdoc.in
+++ b/util/ntp-keygen.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_KEYGEN @NTP_KEYGEN_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:51 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:49 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1051,9 +1051,9 @@ libopts had an internal operational error. Please report
it to autogen\-users@lists.sourceforge.net. Thank you.
.El
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
It can take quite a while to generate some cryptographic values,
diff --git a/util/ntptime.c b/util/ntptime.c
index dd5605c..5a6c1d1 100644
--- a/util/ntptime.c
+++ b/util/ntptime.c
@@ -98,15 +98,16 @@ main(
volatile unsigned ts_mask = TS_MASK; /* defaults to 20 bits (us) */
volatile unsigned ts_roundbit = TS_ROUNDBIT; /* defaults to 20 bits (us) */
volatile int fdigits = 6; /* fractional digits for us */
- int c;
+ size_t c;
+ int ch;
int errflg = 0;
int cost = 0;
volatile int rawtime = 0;
ZERO(ntx);
progname = argv[0];
- while ((c = ntp_getopt(argc, argv, optargs)) != EOF) {
- switch (c) {
+ while ((ch = ntp_getopt(argc, argv, optargs)) != EOF) {
+ switch (ch) {
#ifdef MOD_MICRO
case 'M':
ntx.modes |= MOD_MICRO;
@@ -467,7 +468,7 @@ timex_state(
{
static char buf[32];
- if (s >= 0 && s < COUNTOF(timex_states))
+ if ((size_t)s < COUNTOF(timex_states))
return timex_states[s];
snprintf(buf, sizeof(buf), "TIME-#%d", s);
return buf;
diff --git a/ylwrap b/ylwrap
new file mode 100755
index 0000000..84d5634
--- /dev/null
+++ b/ylwrap
@@ -0,0 +1,222 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
+# 2007, 2009 Free Software Foundation, Inc.
+#
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case "$1" in
+ '')
+ echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
+ exit 1
+ ;;
+ --basedir)
+ basedir=$2
+ shift 2
+ ;;
+ -h|--h*)
+ cat <<\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+ INPUT is the input file
+ OUTPUT is one file PROG generates
+ DESIRED is the file we actually want instead of OUTPUT
+ PROGRAM is program to run
+ ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v|--v*)
+ echo "ylwrap $scriptversion"
+ exit $?
+ ;;
+esac
+
+
+# The input.
+input="$1"
+shift
+case "$input" in
+ [\\/]* | ?:[\\/]*)
+ # Absolute path; do nothing.
+ ;;
+ *)
+ # Relative path. Make it absolute.
+ input="`pwd`/$input"
+ ;;
+esac
+
+pairlist=
+while test "$#" -ne 0; do
+ if test "$1" = "--"; then
+ shift
+ break
+ fi
+ pairlist="$pairlist $1"
+ shift
+done
+
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+ [\\/]* | ?:[\\/]*) ;;
+ *[\\/]*) prog="`pwd`/$prog" ;;
+esac
+
+# FIXME: add hostname here for parallel makes that run commands on
+# other machines. But that might take us over the 14-char limit.
+dirname=ylwrap$$
+trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+mkdir $dirname || exit 1
+
+cd $dirname
+
+case $# in
+ 0) "$prog" "$input" ;;
+ *) "$prog" "$@" "$input" ;;
+esac
+ret=$?
+
+if test $ret -eq 0; then
+ set X $pairlist
+ shift
+ first=yes
+ # Since DOS filename conventions don't allow two dots,
+ # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+ # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+ y_tab_nodot="no"
+ if test -f y_tab.c || test -f y_tab.h; then
+ y_tab_nodot="yes"
+ fi
+
+ # The directory holding the input.
+ input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+ # Quote $INPUT_DIR so we can use it in a regexp.
+ # FIXME: really we should care about more than `.' and `\'.
+ input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+ while test "$#" -ne 0; do
+ from="$1"
+ # Handle y_tab.c and y_tab.h output by DOS
+ if test $y_tab_nodot = "yes"; then
+ if test $from = "y.tab.c"; then
+ from="y_tab.c"
+ else
+ if test $from = "y.tab.h"; then
+ from="y_tab.h"
+ fi
+ fi
+ fi
+ if test -f "$from"; then
+ # If $2 is an absolute path name, then just use that,
+ # otherwise prepend `../'.
+ case "$2" in
+ [\\/]* | ?:[\\/]*) target="$2";;
+ *) target="../$2";;
+ esac
+
+ # We do not want to overwrite a header file if it hasn't
+ # changed. This avoid useless recompilations. However the
+ # parser itself (the first file) should always be updated,
+ # because it is the destination of the .y.c rule in the
+ # Makefile. Divert the output of all other files to a temporary
+ # file so we can compare them to existing versions.
+ if test $first = no; then
+ realtarget="$target"
+ target="tmp-`echo $target | sed s/.*[\\/]//g`"
+ fi
+ # Edit out `#line' or `#' directives.
+ #
+ # We don't want the resulting debug information to point at
+ # an absolute srcdir; it is better for it to just mention the
+ # .y file with no path.
+ #
+ # We want to use the real output file name, not yy.lex.c for
+ # instance.
+ #
+ # We want the include guards to be adjusted too.
+ FROM=`echo "$from" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+ TARGET=`echo "$2" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+
+ sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
+ -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
+
+ # Check whether header files must be updated.
+ if test $first = no; then
+ if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+ echo "$2" is unchanged
+ rm -f "$target"
+ else
+ echo updating "$2"
+ mv -f "$target" "$realtarget"
+ fi
+ fi
+ else
+ # A missing file is only an error for the first file. This
+ # is a blatant hack to let us support using "yacc -d". If -d
+ # is not specified, we don't want an error when the header
+ # file is "missing".
+ if test $first = yes; then
+ ret=1
+ fi
+ fi
+ shift
+ shift
+ first=no
+ done
+else
+ ret=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End: