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.
Dave Hart [Wed, 19 Jan 2011 12:26:17 +0000 (12:26 +0000)]
Grow ntpd/work_thread.c arrays as needed.
Add DEBUG_* variants of ntp_assert.h macros which compile away using
./configure --disable-debugging.
Fix tvalops.cpp unit test failures for 32-bit builds.
Return to a single autoreconf invocation in ./bootstrap script.
Fix warnings seen on FreeBSD 9.
NMEA driver documentation update from Juergen Perlinger.
Dave Hart [Wed, 12 Jan 2011 05:23:49 +0000 (05:23 +0000)]
Add configure --without-sntp option to disable building sntp and
sntp/tests. withsntp=no in the environment changes the default.
Build infrastructure cleanup:
Move m4 directory to sntp/m4.
Share a single set of genver output between sntp and the top level.
Share a single set of autogen included .defs in sntp/include.
Share a single set of build-aux scripts (e.g. config.guess, missing).
Add ntp_libntp.m4 and ntp_ipv6.m4 to reduce configure.ac duplication.
Warn and exit build/flock-build if bootstrap needs to be run.