Dave Hart [Sun, 20 Mar 2011 20:39:43 +0000 (20:39 +0000)]
Remove kernel line discipline driver code for clk and chu, deprecate
related LDISC_ flags, and remove associated ntpd code to decode the
timestamps, remove clktest line discipline test program.
Dave Hart [Thu, 17 Mar 2011 01:25:14 +0000 (01:25 +0000)]
[Bug 1848] ntpd 4.2.7p139 --disable-thread-support does not compile.
Add --disable-thread-support to one flock-build variation.
One more lock-while-init in lib/isc/task.c to quiet lock analysis.
Dave Hart [Sat, 5 Mar 2011 22:35:37 +0000 (22:35 +0000)]
Use TRACE() instead of DPRINTF() for libntp and utilities, which
use the "debug" variable regardless of #ifdef DEBUG.
Declare debug in libntp instead of each program. Expose extern declaration
to utilities, libntp, and DEBUG ntpd.
Dave Hart [Tue, 1 Mar 2011 04:48:43 +0000 (04:48 +0000)]
libevent: When building on systems with CLOCK_MONOTONIC available,
separate the internal timeline (possibly counting since system boot)
from the gettimeofday() timeline in event_base cached timevals. Adds
new event_base_tv_cached() to retrieve cached callback round start
time on the internal timeline, and changes
event_based_gettimeofday_cached() to always return times using the
namesake timeline. This preserves the benefit of using the never-
stepped monotonic clock for event timeouts while providing clients
with times consistently using gettimeofday().
Correct event_base_gettimeofday_cached() workaround code in
sntp to work with corrected libevent.
Remove sntp l_fp_output() test now that it uses prettydate().
Dave Hart [Wed, 23 Feb 2011 18:57:00 +0000 (18:57 +0000)]
[Bug 1837] Build fails on Win7 due to regedit requiring privilege.
Provide fallback definitions for GetAdaptersAddresses() for Windows
build environments lacking iphlpapi.h.
Rename file containing 1.xxxx ChangeSet revision from version to
scm-rev to avoid invoking GNU make implicit rules attempting to
compile version.c into version. Problem was with sntp/version.o
during make distcheck after fix for spurious sntp rebuilds.
Dave Hart [Tue, 22 Feb 2011 23:21:13 +0000 (23:21 +0000)]
[Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
Move sntp last in top-level Makefile.am SUBDIRS so that the libevent
tearoff (if required) and sntp are compiled after the rest.
Use a single set of Automake options for each package in configure.ac
AM_INIT, remove Makefile.am AUTOMAKE_OPTIONS= lines.
Correct spurious sntp rebuilds triggered by a make misperception
sntp/version was out-of-date relative to phony target FRC.version.
Do not cache paths to perl, test, or pkg-config, searching the PATH
at configure time is worth it to pick up tool updates.
Dave Hart [Tue, 22 Feb 2011 06:06:28 +0000 (06:06 +0000)]
[Bug 1832] ntpdate doesn't allow timeout > 2s.
[Bug 1833] The checking sem_timedwait() fails without -pthread.
Enable all relevant automake warnings.
Correct Solaris 2.1x PTHREAD_ONCE_INIT extra braces test to avoid
triggering warnings due to excess braces.
Remove libevent-cfg from sntp/Makefile.am.
Provide bug report and URL options to Autoconf.
Dave Hart [Sun, 20 Feb 2011 20:23:00 +0000 (20:23 +0000)]
Attempt typical subpackage approach for libevent
sntp test cleanup
IPv6 hackery
Split up ntp_lib.m4 into smaller, more specific subsets
Use {step,adj}_systime from libntp. Use EX_* codes for exit status.
libevent cleanup
libevent upgrade
Move blocking worker and intres from ntpd to libntp.
Move AC_FUNC_FORK and AC_FUNC_ALLOCA to ntp_libntp.m4 along with move
of intres/blocking worker to libntp.
Use %m instead of strerror().
make -lz depend on zlib.h
hp-ux portability fix
portability
Allow libevent's regress to be skipped in make check.
Switch sntp from evdns to blocking worker intres.
Quiet "signal_no_reset: signal 18 had flags 20000" on OpenSolaris,
adding SA_NOCLDSTOP to IGNORED_SA_FLAGS.
Be consistent about how blocking children go away:
1. Parent requests them to go by closing pipe or CHILD_EXIT_REQ.
2. Child goes away quietly.
3. Parent sees them gone via broken resp pipe or CHILD_GONE_RESP.
4. Parent clears blocking_children entry for reuse.
Make delay between queries to addresses resolved from same hostname
per-family in sntp, as ntpd won't consider our v4 and v6 source
addresses to be one remote rate-limit target.
use freeaddrinfo() in ntpq's getnetnum().
valgrind warned of branch dependent on uninitialized value,
irig_decode()'s local syncdig.
Free OpenSSL dynamic allocations atexit.
Enable pthreads build
libntp autoconf macro cleanup
Move "can't write KoD file" warning from sntp shutdown to startup.
Use libevent log callback to redirect messages from stderr to msyslog()
enable libevent debug mode if sntp debug > 0
Issue a single read event for each socket, rather than one per query.
Do not attempt to read in socket callback for EV_TIMEOUT.
ipv6 fixes for sntp
Crib some pthread m4 from BIND for libisc.
Fix step/slew logic in sntp.
sntp --headspace option (default 10ms) spaces queries.
Provide less-broken gettimeofday_cached().
Add support for --(no-)wait and -uctimeout
Remove duplicate clock_gettime/clock_settime logic from sntp/configure.ac,
it's now in sntp/m4/ntp_libntp.m4.
Bump config.cache version stamps to account for cache-incompatible change
to librt detection.
Omit unused code with recent gcc and gnu ld.
AC_LANG update for openldap autoconf macros
Clean up AC_DEFINE and AC_DEFINE_UNQUOTED arg quoting in openldap*.m4
add a timeout for test-eof.c as it may hang under HP-UX 10.20
Use pthreads for blocking worker rather than fork, if possible.
Quiet alignment warning due to casting sockaddr * to sockaddr_u *
Quiet ntp_control.c and ntp_request.c warnings about casting char *
to u_int32 * using unions.
Use void * rather than char * for variant pointers to help with
pointer cast increases required alignment warnings.
Fix many warnings enabled with -Wcast-align, when casting
a pointer to a more-strictly-aligned underlying type.
preset ol_with_yielding_select=${ol_with_yielding_select-auto}
Also change tests to use x prefix as insurance against other issues.
We always need the PTHREADS AM_CONDITIONAL. Use the OL check.
Use NTP_LIBEVENT m4sh macro to decide between installed and tearoff
libevent.
Add readonly arg to kod_init_kod_db() for tests -- prevents editing
test baseline input KoD files during make check, regression limited
to sntp/libevent branch.
Switch libevent-2.0.10-stable from ACX_PTHREADS to OL_THREAD_CHECK
Use socketpair() instead of pipe() when available, as avoiding
EV_FEATURE_FDS allows libevent to use a faster backend on
systems like Linux without an O(1) backend that handles pipes.
Remove contentious libevent-cfg sentinel files, modify libevent's
confgure args via $ac_configure_args.
Strip unneeded checks from ntp_ipv6.m4:
for struct sockaddr_storage member ss_family
for struct sockaddr_storage member ss_len
for struct sockaddr_storage member __ss_len
Move things used by libntp from top-level configure.ac to NTP_LIBNTP and NTP_IPV6
Change "forked worker child (pid 0)" from msyslog() to DPRINTF().
Change initial socket boundary message from DEBUG-only msyslog() to DPRINTF().
Dave Hart [Wed, 9 Feb 2011 07:14:49 +0000 (07:14 +0000)]
Add missing "break;" to ntp_control.c ctl_putsys() for caliberrs, used
by ntpq -c kerninfo introduced in 4.2.7p104.
Fix leak in ntp_control.c read_mru_list().
Dave Hart [Wed, 26 Jan 2011 16:50:03 +0000 (16:50 +0000)]
Fix off-by-one bug in format_time_fraction() introduced by hart@ntp.org.
Remove abs(prec) <= 9 requirement from format_time_fraction().
Add more time{spec|val}_tostr() tests.
Dave Hart [Tue, 25 Jan 2011 19:25:52 +0000 (19:25 +0000)]
[Bug 1794] ntpq -c rv missing clk_wander information.
[Bug 1795] ntpq readvar does not display last variable.
bk rm libntp/tvtoa.c libntp/utvtoa.c
Thanks to Pearly for noticing these dead, nondistributed files in
the version control system.
Dave Hart [Thu, 20 Jan 2011 08:27:32 +0000 (08:27 +0000)]
Change new timeval and timespec to string routines to use snprintf()
rather than hand-crafted conversion, avoid signed int overflow there.
Add configure support for SIZEOF_LONG_LONG to enable portable use of
snprintf() with time_t.