[ntpsec commit] Abolish the dead symbol USE_SNPRINTB. Autoconfigure HAVE_MD5_INIT.
Eric S. Raymond
esr at ntpsec.org
Fri Oct 2 11:02:23 UTC 2015
Module: ntpsec
Branch: master
Commit: f9d03223029950151c1e968f84b0b1497b948cc2
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=f9d03223029950151c1e968f84b0b1497b948cc2
Author: Eric S. Raymond <esr at thyrsus.com>
Date: Fri Oct 2 05:40:47 2015 -0400
Abolish the dead symbol USE_SNPRINTB. Autoconfigure HAVE_MD5_INIT.
It's not completely clear what library we ought to be looking in, but
a false negative just means we fall back on the ISC code so it's
pretty harmless.
---
devel-docs/TODO | 4 ++++
ntpd/ntp_loopfilter.c | 8 --------
pylib/configure.py | 1 +
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/devel-docs/TODO b/devel-docs/TODO
index a98c165..097b5ba 100644
--- a/devel-docs/TODO
+++ b/devel-docs/TODO
@@ -143,6 +143,10 @@ is not yet tested anywhere but in ntpd itself.
* Should tickadj and ntptime merge? ntpstune, anyone?
+* Adapt BSD snprintb into a better dumper for flag words like flash
+codes (throwing out the old-format support) and use it
+systematically to make reports more readable.
+
Hal:
> I think there is some interaction between when the ACTS driver calls and the
> state of other stuff, like the connection to the net. This is probably a
diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c
index 87ee2b1..a1697f6 100644
--- a/ntpd/ntp_loopfilter.c
+++ b/ntpd/ntp_loopfilter.c
@@ -6,9 +6,6 @@
*/
#include <config.h>
-#ifdef USE_SNPRINTB
-# include <util.h>
-#endif
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_unixtime.h"
@@ -190,13 +187,8 @@ 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);
}
diff --git a/pylib/configure.py b/pylib/configure.py
index 2d3755c..ef9a2b0 100644
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -171,6 +171,7 @@ def cmd_configure(ctx):
('getclock', "sys/timers.h"),
('getdtablesize', "unistd.h"), # SVr4, 4.2BSD
('getpassphrase', "stdlib.h"), # Sun systems
+ ('MD5Init', "md5.h", "CRYPTO"),
('ntp_adjtime', "sys/timex.h"), # BSD
('ntp_gettime', "sys/timex.h"), # BSD
('plock', "sys/lock.h"), # OSF/1, SVID[23], XPG2
More information about the vc
mailing list