humandate.c: reordered code so that it is C90-compilant, renamed variables so that they are different that function names, fixed formatting to match NTP's conventionhextolfp.c: removed a trailing endline, changed formatting to match NTP's convention, decodenetnum.c: changed the order of imports, removed an unnecessary import, removed a trailing space, changed the return type from a function to be in a new linerun-humandate.c, run-hextolfp.c, run-decodenetnum.c: autogenerated

lfpfunc.c: replaced TEST_ASSERT_EQUAL_MEMORY(&a,&b,sizeof(a)) with TEST_ASSERT_EQUAL_l_fp(a,b). It's safer this way, because structs can be compared even if they aren't initiated with memset (due to padding bytes)

Makefile.am: added a few more test files to cleanfilesg_utilities.cpp: Rename: sntp/tests/utilities.cpp -> sntp/tests/g_utilities.cppbug-2803.h~e9cdd024b7db50f6: Delete: tests/bug-2803/bug-2803.hMany files: new fileMakefile.am: added utilities test, fixed a minor bug with CLEANFILES vargenerate_test_runner.rb: for now, I'm giving up on removing functions that are written twice (because of declaraion and defintion). That regex is difficult because ruby script splits with newline, ; and { and }. I just added declaration for resetTest, to avoid warnings

run-ssl_init.c: new filessl_init.c: fix for minor #else warningMakefile.am: modified /sntp/tests/Makefile.am so it is consistent to harlans /tests/libntp/Makefile.am changes, including the run-test-* -> run-* fixed the stuff I broke with automerge XD

Makefile.am: builds another test added ../version.c so kodDatabase builds. Should be done via a rule, needs fixing! added c_fileHandlingTest.h to noinst_HEADERS GTEST_AVAILABLE check moved into /sntp/tests/Makefile.am so unity tests can be run

c_sockaddrtest.h: removed stuff like 1==1 with TRUE. Also added cin cout stuff, should be replaced bMany files: new fileMakefile.am: fixes to Lokesh-Damir merge, added new .h to noinst_SOURCESc_lfptest.h: put the static vars back in here, removed them from hextolfp.c, because more files will need them.hextolfp.c: removed static consts, placed them in c_lpftest.hocttoint.c: removed outdates testcalshims.h, replaced with required includes

Many files: new filecalyearstart.c: removed the functions from here, put them in test-libntp.cMakefile.am: adding support for new testsg_calyearstart.cpp: Rename: tests/libntp/calyearstart.cpp -> tests/libntp/g_calyearstart.cppg_clocktime.cpp: Rename: tests/libntp/clocktime.cpp -> tests/libntp/g_clocktime.cpptest-libntp.h: added headers for new functionstest-libntp.c: moved the functions which 3 tests use into this filerun-test-calyearstart.c: minor update

authkeys.c: added code which runs init_auth() only in the 1st setUp, prevents segfaultgenerate_test_runner.rb: removed init_lib() and init_auth() from here. Put it into setUp() in the test, but it should be run only once

removed some spaces from Makefile.am, removed init_auth from setUp, because every test was calling it. Added init_auth inside run-test-authkeys.c. This is aproblem because I had to modify an autogenerated file!

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.

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.hModified 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.

ntp.h, ntp_proto.c: Don't do arithmetic on NULL pointer when we have a real pointer to usentp_parser.y, ntp_config.c: A set of no-op pedantic changes inspired by FlexeLints complaints, while looking for ways to make the simulator work again:

Add prototype for yyparser() until bison joins the century of the fruit-bat. Make some functions static. Spell NTP_INSIST() INSIST() Deal with "SIM-only" stuff in ntp_parser.y rather than later. Mark knowingly unused arguments Signed/Unsigned/Long fixes to constants. Const char* argument to fprintf(3).ntp_assert.h: Use systems assert(3) for FlexeLint analysis

Support C99 exact size int types in a way which is compatible with the upcomingversion of libopts which will not #include <inttypes.h> unconditionally anymore.Fixes the build errors under Windows reported in [Bug 2321].

Linux 2.6.26 and earlier will fail libevent's timerfd_create() call due to nonzero flags, yet some systems using that version have the nonworking flags in their header files (Debian Lenny). Do not spew warnings in regress output in that case, and set epollop->timerfd = -1. Suggested by Nick Mathewson.

[Bug 2141] handle_sigio() calls get_systime(), which must be reentrant when SIGIO is used. Sanity checks relative to the prior get_systime() are disabled in ntpd on systems with signaled I/O, but active in sntp and ntpdate.

Restore accidentally-removed "parsetime" local variable declaration in refclock_parse.c stream_receive().Remove Windows-specific code from indicate_refclock_packet() as it is now used only on non-Windows systems.process_refclock_packet() is used only on Windows, #ifdef away elsewhere.

Move refclock-specific scheduled timer code under #ifdef REFCLOCK and move "action" and "nextaction" data for same from struct peer to struct refclockproc. These provide a way to schedule a callback some seconds in the future.

Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is believed to provide all functionality ntpdc did, and uses a less- fragile protocol that's safer and easier to maintain. If you do find some management via ntpdc is needed, you can use "enable mode7" in the ntpd configuration.

ntpq mrulist shows intermediate counts every five seconds while retrieving list, and allows Ctrl-C interruption of the retrieval, showing the incomplete list as retrieved. Reduce delay between successive mrulist retrieval queries from 30 to 5 msec. Do not give up mrulist retrieval when a single query times out.

[Bug 2019] Allow selection of cipher for private key files.ntp-keygen private key cipher default now triple-key triple DES CBC.ntp-keygen on Windows XP and later systems will now create links expected by ntpd. They are hardlinks on Windows, soft on POSIX.

ntp-keygen -M is intended to ignore all other defaults and options, so do not attempt to open existing Autokey host certificate before generating symmetric keys and terminating.Restore IFF, MV, and GQ identity parameter filename convention to ntpkey_<scheme>par_<group/host> in ntpd, matching ntp-keygen.Change some error logging to syslog to ignore logconfig mask, such as reporting PPSAPI failure in NMEA and WWVB refclocks.Conditionalize NMEA serial open message under clockevent.Send all peer variables to trappers in report_event().

[Bug 2009] cleanup warning about adj_systime() returning no value.[Bug 2020] Expand ntp-keygen-opts.def explanations of host name and group name options and how they affect output, rename -i long form from --issuer-name to --ident to match reality.

Actually use long long for (u_)int64 by correcting spelling of SIZEOF_LONG_LONG in ntp_types.h.Require Visual C++ 2005 or later compilers in Windows port.Force .exe minimum Windows version to 0x0400 to allow NT4 in vs2005/*.vcproj files.

Attempt to fix libevent "make distcheck" failure related to read-onlysrcdir and event_rpcgen.py by avoiding creating stub regress.gen.h andregress.gen.c in the build directory when $srcdir has both already.

Update libevent to 2.1 HEAD as of merge of 2.0.13-stable-dev. (applies to prior cset)Match addr_eqprefix() sizeof and memcpy destination to make it clear to static analysis that there is no buffer overrun (CID 402).

[Bug 1927] io_closeclock() should purge pending recvbufs.Use acts_close() in acts_shutdown() to avoid leaving a stale lockfile if unpeered via runtime configuration while the modem is open.Correct acts_close() test of pp->io.fd to see if it is open.

Change "pool DNS" messages from msyslog to debug trace output.Prefer LOCAL and ACTS drivers to orphan parent peer as documented.Include LOCAL and ACTS drivers marked prefer in candidate list.Remove unused FLAG_SYSPEER from peer->status.Respect "tos orphanwait 0" at startup. Previously there was an unconditional 300 s. startup orphanwait, though other values were respected for subsequent orphan wait periods after no_sys_peer events.Apply "tos orphanwait" (def. 300 seconds) to LOCAL and ACTS reference clock drivers, in addition to orphan parent operation. LOCAL and ACTS are not selectable during the orphanwait delay at startup and after each no_sys_peer event. This prevents a particular form of clock- hopping, such as using LOCAL briefly at startup before remote peers are selectable. This fixes the issue reported in [Bug 988].[Bug 988] Local clock eats up -g option, so ntpd stops with large initial time offset.

Use _mkgmtime() as timegm() in the Windows port, rather than libntp/mktime.c's timegm(). Fixed [Bug 1875] on Windows using the old asn2ntp() code from before 4.2.7p147.ntp_crypto.c string buffer safety.Remove use of MAXFILENAME in mode 7 (ntpdc) on-wire structs.Change ntpd MAXFILENAME from 128 to 256 to match ntp-keygen.

ChangeLog entry for prior cset.String buffer safety cleanup, converting to strlcpy() and strlcat().Use utmpname() before pututline() so repeated steps do not accidentally record into wtmp where utmp was intended.Use setutent() before each pututline() including first.

String buffer safety cleanup, converting to strlcpy() and strlcat().Use utmpname() before pututline() so repeated steps do not accidentally record into wtmp where utmp was intended.Use setutent() before each pututline() including first.

Remove "signal_no_reset: signal 17 had flags 4000000" logging, as it indicates no problem and is interpreted as an error. Previously some bits had been ignored one-by-one, but Linux SA_RESTORER definition is unavailable to user headers.

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.

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().

[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.

[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.

Attempt typical subpackage approach for libeventsntp test cleanupIPv6 hackerySplit up ntp_lib.m4 into smaller, more specific subsetsUse {step,adj}_systime from libntp. Use EX_* codes for exit status.libevent cleanuplibevent upgradeMove 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.hhp-ux portability fixportabilityAllow 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 buildlibntp autoconf macro cleanupMove "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 > 0Issue 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 sntpCrib 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 -uctimeoutRemove 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 macrosClean up AC_DEFINE and AC_DEFINE_UNQUOTED arg quoting in openldap*.m4add a timeout for test-eof.c as it may hang under HP-UX 10.20Use 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_CHECKUse 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_lenMove things used by libntp from top-level configure.ac to NTP_LIBNTP and NTP_IPV6Change "forked worker child (pid 0)" from msyslog() to DPRINTF().Change initial socket boundary message from DEBUG-only msyslog() to DPRINTF().

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.

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.

[Bug 1781] longlong undefined in sntp handle_pkt() on Debian amd64.Bump deps-ver and sntp/deps-ver to force each directory to be cleaned once, to work around build breaks triggered by changing erealloc() and estrdup() from functions to macros.

[Bug 1776] sntp mishandles -t/--timeout and -a/--authentication.Default to silent make rules, override with make V=1 or ./configure --disable-silent-rules.Correct --with-openssl-incdir defaulting with pkg-config.Correct ./build on systems without gtest available.

[Bug 1772] refclock_open() return value check wrong for ACTS.Default --with-openssl-libdir and --with-openssl-incdir to the values from pkg-config, falling back on our usual search paths if pkg-config is not available or does not have openssl.pc on PKG_CONFIG_PATH.Change refclock_open() to return -1 on failure like open().Update all refclock_open() callers to check for fd <= 0 indicating failure, so they work with older and newer refclock_open() and can easily backport.Initialize refclockproc.rio.fd to -1, harmonize refclock shutdown entrypoints to avoid crashing, particularly if refclock_open() fails.Enable tickadj-like taming of wildly off-spec Windows clock using NTPD_TICKADJ_PPM env. var. specifying baseline slew.

[Bug 1764] Palisade driver doesn't build on Linux.Move ntp_control.h variable IDs to ntp_control.c, remove their use by ntpq. They are implementation details private to ntpd. [Bug 597] was caused by ntpq's reliance on these IDs it need not know about.

Add unit tests for msnprintf().move responsibility for adding newline if not present from format_errmsg() to addto_syslog() so that msnprintf() does not also force a trailing newline.Correct corner case of "%\0" in msyslog() and friends.

[Bug 1741] Enable multicast reception on each address (Windows).Minimize local address flip-flopping by avoiding peer_refresh_allinterfaces() if nothing has changed in the interface list since the last scan.Separate handling of scope ID embedded in many in6_addr from ifindex used for IPv6 multicasting ioctls.Add INT_PRIVACY endpt bit flag for IPv6 RFC 4941 privacy addresses.Enable outbound multicast from only one address per interface in the same subnet, and in that case prefer embedded MAC address modified EUI-64 IPv6 addresses first, then static, and last RFC 4941 privacy addresses.Use setsockopt(IP[V6]_MULTICAST_IF) before each send to multicast to select the local source address, using the correct socket isn't enough.

configure.ac: add --disable-autokey, #define AUTOKEY to enable future support for building without Autokey, but with OpenSSL for its digest algorithms (hash functions). Code must be modified to use #ifdef AUTOKEY instead of #ifdef OPENSSL where appropriate to complete this.include/ntp_crypto.h: make assumption AUTOKEY implies OPENSSL explicit.

[Bug 1325] unreachable code in sntp recv_bcst_data().[Bug 1459] sntp MD5 authentication does not work with ntpd.Many sntp fixes from Nelson Boyard: 1. sntp properly handles hex key strings in the keyfile, instead of just treating the text as binary strings. 2. sntp handles SHA1 as well as MD5. 3. If the key file contains more than one key, sntp can use keys other than the first one in the file. 4. sntp computes the MAC using the key, then the data (was other way). 5. sntp handles responses with extensions now. 6. sntp implements the -b (broadcast/multicast) option. Tested. The -b option takes an argument which is the broadcast/multicast address on which to listen for packets. The command still requires a host address at the end of the command line. This is the address expected to do the broadcasting/multicasting. 7. sntp correctly handles network-order key IDs on little-endian. 8. Eliminated a huge amount of code duplication between the sntp unicast and multicast code paths, creating a single process_pkt() function that is used for both paths after the packet is received. 9. The -t timeout option now works with both unicast and multicast. Previously it worked with neither. It wasn't coded for unicast, and was incorrectly coded for multicast. 10. In unicast mode, the requests are sent MACed using the key specified with the -a command line option. 11. Cleaned up indentation consistent with the predominant style in the files changed, namely, using tab stop characters and not spaces for indentation. This way, you can set your tab stop spacing as you like it and the indentation looks correct. This was not a big change. The files were mostly consistent before. 12. Eliminated LOTS of blank lines.sntp/configure.ac OpenSSL support now that sntp optionally uses it.Escape unprintable characters in a refid in ntpq -p billboard.

[Bug 1516] unpeer by IP address fails, DNS name works.[Bug 1517] ntpq and ntpdc should verify reverse DNS before use. ntpq and ntpdc now use the following format for showing purported DNS names from IP address "reverse" DNS lookups when the DNS name does not exist or does not include the original IP address among the results: "192.168.1.2 (fake.dns.local)".

ntpq-subs.c: Add ntpq "mrulist limited" and "mrulist kod" support, equivalent to ntpq -c "mrulist resany=0x20" and ntpq -c "mrulist resany=0x400" respectively. Add "r" rate limiting column to mrulist output containing a period, or K for KoD sent in response to last packet, or L for no response to last packet due to rate limiting. These are redundant with bits 0x400 and 0x20 in the rstr column and treated differently than other restrict bits, reflecting not if the restriction bit is enabled for the remote address, but if RES_KOD or RES_LIMITED handling was triggered by the last packet from them. it.ntp.h, ntpdc_ops.c, ntp_proto.c, ntp_config.c: rename RES_TIMEOUT to RES_FLAKE to reflect v4 use (as a flakeway which drops 10% of incoming packets from matching addresses).ntp_intres.c: rename RES_TIMEOUT to RES_FLAKE to reflect v4 use (as a flakeway which drops 10% of incoming packets from matching addresses), eliminating conflict with RES_TIMEOUT provided by some systems DNS headers.

Fetch 32 rows initially in ntpq -cmrulist.Tweak runtime adjustment of limit in response to errors, now will grow number of rows 50% each success and cut it in half each failure.Sleep 0.3s instead of 1s between requests in ntpq -cmrulist on platforms that have nanosleep() or similar.

ntpq-subs.c: use "sort=lstint" and "sort=-lstint" for default and reverse default sort order of "ntpq -c mrulist"ntp_control.c: Attempt to enforce clients ignoring unknown tag=value pairs in CTL_OP_READ_MRU (ntpq -c mrulist) by including a randomly- named tag in the last row.

Add "sort=avgint" option to mrulist: ntpq -c "mru sort=avgint".Add "sort=addr" option to mrulist to sort by remote address.Remove check for qsort() using other than void *, ANSI C is required and it ensures void * for qsort().

ntp_proto.c: cull from preemptibles randomly as well as when unreachable long enough.work_thread.c: increase blocking_workitems max queue depth to 128 on Windowsntp_control.h: whitespace onlynt_clockstuff.c: expose performance counter drift as ctr_frequency sysvar.ntp_intres.c, ntpd.h, ntp_config.c: add retry argument to getaddrinfo_sometime() so that pool lookups can be one-shot.ntp_peer.c: test speer->flags not peer->flags for FLAG_PREEMPT

This is a group of 4 patches that (1) replace blanks with tabs in the source. (2) provide a cleaner solution to turning FLAG_PPS on/off in oncore_get_timestamp. (3) change LOG_INFO -> LOG_DEFAULT for one message, reducing the extraneous message in the messages log. (4) an implementation of [Bug1390] initially provided by Russell Yount, to turn the PPS signal on/off. Note that this does NOT affect timekeeping.

[Bug 1483] AI_NUMERICSERV undefined in 4.2.7p20.Maintain and use linked list of associations (struct peer) in ntpd, avoiding walking 128 hash table entries to iterate over peers.Remove more workarounds unneeded since we require ISO C90 AKA ANSI C: - remove fallback implementations for memmove(), memset, strstr(). - do not test for atexit() or memcpy().Collapse a bunch of code duplication in ntpd/ntp_restrict.c added with support for IPv6.Correct some corner case failures in automatically enabling the MRU list if any "restrict ... limited" is in effect, and in disabling MRU maintenance. (ntp_monitor.c, ntp_restrict.c)Reverse the internal sort order of the address restriction lists, but preserve the same behavior. This allows removal of special-case code related to the default restrictions and more straightforward lookups of restrictions for a given address (now, stop on first match).Move ntp_restrict.c MRU doubly-linked list maintenance code into ntp_lists.h macros, allowing more duplicated source excision.Correct Windows port's refclock_open() to return 0 on failure not -1.Correct CHU, dumbclock, and WWVB drivers to check for 0 returned from refclock_open() on failure.Repair ntpdate.c to handle no longer testing HAVE_TIMER_SETTIME.Do not reference peer_node/unpeer_node after freeing when built with --disable-saveconfig and using DNS.

[Bug 47] Debugging and logging do not work after a fork.[Bug 1010] getaddrinfo() could block and thus should not be called by the main thread/process.#include <config.h> from all .c files and do not include it from any .h files. Previously config.h appeared a dozen times in preprocessed output of some .c files.handle relative path to logfile correctly despite re-opening after fork() with a different curdir.eliminate hand-crafted byte-swapping code from refclock_palisade.c in preference to using htonl(), htons(). Tested by Fernando Hauscarriaga.

[Bug 1446] 4.2.7p6 requires autogen, missing ntpd.1, *.texi, *.menu. Applies to prior Makefile.am changesets pulled from ntp-stable, where there is no ChangeLog entry as no tarball rolled with the bug.

[Bug 1142] nodebug builds shed no light on -d, -D option failure.[Bug 1179] point out the problem with -i/--jaildir and -u/--user when they are disabled by configure.-4/-6 are not equivalent in the libopts sense

[Bug 1381] Version .deps generated include file dependencies to allow known dependecy-breaking changes to force .deps to be cleaned, triggered by changing the contents of deps-ver and/or sntp/deps-ver.

[Bug 1343] sntp illegal C does not compile on Solaris 7.Windows VC9/VS2008: use generic library name libeay32.lib instead of variants encoding build type to match what you get building OpenSSL from source.

CIDs 94-99 make it more clearly impossible for sock_hash() to return a negative number.CID 105, 106 ensure ntpdc arrays are not overrun even if callers misbehave.CID 113 use va_end() in refclock_true.c true_debug().

Updated build and flock-build scripts. flock-build --one is a way to perform a flock-build compatible solitary build, handy for a repo clone's first build on a machine with autoconf, automake, etc.Compiling ntp_parser.y using BSD make correctly places ntp_parser.h in the top-level ntpd directory instead of A.*/ntpd.bootstrap script updated to remove potentially stale .deps dirs.

[Bug 1243] MD5auth_setkey zero-fills key from first zero octet.[Bug 1295] leftover fix, do not crash on exit in free_config_trap() when "trap 1.2.3.4" is used without any further options.CID 79: kod_init_kod_db() fails to fclose(db_s) in two error paths.CID 80: attempt to quiet Coverity false positive re: leaking "reason" in main().CID 81: savedconfig leaked in save_config().

[Bug 1281] Build ntpd on Windows without big SDK download, burn, and install by checking in essentially unchanging messages.mc build products to avoid requiring mc.exe, which is not included with VC++ 2008 EE.

First pass at quieting Veracode static analysis warnings, mostly buffer manipulation that is already safe but used unsafe interface functions such as strcpy() and sprintf().use emalloc(), estrdup() where appropriate.