[ntpsec commit] Debug symbol namespace moves, and a fix for a small but fatal typo.
Eric S. Raymond
esr at ntpsec.org
Sat Oct 3 19:33:18 UTC 2015
Module: ntpsec
Branch: master
Commit: 727c0be39de10c0a53a95f19cf80b43345a554bb
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=727c0be39de10c0a53a95f19cf80b43345a554bb
Author: Eric S. Raymond <esr at thyrsus.com>
Date: Sat Oct 3 15:32:27 2015 -0400
Debug symbol namespace moves, and a fix for a small but fatal typo.
---
devel-docs/ifdex-ignores | 4 ++--
libparse/ieee754io.c | 30 +++++++++++++++---------------
libparse/parse_conf.c | 2 +-
ntpd/refclock_true.c | 2 +-
4 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/devel-docs/ifdex-ignores b/devel-docs/ifdex-ignores
index 09ee1f1..0c3aed7 100644
--- a/devel-docs/ifdex-ignores
+++ b/devel-docs/ifdex-ignores
@@ -56,10 +56,10 @@ ISC_LIST_CHECKINIT # Debugging flag
ISC_PLATFORM_USEBACKTRACE # Use the ISC backtrace code on assertions
ISC_UTIL_TRACEON # Enables trace code in ISC service routines.
HAVE_LIBCTRACE # Some random C tracing lib - NTP Classic never sets this
-LIBDEBUG # Enable debugging in the parse library.
+DEBUG_PARSELIB # Enable debugging in the parse library.
MKREPRO_DATE # Force the build date used for time stepping
NTP_DEBUG_LISTS # Debug list handling
-PPS720_DEBUG # Only in refclock_true.c
+DEBUG_PPS720 # Only in refclock_true.c
# AIX and Solaris had at one time a bug in the way they declared
# PTHREAD_ONCE_INIT. This enables a workaround. It may no longer be
diff --git a/libparse/ieee754io.c b/libparse/ieee754io.c
index e1c1476..daecac0 100644
--- a/libparse/ieee754io.c
+++ b/libparse/ieee754io.c
@@ -41,7 +41,7 @@ static unsigned char get_byte (unsigned char *, offsets_t, int *);
static void put_byte (unsigned char *, offsets_t, int *, unsigned char);
#endif
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
#include "lib_strbuf.h"
@@ -125,7 +125,7 @@ get_byte(
unsigned char val;
val = *(bufp + offset[*fieldindex]);
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
if (debug > 4)
printf("fetchieee754: getbyte(0x%08x, %d) = 0x%02x\n", (unsigned int)(bufp)+offset[*fieldindex], *fieldindex, val);
#endif
@@ -168,7 +168,7 @@ fetch_ieee754(
u_long mantissa_high;
u_long characteristic;
long exponent;
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
int length;
#endif
unsigned char val;
@@ -177,7 +177,7 @@ fetch_ieee754(
switch (size)
{
case IEEE_DOUBLE:
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
length = 8;
#endif
mbits = 52;
@@ -186,7 +186,7 @@ fetch_ieee754(
break;
case IEEE_SINGLE:
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
length = 4;
#endif
mbits = 23;
@@ -235,7 +235,7 @@ fetch_ieee754(
default:
return IEEE_BADCALL;
}
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
if (debug > 4)
{
double d;
@@ -399,7 +399,7 @@ put_ieee754(
)
{
l_fp outlfp;
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
unsigned int sign;
unsigned int bias;
#endif
@@ -408,7 +408,7 @@ put_ieee754(
int msb;
u_long mantissa_low = 0;
u_long mantissa_high = 0;
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
u_long characteristic = 0;
long exponent;
#endif
@@ -422,7 +422,7 @@ put_ieee754(
case IEEE_DOUBLE:
/*length = 8;*/
mbits = 52;
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
bias = 1023;
#endif
/*maxexp = 2047;*/
@@ -431,7 +431,7 @@ put_ieee754(
case IEEE_SINGLE:
/*length = 4;*/
mbits = 23;
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
bias = 127;
#endif
/*maxexp = 255;*/
@@ -447,20 +447,20 @@ put_ieee754(
if (L_ISNEG(&outlfp))
{
L_NEG(&outlfp);
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
sign = 1;
#endif
}
else
{
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
sign = 0;
#endif
}
if (L_ISZERO(&outlfp))
{
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
exponent = mantissa_high = mantissa_low = 0; /* true zero */
#endif
}
@@ -519,7 +519,7 @@ put_ieee754(
}
}
-#ifdef LIBDEBUG
+#ifdef DEBUG_PARSELIB
exponent = msb - 32;
characteristic = exponent + bias;
@@ -531,7 +531,7 @@ put_ieee754(
}
-#if defined(DEBUG) && defined(LIBDEBUG)
+#if defined(DEBUG) && defined(DEBUG_PARSELIB)
#include <stdlib.h>
int main(
diff --git a/libparse/parse_conf.c b/libparse/parse_conf.c
index 03210ff..e96404f 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
-0#ifdef CLOCK_SEL240X
+#ifdef CLOCK_SEL240X
extern clockformat_t clock_sel240x;
#endif
diff --git a/ntpd/refclock_true.c b/ntpd/refclock_true.c
index 07b4eb0..cdfb269 100644
--- a/ntpd/refclock_true.c
+++ b/ntpd/refclock_true.c
@@ -879,7 +879,7 @@ true_sample720(void)
return (0);
}
f = (65536 - pcl720_read(PCL720_IOB, PCL720_CTR));
-#ifdef PPS720_DEBUG
+#ifdef DEBUG_PPS720
msyslog(LOG_DEBUG, "PCL-720: %luus", f);
#endif
return (f);
More information about the vc
mailing list