From: Harlan Stenn Date: Sun, 10 Oct 1999 02:23:55 +0000 (-0000) Subject: ntp_refclock.c, refclock_atom.c, refclock_oncore.c: X-Git-Tag: PRE_NT_991015~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c253602f3a2f87d911efeefeafbb4ec5abb8fb4c;p=thirdparty%2Fntp.git ntp_refclock.c, refclock_atom.c, refclock_oncore.c: * ntpd/refclock_oncore.c: * ntpd/refclock_atom.c: * ntpd/ntp_refclock.c: PPS API code updated to the current spec From: Dave Mills ChangeLog, configure, configure.in, Makefile.in: * configure.in (ac_cv_make_tickadj): Don't make tickadj starting with solaris2.5 Requested by: Dave Mills bk: 37fff8bbRXVxWaPvyZpMYhhEf-cKsA --- diff --git a/ChangeLog b/ChangeLog index ca191769e5..d1102f72af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +1999-10-09 Harlan Stenn + + * ntpd/refclock_oncore.c: + * ntpd/refclock_atom.c: + * ntpd/ntp_refclock.c: + PPS API code updated to the current spec + From: Dave Mills + + * configure.in (ac_cv_make_tickadj): Don't make tickadj starting + with solaris2.5 + Requested by: Dave Mills + 1999-10-04 Harlan Stenn * configure.in: We might need -lsocket for the -lnsl check. diff --git a/configure b/configure index 6718fbc278..be34843b2b 100755 --- a/configure +++ b/configure @@ -9520,17 +9520,24 @@ case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in ;; esac -# tickadj is pretty useless on newer versions of ReliantUNIX -# Do not bother case "$target" in mips-sni-sysv4*) + # tickadj is pretty useless on newer versions of ReliantUNIX + # Do not bother ac_cv_make_tickadj=no ;; + *-*-solaris2*) + # DLM says tickadj is a no-no starting with solaris2.5 + case "$target" in + *-*-solaris2.0-4*) ;; + *) ac_cv_make_tickadj=no ;; + esac + ;; esac echo $ac_n "checking if we want and can make the tickadj utility""... $ac_c" 1>&6 -echo "configure:9534: checking if we want and can make the tickadj utility" >&5 +echo "configure:9541: checking if we want and can make the tickadj utility" >&5 if eval "test \"\${ac_cv_make_tickadj+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9546,7 +9553,7 @@ esac echo $ac_n "checking if we want and can make the ntptime utility""... $ac_c" 1>&6 -echo "configure:9550: checking if we want and can make the ntptime utility" >&5 +echo "configure:9557: checking if we want and can make the ntptime utility" >&5 if eval "test \"\${ac_cv_make_ntptime+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9575,7 +9582,7 @@ case "$ac_cv_make_ntptime" in esac echo $ac_n "checking if we want UDP wildcard delivery""... $ac_c" 1>&6 -echo "configure:9579: checking if we want UDP wildcard delivery" >&5 +echo "configure:9586: checking if we want UDP wildcard delivery" >&5 if eval "test \"\${ac_cv_var_udp_wildcard_delivery+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9654,7 +9661,7 @@ case "$host" in esac echo $ac_n "checking if we should always slew the time""... $ac_c" 1>&6 -echo "configure:9658: checking if we should always slew the time" >&5 +echo "configure:9665: checking if we should always slew the time" >&5 if eval "test \"\${ac_cv_var_slew_always+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9694,7 +9701,7 @@ EOF esac echo $ac_n "checking if we should step and slew the time""... $ac_c" 1>&6 -echo "configure:9698: checking if we should step and slew the time" >&5 +echo "configure:9705: checking if we should step and slew the time" >&5 if eval "test \"\${ac_cv_var_step_slew+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9737,7 +9744,7 @@ EOF esac echo $ac_n "checking if ntpdate should step the time""... $ac_c" 1>&6 -echo "configure:9741: checking if ntpdate should step the time" >&5 +echo "configure:9748: checking if ntpdate should step the time" >&5 if eval "test \"\${ac_cv_var_ntpdate_step+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9768,7 +9775,7 @@ EOF esac echo $ac_n "checking if we should sync TODR clock every hour""... $ac_c" 1>&6 -echo "configure:9772: checking if we should sync TODR clock every hour" >&5 +echo "configure:9779: checking if we should sync TODR clock every hour" >&5 if eval "test \"\${ac_cv_var_sync_todr+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9801,7 +9808,7 @@ EOF esac echo $ac_n "checking if we should avoid kernel FLL bug""... $ac_c" 1>&6 -echo "configure:9805: checking if we should avoid kernel FLL bug" >&5 +echo "configure:9812: checking if we should avoid kernel FLL bug" >&5 if eval "test \"\${ac_cv_var_kernel_fll_bug+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index 0dd12e7c29..49aeeb7387 100644 --- a/configure.in +++ b/configure.in @@ -2610,12 +2610,19 @@ case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in ;; esac -# tickadj is pretty useless on newer versions of ReliantUNIX -# Do not bother case "$target" in mips-sni-sysv4*) + # tickadj is pretty useless on newer versions of ReliantUNIX + # Do not bother ac_cv_make_tickadj=no ;; + *-*-solaris2*) + # DLM says tickadj is a no-no starting with solaris2.5 + case "$target" in + *-*-solaris2.[0-4]*) ;; + *) ac_cv_make_tickadj=no ;; + esac + ;; esac AC_SUBST(MAKE_TICKADJ) diff --git a/include/Makefile.in b/include/Makefile.in index e709184c0c..17690dafb6 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -63,6 +63,8 @@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ +AMTAR = @AMTAR@ +AMTARFLAGS = @AMTARFLAGS@ AWK = @AWK@ CC = @CC@ CFLAGS = @CFLAGS@ diff --git a/ntpd/ntp_refclock.c b/ntpd/ntp_refclock.c index 58b19b7592..d172302cf3 100644 --- a/ntpd/ntp_refclock.c +++ b/ntpd/ntp_refclock.c @@ -630,7 +630,7 @@ refclock_gtlin( trtmp = rbufp->recv_time; #ifdef HAVE_PPSAPI - if ((rbufp->fd == fdpps) && (time_pps_fetch(fdpps, &pi) >= 0)) { + if (rbufp->fd == fdpps && time_pps_fetch(fdpps, 0, &pi, 0) >= 0) { if(pps_assert) tsp = &pi.assert_timestamp; else @@ -1126,20 +1126,25 @@ refclock_ioctl( fdpps = 0; return (0); } - pp.mode = PPS_TSFMT_TSPEC; if (pps_assert) - pp.mode |= PPS_CAPTUREASSERT; + pp.mode = PPS_CAPTUREASSERT; else - pp.mode |= PPS_CAPTURECLEAR; + pp.mode = PPS_CAPTURECLEAR; + if (time_pps_setparams(fdpps, &pp) < 0) { + msyslog(LOG_ERR, + "refclock_ioctl: time_pps_setparams failed"); + fdpps = 0; + return (0); + } if (pps_hardpps) { if (pps_assert) - pp.mode |= PPS_HARDPPSONASSERT; + mode |= PPS_CAPTUREASSERT; else - pp.mode |= PPS_HARDPPSONCLEAR; + mode |= PPS_CAPTURECLEAR; } - if (time_pps_setparams(fdpps, &pp) < 0) { + if (time_pps_kcbind(fdpps, 0, mode, 0) < 0) { msyslog(LOG_ERR, - "refclock_ioctl: time_pps_setparams failed"); + "refclock_ioctl: time_pps_kpcbind failed"); fdpps = 0; return (0); } diff --git a/ntpd/refclock_atom.c b/ntpd/refclock_atom.c index e40c4781d8..1b40cb0127 100644 --- a/ntpd/refclock_atom.c +++ b/ntpd/refclock_atom.c @@ -293,7 +293,7 @@ atom_pps( i = up->pps_info.assert_sequence; if (fdpps <= 0) return (1); - if (time_pps_fetch(fdpps, &up->pps_info) < 0) + if (time_pps_fetch(fdpps, 0, &up->pps_info, 0) < 0) return (1); if (i == up->pps_info.assert_sequence) return (2); diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c index 98b49608b1..2cba7eb7df 100644 --- a/ntpd/refclock_oncore.c +++ b/ntpd/refclock_oncore.c @@ -451,16 +451,18 @@ oncore_start( } if (instance->assert) { - instance->pps_p.mode = PPS_CAPTUREASSERT | PPS_OFFSETASSERT | PPS_HARDPPSONASSERT; + instance->pps_p.mode = PPS_CAPTUREASSERT | PPS_OFFSETASSERT; instance->pps_p.assert_offset.tv_sec = 0; instance->pps_p.assert_offset.tv_nsec = 0; } else { - instance->pps_p.mode = PPS_CAPTURECLEAR | PPS_OFFSETCLEAR | PPS_HARDPPSONCLEAR; + instance->pps_p.mode = PPS_CAPTURECLEAR | PPS_OFFSETCLEAR; instance->pps_p.clear_offset.tv_sec = 0; instance->pps_p.clear_offset.tv_nsec = 0; } +/* if (time_pps_setparams(instance->pps_h, &instance->pps_p) < 0) instance->pps_p.mode &= ~(PPS_HARDPPSONCLEAR|PPS_HARDPPSONASSERT); +*/ if (time_pps_setparams(instance->pps_h, &instance->pps_p) < 0) { perror("time_pps_setparams"); exit(1); @@ -1257,7 +1259,7 @@ oncore_msg_En( #ifdef HAVE_PPSAPI j = instance->ev_serial; - if (time_pps_fetch(instance->pps_h, &pps_i) < 0) { + if (time_pps_fetch(instance->pps_h, 0, &pps_i, 0) < 0) { printf("ONCORE: time_pps_fetch failed\n"); return; } diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 98ef6a512e..008640b5d8 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -63,6 +63,8 @@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ +AMTAR = @AMTAR@ +AMTARFLAGS = @AMTARFLAGS@ AWK = @AWK@ CC = @CC@ CFLAGS = @CFLAGS@