From: Harlan Stenn Date: Fri, 14 Jan 2000 08:26:06 +0000 (-0000) Subject: ChangeLog, configure, configure.in: X-Git-Tag: NTP_4_0_99_A~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98957d8c683069fc0b5df6c263d447cb37a60559;p=thirdparty%2Fntp.git ChangeLog, configure, configure.in: * configure.in: ONCORE is OK if ac_cv_hdr_def_tiocdcdtimestamp=yes in_system.h: Added dummy in_system.h "All systems have it :)" ip.h: These little files save a bunch of ifdef WINNT's and stay hidden in the ports subdirectory. ChangeLog, refclock_oncore.c: * ntpd/refclock_oncore.c (oncore_start): Only dance with the pps_device if it's there. From: reg@dwf.com bk: 387edd9eRrcxl8QA8-CQ3XBhYErJ7g --- diff --git a/ChangeLog b/ChangeLog index 801e42804f..812d6d9896 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2000-01-14 Harlan Stenn + * 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. diff --git a/configure b/configure index 4300b6466b..7394acacb6 100755 --- a/configure +++ b/configure @@ -7924,7 +7924,7 @@ echo "$ac_t""$ntp_ok" 1>&6 # 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 diff --git a/configure.in b/configure.in index 62699fce8e..6a7eb72140 100644 --- a/configure.in +++ b/configure.in @@ -1410,7 +1410,7 @@ AC_MSG_RESULT($ntp_ok) # 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 diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c index 6ecf62a3c2..e0ba177cc1 100644 --- a/ntpd/refclock_oncore.c +++ b/ntpd/refclock_oncore.c @@ -512,27 +512,29 @@ oncore_start( 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); + } } } } diff --git a/ports/winnt/include/netinet/in_system.h b/ports/winnt/include/netinet/in_system.h new file mode 100644 index 0000000000..5e15997373 --- /dev/null +++ b/ports/winnt/include/netinet/in_system.h @@ -0,0 +1,4 @@ +/************************************************************** + * Dummy Header for Unix to Windows NT portability + * Created for NTP package + **************************************************************/ diff --git a/ports/winnt/include/netinet/ip.h b/ports/winnt/include/netinet/ip.h new file mode 100644 index 0000000000..5e15997373 --- /dev/null +++ b/ports/winnt/include/netinet/ip.h @@ -0,0 +1,4 @@ +/************************************************************** + * Dummy Header for Unix to Windows NT portability + * Created for NTP package + **************************************************************/