2000-01-14 Harlan Stenn <stenn@whimsy.udel.edu>
+ * ntpd/refclock_oncore.c (oncore_start): Only dance with the
+ pps_device if it's there.
+ From: reg@dwf.com
+
+ * configure.in: ONCORE is OK if ac_cv_hdr_def_tiocdcdtimestamp=yes
+
* build: Just overwrite the log file each time; sometimes NFS goes
a little goofy.
# there is NO way that I can tell to tell if a given OS is using timespec or
# timeval so just set it here for the one case that is KNOWN to use timespec.
-case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h" in
+case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h$ac_cv_hdr_def_tiocdcdtimestamp" in
*yes*)
cat >> confdefs.h <<\EOF
#define HAVE_PPSAPI 1
# there is NO way that I can tell to tell if a given OS is using timespec or
# timeval so just set it here for the one case that is KNOWN to use timespec.
-case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h" in
+case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h$ac_cv_hdr_def_tiocdcdtimestamp" in
*yes*)
AC_DEFINE(HAVE_PPSAPI)
ac_cv_var_oncore_ok=yes
exit(1);
}
- if (stat(pps_device, &stat1)) {
- perror("ONCORE: stat pps_device");
- return(0);
- }
-
- /* must have hardpps ON, and fd2 must be the same device as on the pps line */
-
- if (pps_hardpps && ((stat1.st_dev == stat2.st_dev) && (stat1.st_ino == stat2.st_ino))) {
- int i;
-
- if (instance->assert)
- i = PPS_CAPTUREASSERT;
- else
- i = PPS_CAPTURECLEAR;
-
- if (i&mode) {
- if (time_pps_kcbind(instance->pps_h, PPS_KC_HARDPPS, i,
- PPS_TSFMT_TSPEC) < 0) {
- msyslog(LOG_ERR,
- "refclock_ioctl: time_pps_kcbind failed: %m");
- return (0);
+ if (pps_device) {
+ if (stat(pps_device, &stat1)) {
+ perror("ONCORE: stat pps_device");
+ return(0);
+ }
+
+ /* must have hardpps ON, and fd2 must be the same device as on the pps line */
+
+ if (pps_hardpps && ((stat1.st_dev == stat2.st_dev) && (stat1.st_ino == stat2.st_ino))) {
+ int i;
+
+ if (instance->assert)
+ i = PPS_CAPTUREASSERT;
+ else
+ i = PPS_CAPTURECLEAR;
+
+ if (i&mode) {
+ if (time_pps_kcbind(instance->pps_h, PPS_KC_HARDPPS, i,
+ PPS_TSFMT_TSPEC) < 0) {
+ msyslog(LOG_ERR,
+ "refclock_ioctl: time_pps_kcbind failed: %m");
+ return (0);
+ }
}
}
}
--- /dev/null
+/**************************************************************
+ * Dummy Header for Unix to Windows NT portability
+ * Created for NTP package
+ **************************************************************/
--- /dev/null
+/**************************************************************
+ * Dummy Header for Unix to Windows NT portability
+ * Created for NTP package
+ **************************************************************/