[ntpsec commit] Commit the report on the config symbol audit...
Eric S. Raymond
esr at ntpsec.org
Sat Oct 3 18:31:54 UTC 2015
Module: ntpsec
Branch: master
Commit: 21c1c5cbe3ea6febcc63b549135973f80ea1a9d9
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=21c1c5cbe3ea6febcc63b549135973f80ea1a9d9
Author: Eric S. Raymond <esr at thyrsus.com>
Date: Sat Oct 3 14:30:54 2015 -0400
Commit the report on the config symbol audit...
...and fix minor glitches it revealed.
---
devel-docs/README | 3 +++
libparse/parse_conf.c | 2 +-
ntpd/refclock_true.c | 12 ++++++------
pylib/refclock.py | 5 +++--
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/devel-docs/README b/devel-docs/README
index 1d86a29..07c06f8 100644
--- a/devel-docs/README
+++ b/devel-docs/README
@@ -16,6 +16,9 @@ hacking.txt::
dot.emacs::
C-mode indentation rules for code "Just the way Dave likes it".
+ifdex-ignores::
+ Lists and explains a large number of internal configuration symbols.
+
TODO::
List of items the NTP developers are working on.
diff --git a/libparse/parse_conf.c b/libparse/parse_conf.c
index e96404f..03210ff 100644
--- a/libparse/parse_conf.c
+++ b/libparse/parse_conf.c
@@ -81,7 +81,7 @@ extern clockformat_t clock_wharton_400a;
extern clockformat_t clock_varitext;
#endif
-#ifdef CLOCK_SEL240X
+0#ifdef CLOCK_SEL240X
extern clockformat_t clock_sel240x;
#endif
diff --git a/ntpd/refclock_true.c b/ntpd/refclock_true.c
index ddd1cd2..07b4eb0 100644
--- a/ntpd/refclock_true.c
+++ b/ntpd/refclock_true.c
@@ -32,7 +32,7 @@ extern int async_write(int, const void *, unsigned int);
* to find out if the counter has wrapped around (this happens if more than
* 65535us (65ms) elapses between the PPS event and our being called.)
*/
-#ifdef CLOCK_PPS720
+#ifdef ENABLE_PPS720
# undef min /* XXX */
# undef max /* XXX */
# include <machine/inline.h>
@@ -143,7 +143,7 @@ struct true_unit {
enum true_type type; /* what kind of clock is it? */
int unit; /* save an extra copy of this */
FILE *debug; /* debug logging file */
-#ifdef CLOCK_PPS720
+#ifdef ENABLE_PPS720
int pcl720init; /* init flag for PCL 720 */
#endif
};
@@ -158,7 +158,7 @@ static void true_poll (int, struct peer *);
static void true_send (struct peer *, const char *);
static void true_doevent (struct peer *, enum true_event);
-#ifdef CLOCK_PPS720
+#ifdef ENABLE_PPS720
static u_long true_sample720 (void);
#endif
@@ -483,7 +483,7 @@ true_receive(
true_doevent(peer, e_TS);
-#ifdef CLOCK_PPS720
+#ifdef ENABLE_PPS720
/* If it's taken more than 65ms to get here, we'll lose. */
if ((pp->sloppyclockflag & CLK_FLAG4) && up->pcl720init) {
l_fp off;
@@ -807,7 +807,7 @@ true_doevent(
/* NOTREACHED */
}
-#ifdef CLOCK_PPS720
+#ifdef ENABLE_PPS720
if ((pp->sloppyclockflag & CLK_FLAG4) && !up->pcl720init) {
/* Make counter trigger on gate0, count down from 65535. */
pcl720_load(PCL720_IOB, PCL720_CTR, i8253_oneshot, 65535);
@@ -859,7 +859,7 @@ true_poll(
pp->polls++;
}
-#ifdef CLOCK_PPS720
+#ifdef ENABLE_PPS720
/*
* true_sample720 - sample the PCL-720
*/
diff --git a/pylib/refclock.py b/pylib/refclock.py
index 81b7b4d..079b09b 100644
--- a/pylib/refclock.py
+++ b/pylib/refclock.py
@@ -128,7 +128,7 @@ refclock_map = {
35: {
"descr": "Conrad Parallel Port Radio Clock",
- "define": "CLOCK__PCF",
+ "define": "CLOCK_PCF",
"file": "pcf"
},
@@ -170,7 +170,7 @@ refclock_map = {
45: {
"descr": "Spectracom TSYNC",
- "define": "CLOCK_TSYNPCI",
+ "define": "CLOCK_TSYNCPCI",
"file": "tsyncpci"
},
@@ -222,6 +222,7 @@ def refclock_config(ctx):
"CLOCK_RAWDCF",
"CLOCK_RCC8000",
"CLOCK_SCHMID",
+ "CLOCK_SEL240X",
"CLOCK_TRIMTAIP",
"CLOCK_TRIMTSIP",
"CLOCK_VARITEXT",
More information about the vc
mailing list