📄 35
字号:
Replied: Mon, 11 Nov 1996 21:42:43 -0500Replied: "Craig Leres <leres@ee.lbl.gov> Dave Mills <mills@udel.edu>"Received: from copland.udel.edu by huey.udel.edu id aa07848; 8 Nov 96 2:48 ESTReceived: from hot.ee.lbl.gov (hot.ee.lbl.gov [131.243.1.42]) by copland.udel.edu (8.7.6/8.7.3) with ESMTP id CAA19873 for <mills@udel.edu>; Fri, 8 Nov 1996 02:48:19 -0500 (EST)Received: by hot.ee.lbl.gov (8.7.5/1.43r) id XAA14624; Thu, 7 Nov 1996 23:48:18 -0800 (PST)Message-Id: <199611080748.XAA14624@hot.ee.lbl.gov>To: Dave Mills <mills@udel.edu>Subject: xntp 5.86.8Date: Thu, 07 Nov 1996 23:48:18 PSTFrom: Craig Leres <leres@ee.lbl.gov>I finally got around to bringing it up this week.You appear to be using the most recent version of autoconf (2.10) butsome of your autoconf support scripts are out of date: config.guess install-shIt's important to keep these up to date or else people on bizarresystems will have trouble.Compiling with gcc 2.7.2.1 under SunOS 4.1.4 I get tons of warnings.The problem is you can't include both termios.h and sys/ioctl.h. Ibelieve there to be 3 worlds out there, the HAVE_BSD_TTYS one whichincludes sgtty.h and sys/ioctl.h, the HAVE_SYSV_TTYS which includestermio.h and the HAVE_TERMIOS which includes termios.h. If more thanone of these is defined at the same time, you're going to haveproblems.My fix is to only include sys/ioctl.h when HAVE_BSD_TTYS is defined.This works, at least under SunOS 4 and Solaris. Another approach wouldbe to just remove all the sys/ioctl.h includes and see if this breaksany particular os.I also fixed a number of minor prototype problems. I had some troublewith the configure script, it was clearing the ntp_refclock variable atwhat appears to be the wrong place. I found no way to get REFCLOCK tobe defined so I could run with the mx4200. My fix was to change wherethe variables get initialized. It works but I'm not sure if it's right.I also added autoconf tests for memory.h and string.h. There are a lotof places in the code where includes are hinged on OS defines insteadof functionality. Hopefully we can clean these up later.I took a fresh look at the mx4200 module. I think you asked me toupdate it. I see major differenced between it and the Austron 2201A GPSmodule but I'm not clear on what I need to do. If you can get me someinstruction, I should be able to bring the mx4200 model up to date (andtest the changes too).One final thing I wanted to comment on is that in previous versions ofxntp, I thought the binaries were installed in /usr/local/sbin insteadof /usr/local/bin. I didn't give changes for these but if sbin is theproper place to put the binaries, then the various Makefile.am filesneed to have occurances of bin_PROGRAMS changed to sbin_PROGRAMS. Craig------ At the top level:RCS file: RCS/configure.in,vretrieving revision 1.1diff -c -r1.1 configure.in*** /tmp/,RCSt1a09767 Thu Nov 7 23:36:36 1996--- configure.in Thu Nov 7 23:36:30 1996****************** 17,22 ****--- 17,27 ---- rm -f conftest* + ntp_libparse=no+ ntp_parseutil=no+ ntp_refclock=no+ ntp_rawdcf=no+ dnl # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. dnl test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" ****************** 48,53 ****--- 53,59 ---- AC_CHECK_HEADERS(sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h sys/proc.h) AC_CHECK_HEADERS(sys/resource.h sys/select.h sys/sockio.h sys/stream.h) AC_CHECK_HEADERS(sys/stropts.h sys/time.h sys/timex.h sys/tpro.h sys/types.h)+ AC_CHECK_HEADERS(memory.h string.h) AC_HEADER_TIME case "$host" in *-convex-*)****************** 947,957 **** ;; *) ;; esac- - ntp_libparse=no- ntp_parseutil=no- ntp_refclock=no- ntp_rawdcf=no AC_MSG_CHECKING(ELV/DCF7000 clock) AC_ARG_ENABLE(DCF7000, [ --enable-DCF7000 - ELV/DCF7000 clock],--- 953,958 ---------- From include:RCS file: RCS/md5.h,vretrieving revision 1.1diff -c -r1.1 md5.h*** /tmp/,RCSt1a09493 Thu Nov 7 23:25:19 1996--- md5.h Thu Nov 7 23:24:52 1996****************** 45,53 **** unsigned char digest[16]; /* actual digest after MD5Final call */ } MD5_CTX; ! void MD5Init ();! void MD5Update ();! void MD5Final (); /* ***********************************************************************--- 45,53 ---- unsigned char digest[16]; /* actual digest after MD5Final call */ } MD5_CTX; ! void MD5Init P((MD5_CTX *mdContext));! void MD5Update P((MD5_CTX *, unsigned const char *, unsigned int));! void MD5Final P((MD5_CTX *)); /* ***********************************************************************RCS file: RCS/ntp.h,vretrieving revision 1.1diff -c -r1.1 ntp.h*** /tmp/,RCSt1a09487 Thu Nov 7 23:25:03 1996--- ntp.h Thu Nov 7 23:24:53 1996****************** 96,102 **** struct event *next; /* next in chain */ struct event *prev; /* previous in chain */ struct peer *peer; /* peer this counter belongs to */! void (*event_handler)(); /* routine to call to handle event */ u_long event_time; /* expiry time of counter */ }; --- 96,103 ---- struct event *next; /* next in chain */ struct event *prev; /* previous in chain */ struct peer *peer; /* peer this counter belongs to */! void (*event_handler) P((struct peer *));! /* routine to call to handle event */ u_long event_time; /* expiry time of counter */ }; ****************** 549,555 **** struct interface *dstadr; /* interface datagram arrived thru */ int fd; /* fd on which it was received */ l_fp recv_time; /* time of arrival */! void (*receiver)(); /* routine to receive buffer */ int recv_length; /* number of octets received */ union { struct pkt X_recv_pkt;--- 550,556 ---- struct interface *dstadr; /* interface datagram arrived thru */ int fd; /* fd on which it was received */ l_fp recv_time; /* time of arrival */! void (*receiver) P((struct recvbuf *)); /* routine to receive buffer */ int recv_length; /* number of octets received */ union { struct pkt X_recv_pkt;RCS file: RCS/ntp_refclock.h,vretrieving revision 1.1diff -c -r1.1 ntp_refclock.h*** /tmp/,RCSt1a09508 Thu Nov 7 23:25:39 1996--- ntp_refclock.h Thu Nov 7 23:25:34 1996****************** 104,110 **** */ struct refclockio { struct refclockio *next; /* link to next structure */! void (*clock_recv)();/* completion routine */ caddr_t srcclock; /* pointer to clock structure */ int datalen; /* lenth of data */ int fd; /* file descriptor */--- 104,110 ---- */ struct refclockio { struct refclockio *next; /* link to next structure */! void (*clock_recv)P((struct recvbuf *)); /* completion routine */ caddr_t srcclock; /* pointer to clock structure */ int datalen; /* lenth of data */ int fd; /* file descriptor */RCS file: RCS/ntp_string.h,vretrieving revision 1.1diff -c -r1.1 ntp_string.h*** /tmp/,RCSt1a09527 Thu Nov 7 23:26:33 1996--- ntp_string.h Thu Nov 7 23:26:18 1996****************** 9,23 **** # include <memory.h> #endif ! #ifdef STDC_HEADERS # include <string.h>! #else # ifndef HAVE_STRCHR # include <strings.h> # define strchr index # define strrchr rindex # endif char *strchr(), *strrchr(); # ifndef HAVE_MEMCPY # define NTP_NEED_BOPS # endif--- 9,27 ---- # include <memory.h> #endif ! #ifdef HAVE_STRING_H # include <string.h>! #endif! ! #ifndef STDC_HEADERS # ifndef HAVE_STRCHR # include <strings.h> # define strchr index # define strrchr rindex # endif+ # ifndef __GNUC__ char *strchr(), *strrchr();+ # endif # ifndef HAVE_MEMCPY # define NTP_NEED_BOPS # endifRCS file: RCS/ntp_stdlib.h,vretrieving revision 1.1diff -c -r1.1 ntp_stdlib.h*** /tmp/,RCSt1a09548 Thu Nov 7 23:27:01 1996--- ntp_stdlib.h Thu Nov 7 23:26:58 1996****************** 51,56 ****--- 51,58 ---- extern void init_auth P((void)); extern void init_lib P((void)); extern void init_random P((void));+ extern struct savekey *auth_findkey P((u_long));+ extern int auth_moremem P((void)); #ifdef DES extern void DESauth1crypt P((u_long, u_int32 *, int));****************** 95,99 ****--- 97,103 ---- extern char * uinttoa P((u_long)); extern int decodenetnum P((const char *, u_int32 *));+ + extern char * FindConfig P((char *)); extern RETSIGTYPE signal_no_reset P((int, RETSIGTYPE (*func)(int)));------ From libntp:RCS file: RCS/atoint.c,vretrieving revision 1.1diff -c -r1.1 atoint.c*** /tmp/,RCSt1a09575 Thu Nov 7 23:27:59 1996--- atoint.c Thu Nov 7 23:27:52 1996****************** 5,10 ****--- 5,11 ---- #include <ctype.h> #include "ntp_types.h"+ #include "ntp_stdlib.h" int atoint(str, ival)RCS file: RCS/atouint.c,vretrieving revision 1.1diff -c -r1.1 atouint.c*** /tmp/,RCSt1a09580 Thu Nov 7 23:28:05 1996--- atouint.c Thu Nov 7 23:27:52 1996****************** 5,10 ****--- 5,11 ---- #include <ctype.h> #include "ntp_types.h"+ #include "ntp_stdlib.h" int atouint(str, uval)RCS file: RCS/md5.c,vretrieving revision 1.1diff -c -r1.1 md5.c*** /tmp/,RCSt1a09614 Thu Nov 7 23:28:41 1996--- md5.c Thu Nov 7 23:28:37 1996****************** 51,57 **** */ /* forward declaration */! static void Transform (); #ifdef __STDC__ static const--- 51,57 ---- */ /* forward declaration */! static void Transform P((UINT4 *, UINT4 *)); #ifdef __STDC__ static const****************** 136,142 **** */ void MD5Update (mdContext, inBuf, inLen) MD5_CTX *mdContext;! unsigned char *inBuf; unsigned int inLen; { UINT4 in[16];--- 136,142 ---- */ void MD5Update (mdContext, inBuf, inLen) MD5_CTX *mdContext;! unsigned const char *inBuf; unsigned int inLen; { UINT4 in[16];RCS file: RCS/tvtoa.c,vretrieving revision 1.1diff -c -r1.1 tvtoa.c*** /tmp/,RCSt1a09619 Thu Nov 7 23:28:50 1996--- tvtoa.c Thu Nov 7 23:28:32 1996****************** 11,20 **** #include "ntp_fp.h" #endif /* VMS */ #include "ntp_stdlib.h" char * tvtoa(tv)! struct timeval *tv; { register char *buf; register u_long sec;--- 11,21 ---- #include "ntp_fp.h" #endif /* VMS */ #include "ntp_stdlib.h"+ #include "ntp_unixtime.h" char * tvtoa(tv)! const struct timeval *tv; { register char *buf; register u_long sec;RCS file: RCS/authreadkeys.c,vretrieving revision 1.1diff -c -r1.1 authreadkeys.c*** /tmp/,RCSt1a09641 Thu Nov 7 23:29:28 1996--- authreadkeys.c Thu Nov 7 23:29:21 1996****************** 27,32 ****--- 27,35 ---- #define KEY_TYPE_MD5 4 #endif + /* Forwards */+ static char *nexttok P((char **));+ /* * nexttok - basic internal tokenizing routine */RCS file: RCS/clocktypes.c,vretrieving revision 1.1diff -c -r1.1 clocktypes.c*** /tmp/,RCSt1a09707 Thu Nov 7 23:30:48 1996--- clocktypes.c Thu Nov 7 23:30:25 1996****************** 7,12 ****--- 7,13 ---- #include "ntp.h" #include "lib_strbuf.h" #include "ntp_refclock.h"+ #include "ntp_stdlib.h" struct clktype clktypes[] = { { REFCLK_NONE, "unspecified type (0)",===================================================================RCS file: RCS/findconfig.c,vretrieving revision 1.1diff -c -r1.1 findconfig.c*** /tmp/,RCSt1a09707 Thu Nov 7 23:30:48 1996--- findconfig.c Thu Nov 7 23:30:25 1996****************** 53,58 ****--- 53,60 ---- return(result); } #else+ #include "ntp_stdlib.h"+ char * FindConfig(base) char *base;===================================================================RCS file: RCS/statestr.c,vretrieving revision 1.1diff -c -r1.1 statestr.c*** /tmp/,RCSt1a09707 Thu Nov 7 23:30:48 1996--- statestr.c Thu Nov 7 23:30:25 1996****************** 8,13 ****--- 8,14 ---- #include "lib_strbuf.h" #include "ntp_refclock.h" #include "ntp_control.h"+ #include "ntp_string.h" /* * Structure for turning various constants into a readable string.****************** 112,117 ****--- 113,122 ---- #endif { -1, "event" } };+ + /* Forwards */+ static char *getcode P((int, struct codestring *));+ static char *getevents P((int)); /* * getcode - return string corresponding to code===================================================================RCS file: RCS/syssignal.c,vretrieving revision 1.1diff -c -r1.1 syssignal.c*** /tmp/,RCSt1a09707 Thu Nov 7 23:30:49 1996--- syssignal.c Thu Nov 7 23:30:26 1996****************** 12,18 **** void signal_no_reset(sig, func) int sig;! void (*func)(); { int n; struct sigaction vec;--- 12,18 ---- void signal_no_reset(sig, func) int sig;! void (*func) P((int)); { int n; struct sigaction vec;****************** 40,46 **** RETSIGTYPE signal_no_reset(sig, func) int sig;! RETSIGTYPE (*func)(int); { signal(sig, func); --- 40,46 ---- RETSIGTYPE signal_no_reset(sig, func) int sig;! RETSIGTYPE (*func) P((int); { signal(sig, func); ===================================================================RCS file: RCS/utvtoa.c,vretrieving revision 1.1diff -c -r1.1 utvtoa.c*** /tmp/,RCSt1a09707 Thu Nov 7 23:30:49 1996--- utvtoa.c Thu Nov 7 23:30:26 1996****************** 11,20 **** #include "ntp_fp.h" #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -