+* [Bug 1932] libevent/util_internal.h builtin_expect compile error with
+ gcc 2.95.
+* Use 64-bit scalars in LFPTOD() and DTOLFP() on more platforms by
+ conditionalizing on HAVE_U_INT64 rather than UINT64_MAX.
(4.2.7p169) 2011/05/18 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1933] WWVB/Spectracom driver timestamps LFs, not CRs.
(4.2.7p168) 2011/05/16 Released by Harlan Stenn <stenn@ntp.org>
* 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.
-* 4.2.7p164 documentation updates regarding 'tos orphanwait' expanded scope.
+* 4.2.7p164 documentation updates re: 'tos orphanwait' expanded scope.
(4.2.7p166) 2011/05/13 Released by Harlan Stenn <stenn@ntp.org>
* If we have local overrides for autogen template files, use them.
* Convert more of the sntp-opt.def documentation from man to mdoc.
#define FRAC 4294967296.0 /* 2^32 as a double */
-#ifdef UINT64_MAX /* use 64 bit integers if available */
+#ifdef HAVE_U_INT64 /* use 64 bit integers if available */
-#define M_DTOLFP(d, r_ui, r_uf) /* double to l_fp */ \
+#include <math.h> /* ldexp() */
+
+#define M_DTOLFP(d, r_ui, r_uf) /* double to l_fp */ \
do { \
- uint64_t q_tmp; double d_tmp; \
+ double d_tmp; \
+ u_int64 q_tmp; \
if ((d_tmp = (d)) < 0.0) \
- q_tmp = ~(uint64_t)ldexp(-d_tmp, 32) + 1; \
+ q_tmp = ~(u_int64)ldexp(-d_tmp, 32) + 1; \
else \
- q_tmp = (uint64_t)ldexp(d_tmp, 32); \
+ q_tmp = (u_int64)ldexp(d_tmp, 32); \
(r_uf) = (u_int32)q_tmp; \
(r_ui) = (u_int32)(q_tmp >> 32); \
} while(0)
#define M_LFPTOD(r_ui, r_uf, d) /* l_fp to double */ \
do { \
- uint64_t q_tmp = ((uint64_t)(r_ui) << 32) + (uint64_t)(r_uf); \
+ u_int64 q_tmp; \
+ q_tmp = ((u_int64)(r_ui) << 32) + (u_int64)(r_uf); \
if (M_ISNEG((r_ui), (r_uf))) \
d = -ldexp((double)(~q_tmp + 1), -32); \
else \
#else /* use only 32 bit unsigned values */
-#define M_DTOLFP(d, r_ui, r_uf) /* double to l_fp */ \
+#define M_DTOLFP(d, r_ui, r_uf) /* double to l_fp */ \
do { \
double d_tmp; \
if ((d_tmp = (d)) < 0) { \
do { \
u_int32 l_thi, l_tlo; \
l_thi = (r_ui); l_tlo = (r_uf); \
- if (M_ISNEG(l_thi, l_tlo)) { \
+ if (M_ISNEG(l_thi, l_tlo)) { \
M_NEG(l_thi, l_tlo); \
(d) = -((double)l_thi + (double)l_tlo / FRAC); \
} else { \