📄 11
字号:
Replied: Fri, 01 May 1998 11:31:45 -0400Replied: "Per Hedeland <per@erix.ericsson.se> "Received: from mail.eecis.udel.edu by whimsy.udel.edu id aa06670; 1 May 1998 08:09 EDTReceived: from super.du.etx.ericsson.se (per@super.du.etx.ericsson.se [150.236.14.16]) by penguin.wise.edt.ericsson.se (8.7.5/8.7.3/penguin-1.12) with ESMTP id OAA11002 for <stenn@whimsy.udel.edu>; Fri, 1 May 1998 14:09:56 +0200 (MET DST)Received: (from per@localhost) by super.du.etx.ericsson.se (8.9.0.Beta6/8.9.0.Beta6/erix-1.4) id OAA03368; Fri, 1 May 1998 14:09:56 +0200 (MET DST)Date: Fri, 1 May 1998 14:09:56 +0200 (MET DST)From: Per Hedeland <per@erix.ericsson.se>Message-Id: <199805011209.OAA03368@super.du.etx.ericsson.se>To: stenn@whimsy.udel.eduSubject: Re: xntp3-5.93 has been released.Newsgroups: comp.protocols.time.ntpIn-Reply-To: <o4wwca7v67.fsf@whimsy.udel.edu>In article <o4wwca7v67.fsf@whimsy.udel.edu> you write:>Again, we will limit changes to portability and bugs only.>* Jupiter clock addedWell, I don't know whether this was portability or bug:-) (or perhapsthat policy wasn't applied before), but anyway it breaks compilationon Solaris 2.6 when PPS is #defined (I just recently figured out how touse the PPS support in Solaris 2.6 with ATOM - without source changes toxntp):refclock_jupiter.c: In function `jupiter_ttyinit':refclock_jupiter.c:1305: `pps_enable' undeclared (first use in this function)refclock_jupiter.c:1305: (Each undeclared identifier is reported only oncerefclock_jupiter.c:1305: for each function it appears in.)*** Error code 1Adding the missing declaration is trivial of course, but whether thatmakes the code "correct" is another question - it seems to me that the#ifdef's guarding the two ioctl's towards the end don't really representthe appropriate logic - certainly both TIOCSPPS and I_PUSH are #definedon Solaris 2.6, for example, while it seems unlikely that both ioctl'sshould be done. (Of course running configure with --disable-JUPITER is apossible workaround for the problem.)Another thing, which you may or may not consider a "bug" worth fixing inxntp3 (sorry, I haven't looked at version 4 yet): It isn't possible touse LDISC_PPS if you *only* have the PPS-via-DCD signal (i.e. notimestamp data coming via the same serial port to be consumed by anotherclock driver) - I recently had a need for this as I wanted to feed thePPS signal to two computers, while only one received the associatedtimestamp (feeding this to both would have been complex as xntpd pollsthe clock - Arbiter).Now, refclock_atom.c has code to deal with the situation that there isno other driver opening the serial port, and will open it itself after ashort delay - but when doing so, unconditionally uses LDISC_CLKPPS forno apparent (to me:-) reason. The very small change below will (obviously)make it use LDISC_PPS instead if PPS is #defined.I'm pretty sure this change is "safe", as PPS being #defined impliesusage of LDISC_PPS in lots of other places in the code - e.g. atom_pps()will keep polling the port using CIOGETEV, which is inappropriate whenit was opened with LDISC_CLKPPS. Of course some of the comments will nolonger agree with the code, but I'd be happy to fix that up too if youdecide to include the change.--Per Hedelandper@erix.ericsson.se*** xntpd/refclock_atom.c.orig Sat Apr 25 01:14:20 1998--- xntpd/refclock_atom.c Wed Apr 29 14:41:20 1998****************** 456,462 **** */ (void)sprintf(device, DEVICE, unit); if (!(fd = refclock_open(device, SPEED232,! LDISC_CLKPPS))) { refclock_report(peer, CEVNT_FAULT); return; }--- 456,467 ---- */ (void)sprintf(device, DEVICE, unit); if (!(fd = refclock_open(device, SPEED232,! #ifdef PPS! LDISC_PPS! #else! LDISC_CLKPPS! #endif! ))) { refclock_report(peer, CEVNT_FAULT); return; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -