aboutsummaryrefslogtreecommitdiffstats
path: root/ntpd/refclock_mx4200.c
diff options
context:
space:
mode:
authorOllivier Robert <roberto@FreeBSD.org>2008-08-18 14:26:05 +0000
committerOllivier Robert <roberto@FreeBSD.org>2008-08-18 14:26:05 +0000
commitff717da2cf625e3d07537a93a4c240692fa55bd6 (patch)
tree9dcf618e4446ac2b5fca7d0afe7767382664f0d6 /ntpd/refclock_mx4200.c
parentcce65f439697627afbccf5a67035a957bb4d784a (diff)
downloadsrc-ff717da2cf625e3d07537a93a4c240692fa55bd6.tar.gz
src-ff717da2cf625e3d07537a93a4c240692fa55bd6.zip
Import ntp 4.2.4p5 in the vendor code area. Far too many changes to list here,vendor/ntp/4.2.4p5
please see CommitLog for detailed changes. XXX html/build/hints/solaris.xtra.4095849 is not being imported as it conflicts with the detect-merge-conflict.sh script in our repo.
Notes
Notes: svn path=/vendor/ntp/dist/; revision=181834 svn path=/vendor/ntp/4.2.4p5/; revision=181835; tag=vendor/ntp/4.2.4p5
Diffstat (limited to 'ntpd/refclock_mx4200.c')
-rw-r--r--ntpd/refclock_mx4200.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/ntpd/refclock_mx4200.c b/ntpd/refclock_mx4200.c
index bc694ad0a69a..68150b7c4240 100644
--- a/ntpd/refclock_mx4200.c
+++ b/ntpd/refclock_mx4200.c
@@ -80,13 +80,9 @@ struct ppsclockev {
};
#endif /* ! HAVE_STRUCT_PPSCLOCKEV */
-#ifdef HAVE_TIMEPPS_H
-# include <timepps.h>
-#else
-# ifdef HAVE_SYS_TIMEPPS_H
-# include <sys/timepps.h>
-# endif
-#endif
+#ifdef HAVE_PPSAPI
+# include "ppsapi_timepps.h"
+#endif /* HAVE_PPSAPI */
/*
* This driver supports the Magnavox Model MX 4200 GPS Receiver
@@ -1524,15 +1520,15 @@ mx4200_pps(
if (time_pps_fetch(up->pps_h, PPS_TSFMT_TSPEC, &(up->pps_i),
&timeout) < 0) {
mx4200_debug(peer,
- "mx4200_pps: time_pps_fetch: serial=%d, %s\n",
- up->pps_i.assert_sequence, strerror(errno));
+ "mx4200_pps: time_pps_fetch: serial=%ul, %s\n",
+ (unsigned long)up->pps_i.assert_sequence, strerror(errno));
refclock_report(peer, CEVNT_FAULT);
return(1);
}
if (temp_serial == up->pps_i.assert_sequence) {
mx4200_debug(peer,
- "mx4200_pps: assert_sequence serial not incrementing: %d\n",
- up->pps_i.assert_sequence);
+ "mx4200_pps: assert_sequence serial not incrementing: %ul\n",
+ (unsigned long)up->pps_i.assert_sequence);
refclock_report(peer, CEVNT_FAULT);
return(1);
}
@@ -1544,8 +1540,8 @@ mx4200_pps(
if (up->pps_i.assert_sequence == up->lastserial) {
mx4200_debug(peer, "mx4200_pps: no new pps event\n");
} else {
- mx4200_debug(peer, "mx4200_pps: missed %d pps events\n",
- up->pps_i.assert_sequence - up->lastserial - 1);
+ mx4200_debug(peer, "mx4200_pps: missed %ul pps events\n",
+ up->pps_i.assert_sequence - up->lastserial - 1UL);
}
refclock_report(peer, CEVNT_FAULT);
}
@@ -1576,6 +1572,7 @@ mx4200_debug(peer, fmt, va_alist)
char *fmt;
#endif /* __STDC__ */
{
+#ifdef DEBUG
va_list ap;
struct refclockproc *pp;
struct mx4200unit *up;
@@ -1600,6 +1597,7 @@ mx4200_debug(peer, fmt, va_alist)
va_end(ap);
}
+#endif
}
/*