]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntp_refclock.c, refclock_atom.c, refclock_oncore.c:
authorHarlan Stenn <stenn@ntp.org>
Sun, 10 Oct 1999 02:23:55 +0000 (02:23 -0000)
committerHarlan Stenn <stenn@ntp.org>
Sun, 10 Oct 1999 02:23:55 +0000 (02:23 -0000)
  * 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

ChangeLog
configure
configure.in
include/Makefile.in
ntpd/ntp_refclock.c
ntpd/refclock_atom.c
ntpd/refclock_oncore.c
scripts/Makefile.in

index ca191769e524f7ac007c36dbf8ce148279fed6d5..d1102f72afbb6af4910a90814d207e39120e5621 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+1999-10-09  Harlan Stenn  <stenn@whimsy.udel.edu>
+
+       * 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  <stenn@whimsy.udel.edu>
 
        * configure.in: We might need -lsocket for the -lnsl check.
index 6718fbc278cd8e2d2ace051423e4eae67bc6ffe1..be34843b2b3fc7d6ebe2152cf0e6431a4cfed88c 100755 (executable)
--- 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
index 0dd12e7c292afe62b01f2039688a4b4dfeb06e2a..49aeeb73870b2787b5c9585da81e3efe06a137dc 100644 (file)
@@ -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)
index e709184c0cc341bc65b484fa04e84bacfee45081..17690dafb640217dc0806952cc0f2dea61f5bf75 100644 (file)
@@ -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@
index 58b19b75921f95d8a4d60a53adbf7cedfa055e68..d172302cf3227d99ac460af6a6fb23c95fa750fa 100644 (file)
@@ -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);
                }
index e40c4781d845bb7b3383cc6abeafad92f577f6c4..1b40cb0127ea8f39dca4bff13d88585fffe3905a 100644 (file)
@@ -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);
index 98b49608b1988b6dc78f1485bf7a918a9cdd02ff..2cba7eb7df9da37a0ee39767a84ff5045be9a0fd 100644 (file)
@@ -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;
        }
index 98ef6a512e0660101bdb6da7130b2a1af1ed287f..008640b5d86e929f426274497f617687c6c531fb 100644 (file)
@@ -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@