Replied: Thu, 12 Mar 1998 20:32:10 -0500
Replied: "Marc Brett <Marc.Brett@waii.com> "
Received: from mail.eecis.udel.edu by whimsy.udel.edu id aa24144;
          12 Mar 1998 16:14 EST
Received: by diamond id GAA18087; Thu, 12 Mar 1998 06:34:26 -0600 sender Marc.Brett@waii.com for 
Received: from unknown(137.144.128.17) user <Marc.Brett@waii.com> by diamond.waii.com via smap (3.2)
	id xma018045; Thu, 12 Mar 98 06:32:25 -0600
Received: from merlin.london.waii.com (merlin.london.waii.com [136.250.33.1])
	by mail1.wg.waii.com (8.8.7/8.8.7) with ESMTP id GAA123952;
	Thu, 12 Mar 1998 06:32:24 -0600
Received: from rgs0.london.waii.com (rgs0.london.waii.com [136.250.40.10])
          by merlin.london.waii.com (8.8.4/8.8.4) with SMTP
	  id MAA55356; Thu, 12 Mar 1998 12:32:22 GMT
Received: by rgs0.london.waii.com (951211.SGI.8.6.12.PATCH1502/920502.SGI)
	 id MAA11022; Thu, 12 Mar 1998 12:32:20 GMT
From: Marc Brett <Marc.Brett@waii.com>
Message-Id: <9803121232.ZM11020@rgs0.london.waii.com>
Date: Thu, 12 Mar 1998 12:32:17 +0000
X-Mailer: Z-Mail (3.2.0 26oct94 MediaMail)
To: stenn@whimsy.udel.edu
Subject: Portability patches for xntp3-5.92c
Cc: Marc.Brett@waii.com, Frank.Vance@waii.com, mills@udel.edu
Mime-Version: 1.0
Content-Type: multipart/mixed;
	boundary="PART-BOUNDARY=.19803121232.ZM11020.london.waii.com"

--
--PART-BOUNDARY=.19803121232.ZM11020.london.waii.com
Content-Type: text/plain; charset=us-ascii

Harlan,

Some minor portability patches to keep the AIX 4.2 compiler quiet.
There's a bug in <sys/socket.h> which still generates compile-time
warnings for all calls to recvfrom(), but IMHO that's really IBM's
problem.

Also, I think this is finally the right code for refclock_msfees.c

Regards,

Marc

-- 
Marc Brett  +44 181 560 3160            Western Geophysical
Marc.Brett@waii.com                     455 London Road, Isleworth
FAX: +44 181 847 5711                   Middlesex TW7 5AB    UK

--PART-BOUNDARY=.19803121232.ZM11020.london.waii.com
X-Zm-Content-Name: xntp3-5.92c.diffs
Content-Description: Text
Content-Type: text/plain ; name="xntp3-5.92c.diffs" ; charset=us-ascii

*** xntpd/ntp_io.c.orig	Tue Mar  3 05:28:12 1998
--- xntpd/ntp_io.c	Thu Mar 12 10:49:09 1998
***************
*** 524,530 ****
  	}
  #  endif /* not STREAMS_TLI */
  # endif /* not SYS_WINNT */
! #endif 0
  
        (void)strncpy(inter_list[i].name, ifreq.ifr_name,
  		    sizeof(inter_list[i].name));
--- 524,530 ----
  	}
  #  endif /* not STREAMS_TLI */
  # endif /* not SYS_WINNT */
! #endif /* 0 */
  
        (void)strncpy(inter_list[i].name, ifreq.ifr_name,
  		    sizeof(inter_list[i].name));
*** xntpd/refclock_msfees.c.orig	Fri Mar  6 03:19:03 1998
--- xntpd/refclock_msfees.c	Thu Mar 12 10:35:38 1998
***************
*** 155,161 ****
  
  /* Offsets of the bytes of the serial line code.  The clock gives
   * local time with a GMT/BST indication. The EESM_ definitions
!  * give offsets into ees->p_lastcode.
   */
  #define EESM_CSEC	 0	/* centiseconds - always zero in our clock  */
  #define EESM_SEC	 1	/* seconds in BCD			    */
--- 155,161 ----
  
  /* Offsets of the bytes of the serial line code.  The clock gives
   * local time with a GMT/BST indication. The EESM_ definitions
!  * give offsets into ees->lastcode.
   */
  #define EESM_CSEC	 0	/* centiseconds - always zero in our clock  */
  #define EESM_SEC	 1	/* seconds in BCD			    */
***************
*** 651,657 ****
  		/*FALLSTHROUGH*/
  
  	case EESCS_GOTSOME:
! 		cp = &(ees->p_lastcode[ees->lencode]);
  
  		/* Gobble the bytes until the final (possibly stripped) 0xff */
  		while (dpt < dpend && (*dpt & 0x7f) != 0x7f) {
--- 651,657 ----
  		/*FALLSTHROUGH*/
  
  	case EESCS_GOTSOME:
! 		cp = &(ees->lastcode[ees->lencode]);
  
  		/* Gobble the bytes until the final (possibly stripped) 0xff */
  		while (dpt < dpend && (*dpt & 0x7f) != 0x7f) {
***************
*** 663,669 ****
  				    msyslog(LOG_INFO,
  "I: ees clock: %d + %d > %d [%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x]",
  				    ees->lencode, dpend - dpt, LENEESPRT,
! #define D(x) (ees->p_lastcode[x])
  				    D(0), D(1), D(2), D(3), D(4), D(5), D(6),
  				    D(7), D(8), D(9), D(10), D(11), D(12));
  #undef	D
--- 663,669 ----
  				    msyslog(LOG_INFO,
  "I: ees clock: %d + %d > %d [%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x]",
  				    ees->lencode, dpend - dpt, LENEESPRT,
! #define D(x) (ees->lastcode[x])
  				    D(0), D(1), D(2), D(3), D(4), D(5), D(6),
  				    D(7), D(8), D(9), D(10), D(11), D(12));
  #undef	D
***************
*** 699,705 ****
  
  		/* Finally, got a complete buffer.  Mainline code will
  		 * continue on. */
! 		cp = ees->p_lastcode;
  		break;
  
  	default:
--- 699,705 ----
  
  		/* Finally, got a complete buffer.  Mainline code will
  		 * continue on. */
! 		cp = ees->lastcode;
  		break;
  
  	default:
***************
*** 725,731 ****
  		return;
  	}
  
! 	cp = ees->p_lastcode;
  
  	/* Check that centisecond is zero */
  	if (cp[EESM_CSEC] != 0) {
--- 725,731 ----
  		return;
  	}
  
! 	cp = ees->lastcode;
  
  	/* Check that centisecond is zero */
  	if (cp[EESM_CSEC] != 0) {
***************
*** 1495,1501 ****
  		if (unitinuse[unit]) {
  			out->flags     |= ees->dump_vals | ees->usealldata;
  			out->lencode	= ees->lencode;
! 			strcpy(out->p_lastcode, ees->p_lastcode);
  			out->timereset	= current_time - ees->timestarted;
  			out->polls	= 0; /* we don't poll */
  			out->noresponse	= 0; /* ditto */
--- 1495,1501 ----
  		if (unitinuse[unit]) {
  			out->flags     |= ees->dump_vals | ees->usealldata;
  			out->lencode	= ees->lencode;
! 			strcpy(out->p_lastcode, ees->lastcode);
  			out->timereset	= current_time - ees->timestarted;
  			out->polls	= 0; /* we don't poll */
  			out->noresponse	= 0; /* ditto */
*** util/tickadj.c.orig	Fri Mar  6 03:04:52 1998
--- util/tickadj.c	Thu Mar 12 12:01:01 1998
***************
*** 650,656 ****
        }
      }
  #endif /* HAVE_GETBOOTFILE */
!   for (kname = kernels; *kname != NULL; kname++)
      {
        struct stat stbuf;
  
--- 650,656 ----
        }
      }
  #endif /* HAVE_GETBOOTFILE */
!   for (kname = (char **) kernels; *kname != NULL; kname++)
      {
        struct stat stbuf;
  
***************
*** 680,686 ****
  
    if (dokmem)
      {
!       file = kmem;
  
        fd = openfile(file, O_RDONLY);
  #ifdef NLIST_EXTRA_INDIRECTION
--- 680,686 ----
  
    if (dokmem)
      {
!       file = (char *) kmem;
  
        fd = openfile(file, O_RDONLY);
  #ifdef NLIST_EXTRA_INDIRECTION

--PART-BOUNDARY=.19803121232.ZM11020.london.waii.com--

